Bring install-time code inline with AOSP.