[newbie] USB debugging: "No device found"

Shohreh

Member
[SOLVED] [newbie] USB debugging: "No device found"

Hello

I followed the instructions in Connecting your device to the IDE to enable USB Debugging on the Archos tablet, then install the USB driver in Windows7, and write the "Hello, world!" sample.

But after hitting Project > Compile and run, filling the Package Name + Label sections, the IDE displays an error message:

No device found.
Please start an emulator by choosing Tools - Run AVD Manager or connect to a device with B4A Bridge by choosing Tools - B4A-Bridge - Connect

FWIW, Device Manager does include Android Phone > Android Composite ADB Interface, and I make sure the device is up and running (ie. no dark screen) when I run the above command.

What am I missing to have the IDE compile and upload the application to the device through the USB debugging mode?

Thank you.
 
Last edited:

Erel

B4X founder
Staff member
Licensed User
Longtime User
Do you see a notification message about USB debugging in the notifications screen?
SS-2012-05-09_15.07.56.png
 
Upvote 0

Shohreh

Member
Thanks for the help.

I see:
USB debugging connected: Select to disable USB debugging

USB connected: Select to copy files to/from your computer

Does the B4A IDE upload the APK file to the device, or is it a manual operation?

BTW, what's a good way to take a screenshot on the Archos tablet and upload it to my XP computer?
 
Upvote 0

Erel

B4X founder
Staff member
Licensed User
Longtime User
Does the B4A IDE upload the APK file to the device, or is it a manual operation?
The IDE uses ADB to install and run the APK. You can try to run "ADB devices" from the command line. Adb is part of the android SDK. See whether your device is listed.

The simplest way to take a screenshot is with Tools - Take screenshot. However you can only use it when USB debugging is working properly.
 
Upvote 0

Shohreh

Member
Thanks for the tip. Does it mean that
1. I have nothing else to do on the device
2. the IDE will use adb.exe to upload the APK file to the device
?

The tutorial doesn't mention having to configure the IDE for this, and only says
A program called adb.exe - Android Debug Bridge - is the key component that is used to communicate between programs on your desktop and the emulator or device. adb can be invoked without user intervention by programs such as Basic4Android and Eclipse but also has a command line interface that can be used by advanced users.

I'm also not clear about where the ADB daemon runs: On the PC or on the Android device?
adb can connect a device to the desktop by two different means, Wi-Fi and USB. In both cases for adb to recognise the device Settings -> Applications -> Development -> USB debugging must be checked. This runs the adb daemon on the device which communicates with adb on the desktop.
Here's what adb.exe devices says:
c:\android-sdk\platform-tools>adb.exe devices
* daemon not running. starting it now on port 5037 *
* daemon started successfully *
List of devices attached
A70-277A0002-9FFC0000-01636F0B-???U?U?? device
 
Last edited:
Upvote 0

Shohreh

Member
Yes, but it's too slow to be usable.

Is this what makes you say that the IDE might not recognize the device?
List of devices attached
A70-277A0002-9FFC0000-01636F0B-???U?U?? device

Also, the IDE contains a "Restart ADB Server option": When do we need to restart the server? Could it be that the ADB server/daemon isn't running on the device, even though USB Debugging is enabled?

Thank you.
 
Upvote 0

Shohreh

Member
Thanks for the info on how ADB works (adb.exe + ADB daemon on PC).

Found what it was: The device requires editing "%USERPROFILE%\.android\adb_usb.ini" to add 0x0e79.

FWIW, the command mentioned in the file "android update adb" doesn't work: "'android' is not recognized as an internal or external command, operable program or batch file.")

One last question: Where are applications located in Android? I looked around using the Files application, but didn't find the "Hello, world!" applet.
----------
Edit: Found the app by clicking on the 4x4 icon on the right.
 
Last edited:
Upvote 0

TimMitchell

New Member
Licensed User
Longtime User
ADB is a process that runs on the desktop not device. Sometimes restarting it may solve some strange errors.

I'm not sure why your device is not found by the IDE. I did check the code to make sure that the question marks do not break anything and I didn't find any problem.

The ADB restart sorted it out for me. Thanks.
 
Upvote 0
Top