Trimmer vs lagfix - Nexus 5 Q&A, Help & Troubleshooting

Other than Trimmer supporting lollipop is there any difference between the effect of using Trimmer or lagfix?

Anderson2 said:
Other than Trimmer supporting lollipop is there any difference between the effect of using Trimmer or lagfix?
Click to expand...
Click to collapse
Nope, except for that Trimmer's functions are free and they aren't lagfix

Thanks for the thread. This is how I found this app) Just downloaded it.
SENT BY ENTANGLEMENT

TRIM is supported since Android 4.3, so it would be stupid to use fstrim apps like Trimmer.

alexiuss said:
TRIM is supported since Android 4.3, so it would be stupid to use fstrim apps like Trimmer.
Click to expand...
Click to collapse
No it isn't. Some devices need to trim more regularly (Like N7 2012)

Sent by entanglement
Seems to work on mine

GtrCraft said:
No it isn't. Some devices need to trim more regularly (Like N7 2012)
Click to expand...
Click to collapse
Android automatically TRIM filesystems once every 24 hours, so, having external apps doing the same thing is dumb.
"The Android framework will send out a “start idle maintenance window” event that the MountService listens for, and then invokes vold to fstrim filesystems when a few conditions have been met – the device hasn’t been touched for over an hour, no idle maintenance window event has been sent in 24 hours, and the device is either off-charger with 80% battery or on-charger with 30% battery. The goal is to have fstrim run roughly once every 24 hours if you’re in the habit of plugging the device in to charge every night."

alexiuss said:
Android automatically TRIM filesystems once every 24 hours, so, having external apps doing the same thing is dumb.
"The Android framework will send out a “start idle maintenance window” event that the MountService listens for, and then invokes vold to fstrim filesystems when a few conditions have been met – the device hasn’t been touched for over an hour, no idle maintenance window event has been sent in 24 hours, and the device is either off-charger with 80% battery or on-charger with 30% battery. The goal is to have fstrim run roughly once every 24 hours if you’re in the habit of plugging the device in to charge every night."
Click to expand...
Click to collapse
And what if those conditions aren't met, nobody is forcing you to use it

Related

[APK] Seeder 2.0.0 entropy generator to provide significant lag reduction

Hey everyone,
Version 2.0.0 released!
This version introduces performance tuning, power management control, and an optional MMC I/O queue extension/timing change.
For those of you who have seen reboots / black screens that seem to be caused by Seeder, I suspect it may be due to the power management implemented in previous versions. Disabling power management (by unchecking "Suspend RNG service while screen off") may help. In my testing, battery impact was negligible (less than 2% per 24h).
The performance profiles are Light, Moderate, and Aggressive, and they control how frequently rngd wakes. The default configuration (Light) is unchanged from previous versions. Moderate and Aggressive may impact battery life (slightly), but may also help on devices where the entropy pool is drained quickly and often.
Last but not least, the "Extend I/O queue" option increases the nr_requests on MMC devices to 1024, and increases the dirty page expiry time, allowing more outstanding writes to accumulate. This may allow the I/O scheduler to make better decisions and combine more writes; some users have reported an improvement under heavy I/O.
Feedback appreciated!
---
On some (older) versions of Android, the JVM (and other components) often read random data from the blocking /dev/random device. On newer builds, this problem has been solved, yet depletion of the input entropy pool still seems to slow devices.
So, I cross-compiled rngd, and used it to feed /dev/urandom into /dev/random at 1 second intervals.
Result? Significant lag reduction (for some people)! :good:
Note - if you want to try it, you must be running a rooted device, and you only need to install one of the APKs (latest version is best). Then, just open it, and turn it on. The other files (patches / .zips) are intended for recompiling, packaging, and init.d integration. If you uninstall the app, either turn off rngd first (open, and click the on/off button), or reboot afterwards; the UI does not presently kill the daemon on uninstallation.
For more information on using the .zip flashing method, see Ryuinferno's post here:
http://forum.xda-developers.com/showpost.php?p=36479461&postcount=1924
FAQ
Q: Do I need the .apk or the .zip?
A: The easiest method is simply installing the latest .apk, attached below. You do not need to use the patch or the .zip file.
Q: What is the patch for?
A: The patch file contains the source differences needed to recompile the Seeder version of the rngd binary. You only need it if you want to recompile rngd yourself.
Q: What is the .zip file for?
A: The .zip file contains the latest rngd binary. It is intended for ROM builders or those who want to build their own CWMR packages.
Q: Seeder keeps shutting down! Does this mean I have to restart it?
A: The Seeder UI is only used to configure and start/stop the RNG service, which runs in the background. The RNG service is not visible from Android, since it is a native Linux process. You can terminate the UI at any time, and the service will continue running.
Q: Does seeder cause excessive battery drain?
A: Seeder 1.2.7 introduced an RNG service power-saving mode. The process automatically suspends whenever the screen is off. The code is actually in the rngd native binary, so suspend/resume events happen independently of the UI; you can see it in action by attaching to the running process with strace. This means that battery drain while the screen is off is highly unlikely.
While the screen is on, the RNG service simply polls a file descriptor every second, and, when needed, injects a small amount of random data into /dev/random (and calls an ioctl). It's unlikely that this would present enough load to trigger a CPU governor state change at 10mhz (let alone 200mhz), so it shouldn't impact battery life. Having said that, I have received sporadic reports that it does reduce battery life on some devices. They may be coincidental (other software installed at the same time), or due to extra device use while testing. Or, they may be real. If you think your battery drain has increased, shoot me a PM!
Q: How can I see the RNG service Linux process?
A: In a terminal, type: ps | grep rngd
Q: How do I uninstall the .apk?
A: Launch Seeder, and stop the RNG service. Then, uninstall the app as you normally would. Alternatively, uninstall the app, and reboot.
Q: Is seeding /dev/random with /dev/urandom safe?
A: Seeding /dev/random with PRNG-derived data does reduce the quality of its random data. However, it's worth noting that nearly all major OSes except Linux do this. Linux is one of the very few to offer a blocking RNG device. And, at least as of ICS, Dalvik doesn't even read /dev/random, so there is little difference anyway.
Updates
There has been a lot of controversy about Seeder/rngd. In newer versions of Dalvik, nothing touches /dev/random, and yet many users (including myself) still notice a lag reduction. There are theories ranging from kernel lock contention to UI polling load when crediting the entropy pool to simply kicking the governor. And many who believe it's all placebo. I'm trying my best to figure out what exactly is happening, and others are as well.
Someone asked how I arrived at the conclusion I did when I started the thread back in November, and I posted this; I think it might be better served here:
A while back one of the webapps I was hosting on Tomcat (server-side) was experiencing some inexplicable latency and while stracing java I saw it frequently hanging on read()'s from /dev/random. I checked the available entropy, and it was constantly under 250 or so. It was a VM, no HWRNG, so I decided to use rngd to push urandom->random.
Dropped session creation times under load from 5-10 seconds to less than a second.
It's worth noting that Linux is one of very few OSes that have a blocking RNG device. Free/OpenBSD, Windows, etc.. essentially only provide urandom. It's generally considered secure, even for long-term crypto keys, so long as the initial seed is big (and random) enough.
Checked on my device, and saw a few processes grabbing /dev/random. /proc/sys/kernel/random/entropy_avail reporting depleted input pool. Figured it was worth a shot, so I rebuilt rngd for arm (with a few patches, linked on first page), and tried it out. It made a significant difference. Posted it up on this thread, and had a lot of positive feedback. Wanted to get into Android development, so figured.. why not wrap a little UI around it. More positive feedback, so I threw it on the market as well.
I had no idea it would take off like this and was shocked when I saw it Thursday morning. I'm in the awkward position now of explaining why it seems to work for some people, and not for others, especially given the fact Dalvik doesn't have references to /dev/random as of ICS. Theories abound, but it looks like it might be an issue of polling the UI for input events when the entropy pool drops (which never happens so long as rngd is running).
I'm doing this as a hobby. I'm a *nix admin by trade, and can only spend time working on this stuff on evenings and weekends, and the last few weeks have been kinda nuts.
I want to stress to everyone that:
a) It doesn't work the way I thought it did on later Android builds, but it does reduce latency for me and many others even on these builds,
b) I'm offering (and always will offer) Seeder for free to everyone on XDA,
c) Like I say in the market description, if anyone has purchased it and it isn't working, PLEASE email me for a refund (and let me know what device you're on if you're willing).
I was one of the first to root the Captivate glide (my first Android phone), and submitted the A2DP bitpool patch; I was active in the n900 community. I hope everyone understands that I'm doing my best here!
I hope the technique proves useful to people, and if there is in fact contention at the kernel level, I hope it's solved so we all benefit.
Version 2.0.0 attached. No changes.
Version 2.0.0b1 attached. New performance profile selector, I/O queue extender, and power saving control. Improved root checking.
Version 1.4.0 attached. Major refactoring. Service control now fully asynchronous.
Version 1.3.1 attached. No changes from 1.3.1-beta.
Version 1.3.1-beta released. New root check method during ANR-sensitive code.
Version 1.3.0 attached. Proper IntentServices for process control, and notification on upgrade / loss of root / autostart failure.
Version 1.2.9 attached. Yet another update to the upgrade/autostart code.
Version 1.2.8 attached. Asynchronous startup of rngd during boot; this should solve the remaining autostart problems some users have reported.
Version 1.2.7 released. This version introduces a much more efficient suspend-on-sleep mode for rngd.
Version 1.2.6 released. This version reverts the suspend-on-sleep rngd change which may have been contributing to new latency. I'm sorting out a better way of implementing it.
Version 1.2.5 released. This version should fix the autostart failure some users have seen.
Version 1.2.4 released. This version implements a progress bar displaying your currently available entropy, as well as automatic rngd restart on upgrade.
Version 1.2 released. This version implements rngd suspend-on-sleep, and contains minor user interface updates, more robust process and superuser checks, and a new icon (thanks Nathanel!)
Version 1.1 released. This version uses the release signature, so you will need to uninstall the old XDA version first!
This version fixes the issue some users were seeing on later Jellybean ROMs, where the UI would misreport the RNG service status.
Caveats
There is a (theoretical) security risk, in that seeding /dev/random with /dev/urandom decreases the quality of the random data. In practice, the odds of this being cryptographically exploited are far lower than the odds of someone attacking the OS itself (a much simpler challenge). It's worth noting that as of ICS, Dalvik uses /dev/urandom exclusively, anyway, and that Linux is one of very few modern operating systems that even offer a blocking RNG device to begin with.
Support for rngd suspend-on-sleep was added to Seeder 1.2. It should no longer impact battery life while the device is asleep.
There has been a large amount of speculation on why/if this actually improves performance on ICS+ devices. I'm continuing to investigate and will post updates to this thread.
If you try it, let me know how it goes.
ROM builders - feel free to integrate this into your ROMs (either the .apk / application, or just the rngd binary called from init.d)!
If anyone's interested, I've launched a paid app on the Play store for non-xda users. As I add features I'll post the new versions here as a thanks to you guys (and xda community at large for being such a great resource). But if anyone's interested in the market's auto-update feature, just thought I'd mention it.
Cheers! :highfive:
This seems absolutely amazing!I think I'll try it out on the weekend, cheers!
Will this work for cwmr 6
Sent from my SGH-I927 using xda app-developers app
Hi,
I would try this, cause I experienced these lags, and they're really annoying, but I'd really need a simple instruction for what to do. You wrote how you managed to discover what to do and stuff, but I'm lost between the lines. Since I'm kind of a newbie, I'm kindly asking you to write some kind of instruction manual step by step, and forgive my ignorance
Laugher19 said:
Will this work for cwmr 6
Click to expand...
Click to collapse
Not yet. If a few people try it and report positive results, I'll make a flashable image. Stay tuned.
soadzoor said:
Hi,
I would try this, cause I experienced these lags, and they're really annoying, but I'd really need a simple instruction for what to do. You wrote how you managed to discover what to do and stuff, but I'm lost between the lines. Since I'm kind of a newbie, I'm kindly asking you to write some kind of instruction manual step by step, and forgive my ignorance
Click to expand...
Click to collapse
I updated the first post with instructions. Please be careful, though! Let me know if you need more detail.
lambgx02 said:
I updated the first post with instructions. Please be careful, though! Let me know if you need more detail.
Click to expand...
Click to collapse
I got troubles. Using Terminal Emulator I got an error message when I type the 3rd line ("cp /mnt/sdcard/rngd /system/xbin"), it says: "sh: cp: not found"
soadzoor said:
I got troubles. Using Terminal Emulator I got an error message when I type the 3rd line ("cp /mnt/sdcard/rngd /system/xbin"), it says: "sh: cp: not found"
Click to expand...
Click to collapse
Where did you transfer rngd to on your phone? Have to make sure the source path matches.
lambgx02 said:
Where did you transfer rngd to on your phone? Have to make sure the source path matches.
Click to expand...
Click to collapse
It does match, that's why I'm confused.. :\ which terminal do you use?
Will test this later, for sure! If all goes well, may I request permissions to include this with the MIUI build I will be learning to make and attempting to produce?
edit: My phone wasnt particularly laggy before except when playing games, but there is a noticeable difference after executing this binary. Noticed a few small hangs but unsure if it is related to this binary.
I've tested it ... integrated it into my rom and installed ... there was no lag even right after it first boot ... its incredibly smooth ... though I too noticed small hangs ... though I attributed this to the device getting ahead of itself ....
Sent from my SGH-I927 using xda premium
Yeah it kind of seems like its fine after settling a bit. Can't wait to see it in 0.7 thegreatergood.
Sent from my SGH-I927 using xda premium
Ok, everyone. I built a very simple Android app that bundles the rngd binary and starts/stops it. Details in first post.
lambgx02 said:
Ok, everyone. I built a very simple Android app that bundles the rngd binary and starts/stops it. Details in first post.
Click to expand...
Click to collapse
wow ... that was quick ... maybe i should look into a custom tweaking app for my rom ...
Zero Computing said:
Will test this later, for sure! If all goes well, may I request permissions to include this with the MIUI build I will be learning to make and attempting to produce?
Click to expand...
Click to collapse
Of course you can!
edit: My phone wasnt particularly laggy before except when playing games, but there is a noticeable difference after executing this binary. Noticed a few small hangs but unsure if it is related to this binary.
Click to expand...
Click to collapse
Yeah, sometimes we really do hit filesystem I/O limits, but at least this should help once everything has been cached.
Ok, autostart on boot is working.
Seems to be a little faster...game still lagging though guess I will give it time
Sent from my SGH-I927 using xda app-developers app
Trying it out. Definitely noticing faster returns to the home screen. I'm using the ICS "only one" build for galaxy note sgh-i717
.
Sent from my SAMSUNG-SGH-I717 using xda app-developers app
OMG! I downloaded via qr code. and OMG! My phone runs sooo much smoother than before!!
This is one of the best mod for glide ever. Things are much smoother and faster to access. ES file explorer, dialer and contact list comes up so fast.
Thanks for this, really appreciate the mod. I'm keeeping it .
Sent from my SGH-I927
Would this work on other devices?

[APP][AOSP Root 4.4] AudioTricks / VolumeTricks

Thread is under construction.
WARNING: There have been 3 reports so far of failure to boot after installing the Shim HAL. This sort of problem should be assumed possible at this early "Alpha level research project" phase.
Please don't install if you have stock recovery or don't know what recovery is.
Please don't install if you are nervous. Wait a while for the bugs to get worked out and info compiled.
Don't install if not confident in your technical skills.
Don't install if you might freak out if your phone gets disabled for a little while.
For bootloops or to fix or remove: http://forum.xda-developers.com/showpost.php?p=52931431&postcount=67
Post #2 has download links and instructions: http://forum.xda-developers.com/showpost.php?p=52765309&postcount=2
Since interest has ramped up quickly, I've published a 99 cent "donate" version on Play: https://play.google.com/store/apps/details?id=fm.a2d.av (Wait until the $200 placeholder price disappears, LOL.)
I'm not sure "donate" is the right word, but it's the exact same app I'm distributing and will continue to distribute for free (for at least X months to a year ??), so nobody is under any obligation to buy to get the app. Updates will be automatic via Play though.
============================================================
AudioTricks / VolumeTricks is a new kind of "audio mod" that is HAL Shim based.
At present, it can raise or lower output volume and microphone input gains digitally.
Only works on ICS Android 4.0.3 and later. AOSP ROMs such as CM11 or other KitKat very much preferred. Many stock ROMs 4.1-4.3, won't work, especially HTC.
Post 2 has download link and instructions.
Disclaimer: Please understand that this is the first public release of this app. Although I endeavour to make my apps as safe as possible, one never knows whether or not some silly bug or unusual interaction might pop a speaker, headset or whatever. I have over 20 devices that I use for testing my apps and I try to "torture test" as much as possible. So if something goes pop, I'll be very sorry and do everything I can to analyze and fix any problems. If you're "not sure", just wait and more adventurous people will do the early testing needed to help ensure nothing breaks.
By it's very nature, any app that can boost volume creates risk for audio output devices as well as your ears.
For those who know my Spirit FM apps, this is a bit of a move for me. Spirit1 and Spirit2 both are alive and well, but the future of FM radio on Android seems to be dimming the last few years. I'll be splitting my time between apps based on the support I get.
Making this HAL Shim based provides some advantages and disadvantages over other methods of changing volume or gain.
Advantages include:
- Audio modification even for apps, games, etc. that use the low level Android NDK OpenSL ES API.
Disadvantages:
- Analog controls, if available, may be better.
AudioTricks is intended to be my name for a group of small apps, and/or a "master app" that includes the features of them all.
VolumeTricks is the first such small app to be released, and is focused on output volumes and input gains.
VolumeTricks may not be limited to the "HAL Shim" approach to audio mods. It may also include ALSA, ALSA UCM, and other methods to manipulate audio.
At this time, the app is free, but Copyright Me. I'll likely maintain a free version for some time, but I gotta eat too so there will be a paid version on Play when it seems ready.
At this time, this app has been tested mostly on CM11 and a few other AOSP ROMs. Many stock ROMs won't work, especially HTC.
The app is currently set to only work on Android KitKat 4.03+.
I haven't tested ART much yet, mostly Dalvik, but it's working OK on my One M7 w/ ART. Shouldn't be too hard to fix any ART issues.
So what the heck is a "HAL Shim" ??
Android uses HALs (Hardware Adaptation Libraries) as an API between Google's Android code and the phone OEMs hardware specific code. Android Audio has at least 2 HALs, one for "Policy" (selects outputs, inputs and some other stuff) and one for the audio transfers. The HAL Shim in this app works with the latter "Primary" HAL for audio transfers.
A SHIM is a component that sits between 2 other components and pretends to be the higher component as well as the lower component. Hierarchy:
Android AudioFlinger
------------------------
HAL Shim
------------------------
Primary Audio HAL
So, the HAL shim pretends to be an audio HAL to Android's AudioFlinger. AND it pretends to be Android AudioFlinger to the Primary Audio HAL.
The HAL shim acts as an intermediary. It can pass everything back and forth unmodified which makes it invisible. Or it can modify anything passing between, including the audio data.
Isn't there a better way to do this ? No, I don't think so. I don't want to be modifying a bunch of HALs on thousands of ROMs. I also don't want to be modifying AudioFlinger on those same hordes of ROMs.
What else can be done with the HAL Shim concept, besides "Volume Tricks".
I think some of these may be feasible:
- Recording all inputs and/or outputs. Maybe even both sides of phone calls.
- Analyze, Visualize, Equalize, Effects-ize all or many inputs and outputs.
- Bypass DRM.
- Maybe a method to modify (eg. encrypt / decrypt) phone call audio, inbound and outbound; possibly via pretending to be a BT headset....
Note that, at present, the HAL shim only works with the "Primary Audio Interface". Small-ish mods could do the same for HDMI, A2DP / BT, USB Audio, "Remote Submix" and whatever new audio devices Google defines.
Post 2 download link and instructions.
If a boot loop would ruin your day, please see warnings at top of post #1 and don't install this app until more mature.
Disclaimer: Please understand that this is the first public release of this app. Although I endeavour to make my apps as safe as possible, one never knows whether or not some silly bug or unusual interaction might pop a speaker, headset or whatever. I have over 20 devices that I use for testing my apps and I try to "torture test" as much as possible. So if something goes pop, I'll be very sorry and do everything I can to analyze and fix any problems. If you're "not sure", just wait and more adventurous people will do the early testing needed to help ensure nothing breaks.
By it's very nature, any app that can boost volume creates risk for audio output devices as well as your ears.
Android seems to have a ridiculously / hilariously complex audio system... LOL.
v140530: http://d-h.st/2lc#.U4hLA3KBugY
Fixes a LOT of issues, especially SU / mount issues with stock restrictive SELinux like Samsung stock 4.2+.
As always, Press Update/OK to update Shim HAL each new release.
- SU / root fixes, especially for SELinux Samsung 4.2+.
- Fine control removed.
- Coarse control range changed from -60 to +60 db ; now 0 to +36 db. Maybe I'm the only one w/ a need for gain reduction below 1.0 or 0 dB.
- Many other fixes.
Version av-140526:
- Fix the /system/addon.d/ ROM update backup/restore script used during ROM updates.
Version av-140525:
- Automatic gain reduction is now sticky, so reduces distortion when maxed. Touch sliders to reset.
- Numbers for VU.
- After amplification VU display.
- Sliders caiibrated in dB.
May not work on stock ROMs, especially older Android versions and HTC stock ROMs.
Starting this app for the first time should request root and prompt to install the HAL Shim and an addon.d backup/restore script to allow it to survive ROM updates.
After the Shim is installed, the "system_server" is killed in order to activate the Shim. Sometimes it may be better to completely reboot the phone, especially with effects, visualizers and player apps running at install time.
Once the app and Shim are installed, the app shows a "Remove" button that removes the Shim, should it be causing you problems or you just don't want/need it. The button will change to "Update" with newer versions of the app/Shim.
Sometimes, like on ROMs with old Legacy HALs, state detection won't work and the button will only offer to Install with no way to remove. As of v1.0.3 go to the 2nd tab (swipe from right to left) and there is a permanent Remove button.
If you remove the app without removing the Shim, the shim will remain, but should be mostly dormant. The easiest way to remove the Shim would be to reinstall the app and select the Remove button.
To manually remove the Shim and addon.d script, something like this should work from a connected PC with adb shell:
Code:
adb shell
su
mount -o remount,rw /system
ll /system/lib/hw/audio.primary.*.so
# !!!! Note the name of the HAL, like audio.primary.msm8960.so and use this name in next line. (If only audio.primary.default.so exists, use that.)
mv /system/lib/hw/audio.primary.orig.so /system/lib/hw/audio.primary.msm8960.so
rm /system/addon.d/99-audiotricks.sh
mount -o remount,ro /system
reboot
Using the app:
See post #3 for usage instructions.
Usage:
If a boot loop would ruin your day, please see warnings at top of post #1 and don't install this app until more mature.
Disclaimer: Please understand that this is the first public release of this app. Although I endeavour to make my apps as safe as possible, one never knows whether or not some silly bug or unusual interaction might pop a speaker, headset or whatever. I have over 20 devices that I use for testing my apps and I try to "torture test" as much as possible. So if something goes pop, I'll be very sorry and do everything I can to analyze and fix any problems. If you're "not sure", just wait and more adventurous people will do the early testing needed to help ensure nothing breaks.
By it's very nature, any app that can boost volume creates risk for audio output devices as well as your ears.
To select output volume or input gain, swipe left or right or use the tabs. The primary/left screen is for output volume.
Set the enable switch to ON to enable volume/gain adjustments.
The Left and Right indicators are logarithmic/DB audio level indicators, updated every 0.1 seconds with the peak audio level. These show the signal level before amplification. If they are VERY near the full width of the screen, there is little amplification that can be reasonably done. (But 80-90% leaves some room, given the exponential nature.)
For no boost, IE an amplification factor of 1.0, the Coarse and Fine controls should both be set to 0 at centre.
Setting Fine all the way right to +6 dB doubles audio power, setting to -6 dB halves audio power.
Setting Coarse to +30 dB creates an amp factor of 32, assuming Fine is set to 0. Setting -30 dB is about 0.03.
Note that an amp factor of 32 is very high, unless you are dealing with very low input signals.
The Shim detects when the signal will overload, and reduces the amp factor as needed to prevent overload/distortion. To raise it again, use the UI to reset.
There are some "streams" for which amplification will not work. I will support as many stream flags (such as Fast) as I can; remains to be seen; this is still kind of a "research project" at this stage.
At present, all streams are amplified the same amount. Per stream or stream type amp factors will be supported.
Just go to post #11 on next page.
Nothing to see here, move along.
Technical info to fill in later.
Pay no attention...
... to the man behind the curtain...
8 is lucky 7 + 1; even better.
Trouble-shooting info.
#10 is always "Future".
Comments and questions start here.
Volume control?
Hi Mike,
You are making me curious about this new project of you.
I bought a long time ago this app for level control. It is doing his job, but has lack of storing the settings and sometimes still adjust (unwanted) the volume.
Count me in for testing :fingers-crossed:
Edit: get an error parsing the apk :crying:
Rinoceros said:
Hi Mike,
You are making me curious about this new project of you.
I bought a long time ago this app for level control. It is doing his job, but has lack of storing the settings and sometimes still adjust (unwanted) the volume.
Count me in for testing :fingers-crossed:
Edit: get an error parsing the apk :crying:
Click to expand...
Click to collapse
Welcome to my new thread and app.
AFAICT, that app mostly just manipulates standard Android volume levels, which is fine, but not much different than the standard volume control.
I just downloaded my new app linked http://d-h.st/plb myself (7 downloads in first 2 hours now), and it installs fine on my One M7, and matches bit for bit the 1.0 version installed on my test phones.
So you're on stock based InsertCoin ROM ?
As long as it's Android 4.4 KitKat (API Level: 19), it SHOULD parse and install OK.
The binaries are for ARM devices only (ie 99+% of Android devices). Intel x86 or MIPs can't work (at present.)
I can't think of any other reason it won't parse, unless your copy is corrupted. This is the MD5 I get:
Code:
md5sum ~/Downloads/av-release.apk
2c8328e8cbe1f585f3b1634e36200c8f /home/mike/Downloads/av-release.apk
I'm happy to hear anyone else's stories of success or failure, but I'll need a good 7 hours of sleep first.
------------
Happy Victoria Day to all fellow Canadians & CommonWealther's, and Good Long Weekend to all those with a day off of work this Monday. Finally nice weather here lately...
mikereidis said:
I just downloaded my new app linked http://d-h.st/plb myself (7 downloads in first 2 hours now), and it installs fine on my One M7, and matches bit for bit the 1.0 version installed on my test phones.
So you're on stock based InsertCoin ROM ?
As long as it's Android 4.4 KitKat (API Level: 19), it SHOULD parse and install OK.
Click to expand...
Click to collapse
Aha, here might be my problem. My InsertCoin is still the good old JellyBean 4.3 (I am happy with this version and had nearly no problems and all the stuff is working on this one. So if it ain't broke; don't fix it )
The binaries are for ARM devices only (ie 99+% of Android devices). Intel x86 or MIPs can't work (at present.)
I can't think of any other reason it won't parse, unless your copy is corrupted. This is the MD5 I get:
Code:
md5sum ~/Downloads/av-release.apk
2c8328e8cbe1f585f3b1634e36200c8f /home/mike/Downloads/av-release.apk
I'm happy to hear anyone else's stories of success or failure, but I'll need a good 7 hours of sleep first.
Click to expand...
Click to collapse
Got the same MD5: 2C8328E8CBE1F585F3B1634E36200C8F
I am confused or it doesn't work on 4.3
Sleep well!
4.4
Does it work on Android below 4.4?
Can't wait to try it. Your work with Spirit was amazing, so I am sure this is too.
Thanks for the effort, but it ain't working on i9100, cm 11/kk 4.4.2. Tried to increase volume a little (level was about 3, but as you know, first written value is 5), there was a very strange noise as I tried to.increase volume via volume buttons while listening music via headphones. It was a crackling noise, looked to me like the phone is going to get damaged, so I removed HAL and uninstalled your app.
Rinoceros said:
Aha, here might be my problem. My InsertCoin is still the good old JellyBean 4.3 (I am happy with this version and had nearly no problems and all the stuff is working on this one. So if it ain't broke; don't fix it )
Got the same MD5: 2C8328E8CBE1F585F3B1634E36200C8F
I am confused or it doesn't work on 4.3
Sleep well!
Click to expand...
Click to collapse
Here's a v1.0.2 test release that will install on Android 2.2+: http://d-h.st/QfV
Draw Em! said:
Does it work on Android below 4.4?
Click to expand...
Click to collapse
It may. Here's a 2.2+ test release: http://d-h.st/QfV
Chances are lower the lower the Android version. I'd recommend 4.1+, but it may work on some Android 4.0 as well. Android 2.3 GB and older used a "legacy HAL API" which won't work.
At this time it's a "bleading edge" release, and most people comfortable with that have been running 4.4 the last 6 months, I'd think.
pilgrim011 said:
Thanks for the effort, but it ain't working on i9100, cm 11/kk 4.4.2. Tried to increase volume a little (level was about 3, but as you know, first written value is 5), there was a very strange noise as I tried to.increase volume via volume buttons while listening music via headphones. It was a crackling noise, looked to me like the phone is going to get damaged, so I removed HAL and uninstalled your app.
Click to expand...
Click to collapse
It sounds like it was working then, as it does for me on my 9100 with CM11.
In many circumstances audio amplitude will already be maxed out, and trying to increase volume will only result in the automatic gain control kicking in with a different value many times per second, thus leading to distortion and other audio "artifacts".
This solution is more helpful when, for some reason, the audio source material doesn't use the full 16 bits of amplitude. If the VU indicators in the app are showing peaks around 80-90% of the screen width, when the normal volume control is maxed, then amplitude is probably above 16,000 and could be near the absolute peak around 32,000.
For example, some audio may have been recorded that only peaks around 4,000 - 8,000, and for this, and amp factor of 4 may be useful. Another possible solution for this scenario is to enable Compression in DSP Manager or whatever. As with everything, this has pros and cons.
In many circumstances, when possible, it's better to raise analog gain, like Voodoo sound does on the Galaxy S GT-I9000. I'm going to look into this, but this sort of solution is very audio chip dependent.

Extreme battery tweaks

I just sharing my setup for getting maximum from my one plus 6 battery without compromising performance and notification acess.
AFTER FULL TESTING I CAN SUERLY SAY EVERYTHING IS PERFECT I AM FRUSTRATED USER AFTER BUYING ONE PLUS 6 I NEVER GOT FULL DAY BATTERY PHONE DIES IN 10 HR AND 4 TO 5HR SOT.
MY SCREENSHOT SHOWING EVERYTHING NO FAKE NOTHING.
Video guide:
https://youtu.be/BKcZPNqahS0
REQUIREMENT :
1)Rooted
2)TWRP installed
3)Magisk installed
1) Flash magisk based extreme battery friendly ROM:
After installing xxx nolimits ROM finally i come to conclusion that this ROM is combination of performance and battery tweaks which does the 40% job done in our battery saving target
Now this rom is magisk based u have to download and flash magisk based rom zip from following thread if u want to change aspects for what to install what not to be download xxx no limits profile and edit it using filexplorer put it at root of sd card before flashing ROM.
DOWNLOAD LINK:
https://forum.xda-developers.com/on...xxx-nolimits-1-0-speed-ram-optimized-t3799167
This rom comes with all tweaks to save battery default which includes.
>battery savings build prop properties
>disabling playstore wake locks
>debolting(IF U WANT TO DELBOLT U R OOS ROM AT EXTREME LEVEL U HAVE TO CHANGE xxx no limits profile app that u want to remove just enable debolting by typing 1) NOTE: I AM NOT USING ANY DEBOLTING OF APPS
2)Franco kernel :
Suerly this kernel is god of battery savings kernels and its now available for one Plus 6
Combination of this kernel with NO LIMITS rom is just awesome.
Just flash this kernel in recovery after flashing xxx no limits rom
After reboot go to
> franko kernel updater app > Settings > performance profile > select power saving profile
U can also use balanced profile
DOWNLOAD LINK:
https://forum.xda-developers.com/oneplus-6/development/kernel-francokernel-r1-18th-june-t3806062
Franco kernel updater appPAID APP LINK FOR OLD FREE VERSION GIVEN IN VIDEO)
https://play.google.com/store/apps/...app&pcampaignid=APPU_1_vB4qW9_eKszlvgT0n5D4Dw
3)BLACKING OUT ROM:
So our phone got amoled screen so we can use this panel to maximize u r battery as per one survey amoled screen with maximum blacked out screen helps SOT to increase up to 2-3 hr and i tested it.
>Use best theme with total backed out link of
Swift black theme given in video description
Or u can download it from play store
OR U CAN USE OZONE SUBTRATUM THEMES WHICH COMES WITH XXX NO LIMITS ROM
>Install theme via subtratum and subtratum app is already available in no limits ROM.
4)ENABLE DOZE MODE FOR GOOGLE PLAY SERVICE :
First u have to check weather u r play services is using doze mode or not
Go to settings >battery> search for play services>see at bottom if its showing using battery optimization then. No need to follow this step
Other wise use this magisk module
Download:
https://drive.google.com/file/d/1TUkuYZB8XOahwJI4SAeqqhVCS46tjiQe/view?usp=drivesdk
Download module>go to magisk app> go to modules in left tab> click + icon at bottom then select file u have downloaded
It will get flashed automatically in magisk app then reboot.
5)USE greenify :
Download and enable greenify for most of apps that u don't use except apps like whatsapp, instagram as we need these apps regularly in touch.
(follow video steps in settings)
https://greenify.en.uptodown.com/android
6)MINOR setup :
> WIFI:
Go to settings > wifi> wifi preferences>advanced>Disable always on wifi scanning and disable keep wifi on during sleep
> Disable all vibrations
>Disable autobrrightness mode.
>disable sceen auto rotate mode from Settings
>Disable ambient display
Thats it after all u will get all U r performance without compromising U r battery and notifications.
I will post results with screenshot sooon.....
what repercussions could it have to doze play services? missing notifications or anything?
=dave= said:
what repercussions could it have to doze play services? missing notifications or anything?
Click to expand...
Click to collapse
Yes. You'll have to open each app to start the sync.
Only reason why I haven't kicked play sevices from my device. Some apps even use their own notification system but many rely on these services and that is a PIA.
Thanks but might as well put the phone in the drawer and don't use it.
Sent from my OnePlus6 using XDA Labs
ilia1985 said:
Thanks but might as well put the phone in the drawer and don't use it.
Sent from my OnePlus6 using XDA Labs
Click to expand...
Click to collapse
Or sometime u have keep u r screen on continously and di nothing 22 hr of SOT. ???
SO JOKES OVERED AFTER FULL TESTING I CAN SUERLY SAY EVERYTHING IS PERFECT. I AM FRUSTRATED USER AFTER BUYING ONE PLUS 6 I NEVER GOT FULL DAY BATTERY PHONE DIES IN 10 HR AND 4TO 5HR SOT.
MY SCREENSHOT SHOWING EVERYTHING NO FAKE NOTHING
...
I'm not sure about this setup. Way to many compromises.
From my experience when you get strong cellular signal and will remove all unnecessary activities, it enough to increase battery performance.
I'm getting better battery then the OP showed in photos. I only turn off all the Google account syncing and just sync contacts and calendar when I make changes. Restrict background data on apps that don't need it. I allow messaging apps, email and anything I need the download in the background like my browser. I'm getting 9 hours sot with 40 hours off charge with combined drain of 1.9%-3.4%. and I'm not neutering my phone like that.
x111 said:
I'm not sure about this setup. Way to many compromises.
From my experience when you get strong cellular signal and will remove all unnecessary activities, it enough to increase battery performance.
Click to expand...
Click to collapse
Yeah good point here my result with a good signal and actually no tweak just flashed elementalx kernel or flash kernel ...
Edit : I actually did only the stune tweak !
This is just from today and my averages. Off charge around 8am and it's 1:26pm now
Eric214 said:
I'm getting better battery then the OP showed in photos. I only turn off all the Google account syncing and just sync contacts and calendar when I make changes. Restrict background data on apps that don't need it. I allow messaging apps, email and anything I need the download in the background like my browser. I'm getting 9 hours sot with 40 hours off charge with combined drain of 1.9%-3.4%. and I'm not neutering my phone like that.
Click to expand...
Click to collapse
In 8 hr of SOT i continously used my phone mainly i edited my youtube video for complete 2hr using KINEMASTER this apps is major battery sucking app. I made the video uploaded to youtube, used wifi whole the day, using two whatsapp parellel apps syncronizing for each and every second as lots of messages. I never restricting baground process for any app, and not disabling sync of google account. Used camera lots a time, etc
I just installed the ROM and and kerbel from thread and blacked out my theme nothing else, extra tweaks given for major impact.
So its the matter of use what u r using and how u using , if u uses phone mainly for Gaming and heavy tasks then no tweak can work then how can u say u r better.
pankspoo said:
In 8 hr of SOT i continously used my phone mainly i edited my youtube video for complete 2hr using KINEMASTER this apps is major battery sucking app. I made the video uploaded to youtube, used wifi whole the day, using two whatsapp parellel apps syncronizing for each and every second as lots of messages. I never restricting baground process for any app, and not disabling sync of google account. Used camera lots a time, etc
I just installed the ROM and and kerbel from thread and blacked out my theme nothing else, extra tweaks given for major impact.
So its the matter of use what u r using and how u using , if u uses phone mainly for Gaming and heavy tasks then no tweak can work then how can u say u r better.
Click to expand...
Click to collapse
Your right, it is how you use your phone, but if I use my phone continuously, I have gotten over 13 hours. And WiFi is cheating on battery as it consumes less battery then LTE data signal, I'm never on WiFi... 100% always on data. I usually have 2+ hours of calls, YouTube throughout the day, Whatsapp with Photos and voice along with video, 30-50 emails a day with replies about 2 hours of web surfing. This is a typical day of work as 80% of that is for work. So not a gamer but I am a pretty heavy user throughout the day.
And you talk about Extreme Battery Tweaks and you don't do the simplest things like restrict background data on apps that have no need or business constantly syncing with nothing to sync? Seems odd.
Again based on your photo of usage... that shows significantly less use then what I do and still get more battery without Neutering my phone. You have nothing but your screen on, it's all phone idle and Android OS and Android system and cell standby all higher then any app or anything else. If mine looked like that I'd have 12 hours sot or more.
Oh and this was a light day as I was already heading home at 1:30pm today. I was more showing you my averages.
ilia1985 said:
Thanks but might as well put the phone in the drawer and don't use it.
Sent from my OnePlus6 using XDA Labs
Click to expand...
Click to collapse
:highfive: :laugh:
pankspoo said:
In 8 hr of SOT i continously used my phone mainly i edited my youtube video for complete 2hr using KINEMASTER this apps is major battery sucking app. I made the video uploaded to youtube, used wifi whole the day, using two whatsapp parellel apps syncronizing for each and every second as lots of messages. I never restricting baground process for any app, and not disabling sync of google account. Used camera lots a time, etc
I just installed the ROM and and kerbel from thread and blacked out my theme nothing else, extra tweaks given for major impact.
So its the matter of use what u r using and how u using , if u uses phone mainly for Gaming and heavy tasks then no tweak can work then how can u say u r better.
Click to expand...
Click to collapse
This is truly true. I also found out, that it makes a difference between watching a black screen and performing heavy tasks. Until now I was not totally sure, but you convinced me in this point. Thanks a lot.
Also thank you for your valuable contribution to this forum. I refer to #1:
Since you obviously know a lot about different tweaks of different roms and how they exactly work, could you perhaps elaborate on that? I would like to know how exactly the battery saving tweaks work, especially when compared to them of other roms. Also, how exactly the franco kernel performs so battery friendly compared to other kernels. For example, which settings do you apply (except “powersaving-mode”) and which tweaks of this kernel are responsible for this behavior compared to other kernels. Furthermore, why a franken-, flash- or other kernel are not battery-saving to the same extent.
As far as I understand, the combination xXx No Limits and Franco is the only correct one, if I understood #1 correctly (concerning battery life of course). This suggests that you also know other combinations. Please substantiate your claim and go deeper in your explanations to understand your modest determination correctly, as you really seem to know much about this topic.
Thank you again for sharing your expertise with us.
hi, I have rooted my oneplus 6 running on OOS 5.1.9. I have flashed the franco kernel. After installing the franco kernel updater its showing that my device is not supported. Also it doesnt show any performance profile in the menu. Cant you please help me in this regard? here are the screenshots:
Eric214 said:
I'm getting better battery then the OP showed in photos. I only turn off all the Google account syncing and just sync contacts and calendar when I make changes. Restrict background data on apps that don't need it. I allow messaging apps, email and anything I need the download in the background like my browser. I'm getting 9 hours sot with 40 hours off charge with combined drain of 1.9%-3.4%. and I'm not neutering my phone like that.
Click to expand...
Click to collapse
is there a way to restrict bg data on apps in a group? instead of doing it manually?
virtyx said:
is there a way to restrict bg data on apps in a group? instead of doing it manually?
Click to expand...
Click to collapse
Not that I've ever seen or heard of. It only takes about 5 in to go through them and set it up.
Guys i switched to liquid remix rom and its insanely battery friendly rom, give that rom a try along with tweaks.
Definitely mind blowing
I did not use any of this and I still can get 6.5hrs of SOT, without compromising anything,(not even using black theme).
isaacchook said:
I did not use any of this and I still can get 6.5hrs of SOT, without compromising anything,(not even using black theme).
Click to expand...
Click to collapse
I am not using any tweak and using liquid remix giving 9hr SOT with average use?

Essential Tweaks

Hey everyone! Hope you're all doing fine. I just updated to Android 10, coming from AICP Pie, and I noticed that battery life took a serious hit compared to AICP. Now I know that AICP (and probably many other custom ROMs) use EAS by default, which could be credited for the great performance and battery life you get with these setups. This didn't stop me from conducting some tests and experimenting with some changes in order to try and improve the battery life I am getting on Android 10 (and possibly all previous versions of the stock ROM). Anyway, without further ado, here is a script that tweaks the phone a little, which should improve your phone's battery life on STOCK ROMs, mainly Android 10 but it is also applicable to Android 9, though I have mainly tested it on Android 10 and the deprecated developer previews and beta builds of Android 10. A link to download the script is provided down below, right below the prerequisites and instructions.
Prerequisites
1- An Essential PH-1 (of course!)
2- Magisk (make sure to have the latest version installed)
3- A terminal emulator app -- I use this one here:
https://play.google.com/store/apps/details?id=jackpal.androidterm
4- Any file manager app.
Instructions
1- Download the script from the link below.
2- For more convenience, move the script you just downloaded to the root of your internal storage (/sdcard) using any file manager if your choice.
3- Open the terminal emulator app.
4- Type "su" (without the quotes) and hit the enter/return key on your keyboard to grant it root access (Magisk could display a pop-up window asking whether you want to grant this app root access. Make sure to tap in Grant. This usually happens once).
5- Afterwards, type "sh /sdcard/essential-tweaks" (without quotes) and hit the enter/return key on your keyboard to execute the script.
6- Voila! You're done!
--> In case you think the script has caused any regressions your are dissatisfied with, simply reboot your phone since this script doesn't automatically get applied on boot.
--> In case you rebooted your phone and wish to re-apply the script, simply follow the same instructions again.
Download
G Drive: https://drive.google.com/file/d/101Z_Co7uVU_h2blanJ88MV8x9PpRcOvg/view?usp=drivesdk
Let me know your thoughts down below. Cheers!
Reserved
Reserved 2
Sounds interesting and I'd like to try it. I don't know if you know this though, but the file on Google Drive is set to "ask permission" to download it.
Tanner1294 said:
Sounds interesting and I'd like to try it. I don't know if you know this though, but the file on Google Drive is set to "ask permission" to download it.
Click to expand...
Click to collapse
Fixed. Sorry for inconvenience. Thanks for letting me know!
#justgoogledrivethings
Mostafa Wael said:
Hey everyone! Hope you're all doing fine. I just updated to Android 10, coming from AICP Pie, and I noticed that battery life took a serious hit compared to AICP. Now I know that AICP (and probably many other custom ROMs) use EAS by default, which could be credited for the great performance and battery life you get with these setups. This didn't stop me from conducting some tests and experimenting with some changes in order to try and improve the battery life I am getting on Android 10 (and possibly all previous versions of the stock ROM). Anyway, without further ado, here is a script that tweaks the phone a little, which should improve your phone's battery life on STOCK ROMs, mainly Android 10 but it is also applicable to Android 9, though I have mainly tested it on Android 10 and the deprecated developer previews and beta builds of Android 10. A link to download the script is provided down below, right below the prerequisites and instructions.
Prerequisites
1- An Essential PH-1 (of course!)
2- Magisk (make sure to have the latest version installed)
3- A terminal emulator app -- I use this one here:
https://play.google.com/store/apps/details?id=jackpal.androidterm
4- Any file manager app.
Instructions
1- Download the script from the link below.
2- For more convenience, move the script you just downloaded to the root of your internal storage (/sdcard) using any file manager if your choice.
3- Open the terminal emulator app.
4- Type "su" (without the quotes) and hit the enter/return key on your keyboard to grant it root access (Magisk could display a pop-up window asking whether you want to grant this app root access. Make sure to tap in Grant. This usually happens once).
5- Afterwards, type "sh /sdcard/essential-tweaks" (without quotes) and hit the enter/return key on your keyboard to execute the script.
6- Voila! You're done!
--> In case you think the script has caused any regressions your are dissatisfied with, simply reboot your phone since this script doesn't automatically get applied on boot.
--> In case you rebooted your phone and wish to re-apply the script, simply follow the same instructions again.
Download
G Drive: https://drive.google.com/file/d/101Z_Co7uVU_h2blanJ88MV8x9PpRcOvg/view?usp=drivesdk
Let me know your thoughts down below. Cheers!
Click to expand...
Click to collapse
Neat...
A kranel tweaker...
In my opinion:
The damn powerhint is probably the worst offender to battery...
Currently, with magisk, I just remove /vendor/etc/powerhint.xml
I am also using kernel touchboost so I can idle down to 300...
If your battery doesn't suck... You can switch back to 518 and 806 for minimum frequencies, disable msm touchboost, and kill the powerhint... And get MUCH closer to where you were with AICP on Pie
rignfool said:
Neat...
A kranel tweaker...
In my opinion:
The damn powerhint is probably the worst offender to battery...
Currently, with magisk, I just remove /vendor/etc/powerhint.xml
I am also using kernel touchboost so I can idle down to 300...
If your battery doesn't suck... You can switch back to 518 and 806 for minimum frequencies, disable msm touchboost, and kill the powerhint... And get MUCH closer to where you were with AICP on Pie
Click to expand...
Click to collapse
Is that similar to disabling perfd?
Because that is what I did (and incidentally what my script does).
Thanks a lot for your suggestion!
Mostafa Wael said:
Is that similar to disabling perfd?
Because that is what I did (and incidentally what my script does).
Thanks a lot for your suggestion!
Click to expand...
Click to collapse
No sir...
The powerhint has something to do with the PowerHals directly...
You'll notice if you watch any frequency monitor that when you touch the screen... It jumps to 1.1Ghz on both big and little ... That's NUTS...
It also will run the processor at 1.9 and 2.5 for 5 seconds on app launch... Also CRAZY and unnecessary
Perfd controls the profiles in /vendor/etc/... I think there's 8 of em...
And like mpdecision before it... It sucks...
On a side:
I've been on Q since beta 2... And have put together a magisk module that cuts frequencies down... 1.8 Max for little and 2.0 for big... Kills perfd... Kills the powerhint by replacing with a 0 byte file... Ups zram to 1 GB... And puts touchboost to 825 and 499...
I just incorporated your scheduler changes and I'll let you know what I come up with...
If you're interested in the module ... I'll share it .. just let me know
Edit: @KuranKaname approves the frequency choices BTW
rignfool said:
No sir...
The powerhint has something to do with the PowerHals directly...
You'll notice if you watch any frequency monitor that when you touch the screen... It jumps to 1.1Ghz on both big and little ... That's NUTS...
It also will run the processor at 1.9 and 2.5 for 5 seconds on app launch... Also CRAZY and unnecessary
Perfd controls the profiles in /vendor/etc/... I think there's 8 of em...
And like mpdecision before it... It sucks...
On a side:
I've been on Q since beta 2... And have put together a magisk module that cuts frequencies down... 1.8 Max for little and 2.0 for big... Kills perfd... Kills the powerhint by replacing with a 0 byte file... Ups zram to 1 GB... And puts touchboost to 825 and 499...
I just incorporated your scheduler changes and I'll let you know what I come up with...
If you're interested in the module ... I'll share it .. just let me know
Edit: @KuranKaname approves the frequency choices BTW
Click to expand...
Click to collapse
Yes I know about the max frequency values. These used to be the default in Kuran's AICP too
Interesting, so you mean to say that this is completely different from perfd? Well, I only disabled perfd and I am not seeing the phone jumping back to 1.1GHz while interacting with the screen or locking on max frequencies while launching apps.
Also, what command are you using to disable perfd on Q? I just found out that the usual "stop perfd" command is not working anymore like it used to on Pie :/
I used EXKM to disable it and it works just fine :good:
Let me know if my sched tweaks bring any further improvements to you. Cheers!
EDIT: these input boost frequency values used to be the ones Sultanxda go for too iirc right?
Mostafa Wael said:
Yes I know about the max frequency values. These used to be the default in Kuran's AICP too
Interesting, so you mean to say that this is completely different from perfd? Well, I only disabled perfd and I am not seeing the phone jumping back to 1.1GHz while interacting with the screen or locking on max frequencies while launching apps.
Also, what command are you using to disable perfd on Q? I just found out that the usual "stop perfd" command is not working anymore like it used to on Pie :/
I used EXKM to disable it and it works just fine :+1:
Let me know if my sched tweaks bring any further improvements to you. Cheers!
Click to expand...
Click to collapse
Interesting ..
stop perfd
getprop|grep perfd yields the service has stopped for me
rignfool said:
Interesting ..
stop perfd
getprop|grep perfd yields the service has stopped for me
Click to expand...
Click to collapse
Weird. I will check again when I am home.
Thanks for chiming in! :highfive:
Mostafa Wael said:
Weird. I will check again when I am home.
Thanks for chiming in! :highfive:
Click to expand...
Click to collapse
Interesting... I just put back the powerhint... While stopping perfd and now it's listening ... I wonder if I came up with that when I had the typo in my script...
Thanks for forcing me to debug...
---------- Post added at 02:30 PM ---------- Previous post was at 02:18 PM ----------
Mostafa Wael said:
Weird. I will check again when I am home.
Thanks for chiming in! :highfive:
Click to expand...
Click to collapse
OHHHH...
Are you using service.d to run your script?
If so... You need
while [ "$(getprop sys.boot_completed)" != 1 ];
do sleep 1;
done
sleep 5
Before... Otherwise init gonna reset your stuff...
And post-fs-data.d is WAAY too early
So I have been doing a lot of tracing and testing some new changes and, well, I think it is very difficult to squeeze any more battery life on stock ROMs. Which means that it is highly unlikely that this script is going to be updated with new additions as this is practically the best we could reach at the moment. However, I will keep digging deep and see if I can come up with any updates.
To put things into perspective, here is a quick comparison with the default stock ROM tunings.
By default, I would get an average active drain of 14%/h per charge cycle, peaking at 16%/h
After applying this script the average active drain rate would drop to around 12-13%/h, peaking at 15%/h.
In other words, there is around 1-2%/h improvement in active drain rate as per my usage.
Idle drain rate is fairly similar though.
Mostafa Wael said:
So I have been doing a lot of tracing and testing some new changes and, well, I think it is very difficult to squeeze any more battery life on stock ROMs. Which means that it is highly unlikely that this script is going to be updated with new additions as this is practically the best we could reach at the moment. However, I will keep digging deep and see if I can come up with any updates.
To put things into perspective, here is a quick comparison with the default stock ROM tunings.
By default, I would get an average active drain of 14%/h per charge cycle, peaking at 16%/h
After applying this script the average active drain rate would drop to around 12-13%/h, peaking at 15%/h.
In other words, there is around 1-2%/h improvement in active drain rate as per my usage.
Idle drain rate is fairly similar though.
Click to expand...
Click to collapse
hello. Thanks for your work. It's nice and works very well.
How I can add this script to autorun?
P.S. Here is screenshots of my battery life after tweaks
@Mostafa Wael Hey mate, do you remember what the experiment was that you wanted to do recently ?
Was meant to help with smoothness and battery on Android 10?
St.Noigel said:
hello. Thanks for your work. It's nice and works very well.
How I can add this script to autorun?
P.S. Here is screenshots of my battery life after tweaks
Click to expand...
Click to collapse
I really don't have any idea, I just run then every time after boot via terminal emulator ?
CamoGeko said:
@Mostafa Wael Hey mate, do you remember what the experiment was that you wanted to do recently ?
Was meant to help with smoothness and battery on Android 10?
Click to expand...
Click to collapse
Well, it was a desperate attempt by me to try and squeeze more juice on Android 10 custom ROMs, not sure it will work out on stock ROM. Basically, I am experimenting with different values for the cpusets and stune settings of each cgroup.
I'm still evaluating whether it has a significant impact or not. So far, it is almost the same...
Mostafa Wael said:
Well, it was a desperate attempt by me to try and squeeze more juice on Android 10 custom ROMs, not sure it will work out on stock ROM. Basically, I am experimenting with different values for the cpusets and stune settings of each cgroup.
I'm still evaluating whether it has a significant impact or not. So far, it is almost the same...
Click to expand...
Click to collapse
If you're running Artemis... You're wasting you're time...
Military Dictator @KuranKaname does not allow for the powerhal to accept adjustments from stune other than what HE deems required ...
You MIGHT be able to adjust scheduler values and have them mean something ...
rignfool said:
If you're running Artemis... You're wasting you're time...
Military Dictator @KuranKaname does not allow for the powerhal to accept adjustments from stune other than what HE deems required ...
You MIGHT be able to adjust scheduler values and have them mean something ...
Click to expand...
Click to collapse
Cpuset and stune values are open (besides the top-app stune boost)
I'm using elementalx kernel on android 10 nov update, and my battery drain in deep sleep is unusually high at 2 - 2.5% per hour.
I'm wondering if this script conflicts with anything with the kernel.
I took a look at the script and it looks like some of the settings I can apply in the kernel manager.

How to power off the phone at determinate percentage of the battery ?

Hi,
Still here with other questions for optimize my phone. (N20U rooted with android 12 , custom rom & kernel, tweekspro etc etc)
Reading around how to preserve the longest efficiency of the battery I would like set the interval where the phone must work.
I know that the optimum interval is 20% - 85% for the maximum numbers of cycles.
In Android 12 is possible to set the maximum value: settings > battery > more battery settings > battery protection (to enable to 85%). This work well. (I can achieve this also with ThunderTweaks).
How can I set the minimum percentage after the which it power off ? (ex at 20%)
Thanks for the tips!
giostark said:
Hi,
Still here with other questions for optimize my phone. (N20U rooted with android 12 , custom rom & kernel, tweekspro etc etc)
Reading around how to preserve the longest efficiency of the battery I would like set the interval where the phone must work.
I know that the optimum interval is 20% - 85% for the maximum numbers of cycles.
In Android 12 is possible to set the maximum value: settings > battery > more battery settings > battery protection (to enable to 85%). This work well. (I can achieve this also with ThunderTweaks).
How can I set the minimum percentage after the which it power off ? (ex at 20%)
Thanks for the tips!
Click to expand...
Click to collapse
You can try using the Tasker app, it can be used to set up virtually any automated task that you can think of.
Tnx Droid , I already seen this workaround but because I'm not a coder this would be a little complicated.
This feature for "extend" the battery life should be a common features . Is strange no one have already published something about it. (if at the end I will not found any alternative solution I'll have to dig in tasker)
giostark said:
Tnx Droid , I already seen this workaround but because I'm not a coder this would be a little complicated.
This feature for "extend" the battery life should be a common features . Is strange no one have already published something about it. (if at the end I will not found any alternative solution I'll have to dig in tasker)
Click to expand...
Click to collapse
Tasker is pretty much your only option. I don't know of any other methods of setting up automated processes with conditions of activation, I've been a member here for many years and haven't seen any other tricks to do what you want. If there is another method here, its very obscure and more complicated than Tasker.
Droidriven said:
Tasker is pretty much your only option. I don't know of any other methods of setting up automated processes with conditions of activation, I've been a member here for many years and haven't seen any other tricks to do what you want. If there is another method here, its very obscure and more complicated than Tasker.
Click to expand...
Click to collapse
Hei Droid , I have news about this :
by Dr.Ketan - I have made a app couple of yrs ago, deep discharge protection (search xda) tool. Will do similar job. I may add to Tweaks next version
Click to expand...
Click to collapse
So I will search this app and wait for the integration. I'll update this 3d.
Hi Droid,
In the mean while Ketan will post the missing apk from his 3d ( I suppose he is really busy ) :
[09.01.18][G95*][N950] Deep Discharge Protection V1.2
Deep Discharge Protection Tool You might knowing about Deep discharge issue reported on S8/S8+/N8 devices This tool simply switch off device when battery level reaches to 12% to prevent accidental Deep Discharge (While you are sleeping ;) )...
forum.xda-developers.com
I found a nice app that accomplish the same task "LBS(root)":
LBS(root) - Apps on Google Play
Shutdown your devices on low battery level.
play.google.com
I didn't have a playstore account so I downloaded it from Apkpure:
https://apkpure.com/lbs-root/com.yuandroid.low.battery.shutdown
Tested LBS. Unfortunately the app is too old for andorid 12. The developer told that would update the app for make it compatible. Right now this app reboot the device instead of turning it off.

Categories

Resources