Related
Check this thread for updated and improved information, many thanks to j4mm3r
http://forum.xda-developers.com/showthread.php?t=953110
Credit goes to NuroSlam for coming up with a working method. This requires a functioning adb connection. Using this version of su is not as secure because it will not activate Superuser for your permission to grant root access. In fact, it can work without Superuser.apk installed at all. Hopefully we will soon have an updated su or maybe the next version of Honeycomb will be prerooted. First download the following files:
1. su http://www.magicandroidapps.com/su.zip
2. Superuser.apk http://bit.ly/su2361ef
3. busybox http://busybox.net/downloads/busybox-1.18.2.tar.bz2
Extract the above files using your favourite program
Using adb, install all three files to /data/local:
adb push su /data/local
adb push Superuser.apk /data/local
adb push busybox /data/local
Use adb remount to open the /system directory
adb remount
Use adb shell to move files
adb shell
cd /data/local
cat Superuser.apk > /system/app/Superuser.apk
cat su > /system/bin/su
cat busybox /system/xbin/busybox
Symlink su and set permissions:
ln -s /system/bin/su /system/xbin/su
chmod 06755 /system/bin/su
Typing su should now work
su
su: access granted, courtesy of www.magicdroidapps.com
Install busybox
exit from adb shell and using a terminal application (i.e Root Explorer or Better Terminal Emulator) on the nook,
su
busybox --install -s /system/xbin
That should do it, works with Root Explorer, Titanium Backup, LCD Density, Quick Boot and SetCPU.
Good Luck
really? That simple? Root was the only reason i haven't jumped on the Honeycomb train. This may change my mind.
I tried this on the 2gb sd image got root. But after I rebooted root was gone.
I noticed su is in /system/bin rather than /system/xbin on the Froyo image. Any reason?
Homer
anbradle said:
I tried this on the 2gb sd image got root. But after I rebooted root was gone.
Click to expand...
Click to collapse
Check your steps, especially permissions and the symlink. Works consistently on reboot for me.
Homer_S_xda said:
I noticed su is in /system/bin rather than /system/xbin on the Froyo image. Any reason?
Homer
Click to expand...
Click to collapse
I couldn't get it to work for me without installing in /system/bin and using a symlink to /system/xbin
chhaggerty said:
It wouldn't work for me without installing in /system/bin and using a symlink to /system/xbin
Click to expand...
Click to collapse
It should work anywhere in the default PATH as long as it's got the full permissions (7655) set. I've only got one in xbin wih no symlink and all has been well for the superuser app...
[email protected]:/system/bin # echo $PATH
echo $PATH
/sbin:/vendor/bin:/system/sbin:/system/bin:/system/xbin
[email protected]:/system/bin # ls -l su
ls -l su
su: No such file or directory
[email protected]:/system/bin # ls -l /system/xbin/su*
ls -l /system/xbin/su*
-rwSr-sr-t root root 76232 2011-02-04 09:08 su
-rwSr-sr-t root root 76232 2009-07-31 19:08 su-magic
-rwSr-sr-t root root 26264 2010-08-10 06:52 su-new
-rwSr-sr-t root root 68340 2011-01-31 11:22 su-org
chhaggerty said:
Credit goes to NuroSlam for coming up with a working method. This requires a functioning adb connection. First download the following files:
1. su http://www.magicandroidapps.com/su.zip
2. Superuser.apk http://bit.ly/su2361ef
3. busybox http://busybox.net/downloads/busybox-1.18.2.tar.bz2.
Good Luck[/B]
Click to expand...
Click to collapse
i might take credit for gaining root, but the rest is all you
Thanks! I couldn't really follow the part with installing busybox. Was I supose to make the busybox binary? Anyway, I just let titanium backup install busybox for me by clicking the "Problems?" button.
Just tried Root Explorer and it's working great. Nice being able to quickly edit the build.prop file. Upped the dalvik heap size to 64mb and messing with LCD density.
Thanks again!
Nathan
nswenson said:
Thanks! I couldn't really follow the part with installing busybox. Was I supose to make the busybox binary? Anyway, I just let titanium backup install busybox for me by clicking the "Problems?" button.
Just tried Root Explorer and it's working great. Nice being able to quickly edit the build.prop file. Upped the dalvik heap size to 64mb and messing with LCD density.
Thanks again!
Nathan
Click to expand...
Click to collapse
Running busybox from terminal will install all the busybox commands in /system/xbin which should make them available when using adb.
Just a suggestion...
Making a batch file with the command and packing everything in 1 zip makes it a lot easier for most people and reduces the chances of people forgetting a step.
You were right I tried again and now I am rooted after reboot. Thanks
jleecong said:
Just a suggestion...
Making a batch file with the command and packing everything in 1 zip makes it a lot easier for most people and reduces the chances of people forgetting a step.
Click to expand...
Click to collapse
Okay...
I am running HC (v2) off a 8gb sd card.
So do I just do these steps to gain root or do I need to partition the sd card first?
Thanks
Note to the OP, this method isnt exactly quite the same as using the "su" from the SuperUser app would be. This is just a modified "su" binary from the AOSP build which bypasses the check for uid AID_SHELL. Typically, the su shipped with Android only allows root access if invoked via "adb shell".
Now, although this modified binary is quite ok and will get you on the way working with all the Apps that require root access, but it will leave your system unsecure.
You see the guys who developed SuperUser have a hook inside the "su" binary which invokes the SuperUser activity which allows the user to allow/disallow/track other applications' root requests and usage.
So my advice is to be really careful and understand what you are doing if you decide to install this.
I'm gonna try and recompile ChainsDD's SuperUser and see if I can remove its dependency on mktemp.
EDIT: There is no need to push the SuperUser.apk, the modified su has no relation with it and it will work anyways.
j4mm3r said:
Note to the OP, this method isnt exactly quite the same as using the "su" from the SuperUser app would be. This is just a modified "su" binary from the AOSP build which bypasses the check for uid AID_SHELL. Typically, the su shipped with Android only allows root access if invoked via "adb shell".
Now, although this modified binary is quite ok and will get you on the way working with all the Apps that require root access, but it will leave your system unsecure.
You see the guys who developed SuperUser have a hook inside the "su" binary which invokes the SuperUser activity which allows the user to allow/disallow/track other applications' root requests and usage.
So my advice is to be really careful and understand what you are doing if you decide to install this.
I'm gonna try and recompile ChainsDD's SuperUser and see if I can remove its dependency on mktemp.
EDIT: There is no need to push the SuperUser.apk, the modified su has no relation with it and it will work anyways.
Click to expand...
Click to collapse
agreed, i was just going for root myslef
j4mm3r said:
I'm gonna try and recompile ChainsDD's SuperUser and see if I can remove its dependency on mktemp.
EDIT: There is no need to push the SuperUser.apk, the modified su has no relation with it and it will work anyways.
Click to expand...
Click to collapse
In
http://howto.ccroms.net/android_project/build/mod/root
I would have though that the purpose of the changes, specifically;
LOCAL_FORCE_STATIC_EXECUTABLE := true
LOCAL_STATIC_LIBRARIES := libc
Were what should resolve the _mktemp not found?
j4mm3r said:
Note to the OP, this method isnt exactly quite the same as using the "su" from the SuperUser app would be. This is just a modified "su" binary from the AOSP build which bypasses the check for uid AID_SHELL. Typically, the su shipped with Android only allows root access if invoked via "adb shell".
Now, although this modified binary is quite ok and will get you on the way working with all the Apps that require root access, but it will leave your system unsecure.
You see the guys who developed SuperUser have a hook inside the "su" binary which invokes the SuperUser activity which allows the user to allow/disallow/track other applications' root requests and usage.
So my advice is to be really careful and understand what you are doing if you decide to install this.
I'm gonna try and recompile ChainsDD's SuperUser and see if I can remove its dependency on mktemp.
EDIT: There is no need to push the SuperUser.apk, the modified su has no relation with it and it will work anyways.
Click to expand...
Click to collapse
Howard from MagicAndroidApps.com noted this on the original Honeycomb thread. I'll update the OP to make this clear. Thanks.
So once we acquire root, there is nothing to shield apps or commands from performing root without the users knowledge?
Edit: That does sound correct the way i typed it, hope you guys understand what i'm trying to convey
Mikey1022 said:
So once we acquire root, there is nothing to shield apps or commands from performing root without the users knowledge?
Edit: That does sound correct the way i typed it, hope you guys understand what i'm trying to convey
Click to expand...
Click to collapse
yes, at the stands, its just root access. granted i had my own reasons for this
Whenever I push, chmod, then reboot, my device reboots but nothing else. Adb DOES recognize my device, I can install/uninstall, remount, etc... So wat?
I'm try'n to get a modded Ziggy script to run on boot (to further undervolt- others have gotten to run)
I've tried manually pasting in unit.d folder, then manually fixing perm.s but after I reboot, the permissions have reverted n nothing has changed.
Yes, I'm a noob, please help.
sent from rooted ThunderBolt
I've gotten weird problems with adb in Win7 by not running cmd as an admin
Ok, well I'm the admin. (only 1 user acct.) so I should be good
Sent from my ADR6400L using XDA App
Maybe you're pushing whatever to a system folder not mounted with write access? I know if you try pushing to say /system/etc/hosts and you dont have it mounted in write access and have root permission (on the phone in both cases), it will reset it back to the original on reboot.
yareally said:
Maybe you're pushing whatever to a system folder not mounted with write access? I know if you try pushing to say /system/etc/hosts and you dont have it mounted in write access and have root permission (on the phone in both cases), it will reset it back to the original on reboot.
Click to expand...
Click to collapse
Crap, I think ur right. I was fixing perms thru adb w chmod, but AFTER I pushed.
But regardless I don't think I set as R/W.
Also, wat would cause me not to be able to set permissions manually (for individual paths) using root explorer ( or similar file manager)?
Sent from my ADR6400L using XDA App
Nope, doesn't change a F'n thing. God I wanna swear soooo bad. almost more than I respect this forum.
Sent from my ADR6400L using XDA App
K, I found that adb thinks I'm mounted as R/O tho I'm mounted as R/W. WHY
Sent from my ADR6400L using XDA App
Dunno offhand; you're not being very descriptive and it's hard to read what you're saying. Try a different approach, like using sshdroid pro (with putty or xshell) and the command line there instead of adb. I dont really use adb to push/mod things on the phone unless there's no other choice (like rooting your phone). If you're using a custom rom, they generally have a small script built into them to mount the system folder(s) as r/w (type sysrw or sysro).
It was as simple as having slashes backwards, lol, figures.
Adb still thinks I'm in read-only tho. I tried "adb remount" to no avail.
I'm not familiar w/ the other things u mentioned (i can barely read em til I change my font)
R those things I DL? Put in my SDK?
I'LL check em out
Sent from my ADR6400L using XDA App
To be more descriptive: I'm using virusROM RC1B2 w/ updated Ziggy kernel (bfs).
I have a modified script (from Ziggy) that I recently pushed to system/etc/unit.d that I'm tryn to run.
After I push I type "adb shell chmod 755 /system/etc/init.d/04vddlevels" (file name).
Then adb says "can't chmod" cuz the file system is "read-only"
I try "adb remount" n then re-entering chmod n it says nothing n nothing happens.
I am mounted as R/W so I'm confused.
Hope that explains it btr, Thnx 4 the help!
Edit; I also have a "tweak" zip file I flashed from adrynalyne to enable script to run on boot encased the Rom isn't set up to, tho others (one that I know of) has had no problems. He hasn't been able to help either.
http://www.appbrain.com/app/sshdroid/berserker.android.apps.sshdroid
then you log into it with either
http://www.netsarang.com/products/xsh_detail.html
or
http://www.chiark.greenend.org.uk/~sgtatham/putty/
or if you're using linux or osx, you can do it natively on the terminal line with the ssh command.
You can transfer files over sftp (with ssh) using something like filezilla http://filezilla-project.org/
Tutorials:
http://www.netsarang.com/tutorial/xshell/list
http://www.howtoforge.com/ssh_key_based_logins_putty
http://psychologyit.rutgers.edu/helpdocs/filezilla.html
There's plenty of pages out there on ssh if you search google though. Just read up. It's the primary way to communicate (securely) remotely with a linux/unix server. It encrypts your traffic to and from a server (in this case, your phone). It also means no cables (though you can do that with wireless adb also).
Basically, it's a way of remotely using the terminal built into android (since it's linux) without having to use adb.
try this (all one line):
(for write perms)
adb shell mount -o remount,rw,noatime,nodiratime -t ext3 /dev/block/mmcblk0p25 /system
(to set back to read only)
adb shell mount -o remount,ro,noatime,nodiratime -t ext3 /dev/block/mmcblk0p25 /system
if that doesn't work, then you're not root, so you will have to type:
adb shell su -
to get root before doing the other commands
Cool Thnx, yeah I have seen that b4, I'm tryn it(adb thing 1st) now.
Sent from my ADR6400L using XDA App
Ok, I typed: adb shell mount.... N got "Device or resource busy" ?
Sent from my ADR6400L using XDA App
Next I tried: (all one line) "adb shell su -adb shell mount... n got permission denied. ??
Sent from my ADR6400L using XDA App
if you do it all as one line you have to put a ; in between the statements so it terminates the last command before doing another
Ok, wat does "device or resource busy" mean?
http://lmgtfy.com/?q="device+or+resource+busy"+android
Do I type: "adb shell su-" (then hit enter) ? Cuz I get "su- not found"
There's not supposed to be a space between 'su' and '-' , correct, cuz then I get a '#' sign n adb freezes.
Wow I'm a mess, lol, Thnx 4 help, maybe I should do some studying n come bak more prepared!
Yeah. I here ya. Thnx. Again
Sent from my ADR6400L using XDA App
The new script failed for me and from the look of things for other people as well.
In my case a new out of the box Nook Tablet and a fresh sdcard it fails to find the sdcard. it is there of course, its simply a case of not having read or write permisssions on the /mnt/sdcard. It's set as system for owner and group without anyother permissions. The Nook had already created a folders for the sdcard with read write permissions so one could have used one of them for the tests I suppose.
What I did after completing the rooting was to turn on superuser and rerun the creating of Titanium backup directory and pushing the modified device manager files. I also needed to install Titanium.apk.
The commands I used was:
adb shell
$ su
# makdir /sdcard/Titaniumbackup
# chmod 777 /sdcard/Titaniumbackup
# bye
adb push com.bn.devicemanager-1351fc675dac5f1a461a09b769b1b4b6.apk.gz /sdcard/TitaniumBackup/com.bn.devicemanager-1351fc675dac5f1a461a09b769b1b4b6.apk.gz
adb push com.bn.devicemanager-20111222-085657.tar.gz /sdcard/TitaniumBackup/com.bn.devicemanager-20111222-085657.tar.gz
adb push com.bn.devicemanager-20111222-085657.properties /sdcard/TitaniumBackup/com.bn.devicemanager-20111222-085657.properties
adb install Titanium.apk
then using the nook tablet running Titanium.apk and performing the restore of the DeviceManger.
I was hoping this might help someone else out.
makdir is not a command. mkdir.
the sdcard is FAT formatted. you can't chmod it. that's a worthless command.
I had installed the latest busybox installer (v7.3) by Stericson. It had an option to uninstall existing busybox installations.
Since I had multiple versions of busybox already installed on my P500, I decided to uninstall a few of them but on hitting uninstall it seems it removed a lot of binaries.
Now when I try to use any application that requires root it simply FC's.
Then I tried using ADB shell but it gave me the following error:
-exec /system/bin/sh: No such file or directory
I then manually tried to look into /system/bin from FileExpert app that I had installed on my mobile. I had almost every required essential binaries but sh was missing.
Therefore I did a adb push of sh from one of my other phones(a ZTC blade). It was successful but now ADB shell gives another error:
/system/bin/sh: Permission denied(13)
I need someones help in this. Am I proceeding the correct way. If yes, how do I set permissions without adb shell?
Also I few more points I had noticed (If it might me helpful)
--------------------------------------------------------
1) adb devices: now gives some generic device name (e.g- 80565403440...). Previously I think it was something like "LGP500" if I am not mistaken.
2) only /system/bin now holds some binaries. No binaries are to be found on other locations like /system/xbin, etc.
3) Is copying sh from another phone the correct way to proceed? Or shells are different for different mobiles. If yes, can a P500 owner provide a sh from /system/bin please? Thanks.
[EDIT: The problem has been resolved. Setting executable permission externally and making a adb push worked out. Only thing I needed was a Linux installation and VirtualBox saved my day. Windows powershell may also work it seems but I didnt try it.
I assumed the binary compiled for ZTC Blade will work successfully for the days to come. Thanks XDA]
Can someone please provide me the sh binary from P500 please? It resides in the /system/bin folder.
Also if anyone knows how to use the phones internal memory without adb and set file permissions, it would be a great help.
Someone please provide the sh binary from /system/bin . I will try pushing it with executable permissions set outside to see if it works...
I just play andorid device a few days, but My hdx7 is a little bricked because i deleted some system app. Now I can log in fire os, have adb, usb connected and internal storge, even i can operate device setting app, but i can't open the other app because i don't have a desktop.
I compare system/app folder with the same folder in the amazon bin, found that the folder lack of scores of app, but the other system folder is the same. So I hope can adb push app folder to the system folder, but the pemission denied. I try to remount or mount, it can't work.
if adb root, then "adbd cannot run as root in production builds.
if adb push apk to the app folder, then “permission denied".
if adb remount, then ”remount failed: Operation not permitted".
and I have try adb shell like that:
# su
# mount -o rw,remount -t yaffs2 /dev/block/mtdblock3 /system
# chmod 777 /system
# exit
it didn't work.
my hdx7 have rooted.
My Questions are:
1. If I could push the app folder to the system folder and reset to factory, is my hdx saved?
2. How to get the system folder rw in the situation?
thx for any prompt, although i am a rookie but i will try my best, i wish the adept can help me and will be enormously grateful. Sorry for my poor english.
It sounds to me that you had lost root.
kschang said:
It sounds to me that you had lost root.
Click to expand...
Click to collapse
So i have tried root again like "http://forum.xda-developers.com/showthread.php?t=2544965" said
But it didn't work, please see the attach, But I don't know why.
Sorry for that i'm rookie to andorid and ask so many questions.
randolphling said:
So i have tried root again like "http://forum.xda-developers.com/showthread.php?t=2544965" said
But it didn't work, please see the attach, But I don't know why.
Sorry for that i'm rookie to andorid and ask so many questions.
Click to expand...
Click to collapse
Hmmm... It says you still have root (the prompt changed after "su")
I personally don't use ADB much. I have Root Explorer (grabbed it legally for free from Amazon ages ago) and Wifi Explorer Pro (same method) so I basically WiFi myself the files I need sideloaded then move them around on the device itself. But if you've lost launcher, you have deeper issues.
Have you tried ADB push any launcher? Or even a download store like 1Mobile or Aptoide?
ADB is basically a Linux shell debug into Android, so you need to learn some Unix shell commands. I'm sure you can find ADB guides with the basic commands, like "ls", "cp", and so on.
You need to check the directory and see if the system/app and other system directories are still there. This is one reason I only play with the copy of ROM I have (see Safestrap Recovery).