0

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.

6
  • Why not debug it? Release versions can be debugged too. To debug it, remove symbol_level = 0 from your GN file. It will make debugging almost impossible Commented Mar 14, 2024 at 14:18
  • removing symbol_level = 0 would mean it would take default value of -1. Which is auto set based on build type. Commented Mar 15, 2024 at 19:57
  • we have tried with symbol_level = 1 and it does produce the same errors. Commented Mar 15, 2024 at 19:57
  • symbol_level specifies 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. Commented Mar 16, 2024 at 2:41
  • @Asesh Did try with symbol_level = 2, but logs do not describe more info. Are you referring to debugging the SO file? if yes then could you provide any helpful documents on that? It would be a gear help. Appreciate you help so far, thanks. Commented Mar 18, 2024 at 14:23

1 Answer 1

1

building with is_debug=true allows you to check the log statements. which might lead to the exact issue. where as i would suggest if you have not made any changes to the codebase yourself, restart the build process. because sometimes the project gets corrupted. i myself faced some issues in the earlier builds.

Sign up to request clarification or add additional context in comments.

1 Comment

Thanks for helping out @yogesh swami. i have already build it successfully few days ago. Still not sure what was the issue but building again solved the issue.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.