Help with getting in to apk files

Discussion in 'Android Hacks and Help' started by Jim 777, Mar 30, 2010.

  1. Jim 777

    Jim 777 Silver Member

    Joined:
    Dec 26, 2009
    Messages:
    2,278
    Likes Received:
    2
    Trophy Points:
    103
    Ratings:
    +2
    Help with getting in and editing apk files

    How the heck do I get in and modify files in an APK file?

    Here's where I'm at now. I DL'd 7zip and can open the apk files and navigate around. But once I've copied a functional apk to the sdcard and eventually to the laptop, open through 7zip, I want to look through the xml files and edit the those and maybe the png files. I can see them all, but it's the editing that I want to not only do, but get them back and functional on the phone. The png is no problem editing as I can get around PS without any issue, but my real questions are:

    1) Once I get to the xml files, what to edit it with? I downloaded an app and tried Dreamweaver but the files look encrypted in both.

    2) Once edited, how do you use 7zip to package it all up before pasting it back into the /system/app folder?

    I don't have (or want) the SDK package as I already went through the whole 1GB+ files just to have it not work properly, and I don't know ADB (only when it's typing exactly what's instructed).

    I believe that's all I'm looking for. Thanks.

    Jim
     
    Last edited: Mar 30, 2010
  2. Jim 777

    Jim 777 Silver Member

    Joined:
    Dec 26, 2009
    Messages:
    2,278
    Likes Received:
    2
    Trophy Points:
    103
    Ratings:
    +2
    BTW this is what I get when I open the xml file:
    (See attached)
     
  3. cupfulloflol

    cupfulloflol Senior Member

    Joined:
    Dec 5, 2009
    Messages:
    1,898
    Likes Received:
    22
    Trophy Points:
    68
    Ratings:
    +23
    To open xml files you need to use a hex editor. Quite a few free ones around the net. HxD - Freeware Hex Editor and Disk Editor | mh-nexus

    You don't have to decompress the file to begin with. If you open it, you can modify the files and they save in there. If you do have to decompress all the way, you just rezip them with 0 compression (store I think it is called).
     
  4. Flomaster

    Flomaster Premium Member Premium Member

    Joined:
    Jan 14, 2010
    Messages:
    1,073
    Likes Received:
    0
    Trophy Points:
    36
    Location:
    East Texas
    Ratings:
    +0
    once an XML file is writen to an APK it can't viewed like a normal file it is just going to look like a bunch of letter and numbers. unless you know what you are doing there isn't much you can do.

    but to change png files its easy

    just open the file with 7zip and drag the drawable-hdpi folder to your desktop and edit the files then just drag that folder back to the opened 7zip archive and your done. do you NOT need to extra the apk at all

    -=Jason=-
     
  5. Jim 777

    Jim 777 Silver Member

    Joined:
    Dec 26, 2009
    Messages:
    2,278
    Likes Received:
    2
    Trophy Points:
    103
    Ratings:
    +2
    Now that I'm opening it from the link given above your post (thanks) you're right. Text color may not be as easy as I thought it was going to be.

    I'm going to try the png suggestion now. Thanks.
     
  6. Jim 777

    Jim 777 Silver Member

    Joined:
    Dec 26, 2009
    Messages:
    2,278
    Likes Received:
    2
    Trophy Points:
    103
    Ratings:
    +2
    Oooh, can the icons for widgets be edited the same way???
     
  7. Flomaster

    Flomaster Premium Member Premium Member

    Joined:
    Jan 14, 2010
    Messages:
    1,073
    Likes Received:
    0
    Trophy Points:
    36
    Location:
    East Texas
    Ratings:
    +0
    YES they can so in your app drawer AND desktop you can have custom icons

    -=Jason=-
     
  8. thebowers

    thebowers Premium Member Theme Developer Premium Member

    Joined:
    Nov 24, 2009
    Messages:
    2,547
    Likes Received:
    1
    Trophy Points:
    101
    Location:
    Iowa
    Ratings:
    +1
    Xmls are in hex or binary format. If you would like to edit them you need to convert or extract it into raw format (when someone figures this out, let us know). You can edit with a hex editor if you know what a certain string means in it. For example a 08 00 00 1C string is for text. The four octets after it are for the actually color code FF FF FF FF would be white.

    As for the .png's on an app. Some can be tricky (.9.png), but you can edit about anything. Also you could use MM to make the changes instead of worry about resigning the app or make a copy of it. Then use 7zip to just open archive with one and exract the other. Do you edits on the one exracted then move then over to the correct place on the open archived one.

    Not trying to confuse anyone, just getting some info out.
     
  9. Jim 777

    Jim 777 Silver Member

    Joined:
    Dec 26, 2009
    Messages:
    2,278
    Likes Received:
    2
    Trophy Points:
    103
    Ratings:
    +2
    Thanks, I easily was able to get rid of the smoked background of the Pandora widget (the first one I tried) but doing the same thing with the audiomanager widget yielded only a widget that didn't show up in my list of widgets. The BU allowed me to keep the original for now.

    It would really be cool to find where the app for News and Weather widget is. I can't find it in either /system/app/ or /data/app/ folders.

    Thanks. Something else I'd have to learn :D
     
  10. cupfulloflol

    cupfulloflol Senior Member

    Joined:
    Dec 5, 2009
    Messages:
    1,898
    Likes Received:
    22
    Trophy Points:
    68
    Ratings:
    +23
    News and Weather is in /system/app/ /system/app/GenieWidget.apk to be more specific.

    If you edit an app or widget in /data/app/ you either have to resign it and reinstall it, or move it to /system/app/ (changing it's permissions if they get changed in the process). Since pandora was already themed (smoked), I assume it was already in /system/app/ .

    I can get more specific if you don't understand what I am talking about.
     
  11. Jim 777

    Jim 777 Silver Member

    Joined:
    Dec 26, 2009
    Messages:
    2,278
    Likes Received:
    2
    Trophy Points:
    103
    Ratings:
    +2
    Nope, so far so good. Maybe that's why my icon changes for a few widgets didn't take.... because they are in the /data/app/ folder. I'll try and move them.

    Cross your fingers!
     
  12. Jim 777

    Jim 777 Silver Member

    Joined:
    Dec 26, 2009
    Messages:
    2,278
    Likes Received:
    2
    Trophy Points:
    103
    Ratings:
    +2
    Thanks for the assistance. I was able to lose the backgrounds on the audio manager, genie widget, pandora, music app, and you tube.
    Someone else did the power control but now I want to see about getting the blue "bars" back under the controls that are active.
     
  13. Flomaster

    Flomaster Premium Member Premium Member

    Joined:
    Jan 14, 2010
    Messages:
    1,073
    Likes Received:
    0
    Trophy Points:
    36
    Location:
    East Texas
    Ratings:
    +0
    Bike guy looks killer mind uploading those apks in a zip format for others to partake in?

    -=jason=-
     
  14. Jim 777

    Jim 777 Silver Member

    Joined:
    Dec 26, 2009
    Messages:
    2,278
    Likes Received:
    2
    Trophy Points:
    103
    Ratings:
    +2
    Sure, here they are, the music, pandora, genie, audio mgr, and youtube

    http://www.tjfdesigns.com/droid/clearBG.zip

    (Note: I cleared the background on the genie widget during the press state as well, but the orange ring that I wanted to keep, took on a funky shape. I'm going to put my BG back for the "focus" state. Let me know if you want the change in the zip after trying it out)
     
  15. Jim 777

    Jim 777 Silver Member

    Joined:
    Dec 26, 2009
    Messages:
    2,278
    Likes Received:
    2
    Trophy Points:
    103
    Ratings:
    +2
    Well as I was typing half a book about what I'd done and failed to get a couple widgets to do what I wanted, I tried to verify something and hot damn, they worked. The toggle is a bit bigger than the others and I'll work on fixing that, but my tenacity will now let me go to bed, so it'll have to be a job for tomorrow.


    Here's my Gmail Unread Count widget to match my icon set and the ringer toggle widgets (all three states) to also match.
     
Search tags for this page
7zip to open apk
,

apk decompress

,
edit apk files in dreamweaver
,
heck editor apk
,
hex editor.apk napoveda
,
how ro unzip apk files 7unzip
,
how to edit apk file by hex editor
,
how to edit apk files with hex editor
,
how to open apk files using hex editor apk
,
how to open raw apks