kb / Android

Favorite Magisk modules

Force reset PIN

Assuming the device isn’t encrypted, deleting locksettings.db is sufficient.

With adb:

adb shell su -c "rm /data/system/locksettings.db*"

If a custom recovery is installed, you can find your own way to delete locksettings.db without needing adb access.

If the device is encrypted but you have fastboot access, you can wipe user data as a last resort:

fastboot erase userdata

Change default screen orientation

Run this either on the device or through adb shell:

content insert --uri content://settings/system --bind name:s:user_rotation --bind value:i:x

where x is:

Orientation x
Portrait 0
Landscape 1
Upside-down portrait 2
Reverse landscape 3