How to make Android 11 permanently not shut down on low battery. - General Questions and Answers

Pretty much noob here.
I have a Galaxy S3 Neo running non-rooted LineageOS 18.1 and the TWRP bootloader. It has a broken USB circuit. The Port looks fine after taking it apart but getting power or data connected is a 1/100 chance.
Because of that I attached an external charging circuit (TP4056) and while im at it upgrade it to 3 18650 cells for fun. This setup works fine except for one issue:
Androids internal battery meter is completely useless, due to the capacity being at least 4x the original and it not being able to measure charging as that is done by an external circuit. As soon as you "empty" the battery (wich it thinks way too early), it will not go up again unless i disconnect the battery and charge it to 100%, then reconnect.
My current "fix" is to connect via network debugging and run `dumpsys battery set level 42` wich keeps the phone from shutting down and just read the voltage with a small LED voltmeter thing I glued on the back, but having to connect to my PC every reboot sucks. I tried running the same command from a terminal emulator on the android device wich just states it could not find the service 'battery' even though it works via adb and 'battery' clearly is in the services list, even from the terminal emu. I tried smuggleing the command into a /system/etc/init/*.rc file as a oneshot service via TWRP's text editor but that did not change anything, probably because i did something wrong.
Idealy the solution would
* run automatically or be otherwise permanent
* prevent shutting down
* not require recompiling lineage

Related

[Q] USB data-only cable?

I often use the combination of a laptop with a smartphone on my way from home to work and back: the smartphone is used as an internetmodem for the laptop, and the USB-cable is used for the data-transfert between the 2.
Unfortunately the battery-capacity of the laptop is not enough to support both the use of the laptop and meanwhile charging the smartphone battery. So I would like to prevent the phone-battery to drain (too much) power from the laptop-battery. I can't switch off "charging through USB" in the phone since USB is the only available option to charge it. And -as I have learned from another thread in this forum- cutting the powerleads is no option too since the data-connection requires a minimumcurrent in order to work.
But what if I would modify the USB-cable with a small electronic circuit that would limit the current through the USB-cable to a value of about 50mA? That would be enough to enable the dataconnection but would prevent my laptopbattery being drained by the phone. Does anybody here have any experience with such a cable?

S2 nable to shut down while connected to power - Unable to Copy From USB Mass Storage

***SOLVED****I have a Samsung Galaxy Skyrocket 2 SGH-I727, rooted on gb 2.3.5. It has been working flawlesly for months. All of a sudden, when I connected the device to power I was UNABLE to shut it down. I would slelect shut down and it would REBOOT itself instead of staying shut down and showing the BATTTERY ICON charging. Also suddenly I could not access the device as a mass storage from windows. Windows would say device not recognized. After researching for hours I came across one idea the did the trick. The problem was simple. The USB connector "tongue" inside the USB adapter in the phone apparently got bent somehow. This precented the USB cable connecting in from making contact with all the wires inside and THAT caused the 2 problems mentioned in the title. I took a very thin micro flat head screwdriver, GENTLY CAREFULLY put a little pressure on the USB tongue inside the phone's USB adapter and voila!...I could shut down the phone while connected to power, Windows again regognized the device. Who wold have thunk it?
For any of you who come across this, and I saw MANY MANY, not only for GS2 but for MANY andriod devices, and many failed "solutions", here is the answer!...
Have fun.
I think I have a similar problem.
Until two weeks phone was working perfectly fine. Then realized that the battery was getting drained in about 4-6 hours even when idle with no apps running, sometimes battery charge dropped like 15% in a moment, it didn’t indicate charging when connected to power though battery got charged and sometimes it indicated as charging when not connected to power. Phone could not be detected when connected to PC. Also, if I connected to PC after shutting it down, it automatically rebooted. This was weird.
Then when battery was fully dead and I connected to power, it tried to boot but immediately shutdown saying ‘low battery’ and again tried to boot… it was stuck in this loop.
I thought it might be android issue so flashed it with UCKK6 Kernel + Rooted System Package ((Thanks to creepyncrawly’s Download Repository)
But now, it still is not detected by the PC. It boots automatically when connected to PC after shutting down, but not when connected to wall power.
Cleaned the micro USB connecter, tried different cables and laptops.
Earlier Android: Version 2.3.6; Baseboard Version I777UCKK6; Kernel Version 2.6.35.7
After Flashing: Version 2.3.6; Baseboard Version I777UCKK6; Kernel Version 2.6.35.7
Pls I I tried to flash cm rom 12.1 on sgh 1727 skyrocket and it stuck on patching system image unconditionally n it stays there forever please what can I do?

Samsung - Patch to power on when USB power inserted?

I am currently working on a app that will come up on a galaxy y that when the usb cable is connected, will launch the OS.
The device will be run from a cigarette lighter which gives enough power to sustain it when the app is on, BUT theres one big issue, if I dont use the car for a while the battery will obviously run down in 2 or 3 days, and when the energy returns, the app will not be able to start again by itself.
So i searched and tried thousands of solutions to make the device starts when the power AC is on, instead of stuck on the battery sprite screen...
I know we have this thread: http://forum.xda-developers.com/showthread.php?t=1815131 from last year
but in that case, the guy have fastboot to use its commands to modify the bootloader args, but within my research i have found that we dont have fastboot on samsung devices, just odin mode...
So the question is: is there any way to modify the bootloader, or put a bootloader that have this feature via odin?

OTG Support - Minimum Battery Level?

Is there a minimum battery level for OTG support to work?
I have OTG support on my Mediatek Blackview BV6000 which works very well.
However, sometimes when I connect say a hard drive to my phone (via OTG) the hard drive doesn't start and the phone doesn't see it.
This seems to happen when the battery level drops below 70%, but I'm guessing.
This happened again recently so I went and charged my phone and the OTG support came back.
I'm wondering if this is due to some internal mechanism built into Android 7 or the phone where OTG support is stopped when the battery level drops below 70%. Has anyone ever heard of this?
If so, is there any way around it?
I recently learned to use a 'Terminal apk' to change the internal settings of my phone to allow my 'file manager' to see my hard drive when attached to the phone. It now works great. I was hoping that there would be a similar method to override this 70% limit for OTG support if that is in fact the problem.
Can anyone help?

How to Block remote access & unauthorized user on unrooted phone/locked bootloader

Hi, long story short, is i have a google pixel 3xl with a locked bootloader and stock android rom, its never been flashed or anything, yet somehow i have a user who is accessing my phone remotely without my authorization.
Their user dont show up which begs me to believe that they are logging in via remote administration tools built into android.
So far they have disabled my power button so if i turn my phone off, i cant turn it back on without plugging it into the charger, only then will the power button work. And sometimes they change it back so the button works.but then whenever i turn off the phone, it will boot up by its self. When they change it so the power button dont work, when i turn the phone off, i notice that the phone isnt actually off as i can feel the heat from the cpu and networking asics on the device still working and when i boot back into the phone. The battery life has decreased.
Since then i have installed a smart rgb light and they have put a script to autorun either on my phone or within the flash rom chips of the light so that the light automatically turns off whrnever i try to turn it on.
How can i block remote access to the phone, and what tools are they using ti gain access to my stock android 11 setup.
Because even when i turn the phone off. They still have access to the device, i have ran network monitoring tools and their access dont show up within android which leads me to believe that they may be using a hidden user which has elevated admin access than the stock user that comes with the phone as the way they are coming into the phone i believe is through ita cellular connection as in the past they have been remotely accessing it when i havent been near any wifi hotspots.
Thabks so much for your help
They also disabled my charging port partially and if i connect a new charger to it, the charger will work but then they disable the chargers device id, and headphones unique mac addresses from connecting with my phones usb-c port
Yep

Categories

Resources