google/android-emulator-m1-preview - GitHub

文章推薦指數: 80 %
投票人數:10人

Contribute to google/android-emulator-m1-preview development by creating an account on GitHub. Skiptocontent {{message}} google / android-emulator-m1-preview Public Notifications Fork 99 Star 1.1k Apache-2.0License 1.1k stars 99 forks Star Notifications Code Issues 62 Pullrequests 0 Actions Projects 0 Wiki Security Insights More Code Issues Pullrequests Actions Projects Wiki Security Insights Thiscommitdoesnotbelongtoanybranchonthisrepository,andmaybelongtoaforkoutsideoftherepository. main Branches Tags Couldnotloadbranches Nothingtoshow {{refName}} default Couldnotloadtags Nothingtoshow {{refName}} default 1 branch 3 tags Code Latestcommit 741g Mergepullrequest#29fromColtonIdle/patch-1 … 2513f13 Mar11,2021 Mergepullrequest#29fromColtonIdle/patch-1 UpdateREADMEform1inAVDmanager 2513f13 Gitstats 16 commits Files Permalink Failedtoloadlatestcommitinformation. Type Name Latestcommitmessage Committime AndroidEmulator.app/Contents Addlicensefiles Dec7,2020 CONTRIBUTING.md Addlicensefiles Dec7,2020 LICENSE Addlicensefiles Dec7,2020 README.markdown UpdateREADMEform1inAVDmanager Mar10,2021 Viewcode Note:Nolongerneeded AndroidEmulatorM1Preview Knownissues Howtouse Howtoconfigure Howtowipedata Howtobuildyourownemulator Buildingtheengine Buildingthesystemimage README.markdown Note:Nolongerneeded SupportfordownloadingtheM1-basedemulatorwasaddedtoSDKManager,soit'snotnecessarytogototheGithubreleasespagetodownloadastandalone.appanymore.InAVDManagergototheOtherImagestabasbydefaultitdoesn'tshowtheARM64images. AndroidEmulatorM1Preview ThisisapreviewofsomebasicAndroidemulationfunctionalityontheM1.Therearestillmanyissues,butappsworkatabasiclevel.Tobeupdatedsoonwithmorefixes.Thereleasetagcorrespondstothiscommit:https://android.googlesource.com/platform/external/qemu/+/aca144a9e9264b11c2d729096af90d695d01455d Knownissues Webviewdoesn'tworkintheAOSPversion,butworksintheGoogleAPIsversionpreviewv3.However,Chromedoesn'twork. Nodeviceskins Videocodecsnotworking 32bitARMappswon'twork GraphicalglitchesinsomeVulkanapps PopuponstartupaboutnotbeingabletofindtheADBpath(ADBwillstillnoticetheemulatorifyouhaveitinstalledthough) Whenbuilding,itmaybefastertostartthencancelthePythontriggeredbuildandthenreissueninja-Cobjsinstall/stripversuslettingthePythontriggeredbuildfinish. Howtouse ThisonlyworksonM1AppleSiliconMacs.M1(orequivalentlycapable)SoCsarerequired;notethatthisdoesnotworkonDTKsastheydonotsupportARM64onARM64hardwarevirtualizationviaHypevisor.framework. GototheGithubreleasespage,downloada.dmg,dragtotheApplicationsfolder,andrun.You'llfirstneedtorightclicktheappiconandselectOpenandthenskippastthedeveloperidentityverificationstep(weareworkingonprovidingofficialidentityinfo).Thefirstfewtimesitstartsupitwilltakeawhiletoshowup,butsubsequentlauncheswillbefaster. Ifyou'veinstalledAndroidStudioandAndroidSDKandadbisavailable,theemulatorshouldbevisiblefromStudioandwork(deploybuiltapps,debugapps,etc). Howtoconfigure Edit/Applications/Android\Emulator.app/Contents/MacOS/aosp-master-arm64-v8a/config.ini.Somenotableoptions: disk.dataPartition.size:sizeofuserdata.Whenreconfiguring,you'llalsoneedtodeletealluserdata*.imgfilesinthatdirectory. fastboot.forceColdBoot,fastboot.forceFastBoot:whethertoenablesnapshots.Currentdefaultissnapshotsdisabled.Setfastboot.forceColdBoot=no,fastboot.forceFastBoot=yestoenablesnapshots. hw.lcd.density:VirtualdisplayDPI. hw.lcd.width,hw.lcd.height:Virtualdisplaydimensions. hw.ramSize:RAMlimitfortheguest.(2GBminimum) Howtowipedata Removealluserdata*.imgfilesin/Applications/Android\Emulator.app/Contents/MacOS/aosp-master-arm64-v8a/. Howtobuildyourownemulator Buildingtheengine Theemulatorsourcecodelives(here),butthereareabunchofotherdependenciestodownload,soweuserepo. Tobuild,firstmakesureyouhaveXcodeandXcodecommandlinetoolsinstalled,andthatyouhaveChromiumdepot_toolsinyourPATH(link).Then: mkdiremu cdemu repoinit-uhttps://android.googlesource.com/platform/external/qemu--depth=1 reposync-qcj4 cdexternal/qemu pythonandroid/build/python/cmake.py--target=darwin_aarch64 Notethatcancelingthepythonbasedbuildafteritgetsgoingandissuingjustninja-Cobjsinstall/stripmaybefaster. Thebuiltartifactsarein/path/to/external/qemu/objs/distribution/emulator.Theyshouldbeautomaticallysigned.However,thebinariesinobjs/arenot;tosignthem,issue./sign-objs-binaries.sh.Notethatthiscanonlybedoneafterninja-Cobjsinstall/stripissuccessful. Buildingthesystemimage ThesystemimageisbuiltfromAOSPmastersdk_phone_arm64withafewmodifications.Ideally,let'sbeonaLinuxhostwhenbuildingthesystemimage---thebuildisrelativelyuntestedonM1systems,andatleast,weneedtocreateaseparatecasesensitivepartitionfortheAOSPrepo.Assumingyou'reonLinux: mkdiraosp-master cdaosp-master repoinit-uhttps://android.googlesource.com/platform/manifest-bmaster--depth=1 reposync-qcj4 Wefirstneedtomakeanedittoremoveall32bitsupport.Patchthischange:linktobuild/make/target/board/emulator_arm64/BoardConfig.mk.Then: sourcebuild/envsetup.sh lunchsdk_phone_arm64-userdebug make-j12 Afterthat'sdone,wecanusethisscripttopackageupthesystemimageforusein/Applications/Android\Emulator.app/Contents/MacOS/aosp-master-arm64-v8a/.Assumingyou'restillintheAndroidbuildenvironment: echo$ANDROID_PRODUCT_OUT exportZIPPED_NAME=$1 mkdir-p$ZIPPED_NAME/files cd$ZIPPED_NAME/files cp$ANDROID_PRODUCT_OUT/system-qemu.imgsystem.img cp$ANDROID_PRODUCT_OUT/vendor.imgvendor.img cp$ANDROID_PRODUCT_OUT/ramdisk.imgramdisk.img cp$ANDROID_PRODUCT_OUT/ramdisk.imgramdisk.img if[-f$ANDROID_PRODUCT_OUT/kernel-ranchu-64];then cp$ANDROID_PRODUCT_OUT/kernel-ranchu-64kernel-ranchu-64 else cp$ANDROID_PRODUCT_OUT/kernel-ranchukernel-ranchu fi; cp-r$ANDROID_PRODUCT_OUT/data. cp-r$ANDROID_PRODUCT_OUT/advancedFeatures.iniadvancedFeatures.ini cp-r$ANDROID_PRODUCT_OUT/userdata.img. cp-r$ANDROID_PRODUCT_OUT/encryptionkey.img. cp-r$ANDROID_PRODUCT_OUT/build.prop. mkdirsystem cp-r$ANDROID_PRODUCT_OUT/build.propsystem/build.prop cp-r$ANDROID_PRODUCT_OUT/VerifiedBootParams.textproto. cp-r$ANDROID_PRODUCT_OUT/source.properties. cd.. zip-1rq$ZIPPED_NAME.zipfiles ls-l$ZIPPED_NAME.zip Then,$ZIPPED_NAME.zipcanbesentovertotheM1andthecontentsofitsfiles/canbecopedoverinto/Applications/Android\Emulator.app/Contents/MacOS/aosp-master-arm64-v8a/. About Nodescription,website,ortopicsprovided. Resources Readme License Apache-2.0License Codeofconduct Codeofconduct Stars 1.1k stars Watchers 53 watching Forks 99 forks Releases 3 tags Packages0 Nopackagespublished Contributors5 Youcan’tperformthatactionatthistime. Yousignedinwithanothertaborwindow.Reloadtorefreshyoursession. Yousignedoutinanothertaborwindow.Reloadtorefreshyoursession.



請為這篇文章評分?