How to root Android device using ADB

How to do things, solutions, recipes, tutorials
Message
Author
User avatar
don570
Posts: 5528
Joined: Wed 10 Mar 2010, 19:58
Location: Ontario

#31 Post by don570 »

Note to teddog : 'adb' doesn't need JAVA or flash to be installed
to obtain the basic commands like 'push' and 'pull'.
I did have to install the JDK(Java Development Kit)
to take a screenshot of Android device.

Note to esrom2: Puppy linux always runs as the root user so
you should never get the message 'permission not permitted'

Some linux apps don't like to run by the root user, but adb isn't one of them.

I wonder if your phone manufacturer has found some way of blocking
adb commands?? Android devices have ways of blocking viruses.
So maybe your phone thinks it's being attacked by a virus.

All I can suggest is use the latest version of adb and cross your fingers.

Here's a tutorial on using adb that might be of use.
http://forum.xda-developers.com/showthr ... p=17123601

____________________________________________________

oldaolgeezer
Posts: 64
Joined: Sun 03 Dec 2006, 19:34

How to root Android device using ADB

#32 Post by oldaolgeezer »

A comment on my use of adb:

I have been using Puppy Linux 5.2.8 V4 successfully with adb on my first generation Kindle Fire tablet.

I have used Puppy and adb to flash various recovery partition programs and Android Gingerbread and Jellybean ROMs designed for the first generation Kindle Fire via an ordinary micro USB cable.

(I've learned from the forums on xda-developers.com that, there is a forum for many of the different models of phone and tablet hardware. There may be user developed flashable ROMs and/or installable apk programs for many of the specific models there too.)

As don570 reported above, some of these phones or tablets require the normally unused pin 4 of the micro USB cable end to be grounded (in the case of the OTG ("On the Go") cable), but some other brands or model phones or tablets sometimes need the unused pin 4 of the micro USB cable end to be connected to the +5 volt wire with a current limiting resistor (these micro USB cables are called a "Factory Cable").
The xda-developers.com has lists of what cable is required for a specific model phone or tablet with adb or what cable is required for even resurrecting a "brick"!

Also I wanted to thank 01micko for mentioning the useful Android apk: airdroid.
As a newbie in the world of Android, I have found the sheer number of available apps (even just ones with four or five star reviews) to be overwhelming.

For my simple needs, I haven't wanted to go through an endless cycle of installing, trying and then un-installing hundreds of apps.

Thanks again don570 and 01micko.

User avatar
don570
Posts: 5528
Joined: Wed 10 Mar 2010, 19:58
Location: Ontario

#33 Post by don570 »

Here's an interesting video on how to make
an OTG cable with a female end rather than
the normal male plug.

This is useful with Android tablets.

http://www.youtube.com/watch?v=COkLEJGo6vo

To buy a new cable is not expensive but few stores have this special
cable in stock.
___________________________________________________
It's possible to attach keyboards and USB sticks to nexus7
and probably other tablets.


http://www.amazon.ca/Asuxtek%C2%AE-Nexu ... B008ZBGC5S

Here's a review..

1 of 1 people found the following review helpful
5.0 out of 5 stars OTG good ta go!
This little cable lives up to it's name. Works fine on a rooted Nexus 7 combined with stickmount app to add much needed USB storage to the tablet. You can't go wrong for $6.00 free shipping. You just have to wait two weeks for it to get here from Hong Kong.
This is same cable (I believe)

http://www.adafruit.com/products/1099
_______________________________________________





___________________________________________________

User avatar
don570
Posts: 5528
Joined: Wed 10 Mar 2010, 19:58
Location: Ontario

#34 Post by don570 »

To play downloaded flash videos without installing Flash itself
I found the following player works on recent Android tablets.

BSP v1.5.136 [4.0+].apk


However I found that mp4 videos were out of sync with audio,
but Android's builtin video player can handle mp4 fine.

.

Dromeno
Posts: 534
Joined: Fri 12 Sep 2008, 07:01

How about doing a test run

#35 Post by Dromeno »

I do not have an android device so I do not know if this is useful, but I can imagine that you would like to be able to test the rooting procedure before you do it on an expensive phone.

Here are several android iso's whch can be installed on a computer (or even within puppy in a virtual box environment)

http://www.android-x86.org/

the only annoting part when you want to make a puppy/android multiboot system is that Grub4DOS does not recognize the android, so you will have to go back to Grub (ideas for workarounds are welcome)

User avatar
don570
Posts: 5528
Joined: Wed 10 Mar 2010, 19:58
Location: Ontario

#36 Post by don570 »

I've just downloaded it. I'll try it out.

_______________________________________
the only annoting part when you want to make a puppy/android
multiboot system is that Grub4DOS does not recognize the android, so you
will have to go back to Grub (ideas for workarounds are welcome)
Have you tried a boot manager (such as plop) that will work with grub4dos?

grub4dos starts the boot process then plop puts a menu on screen
to choose what to do next.

http://www.plop.at/en/home.html

http://www.linuxjournal.com/content/usi ... r-usb-boot


________________________________________

User avatar
don570
Posts: 5528
Joined: Wed 10 Mar 2010, 19:58
Location: Ontario

#37 Post by don570 »

Here's a well written site to explain how to use adb
including how to install a .apk file

http://www.androidcentral.com/android-2 ... hould-know

_______________________________________________

I explain how to use Plop linux to boot
Android-x86

http://mail.murga-projects.com/puppy/vi ... 09864ac338

_______________________________________________

User avatar
Eastern Counties
Posts: 145
Joined: Tue 31 Jan 2006, 18:09
Location: UK

How to root Android device using ADB

#38 Post by Eastern Counties »

Has anybody figured out how to get over the error message that /system is Read Only?

I'm trying to root an HTC Wildfire S with Android 2.3.5 - a previous poster on this thread has done this, so it must be possible.

When I enter the commands to push Superuser.apk, etc., from /root on my Puppy laptop to /system on the phone, I get the message that /system is Read Only. I've searched, but can't find how to make /system Read/Write.

Anybody now how it's done?

Thanks

User avatar
n0ukf
Posts: 129
Joined: Tue 14 Feb 2012, 21:53

#39 Post by n0ukf »

I just tried ADB and got it to read my LG Optimus Dynamic (L35G running 2.3) with a straight cable but when I tried the TOUCH I got 'permission denied'. What now?

I still can't read a Trio Stealth G2 and Emerson (4.04 and 4.1.1 respectively) with ADB. Perhaps an OTG cable will help.

I want to root all three of these and hope to get them all up to KitKat.
"Cogito, ergo es. I think, therefore you is." [i]Ray D. Tutto (King of the Moon) to Baron Munschaussen[/i]

User avatar
n0ukf
Posts: 129
Joined: Tue 14 Feb 2012, 21:53

#40 Post by n0ukf »

I have now tried an OTG cable and neither tablet did anything different. I then got a "factory cable" and tried. At least this time the tablets indicate "USB debugging connected, but "adb devices" still shows nothing for these two tablets and trying touch or ls gives a device not found.

Trying the OTG and factory cables on the phone gives the debugging connection like the regular USB cable but push still gives me permission denied like with the regular USB cable.

How do I get past this permission denied on the phone and the lack of any kind of response in ADB from the tablets?
"Cogito, ergo es. I think, therefore you is." [i]Ray D. Tutto (King of the Moon) to Baron Munschaussen[/i]

User avatar
don570
Posts: 5528
Joined: Wed 10 Mar 2010, 19:58
Location: Ontario

#41 Post by don570 »

Code: Select all

adb push su /system/xbin 
All I can suggest is put a 'su' after push command

______________________________

JustGreg
Posts: 782
Joined: Tue 24 May 2005, 10:55
Location: Connecticut USA

#42 Post by JustGreg »

Thank you, don570 for providing the information in this post. I have two android tables that I have been using for experiments. Both have already been rooted by another method. But, I have not had much luck in getting adb to work. It is working now for me. Both tablets have android version 4.2.2 version on them. Here is some additional information for everyone's use.

Both tablets required these steps to get the developer option to work. First with the settings application under the "About Tablet" menu entry, one has to "tap" the "Build Number" seven (7) times to get the developer permission so the "Developer Options" menu entry to be shown. Once the "Developer Options" menu entry is available, then one has to turn them on by moving the unlabeled switch (upper left corner) to the left so it has a green bar shown. Once that is done, all the developer options are available for use.

The first tablet is a Lenovo Model B6000F. I found once I used the adb you listed, my previous problems disappeared. The Lenovo did not require a special cable. It connected with its normal charging cable, a micro USB to a normal male USB connector. Using the information on adb including its internal help discription, I was able to access and manipulate the tablet's files.

The second tablet is an inexpensive NextBook model NX785OCBG sold by Walmart. I got it to use it as an Internet radio. I could not connect adb to it using the usb interface. I tried several different cable configurations using a standard charging cable or OTG cable. It would not connect. I do know the USB port is a OTG type. I did find the reason, the tablet does not correctly identify itself to adb. The vendor usb ID (2922) is not listed in the available vendor databases. I managed to connect it using a wifi IP connection. Because the tablet is already rooted, I was able to use the android application ADB Wireless Port by Lu Chao to set up the tablet to connect to adb via wifi. It did work. There are many other andriod adb wireless applications available that claim to be able to do this without root privileges. I have not tested them because Lu Chao application worked so well for me. It is very simple to use. This does solve the cable problem. In a terminal window, one uses the command adb connect ###.###.###.### to make the connection to the adb deamon. So far, it appears all adb operations can be done.

I an using Fatdog64 700 beta 1 to do this. I hope this helps.
Enjoy life, Just Greg
Live Well, Laugh Often, Love Much

JustGreg
Posts: 782
Joined: Tue 24 May 2005, 10:55
Location: Connecticut USA

#43 Post by JustGreg »

I solved the problem of my Nextbook not connecting to adb via USB. When adb is first run, it creates a hidden directory (.android) in the root directory. The .android directory contains the keys to connect with Android version 4.2 or newer. After some web research, I found adb also needs another file, adb_usb.ini in this directory.

The file adb_usb.ini contains the vendors' usb ID value. I created it with Geany (or another text editor), provided the needed hex values. The Nextbook now connects using USB with the standard charging cable to adb for adb operations.

Here is the contents of my adb_usb.ini file:

Code: Select all

# ANDROID USB VENDOR ID LIST.
# 1 USB VENDOR ID PER LINE.
# Nextbook value
0x2922
# Lenovo
0x17EF
Enjoy life, Just Greg
Live Well, Laugh Often, Love Much

User avatar
L18L
Posts: 3479
Joined: Sat 19 Jun 2010, 18:56
Location: www.eussenheim.de/

#44 Post by L18L »

JustGreg wrote:The file adb_usb.ini contains the vendors' usb ID value. I created it with Geany (or another text editor), provided the needed hex values.
Here is how to find easily this vendors' usb ID value:
compare the output of

Code: Select all

lsusb
- cable connected and
- not connected
and you will find the actual needed ID

my 0.02 $

Thank you, Don, for this useful thread.

JustGreg
Posts: 782
Joined: Tue 24 May 2005, 10:55
Location: Connecticut USA

#45 Post by JustGreg »

Thanks L18L for the information. That is what I did, I forgot to mention it.
Enjoy life, Just Greg
Live Well, Laugh Often, Love Much

Post Reply