[Tutorial] How to install Android SDK tool & HTC's drivers [BEGINNERS FRIENDLY] - One (M7) General

[SIZE="+1"]-- Android SDK/ADB tool Tutorial --[/SIZE]​
I decided to create this Beginner Friendly tutorial on how to install SDK tool mainly because recent phones such as the i.e. HTC One X / One X+ are requiring many basic usage of adb command line, and lots of members are having difficulities to have basics adb command to work because their SDK tool is not correctly installed. I won't show you how to make usage of it, there is plenty of How-to's for that purpose all around xda and on the Web.
This is all safe to install on your Windows based computer, and if you can not achieve success with this installation, well obviously, you shouldn't play the hacking game with your device. From now on, I or anyone else on the Internet can not be held responsible if something really bad is happening to you because you didn't read and followed any given instructions letters by letters and you ended with a screwed, pricey and valuable paperweight device. That being said, let's get started.​
Let's GO!
____________________________________________
[SIZE="+1"]-- Enabling USB debugging mode --[/SIZE]
On your phone simply follow this path : Settings -> Developer options -> Turn the option ON -> under Debugging -> tick USB debugging option Debug mode when USB is connected
That's it, done!
____________________________________________
[SIZE="+1"]-- Java Installation --[/SIZE]
This is a prerequisite to have a flawlessly working SDK tool installation.
Click on the following link to download it on Java's website : Free Java Download
On the next page, do not click on Agree and Start Download, instead click on See all Java downloads.
Which should you choose? If you have a 64-bit Windows OS you MUST install the two versions (both 32-bit and 64-bit), otherwise the 32-bit is sufficient for a 32-bit Windows OS.
Before installing the latest version of Java, it is recommended to uninstall all previous Java's installation. (How to -> Remove Older Versions)
Complete the required installation depending of the type of Windows installation.
You are all done for Java.
-- Screenshots for the visual ones --
{
"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"
}
____________________________________________
[SIZE="+1"]-- SDK Tools Installation --[/SIZE]
First step is to download the SDK Manager, to do so click on this link -> Download the SDK
Next locate on the bottom of your screen the USE AN EXISTING IDE, click on it.
On the Get the Android SDK page, tick the I have read and agree with the above terms and conditions box and click on the Download the SDK Tools for Windows button.
Navigate to your Download folder, and locate a file named like this: installer_r21.1-windows.exe (N.B. The r21.1 version was available when I did this how to, your version could be different.)
Double click on the installer_r21.1-windows.exe file to start the installation. Take good note where the file will be installed, generally the default SDK path is : C:\Users\your_session's_name\AppData\Local\Android\android-sdk.
Now, navigate to the path of the SDK installation folder.
Select all (CTRL + A) in this folder and Copy (CTRL +C) them for the next step.
Now you need to create a new folder at the root of your C:\ drive named : AndroidSDK
Open up the newly created folder and Paste (CTRL + V) the previously copied files.
Stay in this folder and double click on the SDK Manager icon.
The SDK Manager will open a new window, click on Deselect All, then tick the following line in Tools : AndroidSDK Platform-tools
Click on Install 1 Package..., accept the license agreement and click on Install let the manager do it's thing.
Click on Done and close the manager's window.
Congrats! You have created successfully your SDK tool!
Wait! Let's clean your computer a bit....
Go back to the previous folder, the one located in this path : C:\Users\your_session's_name\AppData\Local\Android\android-sdk
Click on the Uninstaller, we don't need this one anymore. Don't worry the other AndroidSDK folder won't be deleted.
Voilà! You are done with this part.
-- Screenshots for the visual ones --
____________________________________________
[SIZE="+1"]-- Creating of script file for a fast access --[/SIZE]
Locate the Platform-tools sub-folder in the AndroidSDK folder.
Right click in a empty space of the folder and select in the contextual menu New -> Text Document
Open this new Text Document and Copy/Paste this : c:\windows\system32\cmd.exe
Save this file as : Start SDK.bat
Acknowledge the : If you change file extension... warning.
Right click your new created Start SDK and send a shortcut on your Desktop.
Done! If you try to double click on your Start SDK shortcut, a command window should open with something like these lines :
Code:
C:\AndroidSDK\platform-tools>c:\windows\system32\cmd.exe
Microsoft Windows [version 6.1.7601]
Copyright (c) 2009 Microsoft Corporation. All rights reserved.
C:\AndroidSDK\platform-tools>
Success!
____________________________________________
[SIZE="+1"]-- Installing HTC's Drivers --[/SIZE]
This one is very easy, simply download and run the installer and let Windows do the rest. Drivers compatbile 32-bit or 64-bit
Download the Self-install HTCDriver_4.0.1.001.exe/
Make sure your phone is not plugged on your computer via the USB cable.
Simply run the installer of the driver you've just downloaded.
Once the installation is completed, simply plug your phone via your USB cable and Windows "wizard manager" will now detect your phone.
If it doesn't work, unplug your phone and reboot your computer. Then plug back your phone once rebooted.
Done!
-- Screenshots for the visual ones --
____________________________________________
[SIZE="+1"]-- Let's try all this! --[/SIZE]
With your phone plugged on your USB cable...
From your Desktop, double click on your Start SDK shortcut.
In the command window, at the command line : C:\AndroidSDK\platform-tools> type this -> adb devices (Enter)
The serial number of your phone should appear in the command window. If it is the case, then try this again : C:\AndroidSDK\platform-tools> type this -> adb reboot (Enter)
Your phone will now Reboot
If all this worked, you have a successful SDK Tools installation!
-- Screenshots for the visual ones --
This is it, I hope this tutorial was helpful, if you have some sort of problems let me know, I will try to help you at the best of my knowledge. Have fun hacking your Android!!

Nice guide
Very concise

Lucky Thirteen said:
[SIZE="+1"]-- Android SDK/ADB tool Tutorial --[/SIZE]​
I decided to create this Beginner Friendly tutorial on how to install SDK tool mainly because recent phones such as the i.e. HTC One X / One X+ are requiring many basic usage of adb command line, and lots of members are having difficulities to have basics adb command to work because their SDK tool is not correctly installed. I won't show you how to make usage of it, there is plenty of How-to's for that purpose all around xda and on the Web.
This is all safe to install on your Windows based computer, and if you can not achieve success with this installation, well obviously, you shouldn't play the hacking game with your device. From now on, I or anyone else on the Internet can not be held responsible if something really bad is happening to you because you didn't read and followed any given instructions letters by letters and you ended with a screwed, pricey and valuable paperweight device. That being said, let's get started.​
Let's GO!
____________________________________________
[SIZE="+1"]-- Enabling USB debugging mode --[/SIZE]
On your phone simply follow this path : Settings -> Developer options -> Turn the option ON -> under Debugging -> tick USB debugging option Debug mode when USB is connected
That's it, done!
____________________________________________
[SIZE="+1"]-- Java Installation --[/SIZE]
This is a prerequisite to have a flawlessly working SDK tool installation.
Click on the following link to download it on Java's website : Free Java Download
On the next page, do not click on Agree and Start Download, instead click on See all Java downloads.
Which should you choose? If you have a 64-bit Windows OS you MUST install the two versions (both 32-bit and 64-bit), otherwise the 32-bit is sufficient for a 32-bit Windows OS.
Before installing the latest version of Java, it is recommended to uninstall all previous Java's installation. (How to -> Remove Older Versions)
Complete the required installation depending of the type of Windows installation.
You are all done for Java.
-- Screenshots for the visual ones --
____________________________________________
[SIZE="+1"]-- SDK Tools Installation --[/SIZE]
First step is to download the SDK Manager, to do so click on this link -> Download the SDK
Next locate on the bottom of your screen the USE AN EXISTING IDE, click on it.
On the Get the Android SDK page, tick the I have read and agree with the above terms and conditions box and click on the Download the SDK Tools for Windows button.
Navigate to your Download folder, and locate a file named like this: installer_r21.1-windows.exe (N.B. The r21.1 version was available when I did this how to, your version could be different.)
Double click on the installer_r21.1-windows.exe file to start the installation. Take good note where the file will be installed, generally the default SDK path is : C:\Users\your_session's_name\AppData\Local\Android\android-sdk.
Now, navigate to the path of the SDK installation folder.
Select all (CTRL + A) in this folder and Copy (CTRL +C) them for the next step.
Now you need to create a new folder at the root of your C:\ drive named : AndroidSDK
Open up the newly created folder and Paste (CTRL + V) the previously copied files.
Stay in this folder and double click on the SDK Manager icon.
The SDK Manager will open a new window, click on Deselect All, then tick the following line in Tools : AndroidSDK Platform-tools
Click on Install 1 Package..., accept the license agreement and click on Install let the manager do it's thing.
Click on Done and close the manager's window.
Congrats! You have created successfully your SDK tool!
Wait! Let's clean your computer a bit....
Go back to the previous folder, the one located in this path : C:\Users\your_session's_name\AppData\Local\Android\android-sdk
Click on the Uninstaller, we don't need this one anymore. Don't worry the other AndroidSDK folder won't be deleted.
Voilà! You are done with this part.
-- Screenshots for the visual ones --
____________________________________________
[SIZE="+1"]-- Creating of script file for a fast access --[/SIZE]
Locate the Platform-tools sub-folder in the AndroidSDK folder.
Right click in a empty space of the folder and select in the contextual menu New -> Text Document
Open this new Text Document and Copy/Paste this : c:\windows\system32\cmd.exe
Save this file as : Start SDK.bat
Acknowledge the : If you change file extension... warning.
Right click your new created Start SDK and send a shortcut on your Desktop.
Done! If you try to double click on your Start SDK shortcut, a command window should open with something like these lines :
Code:
C:\AndroidSDK\platform-tools>c:\windows\system32\cmd.exe
Microsoft Windows [version 6.1.7601]
Copyright (c) 2009 Microsoft Corporation. All rights reserved.
C:\AndroidSDK\platform-tools>
Success!
____________________________________________
[SIZE="+1"]-- Installing HTC's Drivers --[/SIZE]
This one is very easy, simply download and run the installer and let Windows do the rest. Drivers compatbile 32-bit or 64-bit
Download the Self-install HTCDriver_4.0.1.001.exe/
Make sure your phone is not plugged on your computer via the USB cable.
Simply run the installer of the driver you've just downloaded.
Once the installation is completed, simply plug your phone via your USB cable and Windows "wizard manager" will now detect your phone.
If it doesn't work, unplug your phone and reboot your computer. Then plug back your phone once rebooted.
Done!
-- Screenshots for the visual ones --
____________________________________________
[SIZE="+1"]-- Let's try all this! --[/SIZE]
With your phone plugged on your USB cable...
From your Desktop, double click on your Start SDK shortcut.
In the command window, at the command line : C:\AndroidSDK\platform-tools> type this -> adb devices (Enter)
The serial number of your phone should appear in the command window. If it is the case, then try this again : C:\AndroidSDK\platform-tools> type this -> adb reboot (Enter)
Your phone will now Reboot
If all this worked, you have a successful SDK Tools installation!
-- Screenshots for the visual ones --
This is it, I hope this tutorial was helpful, if you have some sort of problems let me know, I will try to help you at the best of my knowledge. Have fun hacking your Android!!
Click to expand...
Click to collapse
This works fine on windows 8 I needed that for my HTC Desire C and I managed to do with this! Thank you!

I didn't know about that shortcut. Very nice.

:good:
Why isn't that driver link in a stickied thread?? Solved my connectivity issues.

Rooting My Htc Desire C
I need to know How to root my HTC DESIRE C ,like this beginner friendly method.Many websites are showing different ways to do it and some ways didn't work for some people iam afraid my phone becoms a brick.so please help xda developers.
And this helped a lot....Thank You So Much

I have the HTC One for AT&T, I have the drivers installed and everything works fine when the phone is powered on I can transfer stuff back and forth easily. Although as soon as I boot my into the bootloader and select the fastboot and fastboot usb and when I run my adb devices in the CMD it comes up blank under the devices connected with several cables in all 4 usb ports. What is wrong? Help please

this helped me thanks. I followed everything to the tee. I only had a problem with changing the .txt to.bat extension however in notepad choosing save as and adding ".bat" in quotation marks allowed me to change the file extension

What an awesome tutorial! Thank you very much flawless!!! :good:

can you delete the android-sdk folder once everything is finished?

please ppl can u upload sdk for me ? i can not do it , iran is banned from google . just one developer man
here is my requested thread
http://forum.xda-developers.com/and...k-23-0-5-android-l-api-21-api-20-api-t2915318

Related

[Request] Video Screen Recording

thats it....
i need a program / app / way to video recording the screen of the phone.
sorry if i posted this on the wrong section, but i dont know if this go to the app and them section or in this one.
Thanks
Budske
no one know how to do it??
man that would be nice to have.
never heard of anything.
or maybe help me making an AVD emulator with my nandroid or rom zip file
no one know??
Budske said:
no one know??
Click to expand...
Click to collapse
Here's an tutorial:
I can't post links, but try here for pictures and more details.
www[dot]lgoptimusone[dot]net/?p=42
First of all you need to download and install the following software:
* Java Development Kit 1.6+ (i have used this version)
1. Click Download button.
2. Select your Windows version from menu and click Continue. User name and password are optional.
3. Click on the link to start download. Size ~ 80MB.
4. Run jdk-6u21-windows-i586.exe and follow instructions on the screen. You may accept all the defaults.
* Android SDK (download link here)
1. Download installer_r09-windows.exe.
2. Run installer_r09-windows.exe.
3. After the setup is completed press Next
4. Uncheck "Start SDK Manager" and press Finish
* Windows USB driver & Platform Tools
1. Your phone must NOT be connecter to your computer.
2. Run SDK Manager.exe (Default path “C:\Program Files\Android\android-sdk-windows\”)
3. ONLY THIS TIME PRESS CANCEL IN THIS WINDOW.
Press Cancel
4. Click Available packages on the left menu.
Select "Available packages"
5. Expand the Android Repository and check “Android SDK Platform-tools” box.
SDK Manager
Check "Android SDK Platform-tools"
6. Expand Third party Add-ons then Google Inc. add-ons and check “Google USB Driver Package” box.
Check "Google USB Driver Package"
7. Click Install Selected.
Click "Install Selected"
8. Click Accept All to accept License and then click Install.
Click Accept All to accept License and then click Install.
9. When install finishes, the USB Driver will be in “C:\Program Files\Android\android-sdk-windows\google-usb_driver“.
10. Close SDK Manager.
11. Connect your phone. You will be prompted for driver, which is located in the path mentioned above.
12. For more details installing driver click here.
* It’s not over yet, you need to set-up another few things:
1. Make sure that standard SDK tool ddms.bat (location: “C:\Program Files\Android\android-sdk-windows\tool”) launches successfully. Otherwise Screen Capture Tool won’t work either. If ddms won’t launch even after you have accomplished the step above, try disconnecting your phone, then launch ddms and then connect your phone back.
2. Copy adb.exe from platform-tools to tools folder.
3. Also copy AdbWinApi.dll and AdbWinUsbApi.dll from platform-tools to tools folder.
4. Enable USB Debugging on your phone.
Enable usb debugging on Lg Optimus One.
Press Settings
Enable USB debugging on Lg optimus one
Press Applications
Enable usb debugging on lg optimus one
Press development
Enable usb debugging on lg optimus one
Check "USB debugging" box
* Last step!
1. Download Android Screen Capture from here.
2. Run AndroidScreenCapureSetup.vX.X.exe.
3. Follow installer instructions.
4. When finished, run application and go to File -> Set Android SDK folder to set SDK path.
Look up shootme in the market
Sent from my Nexus One using XDA App

[GUIDE]Install Android SDK and upgrade Marketplace to 2.2.6

FIRST OF ALL, I CAN NOT BE HELD RESPONSIBLE FOR ANY DAMAGE YOU DO TO YOUR DEVICE! PROCEED AT YOUR OWN RISK!!!​
Now that we got that out of the way...
I have noticed that some people`s Marketplaces simply refuse to update by themselves (exactly what happened in my case) and as most of the people visiting this forums are not tech-savvy and simply want a step-by-step guide to get things working, I decided no harm can be done by me posting this info.
Installing Android SDK revision 8
First of all, you will need to have Android SDK (and ADB of course) installed with the drivers ready to go. In order to get the SDK installed go to the official Android website and download the latest revision (r08 at the time I posted this). You can download any of those files, but I prefer using the executable installer so I can make sure everything is at its place. Now, there are two major flaws with this whole process which have almost made me quit the whole process several times, but I got them sorted out and will help you solve them aswell.
FLAW #1: After beginning the installation process, the installer will prompt you to download a JDK (Java Developer Kit) in order to continue installation. Hit the "Visit sun.java.com" button and download the latest Java SE (currently this one). But before proceeding be sure to download the 32 bit one, as the Android SDK only recognises this version. I know it`s not a big deal, but I spent about two hours trying to figure out what the heck went wrong and it became quite frustrating.
Install the JDK, then the SDK. Once Android SDK is done, simply go ahead and launch SDK Manager (you can find it in Program Files\Android\android-sdk-windows\) and when you get to choose the packages to install, simply check "Accept All" and click "Install". Once it`s done, it`s time to download the drivers. Click "Available packages", tick "Third party Add-ons" and under "Google Inc. add-ons" you should find "Google Usb Driver package". Tick it and click "Install". IF YOU GET AN ERROR SAYING THAT PERMISSION WAS DENIED AND YOU ARE UNDER WINDOWS 7, COPY THE WHOLE "Android" FOLDER CONTAINING THE SDK TO YOUR DESKTOP (OR ANY OTHER PLACE) AND REPEAT THE STEPS ABOVE. I know it`s quite rudimentary, but it does its job. Once it`s done, a folder named "google-usb_driver" will be created under Android. Be sure to correctly copy it to the original location in case you had permission issues.
FLAW #2: Ever since Android SDK r08, Google decided to remove the ADB files so now they have to be manually placed in the folder. I have uploaded them for you, so click here to download them. Once downloaded, extract the archive to the "Android\android-sdk-windows\tools" folder.
OPTIONAL: Go to Start Menu, right click on Computer, click Properties. The System window will appear, where you need to go to "Advanced system settings". Once there, click on "Environment variables" and where it says "System variables", look for PATH. Once found, highlight it and click "Edit..." then add the line "C:\Program Files\Android\android-sdk-windows\tools;" at the end. Click "Ok", "Ok" and "Ok", then restart your computer.
Right now everything should be working as expected. Connect your HD2 to the PC via USB and hope for the best. If the drivers are working and it is recognized as a HTC device, open a command prompt and type "adb devices". If you get anything such as "List of devices attached" followed by some code such as "0123456789ABCDEF device", everything is working well. Good job, you just correctly and completely installed Android SDK on your PC!
If not...
Check your device manager and if you see any devices related to your HD2 having problems, simply right click on them and update the drivers with the ones downloaded earlier in the "google-usb_driver" folder then reboot your computer.
We`re all set! ...What now?
The whole process is actually quite simple. First of all, download the new 2.2.6 Marketplace and put it somewhere accessible, such as your desktop. Open a command prompt and enter the following:
Code:
adb remount
adb shell
rm /system/app/Vending.apk
This will basically delete the old Marketplace from your device.
Now go to the folder where you placed the new Marketplace, hold down Shift, right-click and select "Open command window here". A command prompt should pop up at the exact location. Now execute the following command:
Code:
adb push Vending.apk /system/app
And that is it! Now restart your device and try to run your Marketplace, it will load for half a minute or so then it will start normally. Enjoy!
I know this is rather a tutorial for installing the SDK, but I figured it would be useful to let everyone know how I managed to solve my problem. In case I skipped any steps or you notice anything wrong/wish to add anything, please feel free to do so!
If you feel my post has helped you in any way, do not hesitate to hit the "Thank" button!
Reserved post for further mini-tutorials.
At least on my r08 install if you install the platform tools component then adb will be available under the platform-tools directory (moved from the tools directory).
@OP
Did you test this on a non sense build?
This procedure will most likely not work with Cyanogenmod ROMs. That and I'd suggest you give the newest market version (2.2.7) instead. I'm not willing to destroy my ROM again by trying it on CM.

[GUIDE] Set up ADB and Fastboot on a Mac easily (With Screenshots!)

Ok, so I'm going to make a little write up on how to easily install ADB and fastboot on a Mac. It's actually quite simple, and plus you don't have to worry about drivers like in Windows.
Instructions
First, make a folder named "android" (no quotes of course ) You can place it anywhere on your hard drive, it doesn't really matter. Put it somewhere you'll easily remember, because you're going to be using it a LOT. I placed mine on my desktop.
{
"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"
}
Next, you'll want to download the android SDK from Here. (you won't need to install Java first like you would on a Windows PC, though I would recommend it anyway)
(As pointed out by Wlmeng11, you could skip this step just download a zip that I will have attached at the bottom of the page containing the adb and fastboot files instead of downloading the whole SDK)
When the SDK finishes downloading, Unzip it and the contents of the "android-sdk-mac_x86" folder into your android folder.
Once you have done that, open your android folder. Go into the tools folder inside of it. Double click on the file called "android" (possibly called android sdk) This file is a UNIX executable and will open within a Terminal window.
When it finishes opening, check the folder called tools. Make sure both "Android SDK Tools" and "Android SDK Platform-tools" are selected within the tools folder. Click install and wait for them to download.
When they finish downloading, go into the platform-tools folder inside your android folder, then copy adb and fastboot and paste them into the root of your android folder.
Now that you have adb and fastboot installed, we're going to want to test them to make sure they work.
Go ahead and plug in your android device at this time. Make sure android debugging is enabled in settings. Go into Settings > Apps > Developer and check it there (for Gingerbread 2.3 and lower) or go into Settings > Developer Options and check it there for Ice Cream Sandwich or Jellybean. As of now, there are two ways to access adb and fastboot.
Open a Terminal window (look in Applications > Utilities if you can't find it). Type "cd" followed by the path you saved your android folder to (I'm going to use the Desktop for this demonstration) it should look like this
Code:
cd /Users/<yourusername>/Desktop/android
Press enter.
Now you need to actually execute an adb or fastboot command. To do this, you'll need to type "./adb (or fastboot) <command>" For this tutorial, we will use "ADB devices" since it doesn't actually do anything to the phone. (we won't use fastboot since it requires rebooting to the boot loader which is different for every device)
In the same terminal window as before type the following:
Code:
./adb devices
then hit enter. It should turn up your device's serial number. If it does, proceed to the next step, if not recheck your steps, then leave a post in this thread.
(if it says * daemon not running. starting it now on port 5037 *
* daemon started successfully * that is perfectly normal)
Now, at this moment, ADB and Fastboot are both completely useable. However, it's very annoying to have to CD into the directory and use ./ in front of every terminal command. I'll show you how to add it to your path so you don't have to do any of that.
Open a new Terminal window and type
Code:
nano ~/.bash_profile
it will open a window that looks like this:
(Yours will probably be blank, because I've added a lot of stuff to mine over the years)
Add a line to it that contains the path to your android folder. (again, I'm using Desktop) It should look like this
Code:
export PATH=${PATH}:/Users/<yourusername>/Desktop/android
Once you have added that, press CTRL+X to exit, then Y to confirm the save then press enter. It will close the nano editor. You can close the Terminal window now.
Now we need to verify that it works. Open a new Terminal window and type
Code:
adb devices
If it shows the serial number, then you have set it up successfully and are good to go!
If you have any questions or issues let me know in the thread below.
If this has helped, please press thanks!
Awesome! This made the front page of XDA Thanks guys!​
Added screenshots
you won't need to install Java first like you would on a PC
Click to expand...
Click to collapse
So... Macs are Impersonal Computers?
---------- Post added at 06:24 PM ---------- Previous post was at 06:17 PM ----------
Nice guide though btw
wlmeng11 said:
So... Macs are Impersonal Computers?
---------- Post added at 06:24 PM ---------- Previous post was at 06:17 PM ----------
Nice guide though btw
Click to expand...
Click to collapse
Lol I'll fix that. Thanks btw. I'm out today, but I'll give you one tomorrow (too lazy to use my phone)
To save time, you might want to just have a adb/fastboot combo instead of the entire sdk.
(BTW it's tomorrow )
Sent from my HTC Rezound
wlmeng11 said:
To save time, you might want to just have a adb/fastboot combo instead of the entire sdk.
(BTW it's tomorrow )
Sent from my HTC Rezound
Click to expand...
Click to collapse
Maybe, I actually use other parts of the SDK . Ill look into that though
AshtonTS said:
Maybe, I actually use other parts of the SDK . Ill look into that though
Click to expand...
Click to collapse
Well since this guide is primarily aimed towards users who only want to root their phone, rather than developers, adb/fastboot is really all you need.
So it would save time to just use an adb/fastboot combo.
I still prefer linux
I still prefer the linux enviroment, although its handy to have the adb on my macbook for when I'm not at home and have bricked my device :S
I had already got this setup, I just didn't know the ~/.bash_profile bit Now I know had to add my own programs as actual programs and not just aliases XD
First off, nice guide. I am still trying to understand why you've moved adb and fastboot from platform-tools, rather than export the path to that directory. Is there any particular reason?
EDIT: BTW, you've hit the front page on XDA.
Hi.
Would it be valid on a very old Powerbook Pismo running 10.4 Tiger??
Thanks in advance and regards.
wlmeng11 said:
Well since this guide is primarily aimed towards users who only want to root their phone, rather than developers, adb/fastboot is really all you need.
So it would save time to just use an adb/fastboot combo.
Click to expand...
Click to collapse
Indeed, though this method allows you to update your adb and fastboot via Android SDK Manager (ASM). Also, in cases where all you need is adb and fastboot, you can speed up future update checks by going to "Tools"->"Manage Add-on Sites..." in ASM and click on "Disable All" button in "Official Add-on Sites" tab. From there on Android SDK Manager will check only the default repository containing tools and APIs.
visor said:
First off, nice guide. I am still trying to understand why you've moved adb and fastboot from platform-tools, rather than export the path to that directory. Is there any particular reason?
EDIT: BTW, you've hit the front page on XDA.
Click to expand...
Click to collapse
It could be done that way, but I personally put other stuff in the android folder on my Mac, and also it's a bit quicker to just drag a file into one folder on your desktop than into a folder within a folder
straycat said:
Hi.
Would it be valid on a very old Powerbook Pismo running 10.4 Tiger??
Thanks in advance and regards.
Click to expand...
Click to collapse
You won't be able to install the SDK, but you can extract the android.zip to a folder named android on your desktop or wherever and use that in place of the SDK step
AshtonTS said:
You bet! this will work on any mac running any OS X (unless Google blocks the install of the SDK, but I have a way around that.
Click to expand...
Click to collapse
Actually, that's a PowerPC Mac, so Intel OSX software will not work.
There is no official support for PowerPC that I know of, but someone on XDA did make binaries for PowerPC.
Sent from my HTC Rezound
Edit: yup, official sdk is x86 only.
BTW, here's the link to the ported binaries.
http://forum.xda-developers.com/showthread.php?t=898744
So many graces, this thing has saved the life because I have not a PC windows, thank you still
varanhia said:
So many graces, this thing has saved the life because I have not a PC windows, thank you still
Click to expand...
Click to collapse
Glad it worked for you
Hi,
Thank you very much. Worked like a charm.
Regards,
Awesome thread. Thanks for taking out the time
DarkSorcerer said:
Hi,
Thank you very much. Worked like a charm.
Regards,
Click to expand...
Click to collapse
nigameash said:
Awesome thread. Thanks for taking out the time
Click to expand...
Click to collapse
Glad it helped you two
Sent from my HTC Sensation
Hi thanks so much for this. Ive been wanting something like this for months/ almost a year.
All the other guides didnt work for me, but this was simple and easy to follow.
Ive encountered one problem and its device specific. My nexus 7 tablet works great with adb, but my htc evo 4g lte doesnt. its rooted, and running cm 10 4.1.2. its debugged any idea how to make it see the device?
UPDATE. so i turned on my usb storage on the device and it now sees the phone. Great work!!!!
Am i going to have to connect storage to mac all the time for this to work on any device?

[WIN][TUTORIAL]HOW TO USE ADB,DDMS AND TAKE A LOGCAT {pictorial explanation}

{
"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​
THIS GUIDE HAS BEEN FEATURED ON XDA-PORTAL :highfive: .....still any doubt about this Mind blowing guide ?? ​​
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
doctor_droid said:
When you guys are experimenting on a custom rom (i.e. nightlies, betas, RC's, "just cooked", etc.), it's very likely that your phone might not boot correctly, fear not and instead, try using ADB there are loads of guides regarding how to properly set-up your PC for using ADB, starting by the Android SDK's page itself lol
Now, to do the said logcat, open a command window and do:
C:\Users\Dark> cd \\sdk\platform-tools [Hit ENTER!]
C:\\sdk\plarform-tools> adb.exe devices (just to make sure your computer detected your phone lol)
C:\\sdk\plarform-tools> adb.exe logcat -v long > somefile.txt (the "-v long" part creates a nicely formatted file )
That's it!! Remember to zip the file if it's too big
Another tip: Some phones are very catchy when under heavy issues (like mine ) in those cases, timing is essential between rebooting and getting your log, however!!! The adb logcat command makes sure to wait for the device to get detected
Click to expand...
Click to collapse
WIRELESS ADB​
1. ROOT IS NECESSARY !!
2. Enable USB debugging.
3. Install Wireless ADB from the play store
4. Activate it .
5. In your computer, open a command line (cmd.exe for windows), go to ADB's directory and type:
Code:
adb connect 192.168.0.3:5555
Keep in mind that the port (the :5555 part) is optional, the 5555 is the default one, usually you don't need to change it, unless you're using it
6. That's it ..!!
credits: @El_Dark
FAQ TO BE ADDED SOON .....
DDMS
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 :-​
​
Happy Developing and learning ​
CREDITS ;-
Google inc.
@iamareebjamal
@Nabs Zains
@amogh420
@srt99
@Maxx247
@iamareebjamal
@El_Dark
@doctor_droid
@CharsiBabu
@lokeshsaini94
@hellraiser
@Zeuscluts
@Partimus.prime
@Lifehacker7
if i forgot you , just PM me .. i will be very glad to add it ..
How to Remount system partition as R/W
Go into Platform tools which can be found in your Android folder..
Hold shift button and right click ..Select "open cmd window here" in the pop-up window ...
first type
Code:
adb shell
Get Root Privileges ..
Code:
su
then type
Code:
mount grep system
and then you'll get
Code:
mount grep system
Usage: mount [-r] [-w] [-o options] [-t type] device directory
Here fill the above command with neccesary system partition,appropriate device path and mount point ..Like
Code:
mount -o rw,remount -t yaffs /dev/block/stl12 /system
This is how it looks :
Code:
C:\Program Files (x86)\Android\android-sdk\platform-tools>adb shell
adb server is out of date. killing...
* daemon started successfully *
$ su
su
# mount grep system
mount grep system
Usage: mount [-r] [-w] [-o options] [-t type] device directory
#
nice one added to Guide Ride
Excellent guide! :good:
:laugh: COOL finnaly i found some tutorial
thx :good:
Nice guide. But you may wanna fix the problem.txt bit in the logcat part. It should be logcat.txt.
Thank you to you all ,for showering me with you best wishes.
sgt. meow said:
Nice guide. But you may wanna fix the problem.txt bit in the logcat part. It should be logcat.txt.
Click to expand...
Click to collapse
i will edit , just a second .thnk you for you little help.
nice guide bro...very good work...:good:
That's weird I posted a reply but it didn't actually post it on the forums, this should help a lot of new comers that have never really had a tut that explain ADB , even the more advanced users miss simple things.
Sent from my SGH-M919 using Tapatalk 4 Beta
can make a guide for Wireless ADB?
My device doesnt show up in the list....i do flashing on this system and everything else
Excellent guide. thank you. I was always under the impression that eclispe needs to be install to get ddms coz I saw ddms when I installed eclipse 2 yrs back. Good to know we can do it without eclispe.
Thanks alot.
shift + right click
ok when i click shift + right click i dont get to open a cmd window help.
My computer
Microsoft windows xp
media center edtition, version 2002, service pack 3.
I was reading this but i got no where.
http://forums.majorgeeks.com/showthread.php?t=214139&goto=nextoldest
ravvio said:
My device doesnt show up in the list....i do flashing on this system and everything else
Click to expand...
Click to collapse
please reinstall the drivers... and restart the computer.
if it still doen't work . follow this thread : - click me ..!!
don't download any firware from there,they aren't for your device .. just try what it is said there .. !!
mattoaida said:
ok when i click shift + right click i dont get to open a cmd window help.
My computer
Microsoft windows xp
media center edtition, version 2002, service pack 3.
I was reading this but i got no where.
http://forums.majorgeeks.com/showthread.php?t=214139&goto=nextoldest
Click to expand...
Click to collapse
Are you sure.. ??
-MR.WORLDWIDE- said:
please reinstall the drivers... and restart the computer.
if it still doen't work . follow this thread : - click me ..!!
don't download any firware from there,they aren't for your device .. just try what it is said there .. !!
Are you sure.. ??
Click to expand...
Click to collapse
Yes I am 100% sure, even read that article and can someone else running windows xp try shift right click
Sent from my SGH-T959V using xda app-developers app
mattoaida said:
Yes I am 100% sure, even read that article and can someone else running windows xp try shift right click
Sent from my SGH-T959V using xda app-developers app
Click to expand...
Click to collapse
Same here
EXCELLENT POST! This will come in very handy. Thank you.
mattoaida said:
Yes I am 100% sure, even read that article and can someone else running windows xp try shift right click
Sent from my SGH-T959V using xda app-developers app
Click to expand...
Click to collapse
vladimirheroj said:
Same here
Click to expand...
Click to collapse
Sorry guys i can't help you ...i don't know what's with that WINDOWS XP ..Please wait for some time,i will see if i can get some help for you both guys .
Thank you,
-MR.WW-

[Guide][How-To]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. 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
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 :-​
​
do press thanks button . if i have helped you,
​
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 ..
@puneeth.007...
Nice guide...thanks.
i9082 - 4.2.2 - rooted

Categories

Resources