Auto boot on charge - Galaxy Ace S5830 General

Hi there, I'm trying to turn my old Galaxy Ace to a standalone webcam with the battery replaced with a proper grid connected power supply.
Obviously, whenever the power goes temporarily down, the device goes into the charging status (green animation).
Instead, I would like to make it automatically boot when powered, just like windows phones used to.
Here are a few common methods which do not work in my case:
simple fastboot command from PC, since we have odin instead of fastboot;
replacement in the system/bin/lpm or playlpm file, since Samsung didn't use it then yet (there is no "lpm" service mentioned in the kernel);
modifications to the charger class launch in the kernel (within init.rc script). I fear that the cross between charging status and normal boot happens at an earlier stage in our device, am I wrong?
The closest solution to my problem was due to the CM 9.1 which happens to be the only ROM that reboots the device if you plug the charger after a manual shutdown. Unfortunately, if I suddenly power down and up the phone (it's like removing both battery and charger), I go into charging status again.
However, this ROM gives me some hope, because it means that the kernel itself can somehow play a role.
I would be glad to hear your ideas. Thank you!

Related

[Q] Charging only when turned off, 4.1.1.

Hi, everyone. I've seen the other threads and no one had a problem quite like mine.
Yesterday I've upgraded my Alcatel OT-997, ICS 4.0.4. with Kuano's TWRP and now it's:
Alcatel OT-997D, JB 4.1.1. - (details in this thread, 5th post) http://forum.xda-developers.com/showthread.php?t=1981692&page=89
D means I can now use two SIM cards, which is cool.
The problem is the damn thing doesn't charge when it's turned on. It shows the lightning bolt over the battery icon, but in settings shows that charger is not connected. However, when it's turned off it charges, normally. I tried different settings in USB menu: Mass storage, MTP, Camera mode and Charge. Tried with and without Debugging mode. All of those work when connected to a computer in the sense that I can use internal storage, access both SD cards, and so on. But it doesn't charge.
I have tried 3 different cables, 3 wall outlets, and 2 PCs so it's not that. I suppose it's not a hardware problem otherwise it wouldn't charge properly when it's turned off.
So now I use schedule to turn it off before I go to sleep, and to turn on before I wake up, so it would charge while I'm sleeping. Anyone's got any ideas how to fix it?
Bump
Well I solved it with reinstall
Finally I've lost my patience so I tried the only thing that was left.
First I did a backup with TWRP.
Then, factory reset from TWRP.
Then, restore system from One Touch Upgrade 2.8.0 - lost the DUAL capability, software restored to 4.0.4.
Now comes the interesting part. It had the same problem as before, did not charge while on. So I tried a solution I found online a while ago but I never tried when on 4.1.1: Turn it off, connect charger, remove battery, wait a bit, press power button for approx 10 sec (nothing hapens), wait a bit, instert battery, turn it on and there it is. I'm not sure if it was this procedure that did the trick or it simply needed a reboot after update but it worked. It showed "charging" in battery stats.
Finally, restore with TWRP as Kuano explained in his post. Mind you, when I did the restore it was connected to my PC all the time.
Now two things I you should know:
First, before I did all this I connected it to my PC while turned off i.e. (PC - ON, phone - OFF). I noticed this: it was constantly connecting and disconnecting (the "piano chord" notification was coming from the computer speakers every 5 sec) like I was pulling the cable in and out. That is all I know about this, I didn't have the nerves to work on it.
Second, now that it is restored and charging, when I connected it to PC it couldn't change USB setting from Charge to MTP. It reported an error something like "service stopped". This happened only once and I did not try to do it again, I just don't have the energy for any more problem fixing right now. It charges, and I use airdroid for file transfer, that is all I need for now. If and when I get around to take a look at it I'll post here if there's something interesting.

I tried to shutdown android phone from the terminal, now it is frozen, any help?

Hi,
I use Uhappy UP920, chinese phone, 6 months old,
my power button is sometimes hard to press, it is not working so good, so, I used IDE terminal in my android kitkat to shutdown my phone. I used next commands:
su # to become root
shutdown -k
I saw it is switching off, but during shutdown, phone is not totally shutdown than there is still the name of the phone on the screen and it is frozen. I can press power button how much I want, no result, I tried to press it in the same time with volume button, no result. it is not possibly to remove batter and to put it back.
so, this is not about locked pattern, about working phone so I could install app for changing power button to volume button, this is about frozen android software, I can't start it, when I use USB cable, computer doesn't recognize the phone, so, battery is not charging. I don't have ac adapter, I use USB to charge it. but battery is not totally empty, battery was 34% full when I tried to shutdown the phone.
any help?
is there any software I can start from computer and push the phone to start?
in this moment I use windows 7 but I can try Linux too, as I said, when I put USB cable in PC and my phone, nothing happens, PC doesn't recognize the phone, phone is not recognizing USB cable, batter is not charging as it does usually when I plugin the cable.
hi, I don't see option to delete thread/topic, i solved problem with pressing power button very strng on the table, it was finally shutdown and system booted again. problem solved.

Lollipop 5.1 bootloop....sort of?

Hello everyone,
I've been a reader for a while, purely out of interest. I've never really dabbled with customizing android. In that regard I am a noob... I recently acquired a Medion X6001 that I was planning to build into my car as informant/navigation. Phone root successful, developer options active, debugging and oem options active. Automate programmed to all the standards I was happy with., worked great. All that was left to do to was get the thing to boot on charge. The "fastboot oem off-mode-charge 0" command was unsuccessful so I resorted to trying to find the system file responsible for battery icon on charge with power off.
That's where I went wrong. This phone has two icons; first a battery with a bolt, then switches to another with blue fluid and battery percentage. I found the blue fluid battery icon - 'system/bin/kpoc_charger', unfortunately I needed the killswitch battery icon. So I made another guess and renamed - 'system/bin/lmkd'. This was the file directly before ...kpoc and my daft logic lead me to believe that that might have been the right file. Obviously, it wasn't.
So the problem? The phone won't boot. Not really... At first, it was entirely stuck in bootloop. So, the good sheep I am, I factory reset the phone through recovery. The phone still went into bootloop for a few minutes, but came out of it to an applet saying 'optimizing apps'. Took 10 minutes to optimize and then went through to another applet saying something along the lines of "system process not found, do you want to wait?". Behind this applet I could tantalizingly see the startup screen of a freshly reset android.... It gave the option to wait or push ok, neither of which were actually active to touch. If I held the power button it would give me the option to shutdown, reboot or screenshot, also none of which where actually active to touch.
So after more googling, I wiped the cache through recovery. Everything stayed the same; bootloops for a few minutes then applets. Only now everything is in Chinese kanji... which is why I can't reiterate verbatim what the applets originally said...
After around 12 hours of tirelessly searching the web I've tried everything I've found but every time I get through a door there's another one closed. I can't install twrp or clockwork, I can't flash the rom, the phone won't let me unlock the bootloader in fastboot. Went I type the command it asks if I want to unlock it: volume up yes, volume down no. But fails: "remote access denied"
Since the factory reset, I don't have access through adb anymore. If I let the phone boot I can see it connect to the computer, but only as mtp. The file is entirely empty. I have no access to usb debugging. And to remotely access that, I need to be able to unlock the bootloader.
I can't get around the blocks and everything that is advised to get around bootloops and flash through fastboot are seemingly impossible because I no longer have proper access. But I can't get into the phone to get access...
And to make matters worse, just now as I type this.... I can't get into fastboot anymore. I think the phone battery is dead, but apparently doesn't accept a charge. When I plug it in the battery symbol appears, the dark red led lights up indicating very low battery. Very shortly after that the led turns off, which is not how it was before I buggered everything. Battery icon stays on, but when I push the necessary buttons to get into recovery, everything goes blank and the phone does nothing. When released, battery icon comes back and red led for a few seconds. Repeat. Phone has been plugged in all night....
I'm nearly bald from pulling my hair out. I hope there's someone out there that can give me a hand. I have a hard time believing I bricked the phone just by changing a bin file name.
Thanks in advance!
fastboot
I have access to fastboot again. Plugged the phone into a different cable, is now charging. I can see the battery % through recovery.
Back in business....sort of.
Any idea's welcome.
bump
Anyone?
Well I found the ultimate cure: buy a new one.
I will however keep fumbling around with the other one and hopefully as my knowledge increases I'll have a break through.

Boot on when charging

I would like to setup the tablet so that it automatically boots up if the charge cable is plugged in and it has power.
I am running lineage.
From reading online, this involves over-riding the program which produces the battery charging animation when you plug it in while off. The file is typically in /system/bin but the name varies. I have not been able to figure out which file it is
Has anyone been able to set this up?

Phone charges only when turned off, when turned on USB is not even recognized

Hi,
I came across a charging problem recently (happened all of a sudden, no clue why it is happening). My phone(m2 max pro) charges only I turn it off, when turned on the USB connection is not even recognized.
So, the only way to charge my phone is to switch it off!. This appears to be not so very rare problem, there are few posts out there (with different phones) complaining the same problem, but no working solution yet.
Few things:
1. Current rom is Arrow OS(m2 max pro), Android Pie.
2. Restarting the phone with the charger connected helps. The USB will still not be recognized though, but the phone charges(although, it charges slowly, the lockscreen shows - "charging slowly").
But, If I later disconnect and reconnect the charger it won't charge anymore, I have to restart with charger connected again.
3. Tried cleaning the USB port, tried clean flashing the rom(even with a different one), did not work.
5. Tried moving/adjusting the pin in the USB port slightly (recommended in one of the posts), did not work. Although, I didn't fiddle around this much, afraid I might damage the pin/port, will try again.
6. Tried draining it off completely to 0% until it auto shuts off and then charge it until 100% (this was recommended in one of the posts), did not work.
7. Tried different USB cables and ports(including original charger and wall port), did not work. I don't think this is a problem with cables/port.
I still think this was some kind of software problem, I hoped clean flashing the rom will fix this but was surprised to see that it does not!. or is it a hardware problem?
Anyone has a fix for this or seeing same symptoms(If so, how did you get around this)?
Thank you.
This is fixed now, after caliberating the battery(with a rooted app)
-> Rooted the phone(installed magisk), wiped cache and rebooted.
-> Installed Battery caliberation app[ROOT] (https://play.google.com/store/apps/...ot.superthomaslab.batterycalibration&hl=en_IN) and caliberated the battery.
-> Did a reboot and the problem went away
I didn't even had to wait until 100% to caliberate the battery (but the app recommeds so)
[EDIT]
The problem came back after a while, now its kinda randomly happening, most of the times it seems to work fine.
But, then again, it only charges, it does not recognize USB connection(to PC, which I used to connect to successfully previously), I don't see the "touch for more usb options" notification either. A workaround to this is to change the default usb configuration(in developer tools) to a different one (I am switching between File transfer, No data transfer, PTP), but as soon as you disconnect and reconnect the problem resurfaces (you'll have to again switch the default usb configuration and then reconnect)
I am perplexed!, I thought this is clearly a software issue and I hoped it would go away if I clean flash rom (the exact same build which worked fine previously, also cleared everything including vendor partition and excluding external sd card)

Categories

Resources