Reputation: 8158
Is there a way to retrieve the androidmanifest.xml using just Java? I know about android-apktools but I can't install an application. I need to keep this restricted to just Java and whatever libraries I point it to. Is there a library with these kind of functions (like an apktool.jar)?
Thanks.
Upvotes: 4
Views: 10900
Reputation: 16209
If you look into the question on your comment link, there is an answer (Ribo's community wiki) providing a code snippet in Java to decode the manifest XML in the APK, and then recreate the XML.
Providing the APK file, the code then extracts the manifest and recreate it.
I just read the code very quickly, and I didn't find anything tied to Android (i.e., pure Java). So I believe you can copy that code and create a standalone Java jar to be executed on demand. Or integrated into code, in case you want go further.
Upvotes: 3