Framework mods (battery indicator) possible? - myTouch 4G General

I see that there now appears to be a way to insert APKs into the /system cache, but might there be a way to substitute a modified framework-res mod? I would tend to this isn't possible, but just thought I'd throw it out there. I'd like to get that circular battery mod up and working, and for that to happen, I would need to compile a new framework.

floepie said:
I see that there now appears to be a way to insert APKs into the /system cache, but might there be a way to substitute a modified framework-res mod? I would tend to this isn't possible, but just thought I'd throw it out there. I'd like to get that circular battery mod up and working, and for that to happen, I would need to compile a new framework.
Click to expand...
Click to collapse
yeah.. what he said.. i would love to know too.. it would make our MT4G perfect with it...

Well, I tried to substitute some PNGs using Metamorph, and as expected, it wouldn't take.

Please post question in general section or the Q&A thread in development. Thank you

Related

[REQ] Super Circle Battery with %

We need this.
http://forum.xda-developers.com/showthread.php?t=724778
That's really cool looking; I hope someone can figure out how to port it, but I imagine it shouldn't be too hard.
this kind of post belongs in apps and themes.....
i like it though just change the colors
and it would be very cool
I would like to see this too. It won't work as is?
Sent from my rooted Incredible w/ Flash
I installed the sense-eclair 2.1 "modaco" version, used clockwork to install zip, works fine for me.
Sent from my ADR6300 using XDA App
Ok after toying with my phone with the new battery Meter. I found that the search button reboots my phone.... don't know If its just mine.
Sent from my HTC Droid Incredible.
Be careful flashing these. They contain build.prop and wireless driver files that are not for your phone.
Thread moved to General.
egzthunder1 said:
Thread moved to General.
Click to expand...
Click to collapse
Actually, this needs to be in Development where I posted it due to the fact that it requires major editing of the stat_sys_battery.xml and stat_sys_battery_charge.xml files to allow it to display the actual battery percentage for each level, such as 99, 98, 97, etc.. Please put it back.
Agreed. I too would really like to see this develop into a reality for inc users. it would free up a spot on my notification bar.
I was able to edit the images and repack the latest nightly so now I have the circle battery meter. The 1% increment isn't working. I assume there must be an xml file to edit??? Can anyone shed some light on that?
Edit: This is on CM6 nightly
Wish this could be ported with the percentage over a battery icon. The circle icon reminds me too much of WinMo.
I'd love to get this on my phone along with something similar for wifi!
Can those of us using the SkyRaider (2.2) rom get a little love with this?
Sent from my ADR6300 using XDA App
I would love to get this..
how to modify xml files?
Hi all -- I would love to have this batt on my DI too...and honestly it doesn't look difficult from a theming perspective. But we need some way to extract the necessary XML files from framework-res.apk, modify them, then correctly re-encode them as binary and repackage into the apk.
If someone can point me to a tool, short of the using the full SDK to rebuild the apk from scratch, it should be a relatively quick mod...
*thread subscribed*
bcgaynor82 said:
Hi all -- I would love to have this batt on my DI too...and honestly it doesn't look difficult from a theming perspective. But we need some way to extract the necessary XML files from framework-res.apk, modify them, then correctly re-encode them as binary and repackage into the apk.
If someone can point me to a tool, short of the using the full SDK to rebuild the apk from scratch, it should be a relatively quick mod...
*thread subscribed*
Click to expand...
Click to collapse
You need to use AXMLPrinter2 to edit stat_sys_battery.xml and stat_sys_battery_charge.xml, which are located under /res/drawable/ in framework-res.apk. I just don't know what modifications to change.
this would be awesome!
xvenom89 said:
You need to use AXMLPrinter2 to edit stat_sys_battery.xml and stat_sys_battery_charge.xml, which are located under /res/drawable/ in framework-res.apk. I just don't know what modifications to change.
Click to expand...
Click to collapse
unfortunately AXMLPrinter2 only converts the XMLs from binary back into editable text -- it doesn't do the reverse. But if you use it and take a look at the XMLs, the modifications are actually pretty straightforward. In fact, the file is already set up to have an image for every 1% step, but images for 95 of those steps are undefined.
what we need is a tool that repackages the XMLs back into the APK appropriately -- i haven't found anything to do this, and i'm not skilled enough to use the SDK in full yet...
still would really love to see this...how can we get some love from the more experienced themers?
Madcaddie said:
I installed the sense-eclair 2.1 "modaco" version, used clockwork to install zip, works fine for me.
Sent from my ADR6300 using XDA App
Click to expand...
Click to collapse
Madcaddie said:
Ok after toying with my phone with the new battery Meter. I found that the search button reboots my phone.... don't know If its just mine.
Sent from my HTC Droid Incredible.
Click to expand...
Click to collapse
i also just installed this. it also reboots my phone when quickly pressing the search button, but it does not reboot the phone when long pressing the search button. so far so good otherwise. i'm gonna try this for a day and see if any other problems arise, i have a nandroid backup i can go right back to at anytime, so no biggie.

[request] Themed 3G icon

can anyone post up a themed version of the stock or new MIUI rom flashable 3G indicator, themed to match this (or both):
http://forum.xda-developers.com/showthread.php?t=788214
Thanks!
Do you mean you're after:
A theme for MIUI which has the 3G icons from that theme
or
That theme with the MIUI 3G icons?
Josh.
fllash said:
Do you mean you're after:
A theme for MIUI which has the 3G icons from that theme
or
That theme with the MIUI 3G icons?
Josh.
Click to expand...
Click to collapse
I would like the 3g icon from that rom to flash over SkyRaider 3.2
^Same^ but likt the one from the smooth blue theme that is a blue 3G indicator. Or JUST the stock HTC 3G indicator in blue if possible. Thanks
just pull it out of the framework and color it yourself, it's like 4 images
worm- said:
just pull it out of the framework and color it yourself, it's like 4 images
Click to expand...
Click to collapse
How do I do this?
Thanks
Funny. I was just going to post asking anyone if they had it in red. I would also like to know how to do it.
Contempt4You said:
Funny. I was just going to post asking anyone if they had it in red. I would also like to know how to do it.
Click to expand...
Click to collapse
I know. I really want it lol, because i kinda hate the 3G indicator in the theme i have currently, as it's hard to see the upload/download arrows, so i just wanted a flashable indicator so I dont lose the cool notification pulldown
I can edit it with photoshop if I can find it. Can anyone give me a hint to the file path?
EDIT: Hah...ok I suck and fail.
I found the apk and edited the images. Looked great. Put the apk back together. Unistalled the original apk and tried to install my modified apk. Would not install. I'm done with it for now. I guess I will read up on signing tomorrow although I thought I had read that system apps didn't need to be signed.
I'll play with it more tomorrow.
do adb pull /system/framework/framework-res.apk
And the images should n in the drawable-hdpi. Folder if not just look around until u find the images
Then pull the framework from your current Rom and replace your images with the images you want then repush your framework hack to the phone and reboot
Sent from my ADR6300 using Tapatalk
Contempt4You said:
I can edit it with photoshop if I can find it. Can anyone give me a hint to the file path?
EDIT: Hah...ok I suck and fail.
I found the apk and edited the images. Looked great. Put the apk back together. Unistalled the original apk and tried to install my modified apk. Would not install. I'm done with it for now. I guess I will read up on signing tomorrow although I thought I had read that system apps didn't need to be signed.
I'll play with it more tomorrow.
Click to expand...
Click to collapse
If you figure it out can you pack a zip of just the 3g icon in blue as well for me?
Thanks man
Thanks for the tips. With a little help from google, I was able to figure it out.
Which icon did you need exactly? The 3g toggle or the notification bar?
well, i did it and replaced some old icons with cooler looking ones, but the 3g icons (along with similar data icons) did not show up. all of the other ones showed up. also, i read a thread where this dude got 4g icons from another rom and installed them on his phone to make it look like he had 4g, but then hours later, he experienced loss of mobile data... and now i think i am too... any suggestions?
I'm sorry I can't help you. I am learning all this myself and wouldn't pretend to know where to start on that. All I can say is that if you are going to make any changes then backup early and often.
The 3g toggle icons I was looking for were in system/app. I merely reskinned them and dropped them back in.
Contempt4You said:
I'm sorry I can't help you. I am learning all this myself and wouldn't pretend to know where to start on that. All I can say is that if you are going to make any changes then backup early and often.
The 3g toggle icons I was looking for were in system/app. I merely reskinned them and dropped them back in.
Click to expand...
Click to collapse
i wanted notification bar icon
I'm running a theme and mine is already skinned. I think either way you would still have to adb push it onto your phone. I did some googling and took a crash course on changing system icons.
Once I figured it out, it made sense (i know that sounds stupid, but after i did it, I was like oh yeah I get it now). I know that's not a big help, but I'm new to this and wouldn't want to bork your phone. Maybe someone more knowledgable will come save the day.
Otherwise I would google in terms like editing apks and adb pull adb push etc. and maybe you will figure it out too.
Hell I can't wait to ruin my phone now that I am armed and dangerous =)
Contempt4You said:
I'm running a theme and mine is already skinned. I think either way you would still have to adb push it onto your phone. I did some googling and took a crash course on changing system icons.
Once I figured it out, it made sense (i know that sounds stupid, but after i did it, I was like oh yeah I get it now). I know that's not a big help, but I'm new to this and wouldn't want to bork your phone. Maybe someone more knowledgable will come save the day.
Otherwise I would google in terms like editing apks and adb pull adb push etc. and maybe you will figure it out too.
Hell I can't wait to ruin my phone now that I am armed and dangerous =)
Click to expand...
Click to collapse
Lol, i actuallly finally figured out how to extract the png's, so i am going to edit in photoshop, then replace the current images with the app ninjamorph.
*didnt work* left a huge blank space on noti. bar and when I rebooted to see if it would show, I bootlooped*
Well. I spent last night learning to resign edited apk files, so literally nothing on my phone is safe now.
Contempt4You said:
Well. I spent last night learning to resign edited apk files, so literally nothing on my phone is safe now.
Click to expand...
Click to collapse
Is there any way to pack the png's so that I can flash them or install as an apk?
Anyone know how I'd do this? I already have the edited png's.
Can I send any of you guys the folder with the icons and you can help me out with this?
Thanks again
It seems the easiest way to change or theme icons is to not unzip them. Just open them with 7zip and make your changes, then close it. They will stay compressed and all of the info and size will remain intact.
Once changed you will have to resign the apk or zip file.
I spent the better part of 2 hours reading up on it using these forums and google, but I do not in any way feel knowledgable enough to instruct you on the finer points. There are oodles of topics on editing apk's and signing them when you are finished.
The steps seem pretty clear:
1. download or pull apk
2. open with 7zip
3. make changes keeping sizes and file names the same
4. close
5. re-sign the apk or zip file (most likely have to delete the existing files to the original signing which will be replaced with your own)
6. push or install the zip or apk (make sure the original app is uninstalled prior to reinstalling the changed app)
There are various methods and tools. The most helpful thread I found on signing is here: http://forum.xda-developers.com/showthread.php?t=473580
I hope this covers it all and is helpful to you. I am new at it and can only tell you to backup everything and if you are unclear on any of it, then don't attempt it.
Read all the posts related to it. There is great info and plenty of feedback on known issues or mistakes others have had.

[Q] 10% Battery icons for Tranquility 3.0

I've been trying to modify Tranquility 3.0 to use 10% increments instead of the default 20% with the icons found in this thread: 821606
(Apparently a link to another topic is an "outside link" and I'm not allowed to post it. Just replace this topic's ID with that one and you'll find the thread I'm talking about)
So far I've been able to boot with the correct icons but I get strange force closes and weird patterns, especially in the little loading bars and in the volume bars. It's odd.
I've attached the .pngs and .xmls I would like to use - can anyone build a working framework-res.apk for Tranq's dark theme to use these icons/xmls, or at least tell me where I've gone wrong in creating my own?
Sunblood said:
I've been trying to modify Tranquility 3.0 to use 10% increments instead of the default 20% with the icons found in this thread: 821606
(Apparently a link to another topic is an "outside link" and I'm not allowed to post it. Just replace this topic's ID with that one and you'll find the thread I'm talking about)
So far I've been able to boot with the correct icons but I get strange force closes and weird patterns, especially in the little loading bars and in the volume bars. It's odd.
I've attached the .pngs and .xmls I would like to use - can anyone build a working framework-res.apk for Tranq's dark theme to use these icons/xmls, or at least tell me where I've gone wrong in creating my own?
Click to expand...
Click to collapse
No thread identified. But upload the tranquility framework and i'll try.
yawdapaah said:
No thread identified. But upload the tranquility framework and i'll try.
Click to expand...
Click to collapse
Thanks, I appreciate it.
Sunblood said:
Thanks, I appreciate it.
Click to expand...
Click to collapse
Be careful I don't have Tranquility so I can't test it. Use it at your own risk.
Thanks
http://www.mediafire.com/?4c2ynglf5bzzpk5
I'd be interested to know if it works out after the edits. On that note if you guys wouldn't mind if it does work I can get it off t oP3 so he could add it into his next update of TranQ.
will2live said:
I'd be interested to know if it works out after the edits. On that note if you guys wouldn't mind if it does work I can get it off t oP3 so he could add it into his next update of TranQ.
Click to expand...
Click to collapse
Well if you have tranquility, you can try it out. I've already uploaded the file.
Thanks
yawdapaah said:
Well if you have tranquility, you can try it out. I've already uploaded the file.
Thanks
Click to expand...
Click to collapse
Well I do have it and run it, but atm I don't have the device in my possession. I lent it to a friend to use as they are waiting for a replacement so I'm using one of my other devices right now. If I get it back prior to hearin or seeing as reply here I will check it out tho.
will2live said:
Well I do have it and run it, but atm I don't have the device in my possession. I lent it to a friend to use as they are waiting for a replacement so I'm using one of my other devices right now. If I get it back prior to hearin or seeing as reply here I will check it out tho.
Click to expand...
Click to collapse
Thank you. I've been rom-whoring recently and have settled down with Fission . If I install tranquility, I'll test it myself as well. GL
Nope, not working - now I just have a bootloop. Thanks for the effort though - maybe someone else could have a go at it?
Your best bet is to take the original DX-Tranquility_3.0.zip and modify it then install it again. Since this ROM does not require a wipe.
I did have issues at first when I tried to extract the zip then make my changes, but this link helped me figure out how to do it through 7zip. Once you are in the correct location you can add your new images to the “drawable-hdpi” folder.
I have done this and added different battery icons, changed the notification bar and replaced the "Verizon Wireless" text.
FYI:
I added "stat_sys_battery_0.png" through "stat_sys_battery_100.png" in increments of 10 with 5 and 15 added but it is still reporting 20% increments.
L8
@ Sunblood: how did you install it?
tonm156 said:
Your best bet is to take the original DX-Tranquility_3.0.zip and modify it then install it again. Since this ROM does not require a wipe.
I did have issues at first when I tried to extract the zip then make my changes, but this link helped me figure out how to do it through 7zip. Once you are in the correct location you can add your new images to the “drawable-hdpi” folder.
I have done this and added different battery icons, changed the notification bar and replaced the "Verizon Wireless" text.
FYI:
I added "stat_sys_battery_0.png" through "stat_sys_battery_100.png" in increments of 10 with 5 and 15 added but it is still reporting 20% increments.
L8
Click to expand...
Click to collapse
I'll concur as that is the same thing I've done to make some changes to framework-res. Its actually pretty simple to do once you have the files you want to add, and know the location of where they need to be. Kinda just turns into a drag & drop and you are done.
As for the reporting of 20% increments like you mention. I asked P3 about it and it is a thing with the X and the way the software is done by Moto/VZW. He has yet to get it working to report in 10% increments even if you have the images there.
I have seen other ROMs report that have 10% increments working but my guess if they are once that are fully built from source which TranQ is not.
yawdapaah said:
@ Sunblood: how did you install it?
Click to expand...
Click to collapse
Pushed to /sdcard with adb, moved to /system/framework/framework-res.apk with adb shell. Rebooted.
As for the 10% increments, that's achieved by editing the .xml that tells the OS what images to use at what battery percentage. Replacing already-used images is easy, but the .xml is encrypted. You'll have to use APKTool to decrypt it. The difficulty comes from re-encrypting properly.
You don't have to build from source to get the 10% working. I've done it for NexTheme and Revo for ApeX.
The file I uploaded was created via the same process. Only problem is that i'm not using Tranquility and can't test it. Furthermore, the level of P3droids mods may cause any changes to the framework to bootloop. I'll try to test it when I get home.
http://androidforums.com/droid-x-all-things-root/210016-nextheme-10-circle-battery-mod.html
yawdapaah said:
You don't have to build from source to get the 10% working. I've done it for NexTheme and Revo for ApeX.
The file I uploaded was created via the same process. Only problem is that i'm not using Tranquility and can't test it. Furthermore, the level of P3droids mods may cause any changes to the framework to bootloop. I'll try to test it when I get home.
http://androidforums.com/droid-x-all-things-root/210016-nextheme-10-circle-battery-mod.html
Click to expand...
Click to collapse
first off that is good to hear seeing as I've been told otherwise by many different people. And seeing as I don't know enough in general to question them I don't.
That said if you are willing and had the time if you could PM me the info on what needs to be changed I'll try it out myself. Least of my concern is a bootloop or brick to be honest. I have anything and everythign I'd need to get it back running again no matter what happens as it is pretty much next to impossible to completely brick one of these devices as long as you don't mess up the actual bootloader which would not be an issue in this case.
will2live said:
first off that is good to hear seeing as I've been told otherwise by many different people. And seeing as I don't know enough in general to question them I don't.
That said if you are willing and had the time if you could PM me the info on what needs to be changed I'll try it out myself. Least of my concern is a bootloop or brick to be honest. I have anything and everythign I'd need to get it back running again no matter what happens as it is pretty much next to impossible to completely brick one of these devices as long as you don't mess up the actual bootloader which would not be an issue in this case.
Click to expand...
Click to collapse
Easy peasy. Long read but very simple process.
http://androidforums.com/droid-x-all-things-root/210021-how-10-battery-themed-framework-apks.html
yawdapaah said:
Easy peasy. Long read but very simple process.
http://androidforums.com/droid-x-all-things-root/210021-how-10-battery-themed-framework-apks.html
Click to expand...
Click to collapse
Thanks give me something to mess with over the weekend while watching some football seeing as my golf season has come to a close iwth it being so dam cold around here already.

[Q] request for battery mod

Hi all,
I'm looking for a battery mod (framework mod) for the actual JQ1 gingerbread rom (stock...not deodexed!, but I think it's the same after you delete the related .odex file) ...seems i'm not able to find one ... only thing I found is the blue theme with the battery mod too...but what I'm looking for is the only battery icon mod...stock icon with %battery inside.
Could somebody be kind enough to provide the right modded framework ? cause at the moment I need to use a battery widget icon but I really don't like the idea to use a widget to monitor battery status cause it drains battery even if it's a minimal consumption...but why use it if you can have the same if not better integrated one that is not going to suck any juice?
thanks a lot anticipately!
I'm going to offer a beer if somebody can help me!
triplex76 said:
Hi all,
I'm looking for a battery mod (framework mod) for the actual JQ1 gingerbread rom (stock...not deodexed!, but I think it's the same after you delete the related .odex file) ...seems i'm not able to find one ... only thing I found is the blue theme with the battery mod too...but what I'm looking for is the only battery icon mod...stock icon with %battery inside.
Could somebody be kind enough to provide the right modded framework ? cause at the moment I need to use a battery widget icon but I really don't like the idea to use a widget to monitor battery status cause it drains battery even if it's a minimal consumption...but why use it if you can have the same if not better integrated one that is not going to suck any juice?
thanks a lot anticipately!
I'm going to offer a beer if somebody can help me!
Click to expand...
Click to collapse
Try here:
http://uot.dakra.lt/kitchen/
afaik you cant theme non deodexed frameworks, i could be wrong tho
Nice one! I'll try one of those....
natious said:
afaik you cant theme non deodexed frameworks, i could be wrong tho
Click to expand...
Click to collapse
The kitchen supports non deodexed roms too now.at least thats what the front page says
It would be great if someone could make something like that kitchen, you know, just give it an app and it shows you a preview and you can make any change you need to, without looking for one color in lots of xmls and some other things.
nah, it works even with odexed... I've always used an odexed froyo rom with a custom framework!
Uhm...you can just use framework-res.apk from overcome firmware, he use stock jq1 for his work, yes it is deodexed but it should work, anyway a nandroid backup is worth before change it.
Sent from my GT-P1000 using XDA App
af974 said:
Uhm...you can just use framework-res.apk from overcome firmware, he use stock jq1 for his work, yes it is deodexed but it should work, anyway a nandroid backup is worth before change it.
Sent from my GT-P1000 using XDA App
Click to expand...
Click to collapse
it worked...i got the switch off crt tv anim too.
only copied and pasted over the original framework the oc one using root explorer and rebooted

Alter Cyanogen mod Settings

Hey everyone,
i have removed apps that i don't think i will ever use, E.G themes, and would like to alter the Cyanogen mod Settings to remove the entires that are no longer needed, as i have never done this before, i will most likely need to be helped step by step, or if you have a link to a guide already made that will be great
This is probably more involved that you would like to go.
That is part of "ROM" itself and can't be removed like a apk in system app.
Do you want to remove it from the source and compile it yourself? Think that is the way you have to go to accomplish what you want. Maybe it can be edited out in the ROM.zip prior to flash but I don't know
dam, i hoped it would be simple, i may have to re-compile it as you say, cause since i removed themes, it obliviously crashes if i accidentally hit the theme button in settings, i'll go looking to see if i can find something relating to that, thanks
kenpachizero said:
dam, i hoped it would be simple, i may have to re-compile it as you say, cause since i removed themes, it obliviously crashes if i accidentally hit the theme button in settings, i'll go looking to see if i can find something relating to that, thanks
Click to expand...
Click to collapse
Hi,
You can always just try a launcher that allows u to hide the apps u do not want to use....
And you can also disable some of those hidden apps under "manage applications" but be careful since some of the main apps are used by other system apps like gallery, email, etc. I just hide them and its like they do not exist.
This way if a force close happens due that app being disabled u can always reenable it so it fixed the force closures.
Or find a ROM that slim/minimal so u dont have worry about those apks in the first place.
Good luck
Vs Nexus S4G using tapatalk2
He is actually referring to the stuff in the settings menu.
So when he deletes the theme manager apk for example it also disappears from the settings.
At least that's what I think he is talking about.
albundy2010 said:
He is actually referring to the stuff in the settings menu.
So when he deletes the theme manager apk for example it also disappears from the settings.
At least that's what I think he is talking about.
Click to expand...
Click to collapse
After reading the post again..
I believe ur correct since it seemed to easy of a question to ask and answer.
But I just wonder why those settings are even a bother to the phone or its performance.
Vs Nexus S4G using tapatalk2
Minimalist approach. I can see how it can annoy somebody very easily.
Decompile and edit the smali files which is a huge pain in the ass or do it from source, those are generally your only 2 options. I did it for my GS2, it's much, MUCH, easier to do it from source. Understanding smali makes me want to rip my hair out. Stick to the source, haha trust me.
Try your luck. Here are some resources to help you out.
http://code.google.com/p/smali/w/list
http://pallergabor.uw.hu/androidblog/dalvik_opcodes.html
http://s.android.com/tech/dalvik/dalvik-bytecode.html
Look for something called dex2jar, it'll convert the classes.dex in an apk file to a jar which you'll be able to read/understand with jd-gui.

Categories

Resources