I found out how to switch between 4 screen modi.
It works on rooted devices and the commands can also be used with tasker.
Code:
echo "0" > /sys/devices/virtual/mdnie/mdnie/accessibility
echo "1" > /sys/devices/virtual/mdnie/mdnie/accessibility
echo "2" > /sys/devices/virtual/mdnie/mdnie/accessibility
echo "3" > /sys/devices/virtual/mdnie/mdnie/accessibility
0 : Normal Screen
1 : Inverted Colors
2 : Ultra Power Save Mode
3 : Screen off but not locked and touchscreen is still working
Mode 3 is particulary interesting if you want to record long videos while screen is off or if you want to listen to youtube music videos.
Here some commands to change colors (RED,GREEN, BLUE)
Code:
echo "255 0 0" > /sys/devices/platform/kcal_ctrl.0/kcal;echo "1" > /sys/devices/platform/kcal_ctrl.0/kcal_ctrl
echo "0 255 0" > /sys/devices/platform/kcal_ctrl.0/kcal;echo "1" > /sys/devices/platform/kcal_ctrl.0/kcal_ctrl
echo "0 0 255" > /sys/devices/platform/kcal_ctrl.0/kcal;echo "1" > /sys/devices/platform/kcal_ctrl.0/kcal_ctrl
An other way to turn off the Display is to set all colors to 0
Code:
echo "0 0 0" > /sys/devices/platform/kcal_ctrl.0/kcal;echo "1" > /sys/devices/platform/kcal_ctrl.0/kcal_ctrl
to return to normal screen type
Code:
echo "255 255 255" > /sys/devices/platform/kcal_ctrl.0/kcal;echo "1" > /sys/devices/platform/kcal_ctrl.0/kcal_ctrl
Maybe some of these commands can also used on other devices.
Have fun
I have attached a Tasker Profile and a toggle widget, so you can try it out.
The widget activates/deactivates the profile, and with the proximity sensor you can switch the screen mode.
Interesting...on Galaxy S4 with UPSM code all color became white and black
Nice find!
Albe95 said:
Interesting...on Galaxy S4 with UPSM code all color became white and black
Click to expand...
Click to collapse
This works for me too! Been looking for this for a while now...
I'm on SGS4 GE and the echo "2" code turns my screen black and white. Now I can finally complete my Tasker %Battlow profile the way I want :victory:
Great find!
Great find
Thanks alot for this, I have a wierd bug where power saving mode will never deactivate grayscale (I think I introduced it at some point while screwing around with root).
Made a tasker task to enable power save mode (without gray scale) then "manually" run "echo "2" > /sys/devices/virtual/mdnie/mdnie/accessibility" to turn on gray scale. Works like a charm.
Thanks! Invert screen toggle tasker action
Nice!
I just mapped the "Assistance Request" event on my Samsung tablet to a Tasker task that toggles screen inversion. The task gets triggered by holding the home button. This is great for reading in a quick-and-dirty "night mode" with white text on black in most e-readers. Psuedocode below:
1: Run Shell Command: echo "0" > /sys/devices/virtual/mdnie/mdnie/accessibility
Use Root = On
If %ColorsInverted eq 1
2: Run Shell Command: echo "1" > /sys/devices/virtual/mdnie/mdnie/accessibility
Use Root = On
If %ColorsInverted neq 1
3: Variable Set %ColorsInverted = 1 - %ColorsInverted
Do Maths = On
Thanks for sharing. I used this method to create a toggle for grayscale. Since I'm new to Tasker, I didn't figure it out after following step 1 to 3 until I added:
4: add a new variable %ColorsInverted in VARS and give it a value of 0.
After the task is created, I added the shortcut with widget from Tasker.
gsearle5 said:
Nice!
I just mapped the "Assistance Request" event on my Samsung tablet to a Tasker task that toggles screen inversion. The task gets triggered by holding the home button. This is great for reading in a quick-and-dirty "night mode" with white text on black in most e-readers. Psuedocode below:
1: Run Shell Command: echo "0" > /sys/devices/virtual/mdnie/mdnie/accessibility
Use Root = On
If %ColorsInverted eq 1
2: Run Shell Command: echo "1" > /sys/devices/virtual/mdnie/mdnie/accessibility
Use Root = On
If %ColorsInverted neq 1
3: Variable Set %ColorsInverted = 1 - %ColorsInverted
Do Maths = On
Click to expand...
Click to collapse
It is possible to use 128 128 128? grayscale
Good day all, I've been testing these commands on tasker for my Note4 running 6.0.1 and i've found one additional setting which i believe might help some of you.
echo "0" > /sys/devices/virtual/mdnie/mdnie/accessibility [normal mode]
echo "1" > /sys/devices/virtual/mdnie/mdnie/accessibility [inverted colors]
echo "2" > /sys/devices/virtual/mdnie/mdnie/accessibility [ultra power saver - almost pitch black tones]
echo "3" > /sys/devices/virtual/mdnie/mdnie/accessibility [screen off with touch on]
echo "4" > /sys/devices/virtual/mdnie/mdnie/accessibility [power saver mode with normal gray scale colors]
I greatly appreciate the thread and i hope my added line helps others like me that lost the gray scale when updating to marshmallow. Have a great day guys and keep-on tweaking! ^_^
Related
how to disable ambient light sensor in xperia mini ,is there any method to do that,can anybody help on that issue ?
i use this on my x8, i don't know is this working on Xperia mini, my ray don't have it so i can't try.
1.ROOTED
2.open system/etc/hw_config.sh
3.edit
Code:
echo i2c_pwm_als > $dev/mode # BL control modes [i2c, pwm, i2c_pwm, als, pwm_als, i2c_pwm_als, i2_als]
delete "_als" in "echo i2c_pwm_als"
4.save and out, reboot
this should work....you can use root explorer to do this.
sorry for my English, still learning and have bad marks at GRAMMAR and VOCABULARY.
ok thanks will try it
Moved to proper forum.
nitinex said:
ok thanks will try it
Click to expand...
Click to collapse
is it working?
[HOWTO] disable ambient light sensor for LCD in xperia mini
I think I've suceeded in turning off auto-brightness in my SK17i (Xperia mini pro), Android 2.3.3, build 4.0.A.2.368.
It doesn't dim backlight after couple of second inactivity.
It still dim backlight about 3 seconds before timeout set in Settings/Display/Screen timeout.
You will need root. Files you have to modify has mode "-rw-r--r--" (writable only for root).
You can try it without permanent changes (settings will be lost after reboot):
Connect phone to PC over USB cable, enable Settings/Applications/Development/USB debugging.
Run command:
Code:
adb shell
You should get root shell (line begins with #).
In that shell run:
Code:
echo 0 > /sys/devices/i2c-0/0-0040/leds/lcd-backlight/als/enable
Disconnect USB cable.
If it works for you, you can make it permanent. Basically you will edit file which sets this on device boot:
Open Root explorer
Go to /etc diretory
Find hw_config.sh, long touch and in popup select Open in Text Editor
Find line
Code:
echo 1 > $dev/lcd-backlight/als/enable #Sensor on/off. 1 = on, reg 90h
and edit it to
Code:
echo 0 > $dev/lcd-backlight/als/enable #Sensor on/off. 1 = on, reg 90h
Press Back button and save file.
scroolik said:
I think I've suceeded in turning off auto-brightness in my SK17i (Xperia mini pro), Android 2.3.3, build 4.0.A.2.368.
It doesn't dim backlight after couple of second inactivity.
It still dim backlight about 3 seconds before timeout set in Settings/Display/Screen timeout.
You will need root. Files you have to modify has mode "-rw-r--r--" (writable only for root).
You can try it without permanent changes (settings will be lost after reboot):
Connect phone to PC over USB cable, enable Settings/Applications/Development/USB debugging.
Run command:
Code:
adb shell
You should get root shell (line begins with #).
In that shell run:
Code:
echo 0 > /sys/devices/i2c-0/0-0040/leds/lcd-backlight/als/enable
Disconnect USB cable.
If it works for you, you can make it permanent. Basically you will edit file which sets this on device boot:
Open Root explorer
Go to /etc diretory
Find hw_config.sh, long touch and in popup select Open in Text Editor
Find line
Code:
echo 1 > $dev/lcd-backlight/als/enable #Sensor on/off. 1 = on, reg 90h
and edit it to
Code:
echo 0 > $dev/lcd-backlight/als/enable #Sensor on/off. 1 = on, reg 90h
Press Back button and save file.
Click to expand...
Click to collapse
It works, but... After the phone starts, the maximum brightness is set up and ambient senzor doesn't work. But if you turn off display and then you wake it up, brightness is lower than before it's like you have been in dark room, but aren't.
Is it also working with xperia active?
Is there a possibility to disable the soft key backlight at this way?
duke85 said:
Is it also working with xperia active?
Is there a possibility to disable the soft key backlight at this way?
Click to expand...
Click to collapse
Use "superDim"
Sent from my MT15i using Tapatalk
superDim can also disable soft key backlights?
I can't find that kind of option
Yes. Try other lights option.
To disable softkeys light I use Screen Filter with 100% settings to not dim the screen and it has an option to disable softkeys light. I enable and disable with app shortcut. The widget will not work with full 100% screen, but use regular icon.
I rooted my xperia active.
Superdim don't disable the ambient light sensor.
The Button Backlight once is disabled, once it isn't... doesn't work steady When I'm closing superdim, backlights are back on.
Is there another possibility?
Will this work for you?
market.android.com/details?id=com.hatcyl.android.Disable_Auto_Brightness
http://forum.xda-developers.com/showthread.php?t=1259445
Meanwhile I edited my /etc/hw_config.sh:
# LMU AS3676 Configuration
dev=/sys/devices/i2c-0/0-0040/leds
#Sensor on/off. 1 = on, reg 90h
echo 1 > $dev/lcd-backlight/als/enable
#[gain],[filter_up],[filter_down],[offset]
echo 3,2,2,0 > $dev/lcd-backlight/als/params
# touch-button-backlight
echo 8000 > $dev/button-backlight/max_current
echo 6450 > $dev/red/max_current
echo 7950 > $dev/green/max_current
echo 4500 > $dev/blue/max_current
# ALS curve display BL [grp],[Y0],[Y3],[K1],[K2],[X1],[X2]
echo 1,30,255,54,52,1,65 > $dev/lcd-backlight/als/curve
# ALS curve key LED 2 [grp],[Y0],[Y3],[K1],[K2],[X1],[X2]
echo 2,48,0,128,128,4,10 > $dev/button-backlight/als/curve
# ALS curve RGB(red) [grp],[Y0],[Y3],[K1],[K2],[X1],[X2]
echo 3,71,255,64,32,5,37 > $dev/red/als/curve
# ALS curve RGB(green) [grp],[Y0],[Y3],[K1],[K2],[X1],[X2]
echo 3,71,255,64,32,5,37 > $dev/green/als/curve
# ALS curve RGB(blue) [grp],[Y0],[Y3],[K1],[K2],[X1],[X2]
echo 3,71,255,64,32,5,37 > $dev/blue/als/curve
In line echo 1 > $dev/lcd-backlight/als/enable I replace the "1" with a "0".
The other bold lines I simple deleted, except echo 8000 > $dev/button-backlight/max_current
Until now the ALS is disabled in any Situation.
For button backlight I replaced "8000" with "0001" in line echo 8000 > $dev/button-backlight/max_current
Until now the button backlight is disabled in any Situation...
scroolik said:
I think I've suceeded in turning off auto-brightness in my SK17i (Xperia mini pro), Android 2.3.3, build 4.0.A.2.368.
It doesn't dim backlight after couple of second inactivity.
It still dim backlight about 3 seconds before timeout set in Settings/Display/Screen timeout.
You will need root. Files you have to modify has mode "-rw-r--r--" (writable only for root).
You can try it without permanent changes (settings will be lost after reboot):
Connect phone to PC over USB cable, enable Settings/Applications/Development/USB debugging.
Run command:
Code:
adb shell
You should get root shell (line begins with #).
In that shell run:
Code:
echo 0 > /sys/devices/i2c-0/0-0040/leds/lcd-backlight/als/enable
Disconnect USB cable.
If it works for you, you can make it permanent. Basically you will edit file which sets this on device boot:
Open Root explorer
Go to /etc diretory
Find hw_config.sh, long touch and in popup select Open in Text Editor
Find line
Code:
echo 1 > $dev/lcd-backlight/als/enable #Sensor on/off. 1 = on, reg 90h
and edit it to
Code:
echo 0 > $dev/lcd-backlight/als/enable #Sensor on/off. 1 = on, reg 90h
Press Back button and save file.
Click to expand...
Click to collapse
It also works on my st15i. Thanks!
You think or you did ?
This works even on ICS
https://play.google.com/store/apps/...uYW5kcm9pZC5EaXNhYmxlX0F1dG9fQnJpZ2h0bmVzcyJd
duke85 said:
superDim can also disable soft key backlights?
I can't find that kind of option
Click to expand...
Click to collapse
you can do it yourself.
type in terminal emulator:
su
echo 1 > /sys/class/leds/button-backlight/max_current
after reboot backllights will be on again.
you can create a script using scripter app from play store or you can create a permanent init.d script yourself (or i can provide a flashable zip)
Hi how to change led color in kernel to initiate recovery??
Jawor245 said:
Hi how to change led color in kernel to initiate recovery??
Click to expand...
Click to collapse
Are you familiar with editing the boot.img?
I'd like to know which file and command is responsible for this after i unpack boot.img.
Jawor245 said:
I'd like to know which file and command is responsible for this after i unpack boot.img.
Click to expand...
Click to collapse
I think it's in the ramdisk -> sbin. There is a bootrec or booterc-device file where you can find these lines or similar ones:
Code:
# trigger amber LED
echo '255' > /sys/class/leds/blue/brightness
echo '255' > /sys/class/leds/red/brightness
echo '0' > /sys/class/leds/green/brightness
# trigger button-backlight
echo '255' > /sys/class/leds/button-backlight/brightness
cat /dev/input/event2 > /dev/keycheck&
sleep 3
# trigger amber LED
echo '0' > /sys/class/leds/blue/brightness
echo '0' > /sys/class/leds/red/brightness
echo '0' > /sys/class/leds/green/brightness
# trigger button-backlight
echo '0' > /sys/class/leds/button-backlight/brightness
Now you should be able to change these leds to another color. But I haven't tried that yet
Is there any way to change the color of LED notification, I only want to change the Battery charging LED color, From yellow to deep Orange just as it was on stock condition. I know there are various apps out in the market but none of them allows changing battery charging LED color, so I was hoping there would be some script or something like that to do that.
How about changing the hw_config.sh file in syystem/etc.take a backup first, then find the line for charging light and adjust rgb to your need I guess
Regards
N
Use the method above or just use an app like Light Flow
Sent from my SK17i running Android 4.1.2
Sure that light flow allows charging light edit too?
He said he tried many apps, that why I didn't suggest it.
Regards
N
Thanks for the help guys. Yes light flow don't completely change the LED color
I tried the method you mentioned, I managed to reach system/etc/hw_config.sh and lost it
How can I find the line for charging light, there so many codes.
# Audio jack configuration
dev=/sys/devices/platform/simple_remote.0
echo 0,201,1600 > $dev/accessory_min_vals # default = 0,200,1600
echo 200,1599 > $dev/accessory_max_vals # default = 200,1600
echo 0,100,280,500,700 > $dev/button_min_vals # default = 0,100,300,600,700
echo 99,199,399,699,5000 > $dev/button_max_vals # default = 99,199,399,699,5000
echo 512 > $dev/btn_trig_period_freq # Button Period Freq(Hz) default = 512
echo 16 > $dev/btn_trig_period_time # Button Period Time(cycle) default = 16
echo 512 > $dev/btn_trig_hyst_freq # Button Hysteresis Freq(Hz) default = 512
echo 16 > $dev/btn_trig_hyst_time # Button Hysteresis Time(Cycle) default = 16
echo 500 > $dev/btn_trig_level # default = 500
# Proximity sensor configuration
dev=/sys/bus/i2c/devices/0-0054/
val_cycle=0
val_nburst=15
val_freq=0
val_threshold=1
val_filter=1
nv_param_loader 60240 prox_cal
val_calibrated=$?
case $val_calibrated in
1)
nv_param_loader 60240 threshold
val_threshold=$?
nv_param_loader 60240 rfilter
val_filter=$?
;;
esac
echo $val_cycle > $dev/cycle # Duration Cycle. Valid range is 0 - 3.
echo $val_nburst > $dev/nburst # Number of pulses in burst. Valid range is 0 - 15.
echo $val_freq > $dev/freq # Burst frequency. Valid range is 0 - 3.
echo $val_threshold > $dev/threshold # sensor threshold. Valid range is 0 - 15 (0.12V - 0.87V)
echo $val_filter > $dev/filter # RFilter. Valid range is 0 - 3.
# TI BQ275xx firmware loader
bq275xx_fwloader
Its either this file or pre hw congi in the same path or on folder above
Regards
N
Thanks again but I don't think it works on CM, I can't find no lines regarding charging LED color, I tried every file you mentioned. Guess will have to wait for CM guys to do something about it
What good app you preffer for underclocking SD625? I want an app thar can underclock and if posible undervolt CPU and turn off some cpu cores. I have RR 5.8.5 with Electrablue 7 kernel.
If you are after an app, then Kernel Adiutor should do some of what you want.
However, if you want full manual control, then you can run commands from a root terminal, or use a script - eg
Code:
# reduce max freq to 1.68ghz
echo "1689600" > /sys/devices/system/cpu/cpu0/cpufreq/scaling_max_freq
# reduce cores running foreground operations
echo "0-3" > /dev/cpuset/foreground/cpus # default=0-6
echo "0-3" > /dev/cpuset/foreground/boost/cpus # default=0-6
# reduce cores running background operations
echo "0" > /dev/cpuset/background/cpus # default=0-1
echo "0-1" > /dev/cpuset/system-background/cpus # default=0-3
# turn off the last 4 cores
echo "0" > /sys/devices/system/cpu/cpu7/online
echo "0" > /sys/devices/system/cpu/cpu6/online
echo "0" > /sys/devices/system/cpu/cpu5/online
echo "0" > /sys/devices/system/cpu/cpu4/online
DarthJabba9 said:
If you are after an app, then Kernel Adiutor should do some of what you want.
However, if you want full manual control, then you can run commands from a root terminal, or use a script - eg
Code:
# reduce max freq to 1.68ghz
echo "1689600" > /sys/devices/system/cpu/cpu0/cpufreq/scaling_max_freq
# reduce cores running foreground operations
echo "0-3" > /dev/cpuset/foreground/cpus # default=0-6
echo "0-3" > /dev/cpuset/foreground/boost/cpus # default=0-6
# reduce cores running background operations
echo "0" > /dev/cpuset/background/cpus # default=0-1
echo "0-1" > /dev/cpuset/system-background/cpus # default=0-3
# turn off the last 4 cores
echo "0" > /sys/devices/system/cpu/cpu7/online
echo "0" > /sys/devices/system/cpu/cpu6/online
echo "0" > /sys/devices/system/cpu/cpu5/online
echo "0" > /sys/devices/system/cpu/cpu4/online
Click to expand...
Click to collapse
Very nice commands, these remain after reboot?
Do you know the command for checking current cpu speed and current number of cores online? Or better, one command to show all running cores with their speed.
nikkky said:
Very nice commands, these remain after reboot?
Do you know the command for checking current cpu speed and current number of cores online? Or better, one command to show all running cores with their speed.
Click to expand...
Click to collapse
The commands are not persistent. If you want them to be applied automatically after reboots, you need to put them in a script that is executed via init.d (see https://forum.xda-developers.com/re...o-initd-ad-blocking-bad-audio-videos-t3626661).
To see the values, simply run "cat" on each of the files being written to in the above examples - eg
Code:
cat /sys/devices/system/cpu/cpu7/online
DarthJabba9 said:
The commands are not persistent. If you want them to be applied automatically after reboots, you need to put them in a script that is executed via init.d (see https://forum.xda-developers.com/re...o-initd-ad-blocking-bad-audio-videos-t3626661).
To see the values, simply run "cat" on each of the files being written to in the above examples - eg
Code:
cat /sys/devices/system/cpu/cpu7/online
Click to expand...
Click to collapse
Do you know the command for changing governors?
nikkky said:
Do you know the command for changing governors?
Click to expand...
Click to collapse
Unfortunately, no.
DarthJabba9 said:
If you are after an app, then Kernel Adiutor should do some of what you want.
However, if you want full manual control, then you can run commands from a root terminal, or use a script - eg
Code:
# reduce max freq to 1.68ghz
echo "1689600" > /sys/devices/system/cpu/cpu0/cpufreq/scaling_max_freq
# reduce cores running foreground operations
echo "0-3" > /dev/cpuset/foreground/cpus # default=0-6
echo "0-3" > /dev/cpuset/foreground/boost/cpus # default=0-6
# reduce cores running background operations
echo "0" > /dev/cpuset/background/cpus # default=0-1
echo "0-1" > /dev/cpuset/system-background/cpus # default=0-3
# turn off the last 4 cores
echo "0" > /sys/devices/system/cpu/cpu7/online
echo "0" > /sys/devices/system/cpu/cpu6/online
echo "0" > /sys/devices/system/cpu/cpu5/online
echo "0" > /sys/devices/system/cpu/cpu4/online
Click to expand...
Click to collapse
When I try for example echo "0" > /sys/devices/system/cpu/cpu6/online I got permission denied. I used Material Terminal app.
Edit:
It worked by tiping su before, to convert $ to # for becoming root.
nikkky said:
Edit:
It worked by tiping su before, to convert $ to # for becoming root.
Click to expand...
Click to collapse
Yes. Running the "su" command is what converts your terminal session into a root terminal session
** UPDATED 26/04/2020 ** UPDATE: Added vibration feedback, and other useful fixes
David8960's GALAXY S10 Single button ULTIMATE CPU/GPU, MAX BRIGHTNESS + SD CARD BOOSTER & more under the hood tweaks.
This has been tested and revised loads of times and it works on the S10 G973F (with SD CARD inserted) & may well work on other variants and firmwares after BTA8
WHAT THIS DOES? Allows you to take full control of you S10's octa core procesor and GPU, Max brightness & more simply by pressing a button. Conveninent right?
What this achieves after installing:
Simply tapping bixby:
* OCTA CORE CPU GOVERNORS ARE LOCKED IN PERFORMANCE, AND ALL CORES AT LOCKED AT MAX SPEEDS
* GPU IS MAXED OUT AND LOCKED AT 702 MHZ (Which gives the best gaming performance, even when the phone gets hot it stays locked to 702Mhz)
* System tweaks for added performance
* SD CARD BOOST
* Reduced Animations for a snappier experience.
And double tapping VOLUME UP will conveniently:
* LOCK AMOLED SCREEN AT MAX BRIGHTNESS FOR BEST GAMING EXPERIENCE (As without this you wont make the most out of your screen as it dims when gaming)
And double tapping Volume down will restore screen brightness.
SIMPLE, RIGHT?
------------------------------------------------------------------------------------------
Things you'l need:
- Samsung Galaxy S10 with SD CARD inserted (or remove the SD tweak line of the code)
- Flar2's Button Mapper (https://play.google.com/store/apps/details?id=flar2.homebutton&hl=es)
- Rooted Device
- Root Explorer (remember to mount R/W when doing operations in / partition)
Instructions
1. Install Button remapper
2. Setup the app. Make sure you disable the all the BYPASS options, as you want the codes working always, regardless of what app or panel is open.
3. Tap on bixby, and tap customize, Tap SINGLE PRESS then add in advanced, click root code and add CODE 1 (the single press code)
4. Then, add the restore defaults code on BIXBY LONG press, by adding code 2.
5. Here is the trickier bit. Go to root explorer, then mount R/W in root explorer and open /system/usr/keylayout/generic.kl --> and change (116) POWER to CAMERA and then reboot and you'l see a "camera" button appear in button remapper, then edit single press to execute root code 3 which is for power button. This will make your power button work as normal, but it executes the performance disabler code to prevent crashes, and also saves power.
(To uninstall, simply remove button remapper app, and edit generic.kl and set (116) camera back to power and reboot)"
6. Simply add code 4 & 5 to their respective buttons (Code 4 MAX Brightness to Double tap VOL UP, and Code 5 Default Brightness to double tap VOL DOWN)
7. Enjoy. All this works seamlessly and you'l forget about it running! (Remember to remap the power menu to the power button's long press within the app)
* ADVICE *
- Just in case restore defaults with bixby when your finished using performance mode --- It squashes out any minute chance of crashes.
-You'l feel a vibration when you toggle the options, if you dont it doesnt work.
- I advise toggling auto brightness OFF should you experience any issues with the brightness dropping by itself.
-DONT activate performance mode via bixby button on LOCKSCREEN. So you know: The whole reason you add the power key code, is so you disable the performance mode (in case you do use it) for power saving, but also, most importantly, its done to remove the GPU tweaks, because if your screen goes off with them tweaks on, the phone will crash (god knows why): So my work around was; to add a disable the screen timeout when you use performance mode, and so the only way to turn off the screen is with the power button, effectively shutting off the performance code, thus making it imposible for you to crash your phone and restores 30 second timout for the next time you switch on your phone normally. So you really dont have to remember anything, just not to use it the lockscreen as it shuts the screen off without disabling GPU tweaks, crashing your phone.
- This code has a little more to it than you'd think, so dont pick and choose what to use of the code as they are ment to work together.
// CODES \\
CODE 1 [SINGLE PRESS bixby for performance] - Increases CPU, GPU + SD CARD R/W performance
Code:
print "Performance" && mount -o remount,rw / && echo 'performance' > /sys/devices/system/cpu/cpufreq/policy0/scaling_governor && echo 'performance' > /sys/devices/system/cpu/cpufreq/policy4/scaling_governor && echo 'performance' > /sys/devices/system/cpu/cpufreq/policy6/scaling_governor && echo '1950000' > /sys/devices/system/cpu/cpufreq/policy0/scaling_min_freq && echo '2314000' > /sys/devices/system/cpu/cpufreq/policy4/scaling_min_freq && echo '2730000' > /sys/devices/system/cpu/cpufreq/policy6/scaling_min_freq && echo '1' > /sys/devices/system/cpu/cpu0/cpuidle/state0/disable && echo '1' > /sys/devices/system/cpu/cpu0/cpuidle/state1/disable && echo '1' > /sys/devices/system/cpu/cpu1/cpuidle/state0/disable && echo '1' > /sys/devices/system/cpu/cpu1/cpuidle/state1/disable && echo '1' > /sys/devices/system/cpu/cpu2/cpuidle/state0/disable && echo '1' > /sys/devices/system/cpu/cpu2/cpuidle/state1/disable && echo '1' > /sys/devices/system/cpu/cpu3/cpuidle/state0/disable && echo '1' > /sys/devices/system/cpu/cpu3/cpuidle/state1/disable && echo '1' > /sys/devices/system/cpu/cpu4/cpuidle/state0/disable && echo '1' > /sys/devices/system/cpu/cpu4/cpuidle/state1/disable && echo '1' > /sys/devices/system/cpu/cpu5/cpuidle/state0/disable && echo '1' > /sys/devices/system/cpu/cpu5/cpuidle/state1/disable && echo '1' > /sys/devices/system/cpu/cpu6/cpuidle/state0/disable && echo '1' > /sys/devices/system/cpu/cpu6/cpuidle/state1/disable && echo '1' > /sys/devices/system/cpu/cpu7/cpuidle/state0/disable && echo '1' > /sys/devices/system/cpu/cpu7/cpuidle/state1/disable && echo '1' > /sys/devices/system/cpu/cpu0/cpuidle/state0/disable && echo '1' > /sys/devices/system/cpu/cpu0/cpuidle/state1/disable && settings put system screen_off_timeout 99999 && settings put global window_animation_scale 0.75 && settings put global transition_animation_scale 0.75 && settings put global animator_duration_scale 0.75 && echo '2048' > /sys/devices/virtual/bdi/179:0/read_ahead_kb && echo '702000' > /sys/devices/platform/18500000.mali/clock && echo 200 > /sys/class/timed_output/vibrator/enable
CODE 2 [HOLD bixby for defaults] Reverts CPU, GPU + SD CARD R/W performance
Code:
print "Default" && mount -o remount,rw / && echo 'schedutil' > /sys/devices/system/cpu/cpufreq/policy0/scaling_governor && echo 'schedutil' > /sys/devices/system/cpu/cpufreq/policy4/scaling_governor && echo 'schedutil' > /sys/devices/system/cpu/cpufreq/policy6/scaling_governor && echo '442000' > /sys/devices/system/cpu/cpufreq/policy0/scaling_min_freq && echo '507000' > /sys/devices/system/cpu/cpufreq/policy4/scaling_min_freq && echo '520000' > /sys/devices/system/cpu/cpufreq/policy6/scaling_min_freq && echo '0' > /sys/devices/system/cpu/cpu0/cpuidle/state0/disable && echo '0' > /sys/devices/system/cpu/cpu0/cpuidle/state1/disable && echo '0' > /sys/devices/system/cpu/cpu1/cpuidle/state0/disable && echo '0' > /sys/devices/system/cpu/cpu1/cpuidle/state1/disable && echo '0' > /sys/devices/system/cpu/cpu2/cpuidle/state0/disable && echo '0' > /sys/devices/system/cpu/cpu2/cpuidle/state1/disable && echo '0' > /sys/devices/system/cpu/cpu3/cpuidle/state0/disable && echo '0' > /sys/devices/system/cpu/cpu3/cpuidle/state1/disable && echo '0' > /sys/devices/system/cpu/cpu4/cpuidle/state0/disable && echo '0' > /sys/devices/system/cpu/cpu4/cpuidle/state1/disable && echo '0' > /sys/devices/system/cpu/cpu5/cpuidle/state0/disable && echo '0' > /sys/devices/system/cpu/cpu5/cpuidle/state1/disable && echo '0' > /sys/devices/system/cpu/cpu6/cpuidle/state0/disable && echo '0' > /sys/devices/system/cpu/cpu6/cpuidle/state1/disable && echo '0' > /sys/devices/system/cpu/cpu7/cpuidle/state0/disable && echo '0' > /sys/devices/system/cpu/cpu7/cpuidle/state1/disable && echo '0' > /sys/devices/system/cpu/cpu0/cpuidle/state0/disable && echo '0' > /sys/devices/system/cpu/cpu0/cpuidle/state1/disable && settings put system screen_off_timeout 30000 && settings put global window_animation_scale 1.00 && settings put global transition_animation_scale 1.00 && settings put global animator_duration_scale 1.00 && echo '128' > /sys/devices/virtual/bdi/179:0/read_ahead_kb && echo '0' > /sys/devices/platform/18500000.mali/clock && echo 50 > /sys/class/timed_output/vibrator/enable && echo 50 > /sys/class/timed_output/vibrator/enable && sleep 0.1 && echo 50 > /sys/class/timed_output/vibrator/enable && sleep 0.1 && echo 50 > /sys/class/timed_output/vibrator/enable
CODE 3 [Single press power button (renamed to CAMERA BUTTON)]
Code:
input keyevent 26 && mount -o remount,rw / && echo 'schedutil' > /sys/devices/system/cpu/cpufreq/policy0/scaling_governor && echo 'schedutil' > /sys/devices/system/cpu/cpufreq/policy4/scaling_governor && echo 'schedutil' > /sys/devices/system/cpu/cpufreq/policy6/scaling_governor && echo '442000' > /sys/devices/system/cpu/cpufreq/policy0/scaling_min_freq && echo '507000' > /sys/devices/system/cpu/cpufreq/policy4/scaling_min_freq && echo '520000' > /sys/devices/system/cpu/cpufreq/policy6/scaling_min_freq && echo '0' > /sys/devices/system/cpu/cpu0/cpuidle/state0/disable && echo '0' > /sys/devices/system/cpu/cpu0/cpuidle/state1/disable && echo '0' > /sys/devices/system/cpu/cpu1/cpuidle/state0/disable && echo '0' > /sys/devices/system/cpu/cpu1/cpuidle/state1/disable && echo '0' > /sys/devices/system/cpu/cpu2/cpuidle/state0/disable && echo '0' > /sys/devices/system/cpu/cpu2/cpuidle/state1/disable && echo '0' > /sys/devices/system/cpu/cpu3/cpuidle/state0/disable && echo '0' > /sys/devices/system/cpu/cpu3/cpuidle/state1/disable && echo '0' > /sys/devices/system/cpu/cpu4/cpuidle/state0/disable && echo '0' > /sys/devices/system/cpu/cpu4/cpuidle/state1/disable && echo '0' > /sys/devices/system/cpu/cpu5/cpuidle/state0/disable && echo '0' > /sys/devices/system/cpu/cpu5/cpuidle/state1/disable && echo '0' > /sys/devices/system/cpu/cpu6/cpuidle/state0/disable && echo '0' > /sys/devices/system/cpu/cpu6/cpuidle/state1/disable && echo '0' > /sys/devices/system/cpu/cpu7/cpuidle/state0/disable && echo '0' > /sys/devices/system/cpu/cpu7/cpuidle/state1/disable && echo '0' > /sys/devices/system/cpu/cpu0/cpuidle/state0/disable && echo '0' > /sys/devices/system/cpu/cpu0/cpuidle/state1/disable && settings put global window_animation_scale 1.00 && settings put global transition_animation_scale 1.00 && settings put global animator_duration_scale 1.00 && echo '128' > /sys/devices/virtual/bdi/179:0/read_ahead_kb && echo '0' > /sys/devices/platform/18500000.mali/clock && settings put system screen_off_timeout 30000 && echo '134000' > /sys/class/devfreq/17000040.devfreq_disp/scaling_devfreq_min && echo '25000' > /sys/class/devfreq/17000080.devfreq_score/scaling_devfreq_min && echo '421000' > /sys/class/devfreq/17000010.devfreq_mif/scaling_devfreq_min && echo '100000' > /sys/class/devfreq/17000020.devfreq_int/scaling_devfreq_min && echo '630000' > /sys/class/devfreq/17000030.devfreq_intcam/scaling_devfreq_min && echo '650000' > /sys/class/devfreq/17000050.devfreq_cam/scaling_devfreq_min && echo '295000' > /sys/class/devfreq/17000060.devfreq_aud/scaling_devfreq_min && echo '56000' > /sys/class/devfreq/17000070.devfreq_iva/scaling_devfreq_min && echo '134000' > /sys/class/devfreq/17000090.devfreq_mfc/scaling_devfreq_min && echo '167000' > /sys/class/devfreq/170000a0.devfreq_npu/scaling_devfreq_min
CODE 4 DOUBLE TAP VOLUME UP FOR MAX OUT BRIGHTNESS
Code:
echo '48599' > /sys/class/backlight/panel/brightness && echo 200 > /sys/class/timed_output/vibrator/enable
CODE 5 DOUBLE TAP VOLUME DOWN FOR DEFAULT BRIGHTNESS
Code:
echo '20000' > /sys/class/backlight/panel/brightness && echo 200 > /sys/class/timed_output/vibrator/enable
How can I find boot?
تم الإرسال من SM-G975F باستخدام Tapatalk
noor.jndo said:
How can I find boot?
تم الإرسال من SM-G975F باستخدام Tapatalk
Click to expand...
Click to collapse
I think in order to this, you have to be rooted so that you can flash anything on boot.
noor.jndo said:
How can I find boot?
تم الإرسال من SM-G975F باستخدام Tapatalk
Click to expand...
Click to collapse
You need to be rooted. This script is to be added for boot completed. You need an app capable of executing root commands at boot. I personally use 3C's ALL-ONE-TOOLBOX. Theres a Scripter included, just enter the code and set for boot.
please add a script file..
Mason76 said:
please add a script file..
Click to expand...
Click to collapse
Ive changed how it all works now, follow the instructions and check it out now :fingers-crossed: let me know if you have any trouble. Its 100% better now
Brilliant, s20 ultra exynos user here
My first ever post, just wanna thank you Paget, awesome guy, this also works on my s20 ultra exynos
Buttons mapped to double click volume up and down though as we don't have briony button but it stops my games lagging majorly as I can re-enable this mid game and it bumps my fps back up
Yes it does heat up but I have a phone fan that attaches on and stops the throttling happening so fast
As soon as my fps starts the drop or when I can feel it throttling, I enable the performance mode and I'm good again for at least 7-8 minutes, perfect for pubg
Itll do for now until my red magic 5 arrives
Thanks man x
?
kizzimo88 said:
My first ever post, just wanna thank you Paget, awesome guy, this also works on my s20 ultra exynos
Buttons mapped to double click volume up and down though as we don't have briony button but it stops my games lagging majorly as I can re-enable this mid game and it bumps my fps back up
Yes it does heat up but I have a phone fan that attaches on and stops the throttling happening so fast
As soon as my fps starts the drop or when I can feel it throttling, I enable the performance mode and I'm good again for at least 7-8 minutes, perfect for pubg
Itll do for now until my red magic 5 arrives
Thanks man x
Click to expand...
Click to collapse
I'm glad it worked for you! I was just frustrated having a beautiful amoled screen that dimmed with the slighest bit of heat, and knowing the GPU slowed down aswell just added to my motivation to figure out a way to lock the screen and GPU to to max state. And i added the CPU and additional tweaks as i figured them out such as shortening the animations aswell for more snappiness and slight SD improvements... Ill be sure to add any more tweaks but i cant think of any haha. I just think the idea is excellent because of all the time it saves having to tweak your cpu, gpu and screen manually using various root apps. And thanks for the feedback, take care
S10+ exynos user here(on android 10)
wow, first of all this actually works!!! i rooted my phone with the sole purpose of getting rid of gos but even with root; disabling, hiding, uninstalling none of them worked. But with these codes it works flawlessly. I was afraid cpu freqs would get maxed and burn my phone but nope! It only maxes out gpu and let cpu do its own thing, just the way its gotta be. For some temperature readings:
From perfZ: before(throttle at 43, stabilize around 41-42) after (i saw max 53-54)
from 3c cpu manager (a root app and its numbers look more realistic): before; jumping to max 70 but then throttles like crazy until temps go about 60 and tries to stay at 60. after, i saw max 81, and it was generally around 75-76.
about some fps(sustained/long time numbers): before: alternates between 25-35fps depending on where it is on the throttle cycle. after: stays at 45fps solid.
I should also tell you, for anyone who is worried or curious, your temperatures still has an effect on performance, for example, enabling this gives me 60fps initially but as gpu gets hotter it throttles to 45fps. When you play with this performance, your battery can get up to degrees like 44 and the phone is pretty toasty but it doesnt really go much further than that. My point is you dont have to worry about your phone getting hot to the point of melting. There is still some throttling mechanism but its just further per se.
Dont be intimidated by OPs long post and mounting and stuff. Setting up is dead easy, if you arent using an sd card, you just delete the read write portions of the code and use it like that. I only used code 1 and code 2. You dont have to remap power button to camera etc. Just make sure to close the performance mode once you are done playing(or you could do those parts too up to you ofc)
Also as of now, screen seems to close pretty quickly, and if it closes while performance mode is on, your phone crashes. Just restart by holding power+bixby+vol down. So you might wanna increase the time out numbers a bit. Hope this helps!
Hi is there any chances porting this to older devices, i.e. s8 ? Of course with root and on Q ?