Android Emulator startup does not complete - General Questions and Answers

Hi,
the Android emulator does not startup until complete. It hangs in an infinite loop whilst showing the animated Android logo.
I was patient and tried it multiple times and also left it run over night, but it did not finish. I expect do see the standard Android Home screen.
What are the settings to bring it to run?
OS: Ubuntu 10.10
console out:
Code:
tuxbook:~$ emulator -version
Android emulator version 8.0 (build_id OPENMASTER-77661)
...
tuxbook:~$ emulator -avd Archos_101 -verbose
emulator: found SDK root at /home/me/Programmierung/android-sdk-linux_86
emulator: root virtual device file at /home/me/.android/avd/Archos_101.ini
emulator: virtual device content at /home/me/.android/avd/Archos_101.avd
emulator: virtual device config file: /home/me/.android/avd/Archos_101.avd/config.ini
emulator: locking user data image at /home/me/.android/avd/Archos_101.avd/userdata-qemu.img
emulator: locking cache image at /home/me/.android/avd/Archos_101.avd/cache.img
emulator: locking SD Card image at /home/me/.android/avd/Archos_101.avd/sdcard.img
emulator: 'magic' skin format detected: 1024x600
emulator: autoconfig: -skin 1024x600
emulator: keyset loaded from: /home/me/.android/default.keyset
emulator: argv[00] = "emulator"
emulator: argv[01] = "-kernel"
emulator: argv[02] = "/home/me/Programmierung/android-sdk-linux_86/platforms/android-8/images//kernel-qemu"
emulator: argv[03] = "-initrd"
emulator: argv[04] = "/home/me/Programmierung/android-sdk-linux_86/platforms/android-8/images//ramdisk.img"
emulator: argv[05] = "-nand"
emulator: argv[06] = "system,size=0x4e00000,initfile=/home/me/Programmierung/android-sdk-linux_86/platforms/android-8/images//system.img"
emulator: argv[07] = "-nand"
emulator: argv[08] = "userdata,size=0x4200000,file=/home/me/.android/avd/Archos_101.avd/userdata-qemu.img"
emulator: argv[09] = "-nand"
emulator: argv[10] = "cache,size=0x4200000,file=/home/me/.android/avd/Archos_101.avd/cache.img"
emulator: argv[11] = "-hda"
emulator: argv[12] = "/home/me/.android/avd/Archos_101.avd/sdcard.img"
emulator: argv[13] = "-serial"
emulator: argv[14] = "android-kmsg"
emulator: argv[15] = "-serial"
emulator: argv[16] = "android-qemud"
emulator: argv[17] = "-lcd-density"
emulator: argv[18] = "160"
emulator: argv[19] = "-append"
emulator: argv[20] = "qemu=1 console=ttyS0 android.checkjni=1 android.qemud=ttyS1"
emulator: argv[21] = "-m"
emulator: argv[22] = "96"
emulator: argv[23] = "-clock"
emulator: argv[24] = "unix"
emulator: registered 'boot-properties' qemud service
emulator: mapping 'system' NAND image to /tmp/android/emulator-ZI662H
emulator: rounding devsize up to a full eraseunit, now 4e1e000
emulator: registered 'boot-properties' qemud service
emulator: Adding boot property: 'dalvik.vm.heapsize' = '16m'
emulator: Adding boot property: 'qemu.sf.lcd_density' = '160'
emulator: using 'esd' audio input backend
emulator: using 'esd' audio output backend
emulator: Trace file name is not set
emulator: control console listening on port 5554, ADB on port 5555
emulator: sent '0012host:emulator:5555' to ADB server
emulator: ping program: /home/me/Programmierung/android-sdk-linux_86/tools/ddms
emulator: ping command: /home/me/Programmierung/android-sdk-linux_86/tools/ddms ping emulator standalone
Thanks in advance,
schibbl

Related

Running a ROM on the emulator

Hi guys, I've been trying to get a nandroid dumped ROM to run on an emulator for development purposes, but I can't get the damn thing past the "Android_" screen.
I've made an AVD with 288 mb RAM and called it "visti". Then I made a copy of my SDK/platforms/android-1.5 folder to SDK/platforms/mine and overwrote the system.img in /images with my dumped one.
Then I changed the config file to point at /sdk/platform/mine/images instead of the default.
This is the verbose output I get from "emulator @visti -verbose":
Code:
D:\android\android-sdk-windows-1.5_r2\tools>emulator.exe @visti -verbose
emulator: found SDK root at D:\android\android-sdk-windows-1.5_r2
emulator: root virtual device file at C:\Documents and Settings\Visti\.android/a
vd/visti.ini
emulator: virtual device content at C:\Documents and Settings\Visti\.android\avd
\visti.avd
emulator: virtual device config file: C:\Documents and Settings\Visti\.android\a
vd\visti.avd/config.ini
emulator: locking user data image at C:\Documents and Settings\Visti\.androi
d\avd\visti.avd/userdata-qemu.img
emulator: locking cache image at C:\Documents and Settings\Visti\.android\av
d\visti.avd/cache.img
emulator: ignoring non-existing SD Card at C:\Documents and Settings\Visti\.andr
oid\avd\visti.avd/sdcard.img: No such file or directory
emulator: found skin 'HVGA' in directory: D:\android\android-sdk-windows-1.5_r2/
platforms\mine\skins
emulator: autoconfig: -skin HVGA
emulator: autoconfig: -skindir D:\android\android-sdk-windows-1.5_r2/platforms\m
ine\skins
emulator: keyset loaded from: C:\Documents and Settings\Visti\.android\default.k
eyset
emulator: trying to load skin file 'D:\android\android-sdk-windows-1.5_r2/platfo
rms\mine\skins/HVGA/layout'
emulator: skin network speed: 'full'
emulator: skin network delay: 'none'
emulator: argv[00] = "emulator.exe"
emulator: argv[01] = "-kernel"
emulator: argv[02] = "D:\android\android-sdk-windows-1.5_r2/platforms\mine\image
s/kernel-qemu"
emulator: argv[03] = "-initrd"
emulator: argv[04] = "D:\android\android-sdk-windows-1.5_r2/platforms\mine\image
s/ramdisk.img"
emulator: argv[05] = "-nand"
emulator: argv[06] = "system,size=0x4200000,initfile=D:\android\android-sdk-wind
ows-1.5_r2/platforms\mine\images/system.img"
emulator: argv[07] = "-nand"
emulator: argv[08] = "userdata,size=0x4200000,file=C:\Documents and Settings\Vis
ti\.android\avd\visti.avd/userdata-qemu.img"
emulator: argv[09] = "-nand"
emulator: argv[10] = "cache,size=0x4200000,file=C:\Documents and Settings\Visti\
.android\avd\visti.avd/cache.img"
emulator: argv[11] = "-serial"
emulator: argv[12] = "android-kmsg"
emulator: argv[13] = "-serial"
emulator: argv[14] = "android-qemud"
emulator: argv[15] = "-append"
emulator: argv[16] = "qemu=1 console=ttyS0 android.checkjni=1 android.qemud=ttyS
1 android.ndns=1"
emulator: argv[17] = "-m"
emulator: argv[18] = "288"
emulator: mapping 'system' NAND image to C:\DOCUME~1\Visti\LOCALS~1\Temp\\Androi
dEmulator\TMP1B.tmp
emulator: using 'winaudio' audio input backend
emulator: using 'winaudio' audio output backend
emulator: control console listening on port 5554, ADB on port 5555
emulator: sent '0012host:emulator:5555' to ADB server
emulator: ping program: D:\android\android-sdk-windows-1.5_r2\tools\ddms.bat
emulator: ping command: C:\WINDOWS\system32\cmd.exe /C "D:\android\android-sdk-w
indows-1.5_r2\tools\ddms.bat" ping emulator 1.9

[Q] Android emulator (div by zero)

I got intresting situation with following code:
Code:
static void DivideByZero() {
// volatile to prevent compiler optimizations.
volatile float zero = 0.0f;
volatile float result __attribute__((unused)) = 123.0f / zero;
}
DivideByZero();
int raised = fetestexcept(FE_DIVBYZERO | FE_OVERFLOW);
ASSERT_TRUE((raised & FE_DIVBYZERO) != 0);
When I run my qemu device witout KVM support I got following results:
command line:android -avd x86 -qemu
Code:
FE_DIVBYZERO !=0; //and it's ok
But when I run same source without KVM support:
command line:android -avd x86 -qemu -disable-kvm
Code:
FE_DIVBYZERO ==0; //and it's not ok
As I understand this situation, it's happens because in mxcsr register bit (div by zero) is not setted, by why this bit is not setted i don't understand. Any ideas?
System: Linux

build cm12.1 for n7100 sucessfully, start emulator but black screen

I use fedora 21-x64 build cm12.1 for n7100 in the sdk manager sdk build tool 24.0.3 Android sdk tool 25.2.2 I also install Android 5.1.1 API 22 such as Sources for Andorid SDK, sdk platform.
please help me . thanks advance.
$ emulator -debug-init -logcat '*:v'
emulator: found Android build root: /home/pengfei/android/system
emulator: found Android build out: /home/pengfei/android/system/out/target/product/n7100
emulator: Read property file at /home/pengfei/android/system/out/target/product/n7100/system/build.prop
emulator: Cannot find boot properties file: /home/pengfei/android/system/out/target/product/n7100/boot.prop
emulator: Found target API sdkVersion: 22
emulator: virtual device has no config file - no problem
emulator: using core hw config path: /home/pengfei/android/system/out/target/product/n7100/hardware-qemu.ini
emulator: found skin-specific hardware.ini: /home/pengfei/android/system/development/tools/emulator/skins/HVGA/hardware.ini
emulator: autoconfig: -skin HVGA
emulator: autoconfig: -skindir /home/pengfei/android/system/development/tools/emulator/skins
emulator: found skin-specific hardware.ini: /home/pengfei/android/system/development/tools/emulator/skins/HVGA/hardware.ini
emulator: keyset loaded from: /home/pengfei/.android/default.keyset
emulator: trying to load skin file '/home/pengfei/android/system/development/tools/emulator/skins/HVGA/layout'
emulator: skin network speed: 'full'
emulator: skin network delay: 'none'
emulator: autoconfig: -kernel /home/pengfei/android/system/out/target/product/n7100/kernel
emulator: Auto-detect: Kernel image requires legacy device naming scheme.
emulator: Auto-detect: Kernel does not support YAFFS2 partitions.
emulator: autoconfig: -ramdisk /home/pengfei/android/system/out/target/product/n7100/ramdisk.img
emulator: autoconfig: -sysdir /home/pengfei/android/system/out/target/product/n7100
emulator: Using initial system image: /home/pengfei/android/system/out/target/product/n7100/system.img
emulator: WARNING: system partition size adjusted to match image file (424 MB > 200 MB)
emulator: autoconfig: -data /home/pengfei/android/system/out/target/product/n7100/userdata-qemu.img
emulator: autoconfig: -initdata /home/pengfei/android/system/out/target/product/n7100/userdata.img
emulator: Physical RAM size: 512MB
emulator: WARNING: CPU acceleration only works with x86/x86_64 system images.
emulator: Auto-config: -qemu -cpu cortex-a8
Content of hardware configuration file:
hw.cpu.arch = arm
hw.cpu.model = cortex-a8
hw.ramSize = 512
hw.screen = touch
hw.mainKeys = yes
hw.trackBall = yes
hw.keyboard = no
hw.keyboard.lid = no
hw.keyboard.charmap = qwerty2
hw.dPad = yes
hw.gsmModem = yes
hw.gps = yes
hw.battery = yes
hw.accelerometer = yes
hw.audioInput = yes
hw.audioOutput = yes
hw.sdCard = yes
disk.cachePartition = yes
disk.cachePartition.size = 66m
hw.lcd.width = 320
hw.lcd.height = 480
hw.lcd.depth = 16
hw.lcd.density = 160
hw.lcd.backlight = yes
hw.gpu.enabled = no
hw.initialOrientation = portrait
hw.camera.back = emulated
hw.camera.front = none
vm.heapSize = 48
hw.sensors.proximity = yes
hw.sensors.magnetic_field = yes
hw.sensors.orientation = yes
hw.sensors.temperature = yes
hw.useext4 = yes
kernel.path = /home/pengfei/android/system/out/target/product/n7100/kernel
kernel.parameters = androidboot.console=ttyS2 android.checkjni=1 androidboot.logcat=*:v
kernel.newDeviceNaming = no
kernel.supportsYaffs2 = no
disk.ramdisk.path = /home/pengfei/android/system/out/target/product/n7100/ramdisk.img
disk.systemPartition.initPath = /home/pengfei/android/system/out/target/product/n7100/system.img
disk.systemPartition.size = 424m
disk.dataPartition.path = /home/pengfei/android/system/out/target/product/n7100/userdata-qemu.img
disk.dataPartition.size = 200m
avd.name = <build>
.
QEMU options list:
emulator: argv[00] = "/home/pengfei/android/system/prebuilts/android-emulator/linux-x86_64/emulator64-arm"
emulator: argv[01] = "-serial"
emulator: argv[02] = "stdio"
emulator: argv[03] = "-android-hw"
emulator: argv[04] = "/home/pengfei/android/system/out/target/product/n7100/hardware-qemu.ini"
Concatenated QEMU options:
/home/pengfei/android/system/prebuilts/android-emulator/linux-x86_64/emulator64-arm -serial stdio -android-hw /home/pengfei/android/system/out/target/product/n7100/hardware-qemu.ini
emulator: registered 'boot-properties' qemud service
emulator: Using kernel serial device prefix: ttyS
emulator: No fstab.goldfish file in ramdisk image
emulator: Probing system image file for partition type: /home/pengfei/android/system/out/target/product/n7100/system.img
emulator: system partition format: yaffs2
emulator: Mapping 'system' partition image to /tmp/android-pengfei/emulator-i5hKet
emulator: nand_add_dev: system,size=0x1a800000,file=/tmp/android-pengfei/emulator-i5hKet,initfile=/home/pengfei/android/system/out/target/product/n7100/system.img
emulator: rounding devsize up to a full eraseunit, now 1a81a000
emulator: Probing userdata image file for partition type: /home/pengfei/android/system/out/target/product/n7100/userdata-qemu.img
emulator: userdata partition format: yaffs2
emulator: nand_add_dev: userdata,size=0xc800000,file=/home/pengfei/android/system/out/target/product/n7100/userdata-qemu.img
emulator: rounding devsize up to a full eraseunit, now c810000
emulator: cache partition format: ext4
emulator: Mapping 'cache' partition image to /tmp/android-pengfei/emulator-OPFxL0
emulator: Creating empty cache partition image at: /tmp/android-pengfei/emulator-OPFxL0
Creating filesystem with parameters:
Size: 69206016
Block size: 4096
Blocks per group: 32768
Inodes per group: 4224
Inode size: 256
Journal blocks: 1024
Label:
Blocks: 16896
Block groups: 1
Reserved block group size: 7
Created filesystem with 11/4224 inodes and 1302/16896 blocks
emulator: nand_add_dev: cache,size=0x4200000,file=/tmp/android-pengfei/emulator-OPFxL0,pagesize=512,extrasize=0
emulator: registered 'boot-properties' qemud service
emulator: Adding boot property: 'dalvik.vm.heapsize' = '48m'
emulator: Adding boot property: 'ro.config.low_ram' = 'true'
emulator: Adding boot property: 'qemu.sf.lcd_density' = '160'
emulator: Adding boot property: 'qemu.hw.mainkeys' = '1'
emulator: Adding boot property: 'qemu.sf.fake_camera' = 'back'
emulator: Initializing hardware OpenGLES emulation support
emulator: Kernel parameters: qemu.gles=0 qemu=1 console=ttyS0 android.qemud=ttyS1 androidboot.console=ttyS2 android.checkjni=1
androidboot.logcat=*:v ndns=3
emulator: autoconfig: -scale 1
emulator: Forcing ro.adb.qemud to "0".
emulator: control console listening on port 5554, ADB on port 5555
emulator: sent '0012host:emulator:5555' to ADB server
emulator: ping program: /home/pengfei/android/system/prebuilts/android-emulator/linux-x86_64/ddms

[GUIDE] Run a socks proxy on android using stunnel. (Tethering, VPN, you name it.)

For this guide, we'll be using stunnel 5.41 built for android
Manual steps (Overview):
1. Download and extract stunnel.
2. Copy the stunnel binary to a location that allows setting the +x flag. (/data/local/tmp/, /su/ etc...)
3. Chmod stunnel to be executable.
4. Create your config file.
5. Optional, run a stunnel instance at home, and tunnel into home.
6. Create your psk.
7. Run Stunnel
8. Optional: Forward ADB ports
1.
Download the stunnel 5.41 from here: ftp://ftp.stunnel.org/stunnel/archive/5.x/stunnel-5.41-android.zip
Extract the zip file, and in a single folder you will find the stunnel binary.
2.
We will assume you don't have root, so for this guide I will have you place stunnel in /data/local/tmp/ but feel free to replace that with locations in /su/bin/ or /system/bin/ to suit your fancy.
Code:
adb push stunnel /data/local/tmp/
3.
Set permissions:
Code:
adb shell chmod 755 /data/local/tmp/stunnel
4.
For this setup, we will be using PSK security. This is not the best security method, but since it will only be running on your phone it should be fine.
The config file we will be creating is this:
Code:
[socks server]
protocol = socks
accept = :::20102
PSKsecrets = psk.txt
[socks client]
client = yes
accept = :::4040
connect = localhost:20102
PSKsecrets = psk.txt
We'll put this in /data/local/tmp/conf. To create this file we will run:
Code:
adb shell "echo '[socks server]\nprotocol = socks\naccept = :::20102\nPSKsecrets = psk.txt\n\n[socks client]\nclient = yes\naccept = :::4080\nconnect = localhost:20102\nPSKsecrets = psk.txt' > /data/local/tmp/conf"
5.
Notice that there is a section for both a client and server. you can take the server portion, and move it to another computer.
If you do this, your client config file will look something like:
Code:
[socks client]
client = yes
accept = :::4040
connect = your.servername.here:20102
PSKsecrets = psk.txt
You can read more about doing this here: https://www.stunnel.org/socksvpn.html
replace "your.servername.here" with the IP or hostname of your home computer, vps, or wherever stunnel will run.
6.
You will need to create a username and password to secure your socks tunnel. In this example I will be using a username of "secret" and a password of "codes are the best thing ever". Note: your password must be more than 32 characters long. We'll create this file as psk.txt (you may have noticed this earlier in the config.) It must be formatted as: "usernameassword"
The file should look something like:
Code:
secret:codes are the best thing ever
So, let's go ahead and create the file:
Code:
adb shell "echo 'secret:codes are the best thing ever' > /data/local/tmp/psk.txt"
This file should be on both the server and the client. (The default in this guide is to have both the server and client running on your phone.)
7.
Now, with all files in place, you can start stunnel by running:
Code:
adb shell "cd /data/local/tmp ; ./stunnel conf"
This will now run in the background waiting for connections.
You can now configure android applications to use this connection as a socks proxy on localhost:4080, but that is not terribly useful unless you have a server somewhere else running the socks server portion.
8.
You can forward ports to a computer via adb:
Code:
adb forward tcp:4080 tcp:4080
Now, this is where it gets more useful. You can configure your computer to use your phone as a socks proxy simply by configuring the proxy settings on your favorite browser, application or whatever you like to use: localhost:4080
Handy one-liners.
Run the following to download stunnel to your phone, create a config file, dump a default PSK in place, and forward port 4080 to your local machine for tethering joy!
Code:
adb shell "if [ ! -f /data/local/tmp/stunnel ]; then curl 'http://cheatersedge.org/android/stunnel' > /data/local/tmp/stunnel ; chmod 755 /data/local/tmp/stunnel ; fi ; echo '[socks server]\nprotocol = socks\naccept = :::20102\nPSKsecrets = psk.txt\n\n[socks client]\nclient = yes\naccept = :::4080\nconnect = localhost:20102\nPSKsecrets = psk.txt' > /data/local/tmp/conf ; echo 'secret:codes are the best thing ever' > /data/local/tmp/psk.txt ; cd /data/local/tmp ; ./stunnel conf" && adb forward tcp:4080 tcp:4080
Stop stunnel from running on your phone:
Code:
adb shell "kill -9 `ps -A | grep stunnel | sed 's/[a-zA-Z ]* \([0-9]*\) .*$/\1/'`"
Stunnel on Android 7.x not working?
Hello,
I have trouble with stunnel on Android 7.x..
I'm trying to connect to OpenVPN server through SSL tunneling with stunnel.
On phone I'm using stunnel installed in Termux and OpenVPN. Everything is correctly configured, Im using the same config on other devices in same network and it works perfectly.
I tried it with different devices with Android 7.x and it is not working at all
Immediately after succesful connection I am receiving:
Code:
TLS fd: Software caused connection abort (103)
TLS socket closed (SSL_read)
And it is still reconnecting again and again with the same error.
I also tried it with stunnel downloaded directly from stunnel.org site..
Anyone with new Android who have working stunnel? Where can be the problem?
Example stunnel.log is in attachment.
Thank you very much
Would that work with the no-root firewall NetGuard that supports only chaining via SOCKS5?

Android Emulator Serial COM1 port crashes on data incoming from windows

Hi,
I have the following set:
* Windows 10 pro
* Android Studio Emulator 27.3.10
* Virtual Windows COM port bridge COM1 <--> COM2
I start the emulator with a clean API 25
target Android 7.1.1 for x86
with the following windows command:
Code:
emulator @Device_API_25 -qemu -serial COM1
when running:
Code:
adb shell "dmesg|grep tty"
i can see that the serial port was forwarded:
[ 0.000000] console [ttyS0] enabled
[ 2.399629] 00:04: ttyS0 at I/O 0x3f8 (irq = 4) is a 16550A
[ 2.430745] 00:05: ttyS1 at I/O 0x2f8 (irq = 3) is a 16550A
Click to expand...
Click to collapse
afterwards i run the adb commands:
Code:
adb root
adb shell "setenforce 0"
Now,
when sending from android shell:
Code:
echo test >/dev/ttyS1
I can see the outcome in windows COM2 port
but, when trying to send from windows:
Code:
echo test > COM2
the emulator crashes with the following information:
emulator: ERROR: detected a hanging thread 'QEMU2 main loop'. No response for 15058 ms
Click to expand...
Click to collapse
and the emulator crash data is (partially):
Operating system: Windows NT
10.0.17134
CPU: amd64
family 6 model 61 stepping 4
4 CPUs
Crash reason: EXCEPTION_ACCESS_VIOLATION_WRITE
Crash address: 0x0
Assertion: Unknown assertion type 0x00000000
Process uptime: not available
Click to expand...
Click to collapse
did anyone encountered such an issue ?

Categories

Resources