The shell script use for msm8953(Snapdragon 625) undervolt
#include <std_disclaimer.h>
/*
* Your warranty is now void.
*
* We are not responsible for bricked devices, dead SD cards,
* thermonuclear war or you getting fired because the alarm app failed. Please
* do some research if you have any concerns about features included in this ROM
* before flashing it! YOU are choosing to make these modifications and if
* you point the finger at us for messing up your device, we will laugh at you. Hard & a lot.
*
*/
There are 3 prebuilt tools in prebuilt/.
- magiskboot used to pack/unpack boot.img.
- dtp used to split kernel_dtb into sub kernel_dtb-*.(one kernel_dtb exract from boot.img contains some dtbs, only one dtb is vaild)
- dtc used to decompile dtb file to dts file.
- use
dd
command to get boot.img - use
magiskboot
to unpack boot.img into kernel+kernel_dtb - use
dtp
to split kernel_dtb into sub kernel_dtb-* - find the adapted dtb according to
qcom, board-id
andqcom, msm-id
, and then usedtc
to decompile the selected dtb(binary) into .dts(source) - Modify screen refresh rate by change
qcom,mdss-dsi-panel-framerate
qcom,mdss-dsi-max-refresh-rate
in device-tree source file - undervolt by change
qcom,cpr-open-loop-voltage-fuse-adjustment
qcom,cpr-closed-loop-voltage-fuse-adjustment
qcom,cpr-closed-loop-voltage-adjustment
in device-tree source file - compile dts to dtb and pack boot.img
- Termux: Google Play(or other)
- Your device is rooted
./dtb_process.sh -i -c -f [-u undervolt] [-b overvolt] [-s screen refresh rate]
-i install boot.img after generation
-c does not cleanup workspace after finished(you wanna debug)
-f force backup the current boot(milestone) to /sdcard/Android/, otherwise only backup boot on first time
-u cpu undervolt value, default 0, range(0-125), unit mv
-b cpu overvolt value, default 0, range(0-125), unit mv
-s screen refresh rate value, default unchanged, unit hz
open termux bash and get script:
$ su
:/data/data/com.termux/files/home # curl https://github.com/unknownbaka/msm8953_offset_voltage/blob/msm8953/dtb_process.sh > dtb_process.sh
undervolt!!
if not set (default 0 mv)-u
and -g
, default undervolt cpu 100mv
:/data/data/com.termux/files/home # sh dtb_process.sh -u 100
install the new boot
:/data/data/com.termux/files/home # dd if=./new-boot.img of=/dev/block/bootdevice/by-name/boot
or use option -i
(then you don't need step install the new boot
)
:/data/data/com.termux/files/home # ./dtb_process.sh -u 100 -i
same as overvolt
please remember set (no longer need) the final -u
and -b
0, becauseoffset=(-b value)-(-u value)
:/data/data/com.termux/files/home # ./dtb_process.sh -b 100
if you want to change the screen refresh rate
:/data/data/com.termux/files/home # ./dtb_process.sh -s 90
if you are boring
:/data/data/com.termux/files/home # ./dtb_process.sh -u 90 -b 100 # same as ./dtb_process.sh -b 10
if something goes wrong, you can restore your origin boot, please check /sdcard/Android/ for the original boot image name.
do remember to delete old boot.img after flashed a new ROM, otherwise the script will not backup the new rom boot.
su
dd if=/sdcard/Android/boot-*.img of=/dev/block/bootdevice/by-name/boot # change it!
- asto18089
- 南昌狗头人(coolapk)