Clone of https://android.googlesource.com/a/platform/system/extras