The essential part of the Superboot image is a small shellscript. Actually the entire boot environment is only there so this shell script can be successfully executed. The script consists of the following commands:
mount -o rw,remount -t ext4 /dev/block/platform/omap/omap_hsmmc.0/by-name/system /system
rm /system/bin/su
rm /system/xbin/su
mkdir /system/xbin
cat /superboot/su>/system/xbin/su
chmod 6755 /system/xbin/su
cat /superboot/Superuser.apk>/system/app/Superuser.apk
mount -o ro,remount -t ext4 /dev/block/platform/omap/omap_hsmmc.0/by-name/system /system
Lets see what it does:
- Remounts the
/system
directory as read-writable (by default it's mounted as read-only).
- Removes any optionally existing occurances of
su
from /system/bin
or /system/xbin
.
- Creates the
/system/xbin
directory (in case it does not exist yet).
- Copies a version of
su
to /system/xbin
and the Superuser
app to /system/app
.
- Sets the permission on
su
to world-executable and sets the setuid and setgid bits/flags.
- Remounts the
/system
directory as read-only.
That's all it takes to make your phone "rooted". Of course the point is that this
su
version supports the permission database of the accompanying Superuser app.
So only those apps will get root privilege through a call to the the
su
executable, which you grant permission to do so.
Recent comments
2 years 23 weeks ago
3 years 45 weeks ago
3 years 45 weeks ago
3 years 47 weeks ago
3 years 48 weeks ago
4 years 3 weeks ago
4 years 3 weeks ago
4 years 3 weeks ago
4 years 3 weeks ago
4 years 3 weeks ago