yashsingh1/xdaforums huggingface dataset:
[Galaxy Note 3 Q&A, Help & Troubleshooting] jan_newbie:
Did you used Magisk for this to root your device?
[Galaxy Note 3 Q&A, Help & Troubleshooting] knreddy:
Auto shutdown of phone on disconnection of charger plug ( for Car) etc

https://xdaforums.com/android/apps-games/app-automate-t2870633/post80126909#post80126909
[Galaxy Note 3 Q&A, Help & Troubleshooting] jprimero15:
Doesn't seem to work on pie.. Or maybe im missing some things
[Galaxy Note 3 Q&A, Help & Troubleshooting] Mohamedkam000:
Maybe the tool you're using is older than Pie?
[Galaxy Note 3 Q&A, Help & Troubleshooting] smungai:
Auto Boot on charger - Samsung Note 3 hlte

https://xdaforums.com/showpost.php?p=81556831&postcount=16

Hello fellow Note 3 XDA'ers/XDA'ites!

It's been a while since I've been active on the ROM improvement side but thought I'd offer my 2 cents. Straight to the point: The method detailed by Sollace here https://xdaforums.com/showpost.php?p=78742645&postcount=10 worked for me. I replied on that thread but thought it prudent to put it here as well.

As stated, this worked my Samsung Galaxy Note 3 N9005 hlte, rooted, with TWRP recovery and Magisk, running MIUI 8. Using Root Explorer, I navigated to the root/system/bin folder, opened the lpm file, deleted the content and pasted the code above as advised, saved and exited (the text editor automatically backed up the original lpm file). I rebooted for good measure, powered down and when I connected the charger, phone boots up a few seconds after displaying the battery icon.

I'm hoping I can next figure out how to power the device without a battery (any ideas greatly welcomed - I've tried the Instructables tips and few others to no avail). I can then install the device into vehicle (FYI device fits quite nicely into Volvo 6.5" screen sat navs). For those interested in a bit of history on the different things I tried to reach this point, read on.

- I attempted this method with Lineage 14.1, 15.0 and 16.0, Resurrection Remixes (going down to v5.6.2) and could not find the lpm file to edit. I have not tried this with Stock but should it have the lpm file, it may be worth a try.

- Editng the lpm file with the code below did not work on my device

#!/system/bin/sh

/system/bin/reboot

- With great help from lrbj (see post 12 in the S7 thread above), I also attempted to cook my own Lineage ROM, editing the healthd_mode_charger.cpp file located in the healthd file. Unfortunately, I got an error message during the the build process saying there were no dependancies in the file and at the line that was added (android_reboot(ANDROID_RB_RESTART, 0, 0).

I hope this helps anyone out there as I know I've received immense help from XDA and its members for over 10 years now (from my Winmo days). Cheers to all
[Galaxy Note 3 Q&A, Help & Troubleshooting] popy2006:
Many Thanks, that worked on LineageOS 14.1!
[Galaxy Note 3 Q&A, Help & Troubleshooting] doktor29:
Hello everyone.

Im trying to make my S4 mini to boot on charge and this work, but... Im try to make it when battery is lower than 10% it will only charge in offline and then reboot after reach 10%.

But this wont work :/ it always stay some time in offline charge and then around one minute reboot.

Can some body help with this ?

I have lineage 15.1 installed
[Galaxy Note 3 Q&A, Help & Troubleshooting] ahhl:
so far no one has able to do this.
[Galaxy Note 3 Q&A, Help & Troubleshooting] Typocrit:
Hello. I'm using the exact same device as yours, a Samsung Galaxy Note 3 N9005 but I'm running a LineageOS 16 custom ROM. As you said, the lpm file couldn't be located on the bin folder. I want to know if you restored your phone to the stock android ROM for you to make it work, or did you use other custom ROMS? I'm honestly not too inclined on changing LineageOS for now.

Or better yet, do you have some kind of solution for this phone to boot on just recovery mode (no need for normal boot since I can reboot from recovery anyways) everytime it's connected to a charger? My power button is currently busted and I don't want to pressure my power up button any more than necessary.
[Galaxy Note 3 Q&A, Help & Troubleshooting] doktor29:
hi, it works partially on miui pie roms.

when i plug charger and it charge till x% its still charging offline, but if i unplug and plug again charger after x% it reboot to system.

it should work like that or should automaticaly reboot after battery hit x% ??
[Galaxy Note 3 Q&A, Help & Troubleshooting] FlowBow69:
It Works! Samsung S4 mini LineageOS 16

Hey thank you for this info! It works now on my Samsung s4 mini on Lineage OS 16. First ther come the normal Battery Logo an after 1-2 min whaiting it reboot to normal OS.

Thanks!
[Galaxy Note 3 Q&A, Help & Troubleshooting] matis88:
Hello everyone,

I've made all the changes according to your instructions so add

class_stop charger

trigger late-init

to the "on charger" section in init.rc and android boot quite nice.

There is a few issues: - touchscreen not working - only emergency calls available

Does enyone faced same issue?

I use lineage-16.0-20190625-UNOFFICIAL-hlte rom.

OK, solved:

solution from this thread works perfect:

https://xdaforums.com/t/auto-boot-start-on-charge-different-devices.3233767/#post-82058013
[Galaxy Note 3 Q&A, Help & Troubleshooting] rubenper:
I don't know if somebody still looking for a solution to this question, I found the the answer in Android Enthusiasts forum https://android.stackexchange.com/q...ower-on-android-when-the-charger-is-connected , Ive tried everything on my Samsung Galaxy Tab GT-P5100 with Cyanogen and TWRP, but the only thing that worked, was modifying the Init.rc file as follows:

on charger

class_stop charger

setprop sys.powerctl reboot leaving-off-mode-charging

I did it unpacking boot.img, changing init.rc in the section "on charger", repacking again with Android Kitchen and flashing the new boot.img with TWRP, I hope this helps some of you that didn't find yet and answer, I am a complete novice in these topics, but looking around many forums and youtube tuturials, I could this get done
[Galaxy Note 3 Q&A, Help & Troubleshooting] tonyniu2008:
HI there, i have installed this Rom to my samsung s8, it is pretty cool, and i am trying to set auto boot on USB power pluggin, but until now, no luck.

Since Android 10, seems the init.rc is regenerated every time when it boots, so unpack/repack of the .img solution seems not working any more. what i am trying next is via magisk module, still in process but no progress.

Is there any other way to do this? any light would be appreciated.
[Galaxy Note 3 Q&A, Help & Troubleshooting] vrjj:
I have a Galaxy Note 4 with Lineage Android 10 version.

I just opened the init.rc file for editing in Total Commander on the phone and replaced the on charger section

on charger

setprop ro.bootmode "normal"

setprop sys.powerctl "reboot"

saved the changes and everything worked out, the phone turns on when the charger is connected
[Galaxy Note 3 Q&A, Help & Troubleshooting] tonyniu2008:
Hi there, how did you do that, simple adb to the file and change? I got permission denied even i have rooted phone, or you unpacked the boot image?
[Galaxy Note 3 Q&A, Help & Troubleshooting] vrjj:
All manipulations are performed on the phone itself, without using a PC and Adb.

With Magisk, I gave root access to the Total commander and opened init.rc for editing in the Total commander.
[Galaxy Note 3 Q&A, Help & Troubleshooting] Saber2th:
which boot while are you using can you share it to me or any link of that file i dont have custom recovery
[Galaxy Note 3 Q&A, Help & Troubleshooting] THE0JACKAL:
Thank you so much, this worked for me :)
[Galaxy Note 3 Q&A, Help & Troubleshooting] vrjj:
I am glad that my message helped you.

When I tried to do this, I myself did not believe that everything would turn out so easily.

While the methods described earlier, on the contrary, did not work for me.

I'm sorry for my bad english :alien:

:cowboy:
[Galaxy Note 3 Q&A, Help & Troubleshooting] oskarosi:
How did you change init.rc to make the system start as soon as you plug in the charger?
[Galaxy Note 3 Q&A, Help & Troubleshooting] alfanveykov:
Modify init.rc

on charger

setprop ro.bootmode "normal"

setprop sys.powerctl "reboot"

Work, but the propblem when phone on and charger connected , charger is not detected

I remove all change in init.rc and add bellow code in the default prop

sys.boot_from_charger_mode=1

Everything works fine, try in oppo a37 lineage os 17.1 android 10.

Samsung Sm-j320g lineageos 14.1 android 7.1.2

Usefull when power button is broken, also my samsung Sm-j320g doest have screen, im use scrcpy to use the phone for usb tether
[Galaxy Note 3 Q&A, Help & Troubleshooting] anjarys:
Is there any other ways to do this? Like, maybe editing some lines on init.rc?
[Galaxy Note 3 Q&A, Help & Troubleshooting] YetAnotherForumUser:
Since I already use an automation tool (Automagic) to configure the device as access point, start the ip webcam app and give some voice prompts about what is going on I use the same tool to shut down the device when power has been removed for 60 seconds. It first says "Power disconnected, shutdown in 60 seconds, camera disabled" followed by "shutdown in 30 seconds", "shutdown in 10 seconds" and "shutting down now". If power is restored within this time frame it says "Power restored, starting camera". This makes the device more resilient in the face of the rather noisy power supply in a trailer.

As to the why of these messages and the whole setup: I'm using a screen-less phone as a trailer camera. The audio prompts replace the screen (and are more convenient any way since the device is tucked away into a corner of the trailer), the access point allows those who are authorised to see what is happening in the trailer within a few dozen metres. The current device is a Samsung SM-J320FN which used to me my daughter's until she first dropped it in the loo (which it mostly survived) and then on the floor (which broke the screen).
[Galaxy Note 3 Q&A, Help & Troubleshooting] asifashu91:
I am running lineage 19.1on redmi note 4 tried your method but there is no sbin folder nor any charger file in my boot image...there is one file named charger in system/bin nothing else.what to do can you guide me
[Galaxy Note 3 Q&A, Help & Troubleshooting] asifashu91:
I am running lineage 19.1on redmi note 4 tried your method but there is no sbin folder nor any charger file in my boot image ramdisk folder...there is one file named charger in system/bin nothing else.what to do can you guide me
[Galaxy Note 3 Q&A, Help & Troubleshooting] asifashu91:
I did find the charger file and reboot file in system/bin but there is no file named charger in my ramdisk folder what to do now running on lineage os 19.1 redmi note 4r rooted with magisk
[Galaxy Note 3 Q&A, Help & Troubleshooting] tparaizo:
The simple task I've been trying for weeks is for the device to turn on when the charger is connected. I found a few ways to do this, but all without success:

1 - change via fastboot (fastboot oem-off-mode charge 0) but I can't execute the command, maybe because Samsung removed this.

2 - change system files, such as init.rc, however, the initialization files are read-only, and it seems to me that this is due to Magisk.

3 - changing the files inside boot.img, and then repackaging and making the path through Odin. I was able to unpack boot.img with "magiskboot unpack boot.img", which generates some files. But when extracting the contents of "ramdisk.cpio" ("cpio -igm > ramdisk.cpio" or "cpio -i -F ramdisk.cpio"), the generated files are blank, and so are the directories.

This way I don't have the files needed to change. I tried this with Windows and Linux, but all with the same result.

4 - I tried with some applications, such as Tasker, but no settings or events can turn on the device.

I have my G780G/DS with TWRP (orange fox), rooted with Magisk, I've already tested another TWRP, but none of them let me change the files.

I've read almost all the posts, but I can't find the solution.

Does anyone have any tips for me? Can anyone give me a solution or alternative? "Power on the device when connecting the charger" :(
[Galaxy Note 3 Q&A, Help & Troubleshooting] alfanveykov:
GitHub - anasfanani/magisk-autoboot: a Magisk module to enable automatic booting/for turning on of your Android device when it's connected to a charger or USB.

a Magisk module to enable automatic booting/for turning on of your Android device when it's connected to a charger or USB. - anasfanani/magisk-autoboot

github.com

this is simple, working on almost android version

try my solution bro
[Galaxy Note 3 Q&A, Help & Troubleshooting] tparaizo:
Thank you very much!

It took some work here, as I started over with the whole process, from flashing the Stock Rom, TWRP, Magisk, etc, etc... but it worked!!

The only point that was different from your patch documentation is that I did not have access to /data/adb via the TWRP terminal. It was necessary to start the device in normal mode, and execute the procedure via ADB from the PC, with "su" (super user).

Now that you've shown the way, I'll look into making a change, to turn off the device when the cable is removed.

Thank you very much friend!
[Galaxy Note 3 Q&A, Help & Troubleshooting] Schalke84:
Merhaba. Batarya devresini sökün. Şarj kablosunun telefona gelen ucunu açın. Şarj kablosundaki + kutubu batarya devresindeki + uca, - ucu da - uca lehimleyin. Bu şekilde çalışır. Bende TAB4 10 inç tablet var ve çalıştı.
[Galaxy Note 3 Q&A, Help & Troubleshooting] tparaizo:
This solution is working very well on my Samsung S20FE. I only encountered a problem when the device completely discharges. Depending on the power of the charger, it does not have the strength to provide an initial charge, and the system keeps restarting and does not exceed 1%.

I wanted to know how to implement a check in your method, to check the battery percentage, and trigger the boot only after about 5%. As in this example:

----

#Skip offline charge and start device if enough juice on battery. If low on battery do offline charge

CAPACITY=$(cat /sys/class/power_supply/battery/capacity)

MIN_CAPACITY=5

if [ $CAPACITY -gt $MIN_CAPACITY ]

then

sleep 1

/system/bin/reboot

fi
[Galaxy Note 3 Q&A, Help & Troubleshooting] alfanveykov:
There a example https://github.com/anasfanani/Android-OnCharge-AutoBoot/blob/main/files/init.custom.rc

you can do something like

on charger
exec u:r:magisk:s0 -- /system/bin/sh /data/develop/init.custom001.sh

but i dont know work or not.
[Galaxy Note 3 Q&A, Help & Troubleshooting] tparaizo:
Thanks. I'll try it here and let you know the results.
[Galaxy Note 3 Q&A, Help & Troubleshooting] ahhl:
you need to modify init.re file

open the init.rc using text editor

go on charger line

modify the line with the one relevent to your phone.

not all command will wor.

you need to test it
[Galaxy Note 3 Q&A, Help & Troubleshooting] tparaizo:
Brother.

It took me a while, but I managed to make it work the way I wanted.

I did it like this:

change init.custom.rc:

on charger
exec u:r:magisk:s0 -- /system/bin/sh ${MAGISKTMP}/custom.sh 000

and, init.custom.sh:

#!/system/bin/sh

CAPACITY=$(cat /sys/class/power_supply/battery/capacity)
MIN_CAPACITY=30
if [ $CAPACITY -gt $MIN_CAPACITY ]
then
sleep 1
setprop ro.bootmode "normal"
setprop sys.powerctl "reboot"

else
while [[ $CAPACITY -le $MIN_CAPACITY ]]; do
sleep 60
CAPACITY=$(cat /sys/class/power_supply/battery/capacity)
if [ $CAPACITY -gt $MIN_CAPACITY ]
then
sleep 1
setprop ro.bootmode "normal"
setprop sys.powerctl "reboot"
fi
done
fi

It worked very well! When the battery charge is below what was parameterized in the script, it stops at the boot screen. Even though it doesn't show the charging percentage yet, it keeps charging, and when it reaches the expected charge level, the device starts up by itself.

:cool::cool:

If you want, you can include it with your solution. More people must have the same need!
[Galaxy Note 3 Q&A, Help & Troubleshooting] alfanveykov:
Thankyou brother, I implement your code in my github repository, after few days learning how to make Magisk Modules, now i can make modules for this

GitHub - anasfanani/magisk-autoboot: a Magisk module to enable automatic booting/for turning on of your Android device when it's connected to a charger or USB.

a Magisk module to enable automatic booting/for turning on of your Android device when it's connected to a charger or USB. - anasfanani/magisk-autoboot

github.com
[Galaxy Note 3 Q&A, Help & Troubleshooting] mathius:
For anyone trying this in a Samsung, the following worked for me.

Samsung S7, LineageOS 17

Boot into TWRP,

Mount system,

Open terminal,

Open the file (nano is the editor in my build) '/system/vendor/etc/init/hw/init.samsung.rc'

Search the file for "on charger"

Scroll down until the last line that is indented under the "on charger" line

Add the following (keeping the indent the same as the line above):

setprop sys.powerctl reboot,leaving-off-mode-charging

I find this path varies between builds. I found the relevant file by:

running 'find -iname hw' under /system

cd into the folders called hw

then 'grep *rc -e charger' - which made it clear which file was likely to work.
[Moto G5 Questions & Answers] infixremix:
Hi I'm just wondering I heard the Moto g5 had a led charging light . How ever mine only works on fast boot am I doing something wrong ?
[Moto G5 Questions & Answers] andyro2008:
It works as a charging light when the battery is too low to turn on the display.

Enviado desde mi Moto G (5) mediante Tapatalk
[Moto G5 Questions & Answers] infixremix:
Ah ok cheeers I thought it was a fault so it shouldn't be there when charging
[Huawei Mate 9 Themes, Apps, and Mods] sethnet:
I have tried quite a few themes for a while but now a I can't apply any. Not even the stock theme.

Huawei theme manager is stuck with the "applying theme" text. Deleting the theme manager data does not solve anything.

Does anyone else have the same problem?

L09C432B182

Enviado desde mi MHA-L09 mediante Tapatalk
[Huawei Mate 9 Themes, Apps, and Mods] tawkeer:
Mine says "theme applied" but still it doesnt change
[Huawei Mate 9 Themes, Apps, and Mods] NORDAF:
Same issue here, did you manage to solve it?
[Huawei Mate 9 Themes, Apps, and Mods] neilphetamine:
Did you reboot your device after apply theme ?

---------- Post added at 10:36 AM ---------- Previous post was at 10:32 AM ----------

It happens to me once. What i did is

1. Apply default theme.

2. Reboot device.

3. Apply another theme.

4. Reboot device again.

Voila! My device change theme.

Fyi, I'm using Mate 9.
[Huawei Mate 9 Themes, Apps, and Mods] tawkeer:
I managed to solve this.

my generated solution is applicable if you have rooted phone

Steps are

1. Open Es explorer, ensure you have enabled root mode.

2. Goto /data/themes/0/

3. Change permission of 0 folder to rwx rwx rwx

4. One by one change permissions of all 4 folders within 0 folder

I.e fonts , preview, unlock, wallpaper

Permissions must be rwx rwx rwx

5.now goto themes app, and apply theme.

Theme applied, and changes are visible.

You can also apply emui5 themes to emui4 using this method.

Everytime you wish to change the theme then you must repeat the above steps to assign permissions.

If certain theme effects are not visible, then a phone restart or ststemui restart will ne needed.

Good luck
[Nexus 6P Q&A, Help & Troubleshooting] sickfallout:
Hey all,

Ever since opting into the Android O beta, my Nexus 6p has been working fine, except for connected to my car via BT. It connects, but just shows 'Unknown Artist' for any kind of track info, and if I switch playback apps (for instance, from Pocketcasts to Google Play Music), my phone disconnects from the car for a second or two, connects again, and still doesn't work. The car in question is a 2016 Mini Cooper S. Anyone else seeing issues like this? Works fine on 7.1.2.
[Nexus 6P Q&A, Help & Troubleshooting] JaegerStriker:
ive got the same issue vw polo. audio plays via bluetooth but no artist info it just shows im connected to 6P and skip track controls dont work just mute and volume
[Nexus 6P Q&A, Help & Troubleshooting] sickfallout:
Yeah, I don't even get audio. Nothing actually plays, car displays "unknown artist".
[Nexus 6P Q&A, Help & Troubleshooting] therealbroxy:
I have this as well on a 2017 toyota, calls etc work fine, just music dips out
[Nexus 6P Q&A, Help & Troubleshooting] JaegerStriker:
what are the bluetooth settings in the developer setting section?

mine are as follows if you want to try them to see if it gives you some audio

Bluetooth AVCRP Version

AVCRP 1.6

Bluetooth Audio Codec

Streaming: SBC

Bluetooth Audio Sample Rate

Streaming: 44.1kHz

Bluetooth Audio Bits Per Sample

Streaming: 16 Bits/Sample

Bluetooth Audio Channel Mode

Streaming: Stereo

Bluetooth Audio LDAC Codec: Playback Quality

Streaming: Optimised for Audio Quality
[Nexus 6P Q&A, Help & Troubleshooting] sickfallout:
Thanks for the setting tips, I'll try them out tomorrow and report back.
[Nexus 6P Q&A, Help & Troubleshooting] sickfallout:
No luck, same issue persists. I even tried usb-c to usb-a, but my Mini doesn't recognize it as an audio device that way :( Time to get a new head unit possibly.
[Nexus 6P Q&A, Help & Troubleshooting] sickfallout:
No luck, still 'unknown artist' and no audio, even though my phone thinks it's connected and playing.
[Nexus 6P Q&A, Help & Troubleshooting] Triscuit:
Do you have this issue on 7.1.2 as well? Don't forget Android O is still in "beta" and I wouldn't be surprised if the BT is a little screwy still.
[Nexus 6P Q&A, Help & Troubleshooting] sickfallout:
Everything works fine on 7.1.2, I had to decide what was more important: working car audio or a much faster OS experience. Hopefully this is something that's either fixed in the release of O, or something my car manufacturer can patch into their system.
[Nexus 6P Q&A, Help & Troubleshooting] arts711:
Not sure if this will help but my car seems to have pretty good luck with this technique and BMW/Mini ICE systems are similar. I use the aac codec keeping everything else default. I've had the issue a well where it's playing on my phone but not the car; the info also doesn't show. Restarting the phone right before starting the car or soon after seems to be relatively effective as it would then connect after the restarts and actually play the music correctly and show the info.

Not the best solution but hopefully this ends after the final is released.
[Nexus 6P Q&A, Help & Troubleshooting] antosand:
Hi! I hope this helps. It seem like changing the setting (unchecking) for AAC audio helps with the issue. This seems to be a new feature in Oreo, so go to Bluetooth settings and in the little gear next to device it will popup with a couple of options, uncheck AAC.
[Sprint LG G6 Questions & Answers] chaosrecords:
I have an employee account, so I have to deal with chat/ care always when swapping devices.

For the first time I had a rep stall a few times in chat about the MSL

Finally coming back to asking " why do you need the MSL"?

Its apparent that this has been discouraged from Sprint, They will give it to you, but they will ask for a legit reason.

If you want one that actually IS Legitimate... Just simply state you want to change your Slot Cycle Index because you don't have great reception, and you are aware it will drain the battery. Or you are tired of having your phone go to voicemail after 3 rings ( it increases the radio's beacon on your phone's timer so it searches for a call/ data at a faster rate)

This is something ive done with every phone for the last decade.

The last two devices Ive had have not been rooted..because of these bootloader lockdowns.. But for tethering i just use "Easy Tether Pro" and it works like a charm and you don't need to change any MSL settings.
[Sprint LG G6 Questions & Answers] uacolon:
Thanks for the Post .

Have you been able to Change the slot cycle index it on your G6? That option is locked on mine.

This and the ACCOLC setting where my favorite setting to change as soon as i got a new phone back in the day.