Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support setting quiet mode with flag for stopping user with immediate storage locking #99

Open
wants to merge 339 commits into
base: 15
Choose a base branch
from

Conversation

quh4gko8
Copy link
Member

@quh4gko8 quh4gko8 commented Jan 3, 2025

Part of changeset:
GrapheneOS/platform_packages_apps_Launcher3#47
#99 (you are here)

thestinger and others added 30 commits December 6, 2024 07:19
This reverts commit 5a8d91b5fac0a1ae597de359128e0706776ce3a7.
When an unhandled exception occured, binder connections were closed with
IPCThreadState::stopProcess() before the invocation of java.lang.Thread#dispatchUncaughtException().
By default, that method tries to report the crash via ActivityManager#handleApplicationCrash(),
which always failed due to the closed binder connection.
This meant that the crash dialog was never shown and additional crash handling was skipped.

Zygote-based spawning never calls IPCThreadState::stopProcess().
Needed for exec spawning, to pass custom flags to the kernel.
Chromium browser and its derivatives setup a seccomp syscall filter in their isolated processes,
which blocks creation of new userfaultfds.

Since 14 QPR2, ART uses a new userfaultfd-based GC.

When zygote-based process spawning is used, userfaultfd GC is initialized before any of app's code
is executed, i.e. before Chromium's seccomp syscall filter is installed.

When exec spawning is used, userfaultfd GC initialization is delayed until first garbage collection.
Chromium's seccomp syscall filter is already installed at that point.

This leads to crashes of isolated Chromium processes (both browser and WebView), with the following
log messages:
 E cr_seccomp: ../../sandbox/linux/seccomp-bpf-helpers/sigsys_handlers.cc:**CRASHING**:seccomp-bpf failure in syscall
 E cr_seccomp: nr=0x11a arg1=0x80001 arg2=0xc arg3=0xffffffffffffffff arg4=0xc

As a workaround, perform early initialization of ART userfaultfd GC in isolated processes by calling
System.gc() before executing app's code. On Pixel 8, this increases startup latency by around 4 to
10 milliseconds.
Based on 57448ae and d17960e

Co-authored-by: Renlord <[email protected]>
Co-authored-by: Daniel Micay <[email protected]>
- Conversations: enabled by default on Pixel
- Charging ripple: enabled by default on Pixel
Taken from ProtonAOSP/android_vendor_proton@a32d8c4
Android has had location indicators for a while, but let's use the new
privacy indicator infrastructure for displaying them. This makes them
integrate better with the new camera and microphone indicators.

Change-Id: Ie457bb2dad17bddbf9dc3a818e3ec586023ce918
This resource is overridden with an overlay on stock OS to Google Files app.
If it's empty, SystemUI crashes after screenshot of a work profile app is taken.
Screenshot was still saved, crash happened when constructing post-screenshot UI.
u-fred and others added 23 commits December 29, 2024 23:53
Some upstream methods are used to check if unlocking is possible when it
is known that a biometric auth has succeeded, but they don't and can't
take into account biometric second factor. Renaming these methods gives
us build errors for future callers, so we can make sure they are safe.
Extracted from:
commit dc6270f
Author: Fred Underwood <[email protected]>
Date:   Sat Dec 21 16:25:15 2024 +1000

    add second factor to DevicePolicyManagerService
Extracted from:
commit 3caf1f2
Author: Fred Underwood <[email protected]>
Date:   Sat Dec 21 16:40:05 2024 +1000

    add second factor to LockSettingsService
Extracted from:
commit caa335d
Author: Fred Underwood <[email protected]>
Date:   Sun Dec 22 06:53:47 2024 +1000

    add second factor UI
@quh4gko8 quh4gko8 changed the title Add required permission for Launcher3 to stop profiles Support setting quiet mode with flag for stopping user with immediate storage locking Jan 4, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.