Android 模拟器 Genymotion 安装配置与 ARM 支持

简介

Genymotion是一款基于x86架构的Android模拟器,由于系统启动速度,应用运行速度远远快于Android SDK自带模拟器而受到广泛应用。

优缺点

优点

1 模拟器启动速度快 比AVD快很多
2 应用运行速度快
3 跨平台
4 IDE支持

缺点

1 与真机相比,无法支持一些硬件相关的传感器特性等
2 由于市场上大部分应用都是基于ARM架构来编译的,因此,与默认模拟器,真机相比,对于包含仅支持ARM架构的so的应用,默认不支持。

基于x86架构的模拟器/真机,兼容ARM指令有两个解决方案:
对于x86真机,x86处理器已经能够基本兼容ARM指令了。
对于Genymotion模拟器,则通过安装Genymotion-ARM-Translation来进行兼容。

安装Genymotion

安装步骤

1 安装虚拟机VirtualBox https://www.virtualbox.org/wiki/Downloads
2 注册Genymotion帐号 https://www.genymotion.com/account/create/
3 登录,下载并安装Genymotion https://www.genymotion.com/download/

安装指南

详细安装步骤,请参考以下文章:Installation
https://docs.genymotion.com/Content/01_Get_Started/Installation.htm

Genymotion的Github

https://github.com/Genymobile
开源了部分东西,感兴趣的可以了解下.

ARM-Translation兼容ARM

当我们安装某些apk 的时候,会发现无法正常安装.这时候实际就是还未支持ARM.
我们需要去向启动的模拟器安装Genymotion-ARM-Translation.zip.https://pan.baidu.com/s/1dFxiVol  该文件已上传至技术中心\测试组\PhoneTools\Genymotion
该包目前可以支持到android sdk API26 也就是android 8.0.0系统.

1 .windows下的安装

找到该zip,直接拖拽进启动的模拟器,模拟器即会提示,根据提示点击进行安装.安装成功后会有提示.
记得还需要重启模拟器一下.

2. ubuntu18.04下的安装

ubuntu16.04 的nautilus 也就是文件管理器,是支持拖拽的.但到了18.04 文件管理器该特性默认不支持(即使我们 sudo nautilus 启动的文件管理器也不行).
我们可以如下步骤安装:

### 2. 1 先adb push 到手机模拟器的/sdcard/Download

cmd@TR:~/MyDownload$ adb push Genymotion-ARM-Translation.zip /sdcard/Download
Genymotion-ARM-Translation.zip: 1 file pushed. 83.9 MB/s (13959459 bytes in 0.159s)

### 2.2 然后adb shell flash-archive.sh 该zip包 即可,记得安装成功后还需要重启模拟器一下.

cmd@TR:~/MyDownload$ adb shell flash-archive.sh /sdcard/Download/Genymotion-ARM-Translation.zip
uid=0(root) gid=0(root) groups=0(root),1004(input),1007(log),1011(adb),1015(sdcard_rw),1028(sdcard_r),3001(net_bt_admin),3002(net_bt),3003(inet),3006(net_bw_stats),3009(readproc) context=u:r:toolbox:s0
/sdcard/Download/Genymotion-ARM-Translation.zip seems to be a zip archive
[flash_archive] Creating tmp dir
rm: /data/local/tmp/flash-tmp-dir/: No such file or directory
rm: /data/local/tmp/sanitized.zip: No such file or directory
[flash_archive] Unzip archive
Archive:  /sdcard/Download/Genymotion-ARM-Translation.zip
   creating: META-INF/com/
   creating: META-INF/com/google/
   creating: META-INF/com/google/android/
  inflating: META-INF/com/google/android/update-binary
  inflating: META-INF/com/google/android/updater-script
   creating: system/
   creating: system/lib/
   creating: system/lib/arm/
  inflating: system/lib/arm/cpuinfo
  inflating: system/lib/arm/libandroid.so
  inflating: system/lib/arm/libandroid_runtime.so
  inflating: system/lib/arm/libbinder.so
  inflating: system/lib/arm/libc.so
  inflating: system/lib/arm/libcamera_client.so
  inflating: system/lib/arm/libcrypto.so
  inflating: system/lib/arm/libcutils.so
  inflating: system/lib/arm/libc_orig.so
  inflating: system/lib/arm/libdl.so
  inflating: system/lib/arm/libEGL.so
  inflating: system/lib/arm/libemoji.so
  inflating: system/lib/arm/libETC1.so
  inflating: system/lib/arm/libexpat.so
  inflating: system/lib/arm/libfacelock_jni.so
  inflating: system/lib/arm/libfilterfw.so
  inflating: system/lib/arm/libfilterpack_facedetect.so
  inflating: system/lib/arm/libfilterpack_imageproc.so
  inflating: system/lib/arm/libgabi++.so
  inflating: system/lib/arm/libgcomm_jni.so
  inflating: system/lib/arm/libGLESv1_CM.so
  inflating: system/lib/arm/libGLESv2.so
  inflating: system/lib/arm/libgui.so
  inflating: system/lib/arm/libhardware.so
  inflating: system/lib/arm/libhardware_legacy.so
  inflating: system/lib/arm/libharfbuzz.so
  inflating: system/lib/arm/libhwui.so
  inflating: system/lib/arm/libicui18n.so
  inflating: system/lib/arm/libicuuc.so
  inflating: system/lib/arm/libjnigraphics.so
  inflating: system/lib/arm/libjni_mosaic.so
  inflating: system/lib/arm/libjpeg.so
  inflating: system/lib/arm/liblog.so
  inflating: system/lib/arm/libm.so
  inflating: system/lib/arm/libmedia.so
  inflating: system/lib/arm/libnativehelper.so
  inflating: system/lib/arm/libnetutils.so
  inflating: system/lib/arm/libnfc_ndef.so
  inflating: system/lib/arm/libOpenMAXAL.so
  inflating: system/lib/arm/libOpenSLES.so
  inflating: system/lib/arm/libpixelflinger.so
  inflating: system/lib/arm/libskia.so
  inflating: system/lib/arm/libsonivox.so
  inflating: system/lib/arm/libsqlite.so
  inflating: system/lib/arm/libssl.so
  inflating: system/lib/arm/libstagefright.so
  inflating: system/lib/arm/libstagefright_foundation.so
  inflating: system/lib/arm/libstdc++.so
  inflating: system/lib/arm/libstlport.so
  inflating: system/lib/arm/libui.so
  inflating: system/lib/arm/libusbhost.so
  inflating: system/lib/arm/libutils.so
  inflating: system/lib/arm/libvideochat_jni.so
  inflating: system/lib/arm/libvideochat_stabilize.so
  inflating: system/lib/arm/libvoicesearch.so
  inflating: system/lib/arm/libvorbisidec.so
  inflating: system/lib/arm/libwpa_client.so
  inflating: system/lib/arm/libWVphoneAPI.so
  inflating: system/lib/arm/libz.so
  inflating: system/lib/arm/linker
  inflating: system/lib/libdvm_houdini.so
  inflating: system/lib/libhoudini.so
[flash_archive] Remount /system/ in rw
[flash_archive] Start file install
[ERROR][flash_archive] META-INF/com/google/android/update-binary is an ARM binary, using system updater
[sanitize_zipfile_and_execute_update_binary] Repackaging system/lib/arm/libandroid.so ARM lib
[sanitize_zipfile_and_execute_update_binary] Repackaging system/lib/arm/libandroid_runtime.so ARM lib
[sanitize_zipfile_and_execute_update_binary] Repackaging system/lib/arm/libbinder.so ARM lib
[sanitize_zipfile_and_execute_update_binary] Repackaging system/lib/arm/libc.so ARM lib
[sanitize_zipfile_and_execute_update_binary] Repackaging system/lib/arm/libcamera_client.so ARM lib
[sanitize_zipfile_and_execute_update_binary] Repackaging system/lib/arm/libcrypto.so ARM lib
[sanitize_zipfile_and_execute_update_binary] Repackaging system/lib/arm/libcutils.so ARM lib
[sanitize_zipfile_and_execute_update_binary] Repackaging system/lib/arm/libc_orig.so ARM lib
[sanitize_zipfile_and_execute_update_binary] Repackaging system/lib/arm/libdl.so ARM lib
[sanitize_zipfile_and_execute_update_binary] Repackaging system/lib/arm/libEGL.so ARM lib
[sanitize_zipfile_and_execute_update_binary] Repackaging system/lib/arm/libemoji.so ARM lib
[sanitize_zipfile_and_execute_update_binary] Repackaging system/lib/arm/libETC1.so ARM lib
[sanitize_zipfile_and_execute_update_binary] Repackaging system/lib/arm/libexpat.so ARM lib
[sanitize_zipfile_and_execute_update_binary] Repackaging system/lib/arm/libfacelock_jni.so ARM lib
[sanitize_zipfile_and_execute_update_binary] Repackaging system/lib/arm/libfilterfw.so ARM lib
[sanitize_zipfile_and_execute_update_binary] Repackaging system/lib/arm/libfilterpack_facedetect.so ARM lib
[sanitize_zipfile_and_execute_update_binary] Repackaging system/lib/arm/libfilterpack_imageproc.so ARM lib
[sanitize_zipfile_and_execute_update_binary] Repackaging system/lib/arm/libgabi++.so ARM lib
[sanitize_zipfile_and_execute_update_binary] Repackaging system/lib/arm/libgcomm_jni.so ARM lib
[sanitize_zipfile_and_execute_update_binary] Repackaging system/lib/arm/libGLESv1_CM.so ARM lib
[sanitize_zipfile_and_execute_update_binary] Repackaging system/lib/arm/libGLESv2.so ARM lib
[sanitize_zipfile_and_execute_update_binary] Repackaging system/lib/arm/libgui.so ARM lib
[sanitize_zipfile_and_execute_update_binary] Repackaging system/lib/arm/libhardware.so ARM lib
[sanitize_zipfile_and_execute_update_binary] Repackaging system/lib/arm/libhardware_legacy.so ARM lib
[sanitize_zipfile_and_execute_update_binary] Repackaging system/lib/arm/libharfbuzz.so ARM lib
[sanitize_zipfile_and_execute_update_binary] Repackaging system/lib/arm/libhwui.so ARM lib
[sanitize_zipfile_and_execute_update_binary] Repackaging system/lib/arm/libicui18n.so ARM lib
[sanitize_zipfile_and_execute_update_binary] Repackaging system/lib/arm/libicuuc.so ARM lib
[sanitize_zipfile_and_execute_update_binary] Repackaging system/lib/arm/libjnigraphics.so ARM lib
[sanitize_zipfile_and_execute_update_binary] Repackaging system/lib/arm/libjni_mosaic.so ARM lib
[sanitize_zipfile_and_execute_update_binary] Repackaging system/lib/arm/libjpeg.so ARM lib
[sanitize_zipfile_and_execute_update_binary] Repackaging system/lib/arm/liblog.so ARM lib
[sanitize_zipfile_and_execute_update_binary] Repackaging system/lib/arm/libm.so ARM lib
[sanitize_zipfile_and_execute_update_binary] Repackaging system/lib/arm/libmedia.so ARM lib
[sanitize_zipfile_and_execute_update_binary] Repackaging system/lib/arm/libnativehelper.so ARM lib
[sanitize_zipfile_and_execute_update_binary] Repackaging system/lib/arm/libnetutils.so ARM lib
[sanitize_zipfile_and_execute_update_binary] Repackaging system/lib/arm/libnfc_ndef.so ARM lib
[sanitize_zipfile_and_execute_update_binary] Repackaging system/lib/arm/libOpenMAXAL.so ARM lib
[sanitize_zipfile_and_execute_update_binary] Repackaging system/lib/arm/libOpenSLES.so ARM lib
[sanitize_zipfile_and_execute_update_binary] Repackaging system/lib/arm/libpixelflinger.so ARM lib
[sanitize_zipfile_and_execute_update_binary] Repackaging system/lib/arm/libskia.so ARM lib
[sanitize_zipfile_and_execute_update_binary] Repackaging system/lib/arm/libsonivox.so ARM lib
[sanitize_zipfile_and_execute_update_binary] Repackaging system/lib/arm/libsqlite.so ARM lib
[sanitize_zipfile_and_execute_update_binary] Repackaging system/lib/arm/libssl.so ARM lib
[sanitize_zipfile_and_execute_update_binary] Repackaging system/lib/arm/libstagefright.so ARM lib
[sanitize_zipfile_and_execute_update_binary] Repackaging system/lib/arm/libstagefright_foundation.so ARM lib
[sanitize_zipfile_and_execute_update_binary] Repackaging system/lib/arm/libstdc++.so ARM lib
[sanitize_zipfile_and_execute_update_binary] Repackaging system/lib/arm/libstlport.so ARM lib
[sanitize_zipfile_and_execute_update_binary] Repackaging system/lib/arm/libui.so ARM lib
[sanitize_zipfile_and_execute_update_binary] Repackaging system/lib/arm/libusbhost.so ARM lib
[sanitize_zipfile_and_execute_update_binary] Repackaging system/lib/arm/libutils.so ARM lib
[sanitize_zipfile_and_execute_update_binary] Repackaging system/lib/arm/libvideochat_jni.so ARM lib
[sanitize_zipfile_and_execute_update_binary] Repackaging system/lib/arm/libvideochat_stabilize.so ARM lib
[sanitize_zipfile_and_execute_update_binary] Repackaging system/lib/arm/libvoicesearch.so ARM lib
[sanitize_zipfile_and_execute_update_binary] Repackaging system/lib/arm/libvorbisidec.so ARM lib
[sanitize_zipfile_and_execute_update_binary] Repackaging system/lib/arm/libwpa_client.so ARM lib
[sanitize_zipfile_and_execute_update_binary] Repackaging system/lib/arm/libWVphoneAPI.so ARM lib
[sanitize_zipfile_and_execute_update_binary] Repackaging system/lib/arm/libz.so ARM lib
  adding: META-INF/ (stored 0%)
  adding: META-INF/com/ (stored 0%)
  adding: META-INF/com/google/ (stored 0%)
  adding: META-INF/com/google/android/ (stored 0%)
  adding: META-INF/com/google/android/update-binary (deflated 35%)
  adding: META-INF/com/google/android/updater-script (deflated 37%)
  adding: system/ (stored 0%)
  adding: system/lib/ (stored 0%)
  adding: system/lib/arm/ (stored 0%)
  adding: system/lib/arm/cpuinfo (deflated 9%)
  adding: system/lib/arm/libandroid.so (deflated 75%)
  adding: system/lib/arm/libandroid_runtime.so (deflated 65%)
  adding: system/lib/arm/libbinder.so (deflated 67%)
  adding: system/lib/arm/libc.so (deflated 48%)
  adding: system/lib/arm/libcamera_client.so (deflated 74%)
  adding: system/lib/arm/libcrypto.so (deflated 55%)
  adding: system/lib/arm/libcutils.so (deflated 48%)
  adding: system/lib/arm/libc_orig.so (deflated 48%)
  adding: system/lib/arm/libdl.so (deflated 65%)
  adding: system/lib/arm/libEGL.so (deflated 74%)
  adding: system/lib/arm/libemoji.so (deflated 64%)
  adding: system/lib/arm/libETC1.so (deflated 50%)
  adding: system/lib/arm/libexpat.so (deflated 57%)
  adding: system/lib/arm/libfacelock_jni.so (deflated 54%)
  adding: system/lib/arm/libfilterfw.so (deflated 64%)
  adding: system/lib/arm/libfilterpack_facedetect.so (deflated 46%)
  adding: system/lib/arm/libfilterpack_imageproc.so (deflated 53%)
  adding: system/lib/arm/libgabi++.so (deflated 72%)
  adding: system/lib/arm/libgcomm_jni.so (deflated 58%)
  adding: system/lib/arm/libGLESv1_CM.so (deflated 74%)
  adding: system/lib/arm/libGLESv2.so (deflated 73%)
  adding: system/lib/arm/libgui.so (deflated 70%)
  adding: system/lib/arm/libhardware.so (deflated 63%)
  adding: system/lib/arm/libhardware_legacy.so (deflated 52%)
  adding: system/lib/arm/libharfbuzz.so (deflated 48%)
  adding: system/lib/arm/libhwui.so (deflated 56%)
  adding: system/lib/arm/libicui18n.so (deflated 54%)
  adding: system/lib/arm/libicuuc.so (deflated 55%)
  adding: system/lib/arm/libjnigraphics.so (deflated 65%)
  adding: system/lib/arm/libjni_mosaic.so (deflated 45%)
  adding: system/lib/arm/libjpeg.so (deflated 49%)
  adding: system/lib/arm/liblog.so (deflated 53%)
  adding: system/lib/arm/libm.so (deflated 39%)
  adding: system/lib/arm/libmedia.so (deflated 72%)
  adding: system/lib/arm/libnativehelper.so (deflated 54%)
  adding: system/lib/arm/libnetutils.so (deflated 52%)
  adding: system/lib/arm/libnfc_ndef.so (deflated 53%)
  adding: system/lib/arm/libOpenMAXAL.so (deflated 66%)
  adding: system/lib/arm/libOpenSLES.so (deflated 65%)
  adding: system/lib/arm/libpixelflinger.so (deflated 55%)
  adding: system/lib/arm/libskia.so (deflated 49%)
  adding: system/lib/arm/libsonivox.so (deflated 23%)
  adding: system/lib/arm/libsqlite.so (deflated 43%)
  adding: system/lib/arm/libssl.so (deflated 54%)
  adding: system/lib/arm/libstagefright.so (deflated 53%)
  adding: system/lib/arm/libstagefright_foundation.so (deflated 62%)
  adding: system/lib/arm/libstdc++.so (deflated 66%)
  adding: system/lib/arm/libstlport.so (deflated 61%)
  adding: system/lib/arm/libui.so (deflated 60%)
  adding: system/lib/arm/libusbhost.so (deflated 55%)
  adding: system/lib/arm/libutils.so (deflated 57%)
  adding: system/lib/arm/libvideochat_jni.so (deflated 52%)
  adding: system/lib/arm/libvideochat_stabilize.so (deflated 46%)
  adding: system/lib/arm/libvoicesearch.so (deflated 61%)
  adding: system/lib/arm/libvorbisidec.so (deflated 27%)
  adding: system/lib/arm/libwpa_client.so (deflated 54%)
  adding: system/lib/arm/libWVphoneAPI.so (deflated 59%)
  adding: system/lib/arm/libz.so (deflated 45%)
  adding: system/lib/arm/linker (deflated 52%)
  adding: system/lib/libdvm_houdini.so (deflated 70%)
  adding: system/lib/libhoudini.so (deflated 71%)
chmod: updater: No such file or directory
[flash_archive] Remount /system/ in ro
[flash_archive] Delete tmp directory
[flash_archive] Done successfully !
{Result:OK};

没有更多推荐了,返回首页