Chromium Android build crash with libcrashpad_handler_trampoline.so

353 views
Skip to first unread message

Nishchal Visavadiya

unread,
Mar 14, 2024, 5:43:53 PM3/14/24
to Chromium-dev
We are building chromium for Android.
We have successfully added built the APK using commands provided [here](https://chromium.googlesource.com/chromium/src/+/main/docs/android_build_instructions.md).
We have created the build using below GN args.

    target_os = "android"
    target_cpu = "arm64"
    android_channel = "stable"
    is_debug = false
    is_official_build = true
    is_component_build = false
    is_clang = true
    symbol_level = 0
    blink_symbol_level=0
    use_unofficial_version_number = false
    v8_use_external_startup_data = true
    icu_use_data_file = false
    ffmpeg_branding = "Chrome"
    proprietary_codecs = true
    exclude_unwind_tables = true
    chrome_pgo_phase = 0

After that we have followed [this](https://chromium.googlesource.com/chromium/src/+/main/docs/android_studio.md) android studio specific guide and generate a android wrapper project.
Using this wrapper we are extracting the Java, XMLs, SO and other resources to build directly in android studio.
We have done this successfully and the App is working fine but issue occures when we search.

The app crashes on any URL search (even chrome URLs such as: chrome://version) with below error by libchrome.so file.

    error: unable to open file "/data/app/~~VZ6JSoritWLt73RxWsu5yg==/org.chromium.chrome-fCO_LyriifFjdrNCMbQC_A==/base.apk!/lib/arm64-v8a/libcrashpad_handler_trampoline.so"
   
And few lines below that:

    DEBUG    pid-24896    A  Build fingerprint: 'samsung/r8qxxx/r8q:13/TP1A.220624.014/G781BXXS9HXA4:user/release-keys'
    DEBUG    pid-24896    A  Revision: '6'
    DEBUG    pid-24896    A  ABI: 'arm64'
    DEBUG    pid-24896    A  Processor: '7'
    DEBUG    pid-24896    A  Timestamp: 2024-03-07 16:39:23.593326054+0530
    DEBUG    pid-24896    A  Process uptime: 21s
    DEBUG    pid-24896    A  Cmdline: org.chromium.chrome
    DEBUG    pid-24896    A  pid: 24573, tid: 24573, name: chromium.chrome  >>> org.chromium.chrome <<<
    DEBUG    pid-24896    A  uid: 10959
    DEBUG    pid-24896    A  signal 5 (SIGTRAP), code 1 (TRAP_BRKPT), fault addr 0x0000007d505f181c
    DEBUG    pid-24896    A      x0  0000000000000001  x1  b400007ddf922460  x2  0000000000000001  x3  0000000000000063
    DEBUG    pid-24896    A      x4  0000000000000021  x5  0000000000000000  x6  0000007e89ebf000  x7  0000000000ab3cd4
    DEBUG    pid-24896    A      x8  99f03dcd87b4b313  x9  99f03dcd87b4b313  x10 000000000000007b  x11 0101010101010101
    DEBUG    pid-24896    A      x12 0000007ff06eb320  x13 0000000000000071  x14 0000000000000000  x15 00005330cb2a225e
    DEBUG    pid-24896    A      x16 0000000000000001  x17 0000007e77d9f818  x18 0000007e88fda000  x19 0000000000000002
    DEBUG    pid-24896    A      x20 000000000000001f  x21 0000007d4c9643d5  x22 0000007d4c7d17e4  x23 0000000000000000
    DEBUG    pid-24896    A      x24 0000007ff06ecba8  x25 0000000000000200  x26 0000007e88ce2000  x27 0000007d54fc9000
    DEBUG    pid-24896    A      x28 0000000000000013  x29 0000007ff06ecdb0
    DEBUG    pid-24896    A      lr  0000007d505f17d4  sp  0000007ff06ecac0  pc  0000007d505f181c  pst 0000000060001000
    DEBUG    pid-24896    A  backtrace:
    DEBUG    pid-24896    A        #00 pc 00000000047df81c  /data/app/~~Xdn1Bp8tkaJR4jaYjy7I0Q==/org.chromium.chrome-b6yTYWCy9lrtxZHzmCnVIQ==/base.apk!libchrome.so (BuildId: 598f31426c476ca7bc56f006306bc87705028c2b)


After trying to find the `libcrashpad_handler_trampoline.so` we manage to find it in a build folder with GN flag `is_debug = true`.
But we want to build with `is_debug = false` and doing so the app crashed on search with above logs.

Please let us know if anyone have understanding on Chromium android, thanks.

Torne (Richard Coles)

unread,
Mar 15, 2024, 10:22:37 AM3/15/24
to nishc...@simformsolutions.com, Chromium-dev
Release builds also include libcrashpad_handler_trampoline.so and you need to include this in your APK. It sounds like you are doing some custom build process, so we may not be able to help figure out why it's not included.

--
--
Chromium Developers mailing list: chromi...@chromium.org
View archives, change email options, or unsubscribe:
http://groups.google.com/a/chromium.org/group/chromium-dev
---
You received this message because you are subscribed to the Google Groups "Chromium-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to chromium-dev...@chromium.org.
To view this discussion on the web visit https://groups.google.com/a/chromium.org/d/msgid/chromium-dev/6a224429-1521-4dca-9758-8a01e2f24cafn%40chromium.org.

Nishchal Visavadiya

unread,
Mar 15, 2024, 6:04:56 PM3/15/24
to Chromium-dev, Torne (Richard Coles), Chromium-dev, nishc...@simformsolutions.com
Can you please at least guide on how to get the libcrashpad_handler_trampoline.so in release builds?

We have generated multiple release build with different flags but it does not generate this SO in the build folder.
Reply all
Reply to author
Forward
0 new messages