Skip to content

Commit 5663fd0

Browse files
committed
fix permanent rooting
1 parent b32b1e2 commit 5663fd0

9 files changed

Lines changed: 19 additions & 114 deletions

File tree

files/SuperSu/install_su.sh

Lines changed: 14 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,8 @@
22
bb=/data/local/tmp/busybox_file
33
echo mount rw
44
$bb mount -o remount,rw /system
5-
5+
mount | grep system
6+
echo backup css-auditd
67
if [ ! -f /sdcard/ccs-auditd_org ] ; then
78
$bb cp /system/bin/ccs-auditd /sdcard/ccs-auditd_org
89
fi
@@ -11,39 +12,23 @@ $bb cp /data/local/tmp/unlock_security_module /system/bin/unlock_security_module
1112
$bb cp /data/local/tmp/device.db /system/etc/device.db
1213
chmod 755 /system/bin/unlock_security_module
1314

14-
$bb mkdir -p /system/addon.d
1515
#supersu
16-
$bb cp /data/local/tmp/SuperSu/sed/addon.d/99-supersu.sh /system/addon.d/99-supersu.sh
17-
$bb cp /data/local/tmp/SuperSu/sed/bin/.ext/.su /system/bin/.ext/.su
18-
$bb cp /data/local/tmp/SuperSu/sed/bin/ccs-auditd /system/bin/ccs-auditd
19-
$bb cp /data/local/tmp/SuperSu/sed/etc/init.d/99SuperSUDaemon /system/etc/init.d/99SuperSUDaemon
20-
$bb cp /data/local/tmp/SuperSu/sed/etc/.installed_su_daemon /system/etc/.installed_su_daemon
21-
$bb cp /data/local/tmp/SuperSu/sed/etc/install-recovery.sh /system/etc/install-recovery.sh
22-
$bb cp /data/local/tmp/SuperSu/sed/etc/install-busybox.sh /system/etc/install-busybox.sh
23-
$bb cp /data/local/tmp/SuperSu/sed/xbin/daemonsu /system/xbin/daemonsu
24-
$bb cp /system/xbin/daemonsu /system/xbin/su
25-
26-
$bb chown 0.0 /system/addon.d/99-supersu.sh
27-
$bb chown 0.0 /system/bin/.ext/.su
16+
$bb cp /data/local/tmp/SuperSu/ccs-auditd /system/bin/ccs-auditd
17+
$bb cp /data/local/tmp/SuperSu/su /system/xbin/su
2818
$bb chown 0.0 /system/bin/ccs-auditd
29-
$bb chown 0.0 /system/etc/init.d/99SuperSUDaemon
30-
$bb chown 0.0 /system/etc/.installed_su_daemon
31-
$bb chown 0.0 /system/etc/install-recovery.sh
32-
$bb chown 0.0 /system/etc/install-busybox.sh
33-
$bb chown 0.0 /system/xbin/daemonsu
34-
$bb chown 0.0 /system/xbin/su
35-
36-
$bb chmod 755 /system/addon.d/99-supersu.sh
37-
$bb chmod 755 /system/bin/.ext/.su
3819
$bb chmod 755 /system/bin/ccs-auditd
39-
$bb chmod 755 /system/etc/init.d/99SuperSUDaemon
40-
$bb chmod 644 /system/etc/.installed_su_daemon
41-
$bb chmod 755 /system/etc/install-recovery.sh
42-
$bb chmod 755 /system/etc/install-busybox.sh
43-
$bb chmod 755 /system/xbin/daemonsu
44-
$bb chmod 755 /system/xbin/su
20+
4521

4622
#install busybox
23+
echo install busybox
4724
/data/local/tmp/SuperSu/install-busybox.sh
4825

26+
echo mount ro
4927
$bb mount -o remount,ro /system
28+
29+
echo 'ui_print("Start Rooting");' > /cache/recovery/extendedcommand
30+
echo 'mount("/system");' >> /cache/recovery/extendedcommand
31+
echo 'ui_print("/system/bin/chmod 6755 /system/xbin/su");' >> /cache/recovery/extendedcommand
32+
echo 'run_program("/system/bin/chmod", "6755", "/system/xbin/su");' >> /cache/recovery/extendedcommand
33+
34+

files/SuperSu/sed/addon.d/99-supersu.sh

Lines changed: 0 additions & 53 deletions
This file was deleted.

files/SuperSu/sed/bin/.ext/.su

-110 KB
Binary file not shown.

files/SuperSu/sed/bin/ccs-auditd

Lines changed: 0 additions & 9 deletions
This file was deleted.

files/SuperSu/sed/etc/.installed_su_daemon

Lines changed: 0 additions & 1 deletion
This file was deleted.

files/SuperSu/sed/etc/init.d/99SuperSUDaemon

Lines changed: 0 additions & 2 deletions
This file was deleted.

files/SuperSu/sed/etc/install-recovery.sh

Lines changed: 0 additions & 17 deletions
This file was deleted.

files/SuperSu/sed/xbin/daemonsu

-110 KB
Binary file not shown.

runme.bat

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -83,14 +83,16 @@ echo prepear for gettting the permanent root
8383
%adb% push "%~dp0files\SuperSu" /data/local/tmp/SuperSu
8484
%adb% shell chmod 755 /data/local/tmp/SuperSu/install_su.sh
8585

86-
echo start instrall SuperSu.apk
87-
%adb% install "%~dp0files\SuperSu_forHost\eu.chainfire.supersu-193.apk"
86+
8887

8988
echo install su binaries
9089
%adb% shell /data/local/tmp/run_root.sh /data/local/tmp/SuperSu/install_su.sh
91-
%adb% shell /data/local/tmp/run_root_shell -c "reboot"
90+
%adb% shell /data/local/tmp/run_root_shell -c "reboot recovery"
9291
type "%doc%\05_reboot.txt"
9392
%adb% wait-for-device
93+
94+
echo start instrall SuperSu.apk
95+
%adb% install "%~dp0files\SuperSu_forHost\eu.chainfire.supersu-193.apk"
9496
exit /b
9597

9698

0 commit comments

Comments
 (0)