Using DDMS to take screenshots - myTouch 3G, Magic Android Development

I came across this useful Tool from the SDK that allows you to take screenshots from your Magic.
Run the DDMS .bat file that is in your SDK\Tools folder from a cmd window when your phone is connected in USB debugging mode. This starts the Dalvik Debug Monitor from which if you do CTRL-S you can capture and save the current screen on your phone.
Very useful for screenshots to post in forums I thought!

Related

[Guide] SDK r11, Installing adb/fastboot drivers for windows Vista/7

Ok so I've been looking around all over google and XDA for the correct way to install the usb drivers for adb and fastboot from sdk manager(r11) and there are no updated guides out there for the latest r11 sdk program... so here is my quick guide just to clearify how this is done on (Windows Vista/7) PC with Sdk r11!!!
Install Java and SDK
First Install Java jre, jdk... http://www.oracle.com/technetwork/java/javase/downloads/index.html
install programs and restart if required...
Now go visit the SDK site and download latest version (r11).zip... http://developer.android.com/sdk/index.html
Now unzip file directly to C: drive.. and rename folder to 'android'..
open 'android' folder and run 'sdkmanager.exe' install updates and packages than restart if neccessary..
ADB Driver install...
Now go to your device and enable 'usb debugging' located in settings>applications>development...
Now plug device into computer via usb and DO NOT mount device (storage) to computer!!
Now press START button on computer desktop..
Right-click on 'computer' and select properties..
Now select 'Device Manager' on upper left corner of newly opened window..
Look for device named 'Android' and open selection.. right click on under-link and select 'install drivers' or 'update drivers'...
Now select browse and go to this location than press ok..
C:/(sdk folder)/extras/google/usb_drivers
Now should say driver has been installed correctly..
Test method: Open CMD
cd/
cd (sdk folder)/platform-tools
adb devices
Should see device and number pop-up...
(ADB is located in Platform-tools folder now along with 2 .dll files needed for fastboot to work)
Fastboot Drivers Install
First powe off device, than power on holding (Back+Power)
Now plug usb cable from computer into device..
Do same exact method as 'ADB Driver Install' method..
(Fastboot drivers are located in same folder as ADB drivers)
Now to run fastboot mode in cmd prompt enter this..
cd C://
cd (sdk folder)/platform-tools
Should see device and number pop-up...
Alt method is to copy the 2 .dll files located in 'platform-tools' folder and paste them into 'tools' folder, than fast boot will run correctly off this in cmd prompt...
cd/
cd android/tools
fastboot devices
Should see device and number pop-up...
Also you could just go to ..
C:/android/extras/google in 'windows explorer'
and move the 'usb_drivers' folder to root of sdk folder (android) so then all the older guides out there for installing the drivers would actually kinda make sense.. lol
if i missed anything please feel free to add a comment!!
Edited for brevity: I'm setting up a Galaxy Tab 10.1 Retail with a W7 64 machine.
I completed the ADB section of your guide just fine and went to the Fastboot section. It says to power on using back+power. When I hold power+down volume (only option?) I end up in CWM Recovery.
Should I just power on normally and finish the guide or is there something else I should do?
Thanks for the guide btw
MarcAntonyy said:
Edited for brevity: I'm setting up a Galaxy Tab 10.1 Retail with a W7 64 machine.
I completed the ADB section of your guide just fine and went to the Fastboot section. It says to power on using back+power. When I hold power+down volume (only option?) I end up in CWM Recovery.
Should I just power on normally and finish the guide or is there something else I should do?
Thanks for the guide btw
Click to expand...
Click to collapse
well to install the fastboot driver you need to be in fastboot mode on your device... for the G1 it is back+power...
Ok, I tried it again and I left out a detail (sry). When I power on with pwr+left vol it gives me two icons. One is an Android in a box, which takes me to recovery. The other is an icon that says 'Downloading'.
This time I went to it and now I'm at a screen which says
ODIN3 Download Mode
(Protocal v2)
Reason: Force Key
Secure Mode: Nonsecure
Check Signature: Check
Waiting USB Cable.....
Click to expand...
Click to collapse
And then it has a big Android in the middle of the screen with
Downloading.....
Do Not Turn Off Target!!
Click to expand...
Click to collapse
written under it.
Ok, I hooked up the USB and went through the steps and typed in the first two commands and am now in CMD at:
C:\Android\platform-tools>
But when I type in the "..\tools\fastboot.exe devices" command it says its not recognized as an internal or external command, operable program, or bath file
Btw, after I connected the USB, I got an additional line of text under "Waiting for USB" that says "===> Connected! Press the [Start] of Odin3!!"
***Update
Ok, so I copied the .dll files into Tools and ran CMD again and this time I at least did not get that error message, but it displayed no output at all, other than to begin another prompt at:
C:\Android\Tools
And that's where I'm at now.
wel uhhmmm this guide is for the G1... lol im not really sure what downloading mode is... if that is your version of fastboot than just follow the B. Instructions for the ADB driver install... the directions are the same exact for both..
Heh. Yeah its all good. I was able to install CWM and Root it, but I would like to get ADB/Fastboot working. Thanks for your help and patience with me
yeah no problem.. sorry if i couldnt help but the only thing i know is how to get it workin on G1 lol
i see many people on the G1 thread with sdk, adb and fastboot issues... FOLLOW THIS GUIDE!!! It is instructions for latest sdk Vr11... i promise this helps..
Thanks for the guide. Been trying to get ADB up & running on Vista with no success. I'll give this a try.
no problem.. sorry if i dont answer questions right away but send me a pm or comment on here and i will try to help as soon as possible!!!
ldrifta said:
no problem.. sorry if i dont answer questions right away but send me a pm or comment on here and i will try to help as soon as possible!!!
Click to expand...
Click to collapse
i do all waht you said but i can t see the number of my device i just got
did you manually install the drivers?
adb is acceses in platform-tools directory and fasboot is in tools directory.. the drivers for each are located in extras/google/usb_drivers
ldrifta said:
did you manually install the drivers?
adb is acceses in platform-tools directory and fasboot is in tools directory.. the drivers for each are located in extras/google/usb_drivers
Click to expand...
Click to collapse
Hi,
I have the same problem:
I manually install the drivers choosen located in extras/google/usb_drivers on device manager
then it say cash: "windows did fond no driver for your device.
I tried with XP SP3, Vista, Seven: always same problem
What is your device, this guide is for the dream but the same steps can be used for other devices, but you need the proper drivers for your device
Sent from my Nexus 4 using XDA Premium 4 mobile app

[GUIDE] Easy and simple adb and fastboot setup for newbies (Windows only)

Linux users please go HERE (thanks to bloodychaos)​Similar guides can be found on other devices subforums around but I can see that a lot of new users in our forum are not familiar with the setup and use of this commands.
All the instructions and installation files can be found on the Android Developers webpage, but for basic commands it is not necessary to download the whole SDK (which requires the JDK as well) to follow installation and the resources download process.
*Important: to use the adb/fastboot commands you have to enable USB Debugging in your phone Settings -> Applications -> Development menu*
To have working adb and fastboot system wide for basic commands just follow the steps below:
UPDATE: Not necessary for Windows 7 is installng adb drivers automatically after plugging the device and fastboot ones after rebooting the connected device to bootloader. To get the HTC USB Drivers on different Windows version download and install HTC Sync (If you do not need the Sync application itself you can uninstall it but the drivers will remain on your system).
*According to post #5 in this thread in some cases may be necessary to temporary disable your antivirus software during the installation of HTC Sync. Thanks @mimirom*
Download the zip archive or the attached file below
Extract the archive on your C: drive. You will have C:\android-tools folder
Adding to the System Path globally to use the command without browsing to the containing folder
Method 1 (via GUI):
Go to My Computer icon -> right click and select Properties.
On the left side of the opened screen select Advanced system settings.
(Or Start -> Search -> type sysdm.cpl -> Enter, browse to the Advanced tab)
Look down on the opened menu and select Environment Variables.
In the lower half are listed the System Variables.
Scroll to find "Path" variable, select it and click Edit...
On the Edit window in the Variable value field go to the end of the line (do not delete it!) and add without any intervals (spaces):
Code:
;C:\android-tools
do not forget the semicolon symbol (;)!
Click Ok 3 times.
Method 2 (via Command prompt):
Go to Start and in the Search box type cmd, right click and Run as Administrator
Type
Code:
setx path /m "%PATH%;C:\android-tools"
and hit Enter. Close the cmd window
fonpacific said:
By the way, I noticed that it doesn't work for me (windows 7 professional) unless i end the path of adb with "\", for example: ;C:\android-tools\ and not ;C:\android-tools as in your guide.
Click to expand...
Click to collapse
Method 3:
bonesy said:
Just a tip, if you put the Adb and fastboot files in C:/windows/system32 (32bit) or in C/windows/sysWOW64 (64bit) you can just use them from any command prompt window
Click to expand...
Click to collapse
To check is it working properly open Command Prompt (Start -> Search -> type cmd -> Enter) and type adb
If everything is configured properly this should list you the Android Debug Bridge version and the available commands.
*HINT*: To use adb or fastboot with files in the Command prompt you have to navigate to the folder containing the file first (using the cd command) e.g. "D:\Downloads\Android" and then to execute the command.
Example:
Start -> type cmd in the Search box, then Enter. You will see
C:\Users\with blinking cursor
If your file is on another drive like the example type "d:" (without the quotes), or other drive letter to go to the relevant drive. Skip this if the file is on C: drive. Then type:
cd D:\Downloads\Android to go to the "D:\Downloads\Android" folder. If your path contains spaces (intervals) type it in quotes.
The command "cd.." brings you one folder back
Good Idea!
Have put a link to this within the GUIDES section of [INDEX][22 SEP 11] ROMS/RECOVERY/ROOT/HBOOT/RADIOS/TWEAKS/GUIDES/etc
I believe that the guide would be more useful if you put in a link to a URL for the HTC Drivers and moved the advice about enabling USB Debugging to the top!
I can now point people at this guide rather than manually instruct them, Thank's you probably just saved me loads of time and aggravation!
Nice Work, Great Help
Excellent! Exactly what I needed. Thanks for showing us this.
Hi an thank you. Good guide.
I believe one important information is missing in the guide:
Before installing the HTC drivers (or HTC sync) it is necessary to temporarily disable AntiVirus software on Windows machines. If you don't do that, Windows won't recognise your phone. After the installation is finished, enable AntiVirus again.
I got this advice somewhere and it was true for me personally. I'm using Windows 7.
Sent from my HTC Desire S using XDA App
One more comment:
This is a minor detail but I think it's worth mentioning.
If you are using the HTC Sync installation in order to get the HTC drivers only, you actually don't need to install and immediately uninstall HTC Sync itself.
The Sync installer will first install the Desired (pun fully intended ;-) drivers and the it will stop. Next it's going to ask you if you want to proceed with the installation of HTC Sync. At that point you hit cancel and you're done. No Sync, just the drivers.
mimirom said:
One more comment:
This is a minor detail but I think it's worth mentioning.
If you are using the HTC Sync installation in order to get the HTC drivers only, you actually don't need to install and immediately uninstall HTC Sync itself.
The Sync installer will first install the Desired (pun fully intended ;-) drivers and the it will stop. Next it's going to ask you if you want to proceed with the installation of HTC Sync. At that point you hit cancel and you're done. No Sync, just the drivers.
Click to expand...
Click to collapse
It's very useful, Thanks!!
Doing all this the phone has to be turned off, on, or power button and volume down?
Desire S said:
Doing all this the phone has to be turned off, on, or power button and volume down?
Click to expand...
Click to collapse
You do not need a phone for this guide It is setup for PC
Just a tip, if you put the Adb and fastboot files in C:/windows/system32 (32bit) or in C/windows/sysWOW64 (64bit) you can just use them from any command prompt window
bonesy said:
Just a tip, if you put the Adb and fastboot files in C:/windows/system32 (32bit) or in C/windows/sysWOW64 (64bit) you can just use them from any command prompt window
Click to expand...
Click to collapse
This is exactly the purpose of point 4 of the guide (global path setup)
Just trying to give another idea mate, I used to set up all the SDK and make a global path but now just drop them in those folders when i reinstal indows
bonesy said:
Just trying to give another idea mate, I used to set up all the SDK and make a global path but now just drop them in those folders when i reinstal indows
Click to expand...
Click to collapse
Agree, added to the first post.
Sent from my Desire S using Tapatalk
Instructions for Linux users???
jamsh said:
Instructions for Linux users???
Click to expand...
Click to collapse
On my Linux system I have installed Java and the whole Android SDK and the set the path of course. If you are a Linux user you should know how to do this. Also there are guides for other devices that are basically the same
amidabuddha said:
Similar guides can be found on other devices subforums around but I can see that a lot of new users in our forum are not familiar with the setup and use of this commands.
All the instructions and installation files can be found on the Android Developers webpage, but for basic commands it is not necessary to download the whole SDK (which requires the JDK as well) to follow installation and the resources download process.
*Important: to use the adb/fastboot commands you have to enable USB Debugging in your phone Settings -> Applications -> Development menu*
To have working adb and fastboot system wide for basic commands just follow the steps below:
To get the HTC USB Drivers download and install HTC Sync (If you do not need the Sync application itself you can uninstall it but the drivers will remain on your system).
*According to post #5 in this thread in some cases may be necessary to temporary disable your antivirus software during the installation of HTC Sync. Thanks @mimirom*
Download the zip archive (Mirror @MediaFire) or the attached file below
Extract the archive on your C: drive. You will have C:\android-tools folder
Adding to the System Path globally to use the command without browsing to the containing folder
Method 1 (via GUI):
Go to My Computer icon -> right click and select Properties.
On the left side of the opened screen select Advanced system settings.
(Or Start -> Search -> type sysdm.cpl -> Enter, browse to the Advanced tab)
Look down on the opened menu and select Environment Variables.
In the lower half are listed the System Variables.
Scroll to find "Path" variable, select it and click Edit...
On the Edit window in the Variable value field go to the end of the line (do not delete it!) and add without any intervals (spaces):
Code:
;C:\android-tools
do not forget the semicolon symbol (;)!
Click Ok 3 times.
Method 2 (via Command prompt):
Go to Start and in the Search box type cmd, right click and Run as Administrator
Type
Code:
setx path /m "%PATH%;C:\android-tools"
and hit Enter. Close the cmd window
Method 3:
To check is it working properly open Command Prompt (Start -> Search -> type cmd -> Enter) and type adb
If everything is configured properly this should list you the Android Debug Bridge version and the available commands.
*HINT*: To use adb or fastboot with files in the Command prompt you have to navigate to the folder containing the file first (using the cd command) e.g. "D:\Downloads\Android" and then to execute the command.
Example:
Start -> type cmd in the Search box, then Enter. You will see
C:\Users\with blinking cursor
If your file is on another drive like the example type "d:" (without the quotes), or other drive letter to go to the relevant drive. Skip this if the file is on C: drive. Then type:
cd D:\Downloads\Android to go to the "D:\Downloads\Android" folder. If your path contains spaces (intervals) type it in quotes.
The command "cd.." brings you one folder back
Click to expand...
Click to collapse
Nice work mate
Thanks a lot for the guide, dude!
By the way, I noticed that it doesn't work for me (windows 7 professional) unless i end the path of adb with "\", for example: ;C:\android-tools\ and not ;C:\android-tools as in your guide.
Hope it helps!
jamsh said:
Instructions for Linux users???
Click to expand...
Click to collapse
OP edited - there is a link to a guide for Linux users
fonpacific said:
Thanks a lot for the guide, dude!
By the way, I noticed that it doesn't work for me (windows 7 professional) unless i end the path of adb with "\", for example: ;C:\android-tools\ and not ;C:\android-tools as in your guide.
Hope it helps!
Click to expand...
Click to collapse
Thank you for the remark, I hope it will help the users with the same problem
Hey Guys, I need help!
after an installation of adb all I get is error:device not found
i entered a code adb shell and hit enter, than i entered
dmesg | grep mmc0, since you cannot put two lines of code at once (I'm a rookie)..
where did I put it wrong?
I can get to recovery of my device, but I get error like:
/I]E:Can't open /cache/recovery/command
I made revolutionary S-OFF..
Thanx for a help!
Rocks
You have to enable USB debugging in the settings.
And while in recovery it should work too
Sent from my HTC Desire S

[GUIDE] ADB Installation and how to get a logcat dump

If like me you're a complete newb, this may come in help to you - I spent a while looking around to find out exactly how I could get a logcat output, so maybe this will help speed up your progress.
1. http://developer.android.com/sdk/index.html
download and install the sdk
it may ask you to install the java sdk as well, do so
2. the SDK manager should start up automagically, if not, go through the start menu and fire it up, then select android 2.3.3 (API10) and google usb driver packages
install those packages
3. go to control panel>system>advanced system settings>environment variables and find the term 'path' under system variables and edit it
add the full path to your sdb directory (IE:
;C:\Program Files\Android\android-sdk\platform-tools;C:\Program Files\Android\android-sdk\tools)
to the end of the string in the box - it MUST be seperated from the rest of the text with a semi-colon
4. restart the computer after ok'ing your changes
5. connect the phone to the pc with the usb cable, with usb debugging enabled, but phone switched OFF
6. go to start menu on pc and type cmd in the search box, hit enter
7. type adb logcat > logfile.txt
This will output the results directly into a text file in your working directory (usually your user folder) but does not show anything in the cmd window, be sure you leave the phone attached lond enought to gather the required data before unplugging and rebooting.
Cheers to the two following posters after mine for their tips!
try
adb logcat > logfile.txt
this should create a textfile of the log in the present working directory.
Change system variable
I've seen a text file in:
C:\Program Files\Android\android-sdk\tools
that adb has moved to a different location. Here's the new location:
C:\Program Files\Android\android-sdk\platform-tools
It works for me
I wanted to debug the boot proces but it says: Waiting for device
quite right, I had a copy paste malfunction
Added output .txt command also

[GUIDE] MTP doesn't work for you on GNU/Linux? Use adb.

In this guide I will show you how to use adb to move files to or from your device. Especially helpful if your device has MTP and you can't get it to work with mtpfs on GNU/Linux.
What do you need?
Computer with GNU/Linux.
Connection to the Internet.
The 32bit adb binary or the 64bit adb binary, they are added as attachment to this post. (1)
An Android phone with USB debugging on.
Steps:
Connect your phone with a USB cable to your computer. Make sure you have USB debugging on! (2) Put the adb binary in a folder where you can open a terminal. With the terminal open type:
Code:
./adb devices
Make sure it says something like this:
Code:
List of devices attached
XXXXXXXXXXXXXdevice
Now you know you properly connected your device type:
Code:
./adb pull /sdcard/
or
Code:
./adb push /sdcard/
More info on adb commands you can find here:
http://developer.android.com/tools/help/adb.html
(1): If you are using the Debian or Ubuntu distro (or another wich allows you to install *.deb files) you can install the 32- or 64 bit adb packages and use adb from every folder. Download them from the attachments. If you use this type adb instead of ./adb.
(2): Don't know how to turn on USB debugging? Go to settings, scroll down to the About phone menu item. Tap it and scroll down again to Build number and tap it many times! Then go to settings, and tap developer options and find the USB debugging option.
I hope this was helpful, but I think not, because I get no replies...
AW: [GUIDE] MTP doesn't work for you on GNU/Linux? Use adb.
http://www.webupd8.org/2012/12/how-to-mount-android-40-ubuntu-go-mtpfs.html
I usually use sftp to transfer files. No cable and shell access included.
Sent from my GT-I9100 using xda app-developers app
If you want to copy lots of files, like your music collection or movies, wireless is not fast enough. That's why I use adb, because it's very fast.

How to logcat for crash that causes reboot

Enable ADB (USB debugging) in phone settings.
Connect your phone to your computer via USB.
Make sure you have ADB on your computer (part of the Android SDK, though you can find stripped down versions available for Windows, and it's also often available with Linux distribution package managrs).
When you try to access your phone through ADB, it will prompt you for authorization on the phone.
Once ADB is authorized, you run the command "adb logcat" to capture a log.
1) Run "adb logcat -c" to clear out old logs
2) Run "adb logcat >gpscrash.txt" to capture a log and save the output to a file. It will keep capturing a log till you stop it.
3) Launch maps or whatever it is that triggers your crash. Let it run till you have a crash.
4)Once the crash happens, press Ctrl-C on your computer to stop capturing the log.
(credit squid2)

Categories

Resources