We are building chromium for Android. We have successfully added built the APK using commands provided here
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 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.
symbol_level = 0from your GN file. It will make debugging almost impossiblesymbol_levelspecifies the level of debug symbol to embed into your app. By default it should be either 1 or 2. I think it's 2. It has nothing to do with this error message.