Skip to content

Instantly share code, notes, and snippets.

@hram
hram / STF
Last active August 9, 2017 12:26 — forked from MiteshShah/STF
#!/bin/bash
# Error handling
function OwnError()
{
echo -e "[ `date` ] $(tput setaf 1)$@$(tput sgr0)"
exit $2
}
# Repository for rethinkdb
@echo off
rem %1 - file in device /system folder
rem %2 - search regular expression
rem %3 - replace string
echo Remount system rw ...
adb shell su -c "mount -o rw,remount /system"
adb shell cd /sdcard
echo Copy %1 from system to sdcard ...
@echo off
echo Change display density ....
call dbprp.cmd "build.K013_1.prop" "ro.sf.lcd_density=\d{3}" "ro.sf.lcd_density=160"
call dbprp.cmd "build.prop" "ro.sf.lcd_density=\d{3}" "ro.sf.lcd_density=160"
find "qemu.hw.mainkeys=1" build.K013_1.prop 1>nul || echo qemu.hw.mainkeys=1 >> build.K013_1.prop
find "qemu.hw.mainkeys=1" build.prop 1>nul || echo qemu.hw.mainkeys=1 >> build.prop
echo It's ok. Device must be rebooted. Press any key for reboot.