All Projects → aospbuild → Aospbuild

aospbuild / Aospbuild

Labels

Projects that are alternatives of or similar to Aospbuild

Mesos Dns Pkg
Packaging utilities for Mesos-DNS
Stars: ✭ 16 (-27.27%)
Mutual labels:  makefile
Go Book Store Api
Go Sample project to understand Mysql CRUD operation with best practises Includes logging, JWT, Swagger and Transactions
Stars: ✭ 18 (-18.18%)
Mutual labels:  makefile
Nepali Romanized Pro
Nepali Romanized Keyboard Layout with installer for macOS
Stars: ✭ 18 (-18.18%)
Mutual labels:  makefile
Compiletools
Build C++ fast, with practically no configuration
Stars: ✭ 16 (-27.27%)
Mutual labels:  makefile
Device Sony Loire
Stars: ✭ 17 (-22.73%)
Mutual labels:  makefile
New Php Project
Template for new PHP projects. Also see https://github.com/JeroenDeDauw/new-php-library
Stars: ✭ 18 (-18.18%)
Mutual labels:  makefile
Docker Release Toolkit
My personal toolkit for building releases with Docker
Stars: ✭ 16 (-27.27%)
Mutual labels:  makefile
Openwrt Dvb
OpenWrt feed focused on DVB applications
Stars: ✭ 19 (-13.64%)
Mutual labels:  makefile
Gitsem
a command line utility for managing semantically versioned (semver) git tags
Stars: ✭ 17 (-22.73%)
Mutual labels:  makefile
Gitpr
Quick reference guide on fork and pull request workflow
Stars: ✭ 902 (+4000%)
Mutual labels:  makefile
Cxcore
A prebuilt Linux system use UEFI and f2fs for RaspberryPi 3B, RaspberryPi 3B+, RaspberryPi 4B
Stars: ✭ 17 (-22.73%)
Mutual labels:  makefile
Hdfs Spark Hive Dev Setup
This repository contains makescript and instruction on how to setup local hdfs+spark+hive setup.
Stars: ✭ 17 (-22.73%)
Mutual labels:  makefile
Docker Cdn
Script for creating and deploying a CDN (HAProxy, Registrator, Consul and Nginx)
Stars: ✭ 18 (-18.18%)
Mutual labels:  makefile
Ports
Developer FreeBSD Haskell "overlay" for the mighty FreeBSD Ports Collection. Use with caution, slippery when wet, etc.
Stars: ✭ 16 (-27.27%)
Mutual labels:  makefile
Isel Leic Si 1920inv Li52d Leirt51d
Recursos das aulas de Segurança Informática - Semestre de Inverno 2019/20 - Turma LI52D-LEIRT51D
Stars: ✭ 19 (-13.64%)
Mutual labels:  makefile
Pymake
A Makefile generator in Python
Stars: ✭ 16 (-27.27%)
Mutual labels:  makefile
Emojione Color Font
End of Life. Switch to https://github.com/eosrei/twemoji-color-font
Stars: ✭ 899 (+3986.36%)
Mutual labels:  makefile
Seafile Openwrt
A port of Seafile for OpenWrt 14.07
Stars: ✭ 19 (-13.64%)
Mutual labels:  makefile
Network Programming With Go
Network programming with Go
Stars: ✭ 903 (+4004.55%)
Mutual labels:  makefile
Live
Automated module and configuration reloader.
Stars: ✭ 18 (-18.18%)
Mutual labels:  makefile

Steps for building

Follow this guid to establish a build environment: https://source.android.com/setup/build/initializing

Download "repo"

mkdir ~/bin
PATH=~/bin:$PATH
curl https://storage.googleapis.com/git-repo-downloads/repo > ~/bin/repo
chmod 755 ~/bin/repo

Create work folder

mkdir aosp
cd aosp

Find your build number here https://developers.google.com/android/ota , and your branch from here https://source.android.com/setup/start/build-numbers#source-code-tags-and-builds . For the Pixel 1 XL (marlin) latest buid number is OPM4.171019.016.B1 and the corresponding branch number is android-8.1.0_r28

Initialize the repo

repo init -u https://android.googlesource.com/platform/manifest -b android-8.1.0_r28

Download the source

repo sync -j16

Generate your signing keys

For Nexuses and Pixel 1 (XL)

mkdir -p keys/marlin
cd keys/marlin
../../development/tools/make_key releasekey '/C=US/ST=Some-State/L=Some-City/O=Aosp/OU=Aosp/CN=Aosp/[email protected]'
../../development/tools/make_key platform '/C=US/ST=Some-State/L=Some-City/O=Aosp/OU=Aosp/CN=Aosp/[email protected]'
../../development/tools/make_key shared '/C=US/ST=Some-State/L=Some-City/O=Aosp/OU=Aosp/CN=Aosp/[email protected]'
../../development/tools/make_key media '/C=US/ST=Some-State/L=Some-City/O=Aosp/OU=Aosp/CN=Aosp/[email protected]'
../../development/tools/make_key verity '/C=US/ST=Some-State/L=Some-City/O=Aosp/OU=Aosp/CN=Aosp/[email protected]'
cd ../..

make -j20 generate_verity_key
out/host/linux-x86/bin/generate_verity_key -convert keys/marlin/verity.x509.pem keys/marlin/verity_key

For Pixel 2 (XL)

mkdir -p keys/taimen
cd keys/taimen
../../development/tools/make_key releasekey '/C=US/ST=Some-State/L=Some-City/O=Aosp/OU=Aosp/CN=Aosp/[email protected]'
../../development/tools/make_key platform '/C=US/ST=Some-State/L=Some-City/O=Aosp/OU=Aosp/CN=Aosp/[email protected]'
../../development/tools/make_key shared '/C=US/ST=Some-State/L=Some-City/O=Aosp/OU=Aosp/CN=Aosp/[email protected]'
../../development/tools/make_key media '/C=US/ST=Some-State/L=Some-City/O=Aosp/OU=Aosp/CN=Aosp/[email protected]'
openssl genrsa -out avb.pem 2048
../../external/avb/avbtool extract_public_key --key avb.pem --output avb_pkmd.bin
cd ../..

avb_pkmd.bin will be needed for flashing

For Pixel 1 and Piexl 1 XL, verity_key must be included in the kernel, and the kernel rebuilt

Download kernel source

git clone https://android.googlesource.com/kernel/msm

Find the prebuilt kernel version

lz4cat device/google/marlin-kernel/Image.lz4-dtb | grep -a 'Linux version' | cut -d ' ' -f3 | cut -d'-' -f2 | sed 's/^g//g'

At the moment kernel version for 'marlin' is 514a3ff917ea

cd msm
git checkout 514a3ff917ea
openssl x509 -outform der -in ../keys/marlin/verity.x509.pem -out verity_user.der.x509
export ARCH=arm64
export CROSS_COMPILE=aarch64-linux-android-
make marlin_defconfig
make -j20
mv arch/arm64/boot/Image.lz4-dtb ../device/google/marlin-kernel/
unset ARCH
unset CROSS_COMPILE
cd ..

Clone this repo

cd ..
git clone https://github.com/aospbuild/aospbuild
cp -av aospbuild/* aosp/
cd aosp

Prepare FDroid Priviledged Extension

fingerprint=`openssl x509 -noout -fingerprint -sha256 -inform pem -in keys/marlin/platform.x509.pem | cut -d'=' -f2 | sed 's/://g' | tr '[:upper:]' '[:lower:]'`
sed -i "s/SHA256_FINGERPRINT/$fingerprint/g" external/extras/FDroidPriviledged/java/org/fdroid/fdroid/privileged/ClientWhitelist.java

If you skip this step, the priviledged extension will not accept your signed FDroid.

Prepare vendor files

cd ..
git clone https://github.com/anestisb/android-prepare-vendor
cd android-prepare-vendor
mkdir out
./execute-all.sh -d marlin -b OPM4.171019.016.B1 -o out
cp -av out/marlin/opm4.171019.016.b1/vendor* ../aosp/
cd ../aosp

Note: on some setups, there might be some issues with android-prepare-vendor. You might need to make some changes to execute-all.sh lines 325-327 as follows:

  USE_DEBUGFS=false
SYS_TOOLS+=("fusermount")
_UMOUNT="fusermount -u"

Building

source script/aosp.sh
choosecombo release aosp_marlin user
make -j20 brillo_update_payload && make target-files-package -j24 && script/release.sh marlin

When finished, you will find both factory image and OTA update package in out/release-marlin-$BUILD_NUMBER .

Installing

  • unzip marlin-factory-$BUILD_NUMBER.zip
  • cd marlin-opm4.171019.016.b1
  • reboot device in fastboot
  • fastboot flashing unlock (also fastboot flashing unlock_critical for Pixel 2 XL)
  • ./flash-all.sh
  • for Pixel 2 and Pixel 2 XL only: fastboot flash avb_custom_key avb_pkmd.bin (generated earlier)
  • fastboot flashing lock_critical (Pixel 2 XL)
  • fastboot flashing lock

Upgrading

  • Reboot device in recovery mode
  • Select "Apply update from ADB"
  • adb sideload marlin-ota_update-$BUILD_NUMBER.zip
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].