Welcome to the Android Central Forums Create Your Account or Ask a Question Answers in 5 minutes - no registration required!
Page 1 of 2 12 LastLast
Results 1 to 25 of 32
  1. Thread Author  Thread Author    #1  
    Chris3D's Avatar

    Posts
    647 Posts
    Global Posts
    646 Global Posts

    Default [Experimental] Battery-Mod-Automator [Updated]

    [Update] I've started to test this on themes, and some are causing problems. When decompiling theme frameworks, I'm finding some have missing images, others have corrupt images that can't be extracted or opened, some have out-of-range resource ID's that were manually added in, etc. It's a bit of a mess.

    I added in a prompt at the end of my program asking if you want to proceed to push the new framework back to your phone. If along the way, you saw a big list of errors scroll up the screen, choose no. If everything looked clean, go ahead and choose yes.

    I'm going to leave my program up because it seems to work perfectly on stock and properly assembled frameworks, but not so much on ones that have been hacked to hell and back. As I have time, I'll try to figure out how to work around the issues giving it trouble.



    Ok, if any brave souls want to play Guinea Pig, here's what I've come up with...

    The problem: With the plethora of different roms and themes, each with their own features, each being updated constantly, it's impossible to provide individual frameworks with my battery mod for each possible combination. Well, technically, it's not impossible, but I do have a life!

    The solution: A simple program that will automate adding my icons to your current framework, whatever it may be. Whatever rom and/or theme you have, this will pull your current framework-res.apk file off your phone, decompile it, add my icons, recompile it and push it back to your phone. Since this is applied on top of your current framework, it should avoid conflicts where some things get reverted back to stock.

    The issues: On some roms, I've noticed the wallpaper gets reverted to that beach scene, and sometimes the current Google account is lost. In both cases, it's pretty simple to reset your wallpaper and re-add your Google account. Not sure why these things happen, but again, they're easy to fix.

    So far, I've tested this on stock EB01, EB01 SuperClean versions 2.2, 2.3 and 2.4 and Blackhole 4.1... and it works perfectly with the exception of the above issues. Shutdown menus don't break, everything seems to work. Will it work on other roms and/or with other themes? It should, but you'll just have to give it a try.

    Is this dangerous? Of course it is! Not really, the first thing this does is make a backup of your existing framework-res.apk that can be restored should it ultimately not work. If it doesn't work, just run the program again, choose the option for restoring your framework and it'll send the backup back to your phone. That said, I would still highly recommend having a full nandroid backup at the ready.

    What do I need? Since this is a DOS bat program, you'll obviously need to be running Windows. XP, Vista, Win7, it shouldn't matter. And since some of the tools the bat file calls are Java programs, you'll need the Java Runtime Environment which you can download here. (You only need the Runtime Environment (JRE), not the full JDK). To check if you might already have Java, just open up a command prompt and type "java". If you get a screen of usage details, chances are you're good to go. You'll also need the Samsung drivers loaded up and working, but you probably already have them.

    The bonus: If you don't like my icons, just replace them with your own, re-run the program and it'll add them to your framework. Just put your icons in /modfiles/png and make sure they're properly referenced in the xml files located in /modfiles/xml. If you just replace all of my icons with your own, you won't need to touch the xml files, but if you want to change the animations, the xml files will need to be updated accordingly. Just take a look at what's there, it should be fairly obvious how these xml's work.

    So how does it work? Unzip the attached file (make sure directory structure remains intact) and run ModMyBattery.bat. Make sure your phone is rebooted into Clockwork Recovery and that your /system is mounted. To check, go into "mounts and storage" and make sure the first option reads "unmount /system" (indicating that it's currently mounted). The menu in my program should be self explanatory.

    So, cross your fingers and give it a whirl. Again, it seems to work on the roms I've used it on, but there's no guarantees something in some other rom or theme might cause problems. I've had to make certain assumptions about the configuration of the framework and while I think I covered the bases, I have no way of knowing until it's tested more broadly. If it doesn't work, let me know what rom and theme you're using and I'll see if I can update the program to work with them.

    So again, this is highly experimental and I'll honestly be amazed if it works without a hitch on a majority of roms, but it's worth a shot. Also, while I haven't tried it on other versions beside EB01, I don't see why it would have any problems with DL30 or even older versions. Keep in mind, however, something was broken in pre-FroYo that prevented the display of charging icons in 1% increments.

    And just to say it again, a current, full nandroid backup is highly recommended! If it doesn't work, restore your backup (either your backup framework with this program or your full nandroid backup), try to let me know where it went wrong, but I make no guarantees I'll be able to get it to work in all cases.

    Did I mention this was highly experimental? No? Well it is!

    Here's the program:
    BatteryModder
  2. #2  

    Default

    Going to try this for sure!...later today when I wake up. will let you know. It will be on 2.4 SC voodoo. Excited!

    Sent from my SCH-I500 using Tapatalk
  3. #3  
    tnez21's Avatar

    Posts
    286 Posts
    Carrier
    "EC01" ~ Jt's EC10 Voodoo

    Default

    Hell yeah!! Can't wait to test this later today

    Sent from my SCH-I500 using Tapatalk
  4. #4  

    Default

    Welp I tried it out on my Voodoo 2.4 SC. It went through all that script then restarted my phone into a loop of the galaxy S logo loading over and over. I am doing a nandoid restore right now. Anything else i can try for you on this?

    ** Also does voodoo need to be on or off?
  5. Thread Author  Thread Author    #5  
    Chris3D's Avatar

    Posts
    647 Posts
    Global Posts
    646 Global Posts

    Default

    Quote Originally Posted by clifto View Post
    Welp I tried it out on my Voodoo 2.4 SC. It went through all that script then restarted my phone into a loop of the galaxy S logo loading over and over. I am doing a nandoid restore right now. Anything else i can try for you on this?

    ** Also does voodoo need to be on or off?
    Off to a rough start!

    Did you have a theme applied?

    Voodoo on/off shouldn't matter.

    After it's run, I've noticed it takes a while for the phone to boot up for the first time. I tried it on a fresh SuperClean 2.4 and it worked fine...
  6. #6  

    Default

    No theme just 2.4 SC. Voodoo was on. I really wish i could have copy/pasted you the info that was showing on the script. After it was done it all went away and showed the start of the script again. Said something about java not initiating or something. Ill do it again here in a bit and give you better details. Although after the "java" message it seemed to pick up and load everything. But again ill give you better details soon. Thanks
  7. #7  

    Default

    This is what i get. Afterwards it goes to Samsung logo then in a normal amount of time starts the "S" logo but gives the vibrations for force close and loops the boot. Took out battery and am going to try a wipe data/cach reload 2.4 SC fresh and try again.
  8. Thread Author  Thread Author    #8  
    Chris3D's Avatar

    Posts
    647 Posts
    Global Posts
    646 Global Posts

    Default

    Quote Originally Posted by clifto View Post
    This is what i get. Afterwards it goes to Samsung logo then in a normal amount of time starts the "S" logo but gives the vibrations for force close and loops the boot. Took out battery and am going to try a wipe data/cach reload 2.4 SC fresh and try again.
    Ahhh, it doesn't appear you have the Java Runtime Environment installed. Download it here: Java SE Downloads

    What was happening is that the tools to decompile and recompile the framework weren't working (because they're Java apps and the JRE to run them wasn't installed on your computer).

    You should be able to re-run my program and choose the option to restore your framework.
  9. #9  

    Default

    Quote Originally Posted by Chris3D View Post
    Ahhh, it doesn't appear you have the Java Runtime Environment installed. Download it here: Java SE Downloads

    What was happening is that the tools to decompile and recompile the framework weren't working (because they're Java apps and the JRE to run them wasn't installed on your computer).

    You should be able to re-run my program and choose the option to restore your framework.
    Indeed i did not. I installed JRE and then went to a nandroid restore...in the process of fidiling with all this I must of click nandroid back and backed up a fresh copy of one of the Super Cleans.. Thank god for TI back-ups!! Anyways from a fresh install i tried the batt mod and it worked great! Now we know that JRE is a pre-req for this to function. Great work!
    Chris3D likes this.
  10. #10  
    tnez21's Avatar

    Posts
    286 Posts
    Carrier
    "EC01" ~ Jt's EC10 Voodoo

    Default

    finally at home and about to give this a try, thanks again Chris
  11. Thread Author  Thread Author    #11  
    Chris3D's Avatar

    Posts
    647 Posts
    Global Posts
    646 Global Posts

    Default

    Quote Originally Posted by tnez21 View Post
    finally at home and about to give this a try, thanks again Chris
    Make sure you download the latest version (same link) and follow the recommendation to not push the modified framework to your phone if you see a string of errors scroll up the screen while it's uploading.

    I've been testing theme after theme and it seems to be having trouble with most, unfortunately. When I examine a theme's framework-res.apk, most of them are really hacked together pretty badly, which makes adding in this battery mod in an automated fashion difficult to impossible.

    It still works on stock and properly assembled frameworks (like the ones that come with ROMs like SuperClean and BlackHole), but applying this over a hacked theme isn't working. I had hoped this would be possible, but it's not looking good.

    Just please make sure you have a backup ready...
  12. #12  
    tnez21's Avatar

    Posts
    286 Posts
    Carrier
    "EC01" ~ Jt's EC10 Voodoo

    Default

    Thanks for the pointers Chris. Not expecting any issues tho (fingers crossed lol) Not running any themes just add-ons, all that are also in Sc 2.4 Actually i yanked them from from 2.4 lol ( android policy, framework, and framework-res)

    Sent from my SCH-I500 using Tapatalk
  13. #13  
    tnez21's Avatar

    Posts
    286 Posts
    Carrier
    "EC01" ~ Jt's EC10 Voodoo

    Default

    SUCCESS!!! Hell yeah! Worked on the 1st try, thanks for the hard work Chris!
    Chris3D likes this.
  14. #14  
    Brettdacosta's Avatar

    Posts
    325 Posts
    Carrier
    CM 7.1.0 / Glitch

    Default

    I have VA clean green flashed, but I'm wanting to try this. Did the nandroid, but when I got to run the program it says can't find the drive - make sure you're mounted (which I did) and have the drivers installed. What drivers is it talking about (I've had in connected to a computer numerous times already). Thanks in advance. I'd really like to run this! One of my most favorite add-ons! Great work!
  15. #15  
    tnez21's Avatar

    Posts
    286 Posts
    Carrier
    "EC01" ~ Jt's EC10 Voodoo

    Default

    The samsung drivers, the same ones used for enabling odin flashing

    Sent from my SCH-I500 using Tapatalk
    Brettdacosta likes this.
  16. #16  
    tnez21's Avatar

    Posts
    286 Posts
    Carrier
    "EC01" ~ Jt's EC10 Voodoo

    Default

    You can download them from droidxcon's sticky

    Sent from my SCH-I500 using Tapatalk
  17. #17  
    Brettdacosta's Avatar

    Posts
    325 Posts
    Carrier
    CM 7.1.0 / Glitch

    Default

    What does this do when applied over a theme?
  18. #18  
    gunnermike53's Avatar

    Posts
    3,199 Posts
    Carrier
    Gummy, AOKP

    Default

    Quote Originally Posted by Brettdacosta View Post
    What does this do when applied over a theme?
    this included in themes now. so dont flash it. well i guess you can, but its already there.
  19. #19  
    Brettdacosta's Avatar

    Posts
    325 Posts
    Carrier
    CM 7.1.0 / Glitch

    Default

    Mike - I'm not sure what you mean. I'm running 2.9.1 with VA Green over it. I don't have a % with my charging icon. I'd really like that. Not sure if there's a way I could get it to work? Thanks, man.
  20. Thread Author  Thread Author    #20  
    Chris3D's Avatar

    Posts
    647 Posts
    Global Posts
    646 Global Posts

    Default

    The idea of this was to be able to add battery percent to an existing theme, but it hasn't worked out. Almost every theme I tried it on failed, because almost every theme is hacked pretty badly - the frameworks work fine, but can't be decompiled without all kinds of errors, missing and/or broken files. So, this little program can't automate the adding of the accurate battery mod. I left it up because it will work with properly assembled framework like the ones that come with the stock SuperClean and Black Hole roms.
  21. #21  
    Brettdacosta's Avatar

    Posts
    325 Posts
    Carrier
    CM 7.1.0 / Glitch

    Default

    So I'm out of luck? If the theme doesn't have charging percentage, I won't be able to get it? And thanks for the answer, Chris.
  22. Thread Author  Thread Author    #22  
    Chris3D's Avatar

    Posts
    647 Posts
    Global Posts
    646 Global Posts

    Default

    Quote Originally Posted by Brettdacosta View Post
    So I'm out of luck? If the theme doesn't have charging percentage, I won't be able to get it? And thanks for the answer, Chris.
    You could give this thing a try, but make sure you make a backup before you do. It should work fine if the theme's framework was properly assembled, and if your theme doesn't have an accurate battery mod, maybe it's not too hacked together.

    In the mean time, I'll check out your theme and see if the framework will manually decompile cleanly.


    Edit:

    Just checked out the framework-res.apk from your theme, and I'm sorry to tell you, it won't decompile and recompile cleanly so you're kinda out of luck.

    I'm not sure why pretty much all themes are broken like this - there's usually a few dozen images that are incorrectly added as 9 patch files even though they don't contain any 9 patch information (which is just sloppy work), and there's a bunch of undefined resources which I assume result from the theme author manually adding in resource ID's as opposed to using the proper tools (apktool) which generates proper ID's automatically.
  23. #23  
    Brettdacosta's Avatar

    Posts
    325 Posts
    Carrier
    CM 7.1.0 / Glitch

    Default

    Wow, Chris. Thanks for the effort. I appreciate the research and response you just provided. I hope you have a great evening, and I'll just keep an eye out for alternate solutions.
  24. Thread Author  Thread Author    #24  
    Chris3D's Avatar

    Posts
    647 Posts
    Global Posts
    646 Global Posts

    Default

    Quote Originally Posted by Brettdacosta View Post
    Wow, Chris. Thanks for the effort. I appreciate the research and response you just provided.
    No problem. I looked at the battery icons from your theme's framework, and it looks like it does have 100 individual images for the battery, but the there are only 10 or so different images. For example, there's 10 separate images from 90% to 100%, but they're all the same image just named ***90.png, ***91.png, ***92.png, etc. Same with 80%, 70%, 60% and so on - each has the same image... saved 10 times.

    Anyway, what that means is that you should be able to simply replace those images with 100 individual and unique images, which I've done. Since we're not adding in any new images, there shouldn't be a problem with resource ID's.

    So, give this a try. Make sure you have a CWM backup in case this doesn't work, and then flash this with Clockwork. It's your theme's framework with just my icons added, and it's only the discharging icons. There wasn't 100 images defied for charging, so I couldn't do anything with them. Hopefully this will be better than nothing...

    temp_framework.zip

    Hopefully it'll work, but if it doesn't, just restore your backup.
  25. #25  
    Brettdacosta's Avatar

    Posts
    325 Posts
    Carrier
    CM 7.1.0 / Glitch

    Default

    I'll try to get to this tomorrow. Thanks again, man!

    EDIT: I just re-read everything, and I have 1% increments of usage battery, but not of charging, but it was said that I could do anything about the charging part (which is the only part I'm concerned with), so I won't be able to do anything about my situation. Thanks again for the help, man.
Page 1 of 2 12 LastLast

Posting Permissions