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

[Q] What is this for kind of kernel module?

OP Destroyedbeauty

2nd March 2014, 07:48 PM   |  #1  
Destroyedbeauty's Avatar
OP Senior Member
Flag Sundsvall
Thanks Meter: 550
 
1,880 posts
Join Date:Joined: Apr 2012
More
I did some checking in the /sys folders on my Z1 and found this file called "fake_battery" and a value of -22..

What is this parameter related file doing actually for our Z1 phones?

I created an init.d script that echoed an 0 command on that fake_battery file and rapid battery drain issues after full charge did disappear..

EDIT: If someone wants to try this init.d script just for confirm that this isn't any placebo effect - I can upload it here!

Sent from my C6903 using XDA Premium 4 mobile app
Attached Thumbnails
Click image for larger version

Name:	1393785897474.jpg
Views:	76
Size:	28.0 KB
ID:	2609831  
Last edited by Destroyedbeauty; 2nd March 2014 at 08:06 PM.
2nd March 2014, 09:11 PM   |  #2  
harfot's Avatar
Senior Member
Flag Odense, Denmark
Thanks Meter: 151
 
661 posts
Join Date:Joined: Nov 2007
More
Quote:
Originally Posted by Destroyedbeauty

I did some checking in the /sys folders on my Z1 and found this file called "fake_battery" and a value of -22..

What is this parameter related file doing actually for our Z1 phones?

I created an init.d script that echoed an 0 command on that fake_battery file and rapid battery drain issues after full charge did disappear..

EDIT: If someone wants to try this init.d script just for confirm that this isn't any placebo effect - I can upload it here!

Sent from my C6903 using XDA Premium 4 mobile app

No such file - what have you been playing around with
2nd March 2014, 10:21 PM   |  #3  
Destroyedbeauty's Avatar
OP Senior Member
Flag Sundsvall
Thanks Meter: 550
 
1,880 posts
Join Date:Joined: Apr 2012
More
Quote:
Originally Posted by harfot

No such file - what have you been playing around with

Found this on advanced stock kernel.. Should then be on stock also.. Very confusing, but I've not played with anything because this is inside the kernel / driver related folders and I am not into kernel hacking..

Sure u looked in the right folder?

Sent from my SGP311 using XDA Premium 4 mobile app
Last edited by Destroyedbeauty; 2nd March 2014 at 10:27 PM.
5th March 2014, 03:30 AM   |  #4  
harfot's Avatar
Senior Member
Flag Odense, Denmark
Thanks Meter: 151
 
661 posts
Join Date:Joined: Nov 2007
More
Quote:
Originally Posted by Destroyedbeauty

Found this on advanced stock kernel.. Should then be on stock also.. Very confusing, but I've not played with anything because this is inside the kernel / driver related folders and I am not into kernel hacking..

Sure u looked in the right folder?

Sent from my SGP311 using XDA Premium 4 mobile app

Found it, but maybe this https://github.com/openwebos/nyx-mod...fake_battery.c gives a clue
Last edited by harfot; 5th March 2014 at 08:37 AM.
5th March 2014, 10:35 AM   |  #5  
Destroyedbeauty's Avatar
OP Senior Member
Flag Sundsvall
Thanks Meter: 550
 
1,880 posts
Join Date:Joined: Apr 2012
More
Quote:
Originally Posted by harfot

Found it, but maybe this https://github.com/openwebos/nyx-mod...fake_battery.c gives a clue

Any clue or suggestion why it is echoed -22 as pre-configured? What does this file even do?

Your link didn't make anything more clear on this one..
Last edited by Destroyedbeauty; 5th March 2014 at 10:39 AM.
5th March 2014, 10:48 AM   |  #6  
Senior Member
Flag mullingar
Thanks Meter: 81
 
372 posts
Join Date:Joined: Nov 2011
More
In no expert but maybe there are a set of commands used by android with non stock or "fake" batterys...that's what I understood from the link harfot provided...again I'm no expert just my 2 cents haha

Sent from my C6903 using Tapatalk
5th March 2014, 02:30 PM   |  #7  
harfot's Avatar
Senior Member
Flag Odense, Denmark
Thanks Meter: 151
 
661 posts
Join Date:Joined: Nov 2007
More
Quote:
Originally Posted by Destroyedbeauty

Any clue or suggestion why it is echoed -22 as pre-configured? What does this file even do?

Your link didn't make anything more clear on this one..

Quote:
Originally Posted by cippi21

In no expert but maybe there are a set of commands used by android with non stock or "fake" batterys...that's what I understood from the link harfot provided...again I'm no expert just my 2 cents haha

Sent from my C6903 using Tapatalk

I think you are quite right - almost every (not to say all) manufacturers use a higher Amps level for charging their own (known) batteries opposed to unknown (fake) batteries which for security reasons are charged at a lower level.
Last edited by harfot; 5th March 2014 at 09:41 PM.
6th March 2014, 12:28 AM   |  #8  
Destroyedbeauty's Avatar
OP Senior Member
Flag Sundsvall
Thanks Meter: 550
 
1,880 posts
Join Date:Joined: Apr 2012
More
Quote:
Originally Posted by harfot

I think you are quite right - almost every (not to say all) manufacturers use a higher Amps level for charging their own (known) batteries opposed to unknown (fake) batteries which for security reasons are charged at a lower level.

Well, using an ' echo 0 ' command on the fakebattery file solved my rapid battery drain behaviour, so maybe something was causing misreadings of the actual battery gauge level with pre-configured "-22" value. Before, my drain started to act normal when at 75-78% procentage left, now it is normal drain..

6th March 2014, 07:48 AM   |  #9  
harfot's Avatar
Senior Member
Flag Odense, Denmark
Thanks Meter: 151
 
661 posts
Join Date:Joined: Nov 2007
More
Quote:
Originally Posted by Destroyedbeauty

Well, using an ' echo 0 ' command on the fakebattery file solved my rapid battery drain behaviour, so maybe something was causing misreadings of the actual battery gauge level with pre-configured "-22" value. Before, my drain started to act normal when at 75-78% procentage left, now it is normal drain..

Rebooting changes value back to "-22" (without any scripts) but "0" value don't seem to change when connecting to USB or Sony charger (don't have any other supply at hand right now).
Last edited by harfot; 6th March 2014 at 08:17 AM.
6th March 2014, 09:31 AM   |  #10  
Destroyedbeauty's Avatar
OP Senior Member
Flag Sundsvall
Thanks Meter: 550
 
1,880 posts
Join Date:Joined: Apr 2012
More
Quote:
Originally Posted by harfot

Rebooting changes value back to "-22" (without any scripts) but "0" value don't seem to change when connecting to USB or Sony charger (don't have any other supply at hand right now).

Use init.d script and it will stay at 0 forever!

Sent from my SGP311 using XDA Premium 4 mobile app

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

Advanced Search
Display Modes