Help editing .apk files?

Discussion in 'Android Hacks and Help' started by budmonster, Apr 29, 2010.

  1. budmonster
    Online

    budmonster Guest

    Is there a proper way to edit apk files in general? I pulled the framework-res.apk from my phone the other night to change the sliders on my lockscreen. I used winrar to zip the framework apk and then went in replaced some images, none of them where .9 images. After I swapped images, I pushed the framework back using ADB and my phone instantly reboots every time. When my droid comes back online, the images changed so i figured it worked. But now I'm experiencing some problems, such as, I cant install anything from the Market and, my installed applications have seem to reset to their default settings and I get random FCs. That's why I'm wondering if I'm doing something wrong or if there is any easier, correct way to edit APK's? Could it be that I'm on a CM rom and that's giving me problems? I don't know.

    Also, I belive if you edit third party apps like Tweetcaster, Rom Manager, etc. you have to auto-sign them, correct? But stock apps you dont?

    Thanks,
    Bud
  2. mgx
    Offline

    mgx New Member

    Joined:
    Feb 21, 2010
    Messages:
    27
    Likes Received:
    0
    Trophy Points:
    0
    if its just image themeing youre doing to framework-res just pull the apk and put it on your sdcard and create a metamorph theme that morphs the sdcard copy then reboot the phone into recovery and pull the framework from your sdcard and push it back into system/framework also make sure you m,ount /system/ before pushing when in recovery
  3. thebowers
    Offline

    thebowers Premium Member Theme Developer Premium Member

    Joined:
    Nov 24, 2009
    Messages:
    2,548
    Likes Received:
    0
    Trophy Points:
    0
    Location:
    Iowa
    Open the .apk with 7zip and move the files over to the open archive. Never change .zip and unzip. As stated before you might want to try this through recovery. On the other hand I am doing pushing the framework a couple times an hour to test my theme on CM with no issue. Now if you are putting too many files in there, that will cause issues.

    Edit: For third party apps to get updates they will need to be resigned and don't have to be moved to /system/app to be themed.
  4. budmonster
    Online

    budmonster Guest

    Not to sure how to write up the mm file. I've done real simple mm stuff.
  5. mgx
    Offline

    mgx New Member

    Joined:
    Feb 21, 2010
    Messages:
    27
    Likes Received:
    0
    Trophy Points:
    0
    mm file is all folder hierarchy WAAAYYYY simple, if you need help pm me but try to download a mm theme and compare the theme to the apps internals (file placement etc) first

    alternatively you can also do what the other person above suggested
  6. brusslesprouts
    Offline

    brusslesprouts New Member

    Joined:
    Mar 12, 2010
    Messages:
    82
    Likes Received:
    0
    Trophy Points:
    0
    Location:
    NOR*CAL
    were do i get the framework.res from i dont see it on my phone?
  7. cupfulloflol
    Offline

    cupfulloflol New Member

    Joined:
    Dec 5, 2009
    Messages:
    1,898
    Likes Received:
    22
    Trophy Points:
    0
    /system/framework/framework-res.apk
  8. kevdog
    Offline

    kevdog New Member

    Joined:
    Nov 14, 2009
    Messages:
    722
    Likes Received:
    0
    Trophy Points:
    0
    apks can be re-edited a few different ways. The easiest example is by replacing the individual files within the apk by dragging and dropping the files in a program such as 7zip or winrar. In this manner the signature of the apk isnt broken. If you must unpack the apk file then when you pack it back up you must resign the app to have in install successfully. Do a google search for Stericson's apk sign application (its over on xda forums). I usually prefer the first way, but have also done the second method and it works as well.
  9. cplus
    Offline

    cplus New Member

    Joined:
    Dec 24, 2009
    Messages:
    234
    Likes Received:
    0
    Trophy Points:
    0
  10. budmonster
    Online

    budmonster Guest

    thanks for the input fellas
  11. icculusX
    Offline

    icculusX Premium Member Theme Developer Premium Member

    Joined:
    Feb 10, 2010
    Messages:
    2,539
    Likes Received:
    0
    Trophy Points:
    0
    Location:
    The Moon
    I am having issues with pulling, editing, re-signing, and pushing some market apps on my phone. Anyone have little tips for this? (others work flawlessly, even some paid ones, just 30% of them don't work after some PNG editing and resigning)
  12. kevdog
    Offline

    kevdog New Member

    Joined:
    Nov 14, 2009
    Messages:
    722
    Likes Received:
    0
    Trophy Points:
    0
    Need some more details on the process you are using. Please be specific. What apps, what png files? png7? How did you add the new images back to the apk? Is a signing error a possible culprit here?
Search tags for this page
android games hack rewrite the apk
,
apk editing.apk
,
csv editor .apk
,
file extension smali
,

how to open smali files

,
how to rewrite apk file
,
how to rewrite apk files
,

how to theme apk files

,
how to write an apk file
,
rewrite apk file