Disabling offline charging in Redmi 4A - Rolex for kiosk mode - Android Q&A, Help & Troubleshooting

Offline Charging :- When charger is connected to switched off device, it boots the device into offline charging mode and charging bootanimation comes. System is triggered into normal boot by holding the power button.
But am trying to build a kiosk device using Redmi 4A and cannot have user interaction. Thus need to override this offline charging so that device automatically boots into normal mode when connected to charger.
DEVICE IS ROOTED
I have followed all the methods suggested throughout the web --
fastboot oem off-mode-charge 0 -- NOT WORKING
/system/bin/lpm , /system/bin/charge_only_mode, /system/bin/kpoc_charger, /system/bin/chargemon or any other related file -- NOT PRESENT
https://appdictive.dk/blog/android/how-to/2017/04/20/disabeling_offline_charge_on_android/ -- tried this tutorial, but device gets stuck in bootloop.
The link in the last point, provides several options. I found this in my init.rc file -->
Code:
# Healthd can trigger a full boot from charger mode by signaling this
# property when the power button is held.
on property:sys.boot_from_charger_mode=1
class_stop charger
trigger late-init
...
...
on charger
class_start charger
As suggested, I modified the on charger trigger to contain the same code used to boot in normal mode when power button is held -->
Code:
on charger
class_start charger
class_stop charger
trigger late_init
This leads to bootloop i.e. device gets stuck on start screen and doesn't enter into normal boot. Couldn't find out the reason for same.
Tried increasing the log level 8 of init and checked adb shell dmesg, but no sign of where booting crashes.
Can anybody suggest remedy or any other alternative to disable offline booting.

Do u find any solution ????

Related

Starting adb on boot process? For debugging purposes...

Hi guys, i successfully build from scratch a device and vendor tree for my rom, and compile CM13 with no problems.
The roms boots but i get a bootloop when it come into "starting apps". My idea is get adb working on boot proccess.
I was googling but i couldn't get working....
This is my init.qcom.rc: https://drive.google.com/open?id=0ByjBTzGuQ9FIQldHTGxBWjdtczQ
And init.usb.rc generated by CM13: https://drive.google.com/open?id=0ByjBTzGuQ9FIc1ZVNnVpTVExOE0
Thanks
Well guy i was digging around and testing ALOT with no luck. Still can't enable adb at boot.
I try adding this properties on default.prop:
Code:
ro.adb.secure=0
ro.secure=0
ro.debuggable=1
persist.sys.usb.config=mtp,adb
An this in build.prop:
Code:
ro.default_usb_mode=0
persist.service.adb.enable=1
persist.service.debuggable=1
persist.sys.usb.config=mtp,adb
My device is a Forge TV, and it have a single usb port and no sdcard slot, so the only way to get a log is via usb...
In the stock rom, by default, starts in host mode (storage) and you have to go into config to change it into "device mode" to get usb adb working....
Probably i need to manage how the usb port starts at boot, i thought that "ro.default_usb_mode=0" was the solution...but no
Any help will be appreciated!
PS. lsusb doesn't recognize any device....only in fastboot mode
So i found out something interesting...in stock rom if i execute the command echo 0 > /proc/usb_device the device put itself in device mode and i can debug, putting that value to 1 reverts to storage.
I try to put that on init.d, or even on init.qcom.rc in the boot image with no luck....it's so frustating...
Ususally adbd should already be running this late during the boot.
Can you at least get an usb connection during boot? (check lsusb)
If you want to get at least a dmesg output during boot you could try the following:
set this in the build.prop
Code:
debug.sf.nobootanimation=1
set the following in your kernel defconfig
Code:
CONFIG_VGA_CONSOLE=y
CONFIG_FRAMEBUFFER_CONSOLE=y
CONFIG_FRAMEBUFFER_CONSOLE_DETECT_PRIMARY=y
CONFIG_FONT_8x8=y
CONFIG_FONT_8x16=y
(not all of them are needed but I forgot which ones are and which ones are not)
add this to the kernel command line
Code:
console=tty1 loglevel=7
This should at least show some output on the phone screen itself.
To run something in the console, you could try to connect an usb keyboard or use something like a scriptable virtual keyboard.
You might need to set loglevel to 1 or 0 if you don't want it to spam your console while working on it.
ruleh said:
Ususally adbd should already be running this late during the boot.
Can you at least get an usb connection during boot? (check lsusb)
If you want to get at least a dmesg output during boot you could try the following:
set this in the build.prop
Code:
debug.sf.nobootanimation=1
set the following in your kernel defconfig
Code:
CONFIG_VGA_CONSOLE=y
CONFIG_FRAMEBUFFER_CONSOLE=y
CONFIG_FRAMEBUFFER_CONSOLE_DETECT_PRIMARY=y
CONFIG_FONT_8x8=y
CONFIG_FONT_8x16=y
(not all of them are needed but I forgot which ones are and which ones are not)
add this to the kernel command line
Code:
console=tty1 loglevel=7
This should at least show some output on the phone screen itself.
To run something in the console, you could try to connect an usb keyboard or use something like a scriptable virtual keyboard.
You might need to set loglevel to 1 or 0 if you don't want it to spam your console while working on it.
Click to expand...
Click to collapse
Hi, thanks alot for your answer! My device is a Razer Forge TV wich is an Android TV device. It's equiped with a single full usb 3.0 port and no sdcard slot. The port works in 2 ways, by default in host mode and device mode (the mode i need to get some debug output). In the stock rom executing "echo 0 > /proc/usb_device" enable this mode and remains on reboot. But doesn't seems to work on CM (i put the command on an init.d script). lsusb reports nothing (equal in stock rom when the port is in host mode).
I test the soluton you provided, but instead of bootanimation i get a black screen then optimizing apps, starting apps and reboot (wich is my main problem)....there's no output on screen...i'm stuck on this like 10 days or more...is so annoying...thanks again
achaw said:
Hi, thanks alot for your answer! My device is a Razer Forge TV wich is an Android TV device. It's equiped with a single full usb 3.0 port and no sdcard slot. The port works in 2 ways, by default in host mode and device mode (the mode i need to get some debug output). In the stock rom executing "echo 0 > /proc/usb_device" enable this mode and remains on reboot. But doesn't seems to work on CM (i put the command on an init.d script). lsusb reports nothing (equal in stock rom when the port is in host mode).
I test the soluton you provided, but instead of bootanimation i get a black screen then optimizing apps, starting apps and reboot (wich is my main problem)....there's no output on screen...i'm stuck on this like 10 days or more...is so annoying...thanks again
Click to expand...
Click to collapse
You could try to insert a usb stick, mount it, and then write dmesg and/or adb output to it using init.rc.
Alternatively you could try to enable adb over tcp and connect that way to it.
Alos try to chose a different tty in the kernel command line.
(btw are the following three lines present in your kernel defconfig?)
Code:
CONFIG_VT_CONSOLE=y
CONFIG_TTY=y
CONFIG_VT=y
ruleh said:
You could try to insert a usb stick, mount it, and then write dmesg and/or adb output to it using init.rc.
Alternatively you could try to enable adb over tcp and connect that way to it.
Alos try to chose a different tty in the kernel command line.
(btw are the following three lines present in your kernel defconfig?)
Code:
CONFIG_VT_CONSOLE=y
CONFIG_TTY=y
CONFIG_VT=y
Click to expand...
Click to collapse
I can't mount usb or enable adb over tcp becasuse the system reboot itself at starting apps...
Right now i'm testing with your new config, switching ttys because i'm still getting black screen instead some output...
Well after some days i remember that the Forge iss equipped with a ethernet port...i feel so stupid lol...
So i was able to debug via adb over tcp.... @ruleh thanks alot for your time!
I think "starting apps" happens when zygote is started.
If it is really the case then it should be possible to mount an usb stick and write the logs to it before everything reboots.
According to the init files I have, init.${ro.hardware}.rc would be the place to do the mount+write.
Ideally /system is mounted and /system/bin is in the path to access tools like logcat and dmesg.
Otherwise you could include them in /sbin which is (in most cases) part of the ramdisk.
It would probably be something like this:
Code:
on early-boot
#mkdir /mnt/usb
mount /dev/(usb_stick) /mnt/usb
exec /system/bin/dmesg > /mnt/usb/dmesg.log
exec /system/bin/logcat > /mnt/usb/logcat.log
(I have never used the init.rc files directly so I am not too sure.)
Also did you try "write /proc/usb_device 0" instead of "echo 0 > /proc/usb_device" in the init.rc files? (preferably before zygote starts...maybe init.usb.rc?)
Or you could try to remove the lines referencing zygote from the init.rc files and see if adbd starts then or not.
---------- Post added at 20:17 ---------- Previous post was at 20:16 ----------
achaw said:
Well after some days i remember that the Forge iss equipped with a ethernet port...i feel so stupid lol...
So i was able to debug via adb over tcp.... @ruleh thanks alot for your time!
Click to expand...
Click to collapse
I wish I read this a bit earlier...... oh well

What is available while the device is powered but not booted? (Editing init.rc)

Hi thanks for reading
I have a rooted Android TV Box [CSA96] running Marshmallow. When first plugged in to AC power, the only indicator of this is a red LED. There is no battery so no charging screen or any output (HDMI). The power button must be pushed in order for Android to boot up. The LED turns blue when the power button is pushed.
My goal is to force the device to automatically turn on when plugged into AC power, removing the requirement of pushing the power button.
From what I've learned so far, the button isn't necessarily a physical barrier -- while plugged in, Android is in a Low Powered State and can listen for an event saying the power button has been pushed. I want to try to invoke the event manually by editing init.rc ... but I am not certain if init.rc is even available at this time, or what other parts of the Android environment are available before the power button is pushed (if any). I'd like to gain an understanding of this so that I am not stumbling in the dark.
Before I continue, I'd like to mention here that I am a developer and am comfortable bricking the device (I've done it several times already, and recovered no problem). I am also using Android Image Kitchen for persistent modification of the system.
Another thing I'd like to say too is, I am well aware of the fastboot oem off-mode-charge 0 command. Unfortunately I have not been able to get fastboot working with this device. The drivers are definitely working as I can flash this device, and even access its bootloader. However for the life of me fastboot devices never shows anything. If someone knows a trick to get it working on the CSA96, that would be great as I'd love to actually try this command for a simple solution
Okay. So I'll get into why I am thinking the key to this is through the init.rc ...
The / dir has several init files, but the ones that seem to be relative to what I am doing are init.rc and init.rockchip.rc and maybe init.debug-charging.rc. I'll paste some of the contents of each ...
[init.rc]
Code:
# Healthd can trigger a full boot from charger mode by signaling this
# property when the power button is held.
on property:sys.boot_from_charger_mode=1
class_stop charger
trigger late-init
Code:
on charger
class_start charger
init.rockchip.rc
Code:
service charger /charger
class charger
seclabel u:r:healthd:s0
Code:
on property:ro.boot.charger.emmc=1
mount ext4 /dev/block/platform/emmc/by-name/system /system wait ro noatime nodiratime
start console
mount ext4 /dev/block/platform/emmc/by-name/metadata /metadata wait noatime nodiratime nosuid nodev noauto_da_alloc,discard
start charger
on property:ro.boot.charger.emmc=0
insmod /rk30xxnand_ko.ko
mount ext4 [email protected] /system wait ro noatime nodiratime noauto_da_alloc
start console
mount ext4 [email protected] /metadata wait noatime nodiratime nosuid nodev noauto_da_alloc
start charger
on charger
setprop ro.boot.charger.emmc 0
export PATH /sbin:/vendor/bin:/system/sbin:/system/bin:/system/xbin
export LD_LIBRARY_PATH /vendor/lib:/system/lib
setprop sys.usb.config adb
So in the init.rockchip.rc file, a service named charger invokes a binary called charger, located at /charger ... I found the source code for this program here: https://gitlab.com/pbeeler/system_core/commit/e4b7b294f37d9b64d6b7c1931e2c9bfb1a500d68
Here is a snippet that I find interesting (Line 830)..
Code:
if (code == KEY_POWER) {
if (key->down) {
int64_t reboot_timeout = key->timestamp + POWER_ON_KEY_TIME;
if (now >= reboot_timeout) {
LOGI("[%lld] rebooting\n", now);
android_reboot(ANDROID_RB_RESTART, 0, 0);
/* We do not currently support booting from charger mode on
all devices. Check the property and continue booting or reboot
accordingly. */
if (property_get_bool("ro.enable_boot_charger_mode", false)) {
LOGI("[%lld] booting from charger mode\n", now);
property_set("sys.boot_from_charger_mode", "1");
} else {
LOGI("[%lld] rebooting\n", now);
android_reboot(ANDROID_RB_RESTART, 0, 0);
}.....
So while I don't entirely understand the order of operation, it seems that when the device is plugged in, the charger service is run (executing the /charger binary) .. this binary detects the power button key, and if pressed, sets the sys.boot_from_charger_mode property to 1. Then the on property event inside the init.rc file is triggered, and then i assume late-init is what boots up the device.
So it appears that the contents of init.rc are available at some capacity, before Android has booted up. But I've tried a few adjustments to these files with no results. One thing I've tried is adding setprop sys.boot_from_charger_mode 1 to init.rockchip.rc's on charger event, or at the top of init.rc and other places.
I've also tried changing /charger to /system/bin/reboot
I've also tried putting trigger late-init under init.rockchip.rc's on charger event too.
When I make these changes and try them on the device, I do check the files to verify the changes had stayed.. and they do.
So now I cannot help but wonder that perhaps I am on the wrong track and that maybe these files aren't actually available before the power button is pushed. Some insight would be greatly appreciated.
Thank you.
Jiketsu said:
Hi thanks for reading
I have a rooted Android TV Box [CSA96] running Marshmallow. When first plugged in to AC power, the only indicator of this is a red LED. There is no battery so no charging screen or any output (HDMI). The power button must be pushed in order for Android to boot up. The LED turns blue when the power button is pushed.
My goal is to force the device to automatically turn on when plugged into AC power, removing the requirement of pushing the power button.
From what I've learned so far, the button isn't necessarily a physical barrier -- while plugged in, Android is in a Low Powered State and can listen for an event saying the power button has been pushed. I want to try to invoke the event manually by editing init.rc ... but I am not certain if init.rc is even available at this time, or what other parts of the Android environment are available before the power button is pushed (if any). I'd like to gain an understanding of this so that I am not stumbling in the dark.
Before I continue, I'd like to mention here that I am a developer and am comfortable bricking the device (I've done it several times already, and recovered no problem). I am also using Android Image Kitchen for persistent modification of the system.
Another thing I'd like to say too is, I am well aware of the fastboot oem off-mode-charge 0 command. Unfortunately I have not been able to get fastboot working with this device. The drivers are definitely working as I can flash this device, and even access its bootloader. However for the life of me fastboot devices never shows anything. If someone knows a trick to get it working on the CSA96, that would be great as I'd love to actually try this command for a simple solution
Okay. So I'll get into why I am thinking the key to this is through the init.rc ...
The / dir has several init files, but the ones that seem to be relative to what I am doing are init.rc and init.rockchip.rc and maybe init.debug-charging.rc. I'll paste some of the contents of each ...
[init.rc]
Code:
# Healthd can trigger a full boot from charger mode by signaling this
# property when the power button is held.
on property:sys.boot_from_charger_mode=1
class_stop charger
trigger late-init
Code:
on charger
class_start charger
init.rockchip.rc
Code:
service charger /charger
class charger
seclabel u:r:healthd:s0
Code:
on property:ro.boot.charger.emmc=1
mount ext4 /dev/block/platform/emmc/by-name/system /system wait ro noatime nodiratime
start console
mount ext4 /dev/block/platform/emmc/by-name/metadata /metadata wait noatime nodiratime nosuid nodev noauto_da_alloc,discard
start charger
on property:ro.boot.charger.emmc=0
insmod /rk30xxnand_ko.ko
mount ext4 [email protected] /system wait ro noatime nodiratime noauto_da_alloc
start console
mount ext4 [email protected] /metadata wait noatime nodiratime nosuid nodev noauto_da_alloc
start charger
on charger
setprop ro.boot.charger.emmc 0
export PATH /sbin:/vendor/bin:/system/sbin:/system/bin:/system/xbin
export LD_LIBRARY_PATH /vendor/lib:/system/lib
setprop sys.usb.config adb
So in the init.rockchip.rc file, a service named charger invokes a binary called charger, located at /charger ... I found the source code for this program here: https://gitlab.com/pbeeler/system_core/commit/e4b7b294f37d9b64d6b7c1931e2c9bfb1a500d68
Here is a snippet that I find interesting (Line 830)..
Code:
if (code == KEY_POWER) {
if (key->down) {
int64_t reboot_timeout = key->timestamp + POWER_ON_KEY_TIME;
if (now >= reboot_timeout) {
LOGI("[%lld] rebooting\n", now);
android_reboot(ANDROID_RB_RESTART, 0, 0);
/* We do not currently support booting from charger mode on
all devices. Check the property and continue booting or reboot
accordingly. */
if (property_get_bool("ro.enable_boot_charger_mode", false)) {
LOGI("[%lld] booting from charger mode\n", now);
property_set("sys.boot_from_charger_mode", "1");
} else {
LOGI("[%lld] rebooting\n", now);
android_reboot(ANDROID_RB_RESTART, 0, 0);
}.....
So while I don't entirely understand the order of operation, it seems that when the device is plugged in, the charger service is run (executing the /charger binary) .. this binary detects the power button key, and if pressed, sets the sys.boot_from_charger_mode property to 1. Then the on property event inside the init.rc file is triggered, and then i assume late-init is what boots up the device.
So it appears that the contents of init.rc are available at some capacity, before Android has booted up. But I've tried a few adjustments to these files with no results. One thing I've tried is adding setprop sys.boot_from_charger_mode 1 to init.rockchip.rc's on charger event, or at the top of init.rc and other places.
I've also tried changing /charger to /system/bin/reboot
I've also tried putting trigger late-init under init.rockchip.rc's on charger event too.
When I make these changes and try them on the device, I do check the files to verify the changes had stayed.. and they do.
So now I cannot help but wonder that perhaps I am on the wrong track and that maybe these files aren't actually available before the power button is pushed. Some insight would be greatly appreciated.
Thank you.
Click to expand...
Click to collapse
Reference.
Mi max 3 as car tablet
hello everyone im plan to put a tablet to my car in dashboard, so i searching some informations: - did someone try to use command off-mode-charge to start device when plugged in ? - USB OTG is supported by device ? - is it still worth it in 2020...
forum.xda-developers.com
Have also a look inside here:
Automatically power on Android when the charger is connected
Is it possible to automatically power on the device once the charger is connected given that the device is initially turned off?
android.stackexchange.com
Root your device with Magisk.
Add this lines in init.rc file :
on charger
# class_start charger
exec u:r:magisk:s0 -- /system/bin/reboot

Auto start on charging connection

I am trying to set my tablet to auto start/boot when charger is connected in mini usb port. I didnot find lpm.sh in root\system\bin folder to modify. But i found ilm file with below script. Plz tell how to modify to make powered off tablet to boot when charger is connected.
Script to start "pm" on the device, which has a very rudimentary
# shell.
#
base=/system
export CLASSPATH=$base/framework/ime.jar
exec app_process $base/bin com.android.commands.ime.Ime "[email protected]"
You can instruct init to reboot the device whenever charger mode is detected. Create a new .rc file or edit any existing one:
# /system/etc/init/off_mode_charge.rc
on charger
setprop sys.powerctl reboot,leaving-off-mode-charging
Source:
Automatically power on Android when the charger is connected
Is it possible to automatically power on the device once the charger is connected given that the device is initially turned off?
android.stackexchange.com

Turn on Nexus with starting the car and turn off when removing the key.

Hello. I'm trying to sort out issue for my friend. Basically he has connected his Nexus 7 in the car and he use it as on-board computer. He would like to modify it to turn on Nexus when he starting the car and turn off when he will remove the key from ignition. Can someone recommend how we can do it? I've tried to find solution but without success.
for boot at connecting charger event:
- install LGMobileDriver_WHQL_Ver_4.2.0.exe
- install adb and fastboot
- switch phone off
- press and hold Volume Down + Power key
- connect usb-cable
- navigate in cmd.exe (as administrator) to folder platform_tools
Code:
fastboot oem device-info
fastboot oem off-mode-charge 0
fastboot oem off-mode-charge disable
for shutdown on power off:
use App "MacroDroid" - add macro - battery/power - power connected/disconnected - power disconnected. on actions - device actions - reboot/power off - power off
with MacroDroid he can do more things, like play music each time bluetooth is connected on startup...

Question Managing battery charge

Hello!
My Nord 2 will be plugged in 24/7 because I use it for E2E testing. I need to optimize battery so it wont swell up.
Is there any working solutions for doing it? Or is there a way to put battery charging to idle so main power will be drawn from usb.
I tried Magisk ACC plugin, but it seems it is not running. Shell has supperuser power on magisk
ADB shell:
"acc
/system/bin/sh: <stdin>[2]: acc: inaccessible or not found
accd,
/system/bin/sh: <stdin>[3]: accd,: inaccessible or not found"
Also same error in ACC app, magisk have given supperuser access for that app:
"/system/bin/sh: <stdin>[3544]: acc: inaccessible or not found"
when i execut acc.sh in /data/adb/vr25/acc/ folder then i cant get ACCD running there. Well it runs for a minut then turns off
"
Advanced Charging Controller v2021.8.31 (202108310)
Copyright 2017-2021, VR25
GPLv3+
(i) accd is not running
1) Language
2) All commands
3) Documentation
4) Start/restart daemon
5) Stop daemon
6) Export logs
7) Charge once to #%
8) Uninstall
9) Edit config.txt
a) Reset battery stats
b) Test charging switches
c) Check for update
d) Flash zips
e) Battery info
f) Exit
#? b
(!) Charger must be plugged to continue...
(i) Alright, this may take a minute or so...
(!) [/proc/mtk_battery_cmd/current_cmd 0::0 0::1 /proc/mtk_battery_cmd/en_power_path 1 0] won't work
(i) Press any key to continue..."
Hi, I'm the developer of acc.
Have you tried a slow charger or USB charging?
Refer to README > Troubleshooting.
This is a kernel/adapter issue.
Edit
Just noticed that you're not using the latest acc release.
Since you're facing issues, upgrading is a must.
Regardless, don't skip the documentation.
I am using PC USB connection for charging. Should ACC daemon allways run? It works for a minute and then stop. Do you mean oneplus nord 2 battery charging management have same kernel issue as you mentioned in ACC thread?
I have tested different versions to be sure. v2021.8.31 came from Magisk for first.
AccA is latest 1.0.35 Daemon/API 202109200
New ver.:
Advanced Charging Controller v2021.9.20 (202109200)
Copyright 2017-2021, VR25
GPLv3+
(i) accd is not running (PID 12046)
1) Language
2) All commands
3) Documentation
4) Start/restart daemon
5) Stop daemon
6) Export logs
7) Charge once to #%
8) Uninstall
9) Edit config.txt
a) Reset battery stats
b) Test charging switches
c) Check for update
d) Flash zips
e) Battery info
f) Undo upgrade
g) Exit
#? b
(!) Charger must be plugged to continue...
(i) Alright, this may take a minute or so...
(!) [/proc/mtk_battery_cmd/current_cmd 0::0 0::1 /proc/mtk_battery_cmd/en_power_path 1 0] won't work
This is usually a kernel and/or power adapter issue.
The daemon should be running to control charging.
The #1 reason for it to stop is total charging switch failure.
That is, all charging switches fail to respond.
In that case, it finds no reason to keep running.
Share a log archive (acc -le) and the output of acc -p.
Where can i get those logs? From /data/adb/vr25/acc-data/logs/ ? Might it be acc-logs-OP515BL1.tar.gz file?
Somehow "pull" and "cp" are not working on me with adb shell. Is there any better tools for pulling files and logs? There is many tools witch are not working with my phones and cant find root folders, google is to big.
@VR25 Hi! I attached all logs from ACC-data logs folder. Will it help?
CapnRene said:
@VR25 Hi! I attached all logs from ACC-data logs folder. Will it help?
Click to expand...
Click to collapse
Perfect!
I found potential charging switches.
Test the following commands one by one and report the ones that work:
su -c acc -t /sys/devices/virtual/oplus_chg/battery/mmi_charging_enable 1 0
su -c acc -t /sys/devices/platform/charger/enable_sc 0 1
su -c acc -t /sys/devices/platform/charger/enable_sc 1 0
su -c acc -t /sys/devices/virtual/oplus_chg/battery/stop_charging_enable 0 1
su -c acc -t /sys/firmware/devicetree/base/charger/usb_charger_current_suspend 0 1
Note
One/some of the commands may trigger a reboot.
That's not a big deal. Just move to the next on the list.
First line got response:
OP515BL1:/ # su -c acc -t /sys/devices/virtual/oplus_chg/battery/mmi_charging_enable 1 0
(!) Charger must be plugged to continue...
(i) Alright, this may take a minute or so...
(i) [/sys/devices/virtual/oplus_chg/battery/mmi_charging_enable 1 0] works
- battIdleMode=true
As i understand i need to change switch now to get it working?
su -c acc -s s="/sys/devices/virtual/oplus_chg/battery/mmi_charging_enable 1 0"
You should be all set after running that.
The next release will include the new switch.
Edit
Since the device will be plugged in 24/7, you may want to run `acc 3920` to set it up.
Essentially, this will keep the battery voltage between 3870-3920 millivolts.
3920 is said to be the sweet spot for longevity.
Not 100% sure did it work, need to test it a litte to be sure. It seems it updated log
OP515BL1:/ # su -c acc -s s="/sys/devices/virtual/oplus_chg/battery/mmi_charging_enable 1 0"
/system/bin/acc[580]: export: 1: is not an identifier
(i) Alright, this may take a minute or so...
(i) /data/adb/vr25/acc-data/logs/acc-logs-OP515BL1.tar.gz
My bad
It should have been
su
acc -s s="/sys/devices/virtual/oplus_chg/battery/mmi_charging_enable 1 0"
VR25 said:
My bad
It should have been
su
acc -s s="/sys/devices/virtual/oplus_chg/battery/mmi_charging_enable 1 0"
Click to expand...
Click to collapse
It worked! Ty! I set my swich to turn on 59% and off 60% for optimal ressult.
It seems that those are not working or maybe i have made some mistake somewhere:
shutdown capacity
charge current
charge voltage
CapnRene said:
It worked! Ty! I set my swich to turn on 59% and off 60% for optimal ressult.
It seems that those are not working or maybe i have made some mistake somewhere:
shutdown capacity
charge current
charge voltage
Click to expand...
Click to collapse
From the documentation:
# shutdown_capacity (sc) #
# When the battery is discharging and its capacity/voltage_now_millivolts <= sc and phone has been running for 15 minutes or more, acc daemon turns the phone off to reduce the discharge rate and protect the battery from potential damage induced by voltage below the operating range.
# sc=-1 disables it.
# [Beta] if the file /data/adb/vr25/acc-data/warn exists, accd posts Android shutdown warning notifications at sc + 5% or sc + 200 mV.
The last two features are not supported by all devices.
I'm yet to see a MediaTek device that supports at least one of the those.
Please ask further questions in the actual forum, so that other users can help you whenever I'm unavailable.

Categories

Resources