Jump to content
adamgibbo

Things that might be useful for testing (Android)

Recommended Posts

Introduction

 

Now that Android Beta Testing is here we need ways of collecting logs so Victor and the team can fix the bugs easier and faster but unless you have root it can be hard or impossible without a computer so I've made a few guides so you can collect logs and take screenshots the guides are:

 

Section 1, How to Install the Android SDK (needed to collect logs and screenshots)

Section 2, How to take screenshots with and without root

Section 3, How to collect logs

 

Section 1, How to Install the Android SDK

 

First we need to make sure our computers have the necessary prerequisite ready for everything to work they are:

 

● Android SDK from here http://developer.android.com/sdk/index.html (use the .zip not the installer)

● Java SE Development Kit from here http://goo.gl/9KPGZ (Link shortened because it's long)

 

Step 1,

 

Once you've installed the Java SE Development Kit unzip the SDK and rename to 'android-sdk-windows' if it's not already then move it to C:\

 

Run SDK Manager.exe that's inside the 'android-sdk-windows' folder and download and on the 'Choose Packages to Install menu reject everything but 'Android SDK Platform-tools,revision 1' (See Picture Below)

post-75495-1292700491_thumb.jpg

 

Then go to the Avaliable packages tab and expand Third party Add-ons and select Google Usb Driver package, revision 4 (See Picture Below)

post-75495-1292700939_thumb.jpg

 

Step 2,

 

Now to make things easier later we're going to add the SDK to the system path

 

XP users: Go to Control Panel->System, Choose the 'Advanced' tab and then click 'Environment Variables'

Vista/Windows7 users: Type 'sysdm.cpl' in your start search box ->Press enter->Go to Advanced tab->Choose 'Environment Variables'

 

Now that you've got here locate *Path* under System Variables and click Edit, then add the following to the end of the string displayed with no spaces

;C:\android-sdk-windows\platform-tools

 

Step 3:

 

Now to enable Debugging on your Android Phone

 

Hit the menu button.

Choose Settings (fig 1)

Then choose Applications (fig 2)

Now click Development (fig 3)

Make sure USB debugging is checked (fig 4)

Done.

 

post-75495-1292547030_thumb.png post-75495-1292547039_thumb.png post-75495-1292547047_thumb.png post-75495-1292547057_thumb.png

 

Step 4,

 

Now to download the Driver so your computer knows what to do with the debugging

Go to the android-sdk-windows folder you moved to C:/ before and run SDK Manager.exe and download the USB Driver Package doing this should make a folder called google-usb_driver in the android-sdk-windows folder

 

Now, plug your phone in, just as if you were going to transfer a song or a picture. But this time don't pull down the shade and mount the SD card. You'll get a "Found New Hardware" message from Windows.

 

Select "Locate and install driver software."

 

Select "Don't search online."

 

Select "I don't have the disk. Show me other options."

 

Select "Browse my computer for driver software."

 

Now browse to the android-sdk-windows, and point Windows to the folder named google-usb_driver. Click the image below to enlarge it and see the google-usb_driver folder inside your Android SDK. (See Picture Below)

post-75495-1292701186_thumb.jpg

 

 

Leave 'Include subfolders' checked, and click 'Next.' Windows might ask you if you're sure. Say yes if it does. When windows does it's thing, and asks you if you want to install the "Google ADB interface driver" say yes.

 

Step 5,

 

If everything went ok in the previous steps then now ADB (Android Debug Bridge) should be working...hopefully :)

To check if everything is working open up command prompt and type 'adb devices' and you should get a message like this

post-75495-1292548209_thumb.jpg

 

If you see a serial number then it's worked...hurray

Edited by adamgibbo

Share this post


Link to post

Section 2, How to take screenshots with and without root

 

A: Without root

 

Step 1

Plug your phone into your computer and start up the ddms tool that's in the android-sdk-windows\tools folder double click the icon. (see the picture below)

post-75495-1292550211_thumb.png

 

Step 2

Just wait while it connects to your Android phone, then select device -> screen capture from the menu bar. (See the picture below)

post-75495-1292550313_thumb.png

 

Step 3

Now Set up the image you want to capture, and hit the refresh button (see the image below). When you're satisfied with the results, click save and tell the ddms program where to save it.

post-75495-1292550708_thumb.png

 

And that's it!

 

A: With root

They are a lot off apps on the Android Market that are capable of screenshots I like 'drocap2' it has a few nice features like shake to take a screenshot and time delay

Edited by adamgibbo

Share this post


Link to post

Section 3, How to collect logs

 

If you get a 'force close' or a soft reboot (reboots but doesn't vibrate) you can use 'logcat' to collect logs and this is how

You will need to have successfully followed section 1 to do this.

 

**Warning**

Sometimes slightly sensitive information might be collected in your logcat so if you want you can delete the sensitive bits before posting or sent the logcat to Victor in a Private message (hope he doesn't mind me saying that)

 

Option 1

 

Connect your phone to your computer with the USB cable, open up command prompt and type 'adb logcat' and if you see lots of writing moving fast on the page (see below) then you have done it correct

post-75495-1292553852_thumb.jpg

 

Once you have reproduced the error again while 'logcat' is running press ctrl+c to stop the logging and right click in the window choose 'Mark' and then select everything from the bottom left to the top right of the window then press ctrl+c again to copy the text then paste the log into a txt file and post it or put the log onto Pastebin.com and sent the link

 

Option 2

 

You can use an App called Log Collector that's on the Android Market to send the link to as an email to kavmobile@kaspersky.com (Victor might not want to do this)

Edited by adamgibbo

Share this post


Link to post

Wow that took a long time...If anything is wrong I'll look at it tomorrow, if a mod or Victor wants to change something then feel free :)

 

I know doing all of that is a big pain but they are the only ways of doing it...complain to the Google Devs lol

 

Oh and I took bits and bobs from AndroidCentral, XDA-Develovers forum and other places around the web

 

Goodnight :D

 

adamgibbo

Edited by adamgibbo

Share this post


Link to post

adamgibbo: thank you very much!

P.S. We will send you some comments a bit later

Share this post


Link to post
Interesting, Thanks

But isn't part one a bit too much?

Yeah I agree it is a lot to do just to get a few logs and get a screen capture, blame Google lol, from what I've seen you have MIUI on your Desire so you'll have root anyway you could just use the apps I've mentioned.

 

I could of just made a guide on how to root phones but most of the time it voids your warranty and doing it wrong can 'brick' you phone and that's an unreasonable risk just to Beta test (Or not in our case :D)

 

adamgibbo: thank you very much!

P.S. We will send you some comments a bit later

 

No problem :) Yes...all comments and questions are welcome.

 

Regards adamgibbo

Edited by adamgibbo

Share this post


Link to post
Problem with step 4.:

Cant download usb driver, because there it isnt.

andsdk.jpg

 

Uploaded with ImageShack.us

 

I have already downloaded and instelled:

andinstalled.jpg

 

Uploaded with ImageShack.us

Did it install automatically or was it from a different time?

Share this post


Link to post
It installs automaticaly. After installation I choose this, from first pic.

That's good then it might be a new feature of the SDK, has everything else worked for you?

Share this post


Link to post

dont know. I do not using sdk. I installed it because of preparations for kms testing

aaha, I researched, and usb drivers are located in another menu:

andsdkaviv.jpg

 

Uploaded with ImageShack.us

 

andsdkinstalled.jpg

 

Uploaded with ImageShack.us

Edited by Korenisko

Share this post


Link to post
dont know. I do not using sdk. I installed it because of preparations for kms testing

aaha, I researched, and usb drivers are located in another menu:

andsdkaviv.jpg

 

Uploaded with ImageShack.us

 

andsdkinstalled.jpg

 

Uploaded with ImageShack.us

Cool, I'll update the guide later...thanks for letting me know :)

Share this post


Link to post
post-203837-1292692743_thumb.jpg

 

tried to verify that all working fine :/

Korenisko thank you for your input I've modified the guide...please tell me if you have any more troubles

 

Regards adamgibbo

Edited by adamgibbo

Share this post


Link to post

I have Vista pro.

Cant install driver from google usb... because previously (weekk ago) I connected phone to pc with usb debugging enabled. Now, when I connect phone to pc, I have SonyEricsson adb driver in device manager. I tried to remove it from dev manager, and re-conect phone, but it installs SE adb again. Is this problem, for which I cant verify adb working with cmd.exe?

Share this post


Link to post
I have Vista pro.

Cant install driver from google usb... because previously (weekk ago) I connected phone to pc with usb debugging enabled. Now, when I connect phone to pc, I have SonyEricsson adb driver in device manager. I tried to remove it from dev manager, and re-conect phone, but it installs SE adb again. Is this problem, for which I cant verify adb working with cmd.exe?

Try these drivers http://db.tt/2GWOvq4

 

If they don't work try http://db.tt/dpH3azk

Edited by adamgibbo

Share this post


Link to post

I still got trouble with the ADB to run. Maybe it´s cause of the installed HTC sync Programm :unsure:

I´ve done every step by step like in the description above. driver are allready there in goole folder but when i try to run cmd>adb comes error <_<

Edited by jens.pechmann

Share this post


Link to post

cmd don´t want "adb"

post-37879-1293492854_thumb.png

where to hell ist there something left ??

post-37879-1293493798_thumb.png

 

 

*it´s not the first time that i work with the adb.

i flash root and change rom on my milestone a lot before but now ....

Edited by jens.pechmann

Share this post


Link to post

Thank you adamgibbo for this useful guide!

My phone is rooted so i only downloaded the log collector and a screenshot capture program.

I think i am all ok, right?

Share this post


Link to post

Please can I suggest an addition to things that might be useful.

 

Make sure you have an email account with a sensible attachment file size limit. I got caught out by Tiscali's 10Mb limit. Thanks Dmitry for showing me the cause of the email delivery failure. I found out about Tiscali's limit by contacting them as a result of the delivery failure.

 

So instead I had to give an alternate email address. Google GMail has a 25Mb limit which is suitable at present so I gave my Gmail address instead which also means hassle free direct download to the phone.

Edited by antikythera

Share this post


Link to post

Would there be any benefit to me adding similar instructions to adamgibbo's for setting up and using the Android SDK tools on Linux? It works just as well.

Share this post


Link to post

Hi, Cant install driver from google usb... because previously (weekk ago) I connected phone to pc with usb debugging enabled. Now, when I connect phone to pc, I have SonyEricsson adb driver in device manager. I tried to remove it from dev manager, and re-conect phone, but it installs SE adb again. Is this problem, for which I cant verify adb working with cmd.exe?

Share this post


Link to post

×
×
  • Create New...

Important Information

We use cookies to make your experience of our websites better. By using and further navigating this website you accept this. Detailed information about the use of cookies on this website is available by clicking on more information.