[Tutorial] How to use adb,ddms and take a logcat - XDA-University

{
"lightbox_close": "Close",
"lightbox_next": "Next",
"lightbox_previous": "Previous",
"lightbox_error": "The requested content cannot be loaded. Please try again later.",
"lightbox_start_slideshow": "Start slideshow",
"lightbox_stop_slideshow": "Stop slideshow",
"lightbox_full_screen": "Full screen",
"lightbox_thumbnails": "Thumbnails",
"lightbox_download": "Download",
"lightbox_share": "Share",
"lightbox_zoom": "Zoom",
"lightbox_new_window": "New window",
"lightbox_toggle_sidebar": "Toggle sidebar"
}
HOW TO USE ADB , DDMS & TAKING AN LOGCAT ..etc​
WHAT IS ADB???​
EXPLANATION ​
Whenever you create an android app or when you develop an Rom , it is important that you must deliver GOOD QUALITY APP or ROM , that are rid of Bugs ..Eventually you might come across a situation when your APP or ROM isn't working or it is bricking the device or some things are not working .These situation can be tackled only with a proper debugging tools ..So ADB ( android debug bridge) is a powerful Debugging tool and a tool which allows us to step through each line of code and examine the value of each variable.It offers us some of the powerful tools ..Debugging is not a big deal for the people who come from a JAVA programming background .Dalvik VM in android supports java debug wire protocol to attach to the device over ADB
Click to expand...
Click to collapse
ADB​ADB or ANDROID DEBUG BRIDGE is a command-line utility that is often used to communicate over the debug channel with a connected phone or virtual device (emulator). ADB can control your device over USB from a computer, copy files back and forth, install and uninstall apps, run shell commands, and more...
Click to expand...
Click to collapse
Click to expand...
Click to collapse
SETTING UP ADB :- ​
1) Install Java JDK :-​Before installing the Android SDK, you’ll have to install Oracle’s Java development kit. You can download it from here...(click me !!)
Even if you already have the Java runtime (JRE) installed, you’ll need to install the JDK as well.
After installing Java JDK , you can now download the Android SDK from Google .
NOTE:- If you see a any type of Java-related error during installation, then download and install the x86 version of the JDK, not the x64 one ..
Click to expand...
Click to collapse
2) Installing android SDK:-​Download Android SDK from here...(click me !!!)
After clicking on "DOWNLOAD FOR OTHER PLATFORMS" , you will get an extended menu ..
After downloading the .exe file , then Double click on the .exe file and install it in C:\ Drive or on whichever drive you wanna install .
Click to expand...
Click to collapse
Click to expand...
Click to collapse
3) Android SDK Setup
Click to expand...
Click to collapse
Once the Android SDK is downloaded and installed, launch the SDK Manager application from your Start menu.
Enable the Android SDK tools and SDK Platform-tools checkbox and click the Install button. This downloads and installs the platform-tools package, which contains ADB and other utilities.
After installing these packages , Go to the place where you installed ANDROID SDK . IN MY CASE , IT IS :-
Code:
C:\Program files(x86)l\Android\android-sdk\platform-tools
If you used a different install location, you’ll find ADB in the platform-tools directory,inside your ANDROID-SDK directory .
Browse to platform tools and hold Shift and right-click inside it, and select Open command window here...
Click to expand...
Click to collapse
​
NOW YOU WILL SEE THIS :-
Note :- To use ADB with your Android device
1) you must enable USB debugging on it. You’ll find this option under Developer Options on your device’s Settings screen
Click to expand...
Click to collapse
Click to expand...
Click to collapse
Click to expand...
Click to collapse
2)You must install your device drivers :- Individual OEM USB drivers for windows are available for each manufacturer and are listed in the official document ..
After you have downloaded you device drivers, then we have to install on our pc. for that :-
a) connect the device to the computer
b) right click on MY COMPUTER and click manage
c) go to devices > other devices and right click on device and select update driver software.
d) you should see an option to " BROWSE MY COMPUTER FOR DRIVER SOFTWARE" , which you nedd to click on and point to the location of your device driver installation file..​
Click to expand...
Click to collapse
Click to expand...
Click to collapse
​
To test whether ADB is working properly, connect your Android device to your computer using a USB cable and run the following command:
Code:
adb devices
Now it will show the devices connected
Now you have sucessfully installed ADB and now we are good to go further..​
WHAT IS A LOGCAT :-​
Logcat is the command to view the internal logs of the Android system. Viewing logs is often the best way to diagnose a problem, and is required for many issues. This way you'll find out what apps are doing in the background without you noticing.
TAKING AN LOGCAT :-
Now type this in the terminal
Code:
adb logcat -v long > logcat.txt
or
Code:
Code:
adb logcat > logcat.txt
you shall have a log file called name of problem.txt inside your ADB folder.
SOME OF THE USEFULL ADB COMMANDS :-
Code:
adb install C:\package.apk
– Installs the package located at C:\package.apk on your computer on your device.
EG -adb install G:\xda.apk
Click to expand...
Click to collapse
Code:
adb uninstall package.name
– Uninstalls the package with package.name from your device.
EG :- you’d use the name com.quoordy.xdadevelopers to uninstall the Xda developers app.
Click to expand...
Click to collapse
Code:
adb push C:\file /sdcard/file
– Pushes a file from your computer to your device. the command here pushes the file located at C:\file on your computer to /sdcard/file on your device .
EG :-adb push G:\system\framework\framework-res.apk /system/framework
Click to expand...
Click to collapse
Code:
adb pull /sdcard/file C:\file
– Pulls a file from your device to your computer – works like adb push, but in reverse. EG :-adb pull /system/app G:\rom\system\app\
Click to expand...
Click to collapse
Code:
adb logcat
– View your Android device’s log. Can be useful for debugging apps.
Click to expand...
Click to collapse
Code:
adb shell
– Gives you an interactive Linux command-line shell on your device.
Click to expand...
Click to collapse
Code:
adb shell command
– Runs the specified shell command on your device.
Click to expand...
Click to collapse
Click to expand...
Click to collapse
Click to expand...
Click to collapse
---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
The Dalvik Debug Monitor Service (DDMS) as it is known is one of the application debugging tools that must be a part of every ANDROID app developers's toolkit..This is very very useful to the app developers.Its is a very powerful debugging tool environment and offers various unparalleled debugging features like heap information , logcat monitoring , file manager.It is available by default in ECLIPSE IDE environment or even in the ANDROID SDK.It works on top of ADB for device communication..
DDMS can be stated as a standalone application as part of ANDROID DEVICE MONITOR.The Android Device Monitor is a standalone which can be used in case you do not use the eclipse development environment , though the integration with Eclipse is something that other IDE'S could be envious of.​
HOW TO USE DDMS ??
1)AS EXPLAINED IN THE ABOVE POST , INSTALL ANDROID SDK....AFTER YOU HAVE INSTALLED PLATFORM-TOOLS & SDK TOOLS..NOW GO TO ANDROID FOLDER AND OPEN TOOLS
2)NOW RUN MONITOR.bat AS ADMINISTRATOR
3)NOW ANDROID DEBUG MONITOR WILL APPEAR ..
Now let's learn about its components and it's use's
DDMS VIEW COMPONENT'S :-​
DDMS offers a set of view components , each of which show relevant information related to the connected Emulator.
DEVICES :-
The device panel shows the details of each process that are running in the connected device.There are various operations that can be performed from this panel.
Each of the icons present in this panel performs the functions as follow's :
Debug Process Icon :- It show's the state of connection of the debugger.
Update Heap :-Clicking on this enables Heap information for the process so that we do not have to do memory deallocation manually.
Dump HPROF :- Generates a Heap Dump , useful for tracing memory leaks in your app.
Cause GC :-Invokes the Garbage collector to collect heap data.
Update thread :-Show's the information about the running thread in the thread tad for selected process
Start Method Profiling :- Tracks the metric's related a method. It collects information like the amount of time taken to execute a method,number of calls.
Stop Process :-Stops the currently selected process.
Screen Capture :- Takes a screenshot of whatever is displayed on the screen.
Reset ADB :- Ast he name suggets,it resets ADB.
THREAD'S :-​The thread tab on the right of devices view shows informatiom related to the thread for each process selected in the devices view.The information shown can described as follows.
ID :- A unique ID assigned to each thread dby Dalvik V,, which are only odd numbers that start from 3 .
Tid :-The linux thread associated with each thread , ehich matches the process ID for each main thread in a process.
Status :- Status of the thread in VM , out of daemons are marked with an asterix.other values can be among running?sleeping/init/starting.
HEAP​ :-
the heap view show a information and statistics about memory heap .To view heap usage,follow these below steps
From the devices view,select the process for heap usage which has to be examined.
click on update heap
From heap Tab , select Cause GC to enable collecting heap data
Everytime you need to update your heap statistics.This will show you the amount of memory allocated to each
ALLOCATION TRACKER​The allocation Tracker show a real time information about allocation happening in the application over a certain period of time.To enable allocation Tracking.
[*]select the process to be tracked from device panel
[*]click on start tracking from allocation tracker tab.
[*]perform any actions on the devices or emulator that you want to be tracked.
[*]click on Get Allocations objects, since tracking was enabled .
NETWORK STATISTICS​ ;-
The network tab allows you to track and optimize the amount of network data your app is using.It even allows you to tag network sockets so that you can differentiate between types of data .It will indicate the speed and amount of data received /transmitted ..
EMULATOR CONTROL :-​One problem with testing Android devices using an emulator or developer device is the fact that it is unable to examine the performance of the app in the reak world conditions . like call or SMS is received/sent or when a particular location is reached.To be specific the emulator Tab allows you to to emulate the following real world conditions :
Telephony Status :- the following options are available to set the status of phones network.
Voice :- unregistered,home,roaming,searching,denied.
Data :- unregistered,home,roaming,searching,denied.
Speed :- Full,GSM,HSCSD,GPRS,EDGE,UMTS,HSDPA.
Latency :- GPRS,UMTS
Telephony Actions :- Telephony actions allow you to spoof the network.
Location Settings ;- Emulator control allows you to sppof the location
FILE EXPLORER :-​As the name says it lets you view the directory and file structure if the device and lso easily copy files to and from the emulator so as to enable easy data transfer in a manner similiar to ADB or ADB pull command.
SYSTEM INFORMATION :-​As the name says , it give's us the particular information about the GPU load , CPU load....
DDMS HAS ALSO AN INBUILT LOGCAT VIEWER :-​
​​

Great Guide! I was considering making one myself when i finished my others, but you have done a fantastic job here... Hope when I'm done mine will look as polished as yours!
Pretty sure when people ask me how to use ADB or how to pull a logcat I'll just link this!

I've got two questions and I expect you to give the answers calmly.
Why did you make a guide about ADB and logcat when there are already multiple guides present in the section including @iamareebjamal's guide which is so grasping, it has been featured in XDA News?
What is the point of copying and pasting the whole ddms guide from one thread of yours to this?
Sent from my GT-S5830i using xda app-developers app

amogh420 said:
I've got two questions and I expect you to give the answers calmly.
Why did you make a guide about ADB and logcat when there are already two in the section including @iamareebjamal's guide which is so grasping, it has been featured in XDA News?
What is the point of copying and pasting the whole ddms guide from one thread of yours to this?
Sent from my GT-S5830i using xda app-developers app
Click to expand...
Click to collapse
I don't know about the other guides present in this section ..i just made one and thought to post here ..thats it ..
Just wanted to share here.i just did so..
Sent from my GT-S5830i using xda app-developers app

-MR.WORLDWIDE- said:
I don't know about the other guides present in this section ..i just made one and thought to post here ..thats it ..
Just wanted to share here.i just did so..
Sent from my GT-S5830i using xda app-developers app
Click to expand...
Click to collapse
Fair enough.
Sent from my GT-S5830i using xda app-developers app

Finally i can make my logcats THANK YOU man

Great! thanks for yours guide. I collect some skills.
Sent from my Nexus 7 using xda premium

nice info..well explained! :good:

How do I stop logcat from running cause it'll just keep running.
Sent from my SPH-L710 using xda premium

shakim24 said:
How do I stop logcat from running cause it'll just keep running.
Sent from my SPH-L710 using xda premium
Click to expand...
Click to collapse
Control+C
Sent from my Marvelc using Tapatalk 2

1+
||""Playing Asphalt™ 8 Airborne on my sgy. LoLz.
Joke of the year. Gameloft devs will die if they hear this. ""||

when use the command, it creates a txt file but just one line in it: "Unable to open log device '/dev/log/main': No such file or directory"
solution?

Hi, I am stuck on the boot loop, I make a port rom with a base rom and I got logcat.txt, can you help me how can I fix it. Sorry, my english sucks

Tried doing a logcat using this method, was doing good like last week but tried it yesterday and it's stuck on waiting for device, the cmd window isn't recognizing my phone but my computer is. Any suggestions?
Sent from my SPH-L710 using XDA Premium 4 mobile app

Is debugging turned on? Do you have proper drivers for your device?
Sent from my Nexus 4 using XDA Premium 4 mobile app

suhail.adil said:
when use the command, it creates a txt file but just one line in it: "Unable to open log device '/dev/log/main': No such file or directory"
solution?
Click to expand...
Click to collapse
Disable /dev/log/main or
any /dev/log devices

yunusmessi said:
Hi, I am stuck on the boot loop, I make a port rom with a base rom and I got logcat.txt, can you help me how can I fix it. Sorry, my english sucks
Click to expand...
Click to collapse
Not an expert in reading logcats ... I just had a look on your Logcat wasnt quite sure about the problem .
shakim24 said:
Tried doing a logcat using this method, was doing good like last week but tried it yesterday and it's stuck on waiting for device, the cmd window isn't recognizing my phone but my computer is. Any suggestions?
Sent from my SPH-L710 using XDA Premium 4 mobile app
Click to expand...
Click to collapse
Re-installing drivers may help

puneeth.007 said:
Not an expert in reading logcats ... I just had a look on your Logcat wasnt quite sure about the problem .
Click to expand...
Click to collapse
Thanks for your helping

So i have followed the OP directions step by step for doing this for my GS4. I got to the part where you check to see if your device is connected in adb.
I typed in the command "adb devices" . After i type that in, it just says " list of devices attached" and thats it. So, does that mean everything is good and all is well or what?

hondabomdc5 said:
So i have followed the OP directions step by step for doing this for my GS4. I got to the part where you check to see if your device is connected in adb.
I typed in the command "adb devices" . After i type that in, it just says " list of devices attached" and thats it. So, does that mean everything is good and all is well or what?
Click to expand...
Click to collapse
it seems to me that you would have to reinstall your drivers for your device

Related

[TOOL] Android Commander 0.7.9.11

{
"lightbox_close": "Close",
"lightbox_next": "Next",
"lightbox_previous": "Previous",
"lightbox_error": "The requested content cannot be loaded. Please try again later.",
"lightbox_start_slideshow": "Start slideshow",
"lightbox_stop_slideshow": "Stop slideshow",
"lightbox_full_screen": "Full screen",
"lightbox_thumbnails": "Thumbnails",
"lightbox_download": "Download",
"lightbox_share": "Share",
"lightbox_zoom": "Zoom",
"lightbox_new_window": "New window",
"lightbox_toggle_sidebar": "Toggle sidebar"
}
My website is down, but download is still alive.
Hi Guys!
Android Commander is windows application to keep control on your android apps and files from PC. This is a small, very very fast and intuitive app.
If someone want to try it, go a head. But remember, you doing this on your own risk! I'm not professional programmer, this is only my hobby
Program Requirements
Before you install the program you should read this:
Phone Requirements:
- ADB ROOT Access
- BusyBox
- „Settings->Applications->Development->USB debugging” must be enabled
- USB Cable
Computer Requirements:
- Windows XP/Vista/7
- ADB USB Driver
- Java JDK
- Minimum 800×600 screen resolution
Click to expand...
Click to collapse
Android Commander should works for any android device, but here is list of devices confirmed by me or users.
Before you report any problem to me, read program FAQ.
Full list of program features.
Screens:
Android Commander screenshots gallery
If you like my program, conceder a donation please!
Download is here
mirror
Program wasn't updated for a long time, but it still can work with any android device. The only think you have to do is update ADB binaries in program directory.
Click to expand...
Click to collapse
Changelog:
Version 0.7.9.11:
Changelog:
- updated adb and aapt binaries
- better work with JB
- better updates checking system (disabled as default)
- files and partitions size display improvements
- more fixes
Click to expand...
Click to collapse
Full program changelog
Ok, first off I start the app thinking it was an installer. Tells me no device is connected.
I assume the the app is now shut off since there is no indication of it running.
I plug in my phone and turn on debugging and then I get a window that says
'adb' is not a valid integer value. Then something about my adb server is out of date. Beats me what this supposed to mean.
I attempt to click the X on the warning message and it keeps poping up. So I used task manager to kill it.
WindowsXp SP3.
DroidExplorer works
Out of all seriousness I like your slim and mean approach. Just doesn't seem to work on my machine.
looks like I need a newer SDK
kizer said:
...Then something about my adb server is out of date...
Click to expand...
Click to collapse
I had issues like this with old SDK, try to install 1.6r4.
Seems to work fine for me (wit the latest sdk)
thanks for the app, will make things a little easier for me during fresh flash's
kizer said:
Then something about my adb server is out of date. Beats me what this supposed to mean.
Click to expand...
Click to collapse
You get this message if you have an adb server running (like from droid explorer) that is a different version then you are trying to start "right now". Droid Explorer uses 1.6r3 with the current install, the next release has 1.6r4.
PanPiotr said:
I had issues like this with old SDK, try to install 1.6r4.
Click to expand...
Click to collapse
Out of curiosity, what is the app doing that "requires" busybox. With Droid Explorer, I use busybox's ls command because the stock one sucks and doesn't display all the information when doing a ls -lF, plus i dont think it supports --color=always
camalot said:
Out of curiosity, what is the app doing that "requires" busybox.
Click to expand...
Click to collapse
try to run shell "rm" or "cp" command without busybox
PanPiotr said:
try to run shell "rm" or "cp" command without busybox
Click to expand...
Click to collapse
haha oh yeah, forgot about those... how quickly i take advantage of busybox. what would I do with out it.
update!!!
version 0.3.1 available now, lots of changes!
update
Version 0.4.1 with drag&drop available now!
Hi
first of all i just wanna say thanks for the app its a great idea so thanks for your hard work.
i have a problem though it doesnt work for me im running Windows 7 x64 i have latest usb drivers (r2) and latest sdk (r4) when my G1 is connected i open the app and nothing happens it just runs in processes but when phone is not connected i get message telling me phone is not connected and i click x and it still runs in processes ive tried running it in compatibility mode for xp sp2 and 3 and as and administrator still no luck i even reformatted and did a fres install of Windows 7 x64 still not working any help would be greatly appreciated.
and ideas ???
UpGrad3 said:
Hi
first of all i just wanna say thanks for the app its a great idea so thanks for your hard work.
i have a problem though it doesnt work for me im running Windows 7 x64 i have latest usb drivers (r2) and latest sdk (r4) when my G1 is connected i open the app and nothing happens it just runs in processes but when phone is not connected i get message telling me phone is not connected and i click x and it still runs in processes ive tried running it in compatibility mode for xp sp2 and 3 and as and administrator still no luck i even reformatted and did a fres install of Windows 7 x64 still not working any help would be greatly appreciated.
and ideas ???
Click to expand...
Click to collapse
Woah! you actually did a fresh install of windows to get this app working?
anyhow, if you open a command prompt and type "adb devices" what does it output.
Make sure you have USB Debugging enabled on the device. Settings -> Applications -> Development -> USB Debugging
Thanks camalot for your help, you are good guy. And also THX to you UpGrad3 (you are first ).
BTW new version soon
hmmm doesn't seem to work well with a multi-monitor setup or maybe some other issue.
When I start it with the phone not plugged in I get the Device not found off to the edge of the monitor. (APK Manager shows on the taskbar)
Connect the phone and Refresh and it's found and click OK.
Then your app disappears... nothing the the taskbar but if I check Task Manager it's running.
Little help please
Oh yeah WinXP SP3
Rogers HTC Dream - CyanogenMod 4.2.8.1
camalot said:
Woah! you actually did a fresh install of windows to get this app working?
anyhow, if you open a command prompt and type "adb devices" what does it output.
Make sure you have USB Debugging enabled on the device. Settings -> Applications -> Development -> USB Debugging
Click to expand...
Click to collapse
usb debugging is enabled
and when i type adb devices it says this: (when no adb process was running before)
C:\Users\UpGrade>adb devices
* daemon not running. starting it now *
* daemon started successfully *
List of devices attached
HT843KV09845 device
and with adb process already running it says this:
C:\Users\UpGrade>adb devices
List of devices attached
HT843KV09845 device
strange cause droid explorer was working before the format the reason i want this is to batch install appz to my phone cause with droid explorer sometimes it doesnt install some apps and if i want to install 1 app so not batch installing it doesnt work at it allways crashes and tries to send report to microsoft thats y i need this apart from that droid explorer is brilliant so if i use them both i have the perfect android manager
I dunno what u did with the latest version 0.5.0.1 but it works it actually opened all seems to be working thanks!
This error on 0.4.2 in recovery mode
aluspl said:
View attachment 258287
This error on 0.4.2 in recovery mode
Click to expand...
Click to collapse
m8 before u run this program in recovery mode u should type in windows cmd "mount -o rw /dev/block/mmcblk0p2 /system/sd" and "mount -o rw /dev/block/mmcblk0p2 /sdcard" then its works ok
I have done a clean install of cyanogen 4.2.9.1 cause i had too much stuff on my fone so i thought id clean it up a little bit and since that android commander is not working again so its something to do with my phone does anyone kno what may be wrong ? thanks.
new version available
this program is so strange for me if i do a clean install of cyanogen it doesnt work well version 0.5 didnt and after a day or two when i have lots of apps installed to the phone it works i dont understand and now the latest version 0.6 doesnt work but it works in the places 0.5 didnt e.g. it allways opens up no matter what even on clean install so this has been improved only now it doesnt detect my phone when connected i have attached screenshots to help me explain they are here:
when i open the program i receive this message:
and when i click ok it opens like this:
please fix this cause i really like this program and appreciate ur work
as i said before, it's not program problem. this error showing because of program can not read informations form your phone. many people had issues like you (also on different forums), and every time problem was with SDK/ADB.

Help with Set Up?

Can anybody help me set up ADB, SDK, and Emulator. I've tried all of the guides but I just don;t understand any of it. I really want Emulator too so f anyone can help, that'd be greatly appriciated. Thanks =D
I have a black G1 with Danger SPL and the latest Radio. I use a Windows Vista laptop and have the SDK downloaded in the C:/ folder but it's the zipped file. Should it be extracted in there? I've tried to do the whole SDK Setup process but for some odd reason it always downloads everything except for like, the firmwares like 1.0,1.1,1.5,1.6,2.0,2.0.1,2.1 or anything.
G1BRICKED said:
Can anybody help me set up ADB, SDK, and Emulator. I've tried all of the guides but I just don;t understand any of it. I really want Emulator too so f anyone can help, that'd be greatly appriciated. Thanks =D
I have a black G1 with Danger SPL and the latest Radio. I use a Windows Vista laptop and have the SDK downloaded in the C:/ folder but it's the zipped file. Should it be extracted in there? I've tried to do the whole SDK Setup process but for some odd reason it always downloads everything except for like, the firmwares like 1.0,1.1,1.5,1.6,2.0,2.0.1,2.1 or anything.
Click to expand...
Click to collapse
Make sure that you have the usb drivers installed as well.
What i've done is exacted it to C:\sdk\ It makes navigating to it in CMD a lot easier. Once you have that done open CMD and type the following
Code:
cd C:\sdk\tools
adb shell
This will find your device (make sure it's not mounted and USB Debugging is enabled (default in most roms) and put you into an ADB environment.
this is a really good tool too:
nephron said:
Droid Explorer by Camalot
Droid Explorer is a Windows software that will download, install, and setup the android SDK for you all in under a minute so you are ready to go. I use this on a daily basis. This amazing piece of software has tons of plugins and a built in file explorer for all your files on your phone! All you gotta do is download, install, and go!
Download Droid Explorer - here
Install the program, and let it setup the SDK files for you
Connect your phone
Enjoy!
Click to expand...
Click to collapse
Also at what point are you having issues with setting this up?
nolimit78 said:
Make sure that you have the usb drivers installed as well.
What i've done is exacted it to C:\sdk\ It makes navigating to it in CMD a lot easier. Once you have that done open CMD and type the following
Code:
cd C:\sdk\tools
adb shell
This will find your device (make sure it's not mounted and USB Debugging is enabled (default in most roms) and put you into an ADB environment.
this is a really good tool too:
Click to expand...
Click to collapse
Ok so I have it setup as C:\android-sdk-windows and then all of the files. When I type in the first command it says
Code:
The system cannot find the path specified.
And I have the Droid Explorer Installed and everything but it doesn't have the Emulator and that's all I really want. That and FastBoot.
nolimit78 said:
Make sure that you have the usb drivers installed as well.
What i've done is exacted it to C:\sdk\ It makes navigating to it in CMD a lot easier. Once you have that done open CMD and type the following
Code:
cd [B]C:\sdk\tools[/B]
adb shell
This will find your device (make sure it's not mounted and USB Debugging is enabled (default in most roms) and put you into an ADB environment.
this is a really good tool too:
Click to expand...
Click to collapse
If you noticed it extracted it to C:\sdk\tools, you did yours to C:\android-sdk-windows. So you'll need to adapt to the changes..
Code:
cd C:\android-sdk-windows\tools
adb shell
Now it says,
Code:
Error: device not found
G1 is in Debugging mode and all.
G1BRICKED said:
Now it says,
Code:
Error: device not found
G1 is in Debugging mode and all.
Click to expand...
Click to collapse
A friend of mine had the same problem. Make sure the device is plugged into the back of your computer, reboot the PC and the Phone. See if that helps. And which ROM are you running?
Well see I'm on VegaMans Beta Legend Port, and my phone won't show up on my laptop at all not to mount or anything all that appears is the notification in my bar saying;
Code:
USB Debugging Connected
Select to disable USB Debugging
G1BRICKED said:
Well see I'm on VegaMans Beta Legend Port, and my phone won't show up on my laptop at all not to mount or anything all that appears is the notification in my bar saying;
Code:
USB Debugging Connected
Select to disable USB Debugging
Click to expand...
Click to collapse
I saw that, It could be that USB Debug is broken on the ROM (it is in early beta) Try using a different rom.
nolimit78 said:
I saw that, It could be that USB Debug is broken on the ROM (it is in early beta) Try using a different rom.
Click to expand...
Click to collapse
Well man, I tried it on FastTest and now I have a Custom Splash1 Image and now I'm not afraid of holding the Back button with the Red one. I think I'm going to throw Sense UI off to the side for now until it supports ADB and all. So thanks man, after all these monthes I finally have ADB Access. One more thing though, how can I get Emulator to work?
Now, when I try to go into Emulator through CMD, I se this;
Code:
C:\android-sdk-windows\tools>emulator
emulator: ERROR: You did not specify a virtual device name, and the system
directory could not be found.
If you are an Android SDK user, please use '@<name>' or '-avd <name>'
to start a given virtual device (see -help-avd for details).
Otherwise, follow the instructions in -help-disk-images to start the emulator
Then, I navigate to C:/Windows-SDK-Windows/SDK Setup and I allow it to run. I get two windows, one that says
Code:
Failed to fetch URL https://dl-ssl.google.com/android/repository/repository.xml, reason: HTTPS SSL error. You might want to force download through HTTP in the settings.
I close that window and go to the one that says Choose Package To Install, but the white box on the side is blank. I close that and go to Android SDK And AVD Manager. From there I go to Virtual Devices and it's blank and grey-ed out. I click new and see
Code:
Name - [I]Here I can write[/I]
Target - [I]Here I can't write[/I]
SD Card: Size [I]Here I can write[/I] MiB or KiB
File: [I]Here I can't write[/I] Browse [COLOR="DarkRed"]Dulled out[/COLOR]
Screw skins and Hardware I can do that on my own, but how can I set a Target if it is grey-ed out?
G1BRICKED said:
how can I get Emulator to work?
Click to expand...
Click to collapse
that is something I can't help you with. I am at work and it won't allow me to download what I need for that. But I am glad you got ADB workin!
Lol thanks =D

[Q] Tons of Trouble with ADB and Fastboot

I'm having a crapload of trouble with adb and fastboot. I've been searching for the last few hours but to no avail. I've downloaded multiple drivers and tried to do everything i can to setup the adb and fastboot. I managed to get the bootloader unlocked and its rooted and usb debugging is enabled. Every time i type "adb devices" into a command prompt it says that adb is not a valid command etc. What the heck am i doing wrong and why is this supposedly simple process so difficult here?? Please help...
Did you use the "cd" command to change the directory to where the platform-tools folder is?
That's assuming you have the Android SDK and Java Dev Kit (JDK) installed already..
Sent from my Atrix HD via XDA-Developers application
pianoman102 said:
I'm having a crapload of trouble with adb and fastboot. I've been searching for the last few hours but to no avail. I've downloaded multiple drivers and tried to do everything i can to setup the adb and fastboot. I managed to get the bootloader unlocked and its rooted and usb debugging is enabled. Every time i type "adb devices" into a command prompt it says that adb is not a valid command etc. What the heck am i doing wrong and why is this supposedly simple process so difficult here?? Please help...
Click to expand...
Click to collapse
Here is installer. Run it under administration mode on windows.
No needs to install the whole android SDK anymore. Enjoy!!
http://d-h.st/FFo
P/s: U still need JDK as Byakko Custom said.
devilsking said:
Here is installer. Run it under administration mode on windows.
No needs to install the whole android SDK anymore. Enjoy!!
http://d-h.st/FFo
P/s: U still need JDK as Byakko Custom said.
Click to expand...
Click to collapse
Ah, thanks so much! That finally got it working after i installed jdk and ran the program. Awesome! time to start flashing!
pianoman102 said:
Ah, thanks so much! That finally got it working after i installed jdk and ran the program. Awesome! time to start flashing!
Click to expand...
Click to collapse
U're welcome
devilsking said:
Here is installer. Run it under administration mode on windows.
No needs to install the whole android SDK anymore. Enjoy!!
http://d-h.st/FFo
P/s: U still need JDK as Byakko Custom said.
Click to expand...
Click to collapse
2 Questions
Does that install the tools in the Windows equivalent of "$PATH" so users don't have to cd to the tools' location.
And do you mind if I link to this in my how-to guide? Credit will be given to you and your team of course.
skeevydude said:
2 Questions
Does that install the tools in the Windows equivalent of "$PATH" so users don't have to cd to the tools' location.
And do you mind if I link to this in my how-to guide? Credit will be given to you and your team of course.
Click to expand...
Click to collapse
Yep. U can do it I'm happy to share this tools with other users :good:
About the location, I set the installation path to C:\Windows so it means that it can be used as an windows services whenever u call it on cmd. No needs to set the location.
For example: If users use command "adb devices", it will work immediately and show the result. However when they want to decompile an apk and put file in a folder named "X", it's needed to use cd command to set the location in cmd to "X" then use adb/apktool/fastboot as normal without having adb/apktool/fastboot files in "X" folder. It helps to define the location of apk file, not the apktool/adb/fastboot.
Hope u can understand my idea =.= Sometimes, my explanation is really not good becoz English is not my mother language
devilsking said:
Yep. U can do it I'm happy to share this tools with other users :good:
About the location, I set the installation path to C:\Windows so it means that it can be used as an windows services whenever u call it on cmd. No needs to set the location.
For example: If users use command "adb devices", it will work immediately and show the result. However when they want to decompile an apk and put file in a folder named "X", it's needed to use cd command to set the location in cmd to "X" then use adb/apktool/fastboot as normal without having adb/apktool/fastboot files in "X" folder. It helps to define the location of apk file, not the apktool/adb/fastboot.
Hope u can understand my idea =.= Sometimes, my explanation is really not good becoz English is not my mother language
Click to expand...
Click to collapse
Thanks.
That's what I thought it did. I was going to do something similar, but I couldn't remember if the correct folder was and I was just too lazy to do the research and find out. I was thinking System32, but its been so long that I couldn't remember.

{Tutorial} (Basics of ADB) For Beginners Part-1

The purpose of this thread is to make u familiar with the ADB (Android Debug Bridge)
It is a tool that lets u communicate with ur android device that is connected to ur pc.
In the first tutorial we shall learn some basics of adb and then advance to use pro commands in further tutorials.
Requirements
1. Adb link - http://developer.android.com/sdk/index.html
Direct link for windows 32bit
http://dl.google.com/android/adt/adt-bundle-windows-x86-20130917.zip
Direct link for windows 64bit
http://dl.google.com/android/adt/adt-bundle-windows-x86_64-20130917.zip
(Link may be removed after some time by google itself)
2. Windows based pc ( yes we will use windows and not linux as i dun want to communicate anything that i havent tried by myself )
1. Download and extract the zip in any drive , lets say C:
2. Go to C:/adb/sdk/platform-tools and u will something like
View attachment 1937059
{
"lightbox_close": "Close",
"lightbox_next": "Next",
"lightbox_previous": "Previous",
"lightbox_error": "The requested content cannot be loaded. Please try again later.",
"lightbox_start_slideshow": "Start slideshow",
"lightbox_stop_slideshow": "Stop slideshow",
"lightbox_full_screen": "Full screen",
"lightbox_thumbnails": "Thumbnails",
"lightbox_download": "Download",
"lightbox_share": "Share",
"lightbox_zoom": "Zoom",
"lightbox_new_window": "New window",
"lightbox_toggle_sidebar": "Toggle sidebar"
}
3. Now press shift key + right click on mouse/keypad
http://forum.xda-developers.com/attachment.php?attachmentid=1936847&stc=1&d=1367732560
select open command window here
then type adb start-server
in order to ensure ur device is connected and recognized by adb , type adb devices , u will get something like this
View attachment 1940190
Now once your adb is setup up, lets play.....
GETTING LOGCAT THROUGH ADB​
Easiest of all
just type
adb logcat
u will see entire log ur phone,
use ctrl+c to skip it
To get logcat in a file
type
adb logcat > logcat.txt
u will see a file logcat which will save ur phone's realtime process log.
TO GET A BUGREPORT​
type adb bugreport
bt bt bt.. this will show info that wont b readable ..
so type
adb bugreport>result.txt
http://forum.xda-developers.com/attachment.php?attachmentid=1936973&d=1367737608
USING ADB WITH SUPERUSER PERMISSIONS
for this , u must be rooted
command
adb root
if it is success it will show something like
http://forum.xda-developers.com/attachment.php?attachmentid=1937056&stc=1&d=1367740210
INSTALLING AN APP VIA ADB​
to install any app, make sure there is no space in the name of the apk...
and u should know its location,
command that u use is adb install
i have installed a game papertoss via this command, if u get success u will get something like this
View attachment 1936893
View attachment 1940189
COPYING A FILE VIA ADB​
this is pretty easy
command u use is
adb pull
i have given a example by pulling the framework-res.apk from system/framework folder
View attachment 1940191
the file that u pull, u will see it in the platform -tools folder
PUSHING A FILE INTO YOUR PHONE​
very similar to pull, bt this copies file from ur pc to ur android .
command u use is
adb push
For eg,
i have pushed the papertoss.apk file from C:\sanket\apps to sdcard/nimbuzz folder through the command
adb push C:\SANKET\apps\papertoss.apk /sdcard/nimbuzz
if u get success u will see something like this
http://forum.xda-developers.com/attachment.php?attachmentid=1937039&stc=1&d=1367739756
this command is very powerful and u can shift an entire video or movie folder via a single command anywhere on ur android
more commands added
thanks to @Guich
Code:
adb remount
This command remount the /system partition in read/write
Code:
adb usb
Restarts the adbd daemon listening on USB
Code:
adb shell
Run remote shell interactively
The command set shall b updated within few days.
Feel free to drop ur comments, corrections, commands.
All commands have been verified by me..
once i learn more, i will share more.
criticism is welcomed if its healthy
Thread material is not copied and will never be.
Thread will be updated with newer and complex commands soon with pics.
For developers, this is just a piece of cake which they can do with their eyes closed
i have made this specially for beginners ( like me )
reserved for future
Good job!
I think you can add in op this command:
Code:
adb remount
This command remount the /system partition in read/write
Code:
adb usb
Restarts the adbd daemon listening on USB
Code:
adb shell
Run remote shell interactively
Code:
adb devices
List all connected devices
Anh, adb will work in recovery too, write it in op if you want
Wow this a great tut!
Def gonna link back to this!
Thanks a lot for making this!
:beer:
Tnx for great tutorial... great stuff for noob like me to begin with
Sent from my Desire HD using Tapatalk 2
I'd use a Image Hoster for your pics, then you wont get "invalid attachment" errors.
XperienceD said:
I'd use a Image Hoster for your pics, then you wont get "invalid attachment" errors.
Click to expand...
Click to collapse
there are just 6 pics which are visible (atleast in tapatalk)
rest non working links are to b removed ;
Great stuff m8 :thumbup:
How about including backup and restore commands
Sent from my Nexus 7 using Tapatalk HD
Thanks for this great tutorial. :thumbup:
Thank you for this. It sounds alot easier than i thought :thumbup:
Sent from my GT-S5830 using xda app-developers app
Good job
A little suggestion, from a guy used to Linux. Beginners are always lost with shells, so for this one :
drsanket_xperia_u said:
Code:
adb shell
Run remote shell interactively
Click to expand...
Click to collapse
Why not proposing some shell commands to explain a little about this adb feature ?
Or you can add a paper/article about it, such as this one : http://www.fortystones.com/40-linux-shell-commands-beginners/
It's cool , thank you.
are there any more commands for logcat and thanks for bug report XD! I think it's called switches or something.......
drsanket_xperia_u said:
The purpose of this thread is to make u familiar with the ADB (Android Debug Bridge)
GETTING LOGCAT THROUGH ADB​
Easiest of all
just type
adb logcat
u will see entire log ur phone,
use ctrl+c to skip it
To get logcat in a file
type
adb logcat > logcat.txt
u will see a file logcat which will save ur phone's realtime process log.
TO GET A BUGREPORT​
type adb bugreport
bt bt bt.. this will show info that wont b readable ..
so type
adb bugreport>result.txt
http://forum.xda-developers.com/attachment.php?attachmentid=1936973&d=1367737608
Click to expand...
Click to collapse
I was wondering about the adb commands I would use to push a Deodexed /system/app and /system/framework onto my phone? I can't find the path when running adb in recovery and not sure I'd I can just push it while Android is running. Any help or direction on where to read up would be appreciated.
Were you able to su from adb in recovery? Else your phone may not be system dir mounted and usb driver mounted.
You can use adb while running. Root your phone for better results.
Sent from my GT-S5360 using xda app-developers app
I've never used adb, but I'm familiar with rooting/recoveries, blah blah blah. What state does the phone need to be in to use it?
justin1701 said:
I've never used adb, but I'm familiar with rooting/recoveries, blah blah blah. What state does the phone need to be in to use it?
Click to expand...
Click to collapse
You use it when android is booted. And you have to activate usb-debugging.
In some custom recoverys you can also use a feature callen "adb-sideload" where you can push files to the device while in recovery.
many thank! I'm new to android device a d this very useful tips now I try installing custom rom and learning about android development
Sent from my HTC Butterfly using xda app-developers app
Nice tutorial to start with..... thumbup....
doctor_droid said:
The purpose of this thread is to make u familiar with the ADB (Android Debug Bridge)
It is a tool that lets u communicate with ur android device that is connected to ur pc.
In the first tutorial we shall learn some basics of adb and then advance to use pro commands in further tutorials.
Requirements
1. Adb link - http://dl.google.com/android/adt/adt-bundle-windows-x86-20130219.zip
2. Windows based pc ( yes we will use windows and not linux as i dun want to communicate anything that i havent tried by myself )
1. Download and extract the zip ADB in any drive , lets say C:
2. Go to C:/adb/sdk/platform-tools and u will something like
View attachment 1937059
3. Now press shift key + right click on mouse/keypad
http://forum.xda-developers.com/attachment.php?attachmentid=1936847&stc=1&d=1367732560
select open command window here
then type adb start-server
in order to ensure ur device is connected and recognized by adb , type adb devices , u will get something like this
View attachment 1940190
Now once your adb is setup up, lets play.....
GETTING LOGCAT THROUGH ADB​
Easiest of all
just type
adb logcat
u will see entire log ur phone,
use ctrl+c to skip it
To get logcat in a file
type
adb logcat > logcat.txt
u will see a file logcat which will save ur phone's realtime process log.
TO GET A BUGREPORT​
type adb bugreport
bt bt bt.. this will show info that wont b readable ..
so type
adb bugreport>result.txt
http://forum.xda-developers.com/attachment.php?attachmentid=1936973&d=1367737608
USING ADB WITH SUPERUSER PERMISSIONS
for this , u must be rooted
command
adb root
if it is success it will show something like
http://forum.xda-developers.com/attachment.php?attachmentid=1937056&stc=1&d=1367740210
INSTALLING AN APP VIA ADB​
to install any app, make sure there is no space in the name of the apk...
and u should know its location,
command that u use is adb install
i have installed a game papertoss via this command, if u get success u will get something like this
View attachment 1936893
View attachment 1940189
COPYING A FILE VIA ADB​
this is pretty easy
command u use is
adb pull
i have given a example by pulling the framework-res.apk from system/framework folder
View attachment 1940191
the file that u pull, u will see it in the platform -tools folder
PUSHING A FILE INTO YOUR PHONE​
very similar to pull, bt this copies file from ur pc to ur android .
command u use is
adb push
For eg,
i have pushed the papertoss.apk file from C:\sanket\apps to sdcard/nimbuzz folder through the command
adb push C:\SANKET\apps\papertoss.apk /sdcard/nimbuzz
if u get success u will see something like this
http://forum.xda-developers.com/attachment.php?attachmentid=1937039&stc=1&d=1367739756
this command is very powerful and u can shift an entire video or movie folder via a single command anywhere on ur android
more commands added
thanks to @Guich
Code:
adb remount
This command remount the /system partition in read/write
Code:
adb usb
Restarts the adbd daemon listening on USB
Code:
adb shell
Run remote shell interactively
The command set shall b updated within few days.
Feel free to drop ur comments, corrections, commands.
All commands have been verified by me..
once i learn more, i will share more.
criticism is welcomed if its healthy
Thread material is not copied and will never be.
Thread will be updated with newer and complex commands soon with pics.
For developers, this is just a piece of cake which they can do with their eyes closed
i have made this specially for beginners ( like me )
Click to expand...
Click to collapse
nice. You should explain that the users Need debug enabled AND how to enable developer menu on android 4.1

[TUTORIAL]How to take a Logcat & use DDMS

{
"lightbox_close": "Close",
"lightbox_next": "Next",
"lightbox_previous": "Previous",
"lightbox_error": "The requested content cannot be loaded. Please try again later.",
"lightbox_start_slideshow": "Start slideshow",
"lightbox_stop_slideshow": "Stop slideshow",
"lightbox_full_screen": "Full screen",
"lightbox_thumbnails": "Thumbnails",
"lightbox_download": "Download",
"lightbox_share": "Share",
"lightbox_zoom": "Zoom",
"lightbox_new_window": "New window",
"lightbox_toggle_sidebar": "Toggle sidebar"
}
HOW TO USE ADB , DDMS & TAKING AN LOGCAT ..etc​
WHAT IS ADB???​
EXPLANATION ​
Whenever you create an android app or when you develop an Rom , it is important that you must deliver GOOD QUALITY APP or ROM , that are rid of Bugs ..Eventually you might come across a situation when your APP or ROM isn't working or it is bricking the device or some things are not working .These situation can be tackled only with a proper debugging tools ..So ADB ( android debug bridge) is a powerful Debugging tool and a tool which allows us to step through each line of code and examine the value of each variable.It offers us some of the powerful tools ..Debugging is not a big deal for the people who come from a JAVA programming background .Dalvik VM in android supports java debug wire protocol to attach to the device over ADB
Click to expand...
Click to collapse
ADB​ADB or ANDROID DEBUG BRIDGE is a command-line utility that is often used to communicate over the debug channel with a connected phone or virtual device (emulator). ADB can control your device over USB from a computer, copy files back and forth, install and uninstall apps, run shell commands, and more...
Click to expand...
Click to collapse
Click to expand...
Click to collapse
SETTING UP ADB :- ​
1) Install Java JDK :-​Before installing the Android SDK, you’ll have to install Oracle’s Java development kit. You can download it from here...(click me !!)
Even if you already have the Java runtime (JRE) installed, you’ll need to install the JDK as well.
After installing Java JDK , you can now download the Android SDK from Google .
NOTE:- If you see a any type of Java-related error during installation, then download and install the x86 version of the JDK, not the x64 one ..
Click to expand...
Click to collapse
2) Installing android SDK:-​Download Android SDK from here...(click me !!!)
After clicking on "DOWNLOAD FOR OTHER PLATFORMS" , you will get an extended menu ..
After downloading the .exe file , then Double click on the .exe file and install it in C:\ Drive or on whichever drive you wanna install .
Click to expand...
Click to collapse
Click to expand...
Click to collapse
3) Android SDK Setup
Click to expand...
Click to collapse
Once the Android SDK is downloaded and installed, launch the SDK Manager application from your Start menu.
Enable the Android SDK tools and SDK Platform-tools checkbox and click the Install button. This downloads and installs the platform-tools package, which contains ADB and other utilities.
After installing these packages , Go to the place where you installed ANDROID SDK . IN MY CASE , IT IS :-
Code:
C:\Program files(x86)l\Android\android-sdk\platform-tools
If you used a different install location, you’ll find ADB in the platform-tools directory,inside your ANDROID-SDK directory .
Browse to platform tools and hold Shift and right-click inside it, and select Open command window here...
Click to expand...
Click to collapse
​
NOW YOU WILL SEE THIS :-
Note :- To use ADB with your Android device
1) you must enable USB debugging on it. You’ll find this option under Developer Options on your device’s Settings screen
Click to expand...
Click to collapse
Click to expand...
Click to collapse
Click to expand...
Click to collapse
2)You must install your device drivers :- Individual OEM USB drivers for windows are available for each manufacturer and are listed in the official document ..
After you have downloaded you device drivers, then we have to install on our pc. for that :-
a) connect the device to the computer
b) right click on MY COMPUTER and click manage
c) go to devices > other devices and right click on device and select update driver software.
d) you should see an option to " BROWSE MY COMPUTER FOR DRIVER SOFTWARE" , which you nedd to click on and point to the location of your device driver installation file..​
Click to expand...
Click to collapse
Click to expand...
Click to collapse
​
To test whether ADB is working properly, connect your Android device to your computer using a USB cable and run the following command:
Code:
adb devices
Now it will show the devices connected
Now you have sucessfully installed ADB and now we are good to go further..​
WHAT IS A LOGCAT :-​
Logcat is the command to view the internal logs of the Android system. Viewing logs is often the best way to diagnose a problem, and is required for many issues. This way you'll find out what apps are doing in the background without you noticing.
TAKING AN LOGCAT :-
Now type this in the terminal
Code:
adb logcat -v long > logcat.txt
or
Code:
Code:
adb logcat > logcat.txt
you shall have a log file called name of logcat.txt inside your ADB folder.
SOME OF THE USEFULL ADB COMMANDS :-
Code:
adb install C:\package.apk
– Installs the package located at C:\package.apk on your computer on your device.
EG -adb install G:\xda.apk
Click to expand...
Click to collapse
Code:
adb uninstall package.name
– Uninstalls the package with package.name from your device.
EG :- you’d use the name com.quoordy.xdadevelopers to uninstall the Xda developers app.
Click to expand...
Click to collapse
Code:
adb push C:\file /sdcard/file
– Pushes a file from your computer to your device. the command here pushes the file located at C:\file on your computer to /sdcard/file on your device .
EG :-adb push G:\system\framework\framework-res.apk /system/framework
Click to expand...
Click to collapse
Code:
adb pull /sdcard/file C:\file
– Pulls a file from your device to your computer – works like adb push, but in reverse. EG :-adb pull /system/app G:\rom\system\app\
Click to expand...
Click to collapse
Code:
adb logcat
– View your Android device’s log. Can be useful for debugging apps.
Click to expand...
Click to collapse
Code:
adb shell
– Gives you an interactive Linux command-line shell on your device.
Click to expand...
Click to collapse
Code:
adb shell command
– Runs the specified shell command on your device.
Click to expand...
Click to collapse
Click to expand...
Click to collapse
Click to expand...
Click to collapse
The Dalvik Debug Monitor Service (DDMS) as it is known is one of the application debugging tools that must be a part of every ANDROID app developers's toolkit..This is very very useful to the app developers.Its is a very powerful debugging tool environment and offers various unparalleled debugging features like heap information , logcat monitoring , file manager.It is available by default in ECLIPSE IDE environment or even in the ANDROID SDK.It works on top of ADB for device communication..
DDMS can be stated as a standalone application as part of ANDROID DEVICE MONITOR.The Android Device Monitor is a standalone which can be used in case you do not use the eclipse development environment , though the integration with Eclipse is something that other IDE'S could be envious of.​
HOW TO USE DDMS ??
1)AS EXPLAINED IN THE ABOVE POST , INSTALL ANDROID SDK....AFTER YOU HAVE INSTALLED PLATFORM-TOOLS & SDK TOOLS..NOW GO TO ANDROID FOLDER AND OPEN TOOLS
2)NOW RUN MONITOR.bat AS ADMINISTRATOR
3)NOW ANDROID DEBUG MONITOR WILL APPEAR ..
Now let's learn about its components and it's use's
DDMS VIEW COMPONENT'S :-​
DDMS offers a set of view components , each of which show relevant information related to the connected Emulator.
DEVICES :-
The device panel shows the details of each process that are running in the connected device.There are various operations that can be performed from this panel.
Each of the icons present in this panel performs the functions as follow's :
Debug Process Icon :- It show's the state of connection of the debugger.
Update Heap :-Clicking on this enables Heap information for the process so that we do not have to do memory deallocation manually.
Dump HPROF :- Generates a Heap Dump , useful for tracing memory leaks in your app.
Cause GC :-Invokes the Garbage collector to collect heap data.
Update thread :-Show's the information about the running thread in the thread tad for selected process
Start Method Profiling :- Tracks the metric's related a method. It collects information like the amount of time taken to execute a method,number of calls.
Stop Process :-Stops the currently selected process.
Screen Capture :- Takes a screenshot of whatever is displayed on the screen.
Reset ADB :- Ast he name suggets,it resets ADB.
THREAD'S :-​The thread tab on the right of devices view shows informatiom related to the thread for each process selected in the devices view.The information shown can described as follows.
ID :- A unique ID assigned to each thread dby Dalvik V,, which are only odd numbers that start from 3 .
Tid :-The linux thread associated with each thread , ehich matches the process ID for each main thread in a process.
Status :- Status of the thread in VM , out of daemons are marked with an asterix.other values can be among running?sleeping/init/starting.
HEAP​ :-
the heap view show a information and statistics about memory heap .To view heap usage,follow these below steps
From the devices view,select the process for heap usage which has to be examined.
click on update heap
From heap Tab , select Cause GC to enable collecting heap data
Everytime you need to update your heap statistics.This will show you the amount of memory allocated to each
ALLOCATION TRACKER​The allocation Tracker show a real time information about allocation happening in the application over a certain period of time.To enable allocation Tracking.
[*]select the process to be tracked from device panel
[*]click on start tracking from allocation tracker tab.
[*]perform any actions on the devices or emulator that you want to be tracked.
[*]click on Get Allocations objects, since tracking was enabled .
NETWORK STATISTICS​ ;-
The network tab allows you to track and optimize the amount of network data your app is using.It even allows you to tag network sockets so that you can differentiate between types of data .It will indicate the speed and amount of data received /transmitted ..
EMULATOR CONTROL :-​One problem with testing Android devices using an emulator or developer device is the fact that it is unable to examine the performance of the app in the reak world conditions . like call or SMS is received/sent or when a particular location is reached.To be specific the emulator Tab allows you to to emulate the following real world conditions :
Telephony Status :- the following options are available to set the status of phones network.
Voice :- unregistered,home,roaming,searching,denied.
Data :- unregistered,home,roaming,searching,denied.
Speed :- Full,GSM,HSCSD,GPRS,EDGE,UMTS,HSDPA.
Latency :- GPRS,UMTS
Telephony Actions :- Telephony actions allow you to spoof the network.
Location Settings ;- Emulator control allows you to sppof the location
FILE EXPLORER :-​As the name says it lets you view the directory and file structure if the device and lso easily copy files to and from the emulator so as to enable easy data transfer in a manner similiar to ADB or ADB pull command.
SYSTEM INFORMATION :-​As the name says , it give's us the particular information about the GPU load , CPU load....
DDMS HAS ALSO AN INBUILT LOGCAT VIEWER :-​
​
​
CREDITS ;-
Google for everything
paxChristos for an command line
iamareebjamal for helping me :silly:
if i forgot you , just PM me .. i will be very glad to add it ..
great ,useful guide. many thanks

Categories

Resources