yashsingh1/xdaforums huggingface dataset:
[Moto G Original Android Development] elrod16:
The link in this post is for a new paxkage testing to see if the flashable zip bug is resolved. The whole mod is in this paxkage, including GUI. Please just uninstall the old GUI like a normal app though before flashing, the GUI is now installed to the system partition instead of data. As always, lemme know how it works:

https://drive.google.com/file/d/0B_hgNZE_j5sVVkJPM2hnWFVId1E/view?usp=drivesdk

---------------------------------------------------

Please thank if my software has helped you and please leave logs and descriptions of problems if my software did not work for you.

Please donate at:

http://www.PayPal.me/elrod16

Every bit helps, thanks! :)
[Moto G Original Android Development] BryanByteZ:
I have waiting for while but now my setups rocks again!

Thanks dev ! Working like a charm ! Now its time to maxlife charge!
[Moto G Original Android Development] BryanByteZ:
Hey man before wipe my device (to shutdown the encryption) maxlife was working (on 95 slow) now setting up by the GUI it wont stop charging just can use normal slow and turbo
[Moto G Original Android Development] lucastracq:
i'm having trouble on Krexus-CAF. the ROM has init.d support but Maxlife isn't working. i tried setting different parameters, rebooting and even change the 91bms file, but nothing. what can i try?
[Moto G Original Android Development] dingermtb:
The latest is, once again, running perfectly on my OnePlus X running Exodus 6.0.1 with blu_spark kernel.

Sent from Outside the 9 using my A.R.I.S.E. Exodus Zombiefied OnyX
[Moto G Original Android Development] Mattwmaster58:
Same here ):
[Moto G Original Android Development] elrod16:
Did you make sure your busybox was working again after the wipe? Busybox is also often necessary for init.d to work.

For people who it isnt working, verify you have busybox, and if init.d isnt working try SManager or Universal Init.d to run it.

---------------------------------------------------

Please thank if my software has helped you and please leave logs and descriptions of problems if my software did not work for you.

Please donate at:

http://www.PayPal.me/elrod16

Every bit helps, thanks! :)
[Moto G Original Android Development] BryanByteZ:
Busybox already installed

So what i did

Installed busybox 2nd time

Installed maxlife again and wipe cache and dalvik

Its working but i keep getting rhe same error in terminal
[Moto G Original Android Development] elrod16:
That error is trivial, it doesnt alter the overall function

---------------------------------------------------

Please thank if my software has helped you and please leave logs and descriptions of problems if my software did not work for you.

Please donate at:

http://www.PayPal.me/elrod16

Every bit helps, thanks! :)
[Moto G Original Android Development] ronyscomparim:
perfect, it worked for me, thanks for the work[emoji1] [emoji106]

Sent fron my

Moto X Play
[Moto G Original Android Development] munturule:
hii :D

moto x, stock mod + custom kernel + exposed + greenify > not work

i have test support init.d and disabled auto hibernation still not work... why :)

thanks before,
[Moto G Original Android Development] elrod16:
Disable androids Doze and greenify's, auto-hibernate, and aggressive mode. Or any other battery savers. By nature they dont play well with full time running apps.

Edit: it is also critical that you have working busybox.

---------------------------------------------------

Please thank if my software has helped you and please leave logs and descriptions of problems if my software did not work for you.

Please donate at:

http://www.PayPal.me/elrod16

Every bit helps, thanks! :)
[Moto G Original Android Development] nereis:
Been using MaxLife on my Sony tablet for a while now, and been playing with other charge management solutions but I fell back on this one as it has been the most familiar, and I decided to make a little contribution to this project.

Maxlife Smart Battery Charger 1.2 beta by Nereis Nereus Version 7 (October 16, 2017)

http://llamalab.com/automate/community/flows/16512

Fast charge when below 80%, normal charge up to 90%, if plugged in at night wait ~6hrs before letting charge to 100%, otherwise maintain charge between 81~90% during the day if left on charger.

Requires eldrod16's Maxlife, tested with HTC 10, stock rooted Android N.

https://xdaforums.com/moto-g/orig-development/mod-maxlife-battery-lifetime-extender-t3261533

First alpha version open to public testing, no effort has been made to optimize flow but should be rather straightforward to read/edit.

Requires root and Maxlife installed, should be easy to migrate to Magisk Magic Charging Switch for those who wish to remain systemless. Will work on this once systemless xposed in magisk passes safetynet, but feel free to adapt this to another charge management daemon.

1.0 alpha: initial release

1.0 beta: bug fixes / easier to read flow layout

1.2 beta: bug fixes / better logic

will eventually add option to maintain max charge at 75% if phone has been left on charger for over 3 days.

--

PS. Delete 91bms from init.d if you have issues with charge stuck on Maxlife default setting, and check if Kernel Auditor is running init.d emulation w/ delay on boot.
[Moto G Original Android Development] pinket:
Maxlife not working

Hello Elrod,

First thank you for creating maxlife.

If I can get it to work I will be a happy customer.

First the perquisites :

I have a Neffos Y5L phone with Qualcomm 210 snapdragon.

It has a Twrp custom rom which is completely stock except for the fact it's rooted.

If it has init.d support I have no idea what that means and how to find out.

I installed maxlife 1.09c through Twrp without issues and after a reboot I could run the app, so I set it to 85 slow.

Connected the charger and saw it pass beyond 85.

Disconnected the charger and started looking for the cfg file. It showed 85 slow.

Then I looked at the bm91 file and saw it showed 90 turbo.

I changed that to 85 slow and saved in Unix format, rebooted again and connected the charger again.

Again it went past 85.

I opened a terminal as su and set maxlife there. I got a confirmation that it was set and checked the cfg file. It was showing the right values.

In Uninstalled maxlife as per instructions and deleted every remaining entries from maxlife from the system.

I rebooted again and re-installed maxlife through Twrp.

Now I can not start the maxlife app.

I repeatedly Uninstalled and re-installed but to no avail. Maxlife app installes but does not run.

Any ideas on what is going on?

Greetings,

Mike
[Moto G Original Android Development] satanas17:
Hi,

could you please avoid to quote entire OP ? Thanks...

For your question, answer is in post #17...not so far from yours... ;)
[Moto G Original Android Development] sangysp:
Please tell me the solution
[Moto G Original Android Development] elrod16:
Delete:

/system/bin/maxlife

/system/etc/init.d/91bms

Could you please elaborate more on the lag though, and what system resource (e.g. RAM) seems to be the bottleneck in performance? This program should have zero effect on performance, on my device it has a cpu usage of 0.03% and RAM at 0.35 MB, and it doesn't do any disk I/O. It actually only communicates with a single device driver (for the USB bus power) in the entire kernel. It also spends 59.9 seconds out of every minute "sleeping", and in this state it isnt running anything on the CPU, it is just waiting for the scheduler to wake it back up when a timer it sets expires.

This post wasn't meant to be rude, and you have my sincere apology if it came off that way, but without more information I cannot see where it could cause lag, unless it were a third party app conflicting with it. Other "power and charging" apps as well as task killers may very well create problems with MaxLife.

Do you currently have any apps for checking which processes (native and/or virtual machine) are consuming the most RAM, CPU, or I/O?

---------------------------------------------------

Please thank if my software has helped you and please leave logs and descriptions of problems if my software did not work for you.
[Moto G Original Android Development] sangysp:
OK thanks your software worked but. My phone is now lagging so much
[Moto G Original Android Development] satanas17:
here is it, sir...you can leave it in place and change default values or you have to remove files like elrod16 explains in post 17...
[Moto G Original Android Development] abeloman:
Hi, just to report that this is working flawlessly... Just a question, do you consider it has benefits if a put a lever over 90 percent? Or should I stick with the default value?
[Moto G Original Android Development] elrod16:
I think pushing it past 90 would greatly diminish the gains, because at least on my device it's already climbing past 4.2 volts beyond that, and at least to my understanding 4.2 volts and lower is where it is healthier for the battery. And i would recommend using slow charge as often as possible, or else the battery spends way more time at peak voltage.

---------------------------------------------------

Please thank if my software has helped you and please leave logs and descriptions of problems if my software did not work for you.
[Moto G Original Android Development] abeloman:
I set 95 and slow, what you think about it?
[Moto G Original Android Development] elrod16:
That'll probably help to an extent, but due to imperfections in manufacturing processes, every device is ever so slightly different along with differences introduced by wear, so I can't say anything with absolute certainty. If you want to do fine precuse tuning of the settings for your specific needs, I would recommend getting an app for reading battery voltage and see what point in your charge cycle you reach 4.1 volts and 4.2 volts as well aals peak voltage (4.3 volts) for the charge speed you intend to use and see what the lowest battery capacity you could live with with the battery below peak voltage or lowest time spent at peak voltage if it has already peaked at the battery level you need.

That was kinda drawn out and rambling, I hope it made sense

---------------------------------------------------

Please thank if my software has helped you and please leave logs and descriptions of problems if my software did not work for you.
[Moto G Original Android Development] satanas17:
Hi,

some strange result...but before, some infos :

Moto G 1gen LTE XT1039

rom BlissPop 4.0.3 latest build (23/11/2015)

Optimus kernel R49

I've flashed it and everything went well... checked files and they are in 777...checked "91bms" and it's in his original state (90 slow).

Let my phone charging by night and I've take a look this morning...it indicates "100%" ...should not indicate 90 instead of 100 or am i misunderstanding something ?
[Moto G Original Android Development] abeloman:
Same here, after a few cycles I saw the indicator goes up the value, but one thing I noticed after that is that in the battery stats it says "it is not charging"... Is that the expected behavior?
[Moto G Original Android Development] satanas17:
Thanks, i'm feeling less alone... ;)

I haven't noticed that but i honestly say that i haven't looked so precisely...
[Moto G Original Android Development] elrod16:
I was able to duplicate this, what I think it is is that the phone is entering deep sleep, so all processes are suspended, including mine. A solution I found was to enable "stay awake while charging" in Developer options.

Next build I'll try adding a suspend blocker that'll only be active if the device is currently charging, until I get the time (prolly later tody or tomorrow), just try the solution above

---------------------------------------------------

Please thank if my software has helped you and please leave logs and descriptions of problems if my software did not work for you.
[Moto G Original Android Development] satanas17:
Ok, so, i'm afraid to disappoint you a little bit ;) :p

I'm using this "Stay Awake" function too and especially used it in this case for taking my screenshots at the right time.

After [MENTION=4618329]abeloman[/MENTION] post, decided to look a little further myself too. Phone was above the 90% of charge, so played a bit with Angry Birds until it cames below (89%) an put it in charge.

Phone was charging through my eee laptop's Usb.

Here are the screenshots in order of progression :

As you can see, begins at 89, exceed 90 and goes his way to 100%

Hope it helps...if i can do more, just ask ;)
[Moto G Original Android Development] elrod16:
OK, a new build is up that uses a wake lock while charging. Can you test it on a standard charger and on a PC usb charge?

This build worked for me on a standard charger, however PC charging may be totally different because of MTP transfer mode. If it still causes issues on PC charging I may have to add an option to disable adb and MTP for PC connections.

---------------------------------------------------

Please thank if my software has helped you and please leave logs and descriptions of problems if my software did not work for you.
[Moto G Original Android Development] satanas17:
Will try asap...thanks for your reactivity ;)
[Moto G Original Android Development] elrod16:
No problem, I like to protect my reputation as a developer and have people be able to trust in the fact that if my programs fail on them I'll do my best to quickly rectify the issue. It can be difficult at times though, between being a family man and a 50+ hour a week machine technician.

---------------------------------------------------

Please thank if my software has helped you and please leave logs and descriptions of problems if my software did not work for you.
[Moto G Original Android Development] satanas17:
Totally understandable and agreed ;)

Ok, test running at this moment from battery discharged to 85% and phone connected to a standard wallcharger...waiting results to post this with attached screenshots...

On that particular matter, i've noticed that you changed the default value to 85 in 91bms file and is always mentioned to be at 90 in description...

Detail, of course, but noticed it because reverted it to 90 for me.

Sadly, seems to be the same, phone has passed the "90" setting and continue his way until reaching 100%
[Moto G Original Android Development] elrod16:
Unfortunately I have not been able to replicate it again with the latest build, if it runs over again could you verify that the process is still running and hasn't died with a terminal app?

I suspect something is killing the process in the background

---------------------------------------------------

Please thank if my software has helped you and please leave logs and descriptions of problems if my software did not work for you.
[Moto G Original Android Development] ronyscomparim:
testing in 2015 MOTO G Dual chip
[Moto G Original Android Development] elrod16:
Thanks :) lemme know how it works for ya

---------------------------------------------------

Please thank if my software has helped you and please leave logs and descriptions of problems if my software did not work for you.
[Moto G Original Android Development] ronyscomparim:
I set at 90, but he carried up to 100
[Moto G Original Android Development] elrod16:
Can you check if the process is running?

ps | grep maxlife

Because these are the two most likely scenarios:

1. The LMK is killing the app

2. When you edit the 91bms file your editor isnt saving it in UNIX format. If it is saved in any other formatting the launch script will not work. I've accidentally done this a few times myself. Try running it after reflashing it but not editing anything, that should reveal if this is the issue.

---------------------------------------------------

Please thank if my software has helped you and please leave logs and descriptions of problems if my software did not work for you.
[Moto G Original Android Development] ronyscomparim:
saving in Unix format?
[Moto G Original Android Development] elrod16:
Here is an example with the built in ES File Explorer editor:

The format determines how line terminators are represented in the file, and it must be UNIX to run.

---------------------------------------------------

Please thank if my software has helped you and please leave logs and descriptions of problems if my software did not work for you.
[Moto G Original Android Development] ronyscomparim:
error while trying to save the file and not saved.

Moto G3 dual chip.
[Moto G Original Android Development] ronyscomparim:
does not work on Moto G3 2015 root 5.1.1 official
[Moto G Original Android Development] elrod16:
If that file isn't valid it won't work at all, if the file is giving you errors with saving make sure you have root enabled for that app and that system partition is writeable.

---------------------------------------------------

Please thank if my software has helped you and please leave logs and descriptions of problems if my software did not work for you.
[Moto G Original Android Development] granazis:
[MENTION=6190802]elrod16[/MENTION],Hi friend i ought to inform you 1. that only beta build works ok on my falcon xt1032 converted to Gpe/Broken M rom but when the target arrived (adj to 90% slow) charging stopped,if the charger renains plugged in some more the indicator shows 88 is it right?

2. on my mako tried on 2 M roms: pure nexus, RR ,none of them(zips) worked although successfuly saved the limit(85% slow)

All these FYI thinking that may you helped somewhere.

TNX!!! for your efforts friend.

Have a happy new year in health

Christos
[Moto G Original Android Development] elrod16:
Thanks for the report. Unfortunately I've asked several people and gotten no response on this, but can you use a terminal emulator to verify if the program is running or not? :/ I need to verify if it is a problem starting the program (or keeping it open) or a problem in the program code for people who are having issues.

---------------------------------------------------

Please thank if my software has helped you and please leave logs and descriptions of problems if my software did not work for you.
[Moto G Original Android Development] ronyscomparim:
which emulator can use to find out if this working would love to help
[Moto G Original Android Development] ronyscomparim:
are these permissions should I do?
[Moto G Original Android Development] elrod16:
It is an app called terminal emulator.

And no, you need the execute permissions all ticked.

Thanks for continuing with the trouble shooting.

---------------------------------------------------

Please thank if my software has helped you and please leave logs and descriptions of problems if my software did not work for you.
[Moto G Original Android Development] jmonster141:
Thanks! It works as advertised for me. I'm not too worried about battery longevity though, I've been looking for a way to avoid the touchscreen issues this phone has at a full charge when still connected to the charger. For me, I am running "95 slow". At full (95%) and still connected to the wall I am not having any touchscreen inconsistencies anymore. Seems like 2 benefits in one for the moto g XT1032. Thanks again!

Side note: running videos or games may discharge your battery ever so slowly when still charging in this configuration FYI.
[Moto G Original Android Development] the_poolee:
Seems to be working OK, as long as the screen doesn't turn off, in CM13 based on Marshmallow. Well, as already mentioned in here, its deep sleep to blame. I just turned on Daydream option while charging to get around this problem. I just wanted to ask one thing, does your v1.0.2 update in any way introduce unwanted drain when not plugged in with the kernel level suspend block? I saw the OP and understand that it doesn't work that way but just wanted to clarify it since after flashing it, night time battery drop seems to have increased.
[Moto G Original Android Development] elrod16:
Sorry for the late reply! Been really busy, but no, it shouldn't, one explanation could be that the battery drops faster to 70% charge because this eliminates the "saturation" charge stage of charging.

---------------------------------------------------

Please thank if my software has helped you and please leave logs and descriptions of problems if my software did not work for you.
[Moto G Original Android Development] the_poolee:
No probs bud. :angel: I dunno what is happening behind the scenes but with my frantic flashing of cm nightlies every other day, and with cm guys making kernel updates every now and then, seems nothing can be deduced from a few instances of this particular issue. And BTW, I was NOT referring to battery drop from full level (say 85 or 90 with your mod), rather the drop from whatever level the battery is at before I go to sleep. Anyways, thanks for the reply.
[Moto G Original Android Development] elrod16:
Alternatively, the way this mod works is very "generalized" to maintain compatibility with as many kernels and Qualcomm chip sets as possible, and there may be small changes in certain kernels or android versions that I don't know about or account for that could cause undocumented behavior. Thanks for the user report though, these are very helpful.

[MENTION=4561083]jmonster141[/MENTION]: Considering what you posted I may upload a dual bundle of this and my SCRFIX mod as a fix all for touch screen issues. I hadn't heard of the full charge issue, but if this works, wonderful! SCRFIX was made aimed at deep sleep / dt2w / s2w touchscreen issues, however it may fix others.

---------------------------------------------------

Please thank if my software has helped you and please leave logs and descriptions of problems if my software did not work for you.
[Moto G Original Android Development] Dazzller:
Working awesome. Thanks.
[Moto G Original Android Development] jmonster141:
Yeah, the full charge apparently screws with the touchscreen hardware when it's still plugged in at 100%. Unplug it and touchscreen issues are gone. Your mod makes my phone never have a full charge which negates any hardware issues. Nothing on the software level wrong, just the one downside I had for this phone initially when I bought it and noticed it right off the bat.
[Moto G Original Android Development] motolollipop:
Hello friend,

Thanks for this.

Can you add a feature that is resetting battery stats after the charging is finished?
[Moto G Original Android Development] elrod16:
Funny that you asked, that is a feature currently in the works

---------------------------------------------------

Please thank if my software has helped you and please leave logs and descriptions of problems if my software did not work for you.
[Moto G Original Android Development] rubiicon59:
Successfully installed and running on Sony Xperia Z2, Lollipop.

I will test and let you know how it goes.
[Moto G Original Android Development] elrod16:
Thanks, theoretically it should work on anything that has a Qualcomm based chipset. Almost guaranteed for all Snapdragon series chip sets. I only say theoretically cuz I can't possibly test every model on my budget and access to handsets.

---------------------------------------------------

Please thank if my software has helped you and please leave logs and descriptions of problems if my software did not work for you.
[Moto G Original Android Development] elrod16:
For you and any one else interested, the new update that is up, maxlife v1.0.3, has the battery stats reset feature. Testing worked on my device, can others confirm for other ROMS? Thanks!

---------------------------------------------------

Please thank if my software has helped you and please leave logs and descriptions of problems if my software did not work for you.
[Moto G Original Android Development] ==vj==:
Testing Maxlife mod on Moto G 3rd gen - 2015 XT1550. ROM: crDroid Marshmallow 6.0.1

Have flashed fine. The process is found running. Will get back on results after couple of days of usage.
[Moto G Original Android Development] elrod16:
Thanks, eager to hear back, nice professional shot of it running :P

---------------------------------------------------

Please thank if my software has helped you and please leave logs and descriptions of problems if my software did not work for you.