I have tried:
Basic tutorial in Android Developers:
http://developer.android.com/intl/es/tools/device.html
I think the problem is in udev rules, so I tried this:
https://github.com/M0Rf30/android-udev-rules/blob/master/51-android.rules
But I can't get my phone connected in Android Studio.
I'm sorry, the problem was just de configuration on the phone.
I have ennable Developer options. But not USB debugging.
The procedure is fairly simple. But before you dive into the tweaking part, ensure that your phone is set as MTP in USB computer connection.
Open a terminal window and type,
lsusb
Find your device in the output and note down the ID. Let's assume, it is 22b8:2e76. The first part(22b8) is the vendor ID the last part is the product ID(2e76).
Now open up the corresponding mtp udev rules file by typing the following into terminal,
sudo gedit /lib/udev/rules.d/69-libmtp.rules
You'll see there are many smartphones listed there. Search for your phone's product ID. Here in this case, it should be 2e76 . If you can't find it, it means you have to create a custom entry by following the pattern below.
#Motorola Moto G (MTP+?)
ATTR{idVendor}=="22b8", ATTR{idProduct}=="2e76", SYMLINK+="libmtp-%k", MODE="660", GROUP="audio", ENV{ID_MTP_DEVICE}="1", ENV{ID_MEDIA_PLAYER}="1"
Copy the above code and paste it after the last Motorola phone enlisted in that file. Simply search with the word 'Motorola' and you'll find all of the Motorola devices. In my case, the last device was Motorola XT890/90. So, I've added the above code right after Motorola XT890/907's code.
Save & close the editor. Reboot computer and plug the phone to computer again. It should be mounted as mass storage device and work in Android Studio now.
Hope it helps.
Related
I am trying to enable USB Debugging on Android so that I don't need to use the emulator.
I did what all the posts all around the web say to do: I went to settings -> applications -> Developer -> USB debugging
It still does not turn on the notification sign that USB Debugging is enabled, and Eclipse does not recognize it, and uses the regular emulator.
Does anyone have any idea what is wrong?
You haven't specified what device you are using or what operating system you are using, so that could be helpful.
A few things to keep in mind:
1 Don't mount as USB storage.
2 You also need to make sure to install the drivers for your phone so that the Android Debug Bridge (ADB) can properly communicate. After these are installed, try the command "adb devices" and you should see an item in your list of devices.
Update based on your comment: You can download Kies from Samsung, which include the drivers (as well as other things): http://www.samsung.com/us/kies/
Or you can find unofficial driver-only packages, such as: http://forum.xda-developers.com/showthread.php?t=961956
I think you'll need the OEM USB dirvers.
Read this:
OEM USB Drivers
My experience with windows has been that you might need to un-install the USB drivers under device manager. Then disconnect the device (restart might be required). After plugging the device back in make sure you use the manufactures drivers if available
you have installed your device driver rite?then right click on your app name->run as->run configurations->target->select manual->apply.after that click on debug button then it will ask you to select the device.
If everything else is tested, try with another USB cable.
On Android 4.2 and higher, the Developer options screen is hidden by default. To make it visible, go to Settings > About phone and tap Build number seven times. Return to the previous screen to find Developer options at the bottom.
Fruthermore on some devices you will be asked to accept an RSA key, which allows debugging through your computer. This ensures that other adb commands cannot be executed unless you're able to unlock your device.
Detailed information can be found here:
http://developer.android.com/tools/help/adb.html It is the overview about adb commands (which is used to send data to your device) and it starts with the steps how to bring your phone to debug-mode.
I wish to add to Danation's answer with the following.
If you have installed KIES, and you've tried following instructions a couple of times (for the android SDK package) without success, here's what worked for me:
As a precaution, disconnect the device, and press 'Revoke USB Debugging authorizations'.
Now, go to kies, and reinstall the device driver as seen on the image below.
Connect the device.
For me, it was a routine, it usually works when installing kies, but I was stuck on this today for a little while, and I hope i can help others with my solution as well..
I recently bought a new phone (Motorola Electrify) and I'm trying to connect it with ADB but so far without luck. What I did:
Enable USB debugging on the phone
Connect phone to my iMac using the USB cable (the display indicates that it's connected)
Type "./adb devices" to list connected devices
Unfortunately nothing shows up. I even did a adb kill/start-server and I also added "0x22B8" to the adb_usb.ini (even though that shouldn't be necessary).
Can anyone point out what other steps I could take to debug why the device isn't showing up?
Thanks!
Thanks for your answers above, but I've resolved it myself. For anyone who has the same problem:
http://code.google.com/p/android/issues/detail?id=15583
has the answer.
It turns out that Motorola has several USB modes. I changed the mode to "USB Mass Storage" and it's working now. I did this by dragging the status bar down and clicking on "USB connection" to manage the USB connection.
In case anyone else isn't clear, usb debugging must be enabled (at least for a droid mini).
#Joris If you're loading multiple apps on your phone, you might be better off using the MTP mode on your phone (instead of USB Mass Storage) for reasons covered herein - http://www.androidcentral.com/ics-feature-mtp-what-it-why-use-it-and-how-set-it.
p.s: admittedly, this may not be backwards compatible, but hopefully everyone's finally upgrading to ICS and beyond
Step four found at this link may be helpful:
http://esausilva.com/2010/10/02/how-to-set-up-adb-android-debug-bridge-in-mac-osx/
Create an environment variable (Optional)
Open Terminal
Type cd ~ this will take you to your home directory
Type touch .profile this will create a hidden file named profile
Type open -e .profile this will open the file you just created in
TextEdit In the file, type export
PATH=${PATH}:/pathToTheAndroidSdkFolder/android-sdk-mac_86/platform-tools
Save file, close TextEdit, Quit Terminal, and Relaunch Terminal
NOTE: By creating an environment variable you won’t need to cd to the
Android/tools folder every time you want to run ADB
I have installed the latest Motorola USB drivers which include support for the Triumph.
When I plug in my phone, "adb devices" does not list my phone.
My device manager shows my device under Phone as well as Disk Drive. Both use the WPD FileSystem Volume Driver and refuse to let me update the driver by pointing the motorola drivers in Program Files. It continues to tell me that "Windows has determined the driver software for your device is up to date."
Any ideas?
I am currently in just about the exact same predicament =/
I have some possible avenues that we could both share:
Idk if you were able to find a phone number for Motorola (American that is) but i finally found one
Motorola Mobility, Inc.
600 North U.S. Highway 45
Libertyville, Illinois 60048 USA
Telephone: +1 847 523 5000
Here is a link to yet ANOTHER programmer having the same prob as us =/, but he got it figured out using the steps he posted there
Also there is live support chat here.
If you find a solution to this problem, please, please, please let me know =) And i will do the same for you if i get it figured out soon.
Edit:
Nevermind, i got mine to work just fine =)
Heres what i did:
Used USBDeview to uninstall all previously failed attempts at drivers lol
NOTE: You will have to run USBDeview as an Administrator(right click, select Run as administrator)
In the device manager, after uninstalling all the others, right click on what pops up for the device, click update driver, browse for your own, than from there it was a series of selecting from lists, but the key thing here is to remember that eclipse debugs programs on external devices using the adb interface, which should be a pre loaded option in said select lists =)
Hope this helps!!!
Have you enabled debug mode for your phone? This can be done via settings->application settings->development->USB debugging
Whenever I've had a problem with adb recognizing my devices I've managed to fix it by adding a reference to it in my .android/adb_usb.ini file.
I only run Linux/OS X at home and I don't want to try and blindly describe how to do it on Windows from memory, but they discuss it here http://android.modaco.com/topic/294799-adb-windows-7-and-the-pulse-tutorial/
And google gives the USB Vendor ID's here http://developer.android.com/guide/developing/device.html .
On my linux box I added:
0x0489
To my adb_usb.ini (using the Foxconn ID which on linux you can find directly via lsusb, I think you could use devcon on Windows to find it) and it shows up on my device list.
Just because this link hasn't been dropped in any answers (and I always find myself looking for it), here are the manufacturer's development drivers.
This is what worked for me. I have a Moto Triumph and Win7 x64...
Turn on Unknown Sources, USB Debugging
Install Motorola USB development driver. Unfortunately, Motorola broke the old driver URL, as well as many development forum URL's. Fortunately, Softpedia has copies of the installer. Grab the 32 bit or 64 bit version depending on your OS.
Plug in your phone by USB
Open Device Manager
View hidden devices
Uninstall default drivers (Disk Drives\Qualcomm USB, DVD\CD\Android SCSI CD-ROM, Portable Devices\F:)
Action > scan for hardware changes, or Disconnect/reconnect phone
Repeat till ADB appears (probably w/ a yellow icon indicating it's not fully installed)
Right-click ADB > update driver > browse my computer for driver > pick from a list > Motorola > Android Sooner ADB (the first entry)
Accept security warning
Done. If it worked properly, you can now view your device using adb devices.
I want to test my applications on LG P500 device. But emulator is not detecting the device. When i try to add USB driver which is there in SDK, it is not accepting . Please tel me how to configure Device for testing.
I struggled long and hard to get the correct USB driver installed for my P500. I ended up installing a few different things, and over the course of two or three reboots I managed to get it going.
I'm pretty sure the actual setup details you need can be found here (Note, this is the New Zealand section of the LG website - which is where I am, but it should work globally).
If you follow that, you should be able to install the USB driver. Once done, go to SETTINGS-APPLICATIONS-DEVELOPMENT on the phone and turn on USB Debugging and Stay Awake - these help when you are using the phone to test code.
You can test that its actually working by going into the Android SDK folder shown below and typing adb devices (in the directory shown, remove the (x86) if you are using 32-bit windows) - mine shows up as follows:
c:\Program Files(x86)\Android\android-sdk-windows\platform-tools\adb devices
List of devices attached
80A354043044674101 device
I hope that helps - let me know if you are still having problems.
Change your phone settings to allow USB Debugging. Home->Settings->Applications->Development->USB Debugging. Then connect your phone and run ddms to see if your phone shows up.The emulator will not show your phone, but it should be recognized in DDMS
If some one trying to work on LG P500, Please follow the steps.
1> Connect your Phone to system.
2> Enable settings>SD Card & phone Storage > Mass storage only.
3> Now it will open the SD card. Go to PC suit dir, Install the application whc in turn contain USB drivers. After installation has completed desable mass storage only.
4> Change your phone settings to allow USB Debugging. Home->Settings->Applications->Development->USB Debugging as Apesa ans Steve suggested
(Even i hve installed LGUSBModemDriver_Eng_WHQL_Ver_4.9.4_All.exe )Please let me knw wht exactly this driver will do . )
How do I install the app that I'm making on an actual device?
I'm on Mac Snow Leopard with a Nexus One phone and I've followed the steps here https://developer.android.com/studio/run/device.html
So I added:
1. android:debuggable="true"
2. Turn on "USB Debugging" on your device.
However, when I go to the terminal and do "adb devices" only the emulator shows up there.
I'm supposed to see my device name too right?
What am I missing?
The device didn't show up because of the cable.
Although the old cable was charging the phone, but for some reason it wasn't mounting the device and being new to Android, I just wasn't sure what I'm supposed to see and expect.
In case anyone is interested, there should be a "USB connected" notification if the mounting works.
(this is from menu > notification)
I'm supposed to see my device name too right?
Yes, you should see your device name right there.
What am I missing?
This is weird. Is the Android phone at least recognized by the OS, as being plugged into the USB port?
(Sorry this won't help much...)
There is a App on the marketplace I use called App Installer, I just upload the apk file to my sd card then run app installer on it.
My solution is simple, I email the apk file and then install it.