Guest Intenso74 Posted October 6, 2010 Report Posted October 6, 2010 Hi all, I'm currently running LCR 1.8.2.2 on my S100, with this custom theme on it. However, i absolutely LOVE the battery icon from LCR. Is there a way to extract it from the rom and put it in an update.zip to overwrite only the battery icon of the custom theme? Thanks, Intenso74
Guest Dinmamma Posted October 6, 2010 Report Posted October 6, 2010 Hi all, I'm currently running LCR 1.8.2.2 on my S100, with this custom theme on it. However, i absolutely LOVE the battery icon from LCR. Is there a way to extract it from the rom and put it in an update.zip to overwrite only the battery icon of the custom theme? Thanks, Intenso74 Should be doable. The battery icons for 20%, 40% 60% etc (or whatever they are :)) are inside the "\res\drawable-hdpi" folder inside framework-res.apk which is \system\framework. The battery % however, is in services.jar (i think ;)). Which is not as simple as dragging and dropping it into some other rom. Hope this helped.
Guest Intenso74 Posted October 6, 2010 Report Posted October 6, 2010 (edited) Whoa, whoa, whoa, I'm new to all this roms and themes stuff, so could you please explain it in a more noob-friendly way? And by the way, is it even possible to extract files from a .apk file?? Thanks! Edit: By the way, i'm not dropping it into another ROM. It's the same ROM, but with a different theme. Edited October 6, 2010 by Intenso74
Guest ikirt Posted October 6, 2010 Report Posted October 6, 2010 (edited) Whoa, whoa, whoa, I'm new to all this roms and themes stuff, so could you please explain it in a more noob-friendly way? And by the way, is it even possible to extract files from a .apk file?? Thanks! Edit: By the way, i'm not dropping it into another ROM. It's the same ROM, but with a different theme. You need to pull /system/framework/frameworl-res.apk from your phone and inside that file you will find the battery images you are looking for: eg. 1. adb pull /system/framework/framework-res.apk 2. unzip framework-res.apk 3. inside the extracted directory go here: res/drawable-hdpi/ 4 inside this directory are most of the images on your Android. Note: APK files are just signed zip file, you can use winzip or tugzip to extract them. If you want to put your modified APK back on your phone you will need to sign it. I found the easiest way to do this is, find the images you want to use, then open up the framework-res.apk file in winzip and just drag and drop the new files into the appropriate directory over writing existing file. This way the file stays singed and you can just push the ask file back to your phone. Be sure to make a backup with nandroid first cause sometimes you phone will not boot if something funky happens to the apk file you uploaded. Hope this helps. Edited October 6, 2010 by ikirt
Guest Intenso74 Posted October 8, 2010 Report Posted October 8, 2010 (edited) You need to pull /system/framework/frameworl-res.apk from your phone and inside that file you will find the battery images you are looking for: eg. 1. adb pull /system/framework/framework-res.apk 2. unzip framework-res.apk 3. inside the extracted directory go here: res/drawable-hdpi/ 4 inside this directory are most of the images on your Android. Note: APK files are just signed zip file, you can use winzip or tugzip to extract them. If you want to put your modified APK back on your phone you will need to sign it. I found the easiest way to do this is, find the images you want to use, then open up the framework-res.apk file in winzip and just drag and drop the new files into the appropriate directory over writing existing file. This way the file stays singed and you can just push the ask file back to your phone. Be sure to make a backup with nandroid first cause sometimes you phone will not boot if something funky happens to the apk file you uploaded. Hope this helps. Thanks. I almost got it working that way. The only problem is that it only displays 20% differences, while there are 100 different PNG's for each %. Also the charging icons are in strange order (nearly empty charging icon at 83% battery) Also, the USB mount icon has changed into the USB debugging icon (I didn't touch that file..?) I noticed the custom theme has it's own services.jar, could that have something to do with it? Any help is appreciated. Edit: I also noticed the LCR battry icons were in a drawable-hdpi-v4 folder. Edited October 16, 2010 by Intenso74
Guest Intenso74 Posted October 16, 2010 Report Posted October 16, 2010 So.. I fixed the charging icon problem by using only 1/4 of the charge files from the LCR theme (LCR had 20 and custom theme had 5, so 0 = 0, 4 = 1, 8 = 2 etc.) Also the strange USB mount icon fixed itself after 2nd reboot..??? Well i don't care as long as it works =D. So, the only problem left is the 20% instead of 1% battery life differences and the 5% charging differences, which is probably inside the services.jar... Any suggestions???
Guest ikirt Posted October 17, 2010 Report Posted October 17, 2010 (edited) Look for an XML file named closely to the images you are pulling and toss it into your framework-res.apk with the images. eg. stat_sys_battery.xml Edited October 17, 2010 by ikirt
Guest Intenso74 Posted October 17, 2010 Report Posted October 17, 2010 (edited) Look for an XML file named closely to the images you are pulling and toss it into your framework-res.apk with the images. eg. stat_sys_battery.xml That's almost it, I think. However, it's not working because the battery icon completely disappears after replacing the xml's I also tried creating a drawable-hdpi-v4 (the icons are in that folder in the original LCR theme) folder and putting the icons in that folder, but that didin't work as well. Suggestions?? Edited October 17, 2010 by Intenso74
Guest Piter1225 Posted October 17, 2010 Report Posted October 17, 2010 You need to decompile framework-res.apk with apktool or sth like that, change icons, change xml's, and compile back. Previously it didnt worked for you, because changes are made also in resources.arsc
Guest Intenso74 Posted October 17, 2010 Report Posted October 17, 2010 You need to decompile framework-res.apk with apktool or sth like that, change icons, change xml's, and compile back. Previously it didnt worked for you, because changes are made also in resources.arsc I downloaded it, but i haven't got the slightest idea of how to use it. Could you please write me a small guide? Thanks!
Recommended Posts
Please sign in to comment
You will be able to leave a comment after signing in
Sign In Now