[APP][MOTO-MODS]Battery Mod Percentage + Efficiency Enhancer

Search This thread

erfanoabdi

Recognized Developer
Jan 3, 2015
1,010
3,156
Tehran
erfanoabdi.github.io
icon.png
Battery Mod Percentage + Efficiency Mode Enhancer
this is an app to Read Battery Moto Mod Details for Custom Roms (like RR, LOS)
we can use this app to see battery mod percentage until custom roms start supporting mods completely
if you guys have any idea to make this app better and more useful Please let me know
also source code is available in Github i'll appreciate any help :cowboy:
this app still need testers, lol
this app should work on moto z play with loaded kernel mods(greybus) drivers

Efficiency Mode Enhancer :
with this feature you can edit 80% of Efficiency Mode to any value
or even turn off battery mod (setting to 1%)

**Efficiency Mode Enhancer just need Xposed to work (official and nougat unofficial)
**Efficiency Mode Enhancer need full battery mod compatible ROM (like Stock, RR, Carbon)

TODO :
Use Nougat Tile?

Bugs :
Please Tell

Downloads :
Click on Download Tab



XDA:DevDB Information
Battery Mod Percentage + Efficiency Mode Enhancer, Device Specific App for the Moto Z

Contributors
erfanoabdi
Source Code: https://github.com/erfanoabdi/BatteryModPercentage


Version Information
Status: Stable
Current Stable Version: 1.9
Stable Release Date: 2017-08-17

Created 2017-03-19
Last Updated 2017-08-17
 

Attachments

  • Screenshot_20170319-235926.png
    Screenshot_20170319-235926.png
    145.2 KB · Views: 15,837
  • Screenshot_20170320-224103.png
    Screenshot_20170320-224103.png
    144.1 KB · Views: 15,736
  • Screenshot_20170321-101607.png
    Screenshot_20170321-101607.png
    192.1 KB · Views: 15,436
  • Screenshot_20170817-173230.png
    Screenshot_20170817-173230.png
    171.1 KB · Views: 11,196
Last edited:

lollyjay

Senior Member
Jul 26, 2012
3,785
1,653
Fresno
I downloaded 1.3.5; testing now. Looks good. Battery mod percentage is showing. This is very helpful to have for all of the CM based ROMs. :good:

PS any luck with the temperature reading fix?
 

lollyjay

Senior Member
Jul 26, 2012
3,785
1,653
Fresno
Thanks again

Yeah I'll look on it as soon as i figure out what is exactly format of temperature ;)
Everything is working well. I posted a link on the AOKP forum along with a link to the SELinux permissive boot.img
Do you think it is a good idea to have the boot.img link in your OP?
 

erfanoabdi

Recognized Developer
Jan 3, 2015
1,010
3,156
Tehran
erfanoabdi.github.io
Everything is working well. I posted a link on the AOKP forum along with a link to the SELinux permissive boot.img
Do you think it is a good idea to have the boot.img link in your OP?
Thanks for post
To make your selinux peremisive you can only use this command on every boot or init.d :
setenforce 0
Or simply use selinux changer apps
I don't recommend boot.img cause it's old kernel

Does this work on stock u nrooted?
Unfortunately Unrooted stock has enforced selinux

I notice that the notification shows 73% while the app shows 43% :confused:
Looks something killed app(like memory wiping)
I have idea for this, hopefully in next update is gonna be OK
 

lollyjay

Senior Member
Jul 26, 2012
3,785
1,653
Fresno
Thanks for post
To make your selinux peremisive you can only use this command on every boot or init.d :
setenforce 0
Or simply use selinux changer apps
I don't recommend boot.img cause it's old kernel


Unfortunately Unrooted stock has enforced selinux


Looks something killed app(like memory wiping)
I have idea for this, hopefully in next update is gonna be OK
Thanks for your suggestion. Which SELinux changing app?
I think that the percentage problem was because I disconnected the battery mod and reconnected it
 

erfanoabdi

Recognized Developer
Jan 3, 2015
1,010
3,156
Tehran
erfanoabdi.github.io
Do you mind if we ship it in device tree for custom ROM ?
It will then be installed as system app and will not need root to work.

do you think LineageOS will accept this app on device tree ?

this app doesn't need root on permissive selinux (now we can deny root access prompt)
and in enforced selinux it can work by addressing this denials :
Code:
I/rymodpercentage: type=1400 audit(0.0:746): avc: denied { read } for uid=10266 name="gb_battery" dev="sysfs" ino=50256 scontext=u:r:untrusted_app:s0:c512,c768 tcontext=u:object_r:sysfs_greybus:s0 tclass=dir permissive=1
I/rymodpercentage: type=1400 audit(0.0:747): avc: denied { open } for uid=10266 path="/sys/devices/platform/mods_ap/greybus1/1-3/1-3.1/power_supply/gb_battery" dev="sysfs" ino=50256 scontext=u:r:untrusted_app:s0:c512,c768 tcontext=u:object_r:sysfs_greybus:s0 tclass=dir permissive=1
but for now i'm trying to read with root
 

Top Liked Posts

  • There are no posts matching your filters.
  • 16
    icon.png
    Battery Mod Percentage + Efficiency Mode Enhancer
    this is an app to Read Battery Moto Mod Details for Custom Roms (like RR, LOS)
    we can use this app to see battery mod percentage until custom roms start supporting mods completely
    if you guys have any idea to make this app better and more useful Please let me know
    also source code is available in Github i'll appreciate any help :cowboy:
    this app still need testers, lol
    this app should work on moto z play with loaded kernel mods(greybus) drivers

    Efficiency Mode Enhancer :
    with this feature you can edit 80% of Efficiency Mode to any value
    or even turn off battery mod (setting to 1%)

    **Efficiency Mode Enhancer just need Xposed to work (official and nougat unofficial)
    **Efficiency Mode Enhancer need full battery mod compatible ROM (like Stock, RR, Carbon)

    TODO :
    Use Nougat Tile?

    Bugs :
    Please Tell

    Downloads :
    Click on Download Tab



    XDA:DevDB Information
    Battery Mod Percentage + Efficiency Mode Enhancer, Device Specific App for the Moto Z

    Contributors
    erfanoabdi
    Source Code: https://github.com/erfanoabdi/BatteryModPercentage


    Version Information
    Status: Stable
    Current Stable Version: 1.9
    Stable Release Date: 2017-08-17

    Created 2017-03-19
    Last Updated 2017-08-17
    4
    New app uploaded
    Version 1.3
    +Now battery level is on notification
    +Battery Level Toast
    +Next goal is nougat tile !?

    Version 1.3.5
    +Fix Notification Bugs
    +Add Battery Status in Notification
    1
    I'm testing it now. Is the temperature in Kelvin?
    Edit: nope... it's now showing 400 "temperature units"
    1
    I'm testing it now. Is the temperature in Kelvin?
    Edit: nope... it's now showing 400 "temperature units"
    Thanks for testing
    :D i don't know, but I guess whatever it is, it's 10 times greater than real value, so i guess your real battery temp was 40.0°c
    1
    Thanks for testing
    :D i don't know, but I guess whatever it is, it's 10 times greater than real value, so i guess your real battery temp was 40.0°c
    Yes that would make sense