在Android上运行带有标志的Google-chrome [英] Run google-chrome with flags on Android

查看:165
本文介绍了在Android上运行带有标志的Google-chrome的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

Chromium(和Chrome)接受一些命令行标记(或开关")以启用特定功能或修改其他默认功能.

There are command line flags (or "switches") that Chromium (and Chrome) accept in order to enable particular features or modify otherwise default functionality.

Chromium命令行开关

使用标志运行Chromium

尝试使用以下产品的Chrome 41.0.xx和Chromium 43.0.xxx外壳:

Tried Chrome 41.0.xx and Chromium 43.0.xxx shell with:

# echo "chrome <flags>" > /data/local/tmp/android-webview-command-line
# echo "chrome <flags>" > /data/local/tmp/content-shell-command-line

任何想法如何在Android上运行带有标志的chrome或直接将其添加到默认配置文件中.

Any idea how to run chrome with flags on Android or directly add these into default profile.

要添加--sync-url标志以使用我的同步服务器而不是Google同步服务器. chrome://flags仅启用/禁用标志,但不允许您添加新标志.

Want to add --sync-url flag to use my sync server instead of google sync servers. chrome://flags only enable/disable flags but wont let you add new flag.

推荐答案

Chrome 66中添加了新方法 1 可以在无根设备上进行生产构建.

New method added in Chrome 661 that works for a production build on unrooted devices.

  1. 使用adb,将标志写入/data/local/tmp/chrome-command-line.

例如:

~$ adb shell 'echo --unsafely-treat-insecure-origin-as-secure=http://a.test > /data/local/tmp/chrome-command-line'

  • chrome://flags中,打开enable-command-line-on-non-rooted-devices.

  • In chrome://flags, turn on enable-command-line-on-non-rooted-devices.

    强制停止Chrome(即使重新启动危险按钮不同意,立即重新启动"按钮也不会触发标志文件的读取).

    Force stop Chrome (the relaunch now button will not trigger the reading of the flags file, even though the danger snackbar will disagree).

    chrome://version中验证它是否有效.

    https://www.chromium. org/developers/how-tos/run-chromium-with-flags#TOC-Android

    这篇关于在Android上运行带有标志的Google-chrome的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

  • 查看全文
    相关文章
    登录 关闭
    扫码关注1秒登录
    发送“验证码”获取 | 15天全站免登陆