Commit fd12f05
committed
Don’t require strong auth on regular time interval
This disables the need to provide strong authentication except when booting the
device. The idea behind this is that you are no longer forced to enter your
strong authentication credentials in random locations where it might be easy to
snoop your strong authentication credentials allowing an adversary to boot and
decrypt your device against your will.
Changing DEFAULT_STRONG_AUTH_TIMEOUT_MS is not enough. Rather, it has the
opposite effect. In my tests, it caused the strong auth to be
required every hour rather than a 42 d interval.
Ref: frameworks/base/services/devicepolicy/java/com/android/server/devicepolicy/DevicePolicyManagerService.java
In my tests, dpm.getRequiredStrongAuthTimeout(null, userId)) returned 3600000.
Note that this patch circumvents the values that DeviceAdmin may provide. In other words, it ignores whatever a MDM would request for the strong auth timeout!
To be clear, this patch is a practical approach, in an ideal world, we would properly use the DeviceAdmin feature.
Confirmed working on:
* Android 9
* Android 10
Submitted to:
* hashbang/os#32
* RattlesnakeOS/community_patches#9
* https://github.com/ypid/ypid-android-patches1 parent 86a9704 commit fd12f05
File tree
2 files changed
+2
-13
lines changed- core/java/android/app/admin
- services/core/java/com/android/server/locksettings
2 files changed
+2
-13
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
534 | 534 | | |
535 | 535 | | |
536 | 536 | | |
537 | | - | |
| 537 | + | |
538 | 538 | | |
539 | 539 | | |
540 | 540 | | |
| |||
Lines changed: 1 addition & 12 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
120 | 120 | | |
121 | 121 | | |
122 | 122 | | |
123 | | - | |
124 | | - | |
125 | | - | |
126 | | - | |
127 | | - | |
128 | | - | |
129 | | - | |
130 | | - | |
131 | | - | |
132 | | - | |
133 | | - | |
134 | | - | |
| 123 | + | |
135 | 124 | | |
136 | 125 | | |
137 | 126 | | |
| |||
0 commit comments