3

I have a scenario open a web link in incognito tab in chrome browser. I am using adb command to open chrome and navigate to specific URL i.e adb shell am start -n com.android.chrome/com.google.android.apps.chrome.Main -d weburl .

Is there any way to open link directly in incognito mode through adb?

Chandrashekhar Swami
  • 1,742
  • 23
  • 39
  • Please note: the [[tag:google-chrome-app]] tag is not for Chrome itself. – Xan Feb 04 '16 at 14:09
  • Looking at the [ADB command list](http://developer.android.com/tools/help/adb.html) and [ADB Shell Commands](http://developer.android.com/tools/help/shell.html#shellcommands), there isn't any command that enables you to open a weburl in incognito mode. – gerardnimo Feb 04 '16 at 15:49

3 Answers3

2

Try this! it will work.

adb shell am start -n com.android.chrome/org.chromium.chrome.browser.incognito.IncognitoTabLauncher
Saeed All Gharaee
  • 1,546
  • 1
  • 14
  • 27
1

I could not find any way using adb commands. But using ChromeOptions it is possible if we add "--incognito" argument.

Chandrashekhar Swami
  • 1,742
  • 23
  • 39
-1

You can launch chrome in incognito mode with the -incognito flag. I am not sure if this will work through ADB, however.

dzylich
  • 346
  • 1
  • 14
  • 1
    Android apps are not launched from scratch like those in other operating systems, instead a request is sent to a system daemon which forks off a copy of itself and loads the app code as a library. Because there is no invocation, there is no (app-specific) command line to pass this argument on. – Chris Stratton Jun 13 '16 at 06:14