So I'm completely new to Android and ADB, I'm usually very good with computers, but I'm having trouble understanding this, LOL. So I'm trying to use the how to's fund on this site...
But when in the command promp I get this:
Microsoft Windows [Version 6.0.6002]
Copyright (c) 2006 Microsoft Corporation. All rights reserved.
C:\Users\Ray>cd C:\Android_stuff\android-sdk-windows\tools
C:\Android_stuff\android-sdk-windows\tools>adb devices
adb server is out of date. killing...
* daemon started successfully *
List of devices attached
HT05PHL06074 device
C:\Android_stuff\android-sdk-windows\tools>adb shell
$
Click to expand...
Click to collapse
Says I should get a #
My goal is to removing sprint bloatware as posted in another how to... Sorry for being a noob.
I don't have exact links to hand but goto the Development section and your questions can be answered trough reading the threads.
Don't post a thread asking tho. at least not in that section.
Exactly why I posted in here. I looked in that section and the Hero section. Doesn't say anything about getting a $ instead of #
I try to rm an apk and it says:
Microsoft Windows [Version 6.0.6002]
Copyright (c) 2006 Microsoft Corporation. All rights reserved.
C:\Users\Ray>cd C:\Android_stuff\android-sdk-windows\tools
C:\Android_stuff\android-sdk-windows\tools>adb devices
List of devices attached
HT05PHL06074 device
C:\Android_stuff\android-sdk-windows\tools>adb shell
$
Click to expand...
Click to collapse
Trying to remove the Sprint apk's...
But first I want to figure out how to Nandroid back up...
I think you can type "su" and it brings up the $
-------------------------------------
Sent via the XDA Tapatalk App
How do i get the adb shell? Where is it coming from, is it a windows installation? Sorry, cant seem to find much info on obtaining the adb.
Download the Google sdk and put it somewhere and then cd to it in cmd.
-------------------------------------
Sent via the XDA Tapatalk App
xbox4414 said:
So I'm completely new to Android and ADB, I'm usually very good with computers, but I'm having trouble understanding this, LOL. So I'm trying to use the how to's fund on this site...
But when in the command promp I get this:
Says I should get a #
My goal is to removing sprint bloatware as posted in another how to... Sorry for being a noob.
Click to expand...
Click to collapse
ah, you're in a shell. the # indicates root permissions, and the $ indicates that you are a user, with a prompt, but not root permissions
questions: are you doing this while android is running? or are you doing in recovery? and, have you rooted your phone?
ADB for Newbies.
Ok so, im going to use adb push as an example for this.
On a mac, to push adb i would use this:
cd /android-sdk-mac_86/tools (of course the android sdk depends on where you have your sdk saved)
./adb devices (to make sure your adb is running)
./adb push (your file) /data/local/
On windows, you would navigate to your android sdk, then do:
adb devices (to make sure your adb is running)
adb push (your file) /data/local/
I used the data/local/ for an example because that is how you adb a custom boot logo.
su brings up the superuser shell
Titanium Backup
What I used to remove Sprint Junk Apps
I use Titanium Backup, easiest way to get rid of it. Gives you an option to remove it. Must be rooted to use this app. Just a thought, in case adb is not your cup of tea. Though ADB isn't really hard to use either.
Related
I've spent hours trying to workout how to use adb
I'm using Amon_RA's recovery image and want to run a BART backup but it forces you to use adb, which i can't workout
help please!!!
Did you download the Android SDK for OS X?
Please give us some more information, such as the steps you've taken and any errors or other information you get from the Terminal.
yes i have downloaded the sdk from the website
but everytime i even check what devices are connected etc it fails
i open terminal, drag the tools folder into it, it then ses its created a directory
when i try to put in the commands "adb devices" or "bart" however, it ses there is no such command
do i need to put my phone into recovery, or mass storage or something
im stumped
You need to add the tools directory to PATH variable on your computer
Here's how you do it (the alternative way is easier):
Run this in Terminal
Code:
cd
nano .bash_profile
a text editor will open. add this:
Code:
export PATH=${PATH}:/path-to-android-sdk/tools
where you replace "path-to-android-sdk" with the real path.
Alternatively you could run this command in the terminal:
Code:
echo -e "\nexport PATH=${PATH}:/path-to-android-sdk/tools" >> .bash_profile
What you have done is to tell the shell to also look inside the tools directory when entering a command
Oh, in addition to Repp's suggestions, I know in Linux (and I dunno about everyone else) I need to be root to run adb properly. So maybe become root on the Mac. To do so, you need to be an Admin user, not a regular user, and at the Terminal, type
Code:
sudo -s
and then enter your user password when prompted.
okay ive done that, i dont know if it came back with the right response tho
i tried the first method and got into the text editor, i then typed what you said and it returned no response, i dont know if this is correct?
if so what do i do next?
Rather than altering your path, you can also navigate to the sdk/tools directory and run adb like so:
Code:
./adb devices
But you have to be inside the directory where the "adb" command lies.
Also, see my note above regarding root users.
Aah sorry. Just save and exit (press Ctrl+X and answer yes to whether or not you want to save). You could also try the alternative way.
craig0r said:
Oh, in addition to Repp's suggestions, I know in Linux (and I dunno about everyone else) I need to be root to run adb properly. So maybe become root on the Mac. To do so, you need to be an Admin user, not a regular user, and at the Terminal, type
Code:
sudo -s
and then enter your user password when prompted.
Click to expand...
Click to collapse
I have always used it as normal user and it has worked. Don't know why you would need to be root
how dyou get into the directory?
i usually just drag the tools folder into terminal.
is this correct?
DaNiEl FrEnCh said:
how dyou get into the directory?
i usually just drag the tools folder into terminal.
is this correct?
Click to expand...
Click to collapse
At the Terminal type
Code:
cd /Users/YourUserName/path/to/android_sdk/tools/
./adb devices
Repp said:
I have always used it as normal user and it has worked. Don't know why you would need to be root
Click to expand...
Click to collapse
Yeah, it's weird, but it works for me.
You change directory in the terminal with the command cd. So if I wanted to go to the Desktop directory I would write:
Code:
cd ~/Desktop
(~ is like a shortcut for your home directory which is the same as the directory /Users/your-username)
Did any of the methods work (they should )?
to repp, ive done that, all i need to know now is how to use the bart backup function from Amon_RA's recovery image, in adb
craig0r said:
Yeah, it's weird, but it works for me.
Click to expand...
Click to collapse
And it doesn't if you're not root?
DaNiEl FrEnCh said:
to repp, ive done that, all i need to know now is how to use the bart backup function from Amon_RA's recovery image, in adb
Click to expand...
Click to collapse
And it worked?
Unfortunately I have never done that so I can't help you there
how can i check if it worked?
Just run adb from any directory which is not the tools directory.
For example:
Code:
cd
adb devices
where the first line (cd) changes directory to your home directory (the command cd without a path does that) and the other one should list connected devices. As long as it doesn't say
Code:
-bash: adb: command not found
or anything like that, you should be fine
EDIT: If you want to use adb, you don't have to do the "cd" part first. This time only
its working now i can seee what devices i have
Code:
Dans-MacBook:tools Dan$ ./adb devices
* daemon not running. starting it now *
* daemon started successfully *
List of devices attached
HT98DL900002 device
but the main reason i want to use it, is to use it with Amon_RA's recovery
i neeed to do a BART backup so i can switch from the 2.1 rom from lox too 3.0 from modaco
I have never used BART, but unless I'm mistaken, it does almost the same thing as a nandroid backup (?). You could try that instead. Don't know about Amon_RA, but it's possible from MoDaCo's fastboot (linked to and explained how to install here)
other than that, there's nothing I can do
Repp said:
And it doesn't if you're not root?
Click to expand...
Click to collapse
That's right. Probably something to do with permissions in /dev/. It doesn't bother me enough to go hunting the problem down.
- on your PC open a shell again and do:
Click to expand...
Click to collapse
I have tried and tried to find a simple explanation of 'what is a shell?' and get more and more confused.
Is this ADB? What is ADB and where is all that code everyone says to type supposed to go? I have the sdk, I have eclipse...I have never found 'a shell'
Now...here is what I think I know...
- Is that DOS window you get from run>command line a shell?
- What is with some people running ADB from C: directory and others saying you have to get all the way to the sdk directory?
(BTW...at one point I went into command window and ran some adb kill command on a running app in my emulator...it worked...but I still have NO idea what I did.)
So...is there an "Extremely" simple explanation of what this is all about"?
---------
From a wiki I got this "COMMAND.COM – shell for various DOS versions including Windows 95-98-ME, also present in the operating systems of the Windows NT-2000 and XP substreams. MS-DOS Command.com is directly available when using OS/2 on a dual-boot configuration." which is why I attempted the above.
But if command.com is a shell why dont we say that...why all this shell business?
I know many of you are shaking your head...but lets assume I am like 70 and need you to teach me how to double click...lets go with that...
Shell is the command line, there are a few different programs that are run as command shells; bash (is the default one for most linux distros) and command.com (is the default for windows). If you use ADB Shell it basicly routes your phones bash shell through to your command line (be it windows or linux) You need to use a terminal emulator to access the shell on your phone directly (they can be found in the market)
ADB is the Android Debug Bridge it allows us to remotely access phones shell, push files to the phone, pull files from the phone, some other stuff to. It is part of the Android SDK and thus is bundled with it. I do belive HTC Sync might install it as well, however.
adb shell
'nuff said
midri said:
Shell is the command line, there are a few different programs that are run as command shells; bash (is the default one for most linux distros) and command.com (is the default for windows). If you use ADB Shell it basicly routes your phones bash shell through to your command line (be it windows or linux) You need to use a terminal emulator to access the shell on your phone directly (they can be found in the market)
ADB is the Android Debug Bridge it allows us to remotely access phones shell, push files to the phone, pull files from the phone, some other stuff to. It is part of the Android SDK and thus is bundled with it. I do belive HTC Sync might install it as well, however.
Click to expand...
Click to collapse
Ok...thanks for trying to clear it up.
Now..you run the command....adb shell...from command.com (in windows?) So are you actually setting up a shell inside a shell? Earlier I found a post that said...
- on your PC open a shell again and do:
adb shell
Click to expand...
Click to collapse
Now I tried that...I cd back to C:\ and typed in adb shell...and got an error about adb not being recognized internal/external command.
So...see...still so much newbies can't find...
SteelH said:
adb shell
'nuff said
Click to expand...
Click to collapse
uhm....see and that helps no one...ok well doesn't help me at all. If you asked me to explain the adenosine tri-phosphate cycle and I said...ATP baby...would that help at all?
I thought not.
sablesurfer said:
Now I tried that...I cd back to C:\ and typed in adb shell...and got an error about adb not being recognized internal/external command.
So...see...still so much newbies can't find...
Click to expand...
Click to collapse
because you either have to do it from the "android-sdk/tools" folder or add the path to the environment variables in the advanced system properties.
t3project said:
because you either have to do it from the "android-sdk/tools" folder or add the path to the environment variables in the advanced system properties.
Click to expand...
Click to collapse
Ah hah...ok. I recall just following the instructions on the error message that popped up and it had the whole path in there. (Had to reach back to my DOS (win3.1) days to do that in command window.)
Ok...so this is what I figured out from a video and your comment. Right click 'my computer'...'advanced' tab...'environment variables' button. Then find the 'Path' option in the system variables section and ADD...';C:\path\to\folder\android'
Once I have that then just from any old prompt it will find ADB? I can be at c:\> or c:\documents and Settings\sablesurfer>
Is that right?
Ok...all this research lead to next question about the shells...if you type adb shell....does that mean the phone must be connected to computer? I guess so now that I write that out...because you only use adb shell to interact with the phone in first place...right?
You need to add the /tools folder in the android ask folder to your path. i.e. c:\android-sdk\tools if that is where you extracted it. All the tools like adb.exe and fastboot.exe are in the tools did not the android-sdk folder.
frankenstein\ said:
You need to add the /tools folder in the android ask folder to your path. i.e. c:\android-sdk\tools if that is where you extracted it. All the tools like adb.exe and fastboot.exe are in the tools did not the android-sdk folder.
Click to expand...
Click to collapse
Ok, good to know!
Thanks everyone for being patient!
So found this reference to shell that is different from what I have seen so far...
"1 After switching to a root shell (# prompt), type mount and press Enter."
What is 'a root shell'? From little bit of research it seems you type sudo su to get to a root shell? Where are you typing that? On the pc or on the phone? In command.com on pc or ... in what on the phone?
Alright all,
I know there's another thread about "easier" method, but this is easiest for me. 3-Clicks after installation.
I was really tired of typing the same crap over and over after rebooting just to get my temproot back to do more testing/playing.
So I redeveloped this to be quicker/easier upon reboot. Mainly I altered the Term app to be have a scripted start-up on the 1st 3 launches.
I also updated the su/Superuser combo with ChainDD's latest stuff.
Here's how it works, after it's installed.
3ClickTempRooter said:
1) You run the terminal app once, wait a few seconds and it disappears.
2) You run the terminal again, wait for it to FC.
3) You run the terminal a final time and receive root.
Click to expand...
Click to collapse
Now on each reboot, it will be simply 3-clicks (running terminal app 3 times).
Finally ... any executable script placed in /data/local/tmp will be in the path of the new terminal mod. This makes running other scripts very easy.
Installation
Download the attached QuickTempRooter.zip and place it in a directory and unpack it.
Turn on USB debugging and install through adb ...
Here's the adb installation snippet ...
Code:
adb kill-server
adb push su /sdcard/su
adb push Superuser.apk /sdcard/Superuser.apk
adb push busybox /data/local/tmp/busybox
adb push rage /data/local/tmp/rage
adb push root /data/local/tmp/root
adb shell chmod 0755 /data/local/tmp/busybox
adb shell chmod 0755 /data/local/tmp/rage
adb shell chmod 0755 /data/local/tmp/root
adb shell 'pm uninstall com.android.term'
adb install Term.apk
Has made my life wayyy easier when playing with this phone while we wait for the real-deal!!!
Hope you enjoy!
NOTES
If you get a permission denied on the ''adb shell 'pm uninstall com.android.term' '' ... this is normal if you don't have a terminal already installed or have an alternate terminal app (using a namespace other than com.android.term.
If you have another Terminal App installed, you may want to uninstall it first, to avoid confusion.
Also, you may need to reboot after the initial installation for it to work properly!
ummmmm.....Enomther??
Did you get a G2 already?
Great to see you helping out with this
Great to see you here man! Trying this now can't wait to get themes rolling once we get permanent root!
Sent from my T-Mobile G2 using XDA App
I get a permission denied response when running "adb shell 'pm uninstall com.android.term'"
burton14e7 said:
I get a permission denied response when running "adb shell 'pm uninstall com.android.term'"
Click to expand...
Click to collapse
If you didn't already have a terminal app installed that error is normal. Also you may need to reboot once after the initial installation for it to work properly.
~enom~
Thank you sir. Appreciate the goodness.
damn i wish i could hit the thanks button
Thanks man good to have you on the G2 too
Sent from my T-Mobile G2
enomther said:
If you didn't already have a terminal app installed that error is normal. Also you may need to reboot once after the initial installation for it to work properly.
~enom~
Click to expand...
Click to collapse
good to see you on this side.... i have terminal app installed rebooted but still get this denied when running adb shell 'pm uninstall com.android.term
Edit: fixed it uninstalled the Android Terminal E,ulator and just ran the setup now have root thanks
Thank You..
Enom.. (sigh)
Welcome Home..
thank u so much now i can wireless tether. easiest root ever
Sorry, this is my first Android. I came from WM and I was pretty good with it.
I've searched XDA, Youtube, and web to ADB and SDK. I've downloaded it and it's installed. The only thing I don't get is when you said to
"Download the attached QuickTempRooter.zip and place it in a directory and unpack it."
You mean place the extracted files into the sd card correct? That's why the command is "adb push su /sdcard/su".
ddgarcia05 said:
Sorry, this is my first Android. I came from WM and I was pretty good with it.
I've searched XDA, Youtube, and web to ADB and SDK. I've downloaded it and it's installed. The only thing I don't get is when you said to
"Download the attached QuickTempRooter.zip and place it in a directory and unpack it."
You mean place the extracted files into the sd card correct? That's why the command is "adb push su /sdcard/su".
Click to expand...
Click to collapse
No, he means on your PC. You are running adb to push files contained in the zip to your phone.
HamNCheese said:
No, he means on your PC. You are running adb to push files contained in the zip to your phone.
Click to expand...
Click to collapse
So they go into the tools folder? Damn. I think I've in over my head here.
Like this?
If you have better terminal, you can also add the rage and root to specific keys.
At this command I'm getting told "failed to copy 'su' to '/sdcard/su': Read-only file system"
adb push su /sdcard/su
kevdawg said:
At this command I'm getting told "failed to copy 'su' to '/sdcard/su': Read-only file system"
adb push su /sdcard/su
Click to expand...
Click to collapse
Unplug then plug ur phone back in then try again also make sure u are in usb debug mode
Good work, Temp root in like 5 seconds
Quick question, ok I was able to get root for a few mins, then it went away I guess I have to have the terminal always open or ignore so my taskiller doesnt terminated it?
Don't use task killers. (IMHO)
But I tend to have to reboot every once in a while to keep root in tacked within terminal but all my apps seem to stay with su permissions until reboot (or sometimes 12 hours)
So, you'll have to bear with me because I've only had about 30 minutes worth of exposure with adb and all that goes along with it, but I'm having some trouble with a simple command. I'm trying to change the directory to /sbin/ but the command isn't working. It's keeps telling me "permission denied" Any ideas?
Just to give a liitle background information, I screwed up the partition in my phone and am trying to fix them via http://forum.cyanogenmod.com/topic/6...ernal-storage/ . My phone doesn't boot, but I can get in to recovery.
Thanks ahead of time.
This should be in the Q&A section....
Sent from my ADR6300 using XDA App
The link to the article doesn't work, so I can't see what it is that you're trying to do.
shell game
I believe with the use of adb shell you don't have to enter the adb push/pull whatever commands. Once you are in the shell, you are in the OS itself.
To quote the Talking Heads "Well, how did I get here?"
Once you type adb shell, you type su
Once su (superuser is what that stands for) is typed, the prompt should change from a $ to a #.
From that point, you are in the OS as the superuser, and can issue the commands w/out the adb prefix.
** more astute coders/adb users - please edit/correct/add input as needed **
This helped my understanding quite a bit - start @ the Removing Bloat section: http://www.jonamerica.com/technology/howto-root-the-htc-droid-incredible/
jermaine151 said:
The link to the article doesn't work, so I can't see what it is that you're trying to do.
Click to expand...
Click to collapse
http://forum.cyanogenmod.com/topic/6433-solved-messed-up-partitions-on-internal-storage/
smtom said:
I believe with the use of adb shell you don't have to enter the adb push/pull whatever commands. Once you are in the shell, you are in the OS itself.
To quote the Talking Heads "Well, how did I get here?"
Once you type adb shell, you type su
Once su (superuser is what that stands for) is typed, the prompt should change from a $ to a #.
From that point, you are in the OS as the superuser, and can issue the commands w/out the adb prefix.
** more astute coders/adb users - please edit/correct/add input as needed **
This helped my understanding quite a bit - start @ the Removing Bloat section: http://www.jonamerica.com/technology/howto-root-the-htc-droid-incredible/
Click to expand...
Click to collapse
Thanks! I appreciate any help I can get. I really would like to salvage my phone. I'm going to give it another go here shortly.
ADB is not friendly to me. I was able to root my g1 with pure ease. I cant get started with adb, I dont know why I cant get $, I've read several guides and I'm just about to give up. I'm running 2.2 on my g2.
I do have a couple of questions:
Are rooting with rage or visionary 14 the only way to root?
Are there any root guides out there that dont require ADB?
ADB is a ****ing pain in the ass to me, especially since I've tried everything and cant get it to work. Also, the drivers that go on Win7 64bit just dont work.
Also when I do have root, can I get android updates?
Any help would be thankfully appreciated. Sorry if I'm a pain in the ass, but I'd like to know if there is an easier way.
I think you need the q&a section
Sent from my HTC Vision using XDA App
This will help u get adb working...
http://forum.xda-developers.com/showthread.php?t=865685
If you can't figure out adb, you definitely shouldn't be rooting your phone.
Some ROMS disable OTA notifications while others allow it. However, so long as you have a custom recovery, even if you get the notification and download it, you wont be able to flash it.
dictionary said:
If you can't figure out adb, you definitely shouldn't be rooting your phone.
Some ROMS disable OTA notifications while others allow it. However, so long as you have a custom recovery, even if you get the notification and download it, you wont be able to flash it.
Click to expand...
Click to collapse
while my knowledge of adb isnt stellar, I have run into problems using it. I'm going to try this new link to the guide and see if it works.
Still if anyone knows other solutions, chime in.
Try the guide linked above. The drivers in the HTC Sync package (see the guide) definitely do work on Win 7 64-bit.
Clicked on SDK Manager.exe and it gave me the attached message; anti-virus is off and bare ass minimum services are running and I added the line in variables.
Any ideas?
sorry about the ****ty pics
cwis said:
Clicked on SDK Manager.exe and it gave me the attached message; anti-virus is off and bare ass minimum services are running and I added the line in variables.
Any ideas?
Click to expand...
Click to collapse
Did you definitely add it to your path as it is suggesting in that window ? If so, I think you may need to reboot to pick that change up.
I did that just in case.
Actually, that path field was empty. So, I added it as is.
look up droid explorer
I made some leeway:
C:\Program Files (x86)\android-sdk-windows\tools>adb shell
$
$ adb push su /sdcard/su
$ adb push su /sdcard/su
$ adb: permission denied
good grief!!!!!!!
I've completely removed visionary before starting this procedure. Did I need temproot before attempting this?
Downloading and installing Droid Explorer. Thanks!
Also, I'm using this guide: http://forum.xda-developers.com/showthread.php?t=834228
No matter what I've done, permission denied.
The steps you are trying are actually to get temproot (it's an alternate method to Visionary), so you don't need to already be temprooted.
You don't want to run "adb push" commands after you have run "adb shell". ADB commands will no longer work until you exit the shell (simply type exit and hit enter---you'll notice your command prompt will change back to normal). If you are following the guide you linked to, you'll notice adb shell is not run prior to running the first push command.
ianmcquinn said:
The steps you are trying are actually to get temproot (it's an alternate method to Visionary), so you don't need to already be temprooted.
You don't want to run "adb push" commands after you have run "adb shell". ADB commands will no longer work until you exit the shell (simply type exit and hit enter---you'll notice your command prompt will change back to normal). If you are following the guide you linked to, you'll notice adb shell is not run prior to running the first push command.
Click to expand...
Click to collapse
^^^^ what he said.
You are trying to run adb on your phone there, which isn't right. That's your phone's command prompt, the "$". "adb" is something totally different on your phone. You need to run the adb commands on your PC. That's why "adb shell" worked (because you ran it on your PC), then "adb push" didn't (because you tried to run it on your phone).
steviewevie said:
^^^^ what he said.
You are trying to run adb on your phone there, which isn't right. That's your phone's command prompt, the "$". "adb" is something totally different on your phone. You need to run the adb commands on your PC. That's why "adb shell" worked (because you ran it on your PC), then "adb push" didn't (because you tried to run it on your phone).
Click to expand...
Click to collapse
I did run the commands from my pc. But still permission denied.
cwis said:
I did run the commands from my pc. But still permission denied.
Click to expand...
Click to collapse
"permission denied" is a message from your phone, not your PC.
The $ prompt that you copied and pasted up shows that you were running the commands on your phone. As soon as you do "adb shell", then any commands you are entering after that are going on your phone, even though they're physically being typed on your PC - because your PC has started a command prompt on your phone, as shown by the $ prompt.
cwis said:
I did run the commands from my pc. But still permission denied.
Click to expand...
Click to collapse
Basically, don't start by typing adb shell. The instructions you are trying to follow don't even say to do that anywhere. I highly recommend you reread the instructions very carefully and follow them exactly. Rooting this phone is actually pretty simple if you just do exactly as the guide states. If you don't know what you are doing and mistype something in some of the later steps though, you can seriously screw up your phone...
I think part of the confusion is that the commands listed on the guide all have "$" at the beginning of them, probably because whoever wrote that was using a Linux PC or maybe a Mac. You are actually executing these commands from your Windows command shell so they will look more like:
D:\Android SDK\platform-tools>adb push su /sdcard/su
Click to expand...
Click to collapse
(depending on where you have the SDK installed)
instead of:
$ adb push su /sdcard/su
Click to expand...
Click to collapse
but of course you only need to type:
adb push su /sdcard/su
Click to expand...
Click to collapse
Again these are typed from your windows command shell.