Welcome to the Android Central Forums Create Your Account or Ask a Question Answers in 5 minutes - no registration required!
Results 1 to 2 of 2
  1. Thread Author  Thread Author    #1  

    Default How do I go about modifying an apk

    Hi

    This is not a dev question per se but I hope this is a good place to ask.

    I have a couple of apps downloaded from the google play store that I want to make some pretty simple tweaks to. I want to change some text colors to improve contrast. Make it white on dark gray instead of half gray on dark gray. Increase some font size. I have pretty poor eyesight and this helps.

    I do have root so I can get to the apk. Running cm 11 on a nook hd plus. My questions are. Do I need something special to unpack the files . Are they encrypted. Once opened, what is a good target to find where I need to make change. Are these in resource files somewhere. Will it be easy to recognize, like say a property with name like SubHeadForeColor of is it going to be hopelessly obfuscated.

    Thanks
  2. #2  

    Default Re: How do I go about modifying an apk

    If your doing this for yourself then I really don't see a problem. But I wouldn't redistribute a modified apk by any developer. Sure Android is open sourced but that is a whole different story entirely.

    You will need to find one of the APK decompiling tools available or learn to do it manually using APKTOOL which is available from Google. https://code.google.com/p/android-apktool/

    As for finding what you need to change it all depends.

    If its recoloring images or (pngs) then you don't need to really decompiling and recompile the apk. You can just pull the images you need out, modify them and drop them back into the apk. Only problem is if you run into pngs that have been done with Draw 9 patch which is basically the file is formatted and edited in a way which sets parameters to stretch an image depending on its needs (landscape or portrait) modes. Draw 9-patch | Android Developers

    If you are looking to do text color changes as you mentioned then use you will have to decompile the apk and go into the resources of the apk. Its been a while since I did it myself so I can't remember exact locations but doing some Google searching on the subject will be easy to find a ton of information. Once you change stuff at this level the apk does have to be recompiled. Some resign the apks and others skip it. I've seen it work both ways.

    Good luck!
    Paul
    Moderator Team Leader @ Android Central

    I am the Tegra Champ. What this means is that from time to time NVIDIA might send me new products to try out. This will not affect my thoughts, ideas, or opinions about any product that are discussed in the forums. Those are still my own.

Similar Threads

  1. question about androids
    By brick58 in forum General News & Discussion
    Replies: 9
    Last Post: 09-02-2014, 02:58 PM
  2. Replies: 3
    Last Post: 08-30-2014, 09:16 PM
  3. Photos Disappearing/Deleting - How to Stop That?
    By kristimallen in forum Samsung Galaxy S5
    Replies: 4
    Last Post: 08-30-2014, 02:00 PM
  4. Replies: 2
    Last Post: 08-30-2014, 12:19 PM
  5. How to crop an image in Instagram (v6.4-6.5)
    By zerkms in forum Android Apps
    Replies: 0
    Last Post: 08-30-2014, 06:36 AM

Posting Permissions