yashsingh1/xdaforums huggingface dataset:
[Verizon Droid Incredible 2] AZKJS:
Last Night I flashed a new rom to my DInc2 and afterwards found that amazon app store wouldn't allow me to login saying that there was a "Temporary Error" and that I need to "Try again Momentarily".

After trying for an hour on and off I gave up and went to bed thinking that it was just amazon doing maintenance or something.

When I woke up later i tried again. SAME THING!

did a little investigating and found that flashing roms and reloading the app registers a new phone to your account.

I guess there is a limit of 25 phones that can be registered.

I had to go in and "deregister" some of them to make room.

It says to only "deregister" if you are selling your device because you will not be able to log in on that device again. but it fixed my problem and I logged right in.

Maybe I'm flashing new roms a bit too much. :rolleyes:
[Verizon Droid Incredible 2] deaffob:
I never had to re-register my appstore because I use TiBu :)
[Verizon Droid Incredible 2] Avelnan:
I had to do that twice.
[Verizon Droid Incredible 2] Brianps:
Could you tell me how you de-registered?
[Verizon Droid Incredible 2] suland:
Go into your Amazon App Store from the web and select devices, then you will see all of them in a list with the options to de-register or rename.
[T-Mobile LG G2x] speedy00002:
Dose any one know when they get the superclickone will be able to root the update??
[Acer Iconia A500] officetally:
Buying an iconia today, just wondering if you need to fully change it out of the box before you even use it/turn it on. Thanks
[Acer Iconia A500] kjy2010:
Mine came with about 50% charge on it, but your mileage may vary. ;)
[Acer Iconia A500] BBAHunter:
Mine came with no charge at all (completely dead) and someone elses email and ebooks configured and configured for Staples in store wifi...

I think they were playing with it a bit. Works fine now, I deleted all that crap.
[Acer Iconia A500] dweebken:
My two came with about 50% charge as well. Enough to play with for a while, but you shouldn't let the battery get very low before charging it, as its not good for the battery service life.
[Acer Iconia A500] techpreneur:
Mine came with 90% charge
[Acer Iconia A500] pov1:
Normally comes around 40% +- storage/shelf life is best at that charge. So short answer , charge it.
[Acer Iconia A500] vari9:
Mine came with 50% charge......according to the manual...first charge should be for four hours...
[Acer Iconia A500] strider_mt2k:
Mine came with enough power to tell me to charge it.

I plugged it in and continued the fun.
[Android Software Development] EricHegnes:
My colleague and I are writing a program to encrypt SMS using the RSA protocol. The program will be available to the XDA Community and is nearing completion (deadline in one week). The UI front-end uses WebView, and the RSA back-end uses Python. Regardless.

Our problem comes in the form of communicating the keys. The keys will be sent rarely, but are ~8KB large. A peer-to-peer protocol would be ideal, setting up a server (externally) is impractical, and MMS is not built in to Python. Even a method to associate a phone to its specific network address would be helpful. If anybody has any ideas, please post below.

All contributions will be recognized through comments in the code! =)

Thank you in advance.
[Galaxy Tab Q&A, Help & Troubleshooting] DavidThompson256:
Appologies if this has been asked/answered here before. I tried searching, but didn't find any solution. Maybe someone else has stronger Google skills than I.

Here is what I am trying to do. I'd like to find a way to have the Galaxy Tab power on automatically when it is plugged in to power and begins charging. My company has several Galaxy Tabs (rooted) that are being used for a specialized purpose. They should be plugged in 24/7. However, it is possible that they will lose power, and the battery will eventually run down. When power is restored, I'd like to be sure that they come back on, without any user interaction.

I don't THINK this is the case, but it is worth asking: Is this a standard Android setting I can change anywhere?

I assume I will have to modify some code. Right now, I notice that when the Tab is turned off, and you plug it in, the charging indicator shows up and displays the battery levels. To me this indicates that code is running SOMEWHERE as soon as the Tab gets plugged in. I'd like to hijack that, and just have it power on.

Does anyone know where I should start looking for the code that runs when the device is plugged in? I found a charging.jpg in /mnt/.lfs that seems to be the image that displays, but so far no sign of what code is running. If there is any sort of init script, that would be amazing if someone could point that out.

Even if you don't know how to accomplish this, if you have any helpful pointers or "take a look at these files" to point me in the right direction, I'd really appreciate it.

As always guys, thanks for all the help!
[Galaxy Tab Q&A, Help & Troubleshooting] DavidThompson256:
SOLVED: Power on when plugged in (boot when docked)?

Hey guys, I know that no one else may ever have any use for this, or even care, but I wanted to post an update. I was finally able to get this figured out through some guess work, trial and error, and looking at the work someone else did on a fairly similar project.

I owe plenty of credit to the fine work done by Chainfire on his project described in this link. His work, while not the same project, demonstrated that something similar to what I wanted to do WAS possible.

Anyway, to make the tablet boot up when first plugged in- The battery charging indicator that runs when you first plug in the Galaxy Tab is run from the file /system/bin/playlpm. To make it boot automatically, delete the old playlpm (or better yet, rename it to playlpm.bak, just in case) and replace it with the following script.

/system/bin/playlpm

#!/system/bin/sh
/system/bin/reboot

Be sure to set the ownership and permissions the same as the old playlpm. It didn't work for me at first because I had forgotten to give execute permission.

Thats all that it takes. Most of the time, the Tab should have enough power to go straight to booting. If the battery is really dead, it may flash the charging battery icon a few times, failing to boot until it gets enough charge. It will eventually come on.

I don't know of any additional side-effects for doing it this way, but there may be some, I don't know what else the stock playlpm is supposed to manage. This worked for my purposes though. Hope it could help someone else.
[Galaxy Tab Q&A, Help & Troubleshooting] RickyLan:
Hi DavidThompson256,

Just want to say thank you for your research, I've been looking for the same thing a few months and just discovered your post.

I thought it is something to do to the kernel but looks like this simple mod can do the trick.

Thanks again!
[Galaxy Tab Q&A, Help & Troubleshooting] prscott1:
Ironically, I have an opposite problem. My phone automatically reboots when plugged in. My searching led me to your post. I installed the nomoarpower app but I could get it to keep my pad turned off. LOL
[Galaxy Tab Q&A, Help & Troubleshooting] dhoai:
Did you have to root the tab before making this change?

Thinking about picking up the Galaxy Tab Plus but need it to do the same thing and boot when the power is plugged in.
[Galaxy Tab Q&A, Help & Troubleshooting] knownchild:
An update?

I have cm9 how do i find the file for my gsii?

there is no such file as the one you speak for my device, how did you find what file yours was?
[Galaxy Tab Q&A, Help & Troubleshooting] pheonixsingh:
I am having a similar issue with a Nexus 7

http://xdaforums.com/showthread.php?t=1815131

I cant find the file mentioned, I am assuming its probably renamed to something else, any advice would be greatly appreciated!
[Galaxy Tab Q&A, Help & Troubleshooting] Decert0:
As many others I dont have this file on my galaxy tab II

But i do have the kernel doing someing when pluged in when the device is not powerd on. First it tryed to show the splash img and then starts the charing animation. Does anyone know where this script is launched on a galaxy tab 2 7"?
[Galaxy Tab Q&A, Help & Troubleshooting] rasssta:
Thank you! Been looking like a mad person for a solution like this for a couple of days and only found NoMoarPowah, which didn't fit my needs. :D
[Galaxy Tab Q&A, Help & Troubleshooting] daclothe:
Thank you...worked perfectly on my SGS3
[Galaxy Tab Q&A, Help & Troubleshooting] luuma:
on the s6500

thanks, this was really helpful. I've got this working on the Samsung Galaxy s6500 (mini 2), and I had to make a small addition to the script:

#!/system/bin/sh
su
/system/bin/reboot
[Galaxy Tab Q&A, Help & Troubleshooting] chtc2005:
Thank you. I have a galaxy tab p1000 in my car, with your help my tab will automatic turn on when engine start , it completed amazing :). Thanks again.
[Galaxy Tab Q&A, Help & Troubleshooting] thompsos:
I made one minor tweak to the code, as follows:

#!/system/bin/sh
sleep 20
/system/bin/reboot

This makes the program wait 20 seconds between recognizing that the device is plugged in before issuing the reboot command. This helps ensure my device has enough juice to actually start, hopefully on the first try but if not, then on the second.

You can adjust the sleep length as desired - see here: http://www.cyberciti.biz/faq/linux-unix-sleep-bash-scripting/
[Galaxy Tab Q&A, Help & Troubleshooting] XTDragonHawk:
I tried to install this app on my Galaxy Tab P1000. (Official Android 2.3.6 - rooted)

I always got the error message "202 - not enought space on /system ..."

So I installed MIUI V5 and MIUI V4 on my Tab.

I was able to install the app on both ROMs.

But both of them are not working properly.

If I turn off my device, it shows me the "new" battery info.

One second later, the display is getting darker.

One more second later, the display is turned off.

I am also not able to click on "reboot now".

(the timer option is working fine. I can set it to 2330 and the Tab will start at this time)

I want to use my Tab in my car instead of the built-in radio.

So I need that app getting working! :D

Please tell me which ROM u're using and which kernel :)

I'd be happy if someone else could help me with my problem :)
[Galaxy Tab Q&A, Help & Troubleshooting] chtc2005:
Check pm, hope that can help you some.
[Galaxy Tab Q&A, Help & Troubleshooting] majzok:
I have galaxy tab 2 p3100, replaced /system/bin/playlpm with given code, but after i plug charger nothing happens: just charging icons like always.

Anyone have idea how to fix this?
[Galaxy Tab Q&A, Help & Troubleshooting] annlee:
Same problem here, did all the process including the correct permissions etc.. and appear battery stucked and then dark blue screen.

I am using samsung galaxy trand, as happens to your galaxy tab 2, seems our OS version 4 does something before playlpm or does not work, or am I wrong?

please help
[Galaxy Tab Q&A, Help & Troubleshooting] BlancScha:
auto power off when unplugged, and wont switch on

Its seems like my tab is crazy!

After installing cm 10.1 cdesai.zip my tab is currently having problems with data provider, debug mode,and now its seem to

Getting more worst!!! :'(

I can't use my tab unless I plug in the charger, or else it won't switch on! When unplugged it,my tab auto shut down and won't turn on until u press the power on button and quickly connect the charger...

(using it now with charger on!! :'( ) if there's anyone know what's the real problems here pls HELP ME!! and pls share with me how to stock back from cm10.1 to GB STOCK??? I really feel so desperately now!! :'(

Thanks in ADVANCE!!!
[Galaxy Tab Q&A, Help & Troubleshooting] majzok:
I got it working on tab 2. Here what I did:

1. Install stock 4.0.4

2. Install NoMoarPowah! apk

3. edit file like in first post
[Galaxy Tab Q&A, Help & Troubleshooting] SadamHu:
Hi there, I'm a noob! I have a rooted Galaxy Note (first one), how do I write this script? Do I have to make a file and inside the file just write that text in there? And is that all I have to do to make my phone autoboot on charge?
[Galaxy Tab Q&A, Help & Troubleshooting] ollly:
Thanks that worked for Samsung S3 GT-I9300
[Galaxy Tab Q&A, Help & Troubleshooting] ahhl:
reporting again here on successfull on making auto boot redmi note 7 global on android 10 miui 12

after sucessfull install orangefox recovery and install magisk using orangefox.

boot into system and use total commander to search for init.rc

modify the on charger line from

on charger

class_start charger

to

on charger

exec u:r:magisk:s0 -- /system/bin/reboot

save the init.rc and boot into recovery, mount all partition. go to where you keep the init.rc and set permission to 644

the copy/paste ( using orangefox file manager) init.rc to \system_root folder.

then turn off the device and plug-in charger. the device will boot twice and boot into system..

walla
[Galaxy Tab Q&A, Help & Troubleshooting] himi24:
Can anyone explain why replacing the /system/bin/lpm file with a new one will stop it from being executed?

I was trying this on a samsung S9 which needs auto-boot.

- made a backup copy and replaced the original lpm with one I edited on my computer

- changed permissions, owner and even creating time

touch -r <original_file> <new_file>

but the charging logo is stuck which shows me that the script is not being executed.

I also fixed the SeLinux context using twrp, but this did not help.

At the moment I am downloading the stock firmware to reset everything and try again without removing/replacing the lpm file.

However it would be very interesting to know what is happening here!

UPDATE:

I can now confirm that that the autoboot also works on a samsung S9.

The following adb shell now works without problems:

su
mount -o rw,remount /
echo "#!/system/bin/sh\nsleep 20\n/system/bin/reboot" > /system/bin/lpm
[Galaxy Tab Q&A, Help & Troubleshooting] alecxs:
restorecon is most useless twrp option ever seen. only way to set proper secontext is with chcon

or alternative workaround keep existing inode and only change content of existing file (with stdout redirection like you did)
[Galaxy Tab Q&A, Help & Troubleshooting] abhijeetm2:
Thanks!! This worked for me for Galaxy S6 Edge Sprint on stock ROM (7.0) unlocked and rooted.

These were my steps:

1. Boot into TWRP recovery.

2. Go to Mount menu and select System.

3. Go into Terminal and did below commands

su
mount -o rw,remount /
echo "#!/system/bin/sh" > /system/bin/lpm
echo "echo b > /proc/sysrq-trigger" >> /system/bin/lpm
exit

su command gave an error but I ignored that.

4. Unplugged charger and tapped Reboot>System. Phone rebooted into recovery.

5. Go to Advanced Wipe and clear Dalvik and Cache. Again tapped Reboot>System. Phone booted normaly. Switched off device and connected charger. Worked as expected. Tested several times with same result.
[Galaxy Tab Q&A, Help & Troubleshooting] xgep:
Ok this is driving me nuts. I have a Samsung Active Tab 2 which I previously had successfully setup to boot with power. I was running it on my motorcycle as a nav system and it worked great. However several months ago I returned it to the regular configuration so I could use it as a tablet.

Well now I'm putting it back on my bike and I can't get the damn thing to work again. The tablet is still rooted, I have the lpm file permissions correct, I've tried every combination provided and I can't find one that works. It briefly shows the charging icon and then doesn't boot fully, the screen lights up but nothing from there. I have to pull the battery to turn it off and then I'm able to start up from the power button. I just cannot figure out what I did differently before to get it to work.

Any thoughts?
[Galaxy Tab Q&A, Help & Troubleshooting] abhic7:
Hi All

New Update

This was tested on Android11

1. For TouchUI or OneUI you need to edit system/bin/playlpm

2. For AOSP based rom you need to edit system/bin/lpm

I used Total Commander File manager to make the below changes

Total Commander - file manager - Apps on Google Play

Android version of the desktop file manager Total Commander (www.ghisler.com).

play.google.com

#!/system/bin/sh
su
/system/bin/reboot
[Galaxy Tab Q&A, Help & Troubleshooting] ivandena:
I tried some fixes with my Samsung S8 plus but couldn't get the boot to work when the power is on.

But how is it possible that even with the original lpm file it doesn't work anymore?

I do not know what to do...

I can't figure out how to apply the cat commands ...

Can you help me?
[Galaxy Tab Q&A, Help & Troubleshooting] Saber2th:
how did you do it please tell me
[Galaxy Tab Q&A, Help & Troubleshooting] Saber2th:
the file does not repack
[Galaxy Tab Q&A, Help & Troubleshooting] Saber2th:
i dont have custom recovery can i do it sitll please tell me the steps i am confused now
[Galaxy Tab Q&A, Help & Troubleshooting] ahhl:
you have to change to custom recovery as stock recovery wont allow you to do any modification
[Galaxy Tab Q&A, Help & Troubleshooting] Saber2th:
Ok can you please tell me all the steps as I have no knowledge of doing this and have done some small things to make my phone a dash camera
[Galaxy Tab Q&A, Help & Troubleshooting] ahhl:
sorry,

i am not good in teaching stuffs.

you need to go to redmi 6a and search there on how to root your redmi.

before that you need to unlock your bootloader first, which you can access the menu once you enable developer option on the phone.

long steps, but you can find it at redmi 6a forum. l am not using redmi 6a anymore so can't remember exactly which custom recovery you need to use. good luck. i break 3 redmi 6a in this attempt :eek::ROFLMAO: before i successfully made it auto boot, luckily it all refurbish redmi, so its cheap
[Galaxy Tab Q&A, Help & Troubleshooting] byfgjk:
Hello,

I'm trying to get the piece of Samsung g*rbage T510 to do the same.

My question is how can you actually modify the /system/bin/lpm file? If I do it when the tablet is booted I get device is busy error and when connecting to adb from twrp that file doesnt exist. I have magisk root.
[Galaxy Tab Q&A, Help & Troubleshooting] alecxs:
read the Magisk Developer guides how to overlay system files on systemless-root
[Galaxy Tab Q&A, Help & Troubleshooting] Ahmed Shawky:
Where exactly you write this command
[Galaxy Tab Q&A, Help & Troubleshooting] Ahmed Shawky:
Is that for samsung?
[Galaxy Tab Q&A, Help & Troubleshooting] alecxs:
Does your Samsung device have fastboot mode?
[Galaxy Tab Q&A, Help & Troubleshooting] himi24:
On my PC connecting to the phone via adb shell

ADB Tips & Tricks
[Galaxy Tab Q&A, Help & Troubleshooting] chemicstry:
Is it possible to make such patch as a Magisk module so that no boot.img patching is required? I'm not too familiar with android modding and wondering if Magisk is loaded at all at this stage? Any help would be very appreciated.
[Galaxy Tab Q&A, Help & Troubleshooting] alecxs:
#196 you tell us
[Galaxy Tab Q&A, Help & Troubleshooting] chemicstry:
I've read that guide multiple times (before asking the question), but I don't see my answer there. The last section about modifying rc files requires flashing ramdisk and if I understand correctly does not work with modules. So the answer is no?
[Galaxy Tab Q&A, Help & Troubleshooting] alecxs:
I didn't say there is an answer... you can figure out and tell us. btw what do you mean, Magisk is loaded [...] no boot.img patching is required? Isn't that oxymoronic? :)
[Galaxy Tab Q&A, Help & Troubleshooting] chemicstry:
I meant that I want to apply this modification with just a magisk module (zip).

Currently this modification requires unpacking boot image, modifying ramdisk and reflashing, which I rather not do if there is a way without flashing (magisk module).
[Galaxy Tab Q&A, Help & Troubleshooting] alecxs:
so why not place your .rc in /data/adb/modules/*/system/etc/init and see what's happen
[Galaxy Tab Q&A, Help & Troubleshooting] chemicstry:
It seems that it is impossible to add init scripts via modules: https://github.com/topjohnwu/Magisk/issues/933

My added `.rc` file appears in `/system/etc/init/`, but is not loaded as confirmed by `dmesg`.

The alternative way of patching ramdisk is not as straightforward either, so here is how I got it to work on Xiaomi Note 10 Pro:

1. Get boot.img (mine was from original ROM zip, patched with magisk)

2. Unpack with `magiskboot unpack boot.img`. The `magiskboot` is not in PATH and can be found in `/data/adb/magisk/magiskboot`.

3. Create custom.rc:

on charger
exec u:r:magisk:s0 -- /system/bin/reboot

4. Modify ramdisk with `magiskboot cpio ramdisk.cpio "add 0700 overlay.d/custom.rc custom.rc"`.

5. Repack boot.img with `magiskboot repack boot.img`. A new-boot.img will be created.

6. Flash via `fastboot flash boot new-boot.img`.
[Galaxy Tab Q&A, Help & Troubleshooting] alecxs:
Thx for pointing out. So all you can do is flashable zip anykernel3 that can applied to from TWRP (I never did but should be possible)
[Galaxy Tab Q&A, Help & Troubleshooting] oskarosi:
Have any of you tried to get auto boot on charge in Lineage OS 18.1?
[Galaxy Tab Q&A, Help & Troubleshooting] abhic7:
Hi All

I have written new instructions as I had to redo my auto boot on a new phone as the previous method was not working

Here is the link to my GitHub
[Galaxy Tab Q&A, Help & Troubleshooting] HansHeiners:
This is the only method that worked for me, as all the files mentioned in this thread don't exist on my system. Thank you so much!

My Device: Asus Transformer Pad TF300T

Rom: KatKiss ROM Nougat 7.1 Release by Timduru

This is a AOSP-based rom -> maybe works for other AOSP-based roms as well?

Good to know: You don't even need an PC for this, you can complete all steps with the App "Total Commander" directly on the device.
[Galaxy Tab Q&A, Help & Troubleshooting] ebod:
Hi @leahcimx , I'm here in Feb23 also trying to re-purpose a Galaxy Tab A ( SM-T295 ) into a piggyback head unit to drop onto my Volvo C70. I'm an newbie to Tasker/Autoinput and drafting a task to auto-shutdown, but I'm here looking for support to set up the device to auto-start on USB power. I've got a very rough grasp of doing adb commands on a PC but not smart enough to take it further and in need of spoonfeeding assistance to get me over the line. Can you or anyone else reading help me ???

Thx
[Galaxy Tab Q&A, Help & Troubleshooting] alecxs:
sure.. where is the spoon stuck now?
[Galaxy Tab Q&A, Help & Troubleshooting] ebod:
Hi, OK status of now is I have TWRP and root & Magisk etc and believe I need to swap out a file 'lpm' in system/bin folder. I'm able navigate there using the TWRP explorer and make a copy of the file plus rename to lpm.old.

The area I've fell short is the ability to either edit the copied lpm , or create a new lpm....so I need support to get a replacement lpm file dropped into system/bin. This is either by recommending a file editor/creator app and giving me appropriate script to copy/paste into the file.

..then was there another element regarding setting file permissions?
[Galaxy Tab Q&A, Help & Troubleshooting] alecxs:
but that requires you to modify system. I wouldn't go that far. you can try the method described in post #207 first. for this I recommend to unpack magisk_patched.img with AIK and add the .rc file in overlay.d
[Galaxy Tab Q&A, Help & Troubleshooting] ebod:
erm...that #207 post is a foreign language to me.

As with most things reading a total newb, its never clear whether the action is on the device..or on a pc connected to the device.

What you've said in one sentence is probably perfectly clear to someone who knows what they are doing...but then theres me...:-/

Can you break this down into babysteps that a geriatric like me can follow?
[Galaxy Tab Q&A, Help & Troubleshooting] alecxs:
on PC, extract Android.Image.Kitchen.v3.8-Win32.zip and drag & drop your magisk_patched.img onto the unpackimg.bat
[Galaxy Tab Q&A, Help & Troubleshooting] ebod:
So where is this file? /data/adb?
[Galaxy Tab Q&A, Help & Troubleshooting] alecxs:
if you don't have magisk_patched.img on PC, you can create TWRP backup of boot partition and use the boot.emmc.win from TWRP/BACKUPS/