Puppy Linux Discussion Forum Forum Index Puppy Linux Discussion Forum
Puppy HOME page : puppylinux.com
"THE" alternative forum : puppylinux.info
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

The time now is Mon 22 Sep 2014, 08:20
All times are UTC - 4
 Forum index » House Training » HOWTO ( Solutions )
How to root Android device using ADB
Moderators: Flash, Ian, JohnMurga
Post_new_topic   Reply_to_topic View_previous_topic :: View_next_topic
Page 1 of 3 Posts_count   Goto page: 1, 2, 3 Next
Author Message
don570


Joined: 10 Mar 2010
Posts: 3289
Location: Ontario

PostPosted: Mon 10 Sep 2012, 16:23    Post_subject:  How to root Android device using ADB  

How to root Android device using ADB

adb must be installed. Put in an executable path...

https://docs.google.com/file/d/0B-PSbqQESZw9WXlhWHg5N2xLU2M/edit

[EDIT] Apparently Java doesn't have to be installed
in your Puppy computer.... but here it is -->
The easy way is with a SFS file.
jdk-1.6u34-i586.sfs (93.73 MB)
I got mine from THIS SITE

but shinobar has a version available as well
http://www.murga-linux.com/puppy/viewtopic.php?t=61287

______________________________________________

Quote:
ADB: ADB stands for Android Debug Bridge,
and it's a command line tool for your computer that
can communicate with an Android device you've connected
to it. It's part of the Android Software Developers Kit (SDK).


Cheap Chinese-made android devices are being sold in
North America 'rootless' i.e. the user is limited
in seeing and manipulating files. The user must be a superuser
to do advanced file manipulation.

Wikipedia wrote:
Rooting is a process allowing users of smartphones,
tablets, and other devices running the Android operating system to attain
privileged control (known as "root access") within Android's subsystem.


Puppy Linux is a good choice to make the Android device 'rooted'

I'll explain how I did it and some other tips I've learned recently.

The latest 'adb' application is available here. Make sure that
it is executable and placed in an executable path such as /usr/bin/

https://docs.google.com/file/d/0B-PSbqQESZw9WXlhWHg5N2xLU2M/edit

An explanation of 'adb' is here for reference
http://developer.android.com/tools/help/adb.html

Assume that Puppy computer is running and that user
will type commands into a terminal running in Puppy linux
i.e. Puppy is the 'host'



Synchronize your Puppy computer and Android device using
a special USB cable, (an ordinary cable doesn't work apparently).

Here's how to make your own sync cable

Just plug it in. Very simple Laughing


I click on bottom right of Android screen and a popup window
says that debugging is 'connected'. This means that sync cable is recognized and working!! (see picture below)
I am using Android 4.0.4 by the way.




___________________________________________________________


adb allows some simple commands to be executed at the terminal.

adb runs a shell that is similar to bash ---->
With adb installed, launch your terminal and type

Code:
adb shell ls /system/bin


This lists the applications that your android device has installed
inside of it. These are available to you now. Some of
these apps such as rmdir rm touch ls mkdir
should be familiar to you.


Here's how to find what is mounted to your Android device.
Code:
adb shell ls /mnt


Notice that 'sdcard' is mounted. This is where you put ordinary
data normally.

As practice lesson try creating an ordinary file in your Android device

Puppy Linux is acting as 'Host'


Code:
adb shell touch /mnt/sdcard/temp_destroy1


Do a check in your device and you will see that a file has been created!!
and you did it from Puppy!!

'push' and 'pull' of a file is possible. It's equivalent to copying a file.
Here's how....Using Rox filer create a file named temp_destroy2 in /root
Now copy it with the command...

Code:
adb push /root/temp_destroy2 /mnt/sdcard/temp_destroy3


This command copies a file in /root of my puppy computer
to the sdcard of my Android device

Again check to see if the copy has occurred.

______________________________________________


Now you will root your Android device , assuming that
it's not currently.

The software is available HERE

Instructions:

1) open the downloaded archive and place 3 files
Superuser.apk , busybox and su in /root

2) launch terminal

3) type in terminal the following lines....
Code:

adb push Superuser.apk /system/app
adb push busybox /system/xbin
adb push su /system/xbin
adb shell chmod 664 /system/app/Superuser.apk
adb shell chmod 664 /system/xbin/busybox
adb shell chmod 664 /system/xbin/su
adb shell reboot


The final line will reboot your android device only(about 20 seconds)
Your Puppy computer doesn't reboot.

Your Android device will now have an application icon to launch in
superuser mode. This is called 'Rooting the Android device'

____________________________________________________


Here's another tip:

Getting the evb.bin file ..... Got this from Barry Kauler Blog
http://bkhome.org/blog/?viewDetailed=02823

You can extract your device's script.bin while Android is running like this:
Code:

adb shell mkdir /mnt/nanda

adb shell mount -t vfat /dev/block/nanda /mnt/nanda

adb pull /mnt/nanda/script.bin evb.bin


A file called evb.bin will now be seen in /root
script.bin is sort of a hardware config file for Allwinner A10 devices, it sets
things like default output device, screen size, memory info, etc.

_____________________________________________

Edited_times_total
Back to top
View user's profile Send_private_message 
don570


Joined: 10 Mar 2010
Posts: 3289
Location: Ontario

PostPosted: Mon 10 Sep 2012, 18:08    Post_subject:  

Warning !! Changing the name or deleting of files in your
Android device could turn it into a 'Brick'

That could be one of the reasons why the Chinese manufacturers are
selling the devices 'rootless'

_______________________________________________
Back to top
View user's profile Send_private_message 
don570


Joined: 10 Mar 2010
Posts: 3289
Location: Ontario

PostPosted: Tue 11 Sep 2012, 12:06    Post_subject:  

Forgot to mention that Java must be
installed in puppy operating system.

Best way is to load a SFS file

jdk-1.6u34-i586.sfs (93.73 MB)

http://www.murga-linux.com/puppy/viewtopic.php?t=62939

________________________________________
Back to top
View user's profile Send_private_message 
Jejy69


Joined: 20 Jan 2011
Posts: 707
Location: Perpignan

PostPosted: Tue 11 Sep 2012, 12:17    Post_subject:  

Already rooted, HTC Wildfire S with CM9 rom. Razz

Nice tuto Very Happy
Back to top
View user's profile Send_private_message 
don570


Joined: 10 Mar 2010
Posts: 3289
Location: Ontario

PostPosted: Wed 12 Sep 2012, 20:22    Post_subject:  

Turorial: Take screenshot of Android device screen

http://murga-linux.com/puppy/viewtopic.php?p=652077#652077

_______________________________________
Back to top
View user's profile Send_private_message 
michaellowe


Joined: 17 Dec 2011
Posts: 13
Location: The Garden

PostPosted: Mon 24 Sep 2012, 19:41    Post_subject: adb error: device not found  

HI there I am extremely interested in this topic but I am having problems.
I have tried adb with both jdk7 and jre1.6u35 loaded as sfs separately in Puppy 5.2.5 but to no avail. I am convinced it's not my computer or Puppy that is the problem but rather my cheap chinese android tablet.
Tried typing adb shell ls /system/bin and
adb ls /mnt/sdb(can't remember if this second command is right, but when i typed it I did it right as I was following this tut)
I keep getting error: device not found

I have usb debugging selected in my settings on android device and
I can even mount these 2 directories which Pmount seems to name them as: Linux File-CD Gadget - SDC vfat 1.8G and Linux File-CD Gadget SDD vfat 2.3G I know they are on my android device as I recognised the folders once I mounted these 2 above, however still cant get into the devices system via adb? You mentioned something in your tutorial about the cable? I didn't quite get what you meant:

Synchronize your Puppy computer and Android device using
a special USB cable, (an ordinary cable doesn't work apparently).

Here's how to make your own sync cable:
http://tech2.in.com/how-to/accessories/how-to-make-your-own-usb-otg-cable-for-an-android-smartphone/319982


I visited the above link and it just shows you how to make an OTG?
how will an OTG(which I already have) help me connect my tablet to my desktop? I have never come across a Usb to Usb cable which is the only cable that would work with an OTG. If you have please direct me to the nearest outlet? The only thing I have ever used the OTG for is to use external keyboards and mouse etc. with tablet. I would really like to be able to get this working as android operating system on the tablet is usless due to very small amount of both system mem and RAM so I want to root it so I can replace the OS with puppy or saluki or whatever linux OS is suitable for this tablet:
It's called the Superpocket [i]i[i]7 and its model number is P752SD running Android 2.3.3
Baseband version: unknown
Kernel version: 2.6.35.7-infotm
Build number:
m799erb-eng v2.8 eng.infotm.20120410

Any ideas?? help Sad[/url]

PS. I just connect tablet using a regular mini usb to usb cable like you would with an android phone, my android phone in particular has a micro usb but you know what I mean.
adb error device not found.jpg
Description  screenshot of adb shell in terminal
jpg

 Download 
Filename  adb error device not found.jpg 
Filesize  173.95 KB 
Downloaded  546 Time(s) 
Back to top
View user's profile Send_private_message 
don570


Joined: 10 Mar 2010
Posts: 3289
Location: Ontario

PostPosted: Sat 13 Oct 2012, 14:01    Post_subject:  

There is two ways to synchronize

1) a special micro USB cable ( which is how I did it with included cable)
2) WIFI (explained HERE)


I was fortunate to have the included cable . If a store sells the cable
it will label it a 'sync cable'

Once you have the cable or WIFI connection working correctly
the process is automatic and very simple as I mentioned in
my first post.

Shinobar has a small clock program to check
if JAVA is installed correctly
http://www.murga-linux.com/puppy/viewtopic.php?t=61190


The android operating system shows a message if the
operating system is in the debugging mode.



____________________________________________________
Back to top
View user's profile Send_private_message 
don570


Joined: 10 Mar 2010
Posts: 3289
Location: Ontario

PostPosted: Sat 13 Oct 2012, 14:42    Post_subject:  

Connecting using wifi is apparently difficult unless your
device is rooted first


Once you have successfully rooted your android device , there is an
app that quickly allows connection using wifi using
a GUI.... called 'adbWireless'

http://www.androidcentral.com/android-quick-app-adb-wireless

________________________________________________
Back to top
View user's profile Send_private_message 
don570


Joined: 10 Mar 2010
Posts: 3289
Location: Ontario

PostPosted: Tue 16 Oct 2012, 16:36    Post_subject:  

To check if java is working --->

Download shinobar's clock3.tar.gz and decompress
and make the jar application executable
http://www.murga-linux.com/puppy/viewtopic.php?mode=attach&id=33755

Type in terminal

Code:

java -jar  /path/to/clock3.jar



______________
Back to top
View user's profile Send_private_message 
don570


Joined: 10 Mar 2010
Posts: 3289
Location: Ontario

PostPosted: Mon 22 Oct 2012, 20:01    Post_subject:  

I was testing my wireless when I must have damaged some
system file.

When I booted up the tablet I got screen that SDcard wasn't
accessible.

I was able to avoid having to reset the tablet by going through
the instructions on this page to root the device.

To my amazement All my data was still there on the SDcard.
I just had to re-install a few favorite apps like Layer paint
Color Notes and Adobe Reader.

I also discovered a way to backup the data on your sdcard --->

Make a folder to store your backup in a partition that has the free space.
I named it 'Backup_Android'
Code:


mkdir -p /mnt/sdb4/Backup_Android
adb pull /mnt/sdcard/  /mnt/sdb4/Backup_Android



Warning! This is slow because the SD card is slow memory.
Be patient.

__________________________________________
Back to top
View user's profile Send_private_message 
Plume

Joined: 12 May 2008
Posts: 34

PostPosted: Sun 11 Nov 2012, 15:39    Post_subject:  

I've got the same "error: device not found" message as michaellowe.
I'm using a standard USB cable but with it, adb succeed to find my device when I'm running Windows XP. So maybe it's not a hardware problem.
Anyway, adb fails to root my phone because it complaints that the filesystem is mounted read-only.
Any idea about this?
Back to top
View user's profile Send_private_message 
don570


Joined: 10 Mar 2010
Posts: 3289
Location: Ontario

PostPosted: Mon 12 Nov 2012, 12:53    Post_subject:  

Plume wrote:
I've got the same "error: device not found" message as michaellowe.


This is a common error. I got it too the first time I attempted to root.
The solution is to get the application 'ADB' to be running.
Because 'ADB' is an application it must be placed in an executable
path which is why I suggest dragging it into /usr/bin/

Java or the Java Development Kit (JDK) must be installed and running
as well.

_________________________________________
Back to top
View user's profile Send_private_message 
Plume

Joined: 12 May 2008
Posts: 34

PostPosted: Mon 12 Nov 2012, 13:40    Post_subject:  

Thank's don570 for your answer.

I've done:
Code:
chmod +x adb
and I launch it by:
Code:
./abd
.

I've downloaded clock3 and
Code:
java -jar clock3.jar
give a colorfull clock so Java is installed. But I don't know what you mean by Java must be running.

If I type:
Code:
./adb devices
I get
Code:
* daemon not running. starting it now on port 5037 *
* daemon started successfully *
List of devices attached

with an empty device list.

If I type:
Code:
./adb shell
I get
Code:
error: device not found
Back to top
View user's profile Send_private_message 
gcmartin

Joined: 14 Oct 2005
Posts: 4276
Location: Earth

PostPosted: Mon 12 Nov 2012, 13:49    Post_subject: Android Apps-tools for LAN use with Puppy PC Utility  

Hi @Don570.

This is a tremendous thread as so many of us will be using Android by 2013. And, to be able to put our PUPs to assist us in corralling the sheep is one major step for us in Puppyland.

This may help. I recently found an Android App called FOXFI. It is the easiest to turn an Android into a WiFi Internet router for other PCs that are in its area.

Secondly, I seem to remember an App that allows an Android to be a "file-folder server" (same as Windows/Macs PCs or Linux distros with SAMBA). With a file-folder app that integrates with the LAN devices, it makes it easy to move information around.

If either of these two tools make life any easier in all of the things you're trying to address here, run with it to get us where we need to be.

Again, this is a tremendous step for all of us in Puppyland. Thanks
Here to help

_________________
Get ACTIVE Create Circles; Do those good things which benefit people's needs!
We are all related ... Its time to show that we know this!
3 Different Puppy Search Engine or use DogPile
Back to top
View user's profile Send_private_message 
gcmartin

Joined: 14 Oct 2005
Posts: 4276
Location: Earth

PostPosted: Mon 12 Nov 2012, 13:57    Post_subject:  

Hi @Plume
Plume wrote:
... I've downloaded clock3 and
Code:
java -jar clock3.jar
give a colorfull clock so Java is installed. But I don't know what you mean by Java must be running. ...
JAVA is a Linux subsystem. It doesn't do anything, per se. Thus, it is there so that any application that needs it has it "at its fingertips", so to speak.

The "Clock" test you ran ask your LInux to run a "jar" program for you. It did and produced the results you saw on your screen. If JAVA was not present, the result you saw would not have appear and you would have gotten errors to that terminal command.

JAVA is a great ingrediant because it allows an application developed for one platform to run on other platforms. For example an app for Windows will run on Macs which include JAVA OOTB. And, for most/many top 10 Linux, JAVA is an included subsystem.

here to help

_________________
Get ACTIVE Create Circles; Do those good things which benefit people's needs!
We are all related ... Its time to show that we know this!
3 Different Puppy Search Engine or use DogPile
Back to top
View user's profile Send_private_message 
Display_posts:   Sort by:   
Page 1 of 3 Posts_count   Goto page: 1, 2, 3 Next
Post_new_topic   Reply_to_topic View_previous_topic :: View_next_topic
 Forum index » House Training » HOWTO ( Solutions )
Jump to:  

Rules_post_cannot
Rules_reply_cannot
Rules_edit_cannot
Rules_delete_cannot
Rules_vote_cannot
You cannot attach files in this forum
You can download files in this forum


Powered by phpBB © 2001, 2005 phpBB Group
[ Time: 0.1153s ][ Queries: 13 (0.0057s) ][ GZIP on ]