Connect Phone To Android Eclipse - android

How can I connect my phone to Android Eclipse, That The Projects Executed In My Phone Instead Of Android Virtual Device
thanks.

1- Enable USB debugging On your Android device, select Settings > Developer options.
2- Connect the Android device to your development machine using a USB cable.
more: https://developer.chrome.com/devtools/docs/remote-debugging
Note: On Android 4.2 and later, the developer options are hidden by default. To enable the developer options, select Settings > About phone and tap Build number seven times.

first of all you have to go settings then turn on debugging option in your mobile then press run option in eclips then select your device then you will see your app will run in your mobile for more assistant go to here http://www.developer.com/ws/android/connecting-your-android-device-to-eclipse.html

The first thing to consider is whether you have installed the OEM USB drivers for any devices you wish to use, as specified here. Then you must enable USB debugging on your phone (details will differ slightly depending on phone manufacturer and Android version).
The bigger elephant in the tent is that support for Android development in Eclipse ended in December so you will want to move to Android Studio as soon as possible.

Related

How can I run my physical device as an emulator in Android studio?

I don't even know if there is a solution for this, but seeing software like Vysor and others, I was wondering, is it possible to run my USB connected android phone as an emulator, using Android Studio for example? How can I achieve this?
Edit: I don't want to debug or run apps from android studio in my physical phone, I know I can do that. What I want is to run my phone ( with it's data, other apps installed, etc) in mt laptop, as I would with an AVD.
yeah, you can run as a physical device on your android studio. the first thing which you have to do is go your phone settings and click on about device in that press 5-6 times on build number. after clicking on that you get a pop up that your developer mode has turned on.
in next you will see a developer options on your physical device setting.
go into developer options and click a mark on USB debugging.
after that connect your USB cable to your PC. and open the logcat options in the android studio.
you can see that your physical device is connected to your android studio.
yes ,
first go to mobile setting in your mobile device there you find software information
in software information press Build number for 5 times then it shows some toast message you are a developer
after that you will find developer options in settings go to it in that you will find usb debugging ( turn it on)
3)connect device with laptop using usb in and allow all the permissions that required for connection
4)go to android studio you will find your device name .If your device is not found go to run as multiple device there you find your device just click it
Thats all
Enable programmer mode on Your device and enable usb debugging there
If you mean the Physical device to use as a alternatives of Emulator then it is okay. You can use a Android Device to run the apps for debugging. Here is a detailed documentations how to connect your device with android Studio.
Check this link....

Device is not able to see in Android Studio

I have two Android device. Both of the set up for development, but only one of them appear in Android Studio when I want to run app. What is wrong? I have Mac.
go to "Settings >> development options >> USB debugging" and enable it
There are several things that could be wrong. Here are a few:
Debugging mode is not turned on on the second device.
The port might be faulty. Is the phone charging when connected? Are you able to access files and folder inside the phone via your laptop.
Try installing the support software for phone on the laptop.
Solution:
If you don't see Settings > Developer Mode, go to Settings>About Phone and tap the 'Build Number' options 7 times.
Return to previous screen and open 'Developer Mode'.
Allow USB Debugging in this screen.
P.S. Mention phone make and model too.

Android Studio - No USB devices detected

I tried to play Android Studio 2.0 with my mobile without success, what I did are:
In my mobile, Apps/gear icon/Settings/SYSTEM/{} Developer options/ Android debugging/, enable the Android Debug Bridge(adb) interface (set tick).
After plug in my mobile to my PC with a USB cable, I found A0001 in my Computer folder. Within A0001, I can see the files in my mobile.
In my PC, run Android Studio/bin/studio.exe, "Select Deployment Target" window shows with message "No USB devices or running emulators detected"
I have tried two different USB drivers but got no lucky.
Perhaps I should tell Android Studio where is my USB driver? But, how?
Can you help?
I had the same problem too and I managed to resolve it this way.
First, enable debugger mode in your android device.
Go to Device Manager from Start Menu and try to find ADB Interface with an error symbol on it. This generally happens because windows sometimes fail to load all the mobile device drives.
Next, Go to http://adbdriver.com/downloads/ and download the driver installer, unzip and run it.
Now go to Android Studio and you should find that everything is working fine.
Chill....
same here... but I hope you can avoid this problem the same way I Did.
There is an "universal ADB Driver for all Android Devices".
Yep... sounds like magic.
Just follow this link.
https://devs-lab.com/usb-adb-drivers-for-all-android-devices.html
Fun fact there is no "Step 5" in that article so I'll give you.
you have to enable "USB Depuration" from "Developer Options" connect your cellphone to computer as a "MTP storage" , after windows detected your cellphone as a "Portable Device" Execute ADBDriverInstaller.exe (that downloaded from devs-lab)
check the device list and your cellphone will say "Driver incorrectly", select your cellphone and press install.
Step 6: Once the process is completed, you’ll see something like the image that appears there (in the link).
I hope that somebody else work this
Go to Run > Edit Configurations...
Under Deployment Target Options select Show Device Chooser
Dialog from the drop-down-list
See picture for reference
After struggling with this problem for a while, I found that there are certain cables that can only charge your phone, and even though they seem to be working, they do not allow your phone to be used as a "Media Device" and therefore Android Studio does not detect it.
Go to
Tools | Android | Enable ADB Integration
Make sure it's enabled. When I upgraded to 2.X it was for some reason disabled for me and it took me hours to find it.
I just cannot beleive why it is so difficult! let me try again and please check my steps again:
I installed Android Studio 2.0, then run Computer/OS(C:)/....../Android Studio/bin/studio.exe.
The Android Studio window appeared in my working area Computer/OS2(J:)/Users/MyAccount/Desktop/.
I connected my mobile with my computer, Cpmputer/A0001/ appeared, from it, I can see the files in my mobile.
I clicked the run icon in the Android Studio window, a "Select Deployment Target" window apeared with message "No USB devices or running emulators detected".
(I got two USB ports and tried both but got the same result.)
Finally found the solution : )
1. Install device’s required driver. (for me it was motorola device
manager)
2. Download Google Usb Driver from SDK Manager
3. Open your phone's setting->developer options and turn on USB debugging.
4. connect your device to computer
5. Go to Device Manager from Start Menu and try to find if there is ADB Interface with an error symbol on it.
5.1. If yes, then right click on the ADB interface->Update driver
software->Browse my computer for driver software-> Let me pick from
a list of device drivers on my computer->Select Motorola ADB interface
5.2. Now one confirmation will pop up in your mobile, accept it
5.3. Now you should see no error mark beside the ADB interface in your
device manager
There are 3 steps to set up your phone for debugging:
1) Change your phone to developer's mode by going to Settings, About Phone, Software Info, Android Version - tap at least 7 times on the Build Number text. You will get a message saying you are now a Developer.
2) Enable USB Debugging in Settings - Developer Options. Make sure you are not connected to your USB port to see the USB Debugging option enabled, otherwise it will be disabled.
After you plug in your USB, swipe at the top of your screen, you will see USB Debugging on.
3) Make sure USB connection is set to Photo Transfer (or MTP - Transfer photos and videos). After you plug in your USB, swipe at the top of your screen, and you will see Tap to change USB options on the menu. Tap it, and select Photo Transfer option.
Perhaps your mobile manufacturer does not provide the proper driver.
Go to Device MAnager and look for: Android Composite ADB Interface. If it's there, the driver is properly installed. If not... You and I are on the same "wagon"...
I tell you: Acer? Never again.
USB debugging somehow got turned off under developer options on my Samsung. Turned it back on and it worked, but only by clicking on "debug app" instead of on "run app".
With me, when connecting the mobile to the pc, three options appeared on my mobile.
Charge this phone
Transfer Files
Transfer Images
I thought I should select "Transfer Files", but it dd not work
But it only when works I choose "Charge this phone"
Few ways to resolve this problem.
Case 1: Install PdaNet+ in your system. (worked for me).
Case 2: Enable the USB debugging option in your mobile. Setting > developer > Check "USB Debugging".
Case 3: Change from MTP to PTP.(sometimes vise versa works).
Question is Your development sdk no mobile version android sdk Platform.
For example, my android phone system is 6.0, i need download sdk Platform 6.0.
First, try to revoke the usb sessions in the developer options, then try downloading an oem usb driver
If then doesn’t help you can try opening the device manager on windows, right click on your phone, select uninstall. This worked for me if I had the same issue.
I couldn't find my android phone or any USB device I connect to my windows laptop on the hidden icons. Well, my mouse and phone could charge but I can't seem to see my phone in the File Explorer option.
I prefer running Apps using my phone rather than emulator in Android Studio and yet I couldn't see my phone when I connect using the USB.
This helped me solve all my problems after several hours of searching for solution.
Download Universal ADB Drivers - One size fits all Windows Drivers for Android Debug Bridge
Please use this link: https://adb.clockworkmod.com/
I hope this works for you like magic!
I can see all the devices I connect using the USB cable and my mouse receiver.

Cant use my Device as a Emulator in android

I have device Micromax A63 which have android 4.2 jelly bean.
But my problem is when I run android application via eclipse I cant found my device is attached with USB cable in eclipse.
When I connect with USB cable I have 4 option on my device.
USB Storage
Media Device
Camera
Charge Only
how to use my device as a emulator please help me.
Please help me.
Open settings
About phone
Tab "Build Number" 7 times
Go back to settings and enable developer option
Now your phone is a developer phone ;)
Go to developer option > (Select) USB debugging option.
On your device go to settings > developer options > select USB debugging > check it ..
Come to eclipse select run configuration under the run menu , select your device as a target device.
Firstly get the USB drivers from the offical website, But it seems to me that Micromax have not posted an offical USB driver support(Poor customer service) , try re installing the MOBORO usb tool , which must do it http://www.idroidspace.com/download-micromax-usb-drivers/
After that follow plain instructions Of setting the debugging option "On" on your phone that is found at (as given on offical google android developer webiste )
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.

How to load my app from Eclipse to my Android phone instead of AVD

I'm quite new to Android and have been using an AVD to debug my app so far. However, I want to start checking the media options and therfore need to start using my Android phone. How do I get Eclipse to load my app to my phone instead of my AVD?
First you need to enable USB debugging on your phone, then connect it to your computer via USB. Then eclipse should automatically start debugging on your phone instead of the AVD.
just for additional info,
If your apps is automatically run on emulator,
right click on the project, Run As -> Run Configuration,
then on the Run Configuration choose on the Manual.
after that, if you run your apps you will be prompted to chose where you want to run your apps, there will be listed all the available device and emulator.
I had the same problem, and have not been able to get Eclipse in Windows 7 to recognise the device. The device is correctly configured, Windows 7 recognises it on the USB port, and I edited the Run settings in Eclipse to prompt for a device, and it is just not there.
I ran it with the following steps:
Connect the device to the computer with USB.
Ensure the device is not locked (ie. timed out in the UI). I have to keep unlocking it while I'm working.
Wait for Windows to recognise the USB device, and when the autoplay menu comes up select Open device to view files. It should open up the file system in the device, in Explorer.
In Explorer go to the Eclipse workspace and find the apk file from the build (eg. MyFirstApp.apk)
Copy the apk file to the Downloads directory on the device
On the device, use the My Files app (or similar) to open the Downloads directory.
Click the downloaded file (My First App.apk) and Android offers to install it
Select install
The app is now in the installed Apps. Run it.
A second method is to mail the apk file to the device and then download and install it. (Credits to a post on SO which I can't find now).
A third method is to use DropBox. This requires installation of DropBox on the PC and on the device (from the play store) but once both are set up it runs very smoothly. Just share a DropBox folder between the two devices, and then drop the APK into that folder on the PC, and open it on the device. With this method you don't need a USB connection, and can also install the APK on multiple devices. It also assists the management of multiple development versions (by making a separate sub-folder for each version).
In Eclipse:
goto run menu -> run configuration.
right click on android application on the right side and click new.
fill the corresponding details like project name under the android tab.
then under the target tab.
select 'launch on all compatible devices and then select active devices from the drop down list'.
save the configuration and run it by either clicking run on the 'run' button on the bottom right side of the window or close the window and run again
You don't have to do anything really except prepare your phone to be able to run debug and usb apps :
http://developer.android.com/guide/developing/device.html
then simply launch your app from eclipse and your device will be used if you don't have a simulator running.
First of all, 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.
In eclipse go to Run Configuration and select Always prompt to pick device
Some people may have the issue where your phone might not immediately get recognized by the computer as an emulator, especially if you're given the option to choose why your phone is connected to the computer on your phone. These options are:
charge only
Media device (MTP)
Camera file transfer (PTP)
Share mobile network
Install driver
Of these options, choose MTP and follow the instructions found in the quotes of other answers.
Hope this helps!
goto run menu -> run configuration.
right click on android application on the right side and click new.
fill the corresponding details like project name under the android tab.
then under the target tab.
select 'launch on all compatible devices and then select active devices from the drop down list'.
save the configuration and run it by either clicking run on the 'run' button on the bottom right side of the window or close the window and run again
For those who are trying to find how to enable debugging on devices running Jelly Bean 4.2 (e.g Google Nexus), you have to go to Settings > Apps > About tablet and tap the text "Build number" 7 times slowly. Go back to the now available Settings > Developer options and check USB debugging as stated in previous posts.
Check to see if the Andriod Device is installed on PC. See steps below. The 'Other device' will change to 'Andriod Device' once the USB drive is installed. The browse path should be
\extras\google\usb_driver\
not the sub directories under it. Otherwise the installation will not find the package.
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.
connect your device to system and set you device debug mode on when you run your application Android Virtual Device AVD will select device there you will see your connected device select your mobile device and thats all refer this link to set your device debugging mode on
http://developer.android.com/training/basics/firstapp/running-app.html
The USB drivers in \extras\google\usb_driver didn't work for me.
However the official drivers from Samsung did:
http://developer.samsung.com/android/tools-sdks/Samsung-Andorid-USB-Driver-for-Windows
Note: I'm using a Samsung Galaxy S2 with Android 4.0 on Windows 7 64bit
What I did, by reading all of above answers and it worked as well: 7 deadly steps
Connect your android phone with the pc on which you are running eclipse/your map project.
Let it install all the necessary drivers.. When done, open your smart phone, go to: Settings > Applications > Development > USB debugging and enable it on by clicking on the check button at the right side.
Also, enable Settings > Unknowresoures
Come back to eclipse on your pc. Right click on the project/application, Run As > Run configurations... >Choose Device>Target Select your device Run.
Click on the Target tab from top. By default it is on the first tab Android
Choose the second radio button which says Launch on all compatible deivces/AVDs. Then click Apply at the bottom and afterwards, click Run.
Here you go, it will automatically install your application's .apk file into your smart phone and make it run over it., just like on emulator.
If you get it running, please help others too.
Thanks this helped. It was a little tricky getting the USB debugging option enabled on the Samsung G3 after the update.
See below
Instructions on Samsung G3 Jellybean
Settings
Click --> About the phone
Tap on the build number
“You are now 4 steps away from being a developer.” Keep tapping until it says “You are now a developer.”
Go back to Setting-->System --> Developer option: Enable USB Debugging
Step by step:
Connect your phone to computer via USB
Enable USB debugging on your phone: Settings -> Applications -> Development -> USB debugging
Change Run configuration in your Eclipse project:
right click -> Run As -> Run Configurations. In the Target tab choose Always prompt to pick device (or Manual). Then Apply, Run.
In the new window you should see your connected phone.
Yes! You can Debug Android Application While you are developing them follow these steps..
Make sure that you have PC suite of the mobile manufacturer. For Example:if you are using samsung you should have samsung kies
1.Enable USB debugging on your device:Settings > Applications > Development > USB debugging
2.Enable Unknownresources:Settings>Unknowresoures
3.Connect your device to PC
4.Select your Application Right click it: RunAS>Run configurations>Choose Device>Target Select your device Run.
You can also without using debugging cable.For that you need to install Airdroid in your device.After installing enter the link in your browser and Drag and Drop .apk file.
Happy Coding!
First you need to set your device to debugging mode. On Android 4.X that means as described in another answer in another question:
Open up your device’s “Settings”. This can be done by pressing the Menu button while on your home screen and tapping “System settings”
Now scroll to the bottom and tap “About phone” or “About tablet”.
At the “About” screen, scroll to the bottom and tap on “Build number” seven times. [Note this is no joke]
Make sure you tap seven times. If you see a “Not need, you are already a developer!” message pop up, then you know you have done it correctly.
Done! By tapping on “Build number” seven times, you have unlocked USB debugging mode on Android 4.2 and higher. You can now enable/disable it whenever you desire by going to “Settings” -> “Developer Options” -> “Debugging” ->” USB debugging”.
The next step is to connect your device to your computer via the USB cable.
The next step is to install a USB driver for it. On the official website you find a list with sources for drivers for phones from various different companies.
Eclipse now should give you the phone as a choice when you click on Run and it presents you possible device to launch.
In some case Eclpise will tell you Target Unknown which prevents you from using the device. If that's the case you might have to restart the phone. You might also have to check and recheckUSB debugging, till the phone asks you to allow your particular computer to do usb debugging.

Categories

Resources