Modifying an APK

"Please leave a message at the beep, we will get back to you when your support contract expires."

Moderators: phlip, Moderators General, Prelates

User avatar
Posts: 6264
Joined: Wed Dec 12, 2007 5:31 am UTC
Location: Canada

Modifying an APK

Postby Jorpho » Wed Apr 17, 2019 4:50 am UTC

I have a couple of apps on my Android (Marshmallow) phone that install to the limited internal memory. According to ... l-location , the way to fix this is simply to add android:installLocation="preferExternal" to AndroidManifest.xml .

So I downloaded apktool 2.4.0 from and was able to decode the APK, just like in . (I'm starting with this APK.) Attempting to build the APK promptly reveals that there's a bug in apktool 2.4.0, because of course there is.

So I decided to try versions 2.3.1 and 2.3.4, which turn up a different error:

Code: Select all

Exception in thread "main" jzentry == 0,
 jzfile = 364822008,
 total = 1368,
 name = 30dayf~1\dist\30dayf~1.apk.apktool_temp,
 i = 1,
 message = null
        at$ Source)
        at$ZipEntryIterator.nextElement(Unknown Source)
        at$ZipEntryIterator.nextElement(Unknown Source)
        at brut.androlib.Androlib.copyExistingFiles(
        at brut.androlib.Androlib.buildUnknownFiles(
        at brut.apktool.Main.cmdBuild(
        at brut.apktool.Main.main(

Unfortunately Google is not at all clear as to what may be causing this error. I really have no idea if I'm doing something obviously wrong here, considering I've never used this tool before. Would anyone happen to have any ideas?

Java version 1.8.0_201 on Windows 7x64, if that makes any difference.

Return to “The Help Desk”

Who is online

Users browsing this forum: No registered users and 7 guests