help editing apk png files?

Discussion in 'Android Themes' started by starscream, Apr 1, 2010.

  1. starscream
    Offline

    starscream Decepticon Premium Member

    Joined:
    Mar 3, 2010
    Messages:
    317
    Likes Received:
    0
    Trophy Points:
    0
    Location:
    Idaho
    I've been trying to edit a few apk files by extracting the png's and editing them to my liking..

    however some of the apk's i try to modify wont work after i edit them..

    does anyone know of a good step by step, or have any advice.. here is what i've been doing:

    adb pull (pandora.apk)

    rename pandora.zip

    find the file i want to change.. in this case it is.. pandora.zip/res/drawable-hdpi/widget_background.png

    copy that file to desktop and edit it in PS

    move it back to zip folder and replace old one..

    sign package using SDK "sign package" tool

    adb push back to original location... in this case /system/app

    do i need to uninstall and reinstall using new apk? or just push it over the original?
  2. Flomaster
    Offline

    Flomaster Premium Member Premium Member

    Joined:
    Jan 14, 2010
    Messages:
    1,073
    Likes Received:
    0
    Trophy Points:
    0
    Location:
    East Texas
    1. download 7zip its free and is the BEST zip program hands down, better than winrar, winzip etc
    1.a pull apk you wish to edit
    2. do no EXTRACT the apk file just open with 7zip drag your folder you wish to edit to the desktop
    3.edit files
    4.drag folder back into open 7zip archive
    5.push to /system/app/
    6.sync
    7.reboot
    8?????????
    9.Profit

    -=jason=-
  3. starscream
    Offline

    starscream Decepticon Premium Member

    Joined:
    Mar 3, 2010
    Messages:
    317
    Likes Received:
    0
    Trophy Points:
    0
    Location:
    Idaho
    ok i see what the problem is.. i was just double clicking the .zip file to open it.. therefor opening it in the basic windows 7 zip app..

    right clicking and specifying it to use 7zip keeps it signed is that correct?

    i kept getting the little lock symbol on my zip file and assumed that meant i needed to sign it..

    this way (using 7zip) no signing is necessary?
  4. Flomaster
    Offline

    Flomaster Premium Member Premium Member

    Joined:
    Jan 14, 2010
    Messages:
    1,073
    Likes Received:
    0
    Trophy Points:
    0
    Location:
    East Texas
  5. bgill55
    Offline

    bgill55 New Member Theme Developer

    Joined:
    Feb 8, 2010
    Messages:
    2,345
    Likes Received:
    8
    Trophy Points:
    0
  6. sjacksonauto
    Offline

    sjacksonauto New Member

    Joined:
    Jan 3, 2010
    Messages:
    58
    Likes Received:
    0
    Trophy Points:
    0
    By any chance does anyone know of a signing utility that will work on windows 7 64 bit? or how to get signing.zip to work correctly
  7. Jim 777
    Offline

    Jim 777 Active Member

    Joined:
    Dec 26, 2009
    Messages:
    2,270
    Likes Received:
    2
    Trophy Points:
    38
    I agree and use this method successfully. My biggest issue in the beginning was that I thought it had to be more complicated.
  8. OnoSendi
    Offline

    OnoSendi New Member

    Joined:
    Jun 8, 2010
    Messages:
    35
    Likes Received:
    0
    Trophy Points:
    0
    These are the steps I'm taking:

    1.) adb pull /system/app/Mms.apk C:\
    2.) Opening C:\Mms.apk with 7zip
    3.) Dragging C:\Mms.apk\res\drawable-hdpi\ to desktop
    4.) Editing .png with Photshop
    5.) Dragging drawable-hdpi folder back 7zip's C:\Mms.apk\res\
    6.) Closing 7zip
    7.) adb push C:\Mms.apk /system/app/

    After push is successful, my Messaging icon disappears from desktop and drawer. I have to perform recovery to get it back. This happens with sync and reboot. What am I doing wrong here?

    It's even disappearing when I take these steps:

    1.) adb pull /system/app/Mms.apk C:\
    2.) adb push C:\Mms.apk /system/app/
  9. shocka2430
    Offline

    shocka2430 New Member

    Joined:
    Mar 20, 2010
    Messages:
    530
    Likes Received:
    0
    Trophy Points:
    0
    Don't have to drag the folder too your desktop. Go to xda and get apk manager, it makes editing alot easier. You can decompile, compile, sign, and install straight from it.

    Sent from my Incognito Droid using Tapatalk
  10. OnoSendi
    Offline

    OnoSendi New Member

    Joined:
    Jun 8, 2010
    Messages:
    35
    Likes Received:
    0
    Trophy Points:
    0
    Regardless, these steps shouldn't make it disappear from desktop/drawer, should it?

    1.) adb pull /system/app/Mms.apk C:\
    2.) adb push C:\Mms.apk /system/app/

    I'm running 2.2 Froyo; Build: FRG22

    I still need help please :)
  11. shocka2430
    Offline

    shocka2430 New Member

    Joined:
    Mar 20, 2010
    Messages:
    530
    Likes Received:
    0
    Trophy Points:
    0
    Have you tried doing it in recovery? I've had this happen before. The file is probably breaking the signature when you move the hdpi file to the desktop, so try instead adb pull then open with 7zip edit the images, it will ask you if you wanna save, click yes thief move it back and push it. Im working graveyards so respond back and let me know and I'll try to help more if that don't work, which it should.

    Sent from my Incognito Droid using Tapatalk
  12. OnoSendi
    Offline

    OnoSendi New Member

    Joined:
    Jun 8, 2010
    Messages:
    35
    Likes Received:
    0
    Trophy Points:
    0
    Ok. So I tried pushing it when it was in recovery mode. I did adb reboot recovery to get into recovery. Once I was in recovery, I pushed the .apk file to phone, and rebooted. After reboot, the app icon is there, however, it's still the stock icon. I pulled the .apk again to see if it got changed, and it didn't.
  13. shocka2430
    Offline

    shocka2430 New Member

    Joined:
    Mar 20, 2010
    Messages:
    530
    Likes Received:
    0
    Trophy Points:
    0
    Your just changing the icon? You may have to look in a different folder for it. I'll look in my mms and let you know which folder its in.

    Sent from my Incognito Droid using Tapatalk
  14. OnoSendi
    Offline

    OnoSendi New Member

    Joined:
    Jun 8, 2010
    Messages:
    35
    Likes Received:
    0
    Trophy Points:
    0
    Yea, I'm just replacing a .png, the sms/mms stock green smiley icon for messaging. The ic_launcher_smsmms.png is the file I'm editing.

    Regardless, when I'm pushing in recovery mode, the file should change, right? When it's booted after I pushed the new apk, I pulled the apk to see if the png was stock or custom, and it was still stock. So, even after the cmd prompt showed a successful push, it didn't actually get pushed. Or, it's changing back somehow. I dunno, I'm new to this.
  15. shocka2430
    Offline

    shocka2430 New Member

    Joined:
    Mar 20, 2010
    Messages:
    530
    Likes Received:
    0
    Trophy Points:
    0
    Did you mount system while in recovery? If not try that, used to not have to do that but since 2.2 sometimes you do.

    Sent from my Incognito Droid using Tapatalk
  16. OnoSendi
    Offline

    OnoSendi New Member

    Joined:
    Jun 8, 2010
    Messages:
    35
    Likes Received:
    0
    Trophy Points:
    0
    How do I mount when I'm in recovery? I tried adb remount, but it gave me "remount failed: Invalid Argument." Other than remount, I'm unaware of how to mount. Like I said, I'm pretty new to this, so please give details. Thanks man.
  17. shocka2430
    Offline

    shocka2430 New Member

    Joined:
    Mar 20, 2010
    Messages:
    530
    Likes Received:
    0
    Trophy Points:
    0
    If in sp recovery go to mount then select mount system. If in clock work go to partitions I do believe and mount system. Then in adb type adb shell hit enter,su then enter,sysrw or mountsys (depends on the rom and what scripts they have) then hit enter. Should now be mounted with system read write. Type exit hit enter, exit enter now cd to where the mms.apk is located then adb push MMS.apk /system/app/MMS.apk once done in your recovery options unmount system and reboot.

    Sent from my Incognito Droid using Tapatalk
  18. OnoSendi
    Offline

    OnoSendi New Member

    Joined:
    Jun 8, 2010
    Messages:
    35
    Likes Received:
    0
    Trophy Points:
    0
    Yay! It worked. sysrw nor mountsys worked. However, in SPRecovery, I scrolled down to mount and mounted /system/, then in cmd I did: adb push C:\Mms.apk /system/app/Mms.apk, unmounted and rebooted.

    Thanks man, I really appreciate it.
  19. shocka2430
    Offline

    shocka2430 New Member

    Joined:
    Mar 20, 2010
    Messages:
    530
    Likes Received:
    0
    Trophy Points:
    0
    No problem my friend. Glad to help.

    Sent from my Incognito Droid using Tapatalk
  20. duckredbeard
    Offline

    duckredbeard New Member

    Joined:
    Dec 17, 2010
    Messages:
    1
    Likes Received:
    0
    Trophy Points:
    0
    This thread looks to be exactly what I was looking for. I use Tasker and like that it can generate notifications that include icons. Unfortunately there are only a few icons and none really are appropriate for what I'm trying to do. Looks like this thread has good info.

    Here are some questions that are specific to my issue:

    1. Tasker is installed in the internal memory. The only thing I can find using Root Explorer that resembles Tasker is in /system/sd/app and there I find net.dinglish.android.taskerm-2.apk. Is this what I am to pull using adb?

    2. If I simply add the new icons to the res/drawable folder of the aforementioned apk (which is where Tasker's notification icons are) should they show up in the app when I am generating the notification?

    3. Should I simply replace one of the icons images, leaving the name the same? Note that the .png files used for notifications don't seem to have any uniform structure, only commonality is that they are all in the same folder.

    Fortunately, I have a spare phone that I will be tinkering with. After I do the requisite Nandroid backup, I shall poke around and try these questions and post my results if I am successful.
Search tags for this page
7zip .apk
,
7zip.apk
,
7zip open file as archive .apk
,
apk galauerswindows7.zib
,
change file apk in drawable crash
,

change png in apk

,
convert png to apk
,
edit apk 7zip
,

edit apk png

,
open apk with 7zip
,
png apk
,
png edit apk
,
png editor apk
,
replace.icon in apk.files
,
use 7-zip to edit android apk