This file protects your phone from running below a dangerous level and potentially rendering X10 devices to an unusable or hard brick.
Hello XDA developers
Latest Version 3 :: Please use the latest version and report back the contents of - /data/local/tmp/extract_charger_status.txt - with any issues and state which firmware you were using this with.
I've identified an issue after killing an X10a involving the offline charger. I hope the following can save any further problem's by using the following charger_fix_v3.zip with xRecovery as it is a simple case of rebooting into xRecovery and loading the update. This file is safe for X10 owners as it introduces a stock SE file back to the system, which if not present can render the system a brick.
[ROM] - TripNRaVeR - TripNMiUI - should not be used with this patch as an unknown issue exists with the charger that is currently being researched, until further notice DO NOT apply this update if you are using TripNMiUI or any variant.
There is no SETUID for Android. Android developers state there is no need as Dalvik code will never require elevated or root permissions and hence, it introduces a potential security flaw.
Q: What is it?
A: SE Official charger file - /system/bin/charger - has special permissions which can not be set by root or any other user, the file need's to be moved into place, as it contains setuid or the "Sticky" Unix file system permission.
Wait! How about - chmod 06755 or chmod 04755 - I hear you say? Forget it.. This is not a simple file, it's a Linux binary an ELF Linker file that contains critical system links to (among others//).. the following;
Nothing special here? Well if you say so! Wait does this look familiar to anyone?
RGB LED interface
WLOD (white led of death) issues, or seeing three red blinking led lights
This charger file defines the CPU scaling and governor, which is of massive importance to anyone having issues with poor battery life and general performance of their custom rom
For anyone working with customizations around chargemon, you need to include this file and ensure to include - /system/bin/charger - as an entry in any modifications to chargemon right after
#!/system/
It should ALWAYS be the 2nd line in the chargemon file. No questions asked, this file must be optimized and present, it can not be a touch file with any old permission set assigned!
(*ATTN ALL ROM DEVELOPERS*)
Important lesson when handling Android files. You must set the correct permissions and assign the correct security groups - setuid - as they are held in memory. If a part of code executes and is unable to reach the expected memory - WLOD
Not to be patronizing or arrogant, I suspect the issue arrived with Froyo (now in Beta 4), which made it's way via TripNrAvER to a further ROM developers and the issue exists and is present in many (possibly all 2.2.1 Froyo x10 roms) although most user complaint's arrive in strange or hard to understand messages, which is too often interpreted around the forums as just being n00bish and not knowing how to use SEUS or Flashtool...
This thread is specifically for ROM developers and is a deep technical issue. Please do not move this thread to apps or general
Thank you DoomLoRD, Androxyde, Bin4y, Zdzihu & Jerpelea for their excellent work and patience, who without their presence and effort on XDA the X10 would never be half of what it is today
EDIT: - v1 was not copying to location correctly - v2 uploaded
Hello XDA developers
Latest Version 3 :: Please use the latest version and report back the contents of - /data/local/tmp/extract_charger_status.txt - with any issues and state which firmware you were using this with.
I've identified an issue after killing an X10a involving the offline charger. I hope the following can save any further problem's by using the following charger_fix_v3.zip with xRecovery as it is a simple case of rebooting into xRecovery and loading the update. This file is safe for X10 owners as it introduces a stock SE file back to the system, which if not present can render the system a brick.
[ROM] - TripNRaVeR - TripNMiUI - should not be used with this patch as an unknown issue exists with the charger that is currently being researched, until further notice DO NOT apply this update if you are using TripNMiUI or any variant.
There is no SETUID for Android. Android developers state there is no need as Dalvik code will never require elevated or root permissions and hence, it introduces a potential security flaw.
Q: What is it?
A: SE Official charger file - /system/bin/charger - has special permissions which can not be set by root or any other user, the file need's to be moved into place, as it contains setuid or the "Sticky" Unix file system permission.
Wait! How about - chmod 06755 or chmod 04755 - I hear you say? Forget it.. This is not a simple file, it's a Linux binary an ELF Linker file that contains critical system links to (among others//).. the following;
Code:
/sys/class/power_supply/battery/capacity
/sys/devices/platform/msm_pmic_vibrator/enable
/system/bin/chargemon
Nothing special here? Well if you say so! Wait does this look familiar to anyone?
Code:
/sys/class/leds/lv5219lg
WLOD (white led of death) issues, or seeing three red blinking led lights
Code:
/sys/class/power_supply/usb/online
/sys/class/power_supply/ac/online
/system/etc/semc/chargemon
This charger file defines the CPU scaling and governor, which is of massive importance to anyone having issues with poor battery life and general performance of their custom rom
For anyone working with customizations around chargemon, you need to include this file and ensure to include - /system/bin/charger - as an entry in any modifications to chargemon right after
#!/system/
It should ALWAYS be the 2nd line in the chargemon file. No questions asked, this file must be optimized and present, it can not be a touch file with any old permission set assigned!
(*ATTN ALL ROM DEVELOPERS*)
Important lesson when handling Android files. You must set the correct permissions and assign the correct security groups - setuid - as they are held in memory. If a part of code executes and is unable to reach the expected memory - WLOD
Not to be patronizing or arrogant, I suspect the issue arrived with Froyo (now in Beta 4), which made it's way via TripNrAvER to a further ROM developers and the issue exists and is present in many (possibly all 2.2.1 Froyo x10 roms) although most user complaint's arrive in strange or hard to understand messages, which is too often interpreted around the forums as just being n00bish and not knowing how to use SEUS or Flashtool...
This thread is specifically for ROM developers and is a deep technical issue. Please do not move this thread to apps or general
Thank you DoomLoRD, Androxyde, Bin4y, Zdzihu & Jerpelea for their excellent work and patience, who without their presence and effort on XDA the X10 would never be half of what it is today
EDIT: - v1 was not copying to location correctly - v2 uploaded
Attachments
Last edited: