Created
December 16, 2015 10:12
-
-
Save hram/11315a720019e3b78861 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@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 ... | |
adb shell su -c "cp /system/%1 /sdcard/%1" | |
echo Get %1 file from device ... | |
adb pull -p /sdcard/%1 %1 | |
echo Change density .... | |
rxrepl -f "%1" -o "%1" -s "%2" -i -r "%3" -a --no-backup | |
find "qemu.hw.mainkeys=1" "%1" 1>nul || echo qemu.hw.mainkeys=1 >> "%1" | |
echo Send %1 file to device ... | |
adb push -p %1 /sdcard/%1 | |
echo Copy %1 from sdcard to system ... | |
adb shell su -c "cp /sdcard/%1 /system/%1" | |
echo Remove temporary copy %1 from sdcard ... | |
adb shell rm /sdcard/%1 | |
del %1 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment