The Unroot Guide - HappyZ/dpt-tools GitHub Wiki
Here we want to unroot the device, for whatever reason.
Step 1: Undo Customizations
Remove all your previously installed Android app.
Remove all your customized changes.
Step 2: Undo Launcher Mod
adb shell mount -o rw,remount /system
adb shell rm -rf /etc/dp_extensions/AndroidSettings
adb shell rm -rf /etc/dp_extensions/Apps
adb shell rm /data/system/ExtMgr.db
adb shell rm /data/system/ExtMgr.db-journal
Step 3: Flash official image (modded version)
Download from here and use dpt-tools
to flash (i.e. fw
command).
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):
/usr/local/bin/start_eufwupdater.sh
Edit 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
/usr/local/bin/updater_check.sh
Edit 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..