Sample Header Ad - 728x90

Why the screen lock password no longer matches after using a different disk as /data

1 vote
0 answers
172 views
I'm using a rooted Android 13 device, and an external SD-card that I mount as /data by editing the fstab. The SD-card is partitioned into few EXT4 partitions, and I can boot with any of them mounted as /data just by editing the fstab. For example, my current fstab entry is: /dev/block/mmcblk0p2 /data ext4 noatime,nosuid,nodev,discard wait,noflush_merge,fsync_mode=nobarrier,reserve_root=134217,resgid=1065,check,formattable,quota,reservedsize=128m,latemount,resize,checkpoint=fs And I can change it to mmcblk0p3, to boot with a different partition as /data. But there is an issue. Each time I boot with a different partition as /data, it works, BUT when I return to my previous one (same way, by editing fstab), it's lock screen password/PIN/Pattern **no longer matches**. It says like Wrong PIN. Since I don't use encryption, I easily solve it by deleting the locksettings.db file from /data/system. But if I used encryption, it definitely wouldn't work. My question is **why it happens**? **Why, when I successfully unlock a phone booted with different /data, and then switch back to previous /data, the password that was set there no longer matches, and I have to delete it?** **EDIT**: I made an experiment with a clean, not modded phone (without any SD cards or Root), that uses encryption and everything is stock. I took a full backup of the NAND flash, which includes GPT table, all partitions, and therefore the encrypted userdata too. After taking that full backup, I performed a Factory Reset on this phone, and booted up. Then, I turned phone off again, and flashed my full NAND backup. **The phone booted successfully, but yes, the password that was set there didnt match.** This result is very weird. What could even get modified on the phone, if not something on the NAND flash?
Asked by melonfsck - she her (11 rep)
Nov 8, 2023, 07:15 AM
Last activity: Nov 8, 2023, 08:59 PM