Rooting the emulator - Android Software/Hacking General [Developers Only]

Does someone knows how to allow the root access on android emulator?
I have root while connecting via adb, but I want to debug my application's features which require the root access.
When I type "su" in the ConnectBot terminal application I got:
$ su
su: uid 10036 not allowed to su
I tried to execute from adb shell:
# chmod 4755 busybox
but the busybox did not become root neither.
Please help!

+1 Funny.. was going to ask the same question today!

stanglx said:
+1 Funny.. was going to ask the same question today!
Click to expand...
Click to collapse
Good. If you find the answer, post it here please.

So, no answer to this?

I ended up by running Android-x86 on the Oracle's VirtualBox emulator. There is a stable Donut and even Froyo available for download. The image is rooted, but does not let me remount the system partition, though.

Related

Solved - Change root password

I used the directions from Jesus Freke to install the Mod RC30 on my G1.
Then I read and used the instructions provided by Stericson to change my password....
Only one problem! Now it won't let me access root with su or with my password. I wanted to use something generic first and if it was successful I would change it to a good password. So, I used my user name "shaneaus"
Now I get permission denied with both su and shaneaus!
Am I totally screwed? Is there some way to reset the password back to su. That wouldn't make sense, I know, from a security sense. Just hoping.
Thanks
I'm hoping that there is an easier solution.
But, if I flash the update... Will that reset the root password?
I don't know what happened but this can be remedied. First off, it is possible that when you change the superuser command you failed to chmod it to 4755...at any rate, you can solve this by plugging your phone into your computer and starting up an adb shell, this should give you root if you have the modded rc30. Next remount /system to read and write privileges
mount -o remount,rw /dev/block/mtdblock3 /system
now type:
cd /system/bin
ls
Do you see su or your username listed?
If so type:
chmod 4755 (type su or your username here, without parantheses)
now open terminal emulator on your phone and try your superuser command again.
If you did not see su or your username in the output of ls type the following to get a setuid shell:
cat sh > (username or su whichever you want)
chmod 4755 (username or su whichever you want)
now open terminal emulator on your phone and try your superuser command again.
That should get you going.
Ha!
I'm just beginning to learn how to do this stuff. I have no idea how to "start up an adb shell" or even what an adb shell is!
So, I guess I'll start researching on line!
Ok, so I've read up on the adb shell and think I have a grip on how to use it... Except I can't figure out how to get the darn thing started. Do I have to open up the emulator? I thought I would be accessing the device - not the emulator. But, most sites talk about using the adb with the emulator. Also, I have seen where I should be able to run adb devices.exe and have it show my device to confirm it is connected. Only one problem, I can't find the adb devices.exe in the sdk kit.
Oh, and thanks again to Jesus Freke for the 64bit USB drivers. worked like a charm!
Awesome! Y'all are fantastic! I learned a lot tonight! I did the following:
Add $SDK_ROOT\tools to my path
Then had a hell of a time because everything I was reading (except for one location I finally found said to run "adb shell.exe"
I finally found a site that said to run "adb.exe shell"
And, whalla! I was in.
Your above advise was spot on, Stericson! Thank you!
Glad to hear you got it sorted.
shaneaus said:
Oh, and thanks again to Jesus Freke for the 64bit USB drivers. worked like a charm!
Click to expand...
Click to collapse
*looks around* huh? me?
I assume you're refering to this driver?
You should be thanking aziwoqpd for that, not me

[Q] Verification of ROOT access on Nexus 1 froyo.

Does anyone know how to verify if phone is properly ROOTED? I typed in su then whoami on the phones Terminal Emulator and received the message Not Found. I was to receive root or whoami: unknown uid 0. everything appeared to go well when I ROOTed my Nexus 1. Perhaps I'm running the commands wrong?
Whoami works for me. It could be that you are not using a rom with busybox. If you type just su [enter] it should give you a # if you are rooted, instead of $.
I think your on to something! I do receive a # sign. But I do not have a custom ROM yet. Tomorrow I will be doing this. I will post my results. Thanks.
evilkorn said:
Whoami works for me. It could be that you are not using a rom with busybox. If you type just su [enter] it should give you a # if you are rooted, instead of $.
Click to expand...
Click to collapse
Evilkorn,
Your right....I had to download a Custom ROM to make Terminal emulator work. Command WHOAMI now works and Busybox shows up in my file manager! Thanks!

[Q] Questions About Rooting Files

Howdy,
Can someone tell me what exactly rage.bin is/does to the phone?
I understand that busybox is essentially a list of UNIX commands made available on the Android system and that SU elevates the ability to issue commands but I cannot figure out what rage.bin actually is.
Why would I need to use it to root my phone? Why wouldn't I just ADB su and busybox to /system/xbin and CHMOD and CAT them?
Thanks,
Z

Can be closed now.

Just curious. I tried to root a Gingerbread emulator with the new Gingerbreak method, but that didn't work.
Typed by Z using the Gingerbread keyboard.
It's rooted by default. What do you want to do?
No it's not, try su-ing in a console.
GaiusM said:
No it's not, try su-ing in a console.
Click to expand...
Click to collapse
Code:
$ adb devices
List of devices attached
emulator-5554 device
$ adb shell
# <-- '#' indicates that I'm root.
# umount /cache <-- only root can do that
# su <-- su works too
#
Do you use "adb shell" or some terminal emulator app?
yes the emulator is already rooted, but it cannot run root-required app, like root explorer.
aldee_s said:
yes the emulator is already rooted, but it cannot run root-required app, like root explorer.
Click to expand...
Click to collapse
Ok, thread can be closed now.
Typed by Z using the Gingerbread keyboard.

[Q] Rooting the motorola atrix 2

i tried a few ways to root my atrix 2 but i cant. I tried super one click, lazy one click (or however its called) and i cant root it i have a mac someone help! is there another way to root the atrix 2?
I heard there was an app that can do it too. Its in this forum somewhere.
I used the manual method on my Mac with no issues, did it twice actually.
What error messages are you getting?
I'll be home in about 15 mins and I can help further
Sent from my MB865 using Tapatalk
If all else fails, you could always reflash the fkz's, than try to root again, but the problem here is that you have a mac. Perhaps borrow a friends pc, or install Windows through bootcamp. (I wouldn't recommend a Virtual Machine though).
OK so if you used a root tool in the first place then I assume that-
-You have adb set up
-You have the necessary files to push (zerg, su, superuser.apk)
If you have no idea of what I'm talking about then just look around the folders of the root tools and you'll find them.
OK, here's what you have to do:
1. Open up a terminal.
2. CD (change directory) to where you have the necessary files located, ex. "cd ~/Desktop/" if they're on the desktop
3. Enter the following commands (one line at a time):
Code:
adb shell
cd /data/local
rm ./temp/*
exit
This removes temporary files created by the root exploit.
4. Now enter these commands (again, one at a time)
Code:
adb push zerg /data/local
adb push su /data/local
adb push Superuser.apk /data/local
adb shell
cd /data/local
chmod 777 zerg
./zerg
adb shell
mount -o rw,remount /dev/null /system
cat /data/local/su > /system/bin/su
cat /data/local/Superuser.apk > /system/app/Superuser.apk
chmod 4755 /system/bin/su
chmod 4755 /system/app/Superuser.apk
reboot
I hope you understand this... good luck getting complete root.
thread moved to general forum
If you find a specific android app that can do this for you and you can post it in the OP, I will gladly move it down to its original location. Until there, it doesnt belong in the app and themes forums.
What's your android version ?
Deliberate said:
I heard there was an app that can do it too. Its in this forum somewhere.
Click to expand...
Click to collapse
Unfortunately that app seems to have only been in the market and was recently removed... I tried looking for it today. Please correct me if I'm wrong!
jpumford said:
Unfortunately that app seems to have only been in the market and was recently removed... I tried looking for it today. Please correct me if I'm wrong!
Click to expand...
Click to collapse
You're correct, the app was written by an author who made it just to make money... he never even tested it. He took it down because it didn't work.
Most important question of all here: What OS are you running on your Mac?
If you're running 2.3.6 you can't root yet. You need to downgrade to 2.3.5

Categories

Resources