My battery is getting eaten!! - XPERIA X8 Q&A, Help & Troubleshooting

-sorry double posted and i dunno how to delete thread sorry!!

1 charge your battery to 100%
2 unplug the charger
3 restart phone go to CWM/XRec and do battery reset stats
4 get your phone to 0% battery
5 recharge it to 100%
6 when you have 15% start charging it ! (dont leave your battery to 0%)
this is the calibration process

kay got it! still sorry for double posted =(

For overclock, u will need root explorer or file manager capable of read/write system file.
Get x8oc.ko
Copy n paste to /system/lib/modules
Set permission to rw-rw-r--
Edit hw_config and add line "insmod /system/lib/modules/x8oc.ko"
Add line echo "xAB" > /proc/x8oc
Where ur AB is ur integer multiplies. See original post

Related

[HOWTO]: 1% steps on gingerbread

at first, it would be nice if any mod can modify the title to: [HOWTO] 1% battery mod on gingerbread and delete all following posts.
further i'm sorry for my poor english - hopefully everyone here can follow my steps!
the hard thing on changing battery icons on gingerbread is, that there are only 7 steps: 0, 10, 20, 40, 60, 80 and 100... that means you have to edit or replace two xml files (more later).
IMPORTANT: please make a backup of your rom! i'm not responsible if your device won't boot after modding! also it is possible that your google/facebook etc. accounts are deleted after flashing back your modded framework. but you can easily readd them again!
WHAT YOU NEED:
apk manager from here: http://www.multiupload.com/GXW01G6URJ
battery icons or a framework-res.apk with your desired icons
a rooted gingerbread rom
your original framework-res.apk (guide to extract later on)
WHAT YOU GET (IN ATTACHMENT):
stat_sys_xml_dateien.zip (stat_sys_battery.xml and stat_sys_battery_charge.xml with 100 steps)
framework-res.apk (modified by me with circlemod battery (i hope it's okay to use them in here! btw. many thx to devs (was it mdj?) for this icons). THIS FRAMEWORK WAS ONLY TESTED BY ME ON MDJ GINGERBREAD 2.2!!!
screenshot of the circle battery mod on gingerbread
FIRST STEPS:
extract apk manager to a a desired folder and conenct your phone to debug mode
start script.bat and change kompression level to 0 (type 19, afterwards 0)
type in 0 to download framework-res.apk from your phone. it asks for the path, type: /system/framework/framework-res.apk and hit enter
if asked for a name, type framework-res.apk and hit enter and confirm with Y to be your current project
type 9 and hit enter to decompile your framework and wait until it's finished
have a look in the folder "projects" - there will be a folder "framework-res.apk" now.
navigate to the subfolder: res/drawable-hdpi and delete ALL png files with the name stat_sys_battery_X.png and stat_sys_battery_charge_animX.png (while X stands for the according number). do this also with stat_sys_battery_unknown.png and stat_sys_battery_charge_animfull.png (IMPORTANT: delete last two ones only if you have a replacement icon or you will get errors on compiling!!!)
also delete following two xml files in subfolder projects/framework-res.apk/res/drawable: stat_sys_battery_charge.xml and stat_sys_battery.xml
now it gets tricky:
depending on the amount of your custom icons you have on charging, you may have to edit your stat_sys_battery_charge.xml file and delete or add the percentual steps! if you have 100 custom png's for charging animation, you can use the stat_sys_battery_charge.xml i attached (it also includes a stat_sys_battery.xml with 100 steps if you need)
now it's time to paste your modified/downloaded stat_sys_battery_charge.xml and stat_sys_battery.xml into subfolder /res/drawable/ (where you deleted the original of gingerbread before!)
go back to apk manager and type 11 to compile your framework
when it asks "is this a system apk?", type Y for yes. confirm again with Y and let apk manager create a new folder, called "keep". a list of files appears, and after that DON'T CONFIRM!!!
first you have to navigate into this "keep" folder and delete again exactly what you deleted above (stat_sys_battery_X.png, stat_sys_battery_charge_animX.png, stat_sys_battery_unknown.png, stat_sys_battery_charge_animfull.png, stat_sys_battery.xml, stat_sys_battery_charge.xml) and ADDITIONALLY the file resources.arsc
now you can confirm in apk manager to complete the compiling process. as far as i know, these steps with keep folders are needed to include the right id's automatically in public.xml! if any errors occur, feel free to post your log in this thread (see log by typing 21 in apk manager)
flash your new created framework-res.apk by entering 8.
if you didn't anything wrong, you should have your new % battery icons after reboot! as mentioned before, your desktop background maybe messed up and/or your accounts are deleted. you can solve this by just readd accounts and change background again.
Those ID's are hexadecimal numbers (dictated by the 0x prefix), and are sequential:
0 - 17302168
10 - 17302169
100 - 17302170
20 - 17302171
40 - 17302172
60 - 17302173
80 - 17302174
RJackson said:
Those ID's are hexadecimal numbers (dictated by the 0x prefix), and are sequential:
0 - 17302168
10 - 17302169
100 - 17302170
20 - 17302171
40 - 17302172
60 - 17302173
80 - 17302174
Click to expand...
Click to collapse
thx for your explanation! but i found out that it isn't necessary to edit public.xml. on decompiling, it adds automatically the missing lines when png's are listed in stat_sys_battery.xml...
finally i got it working if someone else wants the 1% increments, i can write a little tutorial.
Yea very interested. I can't stand the stock one. I knew how to do all the theming stuff on sd builds using the theme porters. Nand is different though. So please write that up, also will you post your battery mod for gingerbread
HOWTO added in 1st post!
fruchtfliege said:
HOWTO added in 1st post!
Click to expand...
Click to collapse
Thanks for the tutorial. Question though, is this for sd builds or for nand? Or does it not matter?
it is only for nand-builds. on sd-builds it should be similar, but afaik you don't have to adb the framework-res.apk. you should find here a lot of threads about modifying sd-build statusbars, because it is not that hard like on nand builds.
Cool, I'm using nand. Yea through sd builds thing stuff was easy. I couldn't change the compression in the emulator. How were you able to change it? Also is that framework at the bottom the one we use to achieve what the picture looks like?
Background changed and accounts gone as mentioned, but it worked perfectly - well worth it!
How did you change the compression when running the batch file?
Edit: Nevemind im retarded.
When i press the 9 to decompile it it gives me some B.S error Saying could not find C:\place-apk-here-for-modding.... The directory name is invalid. Could someone make this work on JDMS nand build?
Alos when i pull the framework res file from my phone it doesnt show up in "projects" Theres nothing in there. However it does show up in "place-apk-here-for-modding" folder..
Alos when i pull the framework res file from my phone it doesnt show up in "projects" Theres nothing in there. However it does show up in "place-apk-here-for-modding" folder..
Click to expand...
Click to collapse
the adb pulled apk files are stored in "place-apk-here-for-modding" folder, not in projects! a project in this folder will only be created after decompiling an apk!!!
Also is that framework at the bottom the one we use to achieve what the picture looks like?
Click to expand...
Click to collapse
you just get the statusbar at top (in fact only + battery icon). the bottom icons and background are custom with using launcher pro.
Can you think of a certain reason why i keep getting an error when i try to decompile it?
This is the error i get
--------------------------------------------------------------------------
|Wed 01/19/2011 -- 20:11:24.04|
--------------------------------------------------------------------------
'mode' is not recognized as an internal or external command,
operable program or batch file.
'java' is not recognized as an internal or external command,
operable program or batch file.
1631 KB/s (4121004 bytes in 2.466s)
Could Not Find C:\Users\Matt\Desktop\New folder\place-apk-here-for-modding\../pl
ace-apk-here-for-modding/signedframework-res.apk
Could Not Find C:\Users\Matt\Desktop\New folder\place-apk-here-for-modding\../pl
ace-apk-here-for-modding/unsignedframework-res.apk
'java' is not recognized as an internal or external command,
operable program or batch file.
Press any key to continue . . .
i think you have to install java sdk. without it, the compiling tools are not included, like on jde (i think it's called jde...)
but i'm going to make flashable zips of these files for clockwork mod. only problem is, that i don't know much about linux commands i couldn't get it working. i should start a new thread asking about this.
If you jump on irc you would get your answer in like 5secs. Room is #htc-linux-chat on freenode. Thanks for the suggestion about sdk. That does make sense now that I think about it;p
thank you for the hint. i will ask for help at chat tomorrow. i'm also working on different statusbar colours of gingerbread with original icons. before release i have to get this cwm zip flash thing working!
fruchtfliege said:
at first, it would be nice if any mod can modify the title to: [HOWTO] 1% battery mod on gingerbread and delete all following posts.
Click to expand...
Click to collapse
Just a heads-up mate - you obviously can't delete any posts, but you can change the title. Edit the first post and go into advanced mode to change it.
Good luck with your project
thank you! i have changed the title now.
Hey Fruit Fly, any progress on that cwm zip?
not really. i forgot my hd2 at home (i do theme works at work) and couldn't test the cwm zip files. on sunday evening i can test everything and tell you whats working and what not!
rafpigna from #htc-linux-chat gave me another choice of flashing easy with an adb script (thank you for that). but some users on german android forum told me it's not working. have to bugfix the files first
Yea let me know the outcome;p

Overclock Error?

hi al i tried to overclock my w8 tonight and when i downloaded the oc file from
http://forum.xda-developers.com/showthread.php?t=1020313
and paste it to system/lib/modules it says copy error file not found (read only system) what is this? any solution ?
you use root explorer? up you see a small rectangle button, with a r/o or r/w, click on it and try again.
sorry my bad english
ohoh okay ! downloaded root explorer now is fine ...wait i try if i can finish it!
i dont get what does this mean
-edit hw_config, add line insmod /system/lib/modules before battery fix command
lol
go to system/etc, find the file hw_config.sh, click on it until a box appears, click on open with text editor and put theline you said..next save and reboot or upload your hw_config file that i make for you lol..you use stock kernel right?
ya stock ..i use rename ...am i wrong?
rename?? rename what?? just make what i said in post above if you see a line: "#battery fix bla bla bla" put above this line
wait choose which option? view / execute ?
theres a rename option ..i used the rename just now and nothing happened
just put the file in system/lib/modules, reboot and use an app called setcpu or no-frills cpu to oveclock the device.the line you said already exists in hwconfig file if you use gingerDx
ARRR i still cant!! i click edit using text editor at the front i typed in
insmod /system/lib/modules/x8oc.ko # x8 overclock
rebooted
nothing happened! =(
look at my post above i edit
ohh...YEAAA DONE!! whats the point of
nsmod /system/lib/modules for?

[Q] How to run a script when booting is done?

What should I do to run a script when bootings done?
for example I want to run
echo 902400>sys/devices/system/cpu/cpu0/cpufreq/scaled_max_freq
everytime phone boots automatically(its just an example)
please explain simple .Im not professional
thanks
Add this at the start - #!/system/bin/sh
Then look in system/etc/init.d and look at the numbers in the file name.
Name your file a number between 01-99 that hasn't been used already. (01 been the first to run and 99 been the last to run) eg, 97maxfreq
then move it to system/etc/init.d and reboot

How do I remove volume to wake?

As thread goes..
I'm gonna install this hold for next song on volume so think I need to remove this. How do I remove it?:silly:
which kernel? either way, you'll need a root file explorer. Then go to /system/etc/init.d/ and there should be a file in there with the name 'vol' in it. Open file. The contents should be:
Code:
echo 1 > /sys/keyboard/vol_wakeup
chmod 444 /sys/keyboard/vol_wakeup
Just put a hash symbol at the beginning of both lines, save and reboot.
xdracco said:
which kernel? either way, you'll need a root file explorer. Then go to /system/etc/init.d/ and there should be a file in there with the name 'vol' in it. Open file. The contents should be:
Code:
echo 1 > /sys/keyboard/vol_wakeup
chmod 444 /sys/keyboard/vol_wakeup
Just put a hash symbol at the beginning of both lines, save and reboot.
Click to expand...
Click to collapse
teamseven2.1.5
Okay, # symbol in beginning of both sentences, got it! I'm trying with no space between # and sentence :silly:
just to play it safe, no spaces. but it really doesn't matter.
xdracco said:
just to play it safe, no spaces. but it really doesn't matter.
Click to expand...
Click to collapse
I found the vol and made the changes to the file with the root explorer app
even though I saved the file with the hash symbol with and without space infront of the lines it didn't work
the file is called 89volwake
hmmm
did you reboot? you need to reboot. if yes, then.....
.... with root explorer, change permissions to that file. you need to make it not-executable. just long hold file, and select permissions. untick the 3 boxes for 'execute'. reboot. this should work. last resort, delete the file, reboot.
xdracco said:
did you reboot? you need to reboot. if yes, then.....
.... with root explorer, change permissions to that file. you need to make it not-executable. just long hold file, and select permissions. untick the 3 boxes for 'execute'. reboot. this should work. last resort, delete the file, reboot.
Click to expand...
Click to collapse
Yes ofcourse.
Followed your other suggestions. Changing permissions unticking all excecutables, saving, then rebooting, after reboot the files permissions for excecutable were granted..creepy so I deleted it.. After reboot again after this the file was gone.. But the wake with volume started working again , what the hell is going on
I double checked, the file is gone in the init.d folder!
edit: Wait, it doesn't wake if I leave phone alone for a while, but if I wake it and then let screen go out then immediately press volume buttons it wakes.
hmm. interesting. well, let's see if volume wake is still enabled. connect to device via adb and do this:
Code:
cat /sys/keyboard/vol_wakeup
the file should either not exist or running that command will return a 0 or 1. 0 disable, 1 enabled.
xdracco said:
hmm. interesting. well, let's see if volume wake is still enabled. connect to device via adb and do this:
Code:
cat /sys/keyboard/vol_wakeup
the file should either not exist or running that command will return a 0 or 1. 0 disable, 1 enabled.
Click to expand...
Click to collapse
is it the same command in terminalemulator i've downloaded in phone?
maxxhtc said:
is it the same command in terminalemulator i've downloaded in phone?
Click to expand...
Click to collapse
yep yep. you can use terminal instead.
xdracco said:
yep yep. you can use terminal instead.
Click to expand...
Click to collapse
It's saying 0
Guess I'm all set then.. =)
Fast pressing vol buttons when playing music still wakes up phone while long pressing don't wake it up.
Strange I can't switch songs with tweakbox.. Thanks anyways for your help m8!
edit: Seems the settings were integrated in rom/kernel or something deeper since I could still activate screen with fastpress on volume buttons... Upgraded to 12.3 now so now it don't activate neither in slow or fast press on volume buttons.
Changing songs with toolbox in xposed still don't work though hmm.

[no root] unable to access Sys --> class ---> power supply ---> battery

I wanted to navigate to subjected file, to check battery stats, but it seems in pie access (even RO) is blocked. Is there a way to jump in to the txt file directly?
I remember i was able to access this file with non-rooted s8 and s9+ i think.
With a file manager go to root folder
Sys --> class ---> power supply ---> battery
Look for: fg_cycle (number of charge cycles) fg_fullcapnom
Click to expand...
Click to collapse
Access to the root folder always requires root access.
It sounds like you could install better battery stats to get these information you are looking for.

Categories

Resources