I built an Android source on my server successfully. The commands I used are
source build/envsetup.sh
lunch aosp_x86-eng
make -j32
I can also run the emulator successfully on the server without GUI because the server has no available video device. In order to visually see the emulator, I followed the steps mentioned in here and here to move several built images to my laptop (a MacBook Pro). Basically, I used Android Studio to create a x86 emulator and copied several image files (e.g., system.img, ramdisk.img, userdata.img) into the corresponding avd folder. However, when I try to launch the emulator, it only shows a blank screen without any progress even after 5 mins. I have tried to switch off gpu, switch to software rendering, and switch to cold boot but with no success.
I don't understand the reason because it seems others can succeed after following these steps. Can anyone tell me what mistakes I made?
After several days of search, it turns out the answer is pretty simple. Here is what I did to make it work:
Download Intel x86 Atom System Image (previously I only had Google APIs Intel x86 Atom System Image) in Android Studio.
Create an emulator without Google APIs.
Copy the system.img and ramdisk.img I built on server into <SDK folder>/system-images/android-XX/default/x86/ on my MacBook.
Lunch the emulator and it works pretty well.
I also found if using an emulator with Google APIs, it can only work in software - GLES 2.0 mode. But WebView doesn't work in such mode.
So it seems the reason of a blank screen is because I use an emulator with Google APIs... I don't know why but it works.
I wonder whether it is possible to test a Cordova project made with Intel Xdk on an Android emulator rather than a device on USB or the Intel embedded emulator.
Yes. You will have to install and run the APK file you build onto the Android Emulator. Although, I would recommend you build without Crosswalk (meaning, uncheck the "optimize with Crosswalk" build settings option) if you are going to run your app on the Android emulator.
However, it's usually a lot faster to just install it directly onto a real Android device and use remote CDT over USB to debug the app. See this doc page for help setting up remote CDT on your system.
Of course, there are some system-level debugging things you can do on the Android emulator that can be difficult or impossible to do on a real device, depends on your device.
I get the following message when I try to install Facebook-11.apk on the emulator:
Failure [INSTALL_FAILED_NO_MATCHING_ABIS]
I've found this and it wasn't very helpful. My emulator's Image is Intel Atom (x86_x64) (API 21).
I've searched everywhere and can't seem to find a solution to this. Thanks in advance!
For google searchers out there - Use Genymotion if you want to check your app with the Facebook app.
As mentioned - you can't install Facebook apk on Intel-based images.
I did it on emulators from Android Studio. Basically you can use any ARM emulator but they are slow as hell, so I do not recommend them. In order to use x86:
Go to https://www.apkmirror.com/apk/facebook-2/facebook/variant-%7B%22arches_slug%22%3A%5B%22x86%22%5D%7D/ and download any app you like (but you will have to try some of them, e.g. first one at the moment I was writing this answer did not work on x86 emulator)
Download the selected apk.
Drag'n'drop it on the launched emulator.
Whooorey!
Reference: Genymotion how to debug with Chrome Dev Tools
I'm also trying to get chrome developer tools to work with a genymotion emulator. However, when I follow all of the steps recommended (including at the above link), I don't get the "inspect" link. See: http://neu14.com/demos/screenshot.png
Note: I found out that the default browser on the android devices, at least on most of the prior os versions is not Chrome. Finding an apk to download for Chrome android compatible versions, without an actual google play account, is quite challenging?
It took me ages to get the remote debugging working on Genymotion as I couldn't install Chrome on it without the Google play store which isn't installed by default.
Finally found this video so thought I'd share. It explains how to install this virtual device which has the play store ready installed. Once that was set up and I could install Chrome and set up remote debugging.
Won't work with the default android browser though as you said, but its a step forward!
Hope that helps
I know my answer is little late, but I thought it may be helpful for someone
1) In the device, go to dev settings/ dev tools and enable USB debugging.
2) Start your app on genymotion (for instance if you are using ionic framework, then launch the app using "ionic run android"
3)Go to you chrome and try running "chrome://inspect"
4) Also , please ensure that you have android 4.4 or above version. Else it wont work. I spent quite a lot of time because i was using android 4.3 version.
Hope this helps
I found it far simpler to use a product like Ghostlab (https://www.vanamco.com/ghostlab/) (paid product).
It will let you connect to the site running on your host machine, from the Genymotion emulator. You can then launch chrome dev tools from your host machine.
This question already has answers here:
How to install Google Play Services in a Genymotion VM (with no drag and drop support)?
(17 answers)
Closed 5 years ago.
I'm currently trying out Genymotion and boy, it's so much faster than the ADT emulator.
But I need to install Google Play to download some apps into it. How do I do this?
Update May 28th, 2017: This method is no longer supported by me and doesn't work anymore as far as I know. Don't try it.
# How To Add Google Apps and ARM Support to Genymotion v2.0+ #
Original Source: [GUIDE] Genymotion | Installing ARM Translation and GApps - XDA-Developers
Note(Feb 2nd): Contrary to previous reports, it's been discovered that Android 4.4 does in fact work with ARM translation, although it is buggy. Follow the steps the same as before, just make sure you download the 4.4 GApps.
UPDATE-v1.1: I've gotten more up-to-date builds of libhoudini and have updated the ZIP file. This fixes a lot of app crashes and hangs. Just flash the new one, and it should work.
This guide is for getting back both ARM translation/support (this is what causes the "INSTALL_FAILED_CPU_ABI_INCOMPATIBLE" errors) and Google Play apps in your Genymotion VM.
Download the following ZIPs:
ARM Translation Installer v1.1 (Mirrors)
If you have issues flashing ARM translation, try re-downloading from a mirror
Download the correct GApps for your Android version:
If you have issues flashing GApps, try re-downloading from a mirror
Google Apps for Android 6.0
Google Apps for Android 5.1
Google Apps for Android 5.0
Google Apps for Android 4.4 (Download from CM11 Links) (4.4 GApps might have bugs)
Google Apps for Android 4.3 (Mirrors)
Google Apps for Android 4.2
Google Apps for Android 4.1
Next open your Genymotion VM and go to the home screen
Now drag&drop the Genymotion-ARM-Translation_v1.1.zip onto the Genymotion VM window.
It should say "File transfer in progress". Once it asks you to flash it, click 'OK'.
Now reboot your VM using ADB (adb reboot) or an app like ROM Toolbox. If nescessary you can simply close the VM window, but I don't recommend it.
Once you're on the home screen again drag&drop the gapps-*-signed.zip (the name varies) onto your VM, and click 'OK' when asked.
Once it finishes, again reboot your VM and open the Google Play Store.
Sign in using your Google account
Once in the Store go to the 'My Apps' menu and let everything update (it fixes a lot of issues). Also try updating Google Play Services directly.
Now try searching for 'Netflix' and 'Google Drive'
If both apps show up in the results and you're able to Download/Install them, then congratulations: you now have ARM support and Google Play fully set up!
I've tested this on Genymotion v2.0.1-v2.1 using Android 4.3 and 4.4 images. Feel free to skip the GApps steps if you only want the ARM support. It'll work perfectly fine by itself.
Old Zips: v1.0. Don't download these as they will not solve your issues. It is left for archival and experimental purposes.
Install Genymotion 2.10 or above, now there is a dedicated button to install Google Play Services name "Open GApps". Link for more info
3 Steps process for Genymotion 2.9 or below:-
4.4 Kitkat
5.0 Lollipop
5.1 Lollipop
6.0 Marshmallow
7.0 Nougat
7.1 Nougat (webview patch)
8.0 Oreo
8.1 Oreo
9.0 Pie
Download from above link
Just drag & drop downloaded zip file to genymotion and restart
Add google account and download "Google Play Music" and Run.
EDIT 2
After three months we can say: no more official Google Apps in Genymotion and CyanogenMod-like method is only way to get Google Apps. However, you can still use the previous project of the Genymotion team: AndroVM (download mirror).
EDIT
Google apps will be removed from Genymotion in November. You can find more information on the Genymotion Google Plus page.
Choose virtual device with Google Apps:
Done:
Now there is official FAQ for using Google Play in How do I install Google Play Services?, here the FAQ text:
For intellectual property reasons, Google Play Services are not
included by default in Genymotion virtual devices. However, if you
really need them, you can use the packages provided by OpenGapps.
Simply follow these steps:
Visit opengapps.org
Select x86 as platform
Choose the Android version corresponding to your virtual device
Select nano as variant
Download the zip file
Drag & Drop the zip installer in new Genymotion virtual device (2.7.2 and above only)
Follow the pop-up instructions
Please note Genymobile Inc. and Genymotion assume no liability
whatsoever resulting from the download, install and use of Google Play
Services within your virtual devices. You are solely responsible for
the use and assume all liability related thereto. Moreover, we
disclaim any warranties of any kind for a particular purpose regarding
the compatibility of the OpenGapps packages with any version of
Genymotion.
Alright, this is probably the easiest way to do it:
First of all, you will have to install GAPPS.
Next, open the virtual box and wait for the home screen to show up on Genymotion.
Drag and drop the GAPPS folder that you had downloaded earlier on into Genymotion.
You would get a prompt. Click OK. You would see a lot of errors, but just ignore them and wait for the successful prompt to come up. Click OK again and restart the virtual device.
A Google account screen should show up. Open up the playstore app if it doesn't show up. Sign into your account. Again ignore the errors.
The playstore should open now and should be fully functional.
I could flash the ARM translation but not the gapps, using https://stackoverflow.com/a/20013322/98057. I got the 'Ooops, something went wrong while flashing gapps-jb-20121011-signed.zip' error mentioned above. If you read the Genymotion logs and find an entry like:
Sep 16 23:00:02 [Genymotion Player] [Error] [Adb][shell] Unable to finished process: "Process operation timed out"
Try to apply the flash using adbdirectly:
$ adb -s 192.168.56.101:5555 shell "/system/bin/check-archive.sh /sdcard/Download/gapps-jb-20121011-signed.zip"
$ adb -s 192.168.56.101:5555 shell "/system/bin/flash-archive.sh /sdcard/Download/gapps-jb-20121011-signed.zip"
$ adb reboot
Change these commands according to what your log files say (the path and IP will probably be different).
I found the Genymobile log files in the following folder, by the way:
~/.Genymobile/Genymotion/deployed/<device name>/genymotion-player.log
Google Apps KitKat for Genymotion.
Download the Google Apps ZIP file from the link which contain the essential Google Apps such as Play Store, Gmail, YouTube, etc.
https://www.mediafire.com/?qbbt4lhyu9q10ix
After finishing booting, drag and drop the ZIP file we downloaded named update-gapps-4-4-2-signed.zip to the Genymotion Window. It starts installing the Google Apps, and it asks for your confirmation. Confirm it.
Try to do all the steps specified in the link below and before that upgrade VirtualBox to 4.2 by following the instructions in VirtualBox 4.2.0 Released With Support For Drag'n'drop From Host To Linux Guests, More. Then upgrade Genymotion to the latest version.
Go to the desktop and run Genymotion. Select a virtual device with Android version 4.2 and then drag and drop the two files Genymotion-ARM-Translation_v1.1.zip first. Then Genymotion will show progress and after this it will promt a dialog. Then click OK and it will ask to reboot the device. Restart ADB. Do the same steps for the second file, gapps-jb-20130812-signed.zip and restart ADB.
I hope this will resolve the issue. Check this link - it explains it clearer.
If anyone got an error while signing in to Google and this message appear:
Couldn't Sign In
can't establish a reliable connection to the server...
then try to sign in from the browser - in YouTube, Gmail, Google sites, etc.
This helped me. After signing in in the browser I was able to sign in the Google Play app...
Sometimes "ARM Translation Installer v1.1" is not working.. Here is the simple solution to install Google Play.
Go to this link: http://www.mediafire.com/download/jdn83v1v3bregyu/Galaxy+S4++HTC+One++Xperia+Z+-+4.2.2+-+with+Google+Apps+-+API+17+-+1080x1920.zip
Download the file from the link and extract to get the Android virtual device with Google Play store. The file will be in the name as “Galaxy S4 HTC One Xperia Z – 4.2.2 – with Google Apps – API 17 – 1080×1920″.
Close all your Genymotion store running in the background.
Copy that extracted file in to the following folder.
C:\Users\'username'\AppData\Local\Genymobile\Genymotion\deployed
After you copy you should see this path:
C:\Users\'username'\AppData\Local\Genymobile\Genymotion\deployed\Galaxy S4 HTC One Xperia Z - 4.2.2 - with Google Apps - API 17 - 1080x1920
Inside the “Galaxy S4 HTC One Xperia Z – 4.2.2 – with Google Apps – API 17 – 1080×1920″ folder you will see many *.vmdk and *.vbox files.
Now open VirtualBox and select Machine->Add and browse for the above folder and import the *.vbox file.
Restart Genymotion. Done.