2

By battery insertion I mean current flowing on the battery pins, not the micro USB port.

Description

The phone in question is a Samsung Galaxy Xcover 4, the bootloader is unlocked, and I have root access. Its intended purpose is as a kiosk device that will be sealed inside an external hard plastic enclosure. This means that the power button is unavailable for booting the phone. The phone is powered directly from the wall by means of a custom-made battery eliminator PCB, and I need the micro USB port for host mode UART communication, which means it will never be charged/powered via the micro USB port.

What has been attempted so far

As mentioned, the device is rooted, so I've tried modifying the BOOT partition image and flashing an updated one. The modifications I've been looking at pertains to the program

/init

in the root directory. and its associated

/init.rc
/init.samsungexynos7570.rc
/...

files. For example, I was able to make the phone boot upon receiving charge via the USB port by overwriting the contents of the file

/system/bin/lpm

with the script

#!/system/bin/sh
echo b > /proc/sysrq-trigger

because /system/bin/lpm is referenced in a service specified in the charging section of /init.rc. I was also able to make it boot via USB port charging by removing the existing "on charge" triggers in the init.*.rc files, and simply adding

on property:ro.bootmode=charger:
    trigger late-init

For more details about what I did, see this link. But this is not a solution for me because I want to make it boot simply by powering the battery pins, not the micro USB port (which is preoccupied with being in host mode, so it definitely can't be charged).

Further thoughts

However, since modifying the /init.rc file changed its behaviour even while "off" (i.e. it now boots upon micro USB charging as opposed to not), this seems to tell me that the phone is never really completely off when "off", and that the /init program is constantly running as long as there is enough charge on the battery pins (please derail this thought train asap if this is completely wrong). Which would mean the kernel and the /init program should start automatically when there's sufficient charge on the battery pins. So my thinking was to simply add something along the lines of

trigger late-init

or

start <my_service>

(where my_service for example could be the lpm script I mentioned above) in an early init trigger stage, so that it would boot simply by virtue of the /init program running. But so far I've had no luck.

Does anyone know whether something like this would possible? Thanks for your time.

2 Answers 2

2

I soldered the pins of my Nexus 7 2012 Gen 1 and the device did start up. The soldering simulates an always-pressed power-on button.

However, I tried the same with the Nexus 7 2013 Gen 2 and it turned itself off again because the button was always pressed. So I needed to solder a capacitor and a resistor in series to simulate a short button press. This worked for me, but the software solution would be more elegant.

I could measure only a few uA when the battery is plugged in so I can't imagine a part of the bootloader powering up on the mentioned devices. My idea is now to solder the power supply directly to the micro USB port as for data only 2 pins (USB2.0) are used. USB Pins: https://www.giga.de/downloads/microsoft-windows/tipps/usb-anschluss-farben-stecker-bedeutung-und-erklaerung/ (German)

Then the device will start up with the lpm script or the fastboot oem off-mode-charge 0 change.

0

Buy a USB-C hub with power delivery (PD), then you can charge and use all the USB's out there, or HDD/SSD.

I've done this for a Samsung Galaxy A30s and I use one on my Chromecast with Google TV, and as long as the file is under 4GB (FAT32) like music or movies, but struggling with not getting 4K and there's no 6 channel movie player to get because I think Google hasn't connected 6 channels to other than "Streaming services", not even VLC?

1
  • This doesn't address the question, which is about the battery.
    – Chenmunka
    Commented Apr 4, 2023 at 7:45

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .