I compile an HTML5 game of mine from cocookjs.
they gave me two versions of the game -
A debug self signed version
A release unsigned version
I signed and aligned the release version and then I tried to install it in the emulator. The emulator gave me INSTALL_FAILED_CONTAINER_ERROR
I tried the adb install -s option too, but even then it throwed up the same damn error.
So I need to change the permission of storage preference to AUTO in AndroidManifest.XML as said here:
Change the android:installLocation fieldNow I need to extract the AndroidManifest.xml file from the APK, do the required change, recompile it, and try to run it again.
To get that, I looked up APKTools, downloaded the two files, ran this
apktool d thegame.apk df_folder
Here's the execution trace:
C:\Users\xxxx\Desktop\android stuff\apktool1.5.2>apktool d thegame.apk gamedecompiled
I: Baksmaling...
I: Loading resource table...
I: Loaded.
I: Decoding AndroidManifest.xml with resources...
Exception in thread "main" brut.androlib.AndrolibException: Could not decode XML
at brut.androlib.res.decoder.XmlPullStreamDecoder.decode(XmlPullStreamDecoder.java:134)
at brut.androlib.res.decoder.XmlPullStreamDecoder.decodeManifest(XmlPullStreamDecoder.java:144)
at brut.androlib.res.decoder.ResFileDecoder.decodeManifest(ResFileDecoder.java:131)
at brut.androlib.res.AndrolibResources.decode(AndrolibResources.java:218)
at brut.androlib.Androlib.decodeResourcesFull(Androlib.java:115)
at brut.androlib.ApkDecoder.decode(ApkDecoder.java:114)
at brut.apktool.Main.cmdDecode(Main.java:146)
at brut.apktool.Main.main(Main.java:77)
Caused by: org.xmlpull.v1.XmlPullParserException: caused by: org.xmlpull.v1.XmlPullParserException: resource not found: /META-INF/services/org.xmlpull.v1.XmlPullParserFactory make sure that parser implementing XmlPull API is available
at org.xmlpull.v1.XmlPullParserFactory.newInstance(XmlPullParserFactory.java:294)
at org.xmlpull.v1.XmlPullParserFactory.newInstance(XmlPullParserFactory.java:259)
at org.xmlpull.v1.wrapper.XmlPullWrapperFactory.<init>(XmlPullWrapperFactory.java:52)
at org.xmlpull.v1.wrapper.XmlPullWrapperFactory.newInstance(XmlPullWrapperFactory.java:29)
at brut.androlib.res.decoder.XmlPullStreamDecoder.decode(XmlPullStreamDecoder.java:48)
... 7 more