Skip to content

TestDPC fails to open on Android 14 with mobile-install #243

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

Open
eariassoto opened this issue Feb 17, 2025 · 1 comment
Open

TestDPC fails to open on Android 14 with mobile-install #243

eariassoto opened this issue Feb 17, 2025 · 1 comment

Comments

@eariassoto
Copy link

I was able to build, install and run TestDPC using build.sh on an Android 14 emulator.

However, deploying the app from Android Studio Ladybug with mobile-install results in a security crash:

2  samples.testdpc         com.afwsamples.testdpc               E  Attempt to load writable dex file: /data/local/tmp/incrementaldeployment/com.afwsamples.testdpc/dex/incremental_classes2.dex

I searched for similar issues and they point to some security changes in Android 14: https://developer.android.com/about/versions/14/behavior-changes-14#safer-dynamic-code-loading.

There is a bug in Bazel regarding incremental build support for Android 14 (bazelbuild/bazel#20456). Following the last comment, I set my environment to use Bazel 8. However, Bazel 8 does not build this project because WORKSPACE are disabled by default and suggest to migrate to Bzlmod.

Are there plans to update this repo to use Bzlmod?


My dev environment:
OS: MacOS Sequoia 15.3

TestDPC repo:

⟩ git remote get-url origin; git rev-parse master; git rev-parse HEAD
[email protected]:googlesamples/android-testdpc.git
305c86d36e9b7c85e41e9e01fbf2d648fa4970fb
305c86d36e9b7c85e41e9e01fbf2d648fa4970fb

Android Studio:

Android Studio Ladybug Feature Drop | 2024.2.2 Patch 1
Build #AI-242.23726.103.2422.13016713, built on February 5, 2025
Runtime version: 21.0.5+-12932927-b750.29 aarch64
VM: OpenJDK 64-Bit Server VM by JetBrains s.r.o.
Toolkit: sun.lwawt.macosx.LWCToolkit
macOS 15.3
GC: G1 Young Generation, G1 Concurrent GC, G1 Old Generation
Memory: 3072M
Cores: 12
Metal Rendering is ON
Registry:
  ide.experimental.ui=true
  i18n.locale=
Non-Bundled Plugins:
  com.google.idea.bazel.aswb (12816248-api-version-242)

Bazel version:

⟩ bazel version
Bazelisk version: 1.25.0
Build label: 8.1.0
Build target: @@//src/main/java/com/google/devtools/build/lib/bazel:BazelServer
Build time: Thu Feb 13 20:24:04 2025 (1739478244)
Build timestamp: 1739478244
Build timestamp as int: 1739478244
@s1204IT
Copy link
Contributor

s1204IT commented Apr 20, 2025

Until that happens, your best bet if you want to build it yourself is to fork it, push a commit to your own repository, and build it with Actions.

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

No branches or pull requests

2 participants