zoukankan      html  css  js  c++  java
  • 使用 qemu 模拟器运行 aosp(基于 x86-64 Linux 内核)

    环境准备

    • curlwgetgit命令可用
    • repo命令可用

    android emulator

    下载

    mkdir emu-2.5-release
    cd emu-2.5-release
    repo init -u https://android.googlesource.com/platform/manifest -b emu-2.5-release
    repo sync -j 4 # 4为并行线程数,根据机器自行调整
    

    编译

    cd external/qemu
    ./android/rebuild.sh --no-tests
    

    android kernel

    下载

    git clone https://android.googlesource.com/kernel/goldfish
    cd goldfish
    git checkout android-goldfish-4.4-dev
    

    编译

    make O=build x86_64_ranchu_defconfig
    make O=build bzImage -j 4 # 4为并行线程数,根据机器自行调整
    

    aosp

    下载

    mkdir aosp
    cd aosp
    repo init -u https://android.googlesource.com/platform/manifest -b android-9.0.0_r42
    repo sync -j 4 # 4为并行线程数,根据机器自行调整
    

    编译

    source build/envsetup.sh
    lunch aosp_x86_64-eng
    m -j 4 # 4为并行线程数,根据机器自行调整
    

    启动

    sudo chown $USER /dev/kvm
    /path/to/emu-2.5-release/external/qemu/objs/emulator -cores 8 -show-kernel -no-snapshot -memory 8192 -kernel /path/to/goldfish/build/arch/x86/boot/bzImage
    

    本文来自博客园,作者:Legend_Lone,转载请注明原文链接:https://www.cnblogs.com/sun-ye/p/14992194.html

  • 相关阅读:
    Python lambda函数
    python 获取日期
    <base>元素
    django--开发博客
    django修改时区,数据库
    django初探
    python创建虚拟环境
    资源记录页面
    组管理
    远程管理命令
  • 原文地址:https://www.cnblogs.com/sun-ye/p/14992194.html
Copyright © 2011-2022 走看看