41

The Snapshot option speeds up the boot of the emulator by saving a snapshot of its RAM once it has booted, and restoring from that snapshot on future uses. That way, it doesn't have to run the boot process (which is slow, because it's emulated) every time you start the emulator. The Use Host GPU option uses the host computer's OpenGL implementation (which ...


27

well wait-for-device, as you already realized only waits until the adb daemon properly started. This is already at init time. In order to check for a complete boot you cann ad to your script something like: in pseudo: wait-for-device long as getprop sys.boot_completed != 1 sleep some seconds check getprop sys.boot_completed again shell input keyevent 82 ...


25

1. Using command line: Here's how you can copy files to an SD card image. You have to use adb push to copy files from Desktop to Emulator and adb pull for the reverse. Here's the syntax to copy files to or from an Emulator/Device Instance: Copy from desktop to emulator: adb push <local> <remote> Copy from emulator to desktop: adb pull <...


17

You can open a telnet connection to the AVD: telnet localhost 5554 then once connected: power capacity 100 or power status full Source: Android Developers: Using the Emulator


14

I am using Android Studio 2.1.1 and Ubuntu 16.04 (x64). The following solved the problems (sh: 1: glxinfo: not found and libGL error:.) for me. $ sudo apt-get install lib64stdc++6 (if it is not installed) $ cd ~/Android/Sdk/tools/lib64/libstdc++ $ mv libstdc++.so.6 libstdc++.so.6.original $ ln -s /usr/lib64/libstdc++.so.6 ~/Android/Sdk/tools/lib64/libstdc++ ...


13

This is an old question and borderline off-topic but here is how to do it in a single line: adb wait-for-device shell 'while [[ -z $(getprop sys.boot_completed) ]]; do sleep 1; done; input keyevent 82'


13

There are 3rd-party "fake camera" apps that will let you to choose an image instead, such as: Image2Camera (free) Fake Camera by New Horizon Apps (free) Fake Camera - donate version by Vaclav Balak (paid) Note that you need to have the image inside the (emulator) device storage first for these apps to be useful. Also, since these apps are not really a ...


13

How to root android emulator (Android 7.1.1/ Nougat) I’m pleased to inform the community of an easier way to root android emulator (run from standalone Android SDK) Requirements: SuperSU app (chainfire) latest version 2.82 Recovery flashable.zip (contains su binary) (Here is alternative mirror link for flashable zip if the main link is not working : ...


12

You can call between AVD's. Run 2 AVD, each will have diffrent number - it is placed on window title bar, example 5558. Call from one to other using this numbers. You can also text ;] In your AVD you simply cannot use real celluar network because your PC/Mac do not have built-in GSM modem (even if, AVD is not supporting this kind of feature).


12

There are some hotkeys listed for ICS, which hopefully still work with Kitkat: Rotating the screen: (to get that operate we must to have activated “Auto-rotate screen”) Press F12 two times in less than 2 seconds = Rotate 90º to the LEFT. Press F11 two times in less than 2 seconds = Rotate 90º to the RiGHT. Press F10 two times in less than 2 ...


10

The Snapshot option allows you to use a feature that's similar to the Hibernate function in Windows. It saves the contents of the emulator's memory to disk when you close the emulator, so that when you open it, it doesn't have to boot the OS, but instead it can load the memory contents from the disk and resume from where you left off. This allows you to ...


9

1) Go get GApps for the emulator from http://opengapps.org 2) Unzip to get GmsCore.apk GoogleServicesFramework.apk GoogleLoginService.apk Phonesky.apk Launch the emulator from the command line, on linux you do ./emulator [name] -no-boot-anim -writable-system on windows it's probably emulator.exe [name] -no-boot-anim -writable-system Make sure ...


9

Figured it out - seems like you just can't change permissions for files on sdcard. Moved it to data/local and chmod worked like a charm.


8

This can happen for the following reasons: The emulator presents an x86/MIPS CPU which the app does not support (probably not in your case as the app doesn't seem to require native code). Google Play Services. The emulator does not have them, in fact no emulator can have them unless they licensed it from Google, and most apps depend on them. Mobile data as ...


7

I think a new command has been added since the earlier answers: adb forward --list


6

The Android emulator doesn't currently support this, unfortunately. There is a configuration file in the build system that determines whether or not to enable the user accounts feature, and it is disabled in the emulator images distributed by Google. You can star this issue on the bug tracker in the meantime. However there are two alternatives you can look ...


6

Digging through the logcat, immediately after the com.android.browser activity is launched, I found a "Fatal signal 11 (SIGSEGV)" in vold, the volume daemon that handles storage. Lots of other storage related issues in the log too. So I checked the virtual device settings one more time and noticed that the SD Card size was not specified. I had assumed that ...


6

Based on the comments from Google in this bugtracker - emulator support of screenrecorder isn't going to happen in the near future due to hardware requirements/limitations. https://code.google.com/p/android/issues/detail?id=61682


6

Make sure that you're not running any other virtual machines, then try again. I was running a guest Windows 8 VirtualBox on El Capitan and I got the same error when I tried to run a virtual Android device in Android Studio. I shutdown the guest OS and VirtualBox then my AVD booted up.


5

I just checked if the file /dev/kvm was opened before and after the emulator started: sudo lsof -n | grep /dev/kvm


5

The following was implemented on a default configuration. Open AndroidStudio (AS) AVD Manager, click the "pencil icon" to edit the virtual device settings, uncheck the box next to "Enable Device Frame". Click " NOTE: you may have to click the "Show Advanced Settings" button and scroll down to Device Frame.


4

The Android emulator is resetting the system image when rebooting. You can find the changed version of the system.img in your /tmp here: /tmp/android-username/ It usually has a name like emulator-*. Copy that file before shutting down the emulator.


4

I had this issue despite having the correct configuration, and realized that the actual problem was that the focus was on the emulator control buttons windows, as reported in this issue. To check if this is your problem, see if pressing space actually presses one of those buttons, and if pressing tab moves the highlight focus square between elements in the ...


4

If your goal is to install Google Apps in the emulator, then you need to follow a completely different proceedure then the one telling you to reboot into recovery. Truth is, the emulators do not have a recovery partition, so there's no such thing as recovery mode for an emulator. I can suggest a couple of options: Search for procedures that are specific to ...


4

You can make an adb backup of only the desired apps, then adb restore it to an emulator. As far as I know, this should preserve all the apps' data. Also, backups of user apps should be compatible between different versions and architectures of Android - but there's a chance of failure, so try it before you wipe anything!


4

In my case, it's the docker program conflict with AVD, quit docker then restart the AVD is ok.


4

From ADB documentation : "Some devices might not be able to record at their native display resolution. If you encounter problems with screen recording, try using a lower screen resolution." Documentation link : https://developer.android.com/studio/command-line/adb.html#screenrecord Try to use the size option : --size widthxheight Sets the ...


4

You can use this command: adb shell settings get secure location_providers_allowed Possible outcomes: returns nothing, implying the GPS is switched off. gps,wifi,network or gps,network -- High accuracy mode wifi,network or network only -- Battery saving mode gps -- Device only


4

For that you have to install Google play image from Android Studio SDK manager.But you can't get it for api level below 24


3

Genymotion is an accelerated emulator, which may let you get a better feel for the UI and graphics applications. I believe it paravirtualizes graphics (OpenGL) calls, using the host's graphics processor to accelerate the emulator.


Only top voted, non community-wiki answers of a minimum length are eligible