GitHub: https://github.com/JackyAndroid
掘金: https://gold.xitu.io/user/562dc7cc60b20fc9817962a2
![]()
如果使用的是AndroidStudio 2.0以上版本且开启instant run功能,建议关闭后再进行调试(instant run会修改首先启动的Application导致chrome provider context 引用错误导致crash)


参考官方及其他教程编译通过chromium源码,并能生成chrome.apk
使用AndroidStudio开发环境调试Chromium Android UI层。
因为命名空间的原因,比如content模块的资源的命名空间为org.chromium.content, chrome模块的资源的命名空间为 org.chromium.chrome,所以需要建立不同的Android library project, 指定不同的包名。
app/libs ----------- chromium/src/out/gnbuild/lib.java
app/src/main/aidl ----------- chromium/src/chrome/android/java/src/android/support/customtabs/*.aidl
app/src/main/assets ----------- chromium/src/out/gnbuild/
app/src/main/java ------------ chromium/src/chrome/android/java/src
app/src/main/jniLibs ----------- chromium/src/out/gnbuild/
app/src/main/res(app module 初始化资源)
libraries/androidmedia_res ----------- chromium/src/third_party/android_media/java/res
libraries/chrome_res ----------- chromium/src/chrome/android/java/res && chromium/src/chrome/android/java/res_chromium
libraries/content_res ----------- chromium/src/content/public/android/java/res
libraries/datausagechart_res --------- chromium/src/third_party/android_data_chart/java/res
libraries/ui_res ---------- chromium/src/ui/android/java/res
本项目灵感来自于365browser
Copyright 2016 Jacky Wang<jacky.android@foxmail.com>
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
$ claude mcp add AndroidChromium \
-- python -m otcore.mcp_server <graph>