[TUT] Custom frameworks for Gen 8 - Gen8, Gen9, Gen10 Themes and Apps

So, it seems that more people are taking an interest in making custom frameworks. This isn't really a full tutorial, but I thought it would be helpful to just post some tips on how to go about making your own framework-res.apk, save others a bit of time retreading old ground, since the methods are scattered around the site a bit!
Thanks to wdl1908 for prompting me to do this - should really have done this sooner!
Okay, so basic requirements:
Rooted Gen 8 (Uruk or chulri method)
Original Archos framework-res.apk
zip editor
image editing software
.png's to replace the stock ones with
That's about it! I've been using GIMP on Ubuntu for the image editing, and Phatch for batch resizing, but Photoshop will work just as well on Windows.
Edit: Thanks to wdl1908, have found that Gwenview gives much better results when resizing, compared to Phatch or GIMP. Works on both Ubuntu and KDE.
Use your preferred zip editor to unzip the contents of framework-res.apk to your chosen folder. The main folder of interest is "drawable-mdpi".
The Gen 8's use MDPI resolution images (well, A70 and A101 to at any rate. I think someone mentioned the A32 or A43 used HDPI images). Depending on your .png source, you may need to resize the images. I took my images from themes made for the Desire, which is an HDPI device, so I used GIMP/Phatch to resize them.
In terms of resizing, I compared the size of each new png with the original one, and resized. I know p0rkburn just resizes the images to 66%, but I've had problems with some images not coming out the right size that way. The other thing to watch out for is that not all the images need resizing. Also, some of the textfield and tab_select images are different proportions to their phone equivalents, so again watch out for that.
Once you've replaced the images you want to, they need to be put back into the .apk. I used to copy and paste into the framework-res.apk, but that doesn't work for 9patch files. Also, wdl1908's FrameWorkBuilder makes the compile process so ridiculously easy, there is no reason not to use that instead.
To put the new framework-res.apk on the device, I use this method via ADB wireless, which works fine.
Happy theming!
EDIT: 9patch files
These can be a PITA, until you understand how they work. I used the following two sources to finally crack it :
http://developer.android.com/guide/developing/tools/draw9patch.html
http://forum.xda-developers.com/showthread.php?t=580351
If you are changing 9patch files, you have to decompile and recompile using the FrameWorkBuilder.
I prefer using the draw9patch tool, as it lets you check that the 9patch works as expected.
Spent enough time bashing my head against a brick wall trying to sort out 9patch files, so if I can spare anyone else that, feel free to post/PM..

I'll leave this post here for my recommendations that will be more complex when you need to modify xml files.
In short the procedure is a follows (this needs to be expanded)
unpack the apk to framework-res-UNPACKED dir
decompile the apk to framework-res-DECOMPILED (with apktools)
copy framework-res-MOD to framework-res-DECOMPILED
compile framework-res-COMPILED (with apktools)
unpack the compiled apk to framework-res-COMPILED (with 7za)
remove all the files that are present in framework-res-MOD from the framework-res-UNPACKED dir
remove the file resources.arsc from framework-res-UNPACKED
copy all files from framework-res-UNPACKED to framework-res-COMPILED
zip all files in framework-res-COMPILED to the new framework-res.apk
remove the resources.arsc from that apk file
readd the resources.arsc file without compression to the new apk file
Done
The reason this is so complex is that their are bugs in apktools and the signature needs to be preserved.
FrameWorkBuilder v0.3
README.txt
-------------------------------------------------------------------------------------------------------
Place the script FrameWorkBuilder.sh in a directory and execute.
The script will download all the needed tools.
Place framework-res.apk in the dir framework-res-STOCK
Place mods in framework-res-MOD follow the usual directory structure.
Example:
framework-res-MOD
framework-res-MOD/res
framework-res-MOD/res/drawable-hdpi
framework-res-MOD/res/drawable-mdpi
framework-res-MOD/res/drawable
Execute FrameWorkBuilder.sh to apply the mod.
Modded framework-res.apk will be stored in the directory framework-res-MODDED.
-------------------------------------------------------------------------------------------------------
Changelog
-------------------------------------------------------------------------------------------------------
v0.3 Added xml png duplication check to avoid that animations don't work. .9.png support
v0.2 Added mod checks Added compile failure test
v0.1a BUGFIX cp dirs
v0.1 Initial version
-------------------------------------------------------------------------------------------------------
Have fun modding.

wdl1908 said:
I'll leave this post here for my recommendations that will be more complex when you need to modify xml files.
If you don't mind we'll make it a joined tutorial. I have no time now it's time I got some sleep.
Click to expand...
Click to collapse
I have no idea about editing XML files, but that was the next thing on my "To learn" list. I would be very happy for you to add your knowledge to this thread.
Also, if anyone has info to add/corrections to make, please feel free.

Good stuff, guys. At the very least we can make this a three man party.

The more the merrier!
Guys, can I ask what device you're both using?

fisha21 said:
Guys, can I ask what device you're both using?
Click to expand...
Click to collapse
A101IT with archangel root
A70IT with chulri's root

fisha21 said:
The more the merrier!
Click to expand...
Click to collapse
well, if i can do something, i'm here ;-)

wdl1908 said:
A101IT with archangel root
A70IT with chulri's root
Click to expand...
Click to collapse
Cool, thanks. Also, can I ask how you're viewing the XML files? Every program I've tried won't open them - keep getting error messages about invalid character content.
woti23 said:
well, if i can do something, i'm here ;-)
Click to expand...
Click to collapse
Welcome...

fisha21 said:
Cool, thanks. Also, can I ask how you're viewing the XML files? Every program I've tried won't open them - keep getting error messages about invalid character content.
Click to expand...
Click to collapse
You have to decompile the framework-res.apk with the apktools then all is revealed.

I have an A43it, and I find it to use a mixture of the hdpi and mdpi drawables, it is quite odd how they have it. I am drawing this conclusion because I only changed the hdpi drawables, and some things (status bar pull down for one) stayed original. I am going to work some more on it later today and will update here. My method for pushing to the device uses adb like such:
Code:
adb push framework-res.apk /sdcard/framework-res.apk
adb shell
su
stop
cp /sdcard/framework-res.apk /system/framework/framework-res.apk
chmod 644 /system/framework/framework-res.apk (only needs to be done the first time, as the permissions will adopt those when replacing in the future)
start
This causes the device to do a little soft-reboot (does not perform a proper full shutdown/reboot) that is pretty quick, and avoids any f/c situations you may encounter replacing the file while the system is live.
Edit 2 - ok, I just plain old missed the drawables earlier, they are all in hdpi for the A43. Posting screenshots of what I have put together shortly.

daveid said:
My method for pushing to the device uses adb like such:
Code:
adb push framework-res.apk /sdcard/framework-res.apk
adb shell
su
stop
cp /sdcard/framework-res.apk /system/framework/framework-res.apk
chmod 644 /system/framework/framework-res.apk (only needs to be done the first time, as the permissions will adopt those when replacing in the future)
start
This causes the device to do a little soft-reboot (does not perform a proper full shutdown/reboot) that is pretty quick, and avoids any f/c situations you may encounter replacing the file while the system is live.
Click to expand...
Click to collapse
Great I was looking for that.

wdl1908 said:
[*]compile framework-res-COMPILED (with apktools)
Click to expand...
Click to collapse
Getting stuck on the above step. Have got a folder called framework-res-DECOMPILED. When I try to compile it, the first message I get is:
Code:
w:Could not find sources.
It then runs through the process throwing up multiple error messages, and at the end I am left with an empty Build folder. Any ideas? I read on the Apktool thread that you need to add a classes.dex file to apk that don't already have one?
Thought I'd try your method as my primitive version keeps resulting in faulty apk's the last day or two!

fisha21 said:
Getting stuck on the above step. Have got a folder called framework-res-DECOMPILED. When I try to compile it, the first message I get is:
Code:
w:Could not find sources.
Click to expand...
Click to collapse
No problem there thats only a warning.
fisha21 said:
It then runs through the process throwing up multiple error messages, and at the end I am left with an empty Build folder.
Click to expand...
Click to collapse
What error messages?
fisha21 said:
Any ideas? I read on the Apktool thread that you need to add a classes.dex file to apk that don't already have one?
Click to expand...
Click to collapse
What version of apktools do you have?
never needed any classes.dex in framework-res.apk
fisha21 said:
Thought I'd try your method as my primitive version keeps resulting in faulty apk's the last day or two!
Click to expand...
Click to collapse
I'll try to cleanup my script and post it soon.

I just found out we can have custom boot animations on our gen 8 devices.
search for some bootanimation.zip on the web or go to UOT Kitchen and download one from the kitchen. place it in the directory /data/customization/ and reboot. This works even for the stock firmwares with archangel root.
Enjoy

I've added the first version of my FramWorkBuilder script in the second post.

wdl1908 said:
I've added the first version of my FramWorkBuilder script in the second post.
Click to expand...
Click to collapse
Thanks for the hard work!
Gave it a run through but get the following error messages:
Code:
Applying MOD...cp: cannot stat `/home/sarju/FWB/framework-res-MOD/*': No such file or directory
and
Code:
Copy files from UNPACKED to COMPILED that are not modified...cp: cannot stat `/home/sarju/FWB/WorkSpace/framework-res-UNPACKED/*': No such file or directory
The script is located in the "FWB" folder.

fisha21 said:
Code:
Copy files from UNPACKED to COMPILED that are not modified...cp: cannot stat `/home/sarju/FWB/WorkSpace/framework-res-UNPACKED/*': No such file or directory
The script is located in the "FWB" folder.
Click to expand...
Click to collapse
yeah download the 0.1a version and try again.

wdl1908 said:
yeah download the 0.1a version and try again.
Click to expand...
Click to collapse
Ok, think I'm just being stoopid here. Ran the v0.1a, no error messages BUT
If I use the folder structure "framework-res-MOD>drawable-mdpi", the resulting apk just has the original contents of drawable-mdpi. If I use "framework-res-MOD>res>drawable-mdpi", the resulting pak has an empty drawable-mdpi folder.

fisha21 said:
Ok, think I'm just being stoopid here. Ran the v0.1a, no error messages BUT
If I use the folder structure "framework-res-MOD>drawable-mdpi", the resulting apk just has the original contents of drawable-mdpi. If I use "framework-res-MOD>res>drawable-mdpi", the resulting pak has an empty drawable-mdpi folder.
Click to expand...
Click to collapse
the structure should look like this.
Code:
framework-res-MOD
framework-res-MOD/res
framework-res-MOD/res/drawable-hdpi
framework-res-MOD/res/drawable-ldpi
framework-res-MOD/res/drawable-mdpi
framework-res-MOD/res/drawable
but make sure you remove empty dirs.
I suspect it has to do with empty dirs I'll check that....

Nope tthats not it.
can you zip up the files files-to-remove.txt and log.txt in the WorkSpace dir and post them or via pm if thats possible.

Related

[REF] Choosing between GlassLock and Android's stock lock screen

Hi guys,
Since there seems to be some demand for this kind of thing, I decided to post instructions on a mod I made a while back. This gives you the option of choosing between Samsung's GlassLock (i.e. the default TW lockscreen) or the stock keyguard of Android 2.1.
The method involves de- and re-compiling /system/framework/android.policy.odex, and you should have some basic knowledge of the tools involved (i'm not gonna spell out every step). Before beginning, take a backup of android.policy.jar and android.policy.odex (or preferably the whole framework folder). You should issue the commands in recovery mode.
Required tools: rooted SGS (I've done this only with JM2, and the code *might* need modifying for other roms, though I doubt it), adb, smali/baksmali, dexopt-wrapper, text & hex editor, winrar (or any jar editor).
Here we go:
1. Use adb to pull out /system/framework/android.policy.odex and other framework .odexes (required for de-odexing). Might be wise to backup the whole /system/framework/ directory at this point.
2. Use baksmali to deodex the file (java -jar baksmali.jar -x android.policy.odex -o android.policy). Baksmali will let you know if you are missing any of the framework .odexes.
3. Open LockPatternKeyguardView.smali and find the method getLockScreenMode()Lcom/android/internal/policy/impl/LockPatternKeyguardView$LockScreenMode;
4. Replace the contents of this method with the attached file getLockScreenMode.txt.
5. Save LockPatternKeyguardView.smali.
6. Use smali to compile the files back to classes.dex (java -jar smali.jar android.policy -o classes.dex)
7. Pull /system/framework/android.policy.jar, add the newly created classes.dex to it, and push it back to the device.
8. On your phone, do:
# cd /system/framework
# dexopt-wrapper android.policy.jar patched.odex /system/framework/core.jar:/system/framework/ext.jar:/system/framework/framework.jar:/system/framework/android.policy.jar:/system/framework/services.jar
Ouput should be:
--- BEGIN 'android.policy.jar' (bootstrap=0) ---
--- would reduce privs here
--- waiting for verify+opt, pid=3105
--- END 'android.policy.jar' (success) ---
9. You now have odexed the file into patched.odex. However, the signature of the file is not compatible with the other framework files, so you need to fix it. I think the proper way should be to re-odex all the framework files, but I haven't encountered any issues with just patching the signature.
10. Open the original android.policy.odex in a hex editor, and copy signature bytes from offsets 0x34-0x47 to the new patched.odex, and save it. Optionally, you can also do this on your device by issuing the command:
# dd if=original.android.policy.odex of=patched.odex bs=1 count=20 skip=52 seek=52 conv=notrunc
Where if="..." is the original file, and of="..." is the file you want to patch.
11. Push the patched and hex-edited file to /system/framework/android.policy.odex and restore the original /system/framework/android.policy.jar.
12. Reboot and enjoy your good ol' keyguard
Some notes:
- If you want to revert back to Samsung's lock screen, just create a file called /data/local/enable_glass_lock ("adb touch /data/local/enable_glass_lock").
- By default, the menu button will also unlock the screen. To disable this behavior, you have to modify /res/values-hdpi-v4/bools.xml in /system/framework/framework-res.apk, and change the value of <bool name="config_disableMenuKeyInLockScreen">false</bool> to true. Can also be done by modifying code.
On a side note, the code for Smart Unlock (present in some Samsung phones) seems to be in there... it would be an interesting project to get that working
Great stuff, i've been waiting for someone to find out how to get rid of the glass screeen since first day.
Sadly i'm a real noob so it is useless for me.
Maybe someone can create an apk or a win program out of this.
thank you !
but could you explain it better ?
toca79 said:
Maybe someone can create an apk or a win program out of this.
Click to expand...
Click to collapse
+1 for an automated solution, provided method seems too hard for me.
Excellent post Ateisti! We need more of these advanced mods for SGS.
Ateisti said:
adb, smali/baksmali, dexopt-wrapper,
Click to expand...
Click to collapse
Could you provide links to this?
Or are those sw included in the Android SDK?
I want to do 6-step but I see:
Code:
C:\Users\Konrad>"C:\Program Files (x86)\Java\jre6\bin\java.exe" -jar "C
:\Users\Konrad\Desktop\smali.jar" android.policy -o classes.dex
android.policy\com\android\internal\policy\impl\LockPatternKeyguardView$LockScre
enMode.smali[0,-1] The file must contain a .class directive
What's wrong?
EDIT:
I've changed a wrong smali.
In step 10, how do i copy the signature bytes with my hex editor? I dont understand what offsets 0x34-0x57 is...
10. Open the original android.policy.odex and copy signature bytes from offsets 0x34-0x47 to the new patched.odex, and save it.
Click to expand...
Click to collapse
Can anyone who successfully coped with getting this done following the instructions above please do a video showing us how to do it, I think that might help us a lot... thanks a lot on behalf of us noobs
Stefanauss said:
Could you provide links to this?
Or are those sw included in the Android SDK?
Click to expand...
Click to collapse
ADB is included in the SDK, Smali and Baksmali can be downloaded here and dexopt-wrapper for example here.
qwas00 said:
In step 10, how do i copy the signature bytes with my hex editor? I dont understand what offsets 0x34-0x57 is...
Click to expand...
Click to collapse
It means to seek to the 52nd byte (or 0x34 in hex) of the file, and then copy and replace the following 20 bytes to the second file. But you can also do it on the device by issuing this command (I think busybox is required):
dd if=original.android.policy.odex of=patched.android.policy.odex bs=1 count=20 skip=52 seek=52 conv=notrunc
...where "if=..." is the original file and "of=..." is the file you want to patch.
Ateisti said:
Hi guys,
Since there seems to be some demand for this kind of thing, I decided to post instructions on a mod I made a while back. This gives you the option of choosing between Samsung's GlassLock (i.e. the default TW lockscreen) or the stock keyguard of Android 2.1.
The method involves de- and re-compiling /system/framework/android.policy.odex, and you should have some basic knowledge of the tools involved (i'm not gonna spell out every step). Before beginning, take a backup of android.policy.jar and android.policy.odex (or preferably the whole framework folder). You should issue the commands in recovery mode.
Required tools: rooted SGS (I've done this only with JM2, and the code *might* need modifying for other roms, though I doubt it), adb, smali/baksmali, dexopt-wrapper, text & hex editor, winrar (or any jar editor).
Here we go:
1. Use adb to pull out /system/framework/android.policy.odex and other framework .odexes (required for de-odexing). Might be wise to backup the whole /system/framework/ directory at this point.
2. Use baksmali to deodex the file (java -jar baksmali.jar -x android.policy.odex -o android.policy). Baksmali will let you know if you are missing any of the framework .odexes.
3. Open LockPatternKeyguardView.smali and find the method getLockScreenMode()Lcom/android/internal/policy/impl/LockPatternKeyguardView$LockScreenMode;
4. Replace the contents of this method with the attached file getLockScreenMode.txt.
5. Save LockPatternKeyguardView.smali.
6. Use smali to compile the files back to classes.dex (java -jar smali.jar android.policy -o classes.dex)
7. Pull /system/framework/android.policy.jar, add the newly created classes.dex to it, and push it back to the device.
8. On your phone, do:
# cd /system/framework
# dexopt-wrapper android.policy.jar patched.odex /system/framework/core.jar:/system/framework/ext.jar:/system/framework/framework.jar:/system/framework/android.policy.jar:/system/framework/services.jar
Ouput should be:
--- BEGIN 'android.policy.jar' (bootstrap=0) ---
--- would reduce privs here
--- waiting for verify+opt, pid=3105
--- END 'android.policy.jar' (success) ---
9. You now have odexed the file into patched.odex. However, the signature of the file is not compatible with the other framework files, so you need to fix it. I think the proper way should be to re-odex all the framework files, but I haven't encountered any issues with just patching the signature.
10. Open the original android.policy.odex and copy signature bytes from offsets 0x34-0x47 to the new patched.odex, and save it.
11. Push the patched and hex-edited file to /system/framework/android.policy.odex and restore the original /system/framework/android.policy.jar.
12. Reboot and enjoy your good ol' keyguard
Some notes:
- If you want to revert back to Samsung's lock screen, just create a file called /data/local/enable_glass_lock ("adb touch /data/local/enable_glass_lock").
- By default, the menu button will also unlock the screen. To disable this behavior, you have to modify /res/values-hdpi-v4/bools.xml in /system/framework/framework-res.apk, and change the value of <bool name="config_disableMenuKeyInLockScreen">false</bool> to true. Can also be done by modifying code.
On a side note, the code for Smart Unlock (present in some Samsung phones) seems to be in there... it would be an interesting project to get that working
Click to expand...
Click to collapse
THANX TO ALL YOUR EFFORTS........ can you please attach a screen shot of the lock what you are talking about.. and does it work flawlessly without any sort of a lag.. and is it 100% bugs free?????
Could you also choose any other lockscreen, like WidgetLocker or SimplyLockscreen?
That would be great
Ateisti said:
It means to seek to the 52nd byte (or 0x34 in hex) of the file, and then copy and replace the following 20 bytes to the second file. But you can also do it on the device by issuing this command (I think busybox is required):
dd if=original.android.policy.odex of=patched.android.policy.odex bs=1 count=20 skip=52 seek=52 conv=notrunc
...where "if=..." is the original file and "of=..." is the file you want to patch.
Click to expand...
Click to collapse
Thanks, that worked fine
Thanks! This method worked like a charm. I hated that glass unlock thingy.
However my /system/framework/framework-res.apk doesn't have a value folder, so I can't remove the possibility to unlock with the menu button.
Couldn't find any bools.xml in there at all.
This is replacing the music player controls when the screen is locked, right? It's a nice functionality and would be a pity to loose it.
Otherwise its a great mod and it would be cool if someone can make the One Click LockScreen Changer ;-)
Sent from my GT-I9000 using Tapatalk
thE_29 said:
Could you also choose any other lockscreen, like WidgetLocker or SimplyLockscreen?
That would be great
Click to expand...
Click to collapse
Not as such, but technically it should be possible with some additional coding. I however don't have the time to undertake such a task.
Tharfrin said:
Thanks! This method worked like a charm. I hated that glass unlock thingy.
However my /system/framework/framework-res.apk doesn't have a value folder, so I can't remove the possibility to unlock with the menu button.
Couldn't find any bools.xml in there at all.
Click to expand...
Click to collapse
This might be a ROM version thingy. On my system there are actually two XML files with that same setting, but only one of them works (the one I mentioned in my original post). Just search all your framework-res xml files for "config_disableMenuKeyInLockScreen", and change every instance to true. Should do the trick.
Or if all else fails, just edit the file LockScreen.smali, method "shouldEnableMenuKey()", and make it always return 0 ("return v4" -> "return v6").
mobilx said:
This is replacing the music player controls when the screen is locked, right? It's a nice functionality and would be a pity to loose it.
Otherwise its a great mod and it would be cool if someone can make the One Click LockScreen Changer ;-)
Click to expand...
Click to collapse
That is unfortunately the case. The music controls (as well as the puzzle pieces) are coded into the GlassLock class, so it would required some additional reverse engineering to implement those in the stock keyguard.
4 hours working and it works (jm2).
I'm going to test on the jpc.
EDIT:
I put it on the jpc and it doesn't work.
Did not work with JPC I really want to use the stock lockscreen!
Sent from my GT-I9000 using XDA App
hi guy thanks for your instruction. However I'm using samset's 1.9f which has the ROM deodexed and i found no .odex files but .jar files. Is there a way to workaround this? I'd really love to revert back to stock eclair lockscreen~!
billytcf said:
hi guy thanks for your instruction. However I'm using samset's 1.9f which has the ROM deodexed and i found no .odex files but .jar files. Is there a way to workaround this? I'd really love to revert back to stock eclair lockscreen~!
Click to expand...
Click to collapse
same here no odex files...

[Q] How to modify and replace framework-res.apk

Hello
I changed some png images with 7zip and copied back to system/framework/ but i got boot loop.
I would like to know how to modify and replace .apk that will work normal?
Thanks
How exactly did you replace the png's? Because the 'normal' proces of unzip-replace-rezip doesn't work.
The most easy way to changes png's:
1. Open framework-res.apk in 7-zip
2. Search for the files you want to change and copy them to your hard disk (do not unzip!!)
3. change the files. Make sure the name stays EXACT the same.
4. Open framework-res.apk and copy your new files in the desired place. By doing so, the original files will be replaced by your files. DO NOT USE ANY COMPRESSION (if asked select 'store').
5. Go into recovery, mount /system and replace the framework-res.apk by the new one. Reboot phone.
Take home message: never unzip
Hope it works now!
Erwin
i went to recovery and hit mount/system. But how can i replace it?
Thanks
urkotheone said:
i went to recovery and hit mount/system. But how can i replace it?
Thanks
Click to expand...
Click to collapse
You have to use adb to do is. I assume you know how to work with it. If not, you have to search for a little tutorial (can't link you right now because I'm using the xda app)
Put the new framework-res.apk in the same folder as adb.exe. Open the command prompt and brows to that same folder. Type in your command prompt:
Code:
adb shell mv system/framework/framework-res.apk system/framework/framework-res.old
adb push framework-res.apk system/framework
adb reboot
Due to the first command, you have a backup of your original framework-res.apk. To restore it, you have to boot in recovery, mount /system and again by the use of the command prompt, type:
Code:
adb shell rm system/framework/framework-res.apk
adb shell mv system/framework/framework-res.old system/framework/framework-res.apk
adb reboot
Erwin
Yeeeeey i did it
Thank you
One more problem
When discharging it's working, but when I charge phone i don't get no battery icon. I believe it's because in original framework i had 100 png animations for charging and now i have only 20. Is there a way to fix this?
urkotheone said:
One more problem
When discharging it's working, but when I charge phone i don't get no battery icon. I believe it's because in original framework i had 100 png animations for charging and now i have only 20. Is there a way to fix this?
Click to expand...
Click to collapse
Then it is going to be much more complicated than that. Perhaps I can explain you in more detail tomorrow, but you will have to look up some things for yourself.
First, you should decompile the framework-res.apk first using apktool. You will notice that it almost looks like it just dezips your apk, but when you look closely, you will see now that you can open and read the xml files.
Second, you have to open res\drawable\stat_sys_battery.xml (or something similar, perhaps it depends on your ROM). Try to understand what is written and make some changes (it is really not that hard) so that your system shows only 20 different images, in stead of 100.
Third, you have to recompile your modified framework-res.apk. Then pull stat_sys_battery.xml out of "your" framework-res.apk into the original framework-res.apk, but again, without unzipping one of them. Do, of course, the same thing with your images.
I must admit, I've been busy with the battery icons myself. It was my plan to do something similar like you did, but I didn't do it yet. So all the things I've written above where the things I was planing to do, but I don't know if it will work, as I never tried it myself. So please, keep me/us informed ;-)
Good luck!
EDIT: I used this site to know how to decompile apk's.
This is an old thread but I wanted to edit my systemUI.apk file with changing out a couple images... if I was to upload the file I edited (by just swapping out the images) to the UOT kitchen and use a mod, say the battery mod, would it make the file usable on my phone or would I get a bootloop or worse?
Basically what I did was opened up the SystemUI.apk file using 7zip and just swapped out the images I wanted (making sure I saved the original ones of course). I didn't unzip/zip anything.. I just opened it using 7zip and then closed it. It didn't ask me if I wanted to save anything though??
Sorry for the stupid question... but I thought it would be an idea as I want to use the UOT to make a mod to the theme I have anyways.
crazy_dragonlady said:
This is an old thread but I wanted to edit my systemUI.apk file with changing out a couple images... if I was to upload the file I edited (by just swapping out the images) to the UOT kitchen and use a mod, say the battery mod, would it make the file usable on my phone or would I get a bootloop or worse?
Basically what I did was opened up the SystemUI.apk file using 7zip and just swapped out the images I wanted (making sure I saved the original ones of course). I didn't unzip/zip anything.. I just opened it using 7zip and then closed it. It didn't ask me if I wanted to save anything though??
Sorry for the stupid question... but I thought it would be an idea as I want to use the UOT to make a mod to the theme I have anyways.
Click to expand...
Click to collapse
I don't know if I understand you fully, but I believe it would: only if the UOT changed the images that you have changed, you will not see the things you have changed.
What I did some time ago was upload my framework en systemui to the UOT, apply the battery mod and than change the battery images with my own. I did that just by opening the apk in WinRAR and adding my images, just like you did.
But if you only want to swapp some images, there is no need for uploading it to the UTO. Just continue as you did. Just make sure that you keep the original systemui.apk on your hdd. In case of a bootloop, you can easely revert.
Is that een answer to your question?
Erwin
Yes, it does.. and thanks. I ended up following the instructions on another thread I found on here... don't remember exactly which one but it basically omitted uploading the files to the UOT. It was a guide on how to theme your phone... sorry but I didn't save the link.
thanks again!
CDL.
urkotheone said:
Hello
I changed some png images with 7zip and copied back to system/framework/ but i got boot loop.
I would like to know how to modify and replace .apk that will work normal?
Thanks
Click to expand...
Click to collapse
Same thing happened to me!
I Wiped Cache, Dalvik Cache, but nothing happened!
I had to flash 2.3.6 Stock ROM via Odin, to make my phone work!
I always work with Winrar, and in there you have the option for compression, which is selected at "medium compression" by default, and that causes bootloops.
So make sure that you don't compress your apk when adding your new png, or it will not work.
Erwin
I change my framework-res.apk from another rom. the problem is when I push long power button, my device going to BOOTANIMATION with out I choose shutdown, restart n etc.. what's wrong with my device??
sorry for my bad eng..
The problem is its another roms framework so things are in different places and some things will be missing, put the framework-res.apk from your rom back and things should go back to normal, mind me asking what tweak or mod you are after using?
Sent from my HTC Wildfire using xda premium
first time I must say sorry, I know this not my device place on XDA, I use MB525.. but I see the same problem here..
I use Ms3ginger mod rom by walter, n I take framework-res.apk from 2.3.6_4.5.2-109 DHT25_themed MultiLanguage, I try to change battery sys-stat but I get bootloop..
once again sorry for my bad eng
If not possible try
Adb remount
First

[GUIDE] Change Nav Bar D.P.I. on Android Jelly Bean 4.1.1 (Galaxy Nexus)

Guide – Change Navbar D.P.I. in Android Jelly Bean (4.1.1)
•Thanks to Vomer for helping me learn this and answering my questions when I had them… Also for persuading me to write this guide for others users to hopefully use to learn a small bit of Android modding, which will hopefully create more publically used mods for the benefit and growth of the community. Let’s get it…
First thing is first… This guide is created with the Galaxy Nexus in mind. Even though other phone brands (Samsung, H.T.C., LG, Sony, etc.) are now upgrading their handsets to Android Jelly Bean, this guide is created with my experience with the pure Google experience in mind and pure Google O.S. *If you are using a rom with Samsung Touch Wiz, H.T.C. Sense or anything else produced/provided by another company, this isn’t for you, although it may answer some questions and get you started in the right direction…
THE TOOLS:
I’m using an ApkTool package, which were obtained from a thread created by monstaX < Credit to him!
First off, go to this webpage http://www.mediafire.com/?acrgcd0w850q0gj and download the file. File name should be “apktoolsJB.zip”. Once you have the tools downloaded, unzip them to your desktop.
Inside the unzipped file, you will locate the following files; aapt.exe; apktool.bat; apktool149.jar; apktool142.jar; apktool144.jar and baksmali.jar.
After confirming that the above listed files are present, rename “apktool149.jar” to “apktool.jar”.
That’s it for the tools, leave the file on your desktop, as this will ultimately be your workspace along with a command prompt.
I would also download 7-Zip and Notepad++ from the internet. You can Google those two programs and download them if you don’t already have them….
GETTING WINDOWS READY:
The next thing we need to do is remove the “Environmental Values”. If you have attempted to edit/mod any apks in the past, you probably set up “Environmental Values” in “Path” under “System Variables”. If you have done this, simply navigate back to “System Variables>Path” and delete the added non-sense that you added before. An example would be something like “Android\SDK\platform-tools\;” Make sure that after you’re done deleting, you leave a “;” at the end of the “Path Variable” line of text.
Now for the fun part:
DECOMPILE/COMPILE
Once you have done the above steps, you’re now ready to have some fun.
First off, you need to download a copy of the .zip file of the ROM you’re using onto your computer OR transfer a copy of the framework-res.apk and SystemUI.apk to your computer from your G-Nex. Once you have located these files, you need to place both files into the JBapktool folder that we unzipped onto the desktop earlier.
Once you have placed both files into the JBapktool folder, open the folder and shift+right-click somewhere inside the folder (NOT ON A FILE). Once you have done that and a menu has popped up, select “Open Command Window Here”.
Once the command window has opened; you need to install the framework-res.apk… Now there is a bunch of technical jargon for this but simply and easily type the following command;
java –jar apktool.jar if framework-res.apk
You will see a line that reads “ Framework installed to: C:\Users\yournamehere\apktool\framework\1.apk”
After the above line appears, you will now decompile the framework-res.apk file. To do this, type the following command;
java –jar apktool.jar d framework-res.apk
You will now see something like:
I: Loading resource table…
I: Loaded
I: Decoding file-resources…
I: Decoding values*/* XMLs…
I: Done
I: Copying assets and libs…
*DON’T CLOSE THE COMMAND PROMPT*
After you see that, you should notice that a new file has been added to the JBapktool folder, which should be named “framework-res”. Inside that folder, you will observe the following folders/files; assets; build; dist; res; AndroidManifest.xml; apktool.yml. The file that we are worried about is the “res” file. Open the “res” folder and then navigate to the “values” folder and look for a file named “dimens.xml”. The “dimens.xml” is where the magic happens. Right click on this file and open as “Edit with Notepad++”.
Once Notepad++ is open with the “dimens.xml” file open, you want to focus on three strings in the file. The strings are: 36.0dip
36.0dip
32.0dip
*For a 32 DPI nav bar, I personally use 32 for the height and 28 for the width.*
Now here, the parts of the string that we want to change are highlighted in yellow and represent the “DPI” of the nav bar. The above lines are from a “dimens.xml” file that I changed to make a “36 DPI” nav bar. Once you have made the changes to the above dimensions, just click file and save in Notepad++ and close the program.
Now to compile the “framework-res” folder back into an .apk.
Simply go back to the command prompt that we opened earlier (you shouldn’t have closed it, but if you did follow steps above to open a new one, reinstall the framework-res.apk (STEPS ABOVE) and then continue).
Type the following command;
Java –jar apktool.jar b framework-res
You will see the following (hopefully);
W:Could not find sources
I:Checking wheter resources has changed…
I:Building resources…
I:Building apk file…
After this, you should revert back to the “JBapktool” folder and navigate to “framework-res” folder>”build”>”apk”… Look for the “resources.arsc” file. THAT’S THE MONEY SHOT…
Using 7-zip, you want to open the “framework-res.apk” file that we originally began with (I would make a copy of it and put it on my desktop). Right-click on the “framework-res.apk” file, click 7-Zip and then open archive. A new window will open, showing the visible files inside the framework-res.apk. Look for the file “resources.arsc”. Delete it, locate the “resources.arsc” from the framework-res folder (framework-res>build>apk) in the JBapktool folder. Click and drag it to the unzipped original framework-res.apk file and drop it. WE’RE DONE WITH THE FRAMEWORK-RES.APK FILE.
Now simply place that file in a CWM flashable .zip file and hold tight.
Now we need to decompile the SystemUI.apk that we placed in the JBapktool folder earlier. Follow the above listed instructions to complete this, same as we did with the framework-res.apk.
Once you have the SystemUI.apk file decompiled, look for a folder in JBapktools named “SystemUI”. Inside the “SystemUI” folder, navigate to res>layout>navigation_bar.xml. We now want to open the navigation_bar.xml file with Notepadd++, so that we can delete two lines in it that would cause a larger back button on the nav bar if left intact.
Inside the navigation_bar.xml file look for the following two lines:
"@drawable/ic_sysbar_back" android:scaleType="center"
"@drawable/ic_sysbar_back_land" android:scaleType="center"
Now, we want to delete the following from both lines:
android:scaleType="center"
After deleting that line from both lines, save the file by clicking file>save and close Notepad++. Now back go back to JBapktools and to the already opened command prompt window (it should still be open).
We are now going to compile the SystemUI. To do this type the following command;
java –jar apktool.jar b SystemUI
You will see some text in the command prompt and will ultimately see I:Building APK file…
Once this is complete, navigate back to the JBapktool folder and to the SystemUI file. Once you have the SystemUI folder open, we need to navigate to build>apk and look for the following file; AndroidManifest.xml. Now this is important, we need to replace this file with the AndroidManifest.xml file from the original unzipped SystemUI.apk. So open the original SystemUI.apk with 7-zip, and copy “META-INF” and “AndroidManifest.xml”. Once you have those copied from the original unzipped SystemUI.apk, relocate back to the JBapktool folder>SystemUI>build>apk and paste both of them. If asked to replace, CLICK YES OR REPLACE ON ALL WARNINGS THAT POP UP!!!!
Now we need to back out to the SystemUI folder in JBapktool and click on the folder that is named “dist” (the “dist” folder is where the freshly compiled SystemUI.apk is located once we type in the compile command in the command prompt). Once inside the “dist” folder, you will see a SystemUI.apk file. DELETE IT… We never use the first SystemUI.apk that we compile, because we needed to added the META-INF and AndroidManifest.xml files for signing purposes. Once you have the 1st compiled SystemUI.apk deleted, return to the command prompt and enter the compile command again and compile a 2nd SystemUI.apk.
The 2nd SystemUI.apk will appear in the “dist” folder and is the usable SystemUI.apk.
Now that you have your new SystemUI.apk compiled, place it in the same CWM flashable .zip file, boot into recovery, wipe cache and dalvik cache and VOILA, you have just pimped your nav bar’s DPI.
•Remember when placing the SystemUI.apk file into your CWM .zip file to place it under /system/App. And when placing your framework-res.apk into your CWM .zip file it goes under /system/framework…
The mods and this guide take time for us to put together for your enjoyment/the improvement of the community. If I or anyone else has helped you, please hit the “Thank You” button. Thanks.
Great tutorial
Sent from my Galaxy Nexus using Tapatalk 2
Thank's man.....................
APatte111: could you upload your 32 height 28 landscape framework-res for v4 rom ?
Great guide.
If you dont want to waste time uploading....its all good anyway mate :good:
bs android said:
APatte111: could you upload your 32 height 28 landscape framework-res for v4 rom ?
Great guide.
If you dont want to waste time uploading....its all good anyway mate :good:
Click to expand...
Click to collapse
This is not the mods thread
Great job bud!
Also, remember guys - if you make a MiNCO Mod - share with other's in the MiNCO Plus+ Thread. Chances are someone else would want it too
bs android said:
APatte111: could you upload your 32 height 28 landscape framework-res for v4 rom ?
Great guide.
If you dont want to waste time uploading....its all good anyway mate :good:
Click to expand...
Click to collapse
This framework-res.apk is in place in several of the mods in the MiNCO Plus+ mods and enhancements thread that vomer began... Just download one of the mods and extract the framework-res.apk from one of the .zip files... Probably the easiest way to get it...
Sent from my Galaxy Nexus using xda premium
vomer said:
This is not the mods thread
Great job bud!
Click to expand...
Click to collapse
OK sorry for asking OP if that annoys you
APatte111 said:
This framework-res.apk is in place in several of the mods in the MiNCO Plus+ mods and enhancements thread that vomer began... Just download one of the mods and extract the framework-res.apk from on of the .zip files... Probably the easiest way to get it...
Sent from my Galaxy Nexus using xda premium
Click to expand...
Click to collapse
Nice APatte, I saw it now, downloaded and tried your framework with vomers standard white for minco rom. Got the failure in back button so guess I have to wait till I get home to a computer to fix it. Thanks for the guide anyway, love different and smaller navbars.
bs android said:
Got the failure in back button so guess I have to wait till I get home to a computer to fix it. Thanks for the guide anyway, love different and smaller navbars.
Click to expand...
Click to collapse
Yeah, if by "failure" you mean the larger back key then that is being caused by the un-edited navigation_bar.xml file which is located in SystemUI.apk>res>layout... You need to delete the two lines mentioned above, re-compile the SystemUI.apk and everything should be golden. Let me know if it doesn't work and I will help ya... Good Luck
Good guide!
Great job man!! Great tutorial!
:good::good::good::good::good:
MAN CHANGE THIS IS WRONG!! Java –jar apktool.jar b frame-work
IT IS java -jar apktool.jar b framework-res
masterchif92 said:
MAN CHANGE THIS IS WRONG!! Java –jar apktool.jar b frame-work
IT IS java -jar apktool.jar b framework-res
Click to expand...
Click to collapse
Thanks, you found a typo and the one mistake in the whole guide... Appreciate that...
Sent from my Galaxy Nexus using xda premium
After looking at 5 or 6 other guides. This one is BY FAR the easiest to understand & includes everything you need to get the job done.
Thanks a ton OP!
i cant seem to find the "@drawable/ic_sysbar_back" & "@drawable/ic_sysbar_back_land" in the navigation_bar.xml file. Any help please? I must mention that i am on AndroidME CM10 1.7.0 and took both files from the cwm zip.
Only repeating line i can find is "@drawable/ic_sysbar_lights_out_dot_large" . Dont know if it is the same.
I ve done some android developing in the past. every linear_layout represents a button, right?
angelossssss said:
i cant seem to find the "@drawable/ic_sysbar_back" & "@drawable/ic_sysbar_back_land" in the navigation_bar.xml file. Any help please? I must mention that i am on AndroidME CM10 1.7.0 and took both files from the cwm zip.
Only repeating line i can find is "@drawable/ic_sysbar_lights_out_dot_large" . Dont know if it is the same.
I ve done some android developing in the past. every linear_layout represents a button, right?
Click to expand...
Click to collapse
Can you upload the navigation_bar.xml file for me so I could have a look...
*** Nice signature by the way *** LOL
Sent from my Galaxy Nexus using xda premium
APatte111 said:
Can you upload the navigation_bar.xml file for me so I could have a look...
*** Nice signature by the way *** LOL
Sent from my Galaxy Nexus using xda premium
Click to expand...
Click to collapse
here. i uploaded in my dropbox.
https://www.dropbox.com/s/7331l8fqs7a99yg/navigation_bar.xml
Thanks for the signature
---------- Post added at 08:25 PM ---------- Previous post was at 08:17 PM ----------
angelossssss said:
here. i uploaded in my dropbox.
https://www.dropbox.com/s/7331l8fqs7a99yg/navigation_bar.xml
Thanks for the signature
Click to expand...
Click to collapse
actually nevermind that... i just flashed the cwm without the systemui.apk and it seems to be working fine. lol
angelossssss said:
here. i uploaded in my dropbox.
https://www.dropbox.com/s/7331l8fqs7a99yg/navigation_bar.xml
Thanks for the signature
---------- Post added at 08:25 PM ---------- Previous post was at 08:17 PM ----------
actually nevermind that... i just flashed the cwm without the systemui.apk and it seems to be working fine. lol
Click to expand...
Click to collapse
I was going to say, it looks like they have already removed that from the navigation_bar.xml file... The description of the ROM shows that Nav Bar Options are included... You could change the DPI size, compile and see if the back button is larger (which is what deleting those two lines fix)... If it's not (which you stated it's working) then skip that step....
APatte111 said:
I was going to say, it looks like they have already removed that from the navigation_bar.xml file... The description of the ROM shows that Nav Bar Options are included... You could change the DPI size, compile and see if the back button is larger (which is what deleting those two lines fix)... If it's not (which you stated it's working) then skip that step....
Click to expand...
Click to collapse
y i only compiled the framework-res.apk but i thing now my phone became a little laggy. especially when swipping between screens and opening apps.
i'll check it out if i did anything wrong.
angelossssss said:
y i only compiled the framework-res.apk but i thing now my phone became a little laggy. especially when swipping between screens and opening apps.
i'll check it out if i did anything wrong.
Click to expand...
Click to collapse
Check in the ROM and see if there is already a built in option to change the nav bar DPI size... if not, make the changes to the dimens.XML file and then recompile/replace the .apk and re-flash... that should work and everything should be normal...
Sent from my Galaxy Nexus using xda premium
APatte111 said:
Check in the ROM and see if there is already a built in option to change the nav bar DPI size... if not, make the changes to the dimens.XML file and then recompile/replace the .apk and re-flash... that should work and everything should be normal...
Sent from my Galaxy Nexus using xda premium
Click to expand...
Click to collapse
unfortunately there is not. it only has options to change the buttons order.

Navigation bar height

Does anyone know a way of changing the height of the navigation bar? I used AOKP on my Gnex and could do it using the ROM but want to keep a rooted stock ROM on my N4 (for now)
Thanks
Sent from my Nexus 4 using xda premium
dave83uk said:
Does anyone know a way of changing the height of the navigation bar? I used AOKP on my Gnex and could do it using the ROM but want to keep a rooted stock ROM on my N4 (for now)
Thanks
Sent from my Nexus 4 using xda premium
Click to expand...
Click to collapse
you have to decompile the framework-res.apk
after decompiling you have to edit the dimens.xml file in res/values
you have to change the size of the navbar in 3 places
dimen name="navigation_bar_height">38.0dip</dimen>
<dimen name="navigation_bar_height_landscape">38.0dip</dimen>
<dimen name="navigation_bar_width">38.0dip</dimen>
for example, i choosed 38 dpi, but choose your own size
then recompile and exchange the apk with yours and your good to go
good tutorial
http://modstorm.co/tutorials/
Some ROMs have it..I.e. Rasjelly
Sent from my Nexus 4 using Tapatalk 2
pa.pn2 said:
you have to decompile the framework-res.apk
after decompiling you have to edit the dimens.xml file in res/values
you have to change the size of the navbar in 3 places
dimen name="navigation_bar_height">38.0dip</dimen>
<dimen name="navigation_bar_height_landscape">38.0dip</dimen>
<dimen name="navigation_bar_width">38.0dip</dimen>
for example, i choosed 38 dpi, but choose your own size
then recompile and exchange the apk with yours and your good to go
good tutorial
http://modstorm.co/tutorials/
Click to expand...
Click to collapse
Great thank you for the detailed instructions. I will take a look and give it a try.
Sent from my Nexus 4 using xda premium
My bad
Hi,
I tried to decompile the framework-res.apk, change the values to 38 and recompile but my device gets stuck on the Nexus logo whenever I try to boot it. apktool and aapt are up-to-date. What makes me think is that the framework-res.apk is ~10mb before and ~6mb after the process And I don't know how to make a flashable zip so I used the TWRP file manager. Could that be the source of my problem?
Shedao said:
Hi,
I tried to decompile the framework-res.apk, change the values to 38 and recompile but my device gets stuck on the Nexus logo whenever I try to boot it. apktool and aapt are up-to-date. What makes me think is that the framework-res.apk is ~10mb before and ~6mb after the process And I don't know how to make a flashable zip so I used the TWRP file manager. Could that be the source of my problem?
Click to expand...
Click to collapse
how did you recompile it?and the size is not abnormal, in my case its always like yours smaller yes
take this tool
http://forum.xda-developers.com/showthread.php?t=2032613&page=2
its up to date for 4.2.1
works fine for me
pa.pn2 said:
how did you recompile it?and the size is not abnormal, in my case its always like yours smaller yes
take this tool
http://forum.xda-developers.com/showthread.php?t=2032613&page=2
its up to date for 4.2.1
works fine for me
Click to expand...
Click to collapse
Ok, short story: It still doesn't work but thanks for the quick answer.
I took the apkmanager from your link and unpacked my framework-res.apk but in the new folder projects/framework-res/res there is no values folder Some google searching revealed that it is important to "install" the framework-res.apk on the PC so I opened a command prompt and used the apktool if framework-res.apk command and got the user/apktool/framework/1.apk. Unfortunately that doesn't seem to change anything. Unpacking the framework-res.apk still don't give me the values folder.
What am I missing? Could you write a step by step explanation?
Shedao said:
Ok, short story: It still doesn't work but thanks for the quick answer.
I took the apkmanager from your link and unpacked my framework-res.apk but in the new folder projects/framework-res/res there is no values folder Some google searching revealed that it is important to "install" the framework-res.apk on the PC so I opened a command prompt and used the apktool if framework-res.apk command and got the user/apktool/framework/1.apk. Unfortunately that doesn't seem to change anything. Unpacking the framework-res.apk still don't give me the values folder.
What am I missing? Could you write a step by step explanation?
Click to expand...
Click to collapse
hmm strange
i just put the framework-res.apk in into the modding folder and then i choose point 9, decompiling, thats it
pa.pn2 said:
hmm strange
i just put the framework-res.apk in into the modding folder and then i choose point 9, decompiling, thats it
Click to expand...
Click to collapse
Ok, the weirdness just goes on. I tried to use point 9 (decompile) and got a java error, something I already knew from the apktool itself. The answer was to replace the old aapt.exe and apktool.jar in the apkmanager/other folder. Now decompiling works just great and I get the dimens.xml. Changed the numbers according to your values with Notepad++ and saved. Recompiling with the apkmanager works up to the point where I have to delete all modified files. As there is no values/dimens.xml I could delete, I just delete the resources.arsc. The question for a system apk I answer with yes and in the end I have a signedframework-res.apk.
I rename it to framework-res.apk, go into fastboot/TWRP and use its filemanager to replace the original apk with my modified one. And then -> endless nexuslogo on booting
I really want to learn something from this whole mess, so where is the big mistake?
Shedao said:
Ok, the weirdness just goes on. I tried to use point 9 (decompile) and got a java error, something I already knew from the apktool itself. The answer was to replace the old aapt.exe and apktool.jar in the apkmanager/other folder. Now decompiling works just great and I get the dimens.xml. Changed the numbers according to your values with Notepad++ and saved. Recompiling with the apkmanager works up to the point where I have to delete all modified files. As there is no values/dimens.xml I could delete, I just delete the resources.arsc. The question for a system apk I answer with yes and in the end I have a signedframework-res.apk.
I rename it to framework-res.apk, go into fastboot/TWRP and use its filemanager to replace the original apk with my modified one. And then -> endless nexuslogo on booting
I really want to learn something from this whole mess, so where is the big mistake?
Click to expand...
Click to collapse
dont delete modified files,just type n, if asked for system app type y
recompiling with option 11
use this file(Brainmasters.Battery.Mod.Flasher.Nexus.4.zip) to flash the apk in recovery, dont do it via filemanager
add a folder called framework on your desktop, open the folder, put your framework.res.apk into it and put the complete new created folder within your apk into the .zip into the second folder, where you find a system folder. so there should be a system and your framework folder
http://forum.xda-developers.com/showthread.php?t=2037171
first download link is the .zip
also,check your java setup,maybe your paths are wrong
had alwyas problems with this ****ty paths of java before
watch this video to keep your java structure correct
http://www.youtube.com/watch?v=oowsJcJLmss
Finally it worked.
Thanks for all your patience and help. My way was somewhat different from yours so here is a quick overview for those facing the same problems:
1. Download apktool from here http://code.google.com/p/android-apktool/
2. Follow the steps in this tutorial to decompile, modify and recompile the framework-res.apk http://modstorm.co/tutorials/
3. Download the Brainmasters.Battery.Mod.Flasher.Nexus.4.zip from this location http://forum.xda-developers.com/showthread.php?t=2037171
4. Safety-step: Put the original UNmodified framework-res.apk in a new folder with the name "framework" and put this one into the system folder from the zip above. Rename the zip to something like originalframework.zip
5. Now repeat step 4 with the modified framework-res.apk and another copy of the zip from step 3. Name this zip to something like newframework.zip
6. Copy both new zips onto your phone, reboot into recovery and flash.
Shedao said:
Finally it worked.
Thanks for all your patience and help. My way was somewhat different from yours so here is a quick overview for those facing the same problems:
1. Download apktool from here http://code.google.com/p/android-apktool/
2. Follow the steps in this tutorial to decompile, modify and recompile the framework-res.apk http://modstorm.co/tutorials/
3. Download the Brainmasters.Battery.Mod.Flasher.Nexus.4.zip from this location http://forum.xda-developers.com/showthread.php?t=2037171
4. Safety-step: Put the original UNmodified framework-res.apk in a new folder with the name "framework" and put this one into the system folder from the zip above. Rename the zip to something like originalframework.zip
5. Now repeat step 4 with the modified framework-res.apk and another copy of the zip from step 3. Name this zip to something like newframework.zip
6. Copy both new zips onto your phone, reboot into recovery and flash.
Click to expand...
Click to collapse
good job
i always do a backup of the original too
nice that you got it working^^
Argh cant get this to work
always get fail after flashing
EDIT: GOT IT WORKING NOW!! AWESOME!
ugene1980 said:
Argh cant get this to work
always get fail after flashing
EDIT: GOT IT WORKING NOW!! AWESOME!
Click to expand...
Click to collapse
How did you now do that? I'm currently stuck at the same Situation..
Tried it like told above, but without luck. The backup file boots fine, while the modified one simply doesnt.
someone can post a small nav bar...please....
please...please...
i'm using stock rom...
R: Navigation bar height
Nobody With a soul?
Please..
Inviato dal mio Nexus 4 con Tapatalk 2
wheres your prob?not able to read?anything you need to know is in the op
R: Navigation bar height
Yes I'm not able with Mac..totally unable..I'm a bit stupid
Inviato dal mio Nexus 4 con Tapatalk 2
coloxim said:
Yes I'm not able with Mac..totally unable..I'm a bit stupid
Inviato dal mio Nexus 4 con Tapatalk 2
Click to expand...
Click to collapse
hmm mac is different
have a look for apktool then for mac in xda search, i bet you will find something
if not here it is http://code.google.com/p/android-apktool/

Theming Statusbar

Hey everyone.
Here is the deal:
I want to theme my statusbar to make it look like stock jelly bean (from nexus). It's possible to do that using apps such as "ROM Toolbox", but the problem is: The rom must be deodexed and mine isn't.
So I found this "how to" to deodex an apk in another forum:
Code:
Thanks all. Have successfully done what I wanted now
For info, this is what I did.
Created a new folder called 'system' in c:\android-sdk\tools. Obtained the odexed framework folder and placed that in the system folder. Then created a folder called app in the system folder and placed the Rosie.apk and Rosie.odex inside.
Then via cmd, entered the 'system/app' folder, so for me it was...
c:\android-sdk\tools\system\app
From there I ran the following command to end of that path: baksmali.jar -d ../framework -x Rosie.odex
This produced an out folder will all the decompiled .smali files etc. From there I was able to get to the Launcher.smali that i wanted, but to recompile to a classes.dex file you simply run the following command: smali.jar out
This produces an 'out.dex' that you can rename to 'classes.dex'
I am sure there are other commands that you can use to name files accordingly etc but this is what worked for me for what I wanted, so hopefully it will be of some help to people... if they can understand anything I've written.
Is that simple as it looks? I was planning to deodex only the file needed to customize the statusbar. I think it's the framework-res.apk.
Is there any other way to do that?
As I'm new on this deodex stuff, I would appreciate some help.
fndpena said:
Hey everyone.
Here is the deal:
I want to theme my statusbar to make it look like stock jelly bean (from nexus). It's possible to do that using apps such as "ROM Toolbox", but the problem is: The rom must be deodexed and mine isn't.
So I found this "how to" to deodex an apk in another forum:
Code:
Thanks all. Have successfully done what I wanted now
For info, this is what I did.
Created a new folder called 'system' in c:\android-sdk\tools. Obtained the odexed framework folder and placed that in the system folder. Then created a folder called app in the system folder and placed the Rosie.apk and Rosie.odex inside.
Then via cmd, entered the 'system/app' folder, so for me it was...
c:\android-sdk\tools\system\app
From there I ran the following command to end of that path: baksmali.jar -d ../framework -x Rosie.odex
This produced an out folder will all the decompiled .smali files etc. From there I was able to get to the Launcher.smali that i wanted, but to recompile to a classes.dex file you simply run the following command: smali.jar out
This produces an 'out.dex' that you can rename to 'classes.dex'
I am sure there are other commands that you can use to name files accordingly etc but this is what worked for me for what I wanted, so hopefully it will be of some help to people... if they can understand anything I've written.
Is that simple as it looks? I was planning to deodex only the file needed to customize the statusbar. I think it's the framework-res.apk.
Is there any other way to do that?
As I'm new on this deodex stuff, I would appreciate some help.
Click to expand...
Click to collapse
The statusbar is SystemUI.apk.. framework-res.apk deals with all the system pop ups etc.
I would recommend starting off with a deodexed base rom, for eg. wanams..
I would also recommend using apktool rather then baksmali.. iv had great success with apktool..
EDIT: You can find deodexed wanam base rom in general section of this section of the forum.
fOmey said:
The statusbar is SystemUI.apk.. framework-res.apk deals with all the system pop ups etc.
I would recommend starting off with a deodexed base rom, for eg. wanams..
I would also recommend using apktool rather then baksmali.. iv had great success with apktool..
Click to expand...
Click to collapse
Unfortunally, flash a new rom is not an option for me right now.
Is that OK to deodex only ONE apk in order to do what I want? In this case SystemUI.apk.
I just have to deodex it using apktool and put it back to android system?
do what fences do, compile it and put in the split test system, remember it is a system app
XxeAgLeAnGeLxX said:
do what fences do, compile it and put in the split test system, remember it is a system app
Click to expand...
Click to collapse
Sorry, but what is "split test system"?
EDIT: Nevermind... I did some research and now I'm running an AVD on android emulator.
I'll soon test the deodexed SystemUI.apk and post results. Thanks for the tips...

Categories

Resources