qcom patcher: Add functions for use with mbtool