adb command - Nexus One Q&A, Help & Troubleshooting

I have been tryng to set up adb for my N1. I have all the files downloaded and have gone as far as to see if the computer recognizes my phone. I go into device manager and the phone and files are there but when I go to the next step to see if the computer recognizes the phone, I type in certain commands I got from XDA and I got all the way till the last command before the computer pushes out the id #'s to my phone, I type "adb devices" and I get this response "adb is not recognized as a internal or external command, operable program or batch file".
I have studied these commands and I know I have typed in the right ones, I want to learn this process and unlock my bootloader and other things.
any help would be welcomed.
Thank You

Open a terminal in the folder where you have ADB file at.
IE
I have the sdk from froyo still so i navigate my way to the android-sdk-windows folder, go into the tools folder, SHIFT right click and click on open command prompt window here.

Download this, place in the same folder as your adb on the pc, and double click...
http://db.tt/aVW40cy
Sent from my Nexus One using XDA App

danger-rat said:
Download this, place in the same folder as your adb on the pc, and double click...
http://db.tt/aVW40cy
Sent from my Nexus One using XDA App
Click to expand...
Click to collapse
I dl file and opened the command prompt, worked fine but still having problem with finding my device, I noticed the adb file was hazed out and it said under it that it had moved, wonder if this is my problem??? I know I'm very close but just getting frustrated. I think I need to reinstall the adb file, I think??????

the problem is that the froyo sdk and the gingerbread sdk have different directory structures. Make sure you are in the right directory. Be it tools or platform-tools. In order to run adb (or fasboot) you need to be in the same directory as the executable (unless you've added the directories to the windows path).
Sent from my Nexus One

efrant said:
the problem is that the froyo sdk and the gingerbread sdk have different directory structures. Make sure you are in the right directory. Be it tools or platform-tools. In order to run adb (or fasboot) you need to be in the same directory as the executable (unless you've added the directories to the windows path).
Sent from my Nexus One
Click to expand...
Click to collapse
I am running gingerbread, I was in the tools folder, what folder should I be in?

If you get stuck, just take a look at this thread. It places all the files you need in one location. Much easier than the sdk...
http://www.nexusoneforum.net/forum/...mple-sdk-setup-manual-root-guide-windows.html
Sent from my Nexus One using XDA App

vinnyjr said:
I am running gingerbread, I was in the tools folder, what folder should I be in?
Click to expand...
Click to collapse
With the Gingerbread SDK, you should be in /platform-tools.

Related

How to get DDMS working?

I am trying to get DDMS working so I can send cmd line code to my phone via the desktop pc. I installed Eclipse IDE and added Android SDK. Someone in another thread said you get a DDMS tab with an icon. I dont see this. I also tried running the DDMS.bat in the "Tools" folder in SDK dir and get this message.
'java' is not recognized as an internal or external command,
operable program or batch file.
SWT folder '' does not exist.
Please set ANDROID_SWT to point to the folder containing swt.jar for your platfo
rm.
androidmonkey said:
I am trying to get DDMS working so I can send cmd line code to my phone via the desktop pc. I installed Eclipse IDE and added Android SDK. Someone in another thread said you get a DDMS tab with an icon. I dont see this. I also tried running the DDMS.bat in the "Tools" folder in SDK dir and get this message.
'java' is not recognized as an internal or external command,
operable program or batch file.
SWT folder '' does not exist.
Please set ANDROID_SWT to point to the folder containing swt.jar for your platfo
rm.
Click to expand...
Click to collapse
well for starters, do you have either the java idk or ire (forget which one you need)
but once you have java installed then just open up command prompt and then
1. if you already have the folder where you're tools are located set up in Environment Variables you can just type ddms
2. otherwise cd to the folder where ddms is located and then once you're there, type ddms
xidominicanoix said:
well for starters, do you have either the java idk or ire (forget which one you need)
but once you have java installed then just open up command prompt and then
1. if you already have the folder where you're tools are located set up in Environment Variables you can just type ddms
2. otherwise cd to the folder where ddms is located and then once you're there, type ddms
Click to expand...
Click to collapse
Thanks, my Environment Variables wasnt setup. Any ideas why the install didnt do this? Weird...
androidmonkey said:
Thanks, my Environment Variables wasnt setup. Any ideas why the install didnt do this? Weird...
Click to expand...
Click to collapse
the install never did this afaik ... does ddms work now though?
xidominicanoix said:
the install never did this afaik ... does ddms work now though?
Click to expand...
Click to collapse
ddms loads just fine now but my phone doesnt show up. My phone is connected with "USB debugging connected" enabled.
Any ideas?
did you mount your sd card?
Got it working, the windows driver wasnt installed.
I didnt realize I just needed to use the cmd line to install Navigation, not ddms. Thanks for the help
all you need is the command line to run ddms. Just put it where you have adb, go there via command line, and type"
ddms
Tada. eidt: it's not perfect, but it's mostly there.
Cannot mount SD card in terminal / console
delete ......

nexus one system png files

hi, i just tried to open a nexus one image to extract all the png files, but failed. does anyone know how or where to get all these files, like banners, battery meters etc.?
thanks in advance!
They are in /system/framework/framework-res.apk. If you adb pull that file onto your PC you should be able to unzip it to get the pngs.
alright, thanks. i'll try this at home - i just dl adb but dont know how to use it. when i doubleclick adb.exe the windows opens and shuts very quickly, probably because i dont have admin rights here.
Alternatively, you could install a file manager like Astro that lets you browse the system folders and just email it to yourself from there. I've done that with a few of the files just because it's convenient and I don't have to dig out the USB cable.
woelv said:
alright, thanks. i'll try this at home - i just dl adb but dont know how to use it. when i doubleclick adb.exe the windows opens and shuts very quickly, probably because i dont have admin rights here.
Click to expand...
Click to collapse
adb is a command line app. Anyway Mike's suggestion of using Astro is an easier way.
my problem is the adb window wont stay open, so i have no chance to write a command line. i need all the files for themeing, so Astro seems inappropriate to me.
The Astro method should work. If you browse to /system/framework with it you should see the framework-res.apk. Long press on it and tap send. It should attach it to a new email which you can send to yourself. You can then unzip it with a program like 7-zip.
This will be easier than using adb as you will need to install the adb usb drivers, connect the phone to your PC and use a DOS prompt.
go start menu for xp and click run and type CMD and you'll get your command line. vista or 7 go to start and right above it type CMD. theres a little more to but that will get you your command line
woelv said:
my problem is the adb window wont stay open, so i have no chance to write a command line. i need all the files for themeing, so Astro seems inappropriate to me.
Click to expand...
Click to collapse
So run it like every other command line app. From the command line. (terminal, console, cmd, etc...)
craz6r said:
go start menu for xp and click run and type CMD and you'll get your command line. vista or 7 go to start and right above it type CMD. theres a little more to but that will get you your command line
Click to expand...
Click to collapse
Clarkster said:
So run it like every other command line app. From the command line. (terminal, console, cmd, etc...)
Click to expand...
Click to collapse
So I am pretty sure if the OP hasn't figured this out over six months later, they have either given up, or figured it out.
Good job bringing things back from the dead.

How to push files via adb?

Can someone please point me to a place that explains how to push files via adb? I have Android SDK installed and I know how to do a screen shot using Dalvik Debug Monitor using the ddms.bat file. But other than that, I don't know what I am doing. lol Also, I am not rooted.
I know it can't be that difficult, any help is appreciated! Thanks!
Holy crap, apparently I pushed a new bootanimation via adb and really had no idea what I was doing. lol
So I guess my question is different now.
First, I put the bootanimation.zip file in the platform-tools folder.
Then I launched a CMD prompt and then I went into my Android/Android-SDK\platform-tools\
then I typed in "adb push bootanimation.zip /data/local" and I wasn't even sure it did anything.
So my question now is what made it push the bootanimation file to my xoom? Did it have something to do with the file being in the platform-tools folder, along with the adb.exe file?
I don't really get the question... It pushed the file to the Xoom because you told it to. A better question might be why it did not push the file during your previous attempts, but I cannot answer that without knowing what you tried. Anyways, I just wanted to chime in that since you are already familiar with DDMS, right under the screenshot option is a file explorer that you can use to push files.
edit: actually, I think it may not be possible to push to subfolders in /data using ddms since it cannot see them
sangreal06 said:
I don't really get the question... It pushed the file to the Xoom because you told it to. A better question might be why it did not push the file during your previous attempts, but I cannot answer that without knowing what you tried. Anyways, I just wanted to chime in that since you are already familiar with DDMS, right under the screenshot option is a file explorer that you can use to push files.
edit: actually, I think it may not be possible to push to subfolders in /data using ddms since it cannot see them
Click to expand...
Click to collapse
Yea, I didn't do it in ddms because I did not see the local folder. I did it through the CMD prompt. But my question is how does it know where to push the files by just typing "adb push bootanimation.zip /data/local"? No where in that does it say push it to the xoom. When using adb, does it automatically try to push the file to whatever Android is plugged up? How does it know where and what to push it on? That was my question.
Best place I've found to start is http://developer.android.com/guide/developing/tools/adb.html which gives an overview along with some good details on some of the subcommands. Beyond that, use your favorite search engine.
To answer your question more directly, though, if only one Android device is connected, ADB can figure out how to talk with it. With two or more you'll need to specify the device (which you can get from "adb devices").
HTH
short/y said:
Best place I've found to start is http://developer.android.com/guide/developing/tools/adb.html which gives an overview along with some good details on some of the subcommands. Beyond that, use your favorite search engine.
To answer your question more directly, though, if only one Android device is connected, ADB can figure out how to talk with it. With two or more you'll need to specify the device (which you can get from "adb devices").
HTH
Click to expand...
Click to collapse
Ahh.. cool. I did google it to see what came up and learned a little but nothing ever explained how adb knew what or where to push the file.
But just knowing that it does know, then the rest is pretty easy to figure out. I can follow and type commands well... even though I might not know what they do (which is scary, huh?). lol
Edit: Thanks for the link also.
I got this from XDA somewhere so credit to them:
A:android-sdk-windows installed
B: (on your phone) go to menu>settings>applications>developement and make sure usb debugging is checked.
C: the file you are pushing must be placed in the tools folder of adb so if you are pushing file "build.prop.txt" this needs to be downloaded/copy and pasted in C:\android-sdk-windows\tools
1: go to run and type cmd (or just open your command prompt)
2: cd C:\android-sdk-windows\tools
3: adb remount
4: adb devices *if everything is set up right this should output a serial number*
5: adb push FFFFFFF.FFF /#####/###### *i hope my notes help here you need to put the file name in for the F(s) and in the pound signs you put the destination on the devices example adb push build.prop.txt /system/bin
6. repeat step 3 for multiple files
7. adb reboot this is how you finish

help setting up adb

im using windows 7 and cannot for the life of me figure out adb, i never used it on the hero, but with the optimus its the only option, i have the sdk installed, and all the device drivers. But when i try to do " adb devices" i get,
'adb' is not recognized as an internal or external command,
operable program or batch file.
i did edit the path, i think i did it correctly
%SystemRoot%\system32;%SystemRoot%;%SystemRoot%\System32\Wbem;%SYSTEMROOT%\System32\WindowsPowerShell\v1.0\;C:\Program Files (x86)\Common Files\Teleca Shared;C:\Program Files (x86)\QuickTime\QTSystem\;c:\android-sdk-windows\tools;c:\android-sdk-windows\platform-tools
thats what is is now.
will some one please helpppp mehhhh
and i know its not HTC but this community is the best ever so i thought id still ask here
jadenj5 said:
im using windows 7 and cannot for the life of me figure out adb, i never used it on the hero, but with the optimus its the only option, i have the sdk installed, and all the device drivers. But when i try to do " adb devices" i get,
'adb' is not recognized as an internal or external command,
operable program or batch file.
i did edit the path, i think i did it correctly
%SystemRoot%\system32;%SystemRoot%;%SystemRoot%\System32\Wbem;%SYSTEMROOT%\System32\WindowsPowerShell\v1.0\;C:\Program Files (x86)\Common Files\Teleca Shared;C:\Program Files (x86)\QuickTime\QTSystem\;c:\android-sdk-windows\tools;c:\android-sdk-windows\platform-tools
thats what is is now.
will some one please helpppp mehhhh
and i know its not HTC but this community is the best ever so i thought id still ask here
Click to expand...
Click to collapse
Try this:
cd C:\Program Files (x86)\android-sdk-windows\platform-tools
I have old adb so my path is different, but maybe that'll work? Otherwise someone using sdk rev10 needs to chime in...
Do I put that in the path thing? I'm new to all of this so sorry if I ask 5920274010 questions LOL
Sent from my LS670 using XDA App
jadenj5 said:
Do I put that in the path thing? I'm new to all of this so sorry if I ask 5920274010 questions LOL
Sent from my LS670 using XDA App
Click to expand...
Click to collapse
You just need to do a dir of c:\
locate your android-sdk_r10-windows directory. cd to it, then cd to android-sdk-windows, the cd to platform-tools. Do a dir and make sure adb is in that directory.
You can also use windows explorer to locate it or "search programs and files" for adb..
If you remember which directory sdk is installed in that would be where you'll have to look.. PM me if you need more help.

[Q]–can't transfer my nanodroid backup

I am trying to transfer my backup to my computer. But it only transfer 16mb instead of over 3giga of files.
Sent from my HTC One using XDA Premium HD app
I bet your computer can't see all files, browse the backup folder and check if all files are shown
Sent from my liquid glowing bomb shell
I can see all the file but it only trensfer like 3 file instead of the 15 files the folder
Sent from my HTC One using XDA Premium HD app
quite weird, what exactly happens when you try to copy?
Sent from my liquid glowing bomb shell
You use TWRP I guess? Latest version has this problem there is a version of 2.5.0.0 with updated touch drivers that will work, look in the TWRP thread
It has nothing to do with the touch drivers. It is a new security feature in 2.6+.
It is related to the permissions being allocated to the backup. It is supposed to be a TWRP 'security feature'... to stop someone from copying your backup from your phone.
If you download the attached zip and extract the command file inside to the folder on your pc containing ADB, if you connect your phone to your pc and double click on the command file, it will change the file permissions and allow you then to copy the backup folder to you pc.
When you run it, you will see two command prompt windows open. One closes immediately and you can close the second one manually. It only takes a second to run.
Easy.
oreitan13 said:
I am trying to transfer my backup to my computer. But it only transfer 16mb instead of over 3giga of files.
Click to expand...
Click to collapse
Hi,
It has happened to me (with my old laptop but I don't really know if it's the cause but since I have my new computer I've never had this problem again), try to reboot your phone and transfer your backup but before don't transfer any other files phone->computer or computer->phone, just your backup after the reboot.
viking37 said:
Hi,
It has happened to me (with my old laptop but I don't really know if it's the cause but since I have my new computer I've never had this problem again), try to reboot your phone and transfer your backup but before don't transfer any other files phone->computer or computer->phone, just your backup after the reboot.
Click to expand...
Click to collapse
See my post above
Whare I can find the folder with ADB
Sent from my HTC One using XDA Premium HD app
proctologist said:
It has nothing to do with the touch drivers. It is a new security feature in 2.6+.
It is related to the permissions being allocated to the backup. It is supposed to be a TWRP 'security feature'... to stop someone from copying your backup from your phone.
If you download the attached zip and extract the command file inside to the folder on your pc containing ADB, if you connect your phone to your pc and double click on the command file, it will change the file permissions and allow you then to copy the backup folder to you pc.
When you run it, you will see two command prompt windows open. One closes immediately and you can close the second one manually. It only takes a second to run.
Easy.
Click to expand...
Click to collapse
Thanks in works
Sent from my HTC One using XDA Premium HD app
oreitan13 said:
Whare I can find the folder with ADB
Sent from my HTC One using XDA Premium HD app
Click to expand...
Click to collapse
This means you don't have ADB, you need to install android sdk to get it
Sent from my liquid glowing bomb shell
proctologist said:
It has nothing to do with the touch drivers. It is a new security feature in 2.6+.
It is related to the permissions being allocated to the backup. It is supposed to be a TWRP 'security feature'... to stop someone from copying your backup from your phone.
If you download the attached zip and extract the command file inside to the folder on your pc containing ADB, if you connect your phone to your pc and double click on the command file, it will change the file permissions and allow you then to copy the backup folder to you pc.
When you run it, you will see two command prompt windows open. One closes immediately and you can close the second one manually. It only takes a second to run.
Easy.
Click to expand...
Click to collapse
Thanks for correcting my wrong. only revered to the touch driver because of maybe updated firmware. But It's not much of a feature when everyone can download the "key"
Manual Process
If you would like to do it manually do the following:
Open a command window in the Platform-Tools folder of the Android SDK and then type the following:
adb shell
su
chmod -R 777 /data/media/0/TWRP (note, if you are using 4.1 you will need to remove "/0")
exit
exit
This changes the permission so you can copy all of the data from the TWRP folder.
ineedone said:
Thanks for correcting my wrong. only revered to the touch driver because of maybe updated firmware. But It's not much of a feature when everyone can download the "key"
Click to expand...
Click to collapse
yeah, this "feature" is a pita and a waste of time

Categories

Resources