ctaranto
lvl.2
United States
Offline
|
I have been searching for a (an elegant) solution for this without cutting wires or adding power bricks to my rig. Recently getting a new tablet to run Dronelink (Galaxy Tab S6), I figured out a solution. Unfortunately, all software solutions require root on the Android device. For me, it's not a big deal as I root all my devices as soon as I get them.
- Root the device using Magisk. The way to root each devices varies, so look up the way to root your device with Magisk and follow the instructions. I suggest not going to Android 11 for drone flight (at this time). I have heard of issues with various flight apps using Android 11. I updated my S6 to the latest Android 10 before rooting.
- After rooting, install Magisk Manager. This will allow you to manage apps that need root permissions. More importantly, it will allow you to install the app that allows fine control of the charging states.
- In Magisk Manager, install Advanced Charging Controller (acc). This is where the magic happens.
- After installing (and rebooting as instructed), install Termux (terminal emulator). Once in Termux, type "su" to allow it root permissions (grant it permission).
- The commands to control charging will be done in Termux as root (typing su <enter> before running the commands.
- To turn off charging until the device reaches 15%: acc -d 15% and then enter (after that command, restart the acc daemon type typing "accd" and then enter). If your device has more than 15% charge, plugging in the USB cable will not charge the device.
- To put it back to "normal" (charge to 100%", replace the "15%" with "100%". All the acc commands are here: https://github.com/VR-25/acc/blob/master/README.md
- Alternatively, I found that sometimes the -d and -e commands hang, so as an alternative the 3 modes I set up:
acc --set pause_capacity=16 resume_capacity=15 #Flight Mode - don't charge over USB until battery reaches 15%
acc --set pause_capacity=95 resume_capacity=94 #Flight Prep - stop charging over USB when battery reaches 95%
acc --set pause_capacity=80 resume_capacity=79 #Everyday Mode - stop charging over USB when battery reaches 80% - <optional> To make this much more user friendly, install "Tasker". This is an absolutely amazing tool to automate almost anything on your device. Using tasker, I created 3 shortcuts sitting on my tray: "Flight Mode" (no charge until 15% + full screen brightness), "Flight Prep" (charge to 95%), and "Everyday Mode" (charge to 80%). Makes changing made super quick. I do not own or sell Tasker. I purchased it years ago and used for all kinds of phone/tablet automations.
Good luck!
|
|