Eclipse/Android Studio Device not showing up in Chooser Dialog - android

I am trying to debug my android application on a device but it is not showing me any device connected in the chooser dialog. What could be the problem ?
I've tried to change connect and disconnect the device again.
I restarted the eclipse
I checked Window->Preferences->Android it shows me the SDK Targets.
What else can I do. My Computer recognizes the device but the eclipse chooser dialog doesn't show any device connected.
Please help...

There is a third party software named "moborobo" : http://www.moborobo.com/
You can install this there after you didn't need any driver for any perticular mobile device...it will automatically gets detected and you can choose it from the dialogue box. Hope this will help.

Check that your device connected as PTP device(Camera). Notification Bar -> USB Connection.
If your device connected as MTP(as common data storage) then AndroidStudio don't recognize it as debuggable device. At least that works for me and my Nexus.

There is another method that you can use .....when you run your project as android project, it generates an .apk file. Just move that .apk file to your device. Then on device run the application in debug mode.

What you can try is: killing adb.exe (using Windows Task Manager) (your IDE will restart it when needed automatically)
If you have more than one IDE open (for instance eclipse and Android-Studio): shutdown one of them, because there may have some conflicts between them when trying to connect with ADB.
If your device was never recognized through ADB (never shows up in eclipse chooser dialog, nor in Android-Studio chooser dialog): then you can try to install the generic Android Driver provided by Google (<SDK_HOME>/extras/google/usb_driver/)

I often encounter this problem, particularly when starting a particular emulator device for the first time that day. i.e. I launch my app, choose the device, the device starts up - but not before the launch of my app has timed out. I find that although the emulator device appears to have started properly - Eclipse does not recognise it as a "running Android device".
I simply shut down the device and repeat the process. I find that the second attempt is (almost) always successful - even if the app launch "times out", the emulator will be talking to Eclipse and I can then relaunch my app on the running emulator device.
Increasing the ADB connection timeout (defaults to 5000ms: Window...Preferences...Android...DDMS) may or may not help.
Hope this helps !

Related

Android stuck on "Installing" and "Launching App"

When I try to run my application via Android Studio on a virtual device, or a physical device, my Kotlin app runs the first time, but afterwards I need to disconnect my device each time I want to publish it again.
When I click on "Run App" it just says "Install" an the bottom. When I click it, it says "Launching App". I've had this problem for some time now, and I hope somebody knows the solution for this.
I've tried rebooting and turning USB-debugging off and on. Both work the first time install, just like disconnecting and reconnecting the device. After that however, again it keeps getting stuck on "Installing".
On a virtual device u could try to Open AVD Manager and then click on Wipe Data from dropDown list in actions column

Setting Device Owner app problem "Workspace has been locked" Android Oreo 8.1

0
I've been using my app as a deviceOwner App since lollipop. I have a new device here which I want to be DeviceOwner too.
It is a Samsung galaxy Tab A 10.5(2018) SM-T590.
I am currently running this Version of the rom: T590XXU2ASC1.
I am not using NFC method. I usualy create the /data/system/device_owner.xml file by myself. But since it is not working I tryed this method:
1-Factory reset the tablet in recovery mode
2-Pass through the annoying startup menus
3-Set lock screen to none
4-Enable Usb Debugging
5-Install my app adb install MyApplicaton.apk
6-adb shell dpm set-device-owner com.example.myapplication/.MyApplicationReceiver It always says success when i execute the command.
7-Start my app, i can pin/unpin my app without problem.
8-Reboot, and then the famous message appears everytime: Workspace has been locked Unauthorized software has been installed on your device.Workspace has been locked to prevent any unauthorized access. Contact your admin.
Then if i press on the FACTORY DATA RESET button the workspace app crashes then pops back.
I tryed the kioskModeDemo app and the androidDeviceOwner sample app and they all do the same problem.
Anybody have any hints of why this is not working anymore on Android 8(oreo)?
Thanks
I found the problem: Once you oem unlock(custom os) your device on a certain samsung knox level API, you can't be device owner anymore on this device.
This is from Samsung Knox page: "Cannot create work profile" "The security policy prevents the creation of a managed device because a custom OS is or has been installed on this device". https://seap.samsung.com/forum-topic/knox-and-nfc-device-owner-provisioning
The device could be vulnerable to potential attacks with custom os.

Cannot run on production devices

When I run my application, the message below is printed in the error log. I don't understand if the problem is from my application or if the message is printed by my Android device.
E/NEW_BHD: Cannot run on production devices!
I read this answer Unable to run 'adb root' on a rooted Android phone , but my device is not rooted.
Why this error log is printed ?
Try enabling this function: go to Settings -> Security Just activate Unknown sources.
Now that you're ready to install your apk.
The main problem (I believe) that causes this, is your mobile's battery.
When Motorola mobiles have low battery, and they're connected to a computer, the USB option for the mobile will be forced to charging only mode.
To solve this, just swipe down from the top, click the USB for charging, touch for more options and select File Transfer. This will resolve your problem.
Try to active Developer Mode on setting of your device.
Enable Developer Options In Android 6.0 Marshmallow
Pull down on the notifications shade and open the Settings app. You can also achieve the same thing from the app drawer if you so wish.
Scroll all the way down and tap on ‘About phone’.
Now scroll down again and you’ll see an entry labelled ‘Build number’. Keep on tapping till you see a prompt that says ‘You are now a developer!’

Android Studio "Waiting For Process" only when used with a wearable device

I'm having an incredibly frustrating time using Android Studio with wearable devices.
The problem is that when I try to run or debug the wearable app Android Studio doesn't do anything most of the time, it hangs there with the last message being
"Waiting for process: com.name of my wearable app".
I can get it to work maybe 10% of the time, then it stops and I might be messing around for 40 minutes before I can get it to work again.
I don't have any issues at all using Android Studio to debug the phone part of the app, its only the wearable part.
Once its stopped working then 1) restarting the watch doesn't fix it, 2) restarting abd doesn't fix it, 3) restarting Android Studio doesn't fix it, 4) manually killing the app process on the watch doesn't fix it. The only thing that will work is to reset the watch. However the entire process of resetting the watch, re-pairing, re-running AS takes about 15 minutes and then afterwards AS will only permit interactive debugging a few times before it stops again. I can't reset the watch everytime AS throws a tantrum, its too time consuming and making my blood pressure rise to dangerous levels.
Something I've frequently noticed is if I try and exit Android Studio it asks: "Do you want to disconnect from the process 'wear'? and if I select the disconnect button then it just sits then and Android Studio never quits.
This is driving me absolutely insane, does anybody please have any experience using the Android Studio debugger with a wearable and has any suggestions how I can some sort of reliability.
Its AS version 1.1.0, using with Lollipop.
Note the wearable app starts/launches/runs perfectly if I'm not using Android Studio, so I don't think there are any issues with the app itself.
******* UPDATE **********
Just updated to AS 1.1.0 today and when trying to debug the wearable it popped up a dialog saying it was unable to open the debugger port
.
popped up a dialog saying it was unable to open the debugger port .
Check the port number. It should be same as in JAVA_OPTIONS and AS Debugger remote configuration under port no.
in command prompt run this :
ping 127.0.0.1:8601
check port 8601 not in firewall list
or used by another program

Debug application over internet using eclipse

I have the following problem:
My phones USB port is broken and I have no way of running app on the phone other than sending it over bluetooth and install it every time I make changes to the code. So every time I make changes, I gotta spend min+ to see them in action. I don't want to use emulator.
Is there a way I can make eclipse run my app on the phone over the internet when I build/run the app the same way it does over USB? Thanks!

Categories

Resources