diff --git a/The-Unroot-Guide.md b/The-Unroot-Guide.md index e6bbb5d..4027a5c 100644 --- a/The-Unroot-Guide.md +++ b/The-Unroot-Guide.md @@ -22,3 +22,69 @@ Download [from here](https://github.com/HappyZ/dpt-tools/wiki/PKGs-I-Made#offici # Step 4: Reset In the end, it is recommended to reset the device via `initialize DPT` in system settings. + +# Step 5: Undo Diagnosis Mode + +It is not recommended to undo the change. + +But if you really need to, you need to go into diagnosis mode and do the following (I am not responsible if you brick your device by doing the following but making mistakes): + +### Edit `/usr/local/bin/start_eufwupdater.sh` +Uncomment the following part +``` +# dd if=$1 bs=$(($DATA_OFFSET)) skip=1 2>/dev/null | head -c $(($BODY_SIZE)) | openssl dgst -sha256 -verify $3 -signature $SIG_FILE 1>/dev/null +#if [ $? -ne 0 ] +#then +# echo "Verify failed." +# exit 0 +#fi +``` + +### Edit `/usr/local/bin/updater_check.sh` +Comment out the following part +``` +KEY_DETECTION_TMPF=/tmp/keyDetect.log + +######################### +# Button check +######################### + +# animation hint +epd_fb_test gray DU PART 0 && \ +epd_fb_test gray GC16 PART 10 0 50 50 150 50 && \ +sleep 1 && \ +epd_fb_test gray GC16 PART 10 0 50 150 150 50 && \ +sleep 1 && \ +epd_fb_test gray GC16 PART 10 0 50 250 150 50 && \ +sleep 1 & + +# if HOME pressed, go into diagnosis mode directly +busybox script -c "timeout -t 3 keyscan" -f -q ${KEY_DETECTION_TMPF} +grep -Fq "HOME" ${KEY_DETECTION_TMPF} +if [ $? -eq 0 ] +then + rm ${KEY_DETECTION_TMPF} + epd_fb_test gray GC16 PART 10 0 50 50 150 250 + initctl start diag + exit 0 +fi + +# if POWER pressed, cancel and remove update +grep -Fq "POWER" ${KEY_DETECTION_TMPF} +if [ $? -eq 0 ] +then + rm ${KEY_DETECTION_TMPF} + mkdir ${DDAT_MOUNT_PATH} + mount /dev/mmcblk0p16 ${DDAT_MOUNT_PATH} + change_boot_mode.sh normal + rm -rf ${END_USER_UPDATER_PKG} + local_reboot 1 + umount ${DDAT_MOUNT_PATH} +fi + +rm ${KEY_DETECTION_TMPF} +``` + +### Change back the root password + +Edit `/etc/passwd` and change the line for root `$6$i2VmFAOV$sEMLa5no1z...` to be the original one.. which I forgot what it is :p see if some other remembered it..