Attend XDA's Second Annual Developer Conference, XDA:DevCon 2014!
5,772,773 Members 52,020 Now Online
XDA Developers Android and Mobile Development Forum

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

Tip us?
 
Destroyedbeauty
Old
(Last edited by Destroyedbeauty; 2nd March 2014 at 07:06 PM.)
#1  
Destroyedbeauty's Avatar
Senior Member - OP
Thanks Meter 412
Posts: 1,607
Join Date: Apr 2012
Location: Sundsvall
Default [Q] What is this for kind of kernel module?

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:	74
Size:	28.0 KB
ID:	2609831  
Android Devices that I am using:
1. Sony Xperia Z1 - ROM: Stock RomAur v9.1 / Kernel: X-Honami-v1
2. Sony Xperia Tablet Z - ROM: Stock 10.5.A.0.230 / Kernel: UnleaZhed XTZ v0.2
 
harfot
Old
#2  
harfot's Avatar
Senior Member
Thanks Meter 144
Posts: 638
Join Date: Nov 2007
Location: Odense, Denmark
Quote:
Originally Posted by Destroyedbeauty View Post
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
Best regards,
Harfot
------------------------------------------------------------------------------------------------------------------------------------------
Sony Xperia Z2 (D6503)
Android ver.: 4.4.2
ROM..........: Sony stock
Kernel........: Sony stock
Baseband..: 8974-AAAAANPZQ-00015-10
Version......: 17.1.2.A.0.314

 
Destroyedbeauty
Old
(Last edited by Destroyedbeauty; 2nd March 2014 at 09:27 PM.)
#3  
Destroyedbeauty's Avatar
Senior Member - OP
Thanks Meter 412
Posts: 1,607
Join Date: Apr 2012
Location: Sundsvall
Quote:
Originally Posted by harfot View Post
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
Android Devices that I am using:
1. Sony Xperia Z1 - ROM: Stock RomAur v9.1 / Kernel: X-Honami-v1
2. Sony Xperia Tablet Z - ROM: Stock 10.5.A.0.230 / Kernel: UnleaZhed XTZ v0.2
 
harfot
Old
(Last edited by harfot; 5th March 2014 at 07:37 AM.)
#4  
harfot's Avatar
Senior Member
Thanks Meter 144
Posts: 638
Join Date: Nov 2007
Location: Odense, Denmark
Quote:
Originally Posted by Destroyedbeauty View Post
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
Best regards,
Harfot
------------------------------------------------------------------------------------------------------------------------------------------
Sony Xperia Z2 (D6503)
Android ver.: 4.4.2
ROM..........: Sony stock
Kernel........: Sony stock
Baseband..: 8974-AAAAANPZQ-00015-10
Version......: 17.1.2.A.0.314

 
Destroyedbeauty
Old
(Last edited by Destroyedbeauty; 5th March 2014 at 09:39 AM.)
#5  
Destroyedbeauty's Avatar
Senior Member - OP
Thanks Meter 412
Posts: 1,607
Join Date: Apr 2012
Location: Sundsvall
Quote:
Originally Posted by harfot View Post
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..
 
cippi21
Old
#6  
Senior Member
Thanks Meter 81
Posts: 372
Join Date: Nov 2011
Location: mullingar
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
 
harfot
Old
(Last edited by harfot; 5th March 2014 at 08:41 PM.)
#7  
harfot's Avatar
Senior Member
Thanks Meter 144
Posts: 638
Join Date: Nov 2007
Location: Odense, Denmark
Quote:
Originally Posted by Destroyedbeauty View Post
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 View Post
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.
Best regards,
Harfot
------------------------------------------------------------------------------------------------------------------------------------------
Sony Xperia Z2 (D6503)
Android ver.: 4.4.2
ROM..........: Sony stock
Kernel........: Sony stock
Baseband..: 8974-AAAAANPZQ-00015-10
Version......: 17.1.2.A.0.314

 
Destroyedbeauty
Old
#8  
Destroyedbeauty's Avatar
Senior Member - OP
Thanks Meter 412
Posts: 1,607
Join Date: Apr 2012
Location: Sundsvall
Quote:
Originally Posted by harfot View Post
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..

 
harfot
Old
(Last edited by harfot; 6th March 2014 at 07:17 AM.)
#9  
harfot's Avatar
Senior Member
Thanks Meter 144
Posts: 638
Join Date: Nov 2007
Location: Odense, Denmark
Quote:
Originally Posted by Destroyedbeauty View Post
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).
Best regards,
Harfot
------------------------------------------------------------------------------------------------------------------------------------------
Sony Xperia Z2 (D6503)
Android ver.: 4.4.2
ROM..........: Sony stock
Kernel........: Sony stock
Baseband..: 8974-AAAAANPZQ-00015-10
Version......: 17.1.2.A.0.314

 
Destroyedbeauty
Old
#10  
Destroyedbeauty's Avatar
Senior Member - OP
Thanks Meter 412
Posts: 1,607
Join Date: Apr 2012
Location: Sundsvall
Quote:
Originally Posted by harfot View Post
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
Android Devices that I am using:
1. Sony Xperia Z1 - ROM: Stock RomAur v9.1 / Kernel: X-Honami-v1
2. Sony Xperia Tablet Z - ROM: Stock 10.5.A.0.230 / Kernel: UnleaZhed XTZ v0.2

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes


How to Factory Reset your Samsung Gear Live Android Wear SmartWatch – XDA Developer TV

Do you want to Factory Reset your Samsung Gear … more

Get Your Special xda:devcon ’14 Hotel And Conference Rate While It Lasts

By now you’ve definitely heard about XDA’s … more

Google Chromecast Rootable Once Again!

Over the six months, theGoogle Chromecasthas gained a considerable amount of official functionality. … more

YAATA isn’t Just Another Android Texting App

Although our mobile devices today are capable of executingnearly every task we normally … more