Finished editing new APK help

Discussion in 'Liberty ROM D2' started by TheSwaggeR, Feb 27, 2011.

  1. TheSwaggeR

    TheSwaggeR Member

    Joined:
    Jan 11, 2011
    Messages:
    745
    Likes Received:
    0
    Trophy Points:
    16
    Ratings:
    +0
    Trying to speed this project up with some help and responses.

    I've tested different programs to do this work but found out since I'm only editing PNG image files and no .9.png image files for the time being then I don't need to use xUltimate right now.

    Here's what I've done with no success trying it out on Music.apk as practice:

    1. Plug USB in Droid 2 and to PC
    2. Make sure Debugging is on
    3. Open Removable Disk Drive I: (my Droid 2) and go to /system/app (this is where Music.apk is)
    4. Copy Music.apk and put it in my c:\android-sdk-windows\platform-tools\newAPKwork
    5. Open Music.apk (in my newAPKwork folder) with 7-zip by right-clicking Music.apk and select Open Archive
    6. Click on the res folder (on 7-zip)
    7. Click on drawable-hdpi folder
    8. Drag a .png image file onto GIMP program
    9. Edit the colors on them
    10. Save edited .png image file to drawable-hdpi folder (c:\android-sdk-windows\platform-tools\finishedpngs\drawable-hdpi)
    11. Repeated editing to the rest of the .png image files in drawable-hdpi folder and save to same folder (drawable-hdpi folder)
    12. Click on drawable-hdpi-finger folder
    13. Repeat step 8
    14. Repeat step 9
    15. Save edited .png images file to drawable-hdpi-finger folder (c:\android-sdk-windows\platform-tools\finishedpngs\drawable-hdpi-finger)
    16. Repeated editing to the rest of the .png images files in drawable-hdpi-finger folder and save to same folder (drawable-hdpi-finger folder)
    17. Go back to drawable-hdpi folder on 7-zip
    18. Open up the folder containing the newly edited .png image files on c:\android-sdk-windows\platform-tools\finishedpngs\drawable-hdpi
    19. Select all the newly edited .png image files and drag them into the drawable-hdpi folder on 7-zip
    20. Click OK to copy over original .png image files (this will replace the original .png image files with my newly edited .png image files)
    21. Repeat step 17 but go to drawable-hdpi-finger folder on 7-zip
    22. Open up the folder containing the newly edited .png image files on c:\android-sdk-windows\platform-tools\finishedpngs\drawable-hdpi-finger
    23. Select all the newly edited .png image files and drag them into the drawable-hdpi-finger folder on 7-zip
    24. Repeat step 20
    25. Exit out of 7-zip
    26. Open up the folder with the copy of Music.apk (c:\android-sdk-windows\platform-tools\newAPKwork)
    27. Right-click Music.apk and click on Open Archive through 7-zip option
    28. Go back through drawable-hdpi and drawable-hdpi-finger and see if the newly edited .png image files have change (success on this)
    29. Open up Command Prompt
    30. type adb push newAPKwork /system/app Music.apk
    31. Hit enter (got a bunch of script just flash before my eyes)
    32. I assume the newly edited Music.apk replaced the original Music.apk in /system/app folder on my Droid 2
    33. Unplug USB
    34. Reboot phone
    35. Open up Music to see if changes were made
    36. Project was a failure because no changes were made. None of my colors replaced the original colors

    I'm really stumped and spent nearly my whole weekend trying to practice changing colors on a single APK file with no success.

    Much help would be entirelly appreciated since I can't seem to have success with other methods as well.
     
  2. Droid DOES!!

    Droid DOES!! What iDoesn't
    Theme Developer Premium Member

    Joined:
    Jun 12, 2010
    Messages:
    6,375
    Likes Received:
    35
    Trophy Points:
    178
    Ratings:
    +35
    Hit up es0tericcha0s, he's just finishing music.apk I believe

    DroidForums Junkie!!
     
  3. TheSwaggeR

    TheSwaggeR Member

    Joined:
    Jan 11, 2011
    Messages:
    745
    Likes Received:
    0
    Trophy Points:
    16
    Ratings:
    +0
    Just sent him a message. Really anxious and almost impatient to figuring out what is causing my work to not go through and change!
     
  4. trook

    trook Member

    Joined:
    Sep 4, 2010
    Messages:
    616
    Likes Received:
    0
    Trophy Points:
    16
    Location:
    Lake Elsinore Ca
    Ratings:
    +0
    Did you repackage an existing theme? That happened to me once when I was replacing icons in a fission theme, even though I selected my new theme in clockwork for some reason because I had the old one on my sd card too, it kept flashing the old one. I had to remove it for the new one to take effect. I would imagine its the same for an apk, or I'm totally trippin....

    Sent from my DROID2 using DroidForums App
     
  5. TheSwaggeR

    TheSwaggeR Member

    Joined:
    Jan 11, 2011
    Messages:
    745
    Likes Received:
    0
    Trophy Points:
    16
    Ratings:
    +0
    Nope. Think I just figured out my problem. Although, this is my honest opinion, there are WAY too many mixed reviews based on what you can and can't do.

    Here was my problem, adb push newAPKwork /system/app, while this command is in fact CORRECT, the result was failure do to my system NOT being mounted. Therefore it was in a read only mode. I knew this was the problem awhile back and thought I had corrected it but did not correct it.

    My previous misake:

    Going to Root Explorer, go to system/app, click on Mount button

    Problem with that is it only works when I'm not plugged in via USB. If I'm plugged in via USB then my SDcard is not viewable because the PC has control over it.

    My fix after reading 2 threads on droidforum.net lead me to conclude that the edited Music.apk is not being successful due to my system not being in Mount mode (read/write mode).

    So, I took a turn at one suggestion... reboot into recovery via Clockwork, go to mount and storage, click on mount system, go to my Command Prompt on my PC re-enter adb push newAPKwork /system/app, result? SUCCESS! Rebooted phone, checked out the Music and it has finally made the changes!

    Man am I glad!!!!!!!!! Almost the WHOLE weekend trying to figure this stuff out. My brain sure is beaten beyond oblivion now.
     
  6. TheSwaggeR

    TheSwaggeR Member

    Joined:
    Jan 11, 2011
    Messages:
    745
    Likes Received:
    0
    Trophy Points:
    16
    Ratings:
    +0
    I don't know. I didn't see a command line like that anywhere. I took the command line from AndroidSamurai on the Droidoholics site and there wasn't any mention of that line.

    I guess I'm suppose to enter it like this in Command Prompt:

    adb shell sysrw

    hit Enter?
     
  7. Droid DOES!!

    Droid DOES!! What iDoesn't
    Theme Developer Premium Member

    Joined:
    Jun 12, 2010
    Messages:
    6,375
    Likes Received:
    35
    Trophy Points:
    178
    Ratings:
    +35
    What I've done (if basic steps with Apk Manager don't work) is:
    -Open archive with 7zip
    -Copy what I want to change into a separate folder
    -Right click the image
    -Open with paint.net
    -Edit how I want
    -Save
    -Copy all images back to 7zip
    Most of the apks I've done have worked with just decompiling, editing, compiling, and signing though.

    DroidForums Junkie!!
     
  8. TheSwaggeR

    TheSwaggeR Member

    Joined:
    Jan 11, 2011
    Messages:
    745
    Likes Received:
    0
    Trophy Points:
    16
    Ratings:
    +0
    I've never used APK Manager. I did download it an hour ago, though. I've got several tools on this laptop now and no longer know which tools are even worthy to keep to use in what I'm doing and going to be doing.
     
  9. TheSwaggeR

    TheSwaggeR Member

    Joined:
    Jan 11, 2011
    Messages:
    745
    Likes Received:
    0
    Trophy Points:
    16
    Ratings:
    +0
    Wow, ok. Thank you for that info. Don't know why I didn't see that anywhere else. I will try that on my next APK push.
     
  10. Droid DOES!!

    Droid DOES!! What iDoesn't
    Theme Developer Premium Member

    Joined:
    Jun 12, 2010
    Messages:
    6,375
    Likes Received:
    35
    Trophy Points:
    178
    Ratings:
    +35
    Its a pretty good tool. Most of the time, its best to use to just edit xmls and .9 images but, I've used it to edit images in drawable too.
    I've never done an adb push so I'm not familiar with it.



    DroidForums Junkie!!
     
  11. es0tericcha0s

    es0tericcha0s Premium Member
    Theme Developer Premium Member

    Joined:
    Aug 6, 2010
    Messages:
    283
    Likes Received:
    0
    Trophy Points:
    16
    Location:
    Orlando, Fl.
    Ratings:
    +0
    Guess I was a little late to the party to help. Good job at figuring it out though! Might I suggest a couple of things to make your life easier? 1) Use Apk Manager. Awesome tool, especially helpful if you ever want to edit .9.pngs. Has a built in adb push/pull function that will automatically do adb remount for you. Apk Manager 4.9 - Makes Modifying Ur Apk A Breeze (Windows/Linux) - xda-developers 2) Update.zips. These are great things, and sometimes you NEED them. Pushing via adb stuff like framework-res.apk is a bad idea and you'll probably cause problems. Use 7zip to throw a system apk in there with the right folder structure, and you're good to go. Let me know if you have some more questions, I'll be around most of the day probably.
     
  12. TheSwaggeR

    TheSwaggeR Member

    Joined:
    Jan 11, 2011
    Messages:
    745
    Likes Received:
    0
    Trophy Points:
    16
    Ratings:
    +0
    Ok, I'll be following instructions for the APK Manager and try it out when I get some time in a bit.

    My question is, if I'm just editing APK files in /system/app then there is no need to Sign the APK and use APK Manager for that? These png image files are typically found in the res/drawable-hdpi folders. What if I were to take out an image in the drawable-hdpi folder and swap it out with a completely different image (not replacing colors, but replacing the entire image with a different image somewhere else) and then save it with the same original png image file name?

    Just trying to get a better understanding when it's imperative to use APK Manager or just using 7-zip, GIMP, then adb push it. And when it's imperative to sign an APK.

    From my understanding of what you said, it seems like if I were to work on any framework-res.apk files then it's imperative to not push with adb but use the APK Manager for that?
     
Search tags for this page

exe to apk

,

separate photo & background by finger apk