Most visited posts/pages in the last 24 hours
Join 189 other subscribers
A listing of random software, tips, tweaks, hacks, and tutorials I made for Ubuntu
I have found a lot of tutorials on this subject, but none really supported Android x86 devices, so I decided to write my own here which will support both ARM and x86. If you have an android phone or tablet, you have an ARM CPU, and if you have a virtual android device (or have android installed on your computer), you have an x86 CPU. Notice that you are on your own with rooting. I can try to help, but I cannot guarantee that it will work 100% (it might even break your device). Good luck!
Prerequisites:
First, open up your android device and navigate to Settings -> Applications -> Development, and make sure USB Debugging is on. Next, connect your android device to your computer (if it isn’t already), but make sure you do NOT mount it. If it’s a virtual device, you don’t have to worry about it. Connect your android device with ADB, and type these commands in the terminal (of your computer, not the android device, replacing “path/to/directory/X/is/located” with the actual directory where X is located):
cd path/to/directory/psneuter/is/located
adb push ./psneuter /data/local/tmp/
cd path/to/directory/superuser/is/located
mkdir superuser
cd superuser
unzip ../Superuser-*.zip
adb push ./system/app/Superuser.apk /data/local/tmp/Superuser.apk
adb push ./system/bin/su /data/local/tmp/su
We just uploaded everything we need to the android device (under a temporary directory). Now it’s time to root it! If you are using Android x86, press ALT+F1 and type the commands there instead of on the host machine. If you are not using it, first type this in the host machine’s terminal (it will simply engage a shell with your phone/tablet):
adb shell
Enter these commands:
cd /data/local/tmp
chmod 755 psneuter
./psneuter
On the host machine (yes, this is both for x86 and non-x86), connect to the android device using ADB, and type these commands:
adb shell
busybox ash
mount -o remount,rw /dev/block/mtdblock0 /system
cp /data/local/tmp/su /system/bin/su
chmod 6755 /system/bin/su
cp /data/local/tmp/Superuser.apk /system/app/Superuser.apk
chmod 777 /system/app/Superuser.apk
reboot
Your android device should now be rooted!
Pingback: Today’s Links | PICwebs
Gotta be careful, some tablets, notably CnM 7″ and 9″ touchpad DON’T have a cp command, so for safety, in the shell, type busybox cp (rest of the line here) whenever you need a cp command
Thanks, I updated the post
do this way does not have a risk?
Any rooting is risky, this way just makes you (almost) totally in control of the rooting, so if something went wrong, you can figure out what happened and maybe fix it. So no, this one is still risky.
I’ll try it later.
thanks for the article
Reblogged this on droidterbaru.
do you want simple rooting steps…click here
http://openforum.asia/discuss/question/how-to-root-an-android-device-in-simplest-way.html
Hi. I tried rooting an Android x86 (4.0 RC2) VM (VirtualBox) on a Win7 host machine. I got stuck at the step that involves executing ./psneuter, The console throws this message:
“Failed to set prot mask (Inappropriate ioctl for device)”
Plus all other permission modifications failed (Permission Denied).
Android x86 also includes busybox and su by default. Also tried several rooting tools and none work. Any ideas?
So you downloaded the x86 version of psneuter, and you ran those commands under cygwin, right?
is this metod dependant on installing firs the adb+fastboot etc? i use ubuntu distro on usb live iso.
any ideas ?
Yes, you will need to install ADB, as its the only way (that I know) of accessing the device.
i have downloaded android sdk and adb etc., but dont know how to install these things while booting the ubuntu thru live usb disk ? plz help
Okay, you don’t need to install them. Simply go to the directory of the android sdk, and adb should be under platform-tools. Once you are there, just replace any “adb” to “./adb” (that will run adb from the current directory)
Sir do u mean to rename saying replace. Means do I rename file name adb to ./adb ?
And do I need to have androi sdk installed beforehand? And PLZ guide me way to install sdk and adb when I only try running Ubuntu thru live USB distro from startup of my pc I have not installed Ubuntu in my pc. PLZ help
No, you don’t need to rename, I was saying replace as in the instructions (so when you see
adb ...
, run./adb ...
instead).And no, you don’t need to install it if you do what I said above (I actually have no idea how to install it if you aren’t using a package manager, sorry). :)
ok now everything needed is installed (SDK, NDK etc. etc.), all things set. when i start the process i have following errors :
after i use ./psneuter, there is some error like … inappropriate…. device….
and after i keep continue the rest of the process, like tpe adb shell and then busybox ash, there is again some error. thereafter almost every step brings errors.
sir do i have to connect my device booted normally or do i have to boot my device in bootloader mode etc.? because i can’t boot my device in bootloader mode because i don’t know th exact method to do that. i have tried several (all possible) key-combinations to boot my device (samsung galaxy music duos GT-S6012) but not worked any keys to boot it in the bootloader/fastboot mode.
plz help !
Hmm, you are sure that you downloaded the ARM version of psneuter? I’ll check the links to make sure that they are pointing to the correct file if not.
Unable to download the x86 version of psneuter using the link provided. It seems only registered users can download?
Right, though there is a rather hidden link to download, I decided to switch hosting services. Should work better now :)
The ARM version of psneuter, was successfully copied to a Samsung Galaxy SII (i777, which is the AT&T version). Here’s the conversation with the device via adb:
shell@android:/ $ cd /data/local/tmp
cd /data/local/tmp
shell@android:/data/local/tmp $ chmod 755 psneuter
chmod 755 psneuter
shell@android:/data/local/tmp $ ./psneuter
./psneuter
Failed to set prot mask (Inappropriate ioctl for device)
1|shell@android:/data/local/tmp $ ls -la
-rw-rw-rw- shell shell 1468798 2008-02-29 02:33 Superuser.apk
-rw——- shell shell 0 2011-01-01 00:01 immvibed.lck
-rwxr-xr-x shell shell 557962 2013-02-11 06:16 psneuter
-rw-rw-rw- shell shell 380532 2008-02-29 02:33 su
Seems right, so far, but psneuter does not appear to run.
Android 4.04 3.0.15 UCLK3 blah blah
Ideas?
Thanks!
Hmm weird… could you run this and paste the output here?
file ./psneuter
psneuter; ELF 32-bit LSB executable, ARM, version 1 (SYSV), statically linked, for GNU/Linux 2.6.16, not stripped
That seems right, right?
Sorry for my late reply on this! The output seems right, so the issue must be with your OS for some reason… Try running:
strace ./psneuter
And post the output here (you will probably want to post it on a pastebin, such as pastie.org)
“ok now everything needed is installed (SDK, NDK etc. etc.), all things set. when i start the process i have following errors :
after i use ./psneuter, there is some error like … inappropriate…. device….
and after i keep continue the rest of the process, like tpe adb shell and then busybox ash, there is again some error. thereafter almost every step brings errors.
sir do i have to connect my device booted normally or do i have to boot my device in bootloader mode etc.? because i can’t boot my device in bootloader mode because i don’t know th exact method to do that. i have tried several (all possible) key-combinations to boot my device (samsung galaxy music duos GT-S6012) but not worked any keys to boot it in the bootloader/fastboot mode.
plz help !”
Same here…
Microsoft Windows [Version 6.1.7601]
Copyright (c) 2009 Microsoft Corporation. Vse pravice pridrzane.
C:\Users\Martin>cd C:\Users\Martin\Downloads
C:\Users\Martin\Downloads>adb push ./psneuter /data/local/tmp/
2657 KB/s (557962 bytes in 0.205s)
C:\Users\Martin\Downloads>cd superuser
C:\Users\Martin\Downloads\superuser>adb push ./system/app/Superuser.apk /data/local/tmp/Superuser.apk
2774 KB/s (1468798 bytes in 0.517s)
C:\Users\Martin\Downloads\superuser>adb push ./system/bin/su /data/local/tmp/su
3210 KB/s (973198 bytes in 0.296s)
C:\Users\Martin\Downloads\superuser>adb shell
shell@android:/ $ cd /data/local/tmp
cd /data/local/tmp
shell@android:/data/local/tmp $ chmod 755 psneuter
chmod 755 psneuter
shell@android:/data/local/tmp $ ./psneuter
./psneuter
Failed to set prot mask (Inappropriate ioctl for device)
1|shell@android:/data/local/tmp $ ./psneuter
any idea what is wrong?
Please follow the instructions here and let me know of the output: https://lkubuntu.wordpress.com/2012/10/26/how-to-root-an-android-device-under-ubuntu/#comment-3201
hmmm…… Sounds like some of these peeps should not be ROOTing there own phones, considering the posts I’ve read …. No offense to those who have posted :-). There is also a GINGERBREAK file that is an x-ecutable in the .Zip they downloaded…. Always read Instructions that are so abundant across the entire world of /////WEB/////…. Learn before you do anything. There is no sure-fire method , or non-risky method to Root your phone. The above method may not work on every device so here is a little bit of help. No offense intended :-)
cd /path-to-your-adb/platform-tools
adb start-server
adb devices
adb push ./GingerBreak /system/data/local/GingerBreak
(or ./psneuter) or both :-)
adb push ./Superuser.apk /system/data/local/Superuser.apk
adb push ./su /system/data/local/su
someone@someone-GT5252:~$ adb shell
root@android:/ # cd /system/data/local
root@android:/system/data/local # ls
GingerBreak
Superuser.apk
psneuter
su
tmp
root@android:/system/data/local # ls GingerBreak
GingerBreak
root@android:/system/data/local # ./GingerBreak
[**] Gingerbreak/Honeybomb — android 2.[2,3], 3.0 softbreak
[**] Exploit may take a while!
[+] Plain Gingerbread mode!
[+] Found system: 0x4002511c strcmp: 0x4000e270
[+] Found PT_DYNAMIC of size 264 (38entries)
[+] Found GOT: 0x0001b445
[+] Using device /devices/platform/goldfish_mmx.0
[*] vold: 0094 GOT start: 0x0001b470 GOT end: 0x0001b4b0
I hope this helps a little………. And thanks to the Original Post for helping others and I am in no way responsible if you damage or “BRICK” your device. Root at your own Positiveness or your Decadence….. Happy Rooting and dont forget to say thanks to the original Post(e)
Thanks for sharing this method!!
But I’m wondering, what does GingerBreak do? It seems to do some rather more complex things than what my post suggests to do, so I’m wondering, why does it do this? Is it so that it will make sure everything works fine?
Even though I got the ioctl error, it still rooted my phone. :) and is rooted PROPERLY.
I had taken my phone to a shoppe, and had them root it. the phone said “Your phone is not properly rooted.”
is that working with ANY android device??i mean it can work with chineese brand??
I can’t offer any guarantee that it will. It might, or it might not. I’m sorry, that’s all I know :/
I recommend backing up your device before doing this though :)
ARM version of psneuter no longer available from http://ompldr.org/iaGRpOQ as that webiste doesn’t connect. Please advise where it may be obtained.
I think that’s the 3rd time a link on this tutorial that doesn’t work… so this time, I’m uploading it on thepiratebay too :P
Thanks for the new links for psneuter. When I try to go to the piratebay link that you supplied, I get “Error – site blocked”. As I’ve never used piratebay, I don’t know how to get round this error. Please advise. So I used the other new link (i.e. 2shared.com).
Re “Next, connect your android device to your computer (if it isn’t already), but make sure you do NOT mount it¨. I don’t think all Ubuntu users will understand this. On my Android tablet, Ubuntu automatically mounts & syncs to the “internal sdcard”. On my Android phone (ZTE V790), I have to use mtpfs in order to mount it – so I haven’t used mtpfs. Is that correct?
I copied to /data/local/tmp the 3 files you supplied, as shown below:
shell@android:/data/local/tmp $ ls -l
-rw-rw-rw- shell shell 1468798 2008-02-29 02:33 Superuser.apk
-rwxrwxrwx shell shell 557962 2013-08-16 06:32 psneuter
-rw-rw-rw- shell shell 380532 2008-02-29 02:33 su
However, when I key “busybox ash”, I get:
shell@android:/data/local/tmp $ busybox ash
ash: precmd: Permission denied
Please tell me what I should do.
I forgot to mention that running psneuter gave:
shell@android:/data/local/tmp $ ./psneuter
Failed to set prot mask (Inappropriate ioctl for device)
PS I’m trying to root my ZTE V790 phone (not my tablet).
Algunos articulos me agradaron mas… ;)
No creia ver un articulo asi en este blog sin embargo he
quedado grafamente agradecido esta vez
Pingback: Rooten mit Linux (S7582) - Android-Hilfe.de
hi! Thanks this is work in my devices
adb push ./psneuter /data/local/tmp/ seems to be hangs, when I execute this line it doesn’t show me the command prompt in next line, but cursor keeps blinking. Please help
When I run psneuter on my x86 Dell Venue 3730, I get the error:
“nmap() failed: invailed argument”
I run ubuntu 15.05 on my pc and my droid runs 4.4.2
./psneuter does not work, how can this be fixed?, I am receiving any error message (after I executed the command adb shell, then cd into the /data/local/tmp) which is mmap() failed. Invalid argument (once I executed the command ./psneuter).