-
Notifications
You must be signed in to change notification settings - Fork 4
/
root404.sh
33 lines (32 loc) · 953 Bytes
/
root404.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
#!/bin/bash
echo wait-for-device
adb wait-for-device
echo root stage 1
adb shell "rm -r /data/local/12m/batch 2>/dev/null"
adb shell "ln -s /data /data/local/12m/batch"
adb reboot
echo wait-for-device
adb wait-for-device
echo root stage 2
adb shell "rm /data/local.prop"
adb shell "echo 'ro.sys.atvc_allow_all_adb=1' > /data/local.prop"
adb reboot
echo wait-for-device
adb wait-for-device
echo root stage 3
adb remount
adb push root/su /system/bin/su
adb shell "chmod 6755 /system/bin/su"
adb shell "ln -s /system/bin/su /system/xbin/su 2>/dev/null"
adb push root/busybox /system/xbin/busybox
adb shell "chmod 755 /system/xbin/busybox"
adb shell "/system/xbin/busybox --install /system/xbin"
adb push root/Superuser.apk /system/app/Superuser.apk
adb shell "rm /data/local.prop"
adb shell "rm /data/local/12m/batch"
adb shell "chmod 771 /data"
adb shell "chown system.system /data"
adb reboot
echo wait-for-device
adb wait-for-device
echo root finished