TW_USE_LEDS_HAPTICS := true
#TW_USE_TOOLBOX := true
TW_EXCLUDE_TWRPAPP := true
+USE_RECOVERY_INSTALLER := true
+RECOVERY_INSTALLER_PATH := device/oneplus/fajita/installer
Now you need of this patch to make decryption working: https://gist.github.com/mauronofrio/af29bad34ad87a1a957d193794f0bf5f
+To auotomatic make the twrp installer, you need to import this commit in the build path: https://gerrit.omnirom.org/#/c/android_build/+/33182/
+
To make all works you need to modify the buildinfo.sh in build/tools
echo "ro.build.version.release=$PLATFORM_VERSION"
--- /dev/null
+Signature-Version: 1.0
+SHA1-Digest-Manifest: QCWCUCcRamzGoOTiTXSQ/1AKdMo=
+Created-By: 1.0 (Android SignApk)
+
+Name: ramdisk-twrp.cpio
+SHA1-Digest: GrJjW1FsLNiJC5RX2CIqEmX8eI4=
+
+Name: META-INF/com/android/otacert
+SHA1-Digest: QW7yPFUPbhU0tUYKW4i2EdneCnw=
+
+Name: META-INF/com/google/android/update-binary
+SHA1-Digest: 02Ul88djHsIFRsI5gdyIcSLa0XQ=
+
+Name: magiskboot
+SHA1-Digest: 0fk+6jdh3EAyaBFFHavgeVhRFDc=
+
--- /dev/null
+Manifest-Version: 1.0
+Created-By: 1.0 (Android SignApk)
+
+Name: ramdisk-twrp.cpio
+SHA1-Digest: gtuG6Rf4Ywfx+3hraZUQZQ27Ukw=
+
+Name: META-INF/com/android/otacert
+SHA1-Digest: 71Q6Rn2DDZl1zPDVaaeEHItd+Yg=
+
+Name: META-INF/com/google/android/update-binary
+SHA1-Digest: Om9VSieSZdIxXv08mMFDJuUHrBA=
+
+Name: magiskboot
+SHA1-Digest: BT3tcdY5tZnJ8FVbujrBWEufjVw=
+
--- /dev/null
+-----BEGIN CERTIFICATE-----
+MIIEqDCCA5CgAwIBAgIJAJNurL4H8gHfMA0GCSqGSIb3DQEBBQUAMIGUMQswCQYD
+VQQGEwJVUzETMBEGA1UECBMKQ2FsaWZvcm5pYTEWMBQGA1UEBxMNTW91bnRhaW4g
+VmlldzEQM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5kcm9pZEBhbmRyb2lkLmNvbYIJAJNurL4H8gHfMAwGA1Ud
+EwQFMAMBAf8wDQYJKoZIhvcNAQEFBQADggEBAHqvlozrUMRBBVEY0NqrrwFbinZa
+J6cVosK0TyIUFf/azgMJWr+kLfcHCHJsIGnlw27drgQAvilFLAhLwn62oX6snb4Y
+LCBOsVMR9FXYJLZW2+TcIkCRLXWG/oiVHQGo/rWuWkJgU134NDEFJCJGjDbiLCpe
++ZTWHdcwauTJ9pUbo8EvHRkU3cYfGmLaLfgn9gP+pWA7LFQNvXwBnDa6sppCccEX
+31I828XzgXpJ4O+mDL1/dBd+ek8ZPUP0IgdyZm5MTYPhvVqGCHzzTy3sIeJFymwr
+sBbmg2OAUNLEMO6nwmocSdN2ClirfxqCzJOLSDE4QyS9BAH6EhY6UFcOaE0=
+-----END CERTIFICATE-----
--- /dev/null
+#!/sbin/sh
+# LazyFlasher installer backend (for helper functions only)
+
+tmp=/tmp/twrp-install
+
+if [ "$3" ]; then
+ zip=$3
+ console=/proc/$$/fd/$2
+ # write the location of the console buffer to /tmp/console for other scripts to use
+ echo "$console" > /tmp/console
+else
+ console=$(cat /tmp/console)
+ [ "$console" ] || console=/proc/$$/fd/1
+fi
+
+print() {
+ if [ "$1" ]; then
+ echo "ui_print $1" > "$console"
+ else
+ echo "ui_print " > "$console"
+ fi
+ echo
+}
+
+abort() {
+ [ "$1" ] && {
+ print "Error: $1"
+ print "Aborting..."
+ }
+ cleanup
+ print "Failed to patch boot image!"
+ exit 1
+}
+
+cleanup() {
+ [ "$zip" ] && rm /tmp/console
+}
+
+extract() {
+ rm -rf "$2"
+ mkdir -p "$2"
+ unzip -o "$1" -d "$2" || abort "Failed to extract zip to $2!"
+}
+
+print "#########################################"
+print "# TWRP installer for OnePlus 6T #"
+print "# by mauronofrio #"
+print "#########################################"
+
+# Unpack the installer
+[ "$zip" ] && {
+ print "Unpacking the installer..."
+ extract "$zip" "$tmp"
+}
+cd "$tmp"
+toolname="/magiskboot"
+tool="$tmp$toolname"
+targetfile="/boot.img"
+target="$tmp$targetfile"
+
+chmod 755 "$tool"
+
+print "Running boot image patcher on slot A..."
+dd if=/dev/block/bootdevice/by-name/boot_a "of=$target"
+"$tool" --unpack boot.img
+cp -f ramdisk-recovery.cpio ramdisk.cpio
+"$tool" --repack boot.img
+dd if=new-boot.img of=/dev/block/bootdevice/by-name/boot_a
+rm boot.img
+rm dtb
+rm kernel
+rm new-boot.img
+rm ramdisk.cpio
+print "Running boot image patcher on slot B..."
+dd if=/dev/block/bootdevice/by-name/boot_b "of=$target"
+"$tool" --unpack boot.img
+cp -f ramdisk-recovery.cpio ramdisk.cpio
+"$tool" --repack boot.img
+dd if=new-boot.img of=/dev/block/bootdevice/by-name/boot_b
+
+print "Boot image patching complete"
+
+#cleanup
+print "Done installing TWRP!"