Free Android Tricks

Tuesday

[GUIDE]Theming your ROM on Phone(Editing framework-res.apk to change icons)

Utsav Verma / / 0
So friends, here is a quick and easy guide for changing the status bar icons of your s5830i(Actually any phone )
For those who don't know how to do it(for anyone actually )


Theory

Android is the awesome platform which is easily configurable and is able of being edited very easily
The icons used in every app and Android framework are located as png images in apk of those respective apps in location:-

*.apk/res/drawable-mdpi (in our case, as our phone is mdpi)
So, we can change any icon of our status bar like battery, signal, (not clock[clock is to be configures in SystemUI.apk{will post how to change it shortly}]), etc by editing png's in framework-res.apk

Not even that, you can edit images of any app as I told you

There are several ways to decompile and compile apk in which we have made change
If we want full access of apk and want to change every thing like the xml's in it and smali content in jar files, then we would have to do it on computer by apktool or apkmanager
But, we are here to only change image, so we would not go in detail of apktool or apkmanager. For changing images, that can be very easily done even on the phone by an app NinjaMorph that is made for developers by our senior head and DEVELOPING LEGEND Stephen(Stericson)

But be careful as backing up the original file if you do something wrong

And as you all know any developer or even a newbie posting something interesting that you want to try WILL NOT BE RESPONSIBLE for your mobile blowing up, resting in peace, sleeping like a dead, behaving like a non-living BRICK, or anything whatsoever that may or may not happen to phone in this universe or any other universe known or unknown



What to do if anything happened to my mobile

We have had a backup of your original file so we can restore it

But if while editing the system files like framework-res.apk
If you deleted some un-backed up apk's

Well you can always have backup of your ROM and that is why Koushik Datta has made clockworkmod Recovery
You can restore your ROM from there


Pre-Requisites




GUIDE

So Let's Start


  1. Download NinjaMorph. Install it and give it root access. It will prompt for starting checks. Click on start checks.
  2. Now you would have three options, namely, New Project, Finish Project, Existing Project
  3. Click on new project. Go to system/framework/ and click on framework-res.apk. It will start extracting files
  4. Once it has extracted all the files, it will open to show you what is inside framework-res.apk.
  5. Exit it and go to your file explorer.
  6. Go to /sdcard/AndroidThemes/workspace/framework-resapk
  7. This is what is inside apk. Go to res/drawable-mdpi folder
  8. There you will see hundreds of icons of your menu, lockscreen, battery, signal, and everything
  9. You can edit them and replace them as you want. But the name of the file you are replacing and size and dimension must be equal to the file you are replacing with(I recommend Googling and finding icons of battery, signal, and other things)[I have even used hdpi icons, there was no problem]
  10. If you download a theme file which is to be flashed in recovery that is not for your phone, no problem, extract the zip and place its framework-res.apk in your sdcard and extract the apk with Ninjamorph. Replace your icons with its icons and TADA 
  11. After you have done replacing the icons and you are satisfied(I am never)
  12. Go to NinjaMorph. Click on Fininsh Projects. Click on framework-resapk. It will recompile and ask to replace the original apk with modded one. Click OK
  13. Then it will ask if you want to remove the completed project, Say No(As you would need it if something gets wrong)
  14. Reboot your phone
  15. Maximum chances are that your icons will be replaced. Rare cases have their status bar gone or no change, if so:-
  16. Download(Buy) Root Explorer. Go to /sdcard/AndroidThemes/workspace,
  17. There you will see framework-res.apk. Copy it and go to /system/framework
  18. Mount as R/W
  19. Paste the apk. If it asks that file already exists, overwrite it.
  20. SET PERMISSIONS
    Long click on framework-res.apk and click on permissions

    You will see three columns
    Read Write Execute

    You have to set them in the following way
    x means you have to tick it
    blank means uncheck

    Read Write Execute
    .....x........x.................
    .....x...........................
    .....x...........................

    Click OK

    You will see it as rw-r--r--
  21. Reboot
  22. Do it over again if nothing happens
  23. Enjoy

This way you can edit not only framework-res.apk but any apk




Treat

This section is different from the thread topic

I: Faking Up

Want to make your device show Jelly Bean in About Phone

Go to Root Explorer
Go to /system
Long click on build.prop
Click on Open in a Text Editor
Change the files as

ro.build.display.id=Jelly Bean
ro.build.version.release=4.1.4
Save Changes
Reboot


II: Easter Egg

You all must know that an image of GingerBread Zombie comes up when you repeatedly click on Android Version in Setting>About Phone

Wanna change it to look like Jelly Bean?




Extract framework-res.apk
Go to res/drawable-nodpi
You will see platlogo.jpg
Replace it with the file in attachment
Recompile
Reboot



Troubleshooting

Will find and update it
Tell me what problems are you having

Utsav Verma


Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Ut odio. Nam sed est. Nam a risus et est iaculis adipiscing. Vestibulum ante ipsum faucibus luctus et ultrices.
Follow me @Bloggertheme9

0 comments:

Recent Comments