Android模拟器部分参数说明
模拟器版本Android emulator version 26.1.3.0 (build_id 4240222)
本文所述都是基于android8.1系统源码编译后的模拟器程序,不是android studio中的模拟器
部分参数说明:
-screen 触屏模式,可以为如下参数:touch, multi-touch, or no-touch
-accel 加速模式,可以为如下参数:on, off, auto
-writable-system 执行adb remount后system和vender分区可写
-skin 皮肤名称,如果是安卓系统源码,皮肤在development/tools/emulator/skins目录下
-wipe-data 清除用户数据
-shell 看着是可以显示系统的log了,其他区别不清楚
-cores 模拟器的cpu核心数
-gpu 设置硬件OpenGLES模拟模式,可选参数:on, off, auto
-memory 设置模拟器的物理内存大小,单位MB,有的时候设置比较大的值会导致模拟器无法启动
-show-kernel 显示内核消息
-no-boot-anim 禁止开机动画,加速模拟器启动速度,有的时候加上模拟器启动不了
-tcpdump <file> 将网络包抓到某个文件
-bootchart 允许-bootcharting,具体可以百度搜索一下bootchart
-selinux <disabled|permissive> 是否开启selinux
-dpi-device 设置设备的dpi
参数帮助列表:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 |
Android Emulator usage: emulator [options] [-qemu args] options: -list-avds list available AVDs -sysdir <dir> search for system disk images in <dir> -system <file> read initial system image from <file> -vendor <file> read initial vendor image from <file> -writable-system make system & vendor image writable after 'adb remount' -datadir <dir> write user data into <dir> -kernel <file> use specific emulated kernel -ramdisk <file> ramdisk image (default <system>/ramdisk.img -image <file> obsolete, use -system <file> instead -initdata <file> same as '-init-data <file>' -data <file> data image (default <datadir>/userdata-qemu.img -encryption-key <file> read initial encryption key image from <file> -logcat-output <file> output file of logcat(default none) -partition-size <size> system/data partition size in MBs -cache <file> cache partition image (default is temporary file) -cache-size <size> cache partition size in MBs -no-cache disable the cache partition -nocache same as -no-cache -sdcard <file> SD card image (default <datadir>/sdcard.img -snapstorage <file> file that contains all state snapshots (default <datadir>/snapshots.img) -no-snapstorage do not mount a snapshot storage file (this disables all snapshot functionality) -snapshot <name> name of snapshot within storage file for auto-start and auto-save (default 'default-boot') -no-snapshot perform a full boot and do not auto-save, but qemu vmload and vmsave operate on snapstorage -no-snapshot-save do not auto-save to snapshot on exit: abandon changed state -no-snapshot-load do not auto-start from snapshot: perform a full boot -snapshot-list show a list of available snapshots -no-snapshot-update-time do not do try to correct snapshot time on restore -wipe-data reset the user data image (copy it from initdata) -avd <name> use a specific android virtual device -skindir <dir> search skins in <dir> (default <system>/skins) -skin <name> select a given skin -no-skin deprecated: create an AVD with no skin instead -noskin same as -no-skin -memory <size> physical RAM size in MBs -cores <number> Set number of CPU cores to emulator -accel <mode> Configure emulation acceleration -no-accel Same as '-accel off' -ranchu Use new emulator backend instead of the classic one -engine <engine> Select engine. auto|classic|qemu2 -netspeed <speed> maximum network download/upload speeds -netdelay <delay> network latency emulation -netfast disable network shaping -code-profile <name> enable code profiling -show-kernel display kernel messages -shell enable root shell on current terminal -no-jni disable JNI checks in the Dalvik runtime -nojni same as -no-jni -logcat <tags> enable logcat output with given tags -use-system-libs Use system libstdc++ instead of bundled one -no-audio disable audio support -noaudio same as -no-audio -audio <backend> use specific audio backend -radio <device> redirect radio modem interface to character device -port <port> TCP port that will be used for the console -ports <consoleport>,<adbport> TCP ports used for the console and adb bridge -onion <image> use overlay PNG image over screen -onion-alpha <%age> specify onion-skin translucency -onion-rotation 0|1|2|3 specify onion-skin rotation -dpi-device <dpi> specify device's resolution in dpi (default 165) -scale <scale> scale emulator window (deprecated) -http-proxy <proxy> make TCP connections through a HTTP/HTTPS proxy -timezone <timezone> use this timezone instead of the host's default -dns-server <servers> use this DNS server(s) in the emulated system -cpu-delay <cpudelay> throttle CPU emulation -no-boot-anim disable animation for faster boot -no-window disable graphical window display -version display emulator version number -report-console <socket> report console port to remote socket -gps <device> redirect NMEA GPS to character device -shell-serial <device> specific character device for root shell -tcpdump <file> capture network packets to file -bootchart <timeout> enable bootcharting -charmap <file> use specific key character map -studio-params <file> used by Android Studio to provide parameters -prop <name>=<value> set system property on boot -shared-net-id <number> join the shared network, using IP address 10.1.2.<number> -nand-limits <nlimits> enforce NAND/Flash read/write thresholds -gpu <mode> set hardware OpenGLES emulation mode -camera-back <mode> set emulation mode for a camera facing back -camera-front <mode> set emulation mode for a camera facing front -webcam-list lists web cameras available for emulation -screen <mode> set emulated screen mode -selinux <disabled|permissive> Set SELinux to either disabled or permissive mode -unix-pipe <path> Add <path> to the list of allowed Unix pipes -fixed-scale Use fixed 1:1 scale for the initial emulator window. -wait-for-debugger Pause on launch and wait for a debugger process to attach before resuming -skip-adb-auth Skip adb authentication dialogue -metrics-to-console Enable usage metrics and print the messages to stdout -metrics-to-file <file> Enable usage metrics and write the messages into specified file -feature <name|-name> Force-enable or disable (-name) the features -qemu args... pass arguments to qemu -qemu -h display qemu help -verbose same as '-debug-init' -debug <tags> enable/disable debug messages -debug-<tag> enable specific debug messages -debug-no-<tag> disable specific debug messages -help print this help -help-<option> print option-specific help -help-disk-images about disk images -help-debug-tags debug tags for -debug <tags> -help-char-devices character <device> specification -help-environment environment variables -help-virtual-device virtual device management -help-sdk-images about disk images when using the SDK -help-build-images about disk images when building Android -help-all prints all help content |
其他的配置文件
在生成的镜像目录中还有一个config.ini,也可以进行一些配置,具体参考自己机器上的文件进行配置
在我的机器上是out/target/product/generic_x86_64/config.ini这个文件
Sorry, the comment form is closed at this time.