service installsu /system/bin/sh /superuser/install.sh class main user root group root oneshot
The superuser app I want to install is the one from Koushik Doutta. My install.sh script looks like this:
#!/system/bin/sh mount -o remount,rw /system chattr -i /system/bin/su chattr -i /system/xbin/su rm -f /system/bin/su rm -f /system/xbin/su rm -f /system/app/Superuser.* rm -f /system/app/Supersu.* rm -f /system/app/superuser.* rm -f /system/app/supersu.* rm -f /system/app/SuperUser.* rm -f /system/app/SuperSU.* cp /superuser/su /system/xbin/su chown 0:0 /system/xbin/su chmod 6755 /system/xbin/su ln -s /system/xbin/su /system/bin/su cp /superuser/Superuser.apk /system/app chmod 644 /system/app/Superuser.apk chattr -i /system/etc/install-recovery.sh cp /superuser/install-recovery.sh /system/etc/install-recovery.sh chmod 755 /system/etc/install-recovery.sh touch /system/etc/.installed_su_daemon mount -o remount,ro /system
"ls -l" inside the superuser folder gives:
-rw-rw-r-- 1 root root 44 Nov 30 22:18 install-recovery.sh -rwxr-x--- 1 root root 737 Jan 7 11:29 install.sh -rwxr-xr-x 1 root root 283084 Nov 30 22:25 reboot -rwxr-xr-x 1 root root 311872 Nov 30 22:25 su -rw-rw-r-- 1 root root 2025538 Nov 30 22:25 Superuser.apk
The image splitting tool of Mikael Q Kuisma warned me that a different version of mkbootimg was used to create the original boot image an suggested which variables I had to change in the source code. I did this and compiled my own version. The unmkbootimg tool also gave me the complete command including parameters to build the new image. I used it without any modifications.
Finally, the problem: It doesn't root my phone.
It seems like the installer script is never run, because I can't find the su binary using "adb shell ls /system/xbin/". Also the phone does not boot directly into Android. It shows me the Motorola logo, turns black, shows the unlock warning, shows boot animation and then Android is loaded. I don't have a reboot command inside the script, so shouldn't it boot straight to Android when I boot with "fastboot boot <new boot.img>"?
Is it possible to get kernel logs without being root?