• After 15+ years, we've made a big change: Android Forums is now Early Bird Club. Learn more here.

Apps Unzip/re-zip APK file

.haNk

Lurker
Dec 6, 2009
4
0
I unzipped an APK file to make a few changes to a prog, but after re-zipping, i get an error when trying to install, "There is a problem parsing the package." Does anyone know how to correct this?

I'm using the Linux zip command to zip the file:

# zip -r blahblah.apk * (directory contains all of the orig APK files)

Is there any special way to zip the file?
 
still having problems.

i tried installing using 'adb', and i get the following error:

hank@killj0y:~/Scripts/android/android-sdk-linux_86/tools$ ./adb install ../../workspace/keytools/patchtest.apk
187 KB/s (10545 bytes in 0.054s)
pkg: /data/local/tmp/patchtest.apk
Failure [INSTALL_PARSE_FAILED_UNEXPECTED_EXCEPTION]

i tried disassembling the classes.dex file using JesusFreke's smali/baksmali and editing it before re-assembly. i then zip the file and sign it. no luck. any ideas? :thinking:
 
Upvote 0
i'm not sure that i can import a decompiled classes.dex file into Eclipse. i'll be happy to know if i'm mistaken though. :)

i've tried everything i can think of here, but i still get the parse error when trying to install via 'adb'. i've tried decompiling/editing, using a hex editor to directly modify classes.dex (ensuring to change one single byte to not change file size), re-signing, not resigning, zipalign-ing the file after modification, etc., etc.

does anyone know what this error means or how to correct it?
 
Upvote 0

BEST TECH IN 2023

We've been tracking upcoming products and ranking the best tech since 2007. Thanks for trusting our opinion: we get rewarded through affiliate links that earn us a commission and we invite you to learn more about us.

Smartphones