Merge "[automerge] Refactor and reuse some read device file logic 2p: cb8474d7b6" into sc-v2-dev-plus-aosp