diff --git a/build/tasks/pbrp.mk b/build/tasks/pbrp.mk index 69e09c4..3bfad92 100644 --- a/build/tasks/pbrp.mk +++ b/build/tasks/pbrp.mk @@ -1,4 +1,5 @@ WORK_PATH := $(OUT_DIR)/target/product/$(TARGET_DEVICE)/zip +TARGET_DIR := $(WORK_PATH)/../ BUILD_TOP := $(OUT_DIR)/../ VERSION := $(shell cat $(BUILD_TOP)/bootable/recovery/variables.h | egrep "define\s+PB_MAIN_VERSION" | tr -d '"' | tr -s ' ' | awk '{ print $$3 }') PB_VENDOR := vendor/utils @@ -17,36 +18,35 @@ else endif ZIP_NAME := PBRP-$(TARGET_DEVICE)-$(VERSION)-$(shell date +%Y%m%d-%H%M)-$(PB_BUILD_TYPE).zip -RECOVERYPATH := $(OUT_DIR)/target/product/$(TARGET_DEVICE)/recovery.img -KEYCHECK := $(OUT_DIR)/recovery/root/sbin/keycheck +KEYCHECK := $(TARGET_DIR)/recovery/root/sbin/keycheck AB := false -ifeq ($(AB_OTA_UPDATER), true) - AB := true -endif ifeq ($(BOARD_USES_RECOVERY_AS_BOOT), true) RECOVERY_AS_BOOT := true + RECOVERYPATH := $(OUT_DIR)/target/product/$(TARGET_DEVICE)/ramdisk-recovery.cpio pbrpimage=$(INSTALLED_BOOTIMAGE_TARGET) $(RECOVERY_RESOURCE_ZIP) else + RECOVERYPATH := $(OUT_DIR)/target/product/$(TARGET_DEVICE)/recovery.img + RECOVERY_AS_BOOT := false pbrpimage=$(INSTALLED_RECOVERYIMAGE_TARGET) $(RECOVERY_RESOURCE_ZIP) endif .PHONY: pbrp pbrp: $(pbrpimage) - $(hide) rm -f $(WORK_PATH)/../*.zip - $(hide) if [ -d $(WORK_PATH) ]; then rm -rf $(WORK_PATH); fi - $(hide) mkdir $(WORK_PATH) - $(hide) rsync -avp $(PB_VENDOR)/PBRP $(WORK_PATH)/ + $(hide) rm -f $(TARGET_DIR)/*.zip + $(hide) rm -rf $(WORK_PATH) && mkdir $(WORK_PATH); + $(hide) rsync -avp $(PB_VENDOR)/PBRP $(WORK_PATH)/; $(hide) mkdir -p $(WORK_PATH)/META-INF/com/google/android $(hide) rsync -avp $(PB_VENDOR)/updater/update-* $(WORK_PATH)/META-INF/com/google/android/ + $(hide) sed -i "s:{version}:v$(VERSION):g" $(WORK_PATH)/META-INF/com/google/android/update-binary + echo "dsfsdfsdf" + $(hide) if [ "$(RECOVERY_AS_BOOT)" == "true" ]; then sed -i "s:IS_AB=false:IS_AB=true:" $(WORK_PATH)/META-INF/com/google/android/update-binary; fi + echo "dsfsdfsdf2255" $(hide) rsync -avp $(PB_VENDOR)/updater/awk $(WORK_PATH)/META-INF/ - $(hide) rsync -avp $(PB_VENDOR)/updater/magiskboot $(WORK_PATH)/ + $(hide) rsync -avp $(BUILD_TOP)/external/magisk-prebuilt/prebuilt/magiskboot_arm $(WORK_PATH)/magiskboot; + $(hide) chmod +x $(WORK_PATH)/magiskboot; $(hide) if [ -f $(KEYCHECK) ]; then cp $(KEYCHECK) $(WORK_PATH)/META-INF/; fi - $(hide) if [ "$(AB)" == "true" ]; then sed -i "s|AB_DEVICE=false|AB_DEVICE=true|g" $(WORK_PATH)/META-INF/com/google/android/update-binary; fi - $(hide) if [ "$(RECOVERY_AS_BOOT)" == "true" ]; then sed -i "s|USES_RECOVERY_AS_BOOT=false|USES_RECOVERY_AS_BOOT=true|g" $(WORK_PATH)/META-INF/com/google/android/update-binary; fi - $(hide) mkdir $(WORK_PATH)/TWRP - $(hide) if [ -e $(WORK_PATH)/../boot.img ]; then cp $(WORK_PATH)/../boot.img $(WORK_PATH)/../recovery.img; fi - $(hide) cp $(WORK_PATH)/../recovery.img $(WORK_PATH)/TWRP/ - $(hide) cd $(WORK_PATH) && zip -r $(ZIP_NAME) * + $(hide) cp $(RECOVERYPATH) $(WORK_PATH)/; + $(hide) cd $(WORK_PATH) && zip -r $(ZIP_NAME) *; $(hide) cd $(BUILD_TOP) && mv $(WORK_PATH)/$(ZIP_NAME) $(WORK_PATH)/../ $(hide) cat $(BUILD_TOP)/vendor/utils/.pb.1 printf "Recovery Image: %s\n" "$(RECOVERYPATH)" diff --git a/pb_build.sh b/pb_build.sh deleted file mode 100755 index f28081b..0000000 --- a/pb_build.sh +++ /dev/null @@ -1,142 +0,0 @@ -#!/bin/bash -# Copyright (C) 2018-2020, Mohd Faraz -# PitchBlack Recovery Project -# -# Custom build script -# -# This software is licensed under the terms of the GNU General Public -# License version 2, as published by the Free Software Foundation, and -# may be copied, distributed, and modified under those terms. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# Please maintain this if you use this script or any part of it -# -BUILD_START=$(date +"%s") -blue='\033[0;34m' -cyan='\033[0;36m' -green='\e[0;32m' -yellow='\033[0;33m' -red='\033[0;31m' -nocol='\033[0m' -purple='\e[0;35m' -white='\e[0;37m' -DATE=$(date +%Y%m%d-%H%M) -VERSION=$(cat $(pwd)/bootable/recovery/variables.h | egrep "define\s+PB_MAIN_VERSION" | awk '{print $3}' | tr -d '"') -PB_VENDOR=vendor/utils -PB_WORK=$OUT -PB_WORK_DIR=$OUT/zip -RECOVERY_IMG=$OUT/recovery.img -RECOVERY_RAM=$OUT/ramdisk-recovery.cpio -CURR_W=$(pwd) -cd ${OUT}/../../../../ -RECOVERY_AS_BOOT="false" -RECOVERY_AS_BOOT=$BOARD_USES_RECOVERY_AS_BOOT -AB_OTA="false" -AB_OTA=$AB_OTA_UPDATER -unset BOARD_USES_RECOVERY_AS_BOOT -unset AB_OTA_UPDATER -export PB_DEVICE=$(cut -d'_' -f2-3 <<<$TARGET_PRODUCT) - -function get_build_var() -{ - SOONG_BASH_UI=build/soong/soong_ui.bash - if [ -f $SOONG_BASH_UI ]; then - (build/soong/soong_ui.bash --dumpvar-mode $1) - return - fi - (CALLED_FROM_SETUP=true BUILD_SYSTEM=build/core \ - command make --no-print-directory -f build/core/config.mk dumpvar-$1) -} - -PBRP_BUILD_TYPE=UNOFFICIAL -if [ -z $BETA_BUILD ]; then - PB_BETA=$(get_build_var BETA_BUILD) -else - PB_BETA=${BETA_BUILD} -fi -if [ "$PB_OFFICIAL_CH" == "true" ]; then - PBRP_BUILD_TYPE=OFFICIAL -elif [ "$PB_BETA" == "true" ]; then - PBRP_BUILD_TYPE=BETA -else - PBRP_BUILD_TYPE=UNOFFICIAL -fi - -if [ "$PBRP_BUILD_TYPE" != "UNOFFICIAL" ]; then - python3 $PB_VENDOR/pb_devices.py verify all $PB_DEVICE - - if [[ "$?" != "0" ]]; then - PBRP_BUILD_TYPE=UNOFFICIAL - echo -e "${red}Error Device is not OFFICIAL${nocol}" - exit 1; - fi -fi -cd $CURR_W - -if [ "$PB_GO" != "true" ]; then - ZIP_NAME=PBRP-$PB_DEVICE-$VERSION-$DATE-$PBRP_BUILD_TYPE -else - echo -e "${red}PitchBlack Go Variant has been depreciated and has been removed. Remove PB_GO flag to build normally.{nocol}" - exit 1; -fi - -echo -e "${red}**** Making Zip ****${nocol}" -if [ -d "$PB_WORK_DIR" ]; then - rm -rf "$PB_WORK_DIR" - rm -rf "$PB_WORK"/*.zip -fi - -if [ ! -d "PB_WORK_DIR" ]; then - mkdir "$PB_WORK_DIR" -fi - -echo -e "${blue}**** Copying Tools ****${nocol}" -cp -R "$PB_VENDOR/PBRP" "$PB_WORK_DIR" - -echo -e "${green}**** Copying Updater Scripts ****${nocol}" -mkdir -p "$PB_WORK_DIR/META-INF/com/google/android" -cp -R "$PB_VENDOR/updater/update-script" "$PB_WORK_DIR/META-INF/com/google/android/" -cp -R "$PB_VENDOR/updater/update-binary" "$PB_WORK_DIR/META-INF/com/google/android/update-binary" -cp -R "$PB_VENDOR/updater/awk" "$PB_WORK_DIR/META-INF/" -if [[ -f "$PB_WORK/recovery/root/sbin/keycheck" ]]; then - cp "$PB_WORK/recovery/root/sbin/keycheck" "$PB_WORK_DIR/META-INF/" -fi - -if [[ "$AB_OTA" = "true" ]]; then - sed -i "s|AB_DEVICE=false|AB_DEVICE=true|g" "$PB_WORK_DIR/META-INF/com/google/android/update-binary" -fi -if [[ "$RECOVERY_AS_BOOT" = "true" ]]; then - sed -i "s|USES_RECOVERY_AS_BOOT=false|USES_RECOVERY_AS_BOOT=true|g" "$PB_WORK_DIR/META-INF/com/google/android/update-binary" -fi - -echo -e "${cyan}**** Copying Recovery Image ****${nocol}" -mkdir -p "$PB_WORK_DIR/TWRP" - -cp "$PB_VENDOR/updater/magiskboot" "$PB_WORK_DIR" -cp "$RECOVERY_IMG" "$PB_WORK_DIR/TWRP/" - -echo -e "${green}**** Compressing Files into ZIP ****${nocol}" -cd $PB_WORK_DIR -zip -r ${ZIP_NAME}.zip * -BUILD_RESULT_STRING="BUILD SUCCESSFUL" -BLINKBLUE="\033[0;5;34m"; -echo -e ${BLINKBLUE}; -cat ${OUT}/../../../../vendor/utils/.pb.1; -echo -e "${nocol}"; -echo -BUILD_END=$(date +"%s") -#DIFF=$(($BUILD_END - $BUILD_START + ( ($HOURS * 60) + ($MINS * 60) + $SECS))) -if [[ "${BUILD_RESULT_STRING}" = "BUILD SUCCESSFUL" ]]; then -mv ${PB_WORK_DIR}/${ZIP_NAME}.zip ${PB_WORK_DIR}/../${ZIP_NAME}.zip -echo -e "$cyan****************************************************************************************$nocol" -echo -e "$cyan*$nocol${green} ${BUILD_RESULT_STRING}$nocol" -echo -e "$cyan*$nocol${green} RECOVERY LOCATION: ${OUT}/recovery.img$nocol" -echo -e "$purple*$nocol${green} RECOVERY SIZE: $(ls -lh ${OUT}/recovery.img | awk '{print $5}')$nocol" -echo -e "$cyan*$nocol${green} ZIP LOCATION: ${PB_WORK}/${ZIP_NAME}.zip$nocol" -echo -e "$purple*$nocol${green} ZIP SIZE: $( du -h ${PB_WORK}/${ZIP_NAME}.zip | awk '{print $1}' )$nocol" -echo -e "$cyan****************************************************************************************$nocol" -fi diff --git a/updater/magiskboot b/updater/magiskboot deleted file mode 100644 index 4e43098..0000000 Binary files a/updater/magiskboot and /dev/null differ diff --git a/updater/update-binary b/updater/update-binary index 05930b5..7281495 100644 --- a/updater/update-binary +++ b/updater/update-binary @@ -1,5 +1,6 @@ #!/sbin/sh # Copyright (C) 2018-2020 PitchBlack Recovery +# Copyright (C) 2020 osm0sis, Dees_Troy and topjohnwu # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -14,18 +15,8 @@ # limitations under the License. -AB_DEVICE=false; -USES_RECOVERY_AS_BOOT=false; OUTFD=/proc/self/fd/$2; -ZIP="$3"; -DIR=`dirname "$ZIP"`; - -ui_print() { - until [ ! "$1" ]; do - echo -e "ui_print $1\nui_print" > $OUTFD ; - shift; - done; -} +ZIPFILE="$3"; show_progress() { echo "progress $1 $2" > /proc/self/fd/$2; } set_perm_recursive() { @@ -38,20 +29,29 @@ set_perm_recursive() { } file_getprop() { grep "^$2" "$1" | cut -d= -f2; } getprop() { test -e /sbin/getprop && /sbin/getprop $1 || file_getprop /default.prop $1; } -abort() { ui_print "$*"; exit 1; } -if [ -f "/tmp/pb" ]; then -rm -rf "/tmp/pb" -fi +ui_print() { + if $BOOTMODE; then + echo "$1"; + else + echo -e "ui_print $1\nui_print" >> $OUTFD; + fi; +} +abort() { ui_print " "; ui_print "$1"; exit 1; } + +# detect Magisk app/booted flashing +BOOTMODE=false; +ps | grep zygote | grep -v grep >/dev/null && BOOTMODE=true; +$BOOTMODE || ps -A 2>/dev/null | grep zygote | grep -v grep >/dev/null && BOOTMODE=true; + +# Const +IS_AB=false -mkdir -p /tmp/pb; -cd /tmp/pb; -unzip -o "$ZIP"; show_progress 0.1000000, 0; ui_print "|---------------------------------------------|"; ui_print "|---------------------------------------------|"; ui_print "|---------PitchBlack Recovery Project---------|"; -ui_print "|-------------------v4.0----------------------|"; +ui_print "|-------------------{version}----------------------|"; ui_print "|---------------------------------------------|"; ui_print "|---------------------------------------------|"; ui_print "|--------------Brought To You By--------------|"; @@ -61,173 +61,63 @@ ui_print "|---------------------------------------------|"; ui_print "|---------------------------------------------|"; ui_print "| Based on TWRP v3.7.0_x |"; ui_print "|---------------------------------------------|"; -PB=/tmp/pb/PBRP -IMG=/tmp/pb/TWRP/recovery.img -SUPER=$(find /dev/block/bootdevice/by-name/ | grep -q 'super') -E=/etc/install-recovery.sh -ETC=/s$E -_ETC=/s/system$E -PB1_PATH=/sdcard/PBTWRP -PB2_PATH=/sdcard/PBRP/tools -PB3_PATH=/sdcard/PBRP/themes -UI=/sdcard/PBRP/theme/ui.zip -RES=/sdcard/PBRP/.twrps -OLD=/sdcard/TWRP/PBRP -red='\033[0;31m' -SYSTEM= -mount_sys= -RECOVERY=/dev/recovery -tool="/tmp/pb/magiskboot" -keycheck="$PB/../META-INF/keycheck" -chmod 0755 $tool -if [[ ! -f "/sbin/awk" ]]; then -cp META-INF/awk /sbin/awk -chmod 0755 /sbin/awk -fi - -#AB Checking -if [ "$AB_DEVICE" = "false" ] && [ "$SUPER" != "0" ]; then -# Find Recovery Partition - for PARTITION in system android_recovery ANDROID_RECOVERY RECOVERY recovery FOTAKernel ; do - if [ "$PARTITION" = "system" ] && [ "$SUPER" != "0" ]; then - SYSTEM=$(readlink /dev/block/by-name/$PARTITION || readlink /dev/block/platform/*/by-name/$PARTITION || \ - readlink /dev/block/platform/*/*/by-name/$PARTITION || readlink /dev/$PARTITION); - else - REC=$(readlink /dev/block/by-name/$PARTITION || readlink /dev/block/platform/*/by-name/$PARTITION || \ - readlink /dev/block/platform/*/*/by-name/$PARTITION || readlink /dev/$PARTITION); - fi - - if [[ ! -z $REC ]]; then - RECOVERY=$REC - break; - fi - done; -fi - -if [ "$SUPER" != "0" ]; then - if [ ! -z $SYSTEM ]; then - mkdir /s - mount -t ext4 $SYSTEM /s - else - /sbin/mount /system && mount_sys="system" - /sbin/mount /system_root && mount_sys="root" - fi -fi - -if [[ "$RECOVERY" = "/dev/recovery" && "$AB_DEVICE" = "false" ]]; then - DD=true; -else - DD=false; -fi - -if [ "$SUPER" != "0" ]; then - # Deletion - [ -f "$ETC" ] && rm "$ETC" - [ -f "${_ETC}" ] && rm "${_ETC}" - [ -f "$PB1_PATH" ] && rm -rf "$PB1_PATH" - [ -f "$PB2_PATH" ] && rm -rf "$PB2_PATH" - [ -f "$PB3_PATH" ] && rm -rf "$PB3_PATH" - [ -f "$UI" ] && rm "$UI" - [ -f "$RES" ] && rm -rf "$RES" - [ -f "$OLD" ] && rm -rf "$OLD" - [ "$mount_sys" = "system" ] && rm -rf /system$E - [ "$mount_sys" = "root" ] && rm -rf /system_root/system$E -fi - -AB_D() { - BOOT="/tmp/unpack-boot" - REC="/tmp/unpack-rec" - ui_print "Doing Work on slot $1" - if [ "$SUPER" != "0" ]; then - # Dump & unpack & Cp - mkdir "$BOOT" "$REC" - dd if=/dev/block/bootdevice/by-name/"$1" of=/tmp/unpack-boot/boot.img - cd "$BOOT" || exit - "$tool" unpack -h boot.img - # kernel string want_initramfs -> skip_initramfs (Magisk) - "$tool" hexpatch kernel 77616E745F696E697472616D6673 736B69705F696E697472616D6673; - # kernel string trip_initramfs -> skip_initramfs (SuperSU) - "$tool" hexpatch kernel 747269705F696E697472616D6673 736B69705F696E697472616D6673; - if "$tool" cpio ramdisk.cpio test; then - echo "$1=0" >> /tmp/pb/installed - else - echo "$1=1" >> /tmp/pb/installed - fi - # boot.img header cmdline remove skip_override (flar2 patch) - sed -i "s|$(grep '^cmdline=' header | cut -d= -f2-)|$(grep '^cmdline=' header | cut -d= -f2- | sed -e 's/skip_override//' -e 's/ */ /g' -e 's/[ \t]*$//')|" header; - rm -rf ramdisk.cpio - cd "$REC" || exit - "$tool" unpack "$IMG" - cp ramdisk.cpio "$BOOT"/ramdisk.cpio - cd "$BOOT" || exit - rm -rf "$REC" - "$tool" repack boot.img - if dd if=new-boot.img of=/dev/block/bootdevice/by-name/"$1"; then - echo "installed=1" >> /tmp/pb/installed - else - abort "Failed to flash $1 Image, Please Restore the Boot.img" - fi - cd /tmp/pb || exit - rm -rf "$BOOT" - else - if dd if=$IMG of=/dev/block/bootdevice/by-name/"$1"; then - echo "installed_$(echo $1 | cut -d'_' -f2)=1" >> /tmp/pb/installed - else - abort "Failed to flash $1 Image, Please Restore the Boot.img" - fi - fi -} - -AB_REC(){ - dd if=$IMG of=/dev/block/bootdevice/by-name/"$1" - echo "installed_$(echo $1 | cut -d'_' -f2)=1" >> /tmp/pb/installed -} -#Flashing -if [[ "$DD" = "true" ]]; then - dd if=$IMG of="$RECOVERY" - if [[ "$?" = "0" ]]; then - echo "installed=1" >> /tmp/pb/installed - fi +# /dev/tmp is safe for both booted and recovery installs +tmp=/dev/tmp/twrp-install; +# target partition without the slot suffix +if [ -e /dev/block/bootdevice/by-name/recovery_b ] || [ "$IS_AB" == "false" ]; then + target=/dev/block/bootdevice/by-name/recovery; else - if [[ "$AB_DEVICE" = "false" ]]; then - flash_image $RECOVERY $IMG - if [[ "$?" = "0" ]]; then - echo "installed=1" >> /tmp/pb/installed - fi - elif [ "$AB_DEVICE" = "true" ] && [ "$USES_RECOVERY_AS_BOOT" = "false" ]; then - AB_REC recovery_a - AB_REC recovery_b - else - AB_D boot_a; - AB_D boot_b; - fi -fi - -if [[ "$?" != "0" ]]; then - abort "Failed to write recovery image!" 43; -fi - -#Copy Specific Files -if [ -f "/sdcard/PBRP" ]; then -cp -r $PB/tools /sdcard/PBRP/ + target=/dev/block/bootdevice/by-name/boot; +fi; +name=$(basename $target); + +ui_print "Unpacking the installer..."; +rm -rf $tmp; +mkdir -p $tmp; +unzip -o "$ZIPFILE" -d $tmp || abort "Failed to extract zip!"; + +cd $tmp; +recoverycpio=`(ls ramdisk-twrp.cpio || ls ramdisk-recovery.cpio) 2>/dev/null`; +recoveryimg=`(ls recovery.img) 2>/dev/null`; +[ "$recoverycpio" ] || [ "$recoveryimg" ] || abort "No TWRP ramdisk/image found in zip!"; + +tool=$tmp/magiskboot; +chmod 755 $tool; + +ui_print " "; +ui_print " Target: $target"; +if [ "$IS_AB" == "false" ]; then + cp -f $recoveryimg new-boot.img; + blockdev --setrw $target; + cat new-boot.img /dev/zero > $target 2>/dev/null || true; + rm -f new-boot.img; else -mkdir -p /sdcard/PBRP -cp -r $PB/tools /sdcard/PBRP/ -fi - -#Copy Backup from TWRP -if [ -f "/sdcard/TWRP/BACKUPS" ]; then -ui_print "Previous TWRP Backup found"; -if [ -f "/sdcard/PBRP/BACKUPS" ]; then -cp -r /sdcard/TWRP/BACKUPS/* /sdcard/PBRP/BACKUPS/ -else -cp -r /sdcard/TWRP/BACKUPS /sdcard/PBRP/ -fi -fi - -if [[ -f "/sdcard/TWRP" ]]; then - rm -rf /sdcard/TWRP + for slot in _a _b; do + ui_print "Doing Work on slot $slot"; + if [ "$recoverycpio" ]; then + dd bs=1048576 if=$target$slot of=boot.img || abort "Failed to dump image!"; + $tool unpack -h boot.img || abort "Failed to unpack image!"; + + # kernel string want_initramfs -> skip_initramfs (Magisk) + $tool hexpatch kernel 77616E745F696E697472616D6673 736B69705F696E697472616D6673; + # kernel string trip_initramfs -> skip_initramfs (SuperSU) + $tool hexpatch kernel 747269705F696E697472616D6673 736B69705F696E697472616D6673; + + # boot.img header cmdline remove skip_override (flar2 patch) + sed -i "s|$(grep '^cmdline=' header | cut -d= -f2-)|$(grep '^cmdline=' header | cut -d= -f2- | sed -e 's/skip_override//' -e 's/ */ /g' -e 's/[ \t]*$//')|" header; + + cp -f $recoverycpio ramdisk.cpio; + $tool repack boot.img || abort "Failed to repack image!"; + $tool cleanup; + else + cp -f $recoveryimg new-boot.img; + fi; + + blockdev --setrw $target$slot; + cat new-boot.img /dev/zero > $target$slot 2>/dev/null || true; + rm -f new-boot.img; + done; fi ui_print "|---------------------------------------------|"; @@ -242,24 +132,19 @@ ui_print "|---------------------------------------------|"; sleep 0.2s show_progress 0.1000000, 90 ; ui_print "|------------Installation finished!-----------|"; -if [ "$SUPER" != "0" ]; then - if [ -z "$SYSTEM" ]; then - [ "$mount_sys" = "system" ] && /sbin/umount /system - [ "$mount_sys" = "root" ] && /sbin/umount /system_root - else - umount /s - rm -rf /s - fi -fi +cd /; +rm -rf /dev/tmp; + +ui_print "|---------------------------------------------|"; +ui_print "|---------------------------------------------|"; +ui_print "|---------------------------------------------|"; +ui_print "|---------------------------------------------|"; +ui_print "| Thank You |"; if [[ ! -f "/sbin/keycheck" ]]; then - ui_print "* New PBRP Flashed, press Volume Down to Reboot to Recovery." - ui-print "*" - ui_print "* Volume up to Finish." - chmod +x $keycheck - $keycheck - if [[ "$?" == "41" ]]; then - sleep 3s - reboot recovery - fi + ui_print "| Reboot to PitchBlack Recovery Manually |"; fi +ui_print "|---------------------------------------------|"; +sleep 0.2s +show_progress 0.1000000, 90 ; +ui_print "|------------Installation finished!-----------|";