A good idea, but the problem is that the package manager service isn't running at that time. So this information would have to be parsed out of the AndroidManifest.xml manually. There is a PackageParser class, but it's quite complex. It could be considered, but it would have to be carefully tested to avoid unwanted side-effects. Keep in mind that this code runs before Android begins to start, and from past experiences I know that some classes on some ROMs should better not be used that early. Not sure if this would also be the case for PackageParser or its dependencies.
Tired of updating your mod for every new ROM release?
You want give users the possibility to combine different mods without creating tons of different files for all possible combinations?
Then have a look at my Xposed framework
- modifications without APK changes!