I have been given a device(ZTE Qlux 4g) by a client as a testing device for some app. I work on Ubuntu 14.04. This same phone will be distributed to 500 cab drivers, so I can't avoid testing on this phone.
I'm not getting this error on any other device(Nexus4, Nexus5, Moto E, Xperia Z). I obviously have developers option & USB debugging enabled. I installed the app by downloading the APK via email & it runs.
When I connect this device to my Ubuntu machine, logcat shows just this 1 line:
01-01 00:00:00.000 0-0/? E/Internal: insufficient permissions for device
Any help in any direction will be greatly appreciated.
The ZTE Qlux 4g uses Android 4.4, i.e. API 20. So either the given device is not genuine or have some bug in the device itself or ubuntu is not compatible with the ZTE Qlux 4g.
So what you can do is first, try this on any other OS like windows/ mac (if possible).
If the problem persists then ask the client to give another device of same model.
I was getting this error message:
Solution was on the command prompt, restart the connection with the command “adb kill-server”. Then reconnect the device.
Some background information about the device I'm using. The device I'm using is a test box (not a phone) that connects to my Laptop (Android Studio) via a USB cable or Ethernet cable. In order for me to connect the device, I had to do this:
Android Box Setup. Do these things before proceeding to bottom steps:
1) Connect the Laptop running Android Studio to the Gateway via USB cable or Ethernet (RJ45) cable.
2) Connect the Gateway to the same WiFi network as the laptop.
How to use the USB port to debug:
1) Open Command Prompt
2) Go to wherever you stored adb.exe file
3) Type in “adb connect ”. For example “adb connect 192.168.1.84” or “adb connect 192.168.1.94”.
3a) The IP address of the Android device can be found in Settings -> About tablet -> Status ->IP Address
3b) If the IP address of the Box is something like 10.134.114.51, then make sure that the box is connected to the same WiFi network as the laptop.
If you’re in the adb.exe directory, other adb commands include:
1) adb devices= Finds all devices currently connected to your computer.
2) adb kill-server= Disconnects the devices
Ubuntu 16.04
Virtualbox 5.0.24
Android 4.4-r5
Android Studio 2.1.2
I was getting these errors:
Emulator unknown emulator-5554 disconnected.
But I was able to connect to the android virtual machine in a shell outside of Android Studio.
To resolve this, in Android Studio I had to start the terminal (icon on the bottom left) and run the following:
netstat -ln | grep 5555 ;# As expected adb server was alive.
adb connect <ANDROID_VIRTUAL_MACHINE_IP_ADDR>:5555
Then the Innotek GmbH Virtual (Android 4.4.4 API19) machine item showed up above the emulator-5554 disconnected. I selected it and the debugger was working.
Related
device is connecting perfectly on windows but not on mac devices is not asking permission to trust this device and showing offline while running adb devices command my phone is realme 9 pro speed addition,
i have tried on multiple macbook but still not connecting , also tried on diffrent windows laptops connected succesfully on each windows device. tried changing the cable , resarting server, downloaded latest platform-tools..
I had similar issue on Realme Master GT and in my case solution was connecting wirelessly by adb. This feature was announced in android 11.
Developer options > Wireless debugging > Pair device with pairing code
Take ip, port, pairing code from phone - example: ip:port = 192.168.150.120:37181 pairing_code = 188231
Your phone and computer have to be connected to the same wifi network
On mac: adb pair [ip:port] [pairing_code] - example: adb pair 192.168.150.120:37181 188231
On mac: adb connect 192.168.150.120:37181
On mac: adb devices
After last command your device should be properly listed and ready to run npm react-native run-android :)
I'm struggling to get my stock standard Android application ("hello world") running on my LG G5. My device is just not picked up by Android studio's deployment target window ("No USB devices or running emulators detected").
Can not understand why though because I do not pick up any usb driver issues in computer manager (G5 SE identified under portable devices without shown driver problem), and my phone's development option with USB debugging is enabled as shown by Android instructions.
Some additional guidance would help please.
First of all run adb devices (located in android sdk>platform-tools>) from command line / terminal and check if your phone is listed.
If not restart adb :
adb kill-server
adb start-server
If it doesn't work try changing USB Configuration on your phone: select MTP or PTP. You can change this from top panel when your phone is connected.
If this will show confirmation dialog with MAC address confirm it.
Your phone has to be visible by ADB before it can be visible by Android Studio.
I am unable to debug over wifi.
I have followed below steps.
Go to Android Sdk-> Platform-tools and type cmd
run adb tcpip 5555
adb connect and MY IP ADDRESS
Now i got the result show in below Image.
After my device is connected. I removed my USB cable then i got device list empty.
I have no idea why this is happening.
I have motorola X play Mobile Phone Android 6.0 and having Windows 10 operating System.
Need Help.
For simple one click connection of ADB over wifi - You can try using the Android ADB Plugin from JetBrains. The plugin will internally handle all the setup and you can click-away and connect to adb over wifi without worrying about anything else. Steps to install and use can be found on its GitHub repo page.
Provides an action which allow you quickly connect your Android device
over WiFi to install, run and debug your applications without a USB
connected by pressing one button. Connect your device using a USB
cable and press the Android WiFi ADB button. Once the device be
connected over WiFi you'll see an IntelliJ/Android Studio
notification. Now you can disconnect your USB cable and enjoy
deploying, running and debugging your applications over WiFi. The
version 2.0 enables a window to check which of your devices are
connected or not and connect/disconnect it manually if needed.
Screenshots from the plugin page:
This question already has answers here:
Run/install/debug Android applications over Wi-Fi?
(41 answers)
Closed 6 years ago.
Is there any possible way to debug or run android apps from eclipse to my Sony Tablet S over wifi rather than USB without rooting the device?
There are ways to do it, if the device is rooted. However, I am seeking the solution in a device that is not rooted.
Disconnect device from usb then tell it to listen on 4455
adb tcpip 4455
restarting in TCP mode port: 4455
connect to the device using a specified ip:port. my device is using wifi
adb connect 192.168.1.103:4455
connected to 192.168.1.103:4455
now do normal adb commands over tcp like
adb shell
when your done, you can put it back in USB mode
adb usb
restarting in USB mode
After a bit of dabbling with testing I successfully managed to connect a Sony Tablet S over ADB following this procedure, when both the computer and the tablet were on the same wifi network. I used an Xperia T as a tethering point between a laptop and the Tablet S. I followed the same procedure on an Xperia Tablet S and an Xperia S as well.
Connect the Sony Tablet S through USB to a computer, make sure you have ADB debugging enabled on the tablet.
On the computer, execute "adb devices", verifying the tablet is showing up in the list of available devices.
Execute "adb tcpip [port]" while the tablet is connected to the computer, verifying you get a response "restarting in TCP mode port: [port]"
Disconnect from the device from the computer it was connected to.
From a host located on the same wifi network, execute "adb connect [ip to device]:[port]", verifying you get a response "connected to [ip to device]:[port]"
In the end I launched Eclipse, created a test project and tried launching the project. The project installed and launched automatically from Eclipse. I also tested this for debugging and that worked equally well.
Finally After lots of search, here is the consolidated, short tutorial about "Wireless Debugging with Android without rooting" your android phone.
Steps:
Make sure your Phone and your PC/Laptop is connected in the same network.
Find your Android Device's IP Address: Go to Settings > About Phone > Status. Note down it.
Ping Test: Lets first check if your phone is accessible from your PC/Laptop to do this ping your Android Device and check its response. See Notes if ping is unsuccessful.
e.g: ping 192.168.1.55
Connect your Android Device Via USB in USB Debugging Mode.
Open command prompt and cd into <Android SDK Folder>\platform-tools directory and run the following commands.
adb tcpip 5555
adb connect DEVICE_IP_ADDRESS_HERE:5555
If you want to switch back to USB mode, use the following command.
adb -s DEVICE_IP_ADDRESS_HERE:5555
Disconnect Android Device from USB. If everything is fine, you can Wirelessly debug your Android Apps!
Notes:
If ping is unsuccessful, Make sure Wireless (WiFi) devices and wired devices are not isolated. If Isolated, you need to disable isolation. Router Mfgrs calls it as AP Isolation. There will be a setting in Router's Wireless Configuration page. I have D-Link Router, I unchecked the Enable MultiAP Isolation setting in Wireless Basic Setup Page.
I personally felt this method of connecting is taking more time.. so, I configured my android device so it uses static IP like 192.168.1.55 to connect to my router and I made a windows batch file like below,
#echo off
cd C:\AndroidSDK\platform-tools\
echo make sure your your Phone is connected in USB Debugging Mode.
pause
adb kill-server
adb tcpip 5555
adb connect 192.168.1.55
pause
so, every time I have just need to plug in my device, and double click the batch file and all done automatic :P !
(No root required) There is one best, easy and with UI method for Android Studio
IntelliJ and Android Studio plugin created to quickly connect your Android device over WiFi to install, run and debug your applications without a USB connected. Press one button and forget about your USB cable.
just install plugin Android WiFi ADB
Download and install Android WiFi ADB directly from
Intellij / Android Studio: Preferences/Settings->Plugins->Browse Repositories
.
Remember! for first time to initialize the device you must have to connect using usb
Alternatively, you can download the plugin from the JetBrains plugin site and install it manually in: Preferences/Settings->Plugins->Install plugin from disk.
for more information read here https://github.com/pedrovgs/AndroidWiFiADB
I am trying to get mono for android (aka monodroid) working within a windows 7 virtual machine on virtualbox but I am having issues with the adb connection to my phone. When I run "adb devices" to list the devices present it show up no problem, but when I attempt to run an "adb install", logcat, or push it hangs. Currently there is a bug in virtualbox which applies to this but I was hoping someone more knowledgeable than myself would have a workaround.
https://www.virtualbox.org/ticket/6620
Of coarse non of this would be an issue if Xamarin released a linux port of their product or if I got familiar with Java, but I suppose those are slightly different issues.
Brian, one workaround you might consider is to make your VM host an ADB host as well. Then you can just connect your VM client to it over TCP / IP. Here's the general idea for that setup:
Install the Android SDK on the host machine. You should only require the platform-tools package which includes adb.
Don't allow your VM client to take ownership of the Android device, so disable any VirtualBox USB filter rules you have and it also wouldn't hurt to then detach and reattach the device.
From your VM client, run adb kill-server. Make it a tskill adb for certainty. If you have any running instances of Eclipse, you'll want to shut those down first because it'll actually launch adb in the background. Don't skip this step.
From the host, execute adb devices. If all goes well (and it should), you'll see your device listed. It should look something like this (note the port number and sorry for the mangling):
* daemon not running. starting it now on port 5037 *
* daemon started successfully *
List of devices attached
015d2994ed200409 device
At this point, your host should have an ADB server running at port 5037. You can check this from the VM client by running telnet 10.0.2.2 5037, where 10.0.2.2 is the default IP for VirtualBox hosts and 5037 is the default ADB port noted above.
Now you must either forward the ports from your host to your VM client, or otherwise connect ADB directly to your host IP:port. If you're like me, you'll find the ADBHOST and ANDROID_ADB_SERVER_PORT variables to be poorly documented and easy to screw up. For this reason, consider simple port fowarding over ssh (maybe via Cygwin) like so from the VM client:
autossh -nNL5037:localhost:5037 -oExitOnForwardFailure=yes 10.0.2.2
Finally, run adb devices from your VM client. If you see "daemon not running," it means your port fowarding is screwed up. Otherwise you should see your device and be able to logcat all day. One noteworthy point is that you won't have an adb daemon running on your VM client, except for when you're actually using the debug bridge, of course.
I've used a similar mechanism for debugging devices over the network that are connected to remote machines and it worked well.
Not sure what has changed in VirtualBox since the question was posted, but selecting the usb device from VirtualBox menu Devices -> USB -> DeviceName worked seamlessly. I am working on VirtualBox 5.1.2 r108956.
I was also having trouble with ADB running over VM. I had a Windows 10 host and an Ubuntu 14.04 client. The autossh method did not work for me. I found an easier solution from another StackOverflow question. It requires that both your PC and your device are on the same WiFi network.
On your VM client run the following: adb tcpip 5555
The device will disconnect from the VM because ADB is now in TCP
mode instead of USB.
For the next part you need the IP address of
your device. To find it, simply run adb shell ip -f inet addr show wlan0
Now you can connect to your device. On your VM client, run:
adb connect <Device IP>:5555
From here all my adb shell, logcat, and monkey sessions ran without interruption!
I'm posting this here for people with a setup similar to mine:
Host OS: OSX (10.15.4 Catalina)
Client OS: Windows 10 Enterprise (v1903 build 18362.752)
VirtualBox v6.1.4
Android Studio v3.6.2
To allow Android Studio in client OS (Windows) to connect to an Android phone (using adb) via USB:
Update to latest version of VirtualBox (currently 6.1.4)
Install VirtualBox Extension Pack from here
With the VM powered down, go to Settings > Ports > USB and make sure the USB 3.0 (xHCI) Controller is enabled, then click "OK"
From the host OS (i.e. OSX) open up a terminal and start adb and confirm that the phone is connected by running adb devices
Start up the VM, and from the VirtualBox menu select Devices > USB > [YOUR PHONE] to connect your host OS USB port to the VM
Open up a terminal on the client OS (Windows) and run adb devices to confirm that the adb server is running and can find your phone. You might need to add the Android platform tools to your PATH (mine was at C:\Users\Username\AppData\Local\Android\Sdk\platform-tools). This step might be optional--I suspect that Android Studio might start up adb on its own.
Start up Android Studio in the client OS (Windows) and go to File > Settings > Appearance and Behavior > System Settings > Android SDK > SDK Tools and make sure that the Google USB Driver is installed (see screenshot here)
After I did these things, Android Studio was able to detect my phone and run/debug apps using that device.
Hope this helps!
I had the same problem and it made me search for about 2 hours.I tried several approaches including all above solutions but none of them worked
My situation
My host was archlinux and the guest was windows 8.1 I was running flash builder in windows but the usb debugging wouldn't work and my connected device was nexus 5 so i followed these steps
Enable USB controller from virtualbox menu Machine-->settings-->usb enable usb controller and enable USB 2.0 (EHCI) controller then add your device(click on + button on right side) then start your virtual machine
Now you should download the latest google usb drivers from here and extract it
Go to control panel device manager right click on your device go to driver tab and click on Update driver there should be two option one search automaticly ... and another browse my computer choose the second one and give the extracted file path(check the Included subfolders option) after this your device should be recognized by windows and there will be a message in your android device for allowing access to your device
In my case i should copy the drivers to flashbuilder android drivers path too but maybe for your situation this isn't necessary
I had same problem with VirtualBox 5.0.14 and solution provided by Stephen Niedzielski didn't work for me. If someone is still interested can try this solution.
My environment is:
Host OS: Mac OS 10.11
Guest OS in VirtualBox: Ubuntu 14.04
Device: Galaxy S5 running Cyanomodgen 12.1
Start a wifi hotspot in host OS and connect there the android device, or connect both in a router. In virtualbox set network mode for guest OS to 'Bridged Adapter' and then select name of Wifi adapter. In that way host OS and android device are in same network.
Then, in android device activate 'Developer mode' and enable 'ADB over network', provided from Cyanomodgen. (For devices with original version of android, google how to use ADV over network if possible)
In host OS run 'adb kill-server' and make sure no instance of ADB is running. Then run command 'adb connect 192.168.2.12', ip of android device.
Congrats :) Now you are are able to use ADB with android device to take logcat or pull and push files.
Install the Android SDK on the host machine. You should only require the platform-tools package which includes adb.
Don't allow your VM client to take ownership of the Android device, so disable any VirtualBox USB filter rules you have and it also
wouldn't hurt to then detach and reattach the device.
From your VM client, run adb kill-server. Make it a tskill adb for certainty. If you have any running instances of Eclipse, you'll
want to shut those down first because it'll actually launch adb in
the background. Don't skip this step.
From the host, execute adb devices. If all goes well (and it should), you'll see your device listed. It should look something like
this (note the port number and sorry for the mangling):
* daemon not running. starting it now on port 5037 *
* daemon started successfully *
List of devices attached
015d2994ed200409 device
At this point, your host should have an ADB server running at port
5037. You can check this from the VM client by running telnet 10.0.2.2 5037, where 10.0.2.2 is the default IP for VirtualBox hosts and 5037 is the default ADB port noted above.
(https://stackoverflow.com/a/12557836/16902966)
and in the virtual machine (Windows):
set ADB_SERVER_SOCKET=tcp:10.0.2.2:5037
Connected device(s): ...\platform-tools>adb.exe devices .