How do I detach a process from the command prompt? - shell

I can't find the answer to this question anywhere online and it seems like it should be super simple. I'm a beginner trying to run react-native on a virtual device, so I start by making the virtual device by running
android avd
Which opens the virtual device manager and then I can start my virtual device. But then I can't do anything else in the command prompt! I can't close it either or else the virtual device will close. What's the next step here that I'm missing?

My smart CS friend helped me. Instead of android avd, you should run start android avd.

Related

Runing UIautomatorViewer with AVD

I would like to use Googles UIautomatorViewer to analyse a third Party App running in a Android Virtual Device.
So far, I found a lot of toturials for the UIautomatorViewer using a real device and the ADB.
But is there a way to use a emulated device?
Thank you a lot in advance!
Yes. You can analyse emulator easily with uiautomatorviewer.
let me explain steps.
1) create emulated device from android studio and give it name ex. demo
2) Open cmd from emulator folder by typing "cmd" in search bar.
You will find folder here = "C:\Users\admin\AppData\Local\Android\Sdk\emulator"
3) Hit command " emulator #demo " it will open your emulated device called demo.
4) Now open uiautomatorviewer
Start analyse whatever you want on your device.

Appcelerator doesn't detect android phone

Goodmorning,
I'm working quite hard on my own app. At this point I want to run it on my android (galaxy note 3) phone. Unfortunately Appcelerator studio doesn't detect my android phone; Windows does. I've tried it with the new Galaxy s7 of a friend, but same result.
Off course I searched the web like crazy and found several possible (old) answers, but none did the magic.
When I consult the log, there's no new info to be read!
Does anyone have a clue where to look? Looking forward to your answers…
Kind regards!
One thing you should check is if you have set up your phone for development. You can see the instructions here: http://developer.android.com/tools/device.html (... tap 7 times... - took me a while to discover!)
And the small obvious thing is in Appcecelerator Studio you may need to select "Refresh devices" when you try to run the project.
/John
When you say "Windows" detects it, what exactly do you mean? Does adb detect it?
If you run
adb devices
on the command line, does it report your device ID?
On my Mac, I run this and I can see my connected S4:
List of devices attached
9726ea90 device
I'm assuming that the Windows version of adb would output a similar report.
With all the Samsung phones I've debugged with, I always have to go to the notification bar and choose "connect as media device" (or something similar). The default connection mode does not work for debugging. And unfortunately, you have to do this every time you connect the device.

While launching the application on Kony showing "waiting for device"

I developed a simple application on Kony and while launching the application it shows the message "Waiting for device". How can I solve it?
Just "wake" your device by unlocking it, touching its screen or going to home screen.
This message is shown when there are no devices/emulators connected to install the application.
You can check if any device/emulator connected by using the below command in Windows command prompt.
adb devices
If the above command lists any device/emulator then you wont see the error.
If the physical device is already connect via USB, the you can check whether the developer option and USB debugging is enabled in you android device.
How to enable developer option?
Hope this helps!

Android Wear - Start App voice command not working

I have an app installed on Android Wear Emulator that I can directly run from Start->MyApp. However when I want to start it with voice command i.e. Start MyApp, it keeps waiting for something but does not complete. What could be reason for this?
There is a limitation of the current emulator that it does not support voice actions via the keyboard, even though the text appears on the display. You will need to start the application by clicking on the display, then the red G, and then going to the start menu and picking the app from there. You can also quickly start the application using something like this from your development machine:
adb shell am start -n com.example.android.test/.TestActivity
The watch needs to be connected to a phone (device or emulator) with an internet connection for the voice commands to work.

Android Studio starting in debug mode by default

I have been working on a project, and when I run the project in android studio it had been running correct and when I ran in debug mode it ran correctly.
All of a sudden, when I try to run the project normally, it pops up on the device waiting for debugger
and in the logcat I get this:
02-07 10:38:46.444 3968-3968/com.geog.test D/dalvikvm﹕ Late-enabling CheckJNI
02-07 10:38:46.784 3968-3968/com.geog.test W/ActivityThread﹕ Application com.geog.visitdub is waiting for the debugger on port 8100...
02-07 10:38:46.804 3968-3968/com.geog.test I/System.out﹕ Sending WAIT chunk
and it goes no further. I don't know why this is happening, there is no debug command in the manifest, I have killed the adb and restarted as I did with android studio.
It's a real pain in the a*** as I can't run the app without going through debug mode. If anyone has any ideas I'd like to hear them
Thanks
Restart your Android Device once and also check there should not be any breakpoints in your java classes.
The above suggestions were too invasive for me so I digged a little more into it. The following solution works for me in android studio:
Start debugging. (You'll get the wait chunk message here)
Select the Debug pane with the bug icon.
press the small cross at the side menu.
press "Force close" on your device.
Restart debugging.
In my case, there was an AsyncTask whose doInBackground() method called android.os.Debug.waitForDebugger(), and this was being picked up even in run mode. Disabling the line fixed it. Restarting the device didn't help.
try this , always work :
1 - close Android Studio and any other IDE you have opened (maybe you have Eclipse also running?) and emulator instances;
2 - remove USB cable from PC and restart your phone if you use one ;
3 - run adb kill-server from console;
4 - open Android Studio;
5 - click on run/debug;
6 - when the window to select the device appears, attach your device to USB and USB to your computer;
In my case it was a service to which I had added android.os.Debug.waitForDebugger(). The service was in a separate process by defining in the manifest android:process=":sepprocess"; after removing this line (such that the service is in the same process as the main activity), debugging started to work in the service and I did not experience the
I/System.out﹕ Sending WAIT chunk
anymore.
First clear all the break points from your project using ctrl+shift+F8 for windows or for mac cmd+shift+F8. Restart your android device. Then run
In my case, there are multiple debuggers. I have native code running in my app.
I cleared it by selecting the Debugger and Process from Run->Attach Debugger to Process
I deleted the emulator and recreated. It worked for me.

Resources