Wednesday, January 9, 2013

Moding Part III

Part III: rebuilding & updating
  1. Go back to your command prompt and enter the folloing command: (this will rebuild the app)
    apktool b TouchWiz30Launcher
  2. Now you will update your apk file.
    • Open the original TouchWiz30Launcher.apk file with winrar (or 7zip). do not extract it.
    • Go to C:\twmod\TouchWiz30Launcher\build\apk\res and copy every file that you edited to its respective location inside the apk file.
    • if the file you edited does not exist in this folder, then copy C:\twmod\TouchWiz30Launcher\build\apk\resources.arsc to the source of the apk file
    • if you edited some smali files, also copy C:\twmod\TouchWiz30Launcher\build\apk\classes.dex (and resources.arsc just to be sure  )
  3. Now you will copy the apk file to your phone under /system/app and change its permissions to rw- r-- r-- (644)
    Back to your command prompt, enter the following commands:
    adb shell mount -rw -o remount /dev/block/mtdblock1 /system
    adb shell mv /system/app/TouchWiz30Launcher.apk /system/app/TouchWiz30Launcher.apk.bak
    adb push c:\twmod\TouchWiz30Launcher.apk /system/app/TouchWiz30Launcher.apk
    adb shell chmod 644 /system/app/TouchWiz30Launcher.apk

    NOTE: Your original TouchWiz apk will be backed up. if the modded version did not work, run the following commands to recover the original file:
    adb shell mount -rw -o remount /dev/block/mtdblock1 /system
    adb shell rm /system/app/TouchWiz30Launcher.apk
    adb shell mv /system/app/TouchWiz30Launcher.apk.bak /system/app/TouchWiz30Launcher.apk

No comments:

Post a Comment