Saturday, November 19, 2011

Rooting & Unrooting HCL Me X1

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 -

  1. 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.

  1. 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.

34 comments:

Siddarth Grewal said...

Im getting this error

"Error: Device not found"

Please send me ur email id for PM

Gautam Muduganti said...

Siddarth,

You can check the device using "adb devices". If your tablet shows up here then everything is well and good.

Else if you are using Windows, make sure the drivers are installed. You can install them from here.

If you are running Linux and are seeing "???????? No Permissions"; switch to root using su, stop the adb server using "adb kill-server" and start the adb server using "adb start-server".

Let me know if you hit any blocks.

Brahmana Tushar Goswami said...

I followed you right from HCL ME X1 Review page from another site: http://arpandeb.com/10/2011/tech/hcl-me-x1-review-of-the-tablet-and-rooting-guide-hands-on-video-and-photographs.html. I was able to easily root the HCL ME X1 by using this tutorial. But I do not trust the clockworkmod recovery backup/restore. As you said about manual backup stock/rom images creation and their restore. I am still uncertain about what to backup and what not regarding specially for HCL ME X1 tablet. Can you guide me about how to do this so that I get 100% safe and complete image backups of HCL ME X1 Tablet, and how to restore them without flaws.

Thanks,
Tush.

Siddarth Grewal said...

So I rooted the device using superoneclick. But neither does android market nor skype work. I had installed another app called screenshot. though superuser ask for permission but after accepting it, it still does not work. So I unrooted my device.

Gautam Muduganti said...

Tushar, I am working on an step-by-step article for backup/restore.

Brahmana Tushar Goswami said...

I wish it doesn't takes long. And you said that you have Stock ROM image which you created for ME X1. I lost the freshness of my Android Tablet and installed so much junk in enthusiasm, then just followed your rooting tutorial and created 2 backups. Can you send me the Stock ROM for ME X1, if possible to: aroratushar@gmail.com.

Anonymous said...

@ Gautam
Nice Blog and good work. Please update about the Custom Rom you were working on.
Prabhat

Gautam Muduganti said...

Tushar, I am done with the Backup/Restore post, the stock ROM is available in the same post.

Prabhat, writing a custom ROM seems to be quite difficult. The system is going into kernel panic when I flash the created ROM. Have to look into it but not getting much time :(

Brahmana Tushar Goswami said...

Thanks Gautam for providing the original stock rom backup files. I had unknowingly replaced my original HCL ME X1 stock recovery with a clockworkmod recovery 5 rom. And all my Android System was filled with junk and buggy things. More than 100 mostly pirated apps. There were bugs coming in my Android like screen switching on by itself all the time thus draining the battery. And there was no solution. Its a blessing that you provided the Stock Rom. God bless you :) Maybe other people may also require it. I read the ClockWorkMod Recovery tutorial and tried it. Now it's all ok.

What's about custom ROM?

Brahmana Tushar Goswami said...

Gautam, I tried to create a mixture of HCL ME X1 /system directory with Cyanogenmod 7 of Coby Kyros MID 7022. And then copied the files into /system partition. I formatted cache, system, data partitions before this attempt. But it just displayed Cynanogenmod 7 splash logo. I did not flashed boot.img, etc. because it is dangerous as it would lead to bricking of tablet. At least splash logo was seen but it did not loaded the os. What can be done with the custom rom? Can Android 2.3.7 be modded with HCL ME X1 drivers and files and run successfully?

Ram babu sharma said...

Hi gautam nice tutorial but fail to get drivers for my hcl me x1..

when i try to install adb for windows it shows u don't have proper java installed visit to-java.sun.com n when i download the jdk7ui for windows then my pc shows it's not supported!

I m failed at the very first step plz. help me!

Rambabu

Ankit said...

adb devices gives device serial

but adb shell gives

error: closed

Vikas said...

Gautam!!!
How can we 'switch between apps' in HCL X1. Generally it is by holding 'home' key, but not in this tab. Can you please Help!
Vikas

Anonymous said...

ok so i have HCL ME X1 and i want to root it....but i am not able to understand the steps mentioned here so can anyone just tell me what am i suppose to do......my email id is devilshantanu123@yahoo.com......please help me i want to root my device...thanks in advance

Anonymous said...

Can u post a detailed video. I'm a doc. Not that knowledge in tech. So I need more details than you mentioned. .. please post a video :) or atleast a step by step detail

Anonymous said...

Bayya . Koncham video or pics pettarade ! Assal artham kaale . This is my first time android . Help me im not a techie :(

tinkoo1978 said...

I am totally new to android. i want to root my hcl me x1. but i am unable to understand the tutorial beyond starting adb shell, getting #... please help

Dayson said...

it's impossible to download the HCL ME PC Suite software from the link above or find it anywhere else online. Can someone upload it or provide a reliable download link?

Dayson Pais said...

If you're looking for a way to install the Android Market on the HCL ME X1 (WITHOUT rooting), here's an easier method http://dploy.in/2011/installing-android-market-on-the-hcl-me-x1-coby-kyros-mid7022-without-rooting/

Gautam Muduganti said...

@Tushar - I have been a little busy for the past three weeks so didn't try any custom ROMs, will definitely write an article if I make any progress.

@Ram Babu - try installing Java 6, it might work.

@Ankit - I am not sure why this is happening, you should talk to the HCL Customer Support if you are not able to find a solution. Do share the solution if you find one, might be helpful for others.

Gautam Muduganti said...

@Shantanu and @Tinkoo - If you are planning to root your device, I would recommend you understand how adb works.

Rooting a device means taking complete control over it. If you are not comfortable with the adb shell, I wouldn't recommend rooting the device since it would become a burden to maintain if you mess any settings.

Give adb shell a try and then let me know if you still have trouble understanding this guide.

Raunak said...

can you tell me if ice cream sandwich for hcl x1 is launches or not and where can i get andriod market app for my tab

Gautam Muduganti said...

@Raunak - I don't think there are any planned upgrades of ICS for HCL Me X1. At-least I have not heard of any.

For the Android market go through the link mentioned by Dayson.

Rishabh said...

Even I am having same problem, dad shell comand giver error closed.!please give me a solution for this

Rishabh said...

Guys please reply.. need you help i get an 'error:closed' when i enter adb shell commang at the command promtpromt

draduraj said...

can someone please send backup stock rom for hcl me x1. willbe very grateful my email is draduraj@yahoo.com

G-OnE said...

Hey man..!!
can you please work out on HCL me u1 tab ??
M situation is so horrible with out google play :(

Allan said...

hey can you pls upload backup of hcl me x1 because i installed ics without backup and now my hcl me is transformed to coby kyroos mid7022..so how to undo everything

ABS said...

Hey Gautam....I flashed stock rom that you provided. Tab starts just fine. But just 5-10 seconds after starting it shuts off. Just shuts off, no reboot or anything else. I tried every way to eradicate this issue but to no success. Help me out....is this kernel related issue or what. Waiting for ur reply. THANKS.

Sanjay said...

Gautam can u please send me the stock rom.. i am gettinf lot of errors after rooting the device.. and i forgot to backup!!! please mail me as quick as u can to manafi123@gmail.com will be waiting fr u to send me that..

Gautam Muduganti said...

For all those looking for the Stock ROM, it is available in the next blogpost I wrote - http://gautam-m.blogspot.in/2011/11/backup-restore-hcl-me-x1.html towards the end of the article.

Jitendra Laishram said...

i have download your stock rom image ...how do i install that on my me x1 ..right now am stuck me logo .. am able to boot in recovery mode and fastboot mode .. but am not able to mount sd card .. so please help me

Shariq Waseem said...

http://b2bad.in/Packers-and-Movers-in-Delhi/ @ Movers and packers in Delhi http://b2bad.in/Packers-and-Movers-in-Delhi/ @ Delhi packers and movers

Naviya Nair said...

I have read your blog its very attractive and impressive. I like it your blog.

.Net Training in Chennai | .Net Online Training | Dot Net Training in Chennai

Dot Net Online Training | LINQ Online Training