Wiki:How to resign an APK or update zip

1) You need:

- APK(s) (let's say, samdroid.apk)
- jar file to sign http://www.mediafire.com/?f8fxwxo4f7scrr0

2) create folders tree: /system/app and META-INF/com/google/android

3) create a file update-script in META-INF/com/google/android

4) The update script should look this this: (it's necessary that exists a four/empty line at the end)

Code:
show_progress 0.1 0
copy_dir PACKAGE:system SYSTEM:
show_progress 0.1 10
5) Zip both folders (system and META-INF) to "something.zip"

6) Sign update

Code:
java -classpath <path to testsign.jar> testsign something.zip something-signed.zip
To understand better the update-script file:

Syntax: copy_dir <src-dir> <dst-dir> [<timestamp>]

<src-dir> and <dst-dir> options:
ROOT: Root FileSystem ('/')
BOOT: Boot ('/dev/block/mtdblock0')
DATA: Data ('/data' or '/dev/block/mtdblock2')
CACHE: Cache ('/cache' or '/dev/block/mtdblock5')
MISC: ('/dev/block/mtdblock3')
PACKAGE: update.zip
RECOVERY: Recovery ('/dev/block/mtdblock4')
SDCARD: SDCard ('/sdcard')
SYSTEM: System ('/system' or '/dev/block/mtdblock1')
TMP: (RAM, cleared on reboot)

For example:

If you want an app installed on /data you should have:

copy_dir PACKAGE:system DATA:

Bookmarks

Posting Permissions

Posting Permissions
  • You may not create new articles
  • You may not edit articles
  • You may not protect articles
  • You may not post comments
  • You may not post attachments
  • You may not edit your comments