yashsingh1/xdaforums huggingface dataset:
[Android Apps and Games] 24imelqui:
Can someone upload it to another link? Can't download mega files thru chrome app. Thanks
[Android Apps and Games] savvymatthew:
One the oneplus-3 I have an issue when it reaches the set percentage my phone won't go into sleep mode ( my screen turns on and doesn't time out)

Is that some kind of bug?
[Android Apps and Games] Balino:
Just check the desktop mode on Chrome
[Android Apps and Games] Balino:
Here is it
[Android Apps and Games] savvymatthew:
I tried that it downloads but then I get an error message after least for me not just this file either I had this problem so idk maybe just me, ended up DL the app damn Mega lol
[Android Apps and Games] Rohan Sawant:
What does the settings option when we press "three-dot" do?

Hey! Great app working perfectly on my Honor 6x, I was wondering does this app run in background? If yes then I should probably add it to my white list. And what does the settings option do? Is it still in development?
[Android Apps and Games] :
It says that, but it still actually downloaded successfully and will install just fine.
[Android Apps and Games] real_milux:
Maybe, but most likely a bug of the device or a misconfiguration of your OS.

For keeping the screen on you need a so-called "full wakelock", at least SCREEN_DIM_WAKE_LOCK. This app does neither try to obtain any wakelock, nor does it have a permission to do so.

Hence, it must be something with your system. Maybe it's something with the developer options, I remember that there was something to keep the screen on during charging. Maybe it's buggy for OxygenOS and causes such behavior...

EDIT: Have to correct myself. The app registers itself to the doze mode whitelist, this could also be a source of such problems. However, the absence of doze mode should not prevent the screen from going dark...

---------- Post added at 08:35 AM ---------- Previous post was at 08:31 AM ----------

The three dots are useless atm, just a side-effect of Harsha's template for the app, never mind. ;)

The app runs a foreground task when power is attached to control the charging state. When power is detached, it shouldn't consume ANY resources. (Unless you open its activity, of course. ^^)

The app does automatically register itself to the doze mode whitelist when it's launched the first time, using a root command.
[Android Apps and Games] savvymatthew:
I have been experimenting with different set ups. And it only occurs when I use the app, even after disabling it after a charge, My screen still won't go into sleep mode ( screen off) at all plugged in or not. only a reboot fixes it.... There's zero issues with sleep mode only when enabling the app causes the screen issue.
[Android Apps and Games] real_milux:
Can you please try to remove the app from the doze mode whitelist according to this article:

https://www.cnet.com/how-to/stop-specific-apps-from-using-doze-on-android-6-0-marshmallow/

You may also try to force-exit the app instead of rebooting your whole phone, it should have the same effect.

If this doesn't fix it, something with black magic is going on with your phone. ^^
[Android Apps and Games] savvymatthew:
Force closing doesn't fix it.

Just to clarify when its enabled screen off still works it's when it hits the set changing point ( 80) where it breaks the screen off and just stays on after it wake it up at 80. And any attempt to fix the issue afterwards does not work, force closeing app, setting new screen off time, :eek:

Also for doz its excluded by the default are you saying add it to doz?

Also I I don't have aggressive doz on
[Android Apps and Games] real_milux:
Yes, per default all apps are included for doze mode, but this app uses a root cmd to opt-out.

Enable doze mode for the app and see what happens.

EDIT: Your issue sounds very strange, though. The app doesn't change anything except issuing the root command that modifies the battery control file. If you use charging_enabled or batt_slate_mode, an additional power change event will be fired and ignored by the app, but that's it. - Non of these should prevent deep sleep. :confused:
[Android Apps and Games] savvymatthew:
Same results, still having the problem. Again after it hits the set percentage while charging in sleep mode screen off... It turns screen on and doesn't go back to sleep.

I guess something I'm using is conflicting with it somehow, Other than AKT profiles app. There's not anything that comes to mind that would cause this

---------- Post added at 04:20 AM ---------- Previous post was at 04:08 AM ----------

Will any logs be of assistance here? If so what ones? Other than that, thanks for your help.

Also want to mention this was an issue for me on earlier versions of app also

I also did I system update to the newest Freedom Rom for the oneplus-3 so the issue also was on the previous update of that too.
[Android Apps and Games] real_milux:
Sorry, I'm running out of ideas as well.

It must be something system-specific, but as long as nobody else has the same problem, it is impossible to look for a pattern... :(

EDIT: It's unlikely to help, but maybe you could collect logcat output, filtered by the term "Charging State". If a very large number of messages shows up there, it might indicate some problem that's permanently causing root commands to be issued, which might prevent the device from sleeping. "aLogcat ROOT" is a good app for that, if you don't have one yet.
[Android Apps and Games] marbertshere:
Hi, I'm having difficulties resetting battery stats. It doesn't do it automatically or manually. It worked before I updated to 7.1.2 from 7.1.1. Nexus 6P, Pure Nexus, Franco Kernel. Thanks for this app!
[Android Apps and Games] real_milux:
I guess something was changed internally, so the command isn't working anymore?

Unless you know a working command to reset the battery stats, sorry, but I cannot help. :(

---------- Post added at 02:43 PM ---------- Previous post was at 02:41 PM ----------

I recognized that the last version was somewhat buggy, even crashing under certain special circumstances, so I did some refactoring. Version 0.81 is therefore a pure bugfix release:

https://mega.nz/#!A1NTlAxA!b3tqVcQP7Fc2LU55KfWJNLRRcjH8qPdqBX1xfkqv-i8
[Android Apps and Games] HikingMoose:
Version 0.5 works just fine on 7.1.2 with Flash kernel.
[Android Apps and Games] tvvarun:
were u able to download the app?
[Android Apps and Games] Midomad:
it actually downloaded successfully and will install just fine,just check you root explorer, you will find the Apk!
[Android Apps and Games] Kimbo82:
I wasn't able to download with Chrome either, but it worked with the mega app.
[Android Apps and Games] :
Open the page in "desktop site" mode from whatever browser you are using on your android phone. Then the download buttons become clickable.
[Android Apps and Games] tvvarun:
I think mega is not supported in my country.I used a vpn and was able to download the file.
[Android Apps and Games] realista87:
i am on 0.5 and i don't fully understand why i have to use 0.8 or 0.8.1 version, what are the REAL benefits? what precise bugfix have been fixed?
[Android Apps and Games] ar_15:
How does this app works? Does it modify something in the ROM/Kernel to stop charging?
[Android Apps and Games] real_milux:
-> added to Q/A

---------- Post added at 10:51 AM ---------- Previous post was at 10:33 AM ----------

If you use battery_charging_enabled or store_mode, you'll be fine. There is no real benefit for you at all, unless you want to change the charging limit with external tools like Tasker etc.

If you use charging_enabled, I would recommend you to update. The problem is that such control files cut off and "plug in" the power supply, which causes ACTION_POWER_(DIS)CONNECTED events. Those events were not properly handled, so the service was restarted instead of changing its state. This is not a drastic bug, it should not alter the overall behavior of the application. It's still nasty, though. ;)

The 0.8(1) release is mainly because the external changes of 0.7 had to be handled properly, and I realized that the app rapidly changed the control file in order to "repair" the charging state under certain circumstances, sometimes even crashing. So for 0.7 users, I would say that this update is mandatory.

If you want to know the whole truth, check out the Git repo! Everything is published there before release, we don't hide anything from you guys! ;)

Edit: Totally forgot to mention that again: Only 0.8 will properly start the service if your device is rebooted over night for whatever reasons...
[Android Apps and Games] Midomad:
I suppose 0.8.1 too?[emoji4]
[Android Apps and Games] real_milux:
Comes without saying... ;)
[Android Apps and Games] real_milux:
Just published version 0.8.2 with experimental Amazon Fire support.

The new release is only on MEGA atm, will upload to AFH as soon as they confirm my dev status.
[Android Apps and Games] bam80:
Unfortunately, many devices do not go to Deep Sleep while charging, making battery stressed by constantly charging/discharging with this app, which I guess makes it rather useless. Any means we could try to forcibly put the device to Deep Sleep while charging?
[Android Apps and Games] Midomad:
How could a not go to deep sleep while charging stress the battery !?

Any documentation?
[Android Apps and Games] skyline72:
One of the best app I have downloaded!
[Android Apps and Games] bam80:
Maybe I didn't put it clear,

the point is, when device doesn't go to Deep Sleep, it starts to discharge rather quickly even if it physically connected to the charger, as soon as the App "disconnects" it from the charger. After some battery level drop, it charged again to a certain limit. Then the process repeats, making it charging/discharging constantly. Obviously, it is not what we want to achieve, as it stresses the battery unneedful. So, Deep Sleep seems needed.
[Android Apps and Games] blackwind.:
Would it be possible to "release" root access until the next time you need to change the file so the "#" icon isn't permanently in my statusbar? If Battery Charge Limit keeps the indicator up indefinitely, it's impossible to tell at a glance when another app is using root.
[Android Apps and Games] blueberry.sky:
0.8.2 is not installing correctly. Claims to install ok (tho it sits longer than usual on the installing window) but won't start & no app icon. App info says total size is only 8.00KB.
[Android Apps and Games] lerkin:
Redownload, works fine here
[Android Apps and Games] hgmichna:
Stress from charging-discharging cycles?

Not so obviously. Quick charge-discharge cycles do not stress the battery. Also it is a slow process. When the phone is sleeping, discharging from 80% to 78% can take quite a while, even without deep sleep.

The main two factors that stress a Li-Ion battery are high voltage and high temperature. High loads at low temperatures are also not good, but that does not concern us here. Finally there is the battery-killing deep discharge, but the electronics prevent that.

From 0% to 60% you have very low battery stress, allowing many years of use. From 60% to 80% you have moderate battery stress, but this still extends the life of the battery to quite a few years, possibly longer than you use the phone. From 80% to 100% the battery experiences high stress. Regularly charging to 100% reduces the life time of the battery to very few years. After two years of daily or nightly charging to 100% the battery will have lost quite a bit of its original capacity, and it may become unusable after three years or less.

Short charge-discharge cycles are slightly better than long ones, because they create slightly lower battery temperature peaks. Hence it is best to set the recharge percentage only 1% lower than the charge percentage. They also have the advantage that you often have more charge in your phone when you disconnect it.

In short, if you can get through the day with less than a 100% charge, the Battery Charge Limit app is the best possible solution for your battery, no matter whether it keeps the battery charged in cycles to the set limit. Deep sleep offers no advantage while the phone is being charged.
[Android Apps and Games] blueberry.sky:
Second download md5 matches first. But after reboot it managed to install ok.

0.8.2 seems to be working well on an Amazon Fire. Thanks!
[Android Apps and Games] BorderlinerSTORM:
Seems that I'm in the group for whom this app is not working. HTC Desire 530, Marshmallow 6.0.1 / Sense 7, rooted but S-ON.

Notification comes up and SuperSU also shows a toast about granting the rights, but phone keeps charging and battery level won´t stop at the configured 80%. /sys/class/power_supply/battery/charging_enabled file exists, but always contains "1" (when charging from PC) or "2" (when charging from external charger) when cable's plugged in (it does contain "0" when unplugged, so I guess the basic underlying system is present on my phone) and I seem to be unable to change that, terminal + su + "echo 0" seems to have zero effect. Could it be that this variable is read-only, rather than read-write, on HTC ROMs? (ensuring that /system is mounted RW and changing permissions on the file made no difference).
[Android Apps and Games] Benny Bosser:
Hey,

Thank you so much for including tasker support! What an amazing update my friend!

I'm having difficulties in getting the intent to work. I've tried both methods and I've tried many different ways of setting up the right information in the "extra" box but I always get a toast message "the supplied limit is invalid"

I've attached a screenshot of the intent

Maybe someone can point me in the right direction :)

Thanks in advance

And really thank you for this app, amazing work
[Android Apps and Games] real_milux:
Hey, I think the problem is with the Intent extra. Intents can have multiple extras with different names.

You have to supply an extra that is named "android.intent.extra.TEXT" and contains the new limit as String object.

In your screenshot, I can only see some extra "android.intent.75", but that's not gonna work. ;)
[Android Apps and Games] Benny Bosser:
Thanks for the reply!

I've looked up different tutorials and looked at the tutorial on the tasker website, but whatever I try I just can't get it to work (never used intents in tasker before I'm sorry)

Could you maybe send a screenshot or a task file of a working command please?

So that an Intent noob like me can just copy and edit it :p
[Android Apps and Games] real_milux:
OK, since you seem to lazy to read the Tasker manuals, I tried to do it for you.

(Sorry for being so mean, but your solution is pretty far from the one explained there...)

Try to insert the following into the extra field and tell me the result:

android.intent.extra.TEXT: (String) 75

I hope that the typecast works correctly, the type detection of Tasker might prevent this from working properly...

Edit:

You may also try this one. Although the Tasker manual is not so clear about this, it might do the job:

android.intent.extra.TEXT:"75"
[Android Apps and Games] Benny Bosser:
Thank you putting string before the 75 did the trick

As for the lazy part:

I get that you get fed up with people asking questions without reading.

It's sad that you think I'm one of them. I always read and almost never ask questions

I had spent an hour reading tutorials, including the official one from tasker before asking you that question. Adding (String) was mentioned nowhere

Anyways I really appreciate your help :)

Have a nice day!
[Android Apps and Games] real_milux:
Hey Benny,

in that case, please accept my apology. :o

I only saw the content of your screenshot and made wrong conclusions, because you didn't even mention the key:value syntax or anything like that.

The type conversion syntax IS actually mentioned, although it refers to "Uri" type, not String. I don't use Tasker, therefore I wasn't sure for myself. Good guess I think. ;)

Although this was my fault, one hint to avoid that people like me do falsely prejudge you next time:

Be more specific about the thinks you already tried, make the people see that you already put effort into finding a solution yourself. Avoid posting something that makes people think you don't have any clue what you're doing. ;)

Have a nice day as well! ;)

EDIT:

Because this seems to be an issue that many people are running into, a adapted the source code to accept also any numeric data type.

So, the next release will swallow everything that's somewhat meaningful, no matter if it's String, Integer, Double, Float, Byte, Short, BigInteger or whatever. ;)
[Android Apps and Games] Benny Bosser:
I will, I get why you thought I didn't put in any effort, I indeed should have clarified everything I had tried before :)

No hard feelings my friend, just wanted to clarify that I'm not one if those people demanding things without reading ;) thanks for your understanding and patience!
[Android Apps and Games] der_Kief:
Hi,

can someone please explain how this "automaticlly reset battery stats" work ?

When i set this option when are the stats reset ? When i unplug charger or when threshold (which one?) is reached ?

I tried it but i dont understand the logic behind that.
[Android Apps and Games] bam80:
Thanks [MENTION=2893530]hgmichna[/MENTION], maybe you are right about Deep Sleep, I don't know.

I'm certainly not a battery expert, not sure about you either.

But what I know for sure, is that "not deep" sleep consumes tens and more times current than in deep sleep. Considering it occurs all the time, it doesn't seems so negligible, even in perfect temperature/voltage conditions. Additionally, you have to charge tens more times, since discharging cycle become shorter. Maybe it doesn't matter also, but I would prefer that my battery doesn't discharge through CPU when it's not needed. Never.

Interesting, some devices can do so. Unfortunately, I have no idea how easy, if possible, it could be achieved for others..
[Android Apps and Games] real_milux:
It resets the stats when the device is unplugged within the target range.
[Android Apps and Games] der_Kief:
Ok ... but this doesn't work for me correctly. First reset is executed when charging target (in my case 95%) is reached (charger still plugged). Then I unplug the charger and nothing happen. After the recharge limit (in my case 93%) is passed (notification goes away) the second reset is executed.

Im on stock Nougat 7.1.1 with generic control file. The device is BQ Aquarius X5 Plus.
[Android Apps and Games] real_milux:
The second one is the correct behavior, the reset executes when the service is shut down. For the "good" control files like battery_charging_enabled this is the moment of power removal, for the "bad" control files like charging_enabled the power removal cannot be detected before trying to recharge, for technical reasons.

Regarding the first reset: This is actually wrong behavior, I introduced longer tolerance delays (3 seconds) in version 0.8.1 in order to fix this problem for the "bad" control files, but some devices might need even more tolerance.

Are you on the latest version, e.g. >= 0.8.1?
[Android Apps and Games] der_Kief:
yes i'm on 0.81.

I can try battery_charging_enabled. This is also working (when i remember correctly).

I thougt as im not using a Nexus or Pixel device its better to use generic.

How can i figure out that im using the right control file ?
[Android Apps and Games] real_milux:
If you're not using OnePlus, you're better off with battery_charging_enabled, see Q/A section for a more detailed explanation!
[Android Apps and Games] der_Kief:
i see .... so i try battery_charging_enabled the next charging cycle.

If the problem still exists i'll report back.
[Android Apps and Games] post-mortem:
As I understand it, the first reset is expected in his case, since his target is set at 93%. When the battery reaches 93% (which is 90% or higher) and your app tricks the ROM to stop charging the device, the Android OS default to clear stats kicks in. The second reset is triggered by your app.

Personally, I don't think it's an issue.
[Android Apps and Games] TR2N:
Hi guys,

I'm on the latest version of the app. I can't remember exactly, but in the earlier versions of the app the charging icon changed to normal when the limit of 80% was reached. In the recent versions the battery charging icon with the flash inside remains. Any ideas?
[Android Apps and Games] real_milux:
You're right, the first reset comes from the ROM in this case.

Thanks for pointing that out!

I didn't consider this because I don't charge above 80%.
[Android Apps and Games] der_Kief:
... so if i interpret this right i dont have to use "automaticlly reset battery stats" ?
[Android Apps and Games] Galaxea:
No S3 mini support?

How can I get this to work on the S3 mini?

Can I supply the details to someone of the files on the device so that it can be made compatible please?
[Android Apps and Games] real_milux:
I can be your someone. ;)

Please tell me which file has to be modified, which state disables charging, and which state re-enables charging.

---------- Post added at 11:57 AM ---------- Previous post was at 11:56 AM ----------

Exactly, the ROM will do the reset on unplug anyway if you charge beyond 90%.
[Android Apps and Games] Galaxea:
Thanks. I will get in touch later today with info.
[Android Apps and Games] hgmichna:
Automatically reset battery stats

You don't have to use it anyway. If you leave it unset, the battery statistics in the settings will cover a longer time, several days or weeks.

If you set it, then the battery statistics will only show data since your last charge.

I believe there is no functional effect. Your phone will work the same either way.
[Android Apps and Games] 8zabi:
Hi

I have the same problem as someone before: the app stops the charging at a desired level, but after that the phone stops charging until a reboot or manually editing the charging_enabled file

I am using Nexus 6 (shamu) with LineageOS 14.1, Android 7.1.2. Tried with SELinux set to permissive, nothing changed.

This is the source of the charging driver, maybe it is useful for you
[Android Apps and Games] ar_15:
thank you for the explanation!
[Android Apps and Games] iperov:
current problems: (sry bad english)

1) app not start automatically after phone reboot, autostart enabled, tested on any MIUI

2) sometime after using high-load apps such as DJI GO app, Battery Charge Limit unloaded ! then I put phone on charge, and its charges to 100%, so app not works but exist in task manager.
[Android Apps and Games] Galaxea:
For S3 Mini: I think part of my problem is that I cannot even change any of the text files in the battery folder with any app (EX File Explorer or Root Explorer).

Maybe that is why the app crashes for me.

How do I set all files to be rw in a folder? Why would that folders contents not be modifiable if I am rooted? Thanks.
[Android Apps and Games] ar_15:
is the "lightning" icon supposed to disappear when it reaches the limit? my phone has turned off the charging LED when reached 80% but the lightning icon inside the battery is still there.

also, I have a bug where I can't scroll down the main windows (can't even see the button to clear the battery stats) and I can't enter settings on the 0.8.2
[Android Apps and Games] blueberry.sky:
You're talking about the 3 dot menu I presume. That does nothing. It was just part of the app template.

---------- Post added at 01:23 PM ---------- Previous post was at 01:13 PM ----------

In terminal this will check the permissions of all files

cd folder_path [enter]
ls -al [enter]

To change file permissions to rw

su [enter]
chmod 600 file_path/file_name [enter]

Some devices can be a problem. It just might not be writable at all.
[Android Apps and Games] Galaxea:
in ADB I can't even do : cd /sys

Says cannot find path. I am trying to get to /sys/class/power_supply/battery
[Android Apps and Games] der_Kief:
same behaviour here. dont know if this is correct mode of operation. also i cannot remember if this was the same with older versions.
[Android Apps and Games] hgmichna:
Lightning Symbol

Perhaps the lightning indicates that the charging cable is connected. :laugh: