Skip to content
This repository has been archived by the owner on Oct 29, 2024. It is now read-only.

Use a general message when a PIN is required after booting or after some time #522

Open
wants to merge 528 commits into
base: 14
Choose a base branch
from

Conversation

neelchauhan
Copy link
Contributor

This prevents certain information from being leaked if an attacker gets their hands on a phone.

Closes GrapheneOS/os-issue-tracker#2607

girlbossceo and others added 30 commits April 2, 2024 18:44
Signed-off-by: r3g_5z <june@girlboss.ceo>
Previously I set this to null, but this can cause a NPE
Signed-off-by: r3g_5z <june@girlboss.ceo>
Ported from 11, 12 moved the isLogoutEnabled boolean to ActiveAdmin.java
Updated by smdyv <88971341+smdyv@users.noreply.github.com>.
Android 12's privacy dashboard shows permission usage timelines for
location, camera, and microphone. However, there's no reason to limit it
to those specific permissions; all the infrastructure is in place for
other permissions.

To enable the usage timeline for more permissions, keep discrete app op
history for all permission groups shown in the privacy dashboard. The
list of permission group -> app op mappings was obtained from
AppOpsManager.RUNTIME_AND_APPOP_PERMISSION_OPS with a few additional ops
from PrivacyItemController, and each op was resolved to its respective
enum ordinal from frameworks/proto_logging/stats/enums/app/enums.proto.

Change-Id: I6b1c476ea4c0edbc0b3fdf2e3e5cfcb11da77e33
…tivity. (GrapheneOS-Archive#2)

This is the partner commit to the addition of an option in Settings for
the same feature. This config can be enabled by an overlay for devices
that support increased touch sensitivity (otherwise known as "Glove
Mode") via the persist.vendor.touch_sensitivity_mode system property.

Signed-off-by: Diab Neiroukh <lazerl0rd@thezest.dev>
India, Japan and Korea have either industry standards or regulations for
phones sold within the country enforcing camera sounds. It's trivially
bypassed by taking out the SIM card, using video, using a headset or
turning off the volume. It doesn't make sense for us to enforce this.
Generated with Android 12 Extensions v9.0.0-test2 [1] using #1565C0
(light link accent color from GrapheneOS website) as a seed color,
with all other settings left at themelib [2] and colorkt [3] defaults.

[1] https://github.com/kdrag0n/android12-extensions/
[2] https://github.com/ProtonAOSP/android_external_themelib
[3] https://github.com/kdrag0n/colorkt
This switches to secure-by-default instead of crash-by-default for API
31 to work around apps which have updated to API 31 without specifying
either FLAG_MUTABLE or FLAG_IMMUTABLE for PendingIntents. If the app
ends up needing the FLAG_MUTABLE behavior, it may crash later, but it
should still be obvious why it happened.

There are many apps with outdated Play services client libraries lacking
support for Android 12 which are nonetheless targeting API 31 or higher
and will crash in certain situations. Google Play services will ask the
client library to request runtime permissions from the user on behalf of
it when it thinks that they're required for an operation that's
requested. The older client libraries will cause a crash in the app by
trying to create a PendingIntent with no FLAG_MUTABLE or FLAG_IMMUTABLE
specified. This is a much more common issue on GrapheneOS since Play
services is a regular user installed app with no special access or
privileges, and starts without any standard runtime permissions granted
to it.

Ported from 13: 94363af
Co-authored-by: Dmitry Muhomor <muhomor.dmitry@gmail.com>
It doesn't make sense to show a generic Android letter version icon for
USB.

Change-Id: I0441fc76fa8beab16675ac91e92e9b0490044dec
This change makes sharesheet way more useful by increasing the amount of
visible ranked apps.

Change-Id: Ic092f1d1784259c9f3c0870eda1dd1ae8544c697
The debugging options are not yet supported probably, so disable exec
spawning when doing debugging.
muhomorr and others added 3 commits May 8, 2024 13:53
- do not hardcode URL paths
- use java.net.URL API instead of manual string concatenation
- improve logging
- disable PSDS when PSDS type is not specified instead of keeping it enabled in a broken state
Adds deleteSecrets() to RecoverySystemService. This method is called
from rebootRecoveryWithCommand () before the --wipe_data command is
passed to recovery and the device is force-rebooted.

deleteSecerts() calls IKeystoreMaintenance.deleteAllKeys() in order to
quickly destroy the keys protecting the synthetic password blobs
used to derive FBE encryption keys.

The intent is to make FBE-encrypted data unrecoverable even if the full
data wipe in recovery is interrupted or skipped.

Bug: 324321147
Test: Manual - System -> Reset options -> Erase all data.
Test: Hold VolDown key to interrupt reboot and stop at bootloader
screen.
Test: fastboot oem bcd wipe command && fastboot oem bcd wipe recovery
Test: fastboot reboot
Test: Device reboots into recovery and prompts to factory reset:
Test: 'Cannot load Android system. Your data may be corrupt. ...'

Change-Id: I5eb8e97f3ae1a18d5e7e7c2c7eca048ebff3440a
@neelchauhan neelchauhan marked this pull request as draft May 24, 2024 21:25
@matchboxbananasynergy
Copy link

Comments say that this also applies to pattern (doesn't matter since we disable it) and passwords. Is that true? If so, I don't think it makes sense for the message to just say "PIN"

@neelchauhan neelchauhan marked this pull request as ready for review May 24, 2024 21:31
@neelchauhan
Copy link
Contributor Author

I noticed that too. Updated the PR for this reason.

@matchboxbananasynergy
Copy link

Thanks. Unsure if we want to change the pattern-specific strings as we don't use pattern unlock on GrapheneOS. Will defer to the development team on that.

Have you tested and confirmed the correct strings appear in all situations?

@neelchauhan
Copy link
Contributor Author

I'm building GrapheneOS right now. I will upload a demo video later today with the new strings

@matchboxbananasynergy
Copy link

matchboxbananasynergy commented May 24, 2024

@neelchauhan
Copy link
Contributor Author

Done!

Also, demo video: https://www.youtube.com/shorts/cGeHMyRIvaw

…ome time

This prevents certain information from being leaked if an attacker gets
their hands on a phone.

Closes GrapheneOS/os-issue-tracker#2607
@quh4gko8
Copy link
Contributor

quh4gko8 commented Aug 4, 2024

This current patchset doesn't work when other language is set and doesn't resolve the linked issue.

@quh4gko8
Copy link
Contributor

An automated way to replace the string name referencing the original "Enter your pin", such as keyguard_enter_your_pin would be preferable to resolve the issue across all translations. See Vanadium string rebranding patch as reference for this

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Quickwin] Use general message for a required PIN