(This is a merge of http://go/wvgerrit/70343) Instead of using the POSIX-specific getopt(), this uses a manual string comparison so it works on Windows. Test: Android Unit Tests Bug: 122953649 Change-Id: If009f8b3bfc8581d252da0f5ed55293c46d70bc6