• Introducing XDA Computing: Discussion zones for Hardware, Software, and more!    Check it out!

Question [Bounty) TPD App Throttling Disablement

Search This thread

phr0zen

Senior Member
May 24, 2009
480
95
OnePlus 7 Pro
I think I remember seeing the OOS hack on another thread, but no one said what it does?
Well, either it, or a combination of it and something else borks my power button.
YMMV
 

lexx.ps

Senior Member
Sep 17, 2017
217
313
So on my own kernel I have almost all coresight features disabled and everything works just fine. Never understood why anyone should include it since it's just messing with the scheduler and other things. Also that's the only thing I don't like at oneplus.
 

davyleggend

Senior Member
Nov 2, 2013
123
32
www.facebook.com
OnePlus 9 Pro
for those that also want to disable OPPerf again.

Based on the findings of @xls654 (digging in the oneplus-services.jar) and the idea of @LuK1337 to disable access to the tpd files of the kernel module, I created a new magisk module, after I found a build.prop variable in the code to disable OPPerf.

The module chmods the system writeable files of the tpd kernel module:

Code:
chmod 000 /sys/module/tpd/parameters/tpd_cmds
chmod 000 /sys/module/tpd/parameters/tpd_dynamic
chmod 000 /sys/module/tpd/parameters/tpd_enable
chmod 000 /sys/module/tpd/parameters/tpd_id

and sets a build.prop variable to disable OPPerf:

Code:
persist.sys.opperf.enable=false

Be informed that this module doesn't modify any system files so its universal and working on upcoming OOS versions. If you disable or uninstall the module and reboot all is reverted.

If you don't want to use a magisk module you can also set and revert the build.prop variable via terminal, but it is only read once on boot, when the OPPerf service starts, so you need to reboot after setting or removing the variable.

disable OPPerf:

Code:
su -c "setprop persist.sys.opperf.enable false"

revert:

Code:
su -c "resetprop -p --delete persist.sys.opperf.enable"
I don't have "persis.sys.opperf.enable" in my build.prop and I can't add it. What can I do?
 

Ripthulhu

Senior Member
Jul 20, 2013
54
14
I think I remember seeing the OOS hack on another thread, but no one said what it does?
Well, either it, or a combination of it and something else borks my power button.
YMMV
Same here dude, it breaks the power button after the latest OOS update. You can't lock the screen anymore because it goes straight into the power menu
 

Abhinav2005

Senior Member
Oct 19, 2017
101
30
Ranchi
Screenshot_20211128-155854_Chrome.png
Custom ROM
 

Top Liked Posts

  • 2
    How did you manage to achieve such numbers?
    I really didn't do anything, no module,no tweaks, nothing, except it is on a custom rom(evolution x)
    Even I was surprised to see such a cracked score.
  • 2
    How did you manage to achieve such numbers?
    I really didn't do anything, no module,no tweaks, nothing, except it is on a custom rom(evolution x)
    Even I was surprised to see such a cracked score.
  • 18
    The magisk module removed, see post #26 @LuK1337 , the command "chmod 000 /sys/module/tpd/parameters/tpd_*" is better way,Thanks @LuK1337. That module is only for my personal testing.
    15
    for those that also want to disable OPPerf again.

    Based on the findings of @xls654 (digging in the oneplus-services.jar) and the idea of @LuK1337 to disable access to the tpd files of the kernel module, I created a new magisk module, after I found a build.prop variable in the code to disable OPPerf.

    The module chmods the system writeable files of the tpd kernel module:

    Code:
    chmod 000 /sys/module/tpd/parameters/tpd_cmds
    chmod 000 /sys/module/tpd/parameters/tpd_dynamic
    chmod 000 /sys/module/tpd/parameters/tpd_enable
    chmod 000 /sys/module/tpd/parameters/tpd_id

    and sets a build.prop variable to disable OPPerf:

    Code:
    persist.sys.opperf.enable=false

    Be informed that this module doesn't modify any system files so its universal and working on upcoming OOS versions. If you disable or uninstall the module and reboot all is reverted.

    If you don't want to use a magisk module you can also set and revert the build.prop variable via terminal, but it is only read once on boot, when the OPPerf service starts, so you need to reboot after setting or removing the variable.

    disable OPPerf:

    Code:
    su -c "setprop persist.sys.opperf.enable false"

    revert:

    Code:
    su -c "resetprop -p --delete persist.sys.opperf.enable"
    10
    As the OP does not respond, I decided to investigate myself what changes were made in the oneplus-services.jar file.

    I unpacked the original oneplus-services.jar framework from my phone, decompiled classes.dex which was inside and compared all changes made in @xls654 module.

    The changes are in three files inside classes.dex (original files on left side, "hacked on right side):


    sources/com/android/server/wifi/tsu.java
    (wtn enables something called "OpWifiLowLatency", but I don't know what is WifiManager.WifiLock and why he disabled it, to be honest I don't understand just this one change, I don't know what WiFi has to do with TPD and overall app throttling)
    Code_eidIYu8z5t.png



    sources/com/android/server/wm/OnePlusPerfManager.java
    (here he disabled OnePlusPerfManager)
    Code_XNTzVwKOzp.png



    sources/com/android/server/hmo.java
    (I'm quite sure boolean H enables TPD, so OP disabled it by replacing whole function with "return false")
    Code_VOKkhWRTF4.png




    I hope someone will find this information useful. I wanted to see how OP turned off the throttling app out of curiosity, and since he doesn't write back in this thread, I thought that I would save everyone's time by showing what I found.

    I hope the author of the module will not be angry that I showed it 🥶
    9
    I'll Personally donate $50 to anyone that comes up with a easy solution to disable the app throttling. I'm well aware that some Developers can exclude the TPD commit, but it seems like devs aren't too keen on doing that.

    I also realize that OnePlus should have added a toggle within the OS for us to turn that on or off. Samsung does this they have a feature called 'enhanced processing', that lets the phone run at full potential.
    5
    No, it's just what I showed in the post, some things have been disabled, but nothing was added that was not originally there, the module is safe.
    Not sure why would one bother patching services jar when you can just do "chmod 000 /sys/module/tpd/parameters/tpd_*"...
    At least that'd survive OTA updates.