Rohit Rohit - 1 year ago 233
Android Question

Auto boot when wall charger is plugged

I'm Developing an Android Application where it requireds 3 things:-

  1. To keep the App up an running for specific time and then phone will be off (Working Fine)

  2. When phone get charging from outlet, I want phone to power up automatically without hitting any power button. (Not Working with wall Socket, but working when connected to USB cable via Laptop).

  3. After boot my app should start working Automatically (Working Fine)

You Must know :-
My phone is Moto E (rooted) and want 2nd step to be done. Tried some codes but that does not work on moto E.
When Connected with USB it gives 2 as response and when connected with Wall socket charger it says 1

Any help will be Appreciated

P.S :- Auto Boot working with USB cable connected with Laptop but not with Socket Charger

Update-1: 1- Found
fastboot oem off-mode-charge 0
working with Nexus 7 but not on Moto e.

2- Moto e boots when connected to Router (USB Dongle Port)

Answer Source

At last I got the solution, you can achieve this by deleting system/bin/charge_only_mode file. Please do that at your own risk and before deleting have backup of that file. I got the desired result that was boot when its connected to wall charger and now its working fine. All the best!

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download