jimmy947788 / build-lineageOS-for-raspberry-pi

使用 lineageOS 原始碼編譯出可以跑再Raspberry Pi上的Android系統,目前支援RPi3跑lineage-15.1還有RPi4跑lineage-16.0

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Compile Android system with LineageOS

Cyanogen is a company that customizes Android ROM, its product CyanogenMod( Often referred to as "CM") is an open code system based on the Android mobile device platform. In December 2016, Cyanogen suddenly announced that it would stop development and close the project infrastructure. LineageOS was officially launched on December 24, 2016 to re-enact CyanogenMod, and its source code is stored in GitHub

Development Environment (Host)

  1. The operating system uses Ubuntu 18.04
  2. Install the development kit
    $ sudo apt-get update
    $ sudo apt-get install bc bison build-essential ccache curl flex g++-multilib gcc-multilib git gnupg gperf lib32ncurses5-dev lib32readline-dev lib32z1-dev libesd0-dev liblz4-tool libncurses5-dev libsdl1.2-dev libssl-dev libwxgtk3.0-dev libxml2 libxml2-utils lzop pngcrush rsync schedtool squashfs-tools xsltproc zip zlib1g-dev python-mako imagemagick openjdk-8-jdk gcc-arm-linux-gnueabihf
  3. OpenJDK version 1.8.0_232
    # installation
    $ sudo apt-get update 
    $ sudo apt-get install openjdk-8-jdk
    # If your computer has installed many versions of JDK, specify which version of JDK to use here
    $ sudo update-alternatives --config java
  4. It is recommended to use SSD hard disk (download and compile will wait until death) -Lineage 15.1 code machine plus compile output file about 70G -Lineage 16.0 code machine plus compile output file about 140G

Operating environment(Target)

  • Model: Raspberry Pi 3 Model B+
    • SoC: Broadcom BCM2837
    • CPU: ARM Cortex-A53 (64Bit)
    • RAM: 1GB
    • OS: lineage 15.1 (Android 8.1.0) \
    Raspberry Pi 3 Block Diagram
  • Model: Raspberry Pi 4 Model B
    • SoC: Broadcom BCM2711
    • CPU: ARM Cortex-A72 (64Bit)
    • RAM: 4GB
    • OS: lineage 16.1 (Android 9)

Operating Instructions

  • How to download LineageOS code

    • branch: lineage-15.1, Device name: rpi3
    • branch: lineage-16.0, Device name: rpi4
    #Automated download script
    $ wget https://raw.githubusercontent.com/02047788a/build-lineageOS-rpi3/master/scripts/sync-lineageos-code.sh -O sync-lineageos-code.sh
    # Execute script input prompt
    # Please entry lineageOS checkout folder : (Download catalog)
    # Please entry checkout lineageOS branch : (Designated branch)
    # Please entry build device name(ex:,rpi3,rpi4) : (Compile module)

    All input variables exist~/.profile inside ($LINEAGE_SRC, $LINEAGE_BRANCH, $DEVICE_NAME)

  • How to compile LineageOS code

    # Download the script to the code directory
    $ wget https://raw.githubusercontent.com/02047788a/build-lineageOS-rpi3/master/scripts/build-lineageos-code.sh -O build-lineageos-code.sh
    $ sudo ./build-lineageos-code.sh #Compile all images kernel ramdisk systemimage vendorimage

    Installable after compilation image path: $LINEAGE_SRC/out/target/product/rpi4/lineage-16.0-20200201-rpi4.img*

  • Burn image to SD card

    $ sudo dd if=lineage-16.0-20200201-rpi4.img of=/dev/sdX status=progress bs=4M

    /dev/sdX Is the path of your SD card,Pay attention to change!!!

AndroidCustomized modification

Related projects

Reference

我想找類似的工作不知道有沒有台北的工作機會???

我也懂挖礦上一份工作是用linux整合客製化一套挖礦系統OS,我也親自破解claymopre & phinexminer的

About

使用 lineageOS 原始碼編譯出可以跑再Raspberry Pi上的Android系統,目前支援RPi3跑lineage-15.1還有RPi4跑lineage-16.0


Languages

Language:Shell 100.0%