在android上构建chrome最新版本

 真相一个 发布于 2023-02-12 23:09

我必须为Android构建最新版本的chrome浏览器.我正在使用以下步骤,

    创建一个Chromium根目录mkdir chromium; cd铬

    下载并导出depot_tools的PATH

       export PATH=$PATH:~/path/to/depot_tools/
    

    检查了构建32.0.1665.2的源代码

    gclient config https://src.chromium.org/chrome/releases/32.0.1665.2

4上面的命令在chrome根目录下创建一个.gclient文件,并在.gclient中添加目标android.

          target_os = ['android']

    要下载初始代码:

          gclient sync
    

    安装依赖项

      6.1) cd /path/to/chromium/src
    
      6.2) ./build/install-build-deps.sh
    

    gclient runhooks调用GYP来生成特定于平台的文件.这应该给你一个完整的源代码树gclient runhooks

编译:

要构建ARM Android内容shell:

1)cd/path/to/chromium/src

2).建立/安卓/ envsetup.sh

3)android_gyp

4)ninja -C out/Release -j10 content_shell_apk

按照上面的命令后,我得到的是版本为chrome/19.77.34.5的content_shell.apk,我正在使用链接http://whatsmyuseragent.com查看chrome的版本,请帮我构建chrome 最新版本(32.0. 1665.2)在android上

1 个回答
  • Content shell does not display correct user agent version in android as well as linux (right now content_shell displays chrome/19.77.34.5).

    This seems to be deliberate from src/content/content_shell.gypi

      'variables': {
    'content_shell_product_name': 'Content Shell',
    # The "19" is so that sites that sniff for version think that this is
    # something reasonably current; the "77.34.5" is a hint that this isn't a
    # standard Chrome.
    'content_shell_version': '**19.77.34.5**',
    

    You can always use chromium_testshell which will give correct version (which is currently Chrome/35.0.1879.0).

    2023-02-12 23:23 回答
撰写答案
今天,你开发时遇到什么问题呢?
立即提问
热门标签
PHP1.CN | 中国最专业的PHP中文社区 | PNG素材下载 | DevBox开发工具箱 | json解析格式化 |PHP资讯 | PHP教程 | 数据库技术 | 服务器技术 | 前端开发技术 | PHP框架 | 开发工具 | 在线工具
Copyright © 1998 - 2020 PHP1.CN. All Rights Reserved 京公网安备 11010802041100号 | 京ICP备19059560号-4 | PHP1.CN 第一PHP社区 版权所有