Paul Rogers
Android Fan
Profile
Posts: 2524
Reg: May 30, 2011
UK
35,740
06/11/12 08:12 AM (13 years ago)

Android - connecting your phone to logcat from the command line

Made an app. Error free on emulator but force closing on device. Did a bit of digging and got my phone working as an emulator. Instructions: (HTC Wildfire - different phones may have different options/settings). Settings > Applications > Development > Tick 'USB Debugging'. Attach phone to pc with usb cable. Your phones notification bar should have two options open - 'usb debugging connected' and the usb connection type. Tap usb connection type and select 'USB tethering' if it's not the default option. Hit 'done'. On your PC: XP Start > Run > cmd > OK VISTA Start > Accessories > Run > cmd > OK cd to your Android platform-tools directory. My default installation location is: C:Program FilesAndroid sooo... cd C:Program FilesAndroidandroid-sdkplatform-tools When you're in the platform-tools directory open up adb devices: type: adb devices Your phone should be detected. then type... adb logcat You'll get a ton of data scrolling down the screen. When it stops your phone will be connected to logcat and everything you do on your phone will have a logcat output! Screenshots: https://dl.dropbox.com/u/56760890/screenshots.pdf *Edit* The forum appears to be stripping out backslashes. So if there are no backslashes in the locations above, they should look like this, but with backslashes. ...I know what I'm trying to say... C:/Program Files/Android C:/Program Files/Android/android-sdk/platform-tools
 
MacApple
Apple Fan
Profile
Posts: 4675
Reg: Oct 25, 2010
USA
61,150
like
06/11/12 08:23 AM (13 years ago)
Good info, nice one. 35 mins to go mate.
 
Paul Rogers
Android Fan
Profile
Posts: 2524
Reg: May 30, 2011
UK
35,740
like
06/11/12 08:39 AM (13 years ago)
Posted this to take my mind off it Mac!
 
MacApple
Apple Fan
Profile
Posts: 4675
Reg: Oct 25, 2010
USA
61,150
like
06/11/12 09:09 AM (13 years ago)
Got my times wrong. 2pm KO my time.
 
MacApple
Apple Fan
Profile
Posts: 4675
Reg: Oct 25, 2010
USA
61,150
like
06/11/12 10:52 AM (13 years ago)
You happy with that then? Important not to lose first game so.....
 
Paul Rogers
Android Fan
Profile
Posts: 2524
Reg: May 30, 2011
UK
35,740
like
06/11/12 10:55 AM (13 years ago)
Happy with that Mac! We'll get out of the group now...
 
MacApple
Apple Fan
Profile
Posts: 4675
Reg: Oct 25, 2010
USA
61,150
like
06/11/12 11:06 AM (13 years ago)
I'd think so, yip.
 
MacApple
Apple Fan
Profile
Posts: 4675
Reg: Oct 25, 2010
USA
61,150
like
06/11/12 11:06 AM (13 years ago)
Miss Rooney, he'll be required in third game.
 
GoNorthWest
buzztouch Evangelist
Profile
Posts: 8197
Reg: Jun 24, 2011
Oro Valley, AZ
1,000,000
like
06/11/12 11:55 AM (13 years ago)
Not sure what "Miss Rooney" has to do with any of this, but nice little tutorial! ;-) Now I just need an Android device! Mark
 
MacApple
Apple Fan
Profile
Posts: 4675
Reg: Oct 25, 2010
USA
61,150
like
06/11/12 12:06 PM (13 years ago)
Ha! It should have read 'England will miss Wayne Rooney up front in attack' Mark, would have made more sense.
 
GoNorthWest
buzztouch Evangelist
Profile
Posts: 8197
Reg: Jun 24, 2011
Oro Valley, AZ
1,000,000
like
06/11/12 12:10 PM (13 years ago)
That certainly does make more sense!
 
MacApple
Apple Fan
Profile
Posts: 4675
Reg: Oct 25, 2010
USA
61,150
like
06/11/12 01:02 PM (13 years ago)
If anyone needs a favour from @Raveyd this would be a good time. Did you have a look at http://picture.io/ Mark? Looks interesting
 
GoNorthWest
buzztouch Evangelist
Profile
Posts: 8197
Reg: Jun 24, 2011
Oro Valley, AZ
1,000,000
like
06/11/12 01:03 PM (13 years ago)
I did take a look at picture.io...looks pretty interesting! Haven't had an opportunity to sit and do anything with it yet. Mark
 
MacApple
Apple Fan
Profile
Posts: 4675
Reg: Oct 25, 2010
USA
61,150
like
06/11/12 01:07 PM (13 years ago)
Will try over next couple of days and let you know. @Raveyd hope you didn't have too many adult beverages, there's dev work to be done!
 
Paul Rogers
Android Fan
Profile
Posts: 2524
Reg: May 30, 2011
UK
35,740
like
06/11/12 02:05 PM (13 years ago)
Weird. Whenever anyone posts, the backslashes in my first post disappear! 100% definitely happening, I'm not drunk! If anyone needs a favour, ask before Friday night! *Backslashes are there now...
 
Higgey
buzztouch Evangelist
Profile
Posts: 394
Reg: Sep 07, 2011
West Midlands
13,540
like
07/20/12 02:31 AM (13 years ago)
Thanks for this, raveyd. I've been trying to get my android tablet to act as an emulator for Eclipse.I've followed the above steps and it seemed to do everything correctly but I could not add my tablet as a device in the AVD manager. Any ideas on how I could get it to be recognised and add it as an emulator? John
 
Paul Rogers
Android Fan
Profile
Posts: 2524
Reg: May 30, 2011
UK
35,740
like
07/20/12 04:02 AM (13 years ago)
Fred?
 
Higgey
buzztouch Evangelist
Profile
Posts: 394
Reg: Sep 07, 2011
West Midlands
13,540
like
07/21/12 08:25 AM (13 years ago)
My apologies, raveyd. Post edited. John
 

Login + Screen Name Required to Post

pointerLogin to participate so you can start earning points. Once you're logged in (and have a screen name entered in your profile), you can subscribe to topics, follow users, and start learning how to make apps like the pros.