Remove All Ads from XDA

[Q] Superboot image for Motorola Moto G

15 posts
Thanks Meter: 0
By brushmate, Junior Member on 7th January 2014, 09:37 PM
Post Reply Email Thread
I'm trying to root my german Motorola Moto G using a superboot image. This topic is very new for me so I followed the Instructions of Mikael Q Kuisma using the original boot.img from the stock ROM. In addition I want to have my image to install a superuser App. So I registered a service in the `init.rc` file which just runs the installer shell script. I register the service like this:

service installsu /system/bin/sh /superuser/
    class main
    user root
    group root
As far as i understood this service is run once as root when all other services of the class main are run. Am I right?

The superuser app I want to install is the one from Koushik Doutta. My script looks like this:

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/
cp /superuser/ /system/etc/
chmod 755 /system/etc/
touch /system/etc/.installed_su_daemon
mount -o remount,ro /system
This is basically the update-android script from the archive but without all the conditionals.

"ls -l" inside the superuser folder gives:

-rw-rw-r-- 1 root root      44 Nov 30 22:18
-rwxr-x--- 1 root root     737 Jan  7 11:29
-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
I think this are the correct permissions?!

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?
Post Reply Subscribe to Thread

motorola moto g, root, superboot

Guest Quick Reply (no urls or BBcode)
Previous Thread Next Thread
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes