pm/install: wait for dexopt to finish before prepPerformDexoptIfNeede…#230
Closed
octocorvus wants to merge 1 commit into
Closed
pm/install: wait for dexopt to finish before prepPerformDexoptIfNeede…#230octocorvus wants to merge 1 commit into
octocorvus wants to merge 1 commit into
Conversation
…d returns In Android 16, dexopt was made asynchronous. This caused installPackagesTraced() to return before commitInstallPackages() ran. When multiple install sessions of the same APK were started (e.g. by double-tapping install button or running adb install in parallel), the installation steps from different sessions interleaved. This led to various issues (if device was not rebooted after install): - duplicate intent filters - duplicated app entry - system crash on app uninstall This change blocks in prepPerformDexoptIfNeeded() until dexopt is finished and then runs doPostDexopt (actionsAfterReboot) synchronously. All package installation steps now complete before installPackagesTraced() returns. Test: Run multiple adb installs of the same app. - Check adb shell dumpsys package <pkgname>: no duplicates - Uninstall the app: no system crash Closes GrapheneOS/os-issue-tracker#5782
736cb4b to
a9c1b1f
Compare
octocorvus
added a commit
to octocorvus/platform_frameworks_base
that referenced
this pull request
Jul 20, 2025
octocorvus
added a commit
to octocorvus/platform_frameworks_base
that referenced
this pull request
Jul 22, 2025
octocorvus
added a commit
to octocorvus/platform_frameworks_base
that referenced
this pull request
Jul 24, 2025
octocorvus
added a commit
to octocorvus/platform_frameworks_base
that referenced
this pull request
Jul 24, 2025
octocorvus
added a commit
to octocorvus/platform_frameworks_base
that referenced
this pull request
Jul 24, 2025
octocorvus
added a commit
to octocorvus/platform_frameworks_base
that referenced
this pull request
Jul 25, 2025
octocorvus
added a commit
to octocorvus/platform_frameworks_base
that referenced
this pull request
Jul 25, 2025
muhomorr
added a commit
to muhomorr/platform_frameworks_base
that referenced
this pull request
Jul 27, 2025
Async dexopt was added in Android 16. It has introduced a bug in handling of concurrent installs of the same package. Such installs started to corrupt the internal PackageManager state of the affected packages, which led to system_server crashes when attempting to uninstall them. As a workaround, this commit makes the package installer reject install requests for packages that are already being installed (package updates are considered to be installs too). For more info, see GrapheneOS#230 Based on GrapheneOS#234
muhomorr
added a commit
to muhomorr/platform_frameworks_base
that referenced
this pull request
Jul 27, 2025
Async dexopt was added in Android 16. It has introduced a bug in handling of concurrent installs of the same package. Such installs started to corrupt the internal PackageManager state of the affected packages, which led to system_server crashes when attempting to uninstall them. As a workaround, this commit makes the package installer reject install requests for packages that are already being installed (package updates are considered to be installs too). For more info, see GrapheneOS#230 Based on GrapheneOS#234
muhomorr
added a commit
to muhomorr/platform_frameworks_base
that referenced
this pull request
Jul 27, 2025
Async dexopt was added in Android 16. It has introduced a bug in handling of concurrent installs of the same package. Such installs started to corrupt the internal PackageManager state of the affected packages, which led to system_server crashes when attempting to uninstall them. As a workaround, this commit makes the package installer reject install requests for packages that are already being installed (package updates are considered to be installs too). For more info, see GrapheneOS#230 Based on GrapheneOS#234
thestinger
pushed a commit
that referenced
this pull request
Jul 27, 2025
Async dexopt was added in Android 16. It has introduced a bug in handling of concurrent installs of the same package. Such installs started to corrupt the internal PackageManager state of the affected packages, which led to system_server crashes when attempting to uninstall them. As a workaround, this commit makes the package installer reject install requests for packages that are already being installed (package updates are considered to be installs too). For more info, see #230 Based on #234
joeyhuab
pushed a commit
to Evolution-X/frameworks_base_old
that referenced
this pull request
Jul 29, 2025
Async dexopt was added in Android 16. It has introduced a bug in handling of concurrent installs of the same package. Such installs started to corrupt the internal PackageManager state of the affected packages, which led to system_server crashes when attempting to uninstall them. As a workaround, this commit makes the package installer reject install requests for packages that are already being installed (package updates are considered to be installs too). For more info, see GrapheneOS/platform_frameworks_base#230 Based on GrapheneOS/platform_frameworks_base#234
joeyhuab
pushed a commit
to Evolution-X/frameworks_base_old
that referenced
this pull request
Jul 30, 2025
Async dexopt was added in Android 16. It has introduced a bug in handling of concurrent installs of the same package. Such installs started to corrupt the internal PackageManager state of the affected packages, which led to system_server crashes when attempting to uninstall them. As a workaround, this commit makes the package installer reject install requests for packages that are already being installed (package updates are considered to be installs too). For more info, see GrapheneOS/platform_frameworks_base#230 Based on GrapheneOS/platform_frameworks_base#234
Ghosuto
pushed a commit
to Lunaris-AOSP/frameworks_base_old
that referenced
this pull request
Jul 30, 2025
Async dexopt was added in Android 16. It has introduced a bug in handling of concurrent installs of the same package. Such installs started to corrupt the internal PackageManager state of the affected packages, which led to system_server crashes when attempting to uninstall them. As a workaround, this commit makes the package installer reject install requests for packages that are already being installed (package updates are considered to be installs too). For more info, see GrapheneOS/platform_frameworks_base#230 Based on GrapheneOS/platform_frameworks_base#234
shutter-cat
pushed a commit
to VoltageOS-staging/frameworks_base_new
that referenced
this pull request
Jul 31, 2025
Async dexopt was added in Android 16. It has introduced a bug in handling of concurrent installs of the same package. Such installs started to corrupt the internal PackageManager state of the affected packages, which led to system_server crashes when attempting to uninstall them. As a workaround, this commit makes the package installer reject install requests for packages that are already being installed (package updates are considered to be installs too). For more info, see GrapheneOS#230 Based on GrapheneOS#234 Signed-off-by: Dmitrii <bankersenator@gmail.com>
shutter-cat
pushed a commit
to VoltageOS-staging/frameworks_base_new
that referenced
this pull request
Jul 31, 2025
Async dexopt was added in Android 16. It has introduced a bug in handling of concurrent installs of the same package. Such installs started to corrupt the internal PackageManager state of the affected packages, which led to system_server crashes when attempting to uninstall them. As a workaround, this commit makes the package installer reject install requests for packages that are already being installed (package updates are considered to be installs too). For more info, see GrapheneOS#230 Based on GrapheneOS#234 Signed-off-by: Dmitrii <bankersenator@gmail.com>
Ghosuto
pushed a commit
to Lunaris-AOSP/frameworks_base_old
that referenced
this pull request
Aug 1, 2025
Async dexopt was added in Android 16. It has introduced a bug in handling of concurrent installs of the same package. Such installs started to corrupt the internal PackageManager state of the affected packages, which led to system_server crashes when attempting to uninstall them. As a workaround, this commit makes the package installer reject install requests for packages that are already being installed (package updates are considered to be installs too). For more info, see GrapheneOS/platform_frameworks_base#230 Based on GrapheneOS/platform_frameworks_base#234
Ghosuto
pushed a commit
to Lunaris-AOSP/frameworks_base_old
that referenced
this pull request
Aug 1, 2025
Async dexopt was added in Android 16. It has introduced a bug in handling of concurrent installs of the same package. Such installs started to corrupt the internal PackageManager state of the affected packages, which led to system_server crashes when attempting to uninstall them. As a workaround, this commit makes the package installer reject install requests for packages that are already being installed (package updates are considered to be installs too). For more info, see GrapheneOS/platform_frameworks_base#230 Based on GrapheneOS/platform_frameworks_base#234
neobuddy89
pushed a commit
to crdroidandroid/android_frameworks_base
that referenced
this pull request
Aug 2, 2025
Async dexopt was added in Android 16. It has introduced a bug in handling of concurrent installs of the same package. Such installs started to corrupt the internal PackageManager state of the affected packages, which led to system_server crashes when attempting to uninstall them. As a workaround, this commit makes the package installer reject install requests for packages that are already being installed (package updates are considered to be installs too). For more info, see GrapheneOS/platform_frameworks_base#230 Based on GrapheneOS/platform_frameworks_base#234 Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>
Ghosuto
pushed a commit
to Lunaris-AOSP/frameworks_base_old
that referenced
this pull request
Aug 3, 2025
Async dexopt was added in Android 16. It has introduced a bug in handling of concurrent installs of the same package. Such installs started to corrupt the internal PackageManager state of the affected packages, which led to system_server crashes when attempting to uninstall them. As a workaround, this commit makes the package installer reject install requests for packages that are already being installed (package updates are considered to be installs too). For more info, see GrapheneOS/platform_frameworks_base#230 Based on GrapheneOS/platform_frameworks_base#234
neobuddy89
pushed a commit
to crdroidandroid/android_frameworks_base
that referenced
this pull request
Aug 3, 2025
Async dexopt was added in Android 16. It has introduced a bug in handling of concurrent installs of the same package. Such installs started to corrupt the internal PackageManager state of the affected packages, which led to system_server crashes when attempting to uninstall them. As a workaround, this commit makes the package installer reject install requests for packages that are already being installed (package updates are considered to be installs too). For more info, see GrapheneOS/platform_frameworks_base#230 Based on GrapheneOS/platform_frameworks_base#234 Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>
Ghosuto
pushed a commit
to Lunaris-AOSP/frameworks_base_old
that referenced
this pull request
Aug 4, 2025
Async dexopt was added in Android 16. It has introduced a bug in handling of concurrent installs of the same package. Such installs started to corrupt the internal PackageManager state of the affected packages, which led to system_server crashes when attempting to uninstall them. As a workaround, this commit makes the package installer reject install requests for packages that are already being installed (package updates are considered to be installs too). For more info, see GrapheneOS/platform_frameworks_base#230 Based on GrapheneOS/platform_frameworks_base#234
xdevs23
pushed a commit
to halogenOS/android_frameworks_base
that referenced
this pull request
Aug 4, 2025
Async dexopt was added in Android 16. It has introduced a bug in handling of concurrent installs of the same package. Such installs started to corrupt the internal PackageManager state of the affected packages, which led to system_server crashes when attempting to uninstall them. As a workaround, this commit makes the package installer reject install requests for packages that are already being installed (package updates are considered to be installs too). For more info, see GrapheneOS#230 Based on GrapheneOS#234 Signed-off-by: Simão Gomes Viana <devel@superboring.dev>
xdevs23
pushed a commit
to halogenOS/android_frameworks_base
that referenced
this pull request
Aug 4, 2025
Async dexopt was added in Android 16. It has introduced a bug in handling of concurrent installs of the same package. Such installs started to corrupt the internal PackageManager state of the affected packages, which led to system_server crashes when attempting to uninstall them. As a workaround, this commit makes the package installer reject install requests for packages that are already being installed (package updates are considered to be installs too). For more info, see GrapheneOS#230 Based on GrapheneOS#234 Signed-off-by: Simão Gomes Viana <devel@superboring.dev>
shutter-cat
pushed a commit
to VoltageOS-staging/frameworks_base_new
that referenced
this pull request
Aug 5, 2025
Async dexopt was added in Android 16. It has introduced a bug in handling of concurrent installs of the same package. Such installs started to corrupt the internal PackageManager state of the affected packages, which led to system_server crashes when attempting to uninstall them. As a workaround, this commit makes the package installer reject install requests for packages that are already being installed (package updates are considered to be installs too). For more info, see GrapheneOS#230 Based on GrapheneOS#234 Signed-off-by: Dmitrii <bankersenator@gmail.com>
Ghosuto
pushed a commit
to Lunaris-AOSP/frameworks_base_old
that referenced
this pull request
Aug 5, 2025
Async dexopt was added in Android 16. It has introduced a bug in handling of concurrent installs of the same package. Such installs started to corrupt the internal PackageManager state of the affected packages, which led to system_server crashes when attempting to uninstall them. As a workaround, this commit makes the package installer reject install requests for packages that are already being installed (package updates are considered to be installs too). For more info, see GrapheneOS/platform_frameworks_base#230 Based on GrapheneOS/platform_frameworks_base#234
shutter-cat
pushed a commit
to VoltageOS-staging/frameworks_base_new
that referenced
this pull request
Aug 8, 2025
Async dexopt was added in Android 16. It has introduced a bug in handling of concurrent installs of the same package. Such installs started to corrupt the internal PackageManager state of the affected packages, which led to system_server crashes when attempting to uninstall them. As a workaround, this commit makes the package installer reject install requests for packages that are already being installed (package updates are considered to be installs too). For more info, see GrapheneOS#230 Based on GrapheneOS#234 Signed-off-by: Dmitrii <bankersenator@gmail.com>
ralf979
pushed a commit
to Black-Iron-Project/frameworks_base
that referenced
this pull request
Aug 9, 2025
Async dexopt was added in Android 16. It has introduced a bug in handling of concurrent installs of the same package. Such installs started to corrupt the internal PackageManager state of the affected packages, which led to system_server crashes when attempting to uninstall them. As a workaround, this commit makes the package installer reject install requests for packages that are already being installed (package updates are considered to be installs too). For more info, see GrapheneOS/platform_frameworks_base#230 Based on GrapheneOS/platform_frameworks_base#234 Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>
ralf979
pushed a commit
to Black-Iron-Project/frameworks_base
that referenced
this pull request
Aug 9, 2025
Async dexopt was added in Android 16. It has introduced a bug in handling of concurrent installs of the same package. Such installs started to corrupt the internal PackageManager state of the affected packages, which led to system_server crashes when attempting to uninstall them. As a workaround, this commit makes the package installer reject install requests for packages that are already being installed (package updates are considered to be installs too). For more info, see GrapheneOS/platform_frameworks_base#230 Based on GrapheneOS/platform_frameworks_base#234 Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>
rmp22
pushed a commit
to AxionAOSP/android_frameworks_base
that referenced
this pull request
Aug 10, 2025
Async dexopt was added in Android 16. It has introduced a bug in handling of concurrent installs of the same package. Such installs started to corrupt the internal PackageManager state of the affected packages, which led to system_server crashes when attempting to uninstall them. As a workaround, this commit makes the package installer reject install requests for packages that are already being installed (package updates are considered to be installs too). For more info, see GrapheneOS/platform_frameworks_base#230 Based on GrapheneOS/platform_frameworks_base#234 Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>
shutter-cat
pushed a commit
to VoltageOS-staging/frameworks_base_new
that referenced
this pull request
Aug 11, 2025
Async dexopt was added in Android 16. It has introduced a bug in handling of concurrent installs of the same package. Such installs started to corrupt the internal PackageManager state of the affected packages, which led to system_server crashes when attempting to uninstall them. As a workaround, this commit makes the package installer reject install requests for packages that are already being installed (package updates are considered to be installs too). For more info, see GrapheneOS#230 Based on GrapheneOS#234 Signed-off-by: Dmitrii <bankersenator@gmail.com>
Klozz
pushed a commit
to TheXPerienceProject/platform_frameworks_base
that referenced
this pull request
Aug 11, 2025
Async dexopt was added in Android 16. It has introduced a bug in handling of concurrent installs of the same package. Such installs started to corrupt the internal PackageManager state of the affected packages, which led to system_server crashes when attempting to uninstall them. As a workaround, this commit makes the package installer reject install requests for packages that are already being installed (package updates are considered to be installs too). For more info, see GrapheneOS#230 Based on GrapheneOS#234 Signed-off-by: Dmitrii <bankersenator@gmail.com>
Klozz
pushed a commit
to TheXPerienceProject/platform_frameworks_base
that referenced
this pull request
Aug 11, 2025
Async dexopt was added in Android 16. It has introduced a bug in handling of concurrent installs of the same package. Such installs started to corrupt the internal PackageManager state of the affected packages, which led to system_server crashes when attempting to uninstall them. As a workaround, this commit makes the package installer reject install requests for packages that are already being installed (package updates are considered to be installs too). For more info, see GrapheneOS#230 Based on GrapheneOS#234 Signed-off-by: Dmitrii <bankersenator@gmail.com>
Klozz
pushed a commit
to TheXPerienceProject/platform_frameworks_base
that referenced
this pull request
Aug 11, 2025
Async dexopt was added in Android 16. It has introduced a bug in handling of concurrent installs of the same package. Such installs started to corrupt the internal PackageManager state of the affected packages, which led to system_server crashes when attempting to uninstall them. As a workaround, this commit makes the package installer reject install requests for packages that are already being installed (package updates are considered to be installs too). For more info, see GrapheneOS#230 Based on GrapheneOS#234 Signed-off-by: Dmitrii <bankersenator@gmail.com>
keosh1
pushed a commit
to RisingOS-Revived/android_frameworks_base-new
that referenced
this pull request
Aug 12, 2025
Async dexopt was added in Android 16. It has introduced a bug in handling of concurrent installs of the same package. Such installs started to corrupt the internal PackageManager state of the affected packages, which led to system_server crashes when attempting to uninstall them. As a workaround, this commit makes the package installer reject install requests for packages that are already being installed (package updates are considered to be installs too). For more info, see GrapheneOS/platform_frameworks_base#230 Based on GrapheneOS/platform_frameworks_base#234
Klozz
pushed a commit
to TheXPerienceProject/platform_frameworks_base
that referenced
this pull request
Aug 12, 2025
Async dexopt was added in Android 16. It has introduced a bug in handling of concurrent installs of the same package. Such installs started to corrupt the internal PackageManager state of the affected packages, which led to system_server crashes when attempting to uninstall them. As a workaround, this commit makes the package installer reject install requests for packages that are already being installed (package updates are considered to be installs too). For more info, see GrapheneOS#230 Based on GrapheneOS#234 Signed-off-by: Dmitrii <bankersenator@gmail.com>
yusufnoor786
pushed a commit
to Mist-OS-Staging/frameworks_base_los
that referenced
this pull request
Aug 12, 2025
Async dexopt was added in Android 16. It has introduced a bug in handling of concurrent installs of the same package. Such installs started to corrupt the internal PackageManager state of the affected packages, which led to system_server crashes when attempting to uninstall them. As a workaround, this commit makes the package installer reject install requests for packages that are already being installed (package updates are considered to be installs too). For more info, see GrapheneOS/platform_frameworks_base#230 Based on GrapheneOS/platform_frameworks_base#234
neobuddy89
pushed a commit
to crdroidandroid/android_frameworks_base
that referenced
this pull request
Aug 13, 2025
Async dexopt was added in Android 16. It has introduced a bug in handling of concurrent installs of the same package. Such installs started to corrupt the internal PackageManager state of the affected packages, which led to system_server crashes when attempting to uninstall them. As a workaround, this commit makes the package installer reject install requests for packages that are already being installed (package updates are considered to be installs too). For more info, see GrapheneOS/platform_frameworks_base#230 Based on GrapheneOS/platform_frameworks_base#234 Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>
joeyhuab
pushed a commit
to Evolution-X/frameworks_base_old
that referenced
this pull request
Aug 14, 2025
Async dexopt was added in Android 16. It has introduced a bug in handling of concurrent installs of the same package. Such installs started to corrupt the internal PackageManager state of the affected packages, which led to system_server crashes when attempting to uninstall them. As a workaround, this commit makes the package installer reject install requests for packages that are already being installed (package updates are considered to be installs too). For more info, see GrapheneOS/platform_frameworks_base#230 Based on GrapheneOS/platform_frameworks_base#234
Ghosuto
pushed a commit
to Lunaris-AOSP/frameworks_base_old
that referenced
this pull request
Aug 14, 2025
Async dexopt was added in Android 16. It has introduced a bug in handling of concurrent installs of the same package. Such installs started to corrupt the internal PackageManager state of the affected packages, which led to system_server crashes when attempting to uninstall them. As a workaround, this commit makes the package installer reject install requests for packages that are already being installed (package updates are considered to be installs too). For more info, see GrapheneOS/platform_frameworks_base#230 Based on GrapheneOS/platform_frameworks_base#234
Ghosuto
pushed a commit
to Lunaris-AOSP/frameworks_base_old
that referenced
this pull request
Aug 18, 2025
Async dexopt was added in Android 16. It has introduced a bug in handling of concurrent installs of the same package. Such installs started to corrupt the internal PackageManager state of the affected packages, which led to system_server crashes when attempting to uninstall them. As a workaround, this commit makes the package installer reject install requests for packages that are already being installed (package updates are considered to be installs too). For more info, see GrapheneOS/platform_frameworks_base#230 Based on GrapheneOS/platform_frameworks_base#234
Ghosuto
pushed a commit
to Lunaris-AOSP/frameworks_base_old
that referenced
this pull request
Aug 19, 2025
Async dexopt was added in Android 16. It has introduced a bug in handling of concurrent installs of the same package. Such installs started to corrupt the internal PackageManager state of the affected packages, which led to system_server crashes when attempting to uninstall them. As a workaround, this commit makes the package installer reject install requests for packages that are already being installed (package updates are considered to be installs too). For more info, see GrapheneOS/platform_frameworks_base#230 Based on GrapheneOS/platform_frameworks_base#234
Ghosuto
pushed a commit
to Lunaris-AOSP/frameworks_base_old
that referenced
this pull request
Aug 19, 2025
Async dexopt was added in Android 16. It has introduced a bug in handling of concurrent installs of the same package. Such installs started to corrupt the internal PackageManager state of the affected packages, which led to system_server crashes when attempting to uninstall them. As a workaround, this commit makes the package installer reject install requests for packages that are already being installed (package updates are considered to be installs too). For more info, see GrapheneOS/platform_frameworks_base#230 Based on GrapheneOS/platform_frameworks_base#234
Ghosuto
pushed a commit
to Lunaris-AOSP/frameworks_base_old
that referenced
this pull request
Aug 19, 2025
Async dexopt was added in Android 16. It has introduced a bug in handling of concurrent installs of the same package. Such installs started to corrupt the internal PackageManager state of the affected packages, which led to system_server crashes when attempting to uninstall them. As a workaround, this commit makes the package installer reject install requests for packages that are already being installed (package updates are considered to be installs too). For more info, see GrapheneOS/platform_frameworks_base#230 Based on GrapheneOS/platform_frameworks_base#234
keosh1
pushed a commit
to RisingOS-Revived/android_frameworks_base-new
that referenced
this pull request
Aug 19, 2025
Async dexopt was added in Android 16. It has introduced a bug in handling of concurrent installs of the same package. Such installs started to corrupt the internal PackageManager state of the affected packages, which led to system_server crashes when attempting to uninstall them. As a workaround, this commit makes the package installer reject install requests for packages that are already being installed (package updates are considered to be installs too). For more info, see GrapheneOS/platform_frameworks_base#230 Based on GrapheneOS/platform_frameworks_base#234
Ghosuto
pushed a commit
to Lunaris-AOSP/frameworks_base_old
that referenced
this pull request
Aug 19, 2025
Async dexopt was added in Android 16. It has introduced a bug in handling of concurrent installs of the same package. Such installs started to corrupt the internal PackageManager state of the affected packages, which led to system_server crashes when attempting to uninstall them. As a workaround, this commit makes the package installer reject install requests for packages that are already being installed (package updates are considered to be installs too). For more info, see GrapheneOS/platform_frameworks_base#230 Based on GrapheneOS/platform_frameworks_base#234
Ghosuto
pushed a commit
to Lunaris-AOSP/frameworks_base_old
that referenced
this pull request
Aug 19, 2025
Async dexopt was added in Android 16. It has introduced a bug in handling of concurrent installs of the same package. Such installs started to corrupt the internal PackageManager state of the affected packages, which led to system_server crashes when attempting to uninstall them. As a workaround, this commit makes the package installer reject install requests for packages that are already being installed (package updates are considered to be installs too). For more info, see GrapheneOS/platform_frameworks_base#230 Based on GrapheneOS/platform_frameworks_base#234
Klozz
pushed a commit
to TheXPerienceProject/platform_frameworks_base
that referenced
this pull request
Aug 20, 2025
Async dexopt was added in Android 16. It has introduced a bug in handling of concurrent installs of the same package. Such installs started to corrupt the internal PackageManager state of the affected packages, which led to system_server crashes when attempting to uninstall them. As a workaround, this commit makes the package installer reject install requests for packages that are already being installed (package updates are considered to be installs too). For more info, see GrapheneOS#230 Based on GrapheneOS#234 Signed-off-by: Dmitrii <bankersenator@gmail.com> Signed-off-by: klozz <carlosj@klozz.dev>
neobuddy89
pushed a commit
to crdroidandroid/android_frameworks_base
that referenced
this pull request
Aug 20, 2025
Async dexopt was added in Android 16. It has introduced a bug in handling of concurrent installs of the same package. Such installs started to corrupt the internal PackageManager state of the affected packages, which led to system_server crashes when attempting to uninstall them. As a workaround, this commit makes the package installer reject install requests for packages that are already being installed (package updates are considered to be installs too). For more info, see GrapheneOS/platform_frameworks_base#230 Based on GrapheneOS/platform_frameworks_base#234 Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>
Ghosuto
pushed a commit
to Lunaris-AOSP/frameworks_base_old
that referenced
this pull request
Aug 21, 2025
Async dexopt was added in Android 16. It has introduced a bug in handling of concurrent installs of the same package. Such installs started to corrupt the internal PackageManager state of the affected packages, which led to system_server crashes when attempting to uninstall them. As a workaround, this commit makes the package installer reject install requests for packages that are already being installed (package updates are considered to be installs too). For more info, see GrapheneOS/platform_frameworks_base#230 Based on GrapheneOS/platform_frameworks_base#234
Ghosuto
pushed a commit
to Lunaris-AOSP/frameworks_base_old
that referenced
this pull request
Aug 23, 2025
Async dexopt was added in Android 16. It has introduced a bug in handling of concurrent installs of the same package. Such installs started to corrupt the internal PackageManager state of the affected packages, which led to system_server crashes when attempting to uninstall them. As a workaround, this commit makes the package installer reject install requests for packages that are already being installed (package updates are considered to be installs too). For more info, see GrapheneOS/platform_frameworks_base#230 Based on GrapheneOS/platform_frameworks_base#234
Ghosuto
pushed a commit
to Lunaris-AOSP/frameworks_base_old
that referenced
this pull request
Aug 23, 2025
Async dexopt was added in Android 16. It has introduced a bug in handling of concurrent installs of the same package. Such installs started to corrupt the internal PackageManager state of the affected packages, which led to system_server crashes when attempting to uninstall them. As a workaround, this commit makes the package installer reject install requests for packages that are already being installed (package updates are considered to be installs too). For more info, see GrapheneOS/platform_frameworks_base#230 Based on GrapheneOS/platform_frameworks_base#234
Ghosuto
pushed a commit
to Lunaris-AOSP/frameworks_base_old
that referenced
this pull request
Aug 23, 2025
Async dexopt was added in Android 16. It has introduced a bug in handling of concurrent installs of the same package. Such installs started to corrupt the internal PackageManager state of the affected packages, which led to system_server crashes when attempting to uninstall them. As a workaround, this commit makes the package installer reject install requests for packages that are already being installed (package updates are considered to be installs too). For more info, see GrapheneOS/platform_frameworks_base#230 Based on GrapheneOS/platform_frameworks_base#234
Ghosuto
pushed a commit
to Lunaris-AOSP/frameworks_base_old
that referenced
this pull request
Aug 23, 2025
Async dexopt was added in Android 16. It has introduced a bug in handling of concurrent installs of the same package. Such installs started to corrupt the internal PackageManager state of the affected packages, which led to system_server crashes when attempting to uninstall them. As a workaround, this commit makes the package installer reject install requests for packages that are already being installed (package updates are considered to be installs too). For more info, see GrapheneOS/platform_frameworks_base#230 Based on GrapheneOS/platform_frameworks_base#234
Ghosuto
pushed a commit
to Lunaris-AOSP/frameworks_base_old
that referenced
this pull request
Aug 23, 2025
Async dexopt was added in Android 16. It has introduced a bug in handling of concurrent installs of the same package. Such installs started to corrupt the internal PackageManager state of the affected packages, which led to system_server crashes when attempting to uninstall them. As a workaround, this commit makes the package installer reject install requests for packages that are already being installed (package updates are considered to be installs too). For more info, see GrapheneOS/platform_frameworks_base#230 Based on GrapheneOS/platform_frameworks_base#234
Ghosuto
pushed a commit
to Lunaris-AOSP/frameworks_base_old
that referenced
this pull request
Aug 24, 2025
Async dexopt was added in Android 16. It has introduced a bug in handling of concurrent installs of the same package. Such installs started to corrupt the internal PackageManager state of the affected packages, which led to system_server crashes when attempting to uninstall them. As a workaround, this commit makes the package installer reject install requests for packages that are already being installed (package updates are considered to be installs too). For more info, see GrapheneOS/platform_frameworks_base#230 Based on GrapheneOS/platform_frameworks_base#234
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
…d returns
In Android 16, dexopt was made asynchronous. This caused installPackagesTraced() to return before commitInstallPackages() ran. When multiple install sessions of the same APK were started (e.g. by double-tapping install button or running adb install in parallel), the installation steps from different sessions interleaved. This led to various issues (if device was not rebooted after install):
This change blocks in prepPerformDexoptIfNeeded() until dexopt is finished and then runs doPostDexopt (actionsAfterReboot) synchronously. All package installation steps now complete before installPackagesTraced() returns.
Test: Run multiple adb installs of the same app.
Closes GrapheneOS/os-issue-tracker#5782