1. Download the #1 Android News App:   EarlyBird - News for Android
    Dismiss Notice

Unzip/re-zip APK file

Last Updated:

  1. .haNk

    .haNk New Member

    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?

  2. .haNk

    .haNk New Member

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

    wige Well-Known Member

    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.
  4. .haNk

    .haNk New Member

    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

    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? :confused:
  5. wige

    wige Well-Known Member

    If you are using Eclipse, did you try the export utility?
  6. .haNk

    .haNk New Member

    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?

Share This Page