[Kindle Fire HDX 7" & 8.9" General] mbuck2019:
$ ./back2stock UPDATE.BIN

+ '[' -r UPDATE.BIN ']'

+ u=META-INF/com/google/android/updater-script

+ p=recovery/recovery-from-boot.p

+ d=system/etc/recovery-resource.dat

+ a=boot.img

+ t=/data/local/tmp

+ e=/sdcard/rec.img

+ z=UPDATE.BIN.zip

+ x=mv

+ (( 1 < 1 ))

+ x='cp -u'

+ cp -u -v UPDATE.BIN UPDATE.BIN.zip

+ unzip -u -o UPDATE.BIN.zip recovery/recovery-from-boot.p system/etc/recovery-resource.dat boot.img

Archive: UPDATE.BIN.zip

signed by SignApk

+ for i in p d a

+ adb push -p recovery/recovery-from-boot.p /data/local/tmp/p

recovery/recovery-from-boot.p: 1 file ...hed. 6.3 MB/s (435857 bytes in 0.066s)

+ for i in p d a

+ adb push -p system/etc/recovery-resource.dat /data/local/tmp/d

system/etc/recovery-resource.dat: 1 fi...d. 12.6 MB/s (1286910 bytes in 0.098s)

+ for i in p d a

+ adb push -p boot.img /data/local/tmp/a

boot.img: 1 file pushed. 7.4 MB/s (7831552 bytes in 1.012s)

+ unzip -p UPDATE.BIN.zip recovery/etc/install-recovery.sh

+ read -a x

+ case ${x[0]}${x[1]} in

+ read -a x

+ case ${x[0]}${x[1]} in

+ read -a x

+ case ${x[0]}${x[1]} in

+ read -a x

+ case ${x[0]}${x[1]} in

+ x[2]=/data/local/tmp/d

+ x[3]=/data/local/tmp/a

+ x[4]=/sdcard/rec.img

+ x[7]=c9f4d9810aea3b8757c134a4a225b6f4b14d237b:/data/local/tmp/p

+ adb shell touch /sdcard/rec.img

+ adb shell applypatch -b /data/local/tmp/d /data/local/tmp/a /sdcard/rec.img 5fa6a58da1ef09fa62f5cc6bd275543b1852e210 9590784 c9f4d9810aea3b8757c134a4a225b6f4b14d237b:/data/local/tmp/p

patch /data/local/tmp/a: now 5fa6a58d

chmod of "/sdcard/rec.img.patch" failed: Operation not permitted

+ :

+ adb shell mv /sdcard/rec.img.patch /sdcard/rec.img

+ read -a x

+ adb shell rm -f '/data/local/tmp/[pda]'

+ unzip -u -o UPDATE.BIN META-INF/com/google/android/updater-script

Archive: UPDATE.BIN

signed by SignApk

inflating: META-INF/com/google/android/updater-script

+ sed -i '/^getprop/d' META-INF/com/google/android/updater-script

+ zip -u UPDATE.BIN.zip META-INF/com/google/android/updater-script

updating: META-INF/com/google/android/updater-script

zip warning: Local Entry CRC does not match CD: META-INF/com/google/android/updater-script

(deflated 85%)

+ adb push -p UPDATE.BIN.zip /sdcard/

UPDATE.BIN.zip: 1 file pushed. 7.2 MB/s (884405821 bytes in 117.478s)

+ rm -v META-INF/com/google/android/updater-script recovery/recovery-from-boot.p system/etc/recovery-resource.dat boot.img

removed 'META-INF/com/google/android/updater-script'

removed 'recovery/recovery-from-boot.p'

removed 'system/etc/recovery-resource.dat'

removed 'boot.img'

+ for i in u p d

+ rm -drv META-INF

removed directory 'META-INF/com/google/android'

removed directory 'META-INF/com/google'

removed directory 'META-INF/com'

removed directory 'META-INF'

+ for i in u p d

+ rm -drv recovery

removed directory 'recovery'

+ for i in u p d

+ rm -drv system

removed directory 'system/etc'

removed directory 'system'

+ adb reboot recovery

+ sleep 1

+ case $(adb shell twrp get tw_version) in

++ adb shell twrp get tw_version

error: no devices/emulators found

+ sleep 1

+ case $(adb shell twrp get tw_version) in

++ adb shell twrp get tw_version

error: no devices/emulators found

+ sleep 1

+ case $(adb shell twrp get tw_version) in

++ adb shell twrp get tw_version

error: no devices/emulators found

+ sleep 1

+ case $(adb shell twrp get tw_version) in

++ adb shell twrp get tw_version

error: no devices/emulators found

+ sleep 1

+ case $(adb shell twrp get tw_version) in

++ adb shell twrp get tw_version

error: no devices/emulators found

+ sleep 1

+ case $(adb shell twrp get tw_version) in

++ adb shell twrp get tw_version

error: no devices/emulators found

+ sleep 1

+ case $(adb shell twrp get tw_version) in

++ adb shell twrp get tw_version

error: no devices/emulators found

+ sleep 1

+ case $(adb shell twrp get tw_version) in

++ adb shell twrp get tw_version

error: no devices/emulators found

+ sleep 1

+ case $(adb shell twrp get tw_version) in

++ adb shell twrp get tw_version

error: no devices/emulators found

+ sleep 1

+ case $(adb shell twrp get tw_version) in

++ adb shell twrp get tw_version

error: no devices/emulators found

+ sleep 1

+ case $(adb shell twrp get tw_version) in

++ adb shell twrp get tw_version

error: no devices/emulators found

+ sleep 1

+ case $(adb shell twrp get tw_version) in

++ adb shell twrp get tw_version

error: no devices/emulators found

+ sleep 1

+ case $(adb shell twrp get tw_version) in

++ adb shell twrp get tw_version

error: no devices/emulators found

+ sleep 1

+ case $(adb shell twrp get tw_version) in

++ adb shell twrp get tw_version

error: no devices/emulators found

+ sleep 1

+ case $(adb shell twrp get tw_version) in

++ adb shell twrp get tw_version

error: no devices/emulators found

+ sleep 1

+ case $(adb shell twrp get tw_version) in

++ adb shell twrp get tw_version

error: no devices/emulators found

+ sleep 1

+ case $(adb shell twrp get tw_version) in

++ adb shell twrp get tw_version

error: no devices/emulators found

+ sleep 1

+ case $(adb shell twrp get tw_version) in

++ adb shell twrp get tw_version

+ sleep 1

+ case $(adb shell twrp get tw_version) in

++ adb shell twrp get tw_version

error: no devices/emulators found

+ sleep 1

+ case $(adb shell twrp get tw_version) in

++ adb shell twrp get tw_version

+ break

+ adb shell twrp install /sdcard/UPDATE.BIN.zip

Installing zip file '/sdcard/UPDATE.BIN.zip'

Checking for Digest file...

Unmounting System...

script succeeded: result was [/system]Done processing script file

+ p=/dev/block/platform

++ adb shell ls /dev/block/platform

+ d=msm_sdcc.1

+ adb shell dd if=/sdcard/rec.img of=/dev/block/platform/msm_sdcc.1/by-name/recovery bs=64k conv=notrunc

dd: conv option disabled

==> device rebooted in TWRP

==> shutdown/restart