Debugging on Device Tips and Tricks

Thanks guys,  I just tried it and the debugging on my old Droid is working fine.

adb and adt are same thing? 

No, they’re not the same.  Adt is a set of plugins for Eclipse to make native Android development easier.  It’s not relevant to Corona.  adb is a command-line tool for communicating with Android devices connected to your computer.  Among other things, it lets you install applications (.apk files) on your Android device and reviewing the log, both of which are essential for Corona development.

  • Andrew

where do I download the debugging tool.

I went to the android site and found this

http://developer.android.com/sdk/index.html#download

http://developer.android.com/sdk/index.html

From that page, you can download the entire “ADT Bundle” which will include adb as well as a lot of plugins for Eclipse that you don’t need (500mb).  Or you can scroll down on the page, click Download for Other Platforms, and then download just the SDK Tools, which will include adb and a few other things (only 80mb).

  • Andrew

I already downloaded the 500 mb one, if I start the sdk Manager will that work or should I re download the small size one?

The SDK Manager is an application that helps you install different versions of the Android SDK, useful if you’re developing natively for Android.  But you don’t need to worry about that.

Wherever you installed the Android SDK on your computer, go to sdk/platform-tools.  In that folder, you’ll see adb.exe.  If you’re on Windows, the easiest way to run it (or at least, the way I run it) is to navigate to that folder using Windows Explorer, hold Shift and right-click in the Window, then select Open Command Window Here.  Then you can run adb from the command line.  For example, you could run “adb devices” to see the devices that are tethered to your computer and you could run “adb logcat Corona:I *:S” to see the logs of Corona applications.

  • Andrew

Thanks Andrew

I am trying to debug my app which is only showing the background and no other image files and animation.

Hopefully your method will help me.

If I get stuck, I will knock again.

regards

Sunny

It is giving me the same message as to few people above - waiting for device.

Do I need to install some tools and debug apps in my phone also to make the connection?

Have you set your device to developer/debugging mode?  On your device, go to Settings|Applications.  Make sure “Unknown sources” is checked.  Also, go into Development and make sure “USB debugging” is checked.

Also, if you haven’t seen it already, you may find this blog post helpful: http://www.coronalabs.com/blog/2013/07/09/tutorial-basic-debugging/.

  • andrew

USB debugging is on.

But I am not finding the settings > application settings,

I have Samsung galaxy Tab 2

The exact wording may differ depending on your Android version and device, but search around a bit within settings and see if you find anything about allowing apps to be installed from non-market sources.  If not, then try going ahead without it.

  • Andrew

Got it connected, I had to sync it with Samsung Kies

Ok it worked thanks to the debugger I could pin point, the problem :  name was fine, but .png was .PNG and I had written .png, now it is working from test flight as well as by USB connection.

Thanks for all the help.

adb and adt are same thing? 

No, they’re not the same.  Adt is a set of plugins for Eclipse to make native Android development easier.  It’s not relevant to Corona.  adb is a command-line tool for communicating with Android devices connected to your computer.  Among other things, it lets you install applications (.apk files) on your Android device and reviewing the log, both of which are essential for Corona development.

  • Andrew

where do I download the debugging tool.

I went to the android site and found this

http://developer.android.com/sdk/index.html#download

http://developer.android.com/sdk/index.html

From that page, you can download the entire “ADT Bundle” which will include adb as well as a lot of plugins for Eclipse that you don’t need (500mb).  Or you can scroll down on the page, click Download for Other Platforms, and then download just the SDK Tools, which will include adb and a few other things (only 80mb).

  • Andrew

I already downloaded the 500 mb one, if I start the sdk Manager will that work or should I re download the small size one?

The SDK Manager is an application that helps you install different versions of the Android SDK, useful if you’re developing natively for Android.  But you don’t need to worry about that.

Wherever you installed the Android SDK on your computer, go to sdk/platform-tools.  In that folder, you’ll see adb.exe.  If you’re on Windows, the easiest way to run it (or at least, the way I run it) is to navigate to that folder using Windows Explorer, hold Shift and right-click in the Window, then select Open Command Window Here.  Then you can run adb from the command line.  For example, you could run “adb devices” to see the devices that are tethered to your computer and you could run “adb logcat Corona:I *:S” to see the logs of Corona applications.

  • Andrew