android emulator with serial port - android

I am trying to develop and application who connects to a serial port. For that, I am following this api:
https://code.google.com/archive/p/android-serialport-api/
https://github.com/cepr/android-serialport-api
When I run the application in a real device it works, but when run in the android emulator, no serial ports are shown in the setup activity.
I am doing the following steps to run the emulator:
C:\Users\myuser\AppData\Local\Android\sdk\tools\emulator.exe -avd Nexus_5_API_23 -qemu -serial COM1
C:\Users\myuser\AppData\Local\Android\sdk\platform-tools\adb.exe wait-for-device
C:\Users\myuser\AppData\Local\Android\sdk\platform-tools\adb.exe shell chmod 666 /dev/ttyS2
Similiar to this link:
https://github.com/cepr/android-serialport-api/blob/master/android-serialport-api/project/run_emulator.sh
I am using a Nexus 5 emulator, Should I choose another emulator?
What I am doing wrong? What I am missing?

Related

BlueStacks - Android Virtual Devices don't get assigned IP and port

I just installed BlueStacks latest version using the default configuration.
Then I ran the Android SDK command:
> adb devices
and I got:
List of devices attached
emulator-5554 device
As you can see, the BlueStacks doesn't get an IP and Port.
I cannot deploy from MSVS2015 to this AVD and I think that's the reason, because I also have Genymotion AVD installed which has an IP and Port and this is visible by the MSVS2015.
List of devices attached
192.168.189.101:5555 device
How can I make the BlueStacks get an IP and Port for the AVD and then deploy to it from MSVS2015/Xamarin?
Try this: run netstat -a in your command prompt. If you see 127.0.0.1:5555 running, then everything is okay, else disable your firewall. Then run adb connect 127.0.0.1:5555. Hope it helps.
For me the following did the trick: On the Bluestacks machine (assuming it is a Windows machine) run cmd as Administrator and type in:
netsh interface portproxy add v4tov4 listenaddress={ip.of.bluestacks.windows.machine} listenport=5555 connectaddress=127.0.0.1 connectport=5555
Now you can connect from remote machine using
adb connect {ip.of.bluestacks.windows.machine}:5555

How to identify an android emulator (AVD) using ADB

I use the emulator AVD and i have 3 android :
First name Android : test
Second name Android : test1
Third name Android : test2
I launch the first and second android with command line :
emulator -avd test
emulator -avd test1
And after, when i use this command line :
avd devices
I have
List of devices attached
emulator-5556 device
emulator-5554 device
How i can identify my android emulator with adb (only command line)?
If it's impossible, how I can know if my device is started with "emulator" (only command line) ?
Try doing a TELNET to the AVD
emulator -avd test
emulator -avd test1
avd devices
List of devices attached
emulator-5556 device
emulator-5554 device
telnet localhost 5554
Trying 127.0.0.1...
Connected to localhost.
...
OK
avd name
test1

Using qemu monitor with the android emulator

I m trying to get a memory dump from a Android system using the pmemsave command from qemu, but I have some problems with accessing the qemu monitor interface.
I start the emulator with the following command:
$./emulator -avd test -verbose -qemu -monitor telnet:127.0.0.1:1234,server,nowait
The emulator starts up just fine, but when I telnet to the port I am not greeted with a banner, and no input seems to have any effect. I have also tried to set -monitor to stdio without success.
Same here. I'm afraid QEMU Monitor is no longer available.
Create AVD, telnet to it, and type qemu monitor:
$ telnet 127.0.0.1 5554
<snip>
qemu monitor
KO: QEMU support no longer available
See also:
Tweet https://twitter.com/blundell_apps/status/536163955186860032
Git commit https://github.com/android/platform_external_qemu/commit/aa1180ca05774398245953deb306c0e25829afee

ADB on WIFI for Android 2.3.7

I have a rooted Samsung Galaxy Gio running MIUI 2.4.20. Is there any way to use ADB over the network?
If you have a terminal emulator on your device, this tutorial enables ADB over WIFI without installing additional software.
In short, execute the following on your phone's terminal emulator:
su
setprop service.adb.tcp.port 5555
stop adbd
start adbd
You can use another port, ohter than 5555, if you want.
Find out which IP your device is using on WIFI. One way is, on phone's your terminal emulator, run the command below and search for the IP in the wlan0 section.
ipaddr
On your computer (mine is a Linux machine), in your android SDK instalation, go to the platform-tools folder and run:
./adb connect <ip-address>
If you chose a different port run:
./adb connect <ip-address>:<port>
And you're set!
Link: http://forum.xda-developers.com/showthread.php?t=1685736
I have found this useful software (Easy Remote), it's working with android 2.3.7.
Easy Remote Link: http://bartwell.ru/soft/android/easyremoteadb/
Download
APK : Download (318.95 KB)
Google Play
EXE (749.06 KB)

Google TV emulator won't start

I followed this Google TV Emulation guide, which tells how to set up my emulator environment. Although when I launch the AVD created by AVD manager, the emulator starts but no logo appears and a black screen. One of my CPU cores is always 100 percent; KVM is enabed. The -verbose option log ends with the following lines:
emulator: control console listening on port 5554, ADB on port 5555
emulator: sent '0012host:emulator:5555' to ADB server
emulator: ping program: /media/Mywork/tools/sdk/android-sdk-linux/tools/ddms
emulator: ping command: /media/Mywork/tools/sdk/android-sdk-linux/tools/ddms
My host envrionment is: Intel i7, Ubuntu 10.04 64-bit.
Can you post the settings for your AVD?
Edit:
Also, have you tried pushing an app into the emulator?
Can you include the steps you used to launch the emulator?
Did you apt-get install kvm?

Categories

Resources