Skip to content

Commit b710dc5

Browse files
committed
temp
1 parent 1c4621d commit b710dc5

2 files changed

Lines changed: 57 additions & 9 deletions

File tree

files/loki/loki.sh

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
# See here for more information on loki: https://github.com/djrbliss/loki
66
#
77

8-
export C=/data/local/tmp/
8+
export C=/data/local/tmp/loki
99
bb="$C/busybox_file"
1010

1111
if [ ! -f /sdcard/recovery_org.img ] ; then
@@ -17,10 +17,5 @@ mkdir -p $C
1717
dd if=/dev/block/platform/msm_sdcc.1/by-name/aboot of=$C/aboot.img
1818
$C/loki_patch recovery $C/aboot.img $C/recovery.img $C/recovery.lok || exit 1
1919
$C/loki_flash recovery $C/recovery.lok || exit 1
20-
rm $C/aboot.img
21-
rm $C/recovery.img
22-
rm $C/recovery.lok
23-
$C/loki_patch
24-
$C/loki_flash
2520
exit 0
2621

runme.bat

Lines changed: 56 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,71 @@
11
@echo off
22
SET adb="%~dp0adb\adb.exe"
3+
SET recoveryimg=LGL22-KK-KBC-CWM-v6.0.4.7_r1-recovery.img
34

45
type "%~dp0doc\01_Thanks.txt"
56
pause
67

8+
call :adb_push
79

810

11+
echo . 本ツール、recoveryを使用する事に起因する
12+
echo . データ破損、機器破損については責任をもちません。
13+
echo . 今ならまだ引き返せます
14+
set /P INPUT=作業を継続しますか?(N/Y):
15+
if "%INPUT%"=="Y" call :install_recovery
16+
if "%INPUT%"=="y" call :install_recovery
917

10-
echo somthing process here.
1118

19+
set /P INPUT=恒久Root(with SuperSu)を取得しますかぁ?(N/Y):
20+
if "%INPUT%" == "Y" call :iinstall_su
21+
if "%INPUT%" == "y" call :iinstall_su
1222

23+
:finish
24+
call :clean
25+
type "%~dp0doc\02_End.txt"
26+
pause
27+
exit /b
1328

1429

30+
:adb_push
31+
%adb% push "%~dp0files" /data/local/tmp/
1532

33+
%adb% shell chmod 755 /data/local/tmp/busybox_file
34+
:: rooting
35+
%adb% shell chmod 755 /data/local/tmp/get_essential_address
36+
%adb% shell chmod 755 /data/local/tmp/unlock_security_module
37+
%adb% shell chmod 755 /data/local/tmp/run_root_shell
38+
%adb% shell chmod 755 /data/local/tmp/run_root.sh
39+
:: loki
40+
%adb% shell chmod 755 /data/local/tmp/loki.sh
41+
%adb% shell chmod 755 /data/local/tmp/loki/loki_flash
42+
%adb% shell chmod 755 /data/local/tmp/loki/loki_patch
43+
%adb% shell chmod 755 /data/local/tmp/SuperSu/install_su.sh
1644

17-
type "%~dp0doc\02_End.txt"
18-
pause
45+
exit /b
46+
47+
:install_recovery
48+
%adb% shell /data/local/tmp/run_root.sh /data/local/tmp/loki/loki.sh
49+
%adb% pull /sdcard/recovery_org.img
50+
51+
exit /b
52+
53+
:install_su
54+
%adb% shell /data/local/tmp/run_root.sh /data/local/tmp/SuperSu/install_su.sh
55+
%adb% shell /data/local/tmp/run_root_shell -c "reboot recovery"
56+
echo 端末が再起動しますのでお待ちください
57+
%adb% wait-for-device
58+
exit /b
59+
60+
:clean
61+
%adb% shell rm /data/local/tmp/busybox_file
62+
%adb% shell rm /data/local/tmp/device.db
63+
%adb% shell rm /data/local/tmp/get_essential_address
64+
%adb% shell rm /data/local/tmp/run_root.sh
65+
%adb% shell rm /data/local/tmp/run_root_shell
66+
%adb% shell rm /data/local/tmp/unlock_security_module
67+
68+
%adb% shell rm -rf /data/local/tmp/loki
69+
%adb% shell rm -rf /data/local/tmp/recovery
70+
%adb% shell rm -rf /data/local/tmp/SuperSu
71+
exit /b

0 commit comments

Comments
 (0)