Apps Unzip/re-zip APK file

.haNk

Lurker
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?
 

.haNk

Lurker
Thread starter
nevermind. turns out it was the way i was installing it. can't install directly from Gmail - have to download to SDcard.
 

wige

Newbie
I noticed a similar problem trying to install through the Gmail app - however, using the browser and going to gmail.com, I was able to install apps without a problem.
 

.haNk

Lurker
Thread starter
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:
 

.haNk

Lurker
Thread starter
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?
 
Top