Skip to content

Latest commit

 

History

History
78 lines (60 loc) · 3.09 KB

README.en.md

File metadata and controls

78 lines (60 loc) · 3.09 KB

Note

  • Lag.
  • Cant MultiThread.
  • Android Studio version: Iguana | 2023.2.1 Canary 16 for Windows.
  • Download link: Android Studio.
  • Example code: demo.
  • Current WebView version: 120.0.6076.4.
  • Do not modify classes or functions with the @JNINamespace or @CalledByNative annotations.

Goal

  • Create structure.json that includes only the necessary files.
  • I'm trying to remove as many unnecessary files as possible.
  • That will minimize errors that I cannot fix it🫣.
  • If there are somethings that u cant fix it, just delete it

For developer

  • If you are using Intel Core then you can use Ubuntu.

  • Else if you are using Ryzen Core then you can use Debian (because Ryzen has no wifi driver 😐).

  • You can follow this docs.

  • After running gclient sync, you can set chromium version.

    git checkout tags/120.0.6076.4
    gclient sync
    
  • And config out/$abi/args.gn like this:

    # Set build arguments here. See gn help buildargs.
    
    target_os = "android"
    target_cpu = "arm64"
    
    symbol_level = 0
    blink_symbol_level = 0
    v8_symbol_level = 0
    
    is_debug = false
    is_java_debug = false
    is_clang = true
    fatal_linker_warnings = false
    treat_warnings_as_errors = false
    
    clang_use_chrome_plugins = false
    
    enable_nacl = false
    enable_iterator_debugging = false
    enable_remoting = false
    
    use_thin_lto = true
    use_debug_fission = false
    
    dcheck_always_on = false
    update_android_aar_prebuilts = true
    proprietary_codecs = true
    ffmpeg_branding = "Chrome"
    
  • You can find the available target_cpu information in this link.

  • Then open terminal and cd chromium/src then run autoninja -C out/$abi -j11 webview_instrumentation_apk to start build.

  • Note:

    • $abi can be any name you prefer when running gn gen out/$abi, it's just the folder name.
    • The option -j11 means that only use 11 / 12 threads because nobody wants their PC running at 100% CPU usage, yet?
    • Also, you'll need approximately 30GB of RAM for a successful build if you want to avoid it being terminated due to running out of RAM.
  • After build successfully, you can run tools/blind_copy.py to copy resources like shared object or layout, style, image, ...

  • Then run tools/path2java.py to take only necessary Java files.

References