[Solved] cant get adb on ubuntu 10.10 maverick - G1 Q&A, Help & Troubleshooting

Solved:
thanks to a good friend of mine he directed me to this file on GRP dev-site
http://greenromproject.com/showthread.php?269-ADB-The-Easier-Way
open this file in ubuntu software manager, let the package install and reboot system, then adb should work in any directory
Original Post:
ok guys i really didn't want to do this... i followed over 6 different guides now and am getting confused.. there too many methods and they all do not work.... i keep getting .../adb no such file or directory
i spent the last 2 days trying to set up adb on my 10.10 ubuntu, 64-bit system... i edited the bashrc file with the correct path, even typed it in myself because of known issues with ' " ' those things.. i also made the 71-android.rules file with about 3 different variations of this
SUBSYSTEM=="usb", ATTR{idVendor}=="0bb4", MODE="0666", GROUP="plugdev"
reboot the system, i ran adb kill-server and sudo adb start-server and im still getting message saying .../adb no such file or directory...
only thing i can think of to cause an issue is i updated the system, (not upgrade to 11.04) only update!! installed java jdk and all the needed parts for compiling roms... but just cant seem to get adb working
has anyone else had this type of issue or know how to solve it...? sdk version r12
please someone help
Click to expand...
Click to collapse

...
i keep getting .../adb no such file or directory
...
Click to expand...
Click to collapse
If you get this message, there is no need to look for autoconfig rules or something else, you need to check your path. Try to type
Code:
which adb
if adb cannot be found, you should do a
Code:
export PATH=$PATH:<path to your adb directory>
after that you should be fine for starting adb. If you would like to have it in your path permanently, you shoud add the line above to you .profile file in your home directory.

yeah i already did all that... added the correct path and everything... i tried all these diff methods and none worked, and none were even close to the same as far as what to add to bashrc and the rules.. but i got the issue solved thanks to a file i installed via update manager... rebooted system and adb worked fine

Related

ADB Help

Before anyone drops a "use the search function first", I hope you provide a link because I have scoured over 200 posts trying to find the answer to this question and its either not there, or EXTREMELY well hidden.
So...ADB worked fine for me on Windows 7 x64, untill I had to uninstall and reinstall some drivers when helping a buddy root his g1.
Now, ADB doesn't work. Whenever I try to run an adb command, even just to list devices, I get this error:
Code:
* daemon not running. starting it now *
CreateProcess failure, error 2
* failed to start daemon *
error: cannot connect to daemon
I have scoured Google, and I haven't found a single post that is android related (there are similair errors on android forums, just not this one) and am sorrily stumped. If anyone can help, I'd be ever so grateful.
This definitely sounds driver related although I'm not sure how you can "roll back" drivers in 7. I've heard that 7 pretty much keeps every driver you've ever used around and for whatever reason it's using an older ADB driver. I'd put money on me being wrong though.
if you are using a 1.5 image, use the drivers from the 1.5 SDK. If you are still on the RC builds, use the drivers in the 1.0 SDK.
win32 error code 2 means: 2 The system cannot find the file specified. ERROR_FILE_NOT_FOUND
and from the source code this is after a call to CreateProcess() and the file name is given by GetModuleFileName(), so it seems that the latter failed in a strange way.
What's the full path to your adb.exe?
billc.cn said:
win32 error code 2 means: 2 The system cannot find the file specified. ERROR_FILE_NOT_FOUND
and from the source code this is after a call to CreateProcess() and the file name is given by GetModuleFileName(), so it seems that the latter failed in a strange way.
What's the full path to your adb.exe?
Click to expand...
Click to collapse
D:\G1\android\tools\adb.exe
No spaces or odd characters. Like I said this worked fine for a month or so before I started ****ing with the drivers. I havent moved anything, my PATH and CLASSPATH are pointed correctly to the right directory. I also have a copy of adb in my /system32 directory (along with we .dll file it needs) so I can run it from wherever at a cmd prompt.
it might have something to do with wow64 messing the path up (it may rewrite system32 to syswow64). try launching the program under D:\G1\android\tools\ path. even if GetModuleFileName() failed, system should still be able to find adb.exe if you're under that path. also check file permissions and antivirus...
you can also try the command "adb fork-server server" in the path that contains adb. (you'll have to leave that console open)

Getting Nexus One ADB/USB Mount working (Driver)

Download This file and extract.
hit Windows Key + r
Type in devmgmt.msc
right click on nexus one
click update
update from location on computer.
select that folder.
---------------Notes-------------
Be sure to enable debugging on your phone via Settings>Applications>Devlopment>USB debugging.
Confirmed working on:
Win 7 Ultimate x64/x86
Win 7 Home Edition x86?
Win Vista
XP Home x86
XP Pro x64/x86
O.S
What O.S you had this working on?
@th3fallen
143!!
I got it working on win7 Ultimate version
This works for Windows 7 Home Premium Edition as well.
In order to get ADB working on Linux (Ubuntu 9.04) I had to edit /etc/udev/rules.d/51-android.rules (I may have created this file for the G1) and add:
Code:
SUBSYSTEM=="usb", SYSFS{idVendor}=="0bb4", MODE="0666"
What I was seeing was the device would sort of show up when I ran adb devices, but it would list ????????? as the ID and no permissions.
~Kenny
I was able to access it by using dream, magic and adb testing device didnt need any specific driver.
I did this to get it working on win 7 ultimate x64
NexVision said:
I was able to access it by using dream, magic and adb testing device didnt need any specific driver.
Click to expand...
Click to collapse
You need the latest refresh of the drivers (and tools for updated fastboot, etc.) from the SDK. If you go to a Windows command prompt and run Android, assuming the tools directory is in your path, you can select the update for both. It will fail in updating tools, since you are using an app in it, but don't close the app, just reapply at that point and it will work on the second go. Then when you install the N1, you will have the drivers you need to install as before.
Not meaning to argue with you but what I was saying is I have had no issues doing anything via adb with it as a magic I have done fastboot as well hey maybe its just working for me.
kfk2 said:
In order to get ADB working on Linux (Ubuntu 9.04) I had to edit /etc/udev/rules.d/51-android-rules (I may have created this file for the G1) and add:
Code:
SUBSYSTEM=="usb", SYSFS{idVendor}=="0bb4", MODE="0666"
What I was seeing was the device would sort of show up when I ran adb devices, but it would list ????????? as the ID and no permissions.
~Kenny
Click to expand...
Click to collapse
Hmm...I have that already in my /etc/udev/rules.d/51-android.rules (mine has .rules, not -rules...I'm assuming that's a typo in your post?) and I'm still coming up with ?????????? as the device and no permissions, all attempts to do anything with adb result in it telling me I don't have permission to do these things.
Swervo said:
Hmm...I have that already in my /etc/udev/rules.d/51-android.rules (mine has .rules, not -rules...I'm assuming that's a typo in your post?) and I'm still coming up with ?????????? as the device and no permissions, all attempts to do anything with adb result in it telling me I don't have permission to do these things.
Click to expand...
Click to collapse
Yah that was a typo.. The no permissions error appears to me that adb doesn't have access to the /dev/ devices used. I'm not at home so I cannot lookup what device is created and used in /dev/ for you to check the permissions. I know I killed the adb server and restarted it a few times while trying to get mine to work, along with updating to the latest sdk. So you may want to try those things, you could also try running adb as root and seeing if that fixes it (if so, then it's a simple permission error with udev not creating it with correct permissions).
Alrighty, I think I got it. I'm no udev expert (in fact, I'm rather useless at it), but this worked for me.
1) Make sure USB debugging is turned on on the phone.
2) Plug the phone into the USB port on the machine.
3) Make sure /etc/udev/51-android.rules has
SUBSYSTEM=="usb", SYSFS{idVendor}=="0bb4", MODE="0666"
Click to expand...
Click to collapse
in it.
4) run
adb kill-server
Click to expand...
Click to collapse
5) As root, run
service udev restart
Click to expand...
Click to collapse
6) run
adb start-server
Click to expand...
Click to collapse
Worked for me to get the device recognized.
Hey guys, I have the Android 1.5 SDK/ADB installed on my computer.. so I don't know what will happen when I mount my N1 (haven't tried yet). I want to be able to mount my N1 normally without ADB or anything, 'cause I'm not going to root it for a while. Thanks!
Confirmed on Vista
I can confirm that the instructions in the OP work on Vista. Thanks a lot, th3fallen.
Alleviate said:
Hey guys, I have the Android 1.5 SDK/ADB installed on my computer.. so I don't know what will happen when I mount my N1 (haven't tried yet). I want to be able to mount my N1 normally without ADB or anything, 'cause I'm not going to root it for a while. Thanks!
Click to expand...
Click to collapse
Nothing will happen, ADB doesn't start interacting with your phone without you explicitly telling it to. Also, if you don't have debugging turned on on your phone, then it won't even if you do explicitly tell it to. Feel free to mount the drive on it.
ADB and Root
Maybe I'm doing something wrong, but I can't get ADB to recognize my phone. ADB is all set up correctly, I have it updated (I believe) to the most recent version. I installed the updated USB driver and I see the "Android Phone" in my device manager. I have USB Debugging checked off in my phone settings. ADB worked fine for my G1, but it doesn't recognize my Nexus One.
I shouldn't have to root the phone to have ADB working should I? Can anybody think of something I overlooked? I am running Windows XP Professional SP3
Okay, so I navigated to the "1.1-nexusone-superboot" folder in the command prompt and tried
Code:
adb-windows devices
and my device showed up. Now I want to move those files to where I originally had my adb files in C:\android-sdk-windows\tools so that all I have to type is
Code:
adb devices
to have my phone listed. I tried replacing the files in my \tools folder and renaming them to what they were named before, but that didn't work. Could somebody please help me get this set up properly?
ccunningham83 said:
Okay, so I navigated to the "1.1-nexusone-superboot" folder in the command prompt and tried
Code:
adb-windows remount
and my device showed up. Now I want to move those files to where I originally had my adb files in C:\android-sdk-windows\tools so that all I have to type is
Code:
adb devices
to have my phone listed. I tried replacing the files in my \tools folder and renaming them to what they were named before, but that didn't work. Could somebody please help me get this set up properly?
Click to expand...
Click to collapse
in your command prompt you have to be in the c:\android-sdk-windows\tools\ directory for it to work
ccunningham83 said:
Maybe I'm doing something wrong, but I can't get ADB to recognize my phone. ADB is all set up correctly, I have it updated (I believe) to the most recent version. I installed the updated USB driver and I see the "Android Phone" in my device manager. I have USB Debugging checked off in my phone settings. ADB worked fine for my G1, but it doesn't recognize my Nexus One.
I shouldn't have to root the phone to have ADB working should I? Can anybody think of something I overlooked? I am running Windows XP Professional SP3
Click to expand...
Click to collapse
I was having the same problem yesterday. But i'm on Vista. Nothing seemed to work, but ADB was working fine on my Mytouch. At any rate, I ended up going to download the most recent SDK and trying adb again from a command prompt @ the tools location of the newest SDK, and then everything worked. I don't know if that was something I should have done in the first place and I just didn't know it (duh), but that's what worked for me.

[Q] what is "adb" and why cant i run it in terminal

ok... i am a little confused to what "adb" is and how to get "su" (superuser) via a Terminal app that i downloaded for my phone.
I type "su" and and I get "su: not found" same with "adb"
what am i not understanding?
trying to follow http://forum.xda-developers.com/showthread.php?t=797397 but the commands are not working..
i am a little new to my captivate here, so help me out. I install 2.2 and i would like to root it..
thanks in advance, and forgive my ignorance.
ADB is the Android Debug Bridge. You can read what it is here Android Debug Bridge
To use this you must first install the Android Software Development Kit found here Download the Android SDK
Read up a bit on those and search the forums to find more help. Good luck.
I was / am in the same boat.
I spent 4 hours last night getting it figured out, I sure wish I could find an Android for dummies book.
Anyway, here is what cha do....
once you dowload the adb package unzip it to the root of your c drive, you may want to rename it to some thing shorter, I just called it android.
next download the root package from the root thread here and unzip the files and copy or cut them into the tools folder of the ADB folder you placed on the root of C:
navigate to the tools folder and copy adb.exe and adbwinapi.dll to the system32 directory in windows, you will need to reboot. This will allow you to use the windows cmd line.
now I am on window 7 64 so I ran the commond line as administrator to be safe. to do this click start all prograns accessorires right click cmd and select run as admin.
change directory to the tools folder, for me "cd c:\android\tools"
Connect phone be sure usb debugging is on in the phone, (settings, application, development. it will install drivers. (I manually installed the samsung 64 bit drivers I had downloaded from samsung)
from the command promt type adb devices and hope fully it will see your phone and return with the serial number and them you are good to go with following the instructions to root from there.
I hope this helps...
Cappy
the information on how to use this is really not in one place, I spent 4 hours last night searching all over to figure it out, just so I would not ask and be belittled because there is NOT good information.
I have even been searching for any books I can find on Android so I can understand how this system works, but have found no good ones yet.
I need a nice Android for dummies type thing.
I spent an hour just to figure out it still won't run right unless you change directory to the tools folder where everything is at. ( it's been like 15 years since I messed with dos).
Some where in the wiki or bibles or all the other how toos being posted we really need better information on how to use the tools and what they are.
Cheers
Jeff
http://www.google.com/search?sourceid=chrome&ie=UTF-8&q=android+for+dummies
WOOT looks like they have one now...
Quick Tip: Once you get the Android SDK installed, you can add the location of the Tools directory to the Windows path variable and be able to call the programs from anywhere on your computer.
Masacrk said:
Cappy
the information on how to use this is really not in one place, I spent 4 hours last night searching all over to figure it out, just so I would not ask and be belittled because there is NOT good information.
Click to expand...
Click to collapse
Sorry you feel I was trying to belittle you. I was trying to be helpful by pointing you to the proper information. You know the old saying, "You'll never learn by letting others do it for you."
Sent from my SAMSUNG-SGH-I897 using XDA App
it's all good man I did not mean you.
I was taught along time ago that there are no dumb questions but it don't seem to hold true around here I have noticed.
Quess the new generation are not as patient or willing to help as mine was.
Ha ha ha. Guess I should have picked a better screen name.
Sent from my SAMSUNG-SGH-I897 using XDA App
ugg.. I dont get it.. I finaly got it to connect to the phone, but even in windows when i type in SU I get invalid command..
uggg..
i dont get it.. please help!
go to this thread
http://forum.xda-developers.com/showthread.php?t=797397
at the bottom of the first post you will see a link to Captivate2.2rootpack.zip.
http://forum.xda-developers.com/attachment.php?attachmentid=411708&d=1285997559
download , unzip, copy contents to the tools folder of the sdk package.
Also this thread was a help,
http://forum.xda-developers.com/showthread.php?t=502010
Cheers
Jeff
Masacrk said:
go to this thread
http://forum.xda-developers.com/showthread.php?t=797397
at the bottom of the first post you will see a link to Captivate2.2rootpack.zip.
http://forum.xda-developers.com/attachment.php?attachmentid=411708&d=1285997559
download , unzip, copy contents to the tools folder of the sdk package.
Also this thread was a help,
http://forum.xda-developers.com/showthread.php?t=502010
Cheers
Jeff
Click to expand...
Click to collapse
thanks.. i think i got that far,.. I copied the files into the tools folder and I still get
Code:
$ su,busybox,sqlite3
su,busybox,sqlite3
su,busybox,sqlite3: not found
$
i even copied the files to the android, and ran it from that folder.. still no luck
what am i doing wrong?!? gosh.. i never felt soo dumb about things like this before
eatonjb said:
thanks.. i think i got that far,.. I copied the files into the tools folder and I still get
Code:
$ su,busybox,sqlite3
su,busybox,sqlite3
su,busybox,sqlite3: not found
$
i even copied the files to the android, and ran it from that folder.. still no luck
what am i doing wrong?!? gosh.. i never felt soo dumb about things like this before
Click to expand...
Click to collapse
OK. took me a little while to figure this out, too. Not sure of your level of knowledge of the terminal. If I over-simplified please forgive me.
"Extract RootPack zip file" Did you do this? I think you did from you post. Make sure you've copied the files to your "tools" subfolder in the android sdk folder.
Click the start button, click run, type "cmd", press enter.
When that window opens type "cd.." and press Enter. Keep typing "cd.." and pressing Enter until the only thing you see at the prompt is "c:\"
Now navigate to the Tools folder where ever it is you put the android sdk.
I put mine at "c:\android_sdk" so I would type "cd c:\android_sdk\tools"
Plug your phone into your computer.
Go to home screen>menu>settings>applications>development and select "USB debugging".
At the command prompt type "adb devices" and your phone should return a value (the serial number).
If that works you should be able to follow the directions below.
It's been mention that you should be able to copy the commands from the web page and right click the terminal window and select "Paste". Makes everything faster, easier and more accurate. One other thing to mention: after you perform these steps and you want to do something else through adb where you're instructed to type "su" you'll need to open the SuperUser application on your phone and press "approve" after typing "su".
adb push rageagainstthecage-arm5.bin /data/local/tmp/rageagainstthecage-arm5.bin
adb shell
cd /data/local/tmp
chmod 0755 rageagainstthecage-arm5.bin
./rageagainstthecage-arm5.bin
(wait for you to get kicked from adb)
adb shell
mount -o rw,remount /dev/block/stl9 /system
exit
adb push su /system/bin/su
adb push busybox /system/bin/busybox
adb push sqlite3 /system/bin/sqlite3
adb push superuser.apk /system/app/superuser.apk
adb shell
cd /system/bin
chmod 4755 su
chmod 4755 busybox
chmod 4755 sqlite3
reboot
eatonjb said:
thanks.. i think i got that far,.. I copied the files into the tools folder and I still get
Code:
$ su,busybox,sqlite3
su,busybox,sqlite3
su,busybox,sqlite3: not found
$
i even copied the files to the android, and ran it from that folder.. still no luck
what am i doing wrong?!? gosh.. i never felt soo dumb about things like this before
Click to expand...
Click to collapse
those arent even commands. just random words you put into the terminal....
follow the instructions exactly like PersonOfKnownOrigin has posted. it works
I too was having trouble, turns out the files were extracted and were in a sub folder in the Tools folder so I copied and pasted them directly into the tools folder one by one, that worked great for me. Also, I find it easier to open command shell and use the Android Tools by holding the shift key and right clicking on the Tools folder and choose open command window here. I hope this helps.
I have a stupid path becaue my laptop messed up when I first got it and I haven't been able to fix it because DOS is difficult to me. It works fine but I am too lazy to type such a long path and if you are off at all it dosen't work.
just copy and paste the commands so you don't get them wrong, worked for me. The command is su then hit enter then enter the next command line and hit enter, works like a charm.
ok, I got it.. I misinturpted that the first line (the 3 commands in one line) was a command that I was supposed to run..
it was not..
dohh.. thanks guys for all the help... i felt kinda dumb, but now I think I am kinda smrt. I mean Smart!! (Simpsons Humor)
thanks again for the paitence.
Eaton

[Q] Problems rooting

I'm trying to root my Sprint Hero by following these directions: http://forum.xda-developers.com/showthread.php?t=694572 and when I get to typing in "sh /sdcard/unrevoked" I get the following error message -
$ sh /sdcard/unrevoked
sh /sdcard/unrevoked
Unpacking, please wait...
Unable to chmod /data/DxDrm/unrevoked.13740: No such file or directory
/sdcard/unrevoked: /data/DxDrm/unrevoked.13740: not found
rm failed for /data/DxDrm/unrevoked.13740, No such file or directory
$
Am I missing a step. Please help!!
Can't help you with that particular error, but try http://forum.xda-developers.com/showthread.php?t=804296
That's been proven to work.
That worked, thanks!
Nothing Works
Above solution doesnt work on HTC Hero bu Sprint...
I installed the SDK as suggested..
There is no adb installed part of SDK. Whoever wrote these instructions probably wrote last year.
'adb' is not recognized as an internal or external command.....
In the recent release of Android SDK, adb was moved to the "platform-tools" of your android sdk's installation folder. Check it there and run as instructed... it should work.
I used z4root and it worked fine
Yes z4root still works on the latest software
Sent from my HTC Hero CDMA using XDA App
211655 said:
Above solution doesnt work on HTC Hero bu Sprint...
I installed the SDK as suggested..
There is no adb installed part of SDK. Whoever wrote these instructions probably wrote last year.
'adb' is not recognized as an internal or external command.....
Click to expand...
Click to collapse
Once you have the SDK installed you have to update it. Once you have the update installed instead of going into the /tools directory, you need to go into /platform-tools/ and adb is located there. Other than the directory changes the proceedure is the same. You can also look for Z4root, it is supposed to root the hero, from there you can install rom manager and install clockworkmod recovery.

[GUIDE][ADB]Easiest How to use adb, logcat, etc for noobs and newbies

ADB:-
Android Debug Bridge
Very useful program made itself by Google for Programmers and developers. Its based on command line and basically communicates with your Android to respond to certain commands. There is vast amount of knowledge about adb but its most useful commands limit to getting:-
Logcat:-
A real time log of what is happening in background of our devices. It is really useful for developers to see which component has malfunctioned and helps to narrow down their search for what failed and what needs to be fixed. Several times users are asked to give logcats of their devices which are giving errors. We will go in detail that how to get logcats in every and easiest way possible.
App Installation and Management:-
adb proves really handy if you want to install apks directly from your PC or want to batch install or delete them.
Shell Execution:-
You must have heard of Terminal Emulator. It is an app for android to execute shell commands(linux commands) which are basically present as applets in /system/bin, /system/sbin or /system/xbin(in our case) folders. A very imporant applet called busybox is installed there mainly used for execution of basic commands during root browsing or ROM installation. Many times updater script of ROMs use busybox commands to install it. Well, these commands can be initiated from your device too but they can be initiated from adb also making it easy for programmers.
Pushing and Pulling:-
Most used commands of adb. adb makes it a piece of cake for new device developers to get an ideo of structure and basic knowledge of devices by pulling command. We can pull out i.e copy any files or folders from our devices to our PC, even the root directories without rooting the devices. It help rooters and ROM chefs of new devices to get an idea and implement their mods on them. Pushing is also very useful command. It copies your files and folders from PC to your device. Very useful in pushing some /system apps and other things
Remounting and setting permissions
Basic commands:-
Of-course basic commands such as rebooting and rebooting in recovery mode and download mode are supported.
Others:-
There are several other features of adb such as fastboot, aapt, etc
Setting up ADB
Pre Requirements:-
PC(This is a windows guide, if asked I will add linux and mac guide later)
Java Runtime environment or Java Developing kit
Your Device Drivers
An Android Device
USB Debugging MUST be turned ON in the device for ADB to see it & Developer options is hidden in Android 4.2 and
above, Hitting Build number 10 times in
About Phone/Tablet reveals the menu (Thanks lilHermit for reminding me to add it)
Assuming you all these ready and working properly, we continue
If you are having trouble completing Pre-Requisites, there are several guides featuring them too
Start
1. First Download Android SDK. Roughly about 70 MB
2. There may be any compressed zip file or exe file
If zip file, then extract it to C:\android-sdk
If exe file then double click on it and install it in C:\ Drive(or any other drive you want)
3. Now to get adb and other tools, you need to download 'Platform Tools'
To download them, go to the android-sdk folder and double click on SDK Manager
It will ask you which package to download? However, it is your choice which package to Download, but here, we will only talk about platform
Tools. So, simply tick on Platform Tools and click on install. Once you have done it. Go to the platform-tools folder in the directory where you installed android-sdk. You will find several files there like adb, fastboot, aapt, etc
4. Now, you can backup the whole folder of android-sdk to any external storage that will make you not download package
again if you want to. You can have it placed in any computer and run it as it does not require registry to work
5. Now, you are just one step away from using adb. Next step is SKIPPING SETTING ENVIRONMENT VARIABLE (If you however want to set environment variables. Click on Show Content)
We can easily append the sdk platform-tools and tools folder to your systems environmental path variable directly from command line(cmd) by simply issuing one command and performing a system reboot:
Code:
[COLOR=Black]SETX PATH "%PATH%;[/COLOR][COLOR=Indigo]SDK_Install_Path[/COLOR][COLOR=Black]\platform-tools;[/COLOR][COLOR=Indigo]SDK_Install_Path[/COLOR][COLOR=Black]\android-sdk-windows\tools" -m[/COLOR]
Just replace the "SDK_Install_Path" in the above with the proper path of your SDK installation. Example: C:\android-sdk-windows
(Thanks to WugFresh for telling me :victory
Many guides on internet say that it is to be done for making it easy for users and if you have some basic knowledge of Command Prompt,
you will know that to execute any application with command prompt, you first need to change the directory to the one where application is
placed. And to skip changing the directories every time you open CMD, you need to put that application is environment variable. However, we will not do so.
6. Type cmd in the search bar. Copy cmd.exe from there. Go to the directory where you have installed android-sdk. Go to platform-tools folder. Paste cmd there, right click on it and in the settings, select Run as Administrator.
7. You are done. Now what to do in it?
ADB Commands
Type adb in command prompt. And several commands will show up on your screen. It is very difficult to analyse these all commands, so we will only talk about most used and important commands
Connect your device via USB cable
And open the CMD in platform-tools folder(Make a shortcut of it on desktop). And type the suitable commands
Code:
adb devices
Will show the list of devices attached to the PC andtheir serial numbers. If this shows up correctly on your PC, then it means that everything is fine for continuing.
Logcat
Code:
adb logcat
It will display the real time log of your device
Best time to do it is when your device boots up
Now, many users ask me how to copy the logcat and upload it from CMD
There are several methods:-
1. Right click on the Title Bar of Command Prompt. Hover the cursor over edit and select mark. Select all the things you want to copy and then click enter. All the things will be copied to clipboard.
2. This is the correct way of getting logcat saved.
Code:
adb logcat > logcat.txt
This command will create a logcat.txt document in platform-tools folder with the complete logcat of the device. Ofcourse you can type any name instead of logcat.txt
3. I prefer taking logcat this way as it neatly compiles logs of different time
Code:
adb logcat -v long > logcat.txt
This is a very nice way to get logcat.
Installing Apps
Code:
adb install %PATH OF APK%
This will install an app on your Android
For example, if my app AreeB.apk is in G:\ drive (G:\AreeB.apk)
Then I will type
Code:
adb install G:\AreeB.apk
Be sure your apk is not in a folder that has space in its name, else the command will break at space bar.
For eg:-
G:\Program Files\AreeB.apk
Note:
If you have spaces in path of apk, you can execute the command without breakage if you include the path inside quotes. (Thanks to etcman)
Eg:-
Code:
adb install "G:\Program Files\AreeB.apk"
Mounting
However, I never found any problem in tweaking with system files with adb, but some users said that they couldn't do it, so the problem was that their system partition was mounted as Read Only(R/O)
So, it is necessary now to tell how to mount system partition as Read Write(R/W)
Code:
adb remount
It is easiest way to do so, if it does not work then
There is another method that we will discuss in ADB Shell commands section
Pushing and Pulling
For pushing,
Type
Code:
adb push %PATH TO BE PUSHED% %PATH WHERE TO BE PUSHED%
Suppose I have an app named SystemUI.apk(PATH = G:\SystemUI.apk) which I want to push in /system/app/ on my android(or in other words, install an app as a system app). Then I would type
Code:
adb push G:\SystemUI.apk /system/app/
More examples
G:\Dance.txt file to be pushed in Dance folder in sdcard
Code:
adb push G:\Dance.txt /sdcard/Dance/
OR
Code:
adb push G:\Dance.txt /mnt/sdcard/Dance/
G:\Movies folder to be transferred in SDCARD in Videos Folder
Code:
adb push G:\Movies /sdcard/Videos/
G:\system\framework\framework-res.apk to be pushed in /system/framework/
Code:
adb push G:\system\framework\framework-res.apk /system/framework/
For pulling,
push command replaces with pull and paths are swapped​
Code:
adb pull %PATH TO BE PULLED FROM% %PATH TO PLACE PULLED FILE%
Example,
All system apps are to be pulled to G:\ROM\system\app
Code:
adb pull /system/app G:\ROM\system\app\
build.prop to be extracted to desktop
Code:
adb pull /system/build.prop C:\Users\Areeb\Desktop\
However, if a folder is in platform-tools folder, you don't need to type full path
Suppose if I type
Code:
adb pull /system/ system
Then a folder named system will be created inside platform-tools with all the files in system in it
If a file is in platform-tools folder, then also no need to type full path
For example,
There is an app name DeskClock.apk in this folder then, to push it to /system/app, type
Code:
adb push DeskClock.apk /system/app/
ADB Shell Commands
This mode of adb allows you to execute linux shell commands from your PC
These commands can aldo be executed through the mobile using Terminal Emulator
To initiate shell mode
Type
Code:
adb shell
You will get an prompt like this
sh-3.2#
Now you are in shell mode
adb commands won't work here and a new set of commands will work here. But we will only go in a little detail here.
Assuming you are in adb shell mode, I will only type commands that will work on shell. Note:- These commands won't work if you type them alone on cmd. But, these command will directly work on your mobile's Terminal Emulator
As these commands can also work on mobile, I am going to tell you a way of taking logcat on mobile
Type
Code:
logcat
You will see log of your device
To save this
Type
Code:
logcat > /sdcard/log.txt
A file named log.txt will be generated in sdcard
Uninstalling Applications
Code:
cd /data/app
This will change the directory to /data/app
Code:
ls
This will show the list of files in there
Suppose, there is an app named com.opera.browser (Opera Mobile) you want to uninstall it
Type
Code:
rm -r com.opera.browser
This will uninstall the app
Mounting Command:-
Code:
mount -o rw,remount /dev/block/mtdblock3 /system
Miscellanous commands:-
su: Initiates root request
du: Shows file foldrs and size
date: Shows todays date
ls: Shows list of directory
cd: Changes working directory
rm: Removes the file
logcat: Displays logcat
mount: Mounts the partition
busybox: Busybox Applets
Credits
Google: For Android and several searchings
Samsung: For Galaxy Ace s5830I
paxChristos for amazing logcat guide
Broadcom: For their Open Sourceness
XDA Forums : For the precious knowledge
Reserved
Reserved Once More
Last One
Reserve the guide
install full rom
how to install a full rom from adb?
Pretty sure it's impossible. Sorry.
Sent from my E15i using XDA Premium App
Perfect Guide to use ADB Commands..
It is very clear and perfect guide to use ADB commands.. I tested this all and works fine..
You can use apks to do logcats from the phone too, I use catlog.
About Broadcom being open sourced made me laugh hahaha.
open source broadcomm, i see what you did there .
Updated OP
Hey, I have downloaded adb a week ago. I did everything like your tutorial and more but adb doesn't see my device. I already have USB Debugging on and have the USB Drivers, but it doesn't work. This is what I get (Screenshot)
Android-fany said:
Hey, I have downloaded adb a week ago. I did everything like your tutorial and more but adb doesn't see my device. I already have USB Debugging on and have the USB Drivers, but it doesn't work. This is what I get (Screenshot)
Click to expand...
Click to collapse
Probably because of bad drivers
Can you use any other software with your mob
Because when I had this problem, reinstalling drivers fixed it.
iamareebjamal said:
Probably because of bad drivers
Can you use any other software with your mob
Because when I had this problem, reinstalling drivers fixed it.
Click to expand...
Click to collapse
I already reinstalled it like 5 times. Still doesn't work.
Android-fany said:
I already reinstalled it like 5 times. Still doesn't work.
Click to expand...
Click to collapse
Which Windows?
Which ROM?
iamareebjamal said:
Which Windows?
Which ROM?
Click to expand...
Click to collapse
Windows Vista
Stock Rom + Interactive Kernel (If the kernel is important too)
Android-fany said:
Windows Vista
Stock Rom + Interactive Kernel (If the kernel is important too)
Click to expand...
Click to collapse
Ah Vista
That old Nemesis
Frankly telling you bro, Vista sucks big time
I unistalled it as soon as I found out that Android kitchen won't work on it
Sorry bro
I don't know much about Vista
Install 7 or 8
AW: [GUIDE][ADB]Easiest How to use adb, logcat, etc for noobs and newbies
iamareebjamal said:
Ah Vista
That old Nemesis
Frankly telling you bro, Vista sucks big time
I unistalled it as soon as I found out that Android kitchen won't work on it
Sorry bro
I don't know much about Vista
Install 7 or 8
Click to expand...
Click to collapse
I can't install Windows 7/8 because it is not my computer.
But Android Kitchen and the other tools works. Just not adb.
Tapatalked by s5830i
Android-fany said:
I can't install Windows 7/8 because it is not my computer.
But Android Kitchen and the other tools works. Just not adb.
Tapatalked by s5830i
Click to expand...
Click to collapse
Very strange
Download My Phone Explorer and check if its working!!
Its just 2mb-6mb

Categories

Resources