I have implemented that method in my pr about pre-installed apps in collections in build time

https://github.com/mozilla-b2g/gaia/pull/12439/files#L6R88

Maybe you could land it before so you have it for free