Jump to content


Help editing apk with APKTool

- - - - -

  • Please log in to reply
1 reply to this topic

#1
oldmanhouse

oldmanhouse

    Newbie

  • Members
  • Pip
  • 34 posts
  • Devices:ZTE Blade
I'm trying to make a small change to the layout of a keyboard app with comes pre-installed on a ROM I'm using (Mms.apk). Upon  recompiling the files back into an apk (and signing them with  jarsigner) and redeploying it with adb push, the app always force closes.

  Checking logcat indicates that there's an error with an XML file (it says it's missing an android:layout_width  attribute - which it is.. but adding it makes no difference, as another  error will pop up elsewhere. The problem seems to lie with the  recompilation process, as the app (in its original form) works just fine  without these attributes which are causing a RuntimeException with the  edited apk..

  Just for the record, even if I make no changes - merely decompile the  original apk and then compile it again straight away, the problem  remains.

  If I don't sign the apk, then it doesn't install at all. Perhaps my signing is causing the problem? Here's what I do:

  
apktool d Mms.apk //decompile the original apk (Mms.apk)
apktool b Mms //make no alterations and recompile it again
cd Mms/dist //change into the directory where the new apk is generated
jarsigner -verbose -keystore jspapps.keystore Mms.apk jspapps.keystore //sign the apk with keystore (jspapps.keystore)
adb remount //connect to phone..
adb push Mms.apk /system/app //push the apk
adb reboot //reboot.....
  Force close everytime!

  Any help would be much appreciated. I've been at this for hours now!


#2
oldmanhouse

oldmanhouse

    Newbie

  • Members
  • Pip
  • 34 posts
  • Devices:ZTE Blade
Turns out it's an error in the current build of APKTool (1.41). See the thread here for a resolution: http://code.google.c...e Owner Summary
Download new build and overwrite your old apktool.jar with it.





0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users