Disabling web security for testing purposes on android

5,346 views
Skip to first unread message

Ayush Goel

unread,
May 9, 2019, 5:20:01 PM5/9/19
to Chromium-dev
I am using the following flags to disable CORS ( cross origin policy) : --disable-web-security --disable-features=IsolateOrigins,site-per-process --disable-site-isolation-trials
It seems to work perfectly fine on the desktop (linux) version of chrome, but when I provide the same flags to android version of chrome ( flags are passed through /data/local/chrome-command-line) on a rooted phone, it doesn't work. 
I can confirm that the flags are correctly passed by inspecting chrome://version. However, despite that, chrome on android throws the cross origin errors. 
Any help would be sincerely appreciated ,I have been struggling with this for quite some while.


Torne (Richard Coles)

unread,
May 9, 2019, 5:52:01 PM5/9/19
to Ayush Goel, Chromium-dev
This may not be the problem since you say it shows up in chrome://version, but if your device is rooted via an unofficial method (i.e. hacking it) instead of by installing a debug build of Android, then you need to enable chrome://flags#enable-command-line-on-non-rooted-devices to make it actually obey the command line file. By default the file is only read on userdebug/eng build of android.

--
--
Chromium Developers mailing list: chromi...@chromium.org
View archives, change email options, or unsubscribe:
http://groups.google.com/a/chromium.org/group/chromium-dev
---
You received this message because you are subscribed to the Google Groups "Chromium-dev" group.
To view this discussion on the web visit https://groups.google.com/a/chromium.org/d/msgid/chromium-dev/c0f75898-364f-4ae1-9812-70ae26dadf40%40chromium.org.

Ayush Goel

unread,
May 9, 2019, 6:07:49 PM5/9/19
to Chromium-dev, goe...@umich.edu
Yes the file is being correctly read, as I mentioned, the flags are being displayed at chrome://version. The problem is despite being read correctly, it is not working the way it is supposed to, ie unable to access cross origin data. 

Also, I did try what you suggested, with same outcome. 
Reply all
Reply to author
Forward
0 new messages