Manual rooting Android on Linux

A quick Google search for “Rooting Android” gives numerous results; mainly forum
posts of people looking for help but also lots of good (…and bad…) answers
with detailed instructions.
Most answers describe how to use SuperOneClick on Windows.
SuperOneClick simply is a front-end for copying and carrying out the exploit.
SuperOneClick is based on .NET version 2.0 or higher and the package contains a
version of ADB, the Android Debug Bridge. Usually it is part of the Android SDK.
With ADB you can for example copy files directly to the smartphone or open a
Linux shell.

Unfortunately, SuperOneClick did not work for me. I run Debian Linux (Kernel
2.6.32) on my computer and I tried execute SuperOneClick. It always hangs at
“Getting manufacturer…”. I tried to run SuperOneClick on WindowsXP in a VM but
it didn’t work either.

Before we start:
You do this at your own risk. We are not responsible if you damage your

So here we go:
First, download SuperOneClick from (Edit, 20140826: The original link seams to have disappeared, thus, you can download it from here.) Create a directory and unzip it.

mkdir foo
cd foo
unzip ../

Now cd into the directory ADB and make the Linux version of adb executable.

cd ADB
chmod 755 adblinux

Now connect your smart phone. Don’t mount the USB drive on your computer. On the
smart phone go to Settings/Applications/Development and activate USB Debugging.
Now test if adb can see the smartphone.
./adblinux devices
You should see something like this:

List of devices attached
4257323032BC4C34385A device

If you don’t get a device or a list of question marks it usually is just a
matter of permissions. The best way is to reconfigure udevd.
Find out the vendor id of your smartphone.
You get a list of devices. Somewhere you should see your smartphone and the
vendor id.

Bus 002 Device 070: ID 0fce:2149 Sony Ericsson Mobile
Communications AB Xperia X8 (debug)

Create the file /etc/udev/rules.d/50-android.rules and add the
following content:

SUBSYSTEM=="usb", ATTRS{idVendor}=="0fce", MODE="0666", GROUP="plugdev"

Restart udevd and check if adb sees your device.

sudo /etc/init.d/udev restart

Now we copy the exploit code, the su command, and the super user app to the

cd ..
ADB/adblinux push Exploits/psneuter /data/local/tmp
ADB/adblinux push Root/su-v3 /data/local/tmp
ADB/adblinux push Root/Superuser.apk /data/local/tmp

Now we open the adb shell and carry out the exploit.

ADB/adblinux shell

You should get a command prompt with a dollar sign.

$ cd /data/local/tmp
$ chmod 755 psneuter
$ ./psneuter

You will get disconnected. Reconnect to the shell. If it does not work
disconnect the device from USB and reconnect it. If this also does not work
reboot your smart phone and try to execute the exploit (psneuter) again. After
reconnecting you should be root. The prompt should now be a hash sign (#). Type
id and you will see uid=0.

Now remount the system drive in read/write mode. Type mount
and you will get a list of mounted devices. Finde the line with the
/system mount point.

/dev/block/mtdblock0 on /system type yaffs2 (rw)

Now remount it, copy the files to the system directory, and set the file mode

# mount -o remount,rw /dev/block/mtdblock0 /system
# cat su-v3 > /system/bin/su
# cat Superuser.apk > /system/app/Superuser.apk
# chmod 06755 /system/bin/su
# chmod 0755 /system/app/Superuser.apk

You should see the new app: Superuser. That’s all folks!
I tested this on a Sony Ericsson Xperia X8 running Android 2.1 and on a Samsung
Galaxy Mini running Android 2.2.


Skip to comment form

    • John on October 11, 2011 at 9:06 am

    Great guide, thanks a lot!

    • Luccas on March 13, 2012 at 8:13 am

    Good morning,

    I was looking for a tutorial to root my android 2.1 (motorola mb502) when I found yours. It’s very good, but I have a problem: when I connect my cell phone on the usb and the ./adblinux devices doesn’t work. So, I tried lsub but doesn’t work, too! My blackberry appears on the lsusb command, but my android doesn’t. I check google but I found nothing. Can you help me, please? Why my motorola doesn’t appear on lsusb command? What can I do?

    If you can help me I’d be very grateful.


      • eagle on March 14, 2012 at 11:05 am

      Have a look at /var/log/kern.log and connect your phone. The kernel should output something. This may indicate the problem. If simply nothing apears in the log then either the USB connector of your mobile phone is broken or the USB interface has to be activate on the phone somehow.

        • Luccas on March 15, 2012 at 1:00 pm

        Good morning, Eagle!

        I couldn’t find /var/log/kern.log, but I realized that it was a problem with the USB connector. The problem was solved and I successfully rooted my Android. Thank you very much!

        Greetings from Brazil!

    • Eric on March 16, 2012 at 12:22 am

    Thanks for putting this guide together!

    I get as far as executing psneuter (./psneuter) before running into trouble. At this point I get the following error:

    Failed to set prot mask (Inappropriate ioctl for device)

    Do you have any suggestions?

      • eagle on March 16, 2012 at 6:12 am

      psneuter does not run on every Android version. I tested this on 2.1 and 2.2. Which version do you run? Maybe you need another exploit such as gingerbreak.

        • Eric on March 28, 2012 at 12:05 am

        I’m running 2.3.4 on my Samsung SPH-D600 (Conquer 4G).

        Was eventually able to root it automatically with SuperOneClick 2.3.3 once I was able to find the correct Samsung drivers for Windows.

    • jay on March 24, 2012 at 12:22 pm

    Thanks! This helped bunches.

    myTouch 1.2/Fender

    • huangja123 on July 13, 2012 at 3:47 pm

    I have a problem like someone had earlier.
    I am trying to root an Android netbook.
    adblinux devices does not list out any device.
    lsusb does not recognise the netbook.
    I have checked that the USB connection is good.
    If the USB port in the netbook is not activated, how to activate it?

      • eagle on August 24, 2012 at 8:36 am

      If lsusb does not list your device than I think there’s something wrong with the USB at all. Try to connect it to another computer and see what happens there.

    • Michael on July 13, 2012 at 11:51 pm

    Thanks a lot for your description. It worked perfectly on a Toshiba Folio 100 with Android 2.2.

Comments have been disabled.