Welcome to XDA

Search to go directly to your device's forum

Register an account

Unlock full posting privileges

Ask a question

No registration required
Post Reply

[MOD][ICS][9'Jun] * Battery Mod Tool * ALL CM9/Samsung ROMs *

OP shayne77

25th April 2012, 12:55 PM   |  #951  
semdoc's Avatar
Senior Member
Flag Istanbul
Thanks Meter: 2,034
 
2,496 posts
Join Date:Joined: Mar 2011
Donate to Me
More
Quote:
Originally Posted by claude96

@semdoc maybe I know why, about making a java path ( sorry I was very busy ), but here goes : in windows (64bit) go to control panel, system at the top right press Advanced system settings, a window will pop out, in that window press Environment Variables, another window will pop out, now in that window in System variables , look for Path and press on it once, then press the edit button, at the end of Variable value, copy&paste this : ;C:\Program Files\Java\jdk1.7.0_03\bin\java.exe ( PS : first change jdk1.7.0_03 to the java version on your PC, just go to : C:\Program Files\Java\ , also C: should be changed to where you OS is installed ), check the pics, hope this helps.

Thank you for your help claude96, All stated settings are DONE.

Same Error
25th April 2012, 03:12 PM   |  #952  
Senior Member
Flag Bekasi
Thanks Meter: 9
 
119 posts
Join Date:Joined: Sep 2011
More
Quote:
Originally Posted by shayne77

It means SystemUI can't be decompiled using conventional methods anyway.
Attach your SystemUI and I'll have a look.

sent from my XOOM using XDA Premium HD

here you go, thanks for your help
Attached Files
File Type: apk SystemUI.apk - [Click for QR Code] (1.27 MB, 3 views)
25th April 2012, 03:25 PM   |  #953  
claude96's Avatar
Senior Member
Thanks Meter: 1,860
 
1,186 posts
Join Date:Joined: Mar 2010
Quote:
Originally Posted by semdoc

Thank you for your help claude96, All stated settings are DONE.

Same Error

ok, then do the same steps, and copy/paste this ( without the quotes ) at the end of Path ( ;C:Program Files (x86)\Android\android-sdk\platform-tools\ ) , press OK to all, reboot , pu the battery tool file in your username folder, and try it, hope this helps.
PS : you have installed android sdk !, right ?
The Following User Says Thank You to claude96 For This Useful Post: [ View ]
25th April 2012, 03:31 PM   |  #954  
semdoc's Avatar
Senior Member
Flag Istanbul
Thanks Meter: 2,034
 
2,496 posts
Join Date:Joined: Mar 2011
Donate to Me
More
Quote:
Originally Posted by claude96

ok, then do the same steps, and copy/paste this ( without the quotes ) at the end of Path ( ;C:Program Files (x86)\Android\android-sdk\platform-tools\ ) , press OK to all, reboot , pu the battery tool file in your username folder, and try it, hope this helps.
PS : you have installed android sdk !, right ?

:P....

Please don't shoot me ... Nope, but it doesn't said that I have to... Ok... Will install nd will try again.... Sorry!

Sent from my TF201 using XDA Pre HD app
25th April 2012, 04:12 PM   |  #955  
claude96's Avatar
Senior Member
Thanks Meter: 1,860
 
1,186 posts
Join Date:Joined: Mar 2010
Quote:
Originally Posted by semdoc

:P....

Please don't shoot me ... Nope, but it doesn't said that I have to... Ok... Will install nd will try again.... Sorry!

Sent from my TF201 using XDA Pre HD app

No problem, just remove the sdk tools path b4 you install the sdk, then download the sdk tools, then re-ad the path reboot & good luck.
PS: b4 that, just move the batt_tool to your user folder, and try it, also right click the bat file & run as admin, see if this works.
PPS : did you change the java version to the one on your PC !
Last edited by claude96; 25th April 2012 at 04:16 PM.
25th April 2012, 05:42 PM   |  #956  
cielik's Avatar
Senior Member
Flag Minsk Maz.
Thanks Meter: 20
 
105 posts
Join Date:Joined: Oct 2010
More
Thumbs up
Mod works great, thanks for the post
26th April 2012, 01:39 AM   |  #957  
OP Senior Member
Flag Gold Coast
Thanks Meter: 711
 
1,716 posts
Join Date:Joined: Apr 2011
Donate to Me
More
Quote:
Originally Posted by dixit

I think there is a bug in this. I dont think its a bug in your script but more maybe an issue with 7za.exe -u command that is being run.

I noticed in the output folder that the SystemUI.apk is not fully updating all the battery images. So I extracted that newly built apk with 7zip. Then looked at the drawable-hdpi folder and noticed all the original icons are still there like "stat_sys_battery_15.png" but the other ones were added. So it seems like it added all 204 PNGs but failed to overwrite the existing ones.

I see in your batch file you are calling this cmd to update the PNGs:

7za.exe u SystemUI.zip res\drawable-hdpi\*.png > nul

Now if I manually run that by say calling:
7za.exe u SystemUI.zip res\drawable-hdpi\stat_sys_battery_15.png > nul
It still doesnt update that _15.png. So for some reason the cmd line "-u" is not actually overwriting existing files. If you use the filemanager gui portion of 7zip then it works fine.

So.... you might want to look into that for folks that might be using the APK directly instead of using the flashable zip. I couldnt find any particular switch to force the overwrite.

Dixit

Quote:
Originally Posted by GeyerA

Hello shayne77, I can't stop looking at my circle and noticed today that it went back to the "stock" CM battery. So I re-copied (overwrote) the file SystemsUI.apk in the app folder and circle returned. Later, while browsing and using internet connection (IM), I saw again the CM stock battery coming back. I ignored it, and out of the blue, the circle returned. Is there some other place the system gets the battery pic from? Is there any mistake I could have made? Should I wike Dalvik and flash the .zip...? I will try on my Thunderbolt and Nexus One tonight (on CM beta:)

I checked this out and it seems fine on my system. [See screenshot attached]
For some reason, I reckon the APK is being set to read-only while I import the images on your systems. Try right-clicking the Battery Mod folder and unchecking read-only (apply to sub-directories as well) and see how you go.

EDIT: If you look at files 15 and 28 in the screenshot, you will see they've been updated. Also, check my directory is the same as well.
Attached Thumbnails
Click image for larger version

Name:	Battery_mod_Check.jpg
Views:	128
Size:	250.1 KB
ID:	1025006  
Last edited by shayne77; 26th April 2012 at 01:41 AM.
26th April 2012, 02:34 AM   |  #958  
dixit's Avatar
Senior Member
Flag ATL
Thanks Meter: 64
 
219 posts
Join Date:Joined: Apr 2006
More
Quote:
Originally Posted by shayne77

I checked this out and it seems fine on my system. [See screenshot attached]
For some reason, I reckon the APK is being set to read-only while I import the images on your systems. Try right-clicking the Battery Mod folder and unchecking read-only (apply to sub-directories as well) and see how you go.

EDIT: If you look at files 15 and 28 in the screenshot, you will see they've been updated. Also, check my directory is the same as well.

For sure yours works as your screenshot proves that. I checked my readonly and made sure its off, tried it again, still the stock files like 15, 28, 43, etc are still not being updated.

Also just went to Command Prompt as Admin then manually called your BAT file and it ran fine as Admin thinking maybe its permissions, but it still created an APK without the original stock ones updated like 15, 28, 43, etc.

What I cant get is why when you actually manually run the 7zip command manually from the command line using the -u it still doesnt update it, acts like the command ran fine, but inside it didnt update the file at all.

Now its going to bug me to find out why on my system it dont work when on yours it does. Time to do more digging, try another system if i can and maybe then try to find out why this fails to update the stock images that exist.

Dixit

---------- Post added at 08:34 PM ---------- Previous post was at 08:17 PM ----------

Alright well I think I narrowed it down some more. I used a different Framework-res.apk and SystemUI.apk and it worked fine, one from a different rom (actually from a GB rom). Original one I kept trying was from an ICS based Rom.

So then tried a different ICS's ROM set of Framework-res.apk and SystemUI.apk. Still failed on the same 15, 28, 43, etc stock files not being over written.

So then tried a 3rd different ICS ROM using its Framework-res.apk and SystemUI.apk and what you know, it flipping WORKED! So not sure what these other two have done in the SystemUI.apk but clearly the 7zip cmd line using -u cant seem to overwrite the existing stock images and leaves them in place but just adds all the other new ones.

Dixit
Last edited by dixit; 26th April 2012 at 02:21 AM. Reason: more info
26th April 2012, 02:37 AM   |  #959  
OP Senior Member
Flag Gold Coast
Thanks Meter: 711
 
1,716 posts
Join Date:Joined: Apr 2011
Donate to Me
More
Quote:
Originally Posted by dixit

For sure yours works as your screenshot proves that. I checked my readonly and made sure its off, tried it again, still the stock files like 15, 28, 43, etc are still not being updated.

Also just went to Command Prompt as Admin then manually called your BAT file and it ran fine as Admin thinking maybe its permissions, but it still created an APK without the original stock ones updated like 15, 28, 43, etc.

What I cant get is why when you actually manually run the 7zip command manually from the command line using the -u it still doesnt update it, acts like the command ran fine, but inside it didnt update the file at all.

Now its going to bug me to find out why on my system it dont work when on yours it does. Time to do more digging, try another system if i can and maybe then try to find out why this fails to update the stock images that exist.

Dixit

---------- Post added at 08:34 PM ---------- Previous post was at 08:17 PM ----------

Alright well I think I narrowed it down some more. I used a different Framework-res.apk and SystemUI.apk and it worked fine, one from a different rom (actually from a GB rom). Original one I kept trying was from an ICS based Rom.

So then tried a different ICS's ROM set of Framework-res.apk and SystemUI.apk. Still failed on the same 15, 28, 43, etc stock files not being over written.

So then tried a 3rd different ICS ROM using its Framework-res.apk and SystemUI.apk and what you know, it flipping WORKED! So not sure what these other two have done in the SystemUI.apk but clearly the 7zip cmd line using -u cant seem to overwrite the existing stock images and leaves them in place but just adds all the other new ones.

Dixit

Ah. It's gotta be how they're creating (or modding) those APKs then. They must be compressed differently and/or the files inside the ZIP have different attributes.
26th April 2012, 02:50 AM   |  #960  
dixit's Avatar
Senior Member
Flag ATL
Thanks Meter: 64
 
219 posts
Join Date:Joined: Apr 2006
More
Quote:
Originally Posted by shayne77

Ah. It's gotta be how they're creating (or modding) those APKs then. They must be compressed differently and/or the files inside the ZIP have different attributes.

If it helps any, I think/wonder it might have to do with actually the "Host OS" and Version. Notice in the screenshot I highlighted the stock file that didnt get updated, you notice how its HostOS is Unix and Version number is higher (20) then the ones you added which are 10. I wonder if the cmd lind 7zip -u command wont update it if the version is lower then whats going in or if it fails cause the HostOS is wrong. Thats something that caught my eye on why two of the ROM set files I used failed, but the 3rd one worked, that 3rd one, all stock files are in the APK itself are FAT on HostOS and 10 on Version.

Dixit
Attached Thumbnails
Click image for larger version

Name:	PossibleReason.JPG
Views:	112
Size:	123.2 KB
ID:	1025051  

Post Reply Subscribe to Thread
Previous Thread Next Thread
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes