Post Reply

[Q] compile charger.c to enable auto boot in aosp?

25th March 2014, 10:41 AM   |  #1  
OP Junior Member
Thanks Meter: 0
 
1 posts
Join Date:Joined: Mar 2014
Hi guys, I want my Nexus 7 to auto boot when its battery level is higher than 20% in off charge mode. I edite the charger.c file in system/core/charger directory, in the event_loop() function, like this:

int batt_cap = get_battery_capacity(charger);
if (batt_cap > 20) {
android_reboot(ANDROID_RB_RESTART, 0, 0);
}

It never worked. but it works fine when i build and flash the bootimage on a Nexus 10. I guess there must be some differences between their makefiles. I try my best to solve it, but it seems like that the charger file is overwritten somewhere else in Nexus 7. I need some help, any info will be appreciate!
Post Reply Subscribe to Thread
Previous Thread Next Thread
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes


Top Threads in Nexus 7 Q&A, Help & Troubleshooting by ThreadRank