Can't run android app on real device - android

I'm on a Windows 7 device (Archos 101 Internet tab/Prestigio 7100c). It's connected with PC via USB cable. USB debugging is enabled from device settings.
Device manager -> PMP7100c -> right click -> Update Driver Software
-> Search Automatically For Updated Driver Software
-> Driver Software For Your Device Is Up To Date.
Then I open Eclipse
Run -> Run Configurations and select active devices as target -> apply
-> Run -> "No active compatible AVD's or devices found.
Relaunch this configuration after connecting a device or starting an AVD."
Is "adb" driver different from Device Menager's "driver software for your device"?I assumed that it is different and downloaded adb driver from Archos site and I got some .zip file.How to configure it?

look for the USB driver for your device
install it
restart your command prompt

To install the Android USB driver on Windows 7 for the first time:
Connect your Android-powered device to your computer's USB port.
Right-click on Computer from your desktop or Windows Explorer, and select Manage.
Select Devices in the left pane.
Locate and expand Other device in the right pane.
Right-click the device name (such as Nexus S) and select Update Driver Software. This will launch the Hardware Update Wizard.
Select Browse my computer for driver software and click Next.
Click Browse and locate the USB driver folder. (The Google USB Driver is located in \extras\google\usb_driver.)
Click Next to install the driver.
Or, to upgrade an existing Android USB driver on Windows 7 with the new driver:
Connect your Android-powered device to your computer's USB port.
Right-click on Computer from your desktop or Windows Explorer, and select Manage.
Select Device Manager in the left pane of the Computer Management window.
Locate and expand Android Phone in the right pane.
Right-click Android Composite ADB Interface and select Update Driver. This will launch the Hardware Update Wizard.
Select Install from a list or specific location and click Next.
Select Search for the best driver in these locations; un-check Search removable media; and check Include this location in the search.
Click Browse and locate the USB driver folder. (The Google USB Driver is located in \extras\google\usb_driver.)
Click Next to upgrade the driver.

If you are on a mac and are pretty sure you should already have the drivers for the device then make sure to click the check mark next to 'USB debugging' inside the 'Developer Options' in settings. I can't tell you how dumb I felt when I unlocked the developer options by pressing the build number seven times then saw the developer options were unlocked and assumed usb debugging would automatically be selected only to find out 30 min later that I had to touch the little box. Yeah... don't do dumb kids!

You might have to change the active USB computer connection setting. I had the same problem while running a Beanstalk custom rom based on Android 4.3. It was solved by switching from the default Media device (MTP) to Mass storage. The device was then automatically recognized by eclipse.

Related

Unable to Use Android USB Drivers on Windows 10

Following the Standard instructions to make use of the USB Drivers for Android Development provided by Google here
http://developer.android.com/sdk/win-usb.html
Does not work on Windows 10
1) Right click on the Start menu and select Device Manager
2) Right click on the Android Device and select Update Driver
3) Select Browse my computer for driver software
4) Select Let me pick from a list of device drivers on my computer
5) Select have Disk and find the below location and paste in.
<SDK Location>\extras\google\usb_driver
Default location might be like below.
C:\Users\<your username>\AppData\Local\Android\android-sdk\extras\google\usb_driver
6) Click Next
7) Select the Android ADB Interface
8) Allow debugging on your device and your all set
You should now be able too easily develop on Xamarin or any other android platform and debug right to your device
After upgrading to windows 10, I tried all methods other than using the OEM provided USB cable for connecting my Galaxy Alpha phone. On using the USB cable which came along with the phone, it instantly got connected to my windows 10 pc.
I just found you need first to reboot windows (8/10) with feature Disable Driver Signature enforcement turned off, running command
shutdown /r /o
then selecting Troubleshoot, Advanced options, Startup Settings, Restart button and finally pressing F7 to "Disable Driver Signature enforcement" (just temporary until next reboot) as described below:
http://www.top-password.com/blog/how-to-disable-driver-signature-enforcement-in-windows-10-8-7/
Then, after you plug in Android device, you can see it in Device Manager, click Update Driver Software..., Browse My Computer for Driver Software, Let me pick from list of device ..., then there should be a button Have Disk and you should be free to pick a directory with downloaded Android USB Driver.
At least this option worked for me with combination of various ARM devices.

Intellij idea usb device debugging app doesn't load on phone

I have a nexus 4 and all the required drivers installed (the phone is recognized with the "adb devices" command).
When I try to debug my android app with Intellij idea over USB I get this output:
Waiting for device.
Target device: lge-nexus_4-xxxxxxxx
Uploading file
local path: C:\Users\Public\Documents\Java Projects\Test GDX Project\android\build\apk\android-debug-unaligned.apk
remote path: /data/local/tmp/com.testgdx.game.android
But nothing ever loads on my phone?
EDIT: After I manually installed the app once, usb device debugging started to work all of a sudden.
Trying using a different USB cable (i.e. original cable and not a cheap 0.99$ cable). for some devices, some cables are not compatible for debugging purposes.
Windows 7
To install the Android USB driver on Windows 7 for the first time:
Connect your Android-powered device to your computer's USB port.
Right-click on Computer from your desktop or Windows Explorer, and select Manage.
Select Devices in the left pane.
Locate and expand Other device in the right pane.
Right-click the device name (such as Nexus S) and select Update Driver Software. This will launch the Hardware Update Wizard.
Select Browse my computer for driver software and click Next.
Click Browse and locate the USB driver folder. (The Google USB Driver is located in \extras\google\usb_driver.)
Click Next to install the driver.

How to test android apps in a real device with Android Studio?

I started to develop in android with Android Studio IDE, I tested my apps on the emulator and works fine, but when I tried to test the apps directly in my device doesn't recognize it and the console shows next message:
Waiting for device. USB device not found
I configured "USB Device" in Run>Edit Configurations...> in tab "General", menu "Target Device"
I enabled the "Debug option" in my device
Plug/Unplug USB
I can run on my device at last, just I enabled the "USB debugging" and "Allow mock location" options from the Debug Menu of my device.
First we have to enable the USB debugging mode. for that go to Settings -> Developer Options ->USB debugging in your phone checked it and allow it.
After it open android studio, click on SDK manager , check mark the Google USB Driver and hit install package.
After Installing Google USB Driver, close SDK Manager window, Connect your phone or tablet through USB cable to your laptop or PC.
Now click on My Computer (Windows 7) (or) This PC(Windows 8.1).Select Manage.
Select Device Manager –> Portable Devices –> Your Device Name
Right Click on Your Device Name and Select Browse My Computer For Driver Software.
Point it to C:\Users\YourUserName\AppData\Local\Android\sdk\extras\google\usb_driver. Hit Next and Finish.
Now Hit Run Button after selecting Your Project in Project Explorer in Android studio. Choose your device and press OK.
I have a Nexus 4 and own a Thinkpad L430 Windows 8.1
My errors:
"Waiting for device.
USB device not found"
I went to: Device Manager > View > Drop to "Acer Device" > Right click on Acer Composite ADB Interface > Update it
Afterward, Reboot/Restart your computer. Once it turned on Plug Your USB Device onto the computer.
Go to: Setting > Enable "Developer options" > Check the "USB debugging" option > Check "Allow mock locations" > Check "Verify apps over USB".
Swipe down from the drop down menu of your phone where it Shows the USB Connection Icon. Tap on USB Computer Connection > Select the Check box "Camera (PTP)"
Run your Android Studio App and it should work
To test an android apps in a real device with Android Studio, You must keep two things in mind
You should enable USB debugging option on your android phone.
You must have driver installed on your computer.
Now , let me tell you how you can enable USB debugging on your android phone:
Go to Settings on your android phone
Scroll down to the bottom and click on About phone
On this menu also scroll down to the bottom, you should see something Build number
Click on Build number 7 times
Now your Developer Option enables, once you done click on back button and you should see a new option on your android screen i.e. Developer Options
Click On Developer Options
Scroll down until you see USB Debugging
Go ahead and click the check box next to the USB debugging
Now your USB Debugging option enables.
Connect your android device to your computer with the help of USB connector.
Now let me tell you how you can download the driver on your Windows PC:
Your windows machine need a software called driver to communicate with your phone.
Go To OEM USB Driver Website to install your appropriate driver
Scroll down and select the driver appropriate for your device.
Check the screen shoot
Once you download it , you have to unzip your file
After Installing Google USB Driver, close SDK Manager window, Connect your phone or tablet through USB cable to your laptop or PC.
Now click on My Computer (Windows 7) (or) This PC(Windows 8.1).Select Manage.
Select Device Manager –> Portable Devices –> Your Device Name
Right Click on Your Device Name and Select Browse My Computer For Driver Software.
Point it to C:\Users\YourUserName\AppData\Local\Android\sdk\extras\google\usb_driver. Hit Next and Finish.
Now Hit Run Button after selecting Your Project in Project Explorer in Android studio. Choose your device and press OK.
Step 1: Firstly, Go to the Settings in your real device whose device are used to run android app.
Step 2: After that go to the “About phone” if Developer Options is not shown in your device
Step 3: Then Tap 7 times on Build number to create Developer Options.
Step 4: After that go back and Developer options will be created in your device.
Step 5: After that go to Developer options and Enable USB debugging in your device as shown in figure below.
Step 6: Connect your device with your system via data cable and after that allow USB debugging message shown on your device and press OK.
Step 7: After that Go to the menu bar and Run app as shown in figure below.
Step 8: If real device is connected to your system then it will show Online. Now click on your Mobile phone device and you App will be run in real device.
Step 9: After that your Android app run in Real device.
Regards,
Guruji Softwares (https://gurujisoftwares.com)
For Android 7, Galaxy S6 Edge:
Settings > Developer Options > Turn the switch ON > Debugging Mode (Turn On)
If Developer Options is not available then
Settings > About Device > Software Info > Build number (Tap It 7 time)
Now perform step 1. Now it should work, if its still not working then perform these steps. It worked for me.
if you are using IOS react native platform and want to debugging real android device you can use following code:
adb reverse tcp:8081 tcp:8081
npm start -- --reset-cache
react-native run-android
You have to Download the driver for your Device just go to device manager-->> your device-->update driver-->choose the usb driver path from sdk extras folder and click next.
You can get the correct driver and you can run on real device
If USB Debugging Mode is enabled and does not work, you should install your device driver.
For Nexus Devices;
Install Google USB Drivers on SDK Tools.
Go to Control Panel > Device Manager and check drivers status.
(Probably you can see warning icon on ADB Interface Driver.)
Select ADB Interface driver and click update. Choose "Browse my
computer for driver software" and set folder path like
"D:\Users\userName\AppData\Local\Android\sdk".
For Another Devices;
If you install the model's driver, it may work. For ex: Samsung Kies,
LG PC Suite.
Hope it helps!
I tried #Mr. Stark answer. It didn't work. It failed to install the drive. I have Samsung S8 plus. I enabled the debugging mode on device then installed Android USB Driver for Windows from Samsung site, it works.
Other 2 step solution could be for Android Studio;
"After installing cellphone drivers" on your computer(if it is
needed? and device is not detected already in windows, most
cellphone are now a days plug and play or auto detected by the
windows, u can use windows "settings->devices" or "settings->phone"
or "control-panel->Devices & Printers" to see if your cellphone is
detected). If not you need to install devices drivers for your cellphone
possibly form its OEM or manufacturer website.
Open Project you want to run in your cellphone; Click,
Run -> Select Device... -> In popup menu select "Troubleshoot Device
Connections" at the bottom of the list, it is a wizard and it'll
guide you through all steps necessary to enable USB Debugging on
your cellphone.

Android AVD not recognizing device but adb does?

Android device chooser can't show my real device.
But device manager recognizes and I use Eclipse Juno,windows 7 and my device nexus 7, and I've already tried command: adb kill server and updating usb driver.
Pls update google usb driver.
link:http://developer.android.com/tools/extras/oem-usb.html
this link will help to solve the issue.
Connect your Android-powered device to your computer's USB port.
Right-click on Computer from your desktop or Windows Explorer, and select Manage.
Select Device Manager in the left pane of the Computer Management window.
Locate and expand Android Phone in the right pane.
Right-click Android Composite ADB Interface and select Update Driver. This will launch the Hardware Update Wizard.
Select Install from a list or specific location and click Next.
Select Search for the best driver in these locations; un-check Search removable media; and check Include this location in the search.
Click Browse and locate the USB driver folder. (The Google USB Driver is located in <sdk>\extras\google\usb_driver\.)
Click Next to upgrade the driver.

How to run my android app on a real tablet device?

I use eclipse + ADT (andoid development tool) plugin to develop my android application.
I know during my development, I can run my application either on an emulator, or an android phone device(with data cable connected to my laptop).
BUT, now, I would like to run my application on a android Tablet(ZTE brand) during my development. How can I run it on the tablet?? I mean the tablet has no data cable to connect to my laptop, but only bluetooth.
What I need to configure on eclispe?
Can I just use bluetooth to connect the device, and trigger the application to run from eclipse?
How to run my application on the tablet during development on eclipse?
Perhaps this question could help. It discusses how you can connect to adb through Wi-Fi.
I've found dropbox to be a great way to distribute test versions of your apk. Make sure you have the setting turned on for non-market sources. Then just pull it up from within dropbox on your device.
if there is no usb-cable you cannot debug yor application on the tablet.
you can only export the app with eclipse and install the apk on the tablet to see how the application looks like. But there is no debugging over bluetooth
As long as your device can install apps from non-market sources, you can simply put your APK file somewhere accessible to a web browser, then browse to it from the device, which should cause it to be downloaded. Once it's downloaded, selecting it (using a file explorer app) will cause it to be installed.
You can't debug this way, but if you have something like aLogCat loaded you can view your app's log messages.
With an Android-powered device, you can develop and debug your Android applications just as you would on the emulator. Before you can start, there are just a few things to do:
Declare your application as "debuggable" in your Android Manifest.
When using Eclipse, you can skip this step, because running your app directly from the Eclipse IDE automatically enables debugging.
In the AndroidManifest.xml file, add android:debuggable="true" to the element.
Note: If you manually enable debugging in the manifest file, be sure to disable it before you build for release (your published application should usually not be debuggable).
Enable USB debugging on your device.
On most devices running Android 3.2 or older, you can find the option under Settings > Applications > Development.
On Android 4.0 and newer, it's in Settings > Developer options.
Note: On Android 4.2 and newer, Developer options is hidden by default. To make it available, go to Settings > About phone and tap Build number seven times. Return to the previous screen to find Developer options.
Set up your system to detect your device.
If you're developing on Windows, you need to install a USB driver for adb. For an installation guide and links to OEM drivers, see the OEM USB Drivers document.
If you're developing on Mac OS X, it just works. Skip this step.
If you're developing on Ubuntu Linux, you need to add a udev rules file that contains a USB configuration for each type of device you want to use for development. In the rules file, each device manufacturer is identified by a unique vendor ID, as specified by the ATTR{idVendor} property. For a list of vendor IDs, see USB Vendor IDs, below. To set up device detection on Ubuntu Linux:
Log in as root and create this file: /etc/udev/rules.d/51-android.rules.
Use this format to add each vendor to the file:
SUBSYSTEM=="usb", ATTR{idVendor}=="0bb4", MODE="0666", GROUP="plugdev"
In this example, the vendor ID is for HTC. The MODE assignment specifies read/write permissions, and GROUP defines which Unix group owns the device node.
Note: The rule syntax may vary slightly depending on your environment. Consult the udev documentation for your system as needed. For an overview of rule syntax, see this guide to writing udev rules.
Now execute:
chmod a+r /etc/udev/rules.d/51-android.rules
Note: When you connect a device running Android 4.2.2 or higher to your computer, the system shows a dialog asking whether to accept an RSA key that allows debugging through this computer. This security mechanism protects user devices because it ensures that USB debugging and other adb commands cannot be executed unless you're able to unlock the device and acknowledge the dialog. This requires that you have adb version 1.0.31 (available with SDK Platform-tools r16.0.1 and higher) in order to debug on a device running Android 4.2.2 or higher.
When plugged in over USB, you can verify that your device is connected by executing adb devices from your SDK platform-tools/ directory. If connected, you'll see the device name listed as a "device."
If using Eclipse, run or debug your application as usual. You will be presented with a Device Chooser dialog that lists the available emulator(s) and connected device(s). Select the device upon which you want to install and run the application.
If using the Android Debug Bridge (adb), you can issue commands with the -d flag to target your connected device.
Installing a USB Driver
First, find the appropriate driver for your device from the OEM drivers table below.
Once you've downloaded your USB driver, follow the instructions below to install or upgrade the driver, based on your version of Windows and whether you're installing for the first time or upgrading an existing driver.
Tip: When you finish the USB driver installation, see Using Hardware Devices for other important information about using an Android-powered device for development.
Windows 7
Windows XP
Windows Vista
Caution: You may make changes to android_winusb.inf file found inside usb_driver\ (for example, to add support for other devices), however, this will lead to security warnings when you install or upgrade the driver. Making any other changes to the driver files may break the installation process.
Windows 7
To install the Android USB driver on Windows 7 for the first time:
Connect your Android-powered device to your computer's USB port.
Right-click on Computer from your desktop or Windows Explorer, and select Manage.
Select Devices in the left pane.
Locate and expand Other device in the right pane.
Right-click the device name (such as Nexus S) and select Update Driver Software. This will launch the Hardware Update Wizard.
Select Browse my computer for driver software and click Next.
Click Browse and locate the USB driver folder. (The Google USB Driver is located in \extras\google\usb_driver.)
Click Next to install the driver.
Or, to upgrade an existing Android USB driver on Windows 7 with the new driver:
Connect your Android-powered device to your computer's USB port.
Right-click on Computer from your desktop or Windows Explorer, and select Manage.
Select Device Manager in the left pane of the Computer Management window.
Locate and expand Android Phone in the right pane.
Right-click Android Composite ADB Interface and select Update Driver. This will launch the Hardware Update Wizard.
Select Install from a list or specific location and click Next.
Select Search for the best driver in these locations; un-check Search removable media; and check Include this location in the search.
Click Browse and locate the USB driver folder. (The Google USB Driver is located in \extras\google\usb_driver.)
Click Next to upgrade the driver.
Windows XP
To install the Android USB driver on Windows XP for the first time:
Connect your Android-powered device to your computer's USB port. Windows will detect the device and launch the Hardware Update Wizard.
Select Install from a list or specific location and click Next.
Select Search for the best driver in these locations; un-check Search removable media; and check Include this location in the search.
Click Browse and locate the USB driver folder. (The Google USB Driver is located in \extras\google\usb_driver.)
Click Next to install the driver.
Or, to upgrade an existing Android USB driver on Windows XP with the new driver:
Connect your Android-powered device to your computer's USB port.
Right-click on My Computer from your desktop or Windows Explorer, and select Manage.
Select Device Manager in the left pane.
Locate and expand Android Phone in the right pane.
Right-click Android Composite ADB Interface and select Update Driver. This will launch the Hardware Update Wizard.
Select Install from a list or specific location and click Next.
Select Search for the best driver in these locations; un-check Search removable media; and check Include this location in the search.
Click Browse and locate the USB driver folder. (The Google USB Driver is located in \extras\google\usb_driver.)
Click Next to upgrade the driver.
Windows Vista
To install the Android USB driver on Windows Vista for the first time:
Connect your Android-powered device to your computer's USB port. Windows will detect the device and launch the Found New Hardware wizard.
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.
Click Browse and locate the USB driver folder. (The Google USB Driver is located in \extras\google\usb_driver.) As long as you specified the exact location of the installation package, you may leave Include subfolders checked or unchecked—it doesn't matter.
Click Next. Vista may prompt you to confirm the privilege elevation required for driver installation. Confirm it.
When Vista asks if you'd like to install the Google ADB Interface device, click Install to install the driver.
Or, to upgrade an existing Android USB driver on Windows Vista with the new driver:
Connect your Android-powered device to your computer's USB port.
Right-click on Computer from your desktop or Windows Explorer, and select Manage.
Select Device Manager in the left pane.
Locate and expand ADB Interface in the right pane.
Right-click on HTC Dream Composite ADB Interface, and select Update Driver Software.
When Vista starts updating the driver, a prompt will ask how you want to search for the driver software. Select Browse my computer for driver software.
Click Browse and locate the USB driver folder. (The Google USB Driver is located in \extras\google\usb_driver.) As long as you specified the exact location of the installation package, you may leave Include subfolders checked or unchecked—it doesn't matter.
Click Next. Vista might prompt you to confirm the privilege elevation required for driver installation. Confirm it.
When Vista asks if you'd like to install the Google ADB Interface device, click Install to upgrade the driver.
Links
Setting Up Device
USB Drivers

Categories

Resources