Skip to content

Instantly share code, notes, and snippets.

@sooorajjj

sooorajjj/build_twrp.sh

Last active Mar 3, 2020
Embed
What would you like to do?
Fairphone 3 build and flash TWRP
mkdir twrp
cd twrp
repo init --depth=1 -u git://github.com/minimal-manifest-twrp/platform_manifest_twrp_omni.git -b twrp-9.0
mkdir .repo/local_manifests/
tee .repo/local_manifests/FP3.xml << EOF
<?xml version="1.0" encoding="UTF-8"?>
<manifest>
<project name="chaosmaster/android_device_fairphone_fp3" path="device/fairphone/FP3" remote="github" revision="android-9.0" />
<project name="chaosmaster/android_kernel_fairphone_sdm632" path="kernel/fairphone/sdm632" remote="github" revision="twrp-9.0" />
</manifest>
EOF
repo sync
# fix all python2 scripts
mkdir ./bin
ln -s `which python2` ./bin/python
ln -s `which python2-config` ./bin/python-config
export PATH=./bin:$PATH
bash # envsetup.sh only supports bash
. build/envsetup.sh
export ALLOW_MISSING_DEPENDENCIES=true
export DTC_EXT=$PWD/prebuilts/misc/linux-x86/dtc/dtc
# will tell device not found, but still succeeds
lunch omni_fp3-eng
mka recoveryimage
fastboot boot out/target/product/FP3/recovery.img
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment