FORUMS
Remove All Ads from XDA

[Q] Power on when plugged in (boot when docked)?

11 posts
Thanks Meter: 26
 
By DavidThompson256, Junior Member on 27th July 2011, 01:49 AM
Post Reply Email Thread
9th February 2018, 05:45 PM |#101  
Member
Thanks Meter: 8
 
More
Quote:
Originally Posted by knjigor

Hi, I have Lenovo P70-a with Android 5.1 and I'm trying to accomplish this with your script, I have checked all files needed and they are ok (they exist on phone) but when I turn phone off and plugin power cable it just vibrate 2 times, red light for charging isn't on and I have to use vol up + power button to turn it on. Could you assist me with this? For editing I'm using ES File Explorer Note editor as root.

I'm sorry I can not help you, this script works on my tablet and I do not have a Lenovo to try
 
 
9th February 2018, 05:52 PM |#102  
Junior Member
Flag Novi Sad
Thanks Meter: 1
 
More
Thanx any way, I have manage to solve it by
1. enter FASTBOOT mode
2. Connect phone to computer via USB
3. Go to adb folder and then press SHIFT+RIGHT CLICK
4. Select command prompt
5. Enter "fastboot oem off-mode-charge 0"
11th February 2018, 01:09 PM |#103  
Junior Member
Thanks Meter: 0
 
More
could anyone send me the folder reboot content (code) from the System/bin/reboot? I made a mistake and replace the code suggested above with that in reboot folder, now I lost the wifi and Bluetooth connection instead of auto reboot on charge. Thanks for your help in advance.
23rd June 2018, 12:27 AM |#104  
Hi All
I just did this.

1. For people where the reboot is going to recovery issue. Solution below, code must be EXACTLY in this format. I would advise using ES file explorer as i used this and worked. Avoid using notepad on PC.
#!/system/bin/sh
su
/system/bin/reboot
2. AOSP based roms does not support this.
Their is no charge animation file in the system/bin folder for AOSP roms. I have tried and failed in finding the file
This solution only works for all Samsung TouchWiz roms.
If anyone is able to find the charge animation file for AOSP based rom please let me know.

Good Luck
24th August 2018, 08:25 AM |#105  
edwardenglish's Avatar
Senior Member
Thanks Meter: 11
 
More
Hello,

I am eagerly interested in auto booting my device when connecting a charger, too. I use a Xperia Z1 Compact with AICP based on nougat (tried oreo too, no success). This ROM is LOS based so solving the problem could probably mean a solution for all LOS based ROMs.

Basically, none of the guides from the internet helped to do the trick.
There is no lpm file in the system/bin folder, and no chargemon file either.
The fastboot command
Code:
 fastboot oem off-mode-change 0
was unsuccessful either. It gave me the result "too many links".

I started to search for the files myself and came to the following results:

Within the system folder the .init and .rc files can be found.
I located the file init.msm8974-common.rc (msm8974 could be replaced with your device's name or board chipset) and within that file I found:

Code:
charger
    chown root system /sys/module/qpnp_charger/parameters/charger_monitor
    chown root system /sys/class/power_supply/battery/input_current_max
    chown root system /sys/class/power_supply/battery/input_current_trim
    chown root system /sys/class/power_supply/battery/voltage_min
    chmod 0644 /sys/module/qpnp_charger/parameters/charger_monitor
    chmod 0644 /sys/class/power_supply/battery/input_current_max
    chmod 0644 /sys/class/power_supply/battery/input_current_trim
    chmod 0644 /sys/class/power_supply/battery/voltage_min
and

Code:
charger /sbin/healthd -c
    class charger
    seclabel u:r:healthd:s0
Searching for healthd gave me the idea, that this is the service managing the charger properties and its behavior. Unfortunately its a compiled and unreadable binary file. I wonder if one could alter the healthd file it could be possible to automatically boot the device instead of going to the loading screen.

Maybe my ideas can help solving the issue.
24th August 2018, 01:22 PM |#106  
ahhl's Avatar
Senior Member
Thanks Meter: 107
 
More
I have been researching about this topic for quit some time however, unsuccessful, unfortunately.

It is because some of the issues as I was told
1. You can't change the file at adb level as its a low level file that can only be access at fastboot command.

2. I also was told the manufacturer might not implement that particular command for some reason unknown to us.

3. Different phone have different command instruction.

You can search at xda, "abootool", a tool that can be run to give you all fastboot comand specific for your phone.
Unfortunately, the tool is in python language. That were I got stuck. Tried once but it says missing certain file. This tool can also be found at Github as still being updated.

If you manage to get it run, plz share with me.


Sent from my vivo 1723 using Tapatalk
The Following User Says Thank You to ahhl For This Useful Post: [ View ] Gift ahhl Ad-Free
26th September 2018, 12:47 PM |#107  
Junior Member
Thanks Meter: 2
 
More
Found solution that works on Samsung Galaxy Tab A6
For me the reboot scheme didn't work but what did work was putting into /system/bin/lpm this:
Code:
#!/system/bin/sh
echo b > /proc/sysrq-trigger
Hope it helps someone
The Following 2 Users Say Thank You to igcek For This Useful Post: [ View ] Gift igcek Ad-Free
1st October 2018, 09:07 AM |#108  
Junior Member
Thanks Meter: 3
 
More
Hello,

None of the proposed solutions worked for me on Samsung Galaxy Tab A 10.1 (T580) with Android 7 (no boot, black screen, boot to Recovery, etc.), but after much testing, I've found another way to make it work.

Extract boot.img from the rooted device and copy to PC (13540000.dwmmc0 -> T580's boot partition):
adb shell "su -c dd if=/dev/block/platform/13540000.dwmmc0/by-name/BOOT of=/sdcard/boot.img"
adb pull /sdcard/boot.img

Download Android Image Kitchen:
https://forum.xda-developers.com/sho....php?t=2073775

Drag-and-drop boot.img to unpackimg.bat.

Open ramdisk/init.rc

Search for on charger and add at the end (after write /sys/class/power_supply...):
setprop ro.bootmode "normal"
setprop sys.powerctl "reboot"

Save file and repack image (double click on repackimg.bat).

Rename image-new.img to boot.img

Tar boot.img file (you will need tar for Windows):
tar -cf boot.tar boot.img

Download Odin latest version:
https://samsungodin.com/

Open Odin, click on AP, select boot.tar file.

Reboot device to download mode:
adb reboot download

Click Start on Odin.

After reboot, disconnect and power off device. Reconnect the USB cable and wait.
The Following 2 Users Say Thank You to W3Fan For This Useful Post: [ View ] Gift W3Fan Ad-Free
1st October 2018, 05:43 PM |#109  
Junior Member
Thanks Meter: 0
 
More
Quote:
Originally Posted by igcek

For me the reboot scheme didn't work but what did work was putting into /system/bin/lpm this:

Code:
#!/system/bin/sh
echo b > /proc/sysrq-trigger
Hope it helps someone

Nice! Thanks, it works on Samsung J7 2017
9th October 2018, 04:31 PM |#110  
Member
Thanks Meter: 1
 
More
Hi,
Has anyone got a solutions to work on a Samsung S6 edge - I have tried all of them but my phone keep on booting into recovery mode )-;

Many regards
11th October 2018, 07:34 PM |#111  
Junior Member
Thanks Meter: 2
 
More
Quote:
Originally Posted by MrNisse

Hi,
Has anyone got a solutions to work on a Samsung S6 edge - I have tried all of them but my phone keep on booting into recovery mode )-;

Many regards

Have you tried after setting "echo b" thing rebooting from TWRP into system?

I dont know why but it seems it reboots allways to recovery till you reboot to system that worked for me.
Post Reply Subscribe to Thread

Tags
boot, charging, docked, galaxy tab, power on

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

Advanced Search
Display Modes