PPCGeeks

PPCGeeks (http://forum.ppcgeeks.com/)
-   Android On TP2 Development (http://forum.ppcgeeks.com/android-tp2-development/)
-   -   [TESTING] SCBS: Improved battery meter system (http://forum.ppcgeeks.com/android-tp2-development/142555-testing-scbs-improved-battery-meter-system.html)

jonpry 04-06-2011 04:06 PM

[TESTING] SCBS: Improved battery meter system
 
Intro:

Hopefully this stuff will fix your battery woes once and for all. You will need to download and install 4 files. Kernel, modules, rootfs, and an APK. The kernel is an up to date Wistilt2 esque contraption that should support camera and all the latest goodies but no bluetooth support as that seems to interact badly with this setup.

Edit: Now that Wistilt2's kernel pack includes SCBS support you can choose to use his kernel pack. In that case only download the rootfs and BABS.apk. You do not need the kernel or modules.

Instructions:

1. Download the 4 files from the links at the bottom on this post.
2. Copy zImage, modules******.tar.gz, and rootfs.img to the andboot folder of your sd card.
3. Edit STARTUP.TXT and make sure pm.sleep_mode=1 is in there.
4. Boot android
5. Use whatever method you like to install BABS.apk. I use "adb install BABS.apk" from the command line.
6. While should notice improvements right away, SCBS will need to generate a model of your particular battery for maximum correctness. Charge your phone all the way up, and then discharge it to at least 20% with a mixture of sleep and heavy use. Then charge it up again. The more varied use and charge your log has, over a wider range of charge, the better the model will turn out.

Edit: I believe that you will need many hours of sleep, not necessarily all at once for it to work right. Say 8 for now.

7. Open up the Ba Tree App, go to analyze logs. Select the file that represents your charge/discharge data from step 6. If you have not rebooted, this will simply be SCBS.log.
8. Select analyze now. This will use lots of power so have it plugged in, and it won't process while sleeping, so either wake it up periodically until its done, or set the timer. When the process is completed it will show you the model on the screen and ask if you would like to use it.

This is an example from my phone:

cc=0.278898
cb=145.042435
rc=0.663357
re=0.150437
vf=1.098000
cf=0.312500
lr=0.000001
sl=36.714553
se=0.007000

Make sure that your numbers are sort of like this. If they are not, please post your result and log file used to generate it. The result is found in /sdcard/scbs.conf.temp.

If you like the model, then hit yes and enjoy your new meter.

Comments:

There are a couple of constants we are using that just don't appear the same on different models of TP2. Some adjustment of those may be necessary as data is gathered.

Credits:

Jonpry for lots of stuff. Wistilt2 for writing some early kernel mode drivers and doing lots of testing and log generating. Arrrghhh and rpierce99 for testing and log data.

Links:

http://www.prymfg.com/kernel/zImage
http://www.prymfg.com/kernel/modules...3-dirty.tar.gz
http://www.prymfg.com/kernel/rootfs.img
http://www.prymfg.com/kernel/BABS.apk

arrrghhh 04-06-2011 04:08 PM

Re: [TESTING] SCBS: Improved battery meter system
 
I was hopin this would make it to the outside world soon!

Great job ;).

ndno 04-06-2011 04:30 PM

Re: [TESTING] SCBS: Improved battery meter system
 
Thanks!!! Was waiting something like this for a long time. Wow, too many things to test at once. ;)

r^7z 04-06-2011 04:41 PM

Re: [TESTING] SCBS: Improved battery meter system
 
Would this only apply to/work with the TP2 or should this also work with the TP?

steveholtam 04-06-2011 04:48 PM

Re: [TESTING] SCBS: Improved battery meter system
 
Awesome work guys. I'll share my results in a few days!

jonpry 04-06-2011 04:48 PM

Re: [TESTING] SCBS: Improved battery meter system
 
It probably can work, but there are at least 2 numbers that have to be calculated for each device. The process for that is pretty straightforward. There is one person trying to get it to work on Topaz right now, and there are some difficulties getting measurements in a suitable format.

I can get you the instructions, but if it doesn't work the first try it probably will involve getting help from one of the kernel devs with a raph.

ndno 04-06-2011 04:56 PM

Re: [TESTING] SCBS: Improved battery meter system
 
jonpry, I use a couple batteries so I assume the "model" is learning about a specific battery, correct? So it won't be the same for the two batteries, correct? I'll just use my "newer" battery.

jonpry 04-06-2011 04:58 PM

Re: [TESTING] SCBS: Improved battery meter system
 
That's correct ndno. Eventually I want to try and identify the battery that is installed, so you can have a model for each of them.

r^7z 04-06-2011 05:01 PM

Re: [TESTING] SCBS: Improved battery meter system
 
+1 on fav thread :cool:
Will check it out and post back if additional instruction is needed

ndno 04-07-2011 03:23 PM

Jonpry, how many charge/discharge cycles do you recommend to get an accurate model? I'm on my 3rd cycle now since using your files. Should this be run at stock speed or does it not matter? Thanks!

Sent from my FRX06-ized TP2 using Tapatalk


All times are GMT -4. The time now is 12:40 AM.

Powered by vBulletin® ©2000 - 2019, Jelsoft Enterprises Ltd.
©2012 - PPCGeeks.com


Content Relevant URLs by vBSEO 3.6.0