Android is primarily an operating system based on the Linux kernel. So similar to other Linux based operating systems Android has a special user account known as the root or super-user. Unlike other user accounts which have limited control over the operating system this account has complete access to the system.
However several (almost every) carriers and manufacturers don't allow users to access this account mainly due to security concerns. Few carriers and manufacturers also do this because they don't want users to access features for free when they can sell them :). Rooting is a process that allows users of phones/tablets to gain this privileged control (the root access). Here is an article with the Top 10 Reasons To Root Your Android Phone.
Though rooting your device is not illegal it might void the warranty of the device. So think twice (make that trice) before rooting your device and make sure you have a good reason to do so. Read these articles on The dangers of rooting your Android phone and What is Rooting on Android? The Advantages and Disadvantages
The process of rooting a device changes from device to device. It usually involves using an exploit to either gain temporary root access or to flash a custom recovery image to attain permanent root access. There are popular exploits like GingerBreak, psneuter, etc. and applications like GingerBreak.apk, SuperOneClick, etc. for rooting a device.
If you have read the articles and still want to go ahead let me remind you once again that trying to root your device might brick the device. I am not responsible if you brick your device, so proceed at your own risk.
Rooting the Device
You don't require any exploit or any application to root HCL Me X1 and in-fact vulnerabilities like GingerBreak have already been patched. However it is possible to root the device using the adb shell so make sure you have the Android Debug Bridge (ADB) on your system.
Connect the device through the USB and open the shell using adb shell at the command prompt. If you are seeing the # here then that indicates that your adb shell has root access. Instead if you are seeing a $ this process won't work for your device. Please put in a comment if you see $ so that me and the other readers know that HCL has changed something.
Typically in most of the devices the adb shell does not have root access. However, looks like the Android build of Me X1 isn't a production build. Not sure if this was done knowingly or unknowingly by HCL but either way the tablet has root access through the adb shell. You can confirm this by trying one of these -
- Type adb root at the command prompt, it will show you a message stating that adbd is already running as root
- Type getprop ro.secure at the adb shell, it shows 0
- The ro.secure property can also be examined from the /default.prop. If this is 0 then it indicates that the adb will login as root by default. Note that this file cannot be changed since it's a part of the ramdisk
Though the adb shell has root access, the su command which is used in Linux doesn't work in Android since there is no su binary in Android. Download the su binary and the Superuser application from here (backup).
There are two steps for rooting the device -
- Copying the su binary to the /system/bin directory
Since this directory is on the Android PATH, applications will be able to call su directly. However since the /system is a read-only file system (type mount at the adb shell to check this), the file cannot be directly copied. Push the su binary from the system/bin directory in the zip to a temporary folder of the device (like /data/local/tmp) using adb push. However note that the su binary does not work directly from this directory since applications on the /data file system do not have the setuid bit on. Remount the /system with read-write capabilities with the mount -o remount -rw -t yaffs2 /dev/block/mtdblock2 /system command (check the actual device mount-point using mount). Copy the su binary to /system/bin and set the permissions of the binary using chmod 4777 su.
- Install the Superuser.apk from the system/app directory of the zip
Install the application using adb install or transfer the file to the sdcard and install it from there. The Superuser application intercepts the calls made to the su binary and informs the user about the usage so that unauthorized applications cannot attain root access.
Unrooting the Device
To unroot the device, uninstall the Superuser.apk and delete the su binary from the /system/bin directory.