Posted on

This video shows how to set your Android Phone or Tablet to automatically power on while its off when you plug in or feed power to the USB Cable using the fastboot command “fastboot oem-off-mode charge 0”.

The feature works on most Android devices made past 2014. I tested it and confirmed it works on the Nexus 6, Nexus 7, and Moto G.
It does not work on the Moto E.

Useful for car installs or other projects that require the Phone to be on as long as power is being fed to the USB Cable.

Also you can reverse the change by entering in command window
“fastboot oem-off-mode charge 1”.

Requires Android SDK Tools Folder. An install video of that can be found here

Anyone interested in turning an old Android Phone/Tablet into a dedicated Car GPS here is a video tutorial for it

Tutorial basically is as follows:
1. Shutdown Android Phone/Tablet
2. Enter Fastboot Mode
3. Open Android SDK Tools Folder
4. Open Platform Tools Folder
5. Shift and Right Click inside the folder Click Open Command Window
6. Enter Command: fastboot oem-off-mode charge 0
7. Enter Command: fastboot reboot


My bitcoin green address: GU9aQ1ossgQdmD4qXXfGCzhLPuajQ9sweu


39 Replies to “Set your Android Phone to Automatically Power on when USB Charger is plugged in”

  1. Wondering if you know a file to modify to make phone go ahead and turn off before full discharged. This would help solve my potential bootloop issue….

  2. Dude, check the bug in your description. You are doing "fastboot oem off-mode-charge 0" but your description says "fastboot oem-off-mode charge 0" and the same shit with 1

  3. The sdk tools only is no longer available. Do you have any recent links or instructions on how to do this? Your help is appreciated!

    I found a link ( but when I install it it says that Java SDK is not installed while I just installed it.

  4. For those with Nexus 6P and maybe pixels the command is:
    fastboot oem off-mode-charge enable

    fastboot oem off-mode-charge disable

  5. Does anyone know why i'm getting this error when using fastboot oem off-mode-charge 0 ? I'm using HTC one M7.
    (bootloader) [ERR] Command error !!! OKAY [ 0.005s] Finished. Total time: 0.008s

  6. Great tip. What would also be really cool is if you could set a minimum battery level before the system boots. You'd have to have a custom loader, but it would be a nice option.

  7. I am stuck at point where i have to go to android SDK platform tools. I can not reach either that directory file or find it anywhere in my pc as well although I have downloaded and intalled it. Running the application i could not reach that point too, meaning to find that specific folder and open the command window. Any help?

  8. hey mate, i would really need your help for doing this on my galaxy tab active 2, i would pay you for helping me

  9. Do you need to actually plug the usb in each time to get it to turn on, or will it recognize that there is power running through the usb cable?

  10. How do I make it do my phone screen DOES NOT turn on when I plug it in? I can't find anything like this in the internet. I have Samsung Galaxy S6 and whenever I plug it in, it turns on, and I hate that.

  11. thanks! I had the issue where it just says "waiting for device" on the fastboot command – you just need to find the option in the fastboot menu on the phone that says something like "reboot to bootloader" and select that – then you should see your phone connect to the PC and be able run the command

  12. Tried this on an old Galaxy S3 with cyanogenmod and booting to fastboot goes into the "Downloading…" screen (bootloader?). Running the command shows "waiting for device" and does noting… solutions?

  13. Hi cauchypotato, i have xiaomi MI 4I with 5.0.1 android version, what is the SDK platform tool version i can use to do auto power on programme.

    Is it possible on my phone?

  14. lol
    dont follow this bull shit its simpal
    bt only root users
    go to system/bin
    and find lpm file
    rename it to lpm.old

    create a new file named lpm, edit it to have these commands in it:


    sleep 20


    Change line termination to unix (possibly not nessicary)

    change permissions to RWX R-X R-X

    Change group owner to shell

    note dont have lpm file simpal find playlpm and follow thise steps

  15. thanks for this video. it helps my problem to solve %50. But wanna ask you; How can we set our android device to automatically safety shut down when charge plug out? If you answer these, you will solve my problem properly…. Regards

  16. I was trying to use my old phones as IP cameras, this was exactly what I needed! Is there a way to auto shutdown on lost USB power?

  17. HI, I expereinced some trouble but was able to fix thru this:

    Essentially, you need the following steps:

    1) Enter USB debugging mode on the device

    2) Reboot the device into recovery mode (some combination of buttons, usually hold power+volume buttons on nexus devices – different for other manufacturers), and plug the device into your computer.

    3) Install the android SDK on your computer. You need this to be able to run 'fastboot' commands.(

    4) In your command prompt/shell/terminal you need to move into the folder containing fastboot. (this is the stuff with the 'cd' command as shown in the other thread). You'll know you are in the right folder, when you can run fastboot commands. Try 'fastboot devices' and you should get a device name/number or some feedback as long as you have the device plugged in.

    5) Once you get a response from 'fastboot devices', run the 'fastboot oem unlock' command to unlock the bootloader (click yes on the device screen as it will be asking y/n)

    6) Run the charge mode command 'fastboot oem off-mode-charge 0'

    All done. Reboot the device, power off, and plug it in to charge. All being well, it will startup.


    1. Download the Superboot zip file above and extract to a directory
    2. Put your device in bootloader mode – Turn off the phone then turn on with the 'volume up' and 'volume down' buttons both pressed to enter the bootloader
    3. Command Prompt CD to your superboot directory (wherever you extracted it to in step 1).
    4. Type "fastboot oem unlock"
    By default, it should automatically be selected to "YES". Simply hit the POWER button ONCE and wait for a few seconds until it says "DONE" on the top left side of the screen

    5. type "fastboot oem off-mode-charge 0"
    6. THAT'S IT!!! Now reboot your tablet and test it out!

    From this website:

Leave a Reply

Your email address will not be published. Required fields are marked *