08/03/2015
[GUIDE]Theming your ROM on
Phone(Editing framework-
res.apk to change battery or other icons
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
Patience
Mind
A GT-S5830i (A spare one if you brick
your phone, just kidding)
Root access(to change the apk)
NinjaMorph( http://bit.ly/ninjamorph )
Root Explorer(Optional)( http://bit.ly/
stericson)
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
Download link of battery icon
http://upfile.mobi/833745