• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Logging as root and using the android emulator's terminal

 
Ranch Hand
Posts: 47
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi everyone,

Does anyone have any idea , how to log-on to the android device emulator's terminal using root id. I tried some of the linux commands on the terminal and except for a few, I got "access denied" as the reuslt for all.

I read in a book(Begining Android-by Mark Murphy) that executing adb pull/push commands, we can transfer the device database from an to the emulator respectively. But I got access denied even on this command.

 
Rancher
Posts: 1369
1
Android Eclipse IDE Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
If you are using the emulator bundled with the SDK, you should already have root access, which means you should be able to browse folders, push/pull files onto and from the emulator. Run all linux commands available from adb shell prompt. However, if you have Android device connected and you are trying to broswe through the file system, you would get access denied messages since you dont have root access on the phone.
 
VineetK Singh
Ranch Hand
Posts: 47
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Monu,

I am using the device emulator bundled with the sdk. Still I keep getting the access denied message.Has it something to do with the AVD target we create for application execution?
 
Monu Tripathi
Rancher
Posts: 1369
1
Android Eclipse IDE Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
By default, you always run as the root.

Try adb root command (here is what it means; copy-pasted from adb command usage text):
adb root - restarts adb with root permissions

Hope that helps...
 
VineetK Singh
Ranch Hand
Posts: 47
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Monu

It doesn't seem to work in anyway. I tried various other options also, but all I get is access denied message. I am using android sdk 1.5r1. Can it be the case that root login is possible only in previous versions, because wherever I read about this feature, the writers always referred to older versions(0.9 in the book I was talking about).
 
Monu Tripathi
Rancher
Posts: 1369
1
Android Eclipse IDE Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

VineetK Singh wrote:Hi Monu

It doesn't seem to work in anyway. I tried various other options also, but all I get is access denied message. I am using android sdk 1.5r1. Can it be the case that root login is possible only in previous versions, because wherever I read about this feature, the writers always referred to older versions(0.9 in the book I was talking about).



That is strange. I dont think the problem is with the version of SDK; I have been using SDK1.5 and never have had any such issues browsing the emulator file system.

What happens when you type adb root on the command prompt? When I type the command I get a messsage which reads- abdb is already running as root which is very obvious given that I run always as root.

Perhaps the problem is with the image of the file system mounted on the emulator. My knowlege of that area is not very good.
A crude method would be:
1. Delete the SDK installation
2. delete the .android folder created in C:/DocumentandSettings/%userProfile%/
3. Resinstall the SDK
 
VineetK Singh
Ranch Hand
Posts: 47
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hey Monu
I finally got it.. thank you!!
 
Greenhorn
Posts: 6
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

VineetK Singh wrote:Hey Monu
I finally got it.. thank you!!



hi vineetK, i tried to root my emulator, tried almost all methods, still no method worked. i use android 1.5,1.6,2.1,2.3 emulator, and i am not able to root it.
how did you do it, please help. i need it urgently..!!
 
reply
    Bookmark Topic Watch Topic
  • New Topic