Phantom Android Emulator - android-emulator

I am working an on Android app. Today a "phantom" emulator has appeared on my system. It shows up when I have NOTHING connected and I run "adb devices". I steals "logcat" output when I am developing in Eclipse and I can't see the REAL emulator I start to tun my app.
When I start a single emulator, I actually have two.
The only change I made recently is to install the WIMM emulator (see www.wimm.com). I don't start that one however.
Any clues would be appreciated. Thanks.

It happens to me too sometimes. I do
"adb kill-server"
"adb start-server"
and usually it connects again.
Although I don't know why that happens. I'm very new to android...

Try to running
"/path/to/android-sdk/tools/android update adb"
follow by:
"adb kill-server"
"adb start-server"
This should fix your problem. It's probably due to the recents adb tools changes when you install the WIMM Add-ons.

I had something like this.
ADB watch some port to check if emulators are launched. I had an application using the port 5555.
So type the following command (unix / mac / linux) :
lsof -i -P | grep 5555
It will give you the application and pid that use the port :
uHD-Netwo 320 jva 7u IPv4 0x07b77338 0t0 TCP localhost:5555 (LISTEN)
uHD-Netwo 320 jva 16u IPv4 0x0861b788 0t0 TCP localhost:5555->localhost:55265 (ESTABLISHED)
Then simply kill the app :
kill -9 320
The emulator shouldn't be there anymore.

Related

how can i reset service usb to serial driver that listed in lsmod without reboot system?

I have one usb_to_serial that connected my usb
and installed by this command
modprobe usbserial vendor=0x67b product=0x2303
and connect to other devices via console
and when use of the screen for connecting to console for example
screen /dev/ttyUSB0 9600
i can stop the session by the this command
fuser -k /dev/ttyUSB0
but when connect to other device console my console empty show
my question is when i reboot the system and connecting the first device via Console any thing is ok but when i need to connect to other device then must be reboot the os thus can to connect new device! there is any method that don`t required to reboot and only reset the usbserial service without reboot?
thanks for help
now me found a method to restart service usbconsole
if you have same problem then can to try kill process by
pkill -f /dev/ttyUSB0 ; screen /dev/ttyUSB0 9600
by this command you kill prior session on Serial Console and create new session for them

Could not start Appium server. It's showing [Error Starting appium server: listen EADDRINUSE 0.0.0.0:4723]

I am using Appium version V1.15.0 and have already start the server successfully with the default Host: 0.0.0.0 and Port: 4723
But now when i try to start the server it shows me this error "Error Starting Appium server: listen EADDRINUSE 0.0.0.0:4723"
I have tried to solve this issue by changing the port but could not find any solution.
Suggest me if you guys have any better solution.
I have found the solution. After restarting my computer, i could successfully run the Appium server.
If anyone face the same problem. Please follow below steps:
1. Check if the port is listening to any other services.
Open command prompt: Type netstat -a -b
Either kill that service or try with different port.
If both not working then restart your machine.
This way i have solved this problem.
If EADDRINUSE, Address already in use is the issue,
do
ps aux | grep node
to get the process ids.
Then:
kill -9 PID
Doing the -9 on kill sends a SIGKILL.
That because port 4723 has been used.
We gonna find which process using it
sudo lsof -i :4723
input your Mac user password, press Enter and the result will similar to
COMMAND PID USER FD TYPE DEVICE SIZE/OFF NODE NAME
AppX 68286 huyck 65u IPv4 0x31233f2022a17f56 0t0 TCP *:4723 (LISTEN)
that mean AppX with PID 68286 is using this port
And we are gonna kill it (replace 68286 with your PID)
sudo kill -9 68286
Another easier way, restart the machine could solve this problem
Hope this helps!
The following solution on windows worked for me
C:\Users\username> taskkill /F /IM node.exe
SUCCESS: The process “node.exe” with PID 13992 has been terminated.

Tizen Studio and SDB on macOS Sierra

After the migration of my development environment from El Capitan to Sierra and updating Tizen Studio from 1.0.1 to 1.1.1 the SDB CLI does not work any more on my new machine. I have installed JDK 1.8.0_121.
I can not really start a SDB server.
$ sdb devices
* server not running. starting it now on port 26099 *
fatal: server listener(26099) cannot bind
Then the following is returned:
* server started successfully *
But I can not connect to devices or list them:
$ sdb devices
runs into endless loop without feedback.
I have tested also the old Tizen Studio version 1.0.1 but got the same result. Can this be a Java or MacOS problem?
Any hints what can be the problem?
Seems to be an issue with SDB and probably Mac OS Sierra.
I have downgraded to Smart Development Bridge version 2.2.67 and sdb works fine. All newer version occur the same problem.
You need to kill the process that sdb cannot bind and then start sdb again with sdb start-server
To find out what process port 26099 is taking
sudo lsof -i:26099
The output
COMMAND PID USER FD TYPE DEVICE SIZE/OFF NODE NAME
sdb 3495 lucasbatista 5u IPv4 0x401834fdf37019a7 0t0 TCP *:26099 (LISTEN)
To kill the process
kill <pid>
In this case
kill 3495
Note:
I realized that the process that occupies this port, is usually the emulator itself when we started with Tizen Studio.
Now, I don't know why sdb simply does not choose another port to start or the emulator does not start on another port, since the developers of Tizen Studio, must have the knowledge that the default sdb port is 26099
Anyway, this step by step that I mentioned above, works for me, I hope it works for you too

Could not bind to 0.0.0.0:8080, it may be in use or require sudo

Sometimes I get this error when trying to run a Vapor application from Xcode. Reopening Xcode doesn't help, only restarting of system do. Is it a bug of the framework? What should I do to prevent this?
If using sudo does not fix this message, it means something is already bound to this port. It could be an instance of Vapor that didn't close correctly.
To fix this, you need to kill the previous instance. The easiest way to do this is:
lsof -i tcp:8080
Where 8080 is the port you are trying to use. This outputs something like:
COMMAND PID USER FD TYPE DEVICE SIZE/OFF NODE NAME
com.apple 4679 tanner 8u IPv4 0x890f6b0b31966939 0t0 TCP
Then kill the process bound to that port using its PID.
kill -9 4679
While Tanner's answer should help in most cases, for me the kill command had no effect and no output. So I completely quitted & restarted terminal.
When running lsof there were no processes found anymore, and issue was solved.

Wireshark. How to route traffic from iPhone

I'm trying to capture packets from my iPhone app. It does not use HTTP to communicate, but a custom protocol to connect with my server. I can not use Paros to monitor the packets sent.
Is it possible to proxy the date through wireshark just like you can with Paros for http?
You can't proxy the data through Wireshark, per se; the problem is to have Wireshark running somewhere where it can see the traffic passing by. (If you had command line only, you could run tcpdump and capture packets, and then load the dump file into Wireshark somewhere else that had a UI.)
Are you on a Mac? If so, plug your mac into ethernet so that it has an internet connection (or connection to your server, anyway). Then share your Mac's internet connection over its wifi. Connect to this wifi point using your iPhone. Run Wireshark on the Mac (promiscuous mode enabled), then use your iPhone app and watch Wireshark. No need to mess around with servers or forwarding X11 connections! You could do something very similar with a Windows PC too.
The best solution that works:
Connect your device thru USB and type these commands:
rvictl -s UDID (UDID = id of device, 32 chars, you can locate it in iTunes or 'Devices & Simulators' in Xcode)
sudo launchctl list com.apple.rpmuxd
sudo tcpdump -n -t -i rvi0 -q tcp
OR just sudo tcpdump -i rvi0 -n
If rvictl is not working install Xcode (or see -bash : rvictl: command not found, Mac book pro OS X 10.7.5 & Xcode 4.6)
For more info:
Remote Virtual Interface
http://useyourloaf.com/blog/2012/02/07/remote-packet-capture-for-ios-devices.html
Run wireshark on the server - you'll see the traffic there.