GithubHelp home page GithubHelp logo

ugreek / chromium-aw Goto Github PK

View Code? Open in Web Editor NEW

This project forked from ridi/chromium-aw

0.0 1.0 0.0 905.7 MB

Chromium based Android WebView engine to be embedded in Ridibooks-Android

License: BSD 3-Clause "New" or "Revised" License

Java 99.99% HTML 0.01% Python 0.01%

chromium-aw's Introduction

chromium-aw

Build Status

Chromium based Android WebView engine to be embedded in Ridibooks-Android

Getting started

This library is distributed by jitpack.

You should add jitpack maven repository to build.gradle file of your project.

repositories {
    ...
    maven { url 'https://jitpack.io' }
    ...
}

Then you can include this library by adding dependency script to build.gradle file of your project.

dependencies {
    ...
    compile 'com.github.ridi:chromium-aw:<version>'
    ...
}

IMPORTANT : Add following aaptOptions to prevent asset files being compressed.

android {
    ...
    aaptOptions {
        noCompress 'dat', 'pak'
    }
    ...
}

Chromium build information

Current version is based on 81.0.4044.156

Customizing

  • Unix domain socket name prefix for Devtools is changed. (Patch files are here.)

Build instructions

References

Environment install steps

  • A 64-bit Intel machine running Linux with at least 8GB of RAM. More than 16GB is highly recommended.
  • At least 100GB of free disk space.
  • You must have Git and Python installed already.
  • It takes about 2 hours.
  1. Clone depot_tools.
$ cd ~
$ git clone https://chromium.googlesource.com/chromium/tools/depot_tools.git

$ export PATH="$PATH:$HOME/depot_tools"
  1. Clone chromium.
$ mkdir ~/chromium && cd ~/chromium
$ fetch --nohooks android

$ cd src
$ gclient sync
  1. Iinstall additional build dependencies.
$ build/install-build-deps-android.sh

$ gclient runhooks
  1. [Optional] Install ccache.

Improves build speed by ccache when building multiple times.

$ sudo apt install ccache

$ export CCACHE_CPP2=yes
$ export CCACHE_SLOPPINESS=time_macros

$ sed -i -e 's/^max_size = 1.0G/max_size = 10.0G/g' ~/.ccache/ccache.conf
  1. [Optional] Install icecc.

Improves build speed by combine icecc with ccache.

$ sudo apt install icecc

$ mkdir -p /opt/ccache/bin
$ ln -s /usr/bin/ccache /opt/ccache/bin/gcc
$ ln -s /usr/bin/ccache /opt/ccache/bin/g++

$ export CCACHE_PREFIX=icecc
$ export ICECC_CLANG_REMOTE_CPP=1
$ export PATH=$PATH:/opt/ccache/bin

$ sudo sed -i -e 's/^ICECC_MAX_JOBS=""/ICECC_MAX_JOBS="$JOBS"/g' /etc/icecc/icecc.conf # CPU cores * 2 is recommended for $JOBS.
$ sudo service iceccd restart

Build steps

  1. Checkout.
$ cd ~/chromium/src

$ git checkout tags/$VERSION # ex) tags/81.0.4044.156

$ gclient sync
  1. Customizing.

Apply patch files.

  1. Generate target and build.

In this project $TARGET must be one of arm, arm64, x86, and x64.

$ gn gen --args='target_os="android" target_cpu="$TARGET" is_debug=false cc_wrapper="ccache" symbol_level=0 blink_symbol_level=0 enable_nacl=false use_debug_fission=false clang_use_chrome_plugins=false v8_use_external_startup_data=false' out/$TARGET

# It takes about 3 hours. (Intel i5-10400, RAM 16GB, WSL2, no-cache, local parallel build, x86 target)
$ ninja -C out/$TARGET webview_instrumentation_apk
  1. Copy build result and sources to chromium-aw.

IMPORTANT : It may be different depending on Chromium version.

$ node scripts/copy.js

Crash dump decoding instructions

References

Environment install steps

$ cd ~
$ mkdir breakpad && cd breakpad
$ fetch breakpad

$ cd src
$ ./configure && make

Decoding steps

  1. Generate symbols file.
$ cp ~/breakpad/src/src/tools/linux/dump_syms ~/chromium/src/out/$TARGET
$ sudo chmod +x ~/chromium/src/out/$TARGET/dump_syms

$ cd ~/chromium/src
$ components/crash/content/tools/generate_breakpad_symbols.py --build-dir=out/$TARGET --symbols-dir=/tmp/chromium --binary=out/$TARGET/lib.unstripped/libstandalonelibwebviewchromium.so --clear --verbose
  1. Decoding minidump file.
$ cp ~/breakpad/src/src/processor/minidump_stackwalk ~/chromium
$ sudo chmod +x ~/chromium/minidump_stackwalk

$ cd ~/chromium
$ ./minidump_stackwalk $DMP_FILE_PATH /tmp/chromium > /tmp/decoded_dmp_file.crash

License

See LICENSE file from Chromium project.

chromium-aw's People

Contributors

davinahn avatar freekering avatar

Watchers

James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.