美文网首页
编译LineageOS

编译LineageOS

作者: 发条蛙 | 来源:发表于2017-10-20 16:43 被阅读0次
    1. 源码下载:
      mkdir /opt/LineageOS
      cd /opt/LineageOS
      repo init -u https://mirrors.tuna.tsinghua.edu.cn/git/lineageOS/LineageOS/android.git -b cm-14.1
      repo sync
      
    2. 下载vendor信息:
      cd /opt/LineageOS/vendor/samsung
      git clone https://github.com/MoKee/android_vendor_samsung_exynos5420-common.git exynos5420-common
      
    3. 下载预编译镜像:
      cd /tmp
      wget https://mirrorbits.lineageos.org/full/klimtwifi/20170628/lineage-14.1-20170628-nightly-klimtwifi-signed.zip
      
    4. 解压预编译镜像:
      mkdir -p /tmp/android
      cd /tmp/android
      unzip /tmp/lineage-14.1-20170628-nightly-klimtwifi-signed.zip system.transfer.list system.new.dat
      
    5. 下载镜像处理工具:
      cd /tmp/android
      git clone https://github.com/xpirt/sdat2img
      
    6. 提取系统镜像:
      python sdat2img/sdat2img.py system.transfer.list system.new.dat system.img
      
    7. 挂载镜像:
      cd /tmp/android
      mkdir system/
      mount system.img system/
      
    8. 提取镜像文件:
      cd /opt/LineageOS
      cd device/samsung/klimtwifi/
      ./extract-files.sh /tmp/android
      
    9. 卸载并删除镜像:
      umount /tmp/android/system
      rm -rf /tmp/android/system
      
    10. 设置环境变量:
      cd /opt/LineageOS
      source build/envsetup.sh
      breakfast klimtwifi
      
    11. 打开缓存加速:
      export USE_CCACHE=1
      prebuilts/misc/linux-x86/ccache/ccache -M 50G
      export CCACHE_COMPRESS=1
      
    12. 配置jack:
      export ANDROID_JACK_VM_ARGS="-Dfile.encoding=UTF-8 -XX:+TieredCompilation -Xmx4G"
      
    13. 编译系统:
      croot
      brunch klimtwifi
      
    14. 查看镜像:
      ls $OUT
      

    相关文章

      网友评论

          本文标题:编译LineageOS

          本文链接:https://www.haomeiwen.com/subject/jpyvuxtx.html