PPCGeeks

PPCGeeks (http://forum.ppcgeeks.com/index.php)
-   Android On TP2 Development (http://forum.ppcgeeks.com/forumdisplay.php?f=319)
-   -   [TESTING] SCBS: Improved battery meter system (http://forum.ppcgeeks.com/showthread.php?t=142555)

wateverweber 04-24-2011 01:52 AM

Re: [TESTING] SCBS: Improved battery meter system
 
Quote:

Originally Posted by jonpry (Post 2082241)
Ndno,

Edit /sdcard/scbs.conf and change Vf to 1.103. Then either reboot the phone or "killall -HUP scbs" What model are you running, ie RHOD100 etc?

Hello, I just switched to wisTilt2's SCBS kernals and am using your roofts and BABs apk. however i am only getting my phone to charge to 99% at most. I found your fix as shown above, however when i went into my sd card i did not have a scbs.conf file, only the logs. I went into Ba Tree app and under SCBS Version is said Warning:Failed to open config file /sdcard/scbs.conf 0.04a

Did i do something incorrectly? or is there a fix to this

I am using a RHOD400 on BLAZN 2.2.2

Thanks

toadlife 04-25-2011 02:14 AM

Re: [TESTING] SCBS: Improved battery meter system
 
I solved my problem of scbs blowing up logcat by starting scbs as a service...

I created a shell script called scbs.sh and placed it in /bin

Code:

#!/bin/sh   
scbsargs=`cat /sdcard/scbsargs.conf`
if [ ! "$scbsargs" == "" ] ; then
    if [ ! -f /dev/scbs0 ] ; then
        dev=$(cat /sys/class/scbs/0/dev | sed -e "s/:/ /g")
        mknod /dev/scbs0 c $dev       
    fi
    scbs $scbsargs
fi

I created a file called scbsargs.conf and placed it in the root of my sdcard...

Code:

-d -co /sdcard/scbs.conf -lf /dev/null
And finally, edited /init.cfg/init.froyo.rc and added scbs.sh as a service...

Code:

service scbs /bin/scbs.sh
oneshot


teemo 04-25-2011 07:29 AM

Re: [TESTING] SCBS: Improved battery meter system
 
Before this SCBS, I used voltage as health indicator: 4.25V=100%
Now my Battery Monitor can't read Voltage, a fully charged battery return 0.100V
What happened ?

FRX06 + arrrghhh's 4/15/11 SCBS

jonpry 04-25-2011 08:53 AM

Re: [TESTING] SCBS: Improved battery meter system
 
wateverweber,

you haven't generated a model yet, so there is no conf file. Also 99% might be more correct than not. Thing is that charging starts to get exponentially slower after 80%. Afaict it can literally take days to get the last 1%,

toadlife,

Is there any particular reason you want to run it as a service? Atm scbs cannot be killed reliably, very bad thing can happen. For restarting we use killall -HUP scbs which just sends a signal to scbs to manage its own restart. Also for those trying to cookup a rootfs, there is a script in /sbin that you will need. Its called updatescbs or something.

teemo,

That is a known bug, still working on it.

toadlife 04-25-2011 12:19 PM

Re: [TESTING] SCBS: Improved battery meter system
 
Quote:

Originally Posted by jonpry (Post 2090595)
toadlife,

Is there any particular reason you want to run it as a service? Atm scbs cannot be killed reliably, very bad thing can happen. For restarting we use killall -HUP scbs which just sends a signal to scbs to manage its own restart. Also for those trying to cookup a rootfs, there is a script in /sbin that you will need. Its called updatescbs or something.

Yeah, I posted a few posts back. I've been launching logcat from /init and whenever I would launch scbs logcat would die.

http://forum.ppcgeeks.com/android-tp...ml#post2089505

The service I created only runs once and all it does it launch scbs.

killall -HUP still works AFAIK.

hlo 04-25-2011 11:22 PM

Re: [TESTING] SCBS: Improved battery meter system
 
Quote:

Originally Posted by ndno (Post 2088961)
Thanks for the syntax. I think I'm happy with my model now so I'm going to disable logging by redirectly to /dev/null. That should lighten up the writes to the SD card constantly.

I probably missed a post about this but what file do I edit to redirect to /dev/null? Thanks.

manekineko 04-26-2011 01:35 PM

Re: [TESTING] SCBS: Improved battery meter system
 
Just checking, but once scbs.conf has been generated and placed in the root of the SD card, that's all that must be done to install a battery configuration, right?

I'm starting from a clean data.img, and I see in the boot text that the SCBS battery daemon is starting, just wanted to make sure I didn't have to do anything like run BABS again to get it to use the conf file.

steveholtam 04-26-2011 01:40 PM

Re: [TESTING] SCBS: Improved battery meter system
 
Another question for you Jon. At what point do we have enough data to stop running SCBS? After a few weeks your software should have a pretty good model correct? Why would we want to continue running the software, which uses the phones resources and memory?

jonpry 04-26-2011 02:18 PM

Re: [TESTING] SCBS: Improved battery meter system
 
manekineko,

you don't need to run the app once you are happy with the model and have the conf. the daemon will startup with the phone and will take care of everything else.

steveholtam,

i suppose you can log to /dev/null as others have suggested, but the daemon still needs to run as it does all the battery calculations. I don't think it takes significant cpu to figure out the battery stuff, maybe a fraction of a percent. Imho the sdcard writes are not a big deal either. After all I use sd card as swap space. Others will tell you this is not sane. Its a matter of preference i suppose. Its probably a good idea to set the priority of scbs to absolute minimum. Its rarely going to be critical that the battery meter update right on the timer tick.

toadlife 04-26-2011 04:09 PM

Re: [TESTING] SCBS: Improved battery meter system
 
Quote:

Originally Posted by hlo (Post 2091287)
I probably missed a post about this but what file do I edit to redirect to /dev/null? Thanks.

The file /init

It's possible to edit it directly on your phone, but it might be easier to download the file using droid explorer, edit it and re-upload the file.

You have to remount your rootfs so that it is writable in order to change the file

mount -o remount,rw /

Set permisisons on the Remount the fs read only after you're done...

chmod 755 /init
mount -o remount,ro /



If you are confused by any of the above, I would recommend you NOT do this.


All times are GMT -4. The time now is 06:16 AM.

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


Content Relevant URLs by vBSEO 3.6.0