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

1 posts
Thanks Meter: 0
By qzyf, Junior Member on 25th March 2014, 10:41 AM
Post Reply Subscribe to Thread Email Thread
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

Guest Quick Reply (no urls or BBcode)
Previous Thread Next Thread
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes