1

I am trying to open a URL in Google Chrome using adb command line. Have set "--no-first-run" using following command -

adb shell 'echo "chrome --no-first-run" > /data/local/tmp/chrome-command-line'

Have taken the command line switch from the following website - http://peter.sh/experiments/chromium-command-line-switches/

Then I execute the following commands,

adb -s TA99300UFC shell am set-debug-app com.android.chrome
adb -s TA99300UFC shell am start -n com.android.chrome/com.google.android.apps.chrome.Main -d 'http://wikipedia.org'

Still the "Welcome Page" shows up.

How can I skip this and go directly to the website URL passed in command?

  • 1
    Weird! I didn't need --no-first-run trick and am start -n com.android.chrome/com.google.android.apps.chrome.Main -d 'http://wikipedia.org' is working here perfectly for Chrome v46.0. See if changing the component name works. Replace com.google.android.apps.chrome.Main with org.chromium.chrome.browser.ChromeTabbedActivity or use "" instead of ''. Tell us the results. Use --activity-clear-task at the end, if necessary. – Firelord Oct 29 '15 at 14:34
  • 1
    Related: Open a new tab in chrome from a shortcut or app / Which Android version are you using? – Firelord Oct 29 '15 at 14:38
1

The problem was solved after the --persistent flag was added in the set-debug-app command.

So the command changed to adb -s TA99300UFC shell am set-debug-app --persistent com.android.chrome. After that chrome://version displayed chrome --display-fre under the Command line section.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.