crossystem: Updated crossystem to accomodate Android

Previously crossystem assumed that mosys was located
in /usr/sbin.  In Android mosys is currently located
in /system/bin.  Using fixed paths as opposed to
'which' to prevent attacks where attacker could insert
mosys in PATH.

difference from previous commit:
  Removed the allocation of duplicate arrays.  Kept
  with simplicity of original version, just returning
  correct constant depending on detected platform.

TEST=ran crossystem, crossystem fw_try_count/
fw_try_next, crossystem fw_try_count/fw_try_next=x
on smaug and daisy.

Change-Id: I923206db1411a9a35c9c8e3f9ede5016f49b5f26
Signed-off-by: Shelley Chen <>
Reviewed-by: danny chan <>
1 file changed