Skip to content

add native_bridge_supported for Cuttlefish build#349

Merged
thestinger merged 1 commit into
GrapheneOS:mainfrom
inthewaves:cuttlefish-fix
Jun 8, 2026
Merged

add native_bridge_supported for Cuttlefish build#349
thestinger merged 1 commit into
GrapheneOS:mainfrom
inthewaves:cuttlefish-fix

Conversation

@inthewaves

Copy link
Copy Markdown
Member

This seems to be required for Cuttlefish to build even for x86_64. Both scudo and jemalloc_new have this line in Android.bp as well.

Note that AOSP doesn't have an arm64 to x86_64 translator. frameworks/libs/binary_translation/ currently only has a riscv64_to_x86_64 translator, so Cuttlefish currently has ro.dalvik.vm.native.bridge=0

hardened_malloc appears to otherwise be used for x86_64 apps in Cuttlefish x86_64.

Test: lunch aosp_cf_x86_64_only_phone-cur-userdebug with bionic build fix boots

Test: hardened_malloc was able to detect double free when running a test app that does a double free via JNI

This seems to be required for Cuttlefish to build even for x86_64. Both scudo and jemalloc_new have
this line in Android.bp as well.

Note that AOSP doesn't have an arm64 to x86_64 translator. frameworks/libs/binary_translation/
currently only has a riscv64_to_x86_64 translator, so Cuttlefish currently has
ro.dalvik.vm.native.bridge=0

hardened_malloc appears to otherwise be used for x86_64 apps in Cuttlefish x86_64.

Test: lunch aosp_cf_x86_64_only_phone-cur-userdebug with bionic build fix boots
Test: hardened_malloc was able to detect double free when running a test app that does a double free
via JNI
@thestinger thestinger merged commit 9e88c14 into GrapheneOS:main Jun 8, 2026
9 checks passed
@inthewaves inthewaves deleted the cuttlefish-fix branch June 8, 2026 06:50
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.

2 participants