Disable USB Charging (root required)

redsete

Member
Jan 4, 2017
16
8
0
Help to do the opposite

Download: https://play.google.com/store/apps/details?id=org.bramantya.stopcharging&hl=en

*** ROOT REQUIRED ***

  • Bored with various apps that make your phone charge faster?
  • Want to stop charging your phone's battery when connected to USB?
  • You are a developer that often connect their phone via USB and don't want the battery to suffer?

Disable USB Charging will disable usb charging (obviously..). Allowing you to connect your phone via USB without straining your battery again and again and again.

---

Please mention your Android version or custom ROM if it's not working for you. Thank you.
Hello friend, please see if you can help me. I need to prevent the android from loading device connected via usb-c. In other words, the solution I need is the reverse of what you presented.

And what do I want? When connecting an external dac on my galaxy s8, the s8 battery is being drained by the dac.

Is there any way to help me? Do you know a solution to my problem?

In advance, thank you.
 

judalucifer13

New member
Feb 7, 2010
3
2
0
Hello friend, please see if you can help me. I need to prevent the android from loading device connected via usb-c. In other words, the solution I need is the reverse of what you presented.

And what do I want? When connecting an external dac on my galaxy s8, the s8 battery is being drained by the dac.

Is there any way to help me? Do you know a solution to my problem?

In advance, thank you.
Hi, I am using Xiaomi A1 with the USB-C port. I am using DAC FiiO Q1 Mark II, If you use this cable, 100% assure will fix your matter. I am using it so can confirm that to you. xda not letting me upload the link so, google for: "otg not charging for oppo ebay", you will see the ebay link to buy it.
 
  • Like
Reactions: Dotancoh

Zawal

New member
Jul 11, 2018
1
0
0
Hello! The app does not work on Sony Z2 which means the sentence - This app requires ROOT. Do you need to install something extra? Thank you in advance for info and best regards

Andrzej Ziętarski
 

colleseus

Senior Member
Mar 3, 2013
54
6
0
Bangalore
API for controlling through external APP

Hi,

I am developing an application that requires the phone to be always connected to USB power all the time. As this mobile device is packed in a box, there is no user control. I found your app very exciting and it perfectly solves my purpose for managing battery life (~2 years) without ruining my battery.

My application is an app that runs in background and sends data to server when some event occurs.

How can your app be triggered from my APP to enable/disable charging?

My application phone is : Moto C plus
https://www.gsmarena.com/motorola_moto_c_plus-8646.php
 
Last edited:

bggold

Senior Member
Sep 13, 2013
1,047
359
103
The app works on my pixel 3 xl with the alternative button to turn off charging. I wanted to automate this and looked at the link in a previous post. The issue is that on Android 9 they have removed the ability to make the changes in the /sys/devices and also the enable files in the virtual folder.

How can these changes be made now? Would be interested in the commands that are being used that work in the alternative if possible.

Thanks
 

whitedavidp

Senior Member
Jul 31, 2012
560
165
43
Sadly, not working on my Samsung Note 3, N900. I have checked the files the app tries to fiddle and none are on my device. This is stock Android 4.4.2. Anyone know where/if the file lives? Thanks
 

hoberey

Member
Nov 29, 2013
7
2
0
hey bro, thank you very much, this is very useful in my case. but I need more :)

Can you please make it "automatically" disable charging when plug in to any PC? I mean, when I plug in my rooted Samsung Galaxy Note 5 to my PC, I need automatically disable charging, without I have to push any button.

Is it possible?
Thanks!!
 
  • Like
Reactions: Dotancoh

whitedavidp

Senior Member
Jul 31, 2012
560
165
43
hey bro, thank you very much, this is very useful in my case. but I need more :)

Can you please make it "automatically" disable charging when plug in to any PC? I mean, when I plug in my rooted Samsung Galaxy Note 5 to my PC, I need automatically disable charging, without I have to push any button.

Is it possible?
Thanks!!
Please note that I am NOT using this app but the discussion here and elsewhere helped me to figure out what to do. In my phone's case, the file to be manipulated is /sys/class/power_supply/battery/batt_state_mode. echo'ing 0 into that file enables charging which echo'ing 1 disables charging (seems backwards to me but it works).

I am then using Tasker on my rooted Note 3 phone to control the application of charging power so as to keep the charge level between 40% and 80%, the supposed sweet spot for battery longevity. Tasker can discriminate between power coming from USB (which is limited to .5 amp) and AC (which can be twice as much or more). Since plugging into a PC can only mean plugging into USB at .5a, this should work to meet your needs.

Just one more way that Tasker proves itself invaluable to me on a daily, if not hourly, basis.

Happy holidays.
 
  • Like
Reactions: Dotancoh