Refactor argument parsing in ota preopt am: 315d1f5438 am: 1c4e789655
am: 8f02a1fbc6  -s ours

Change-Id: If7a02f72ad79eed1c6500c8d85c430caecc192d7