I have created an application which uses interfaces and classes as well as permissions from the hidden API. Now I would like to create a flashable zip file which installs the apk as system app. If I'm right for this I have to sign the apk file with the certificate of the current ROM (because of the hidden API usage).
To be as systemless as possible I thought it would be great to extract the certificate from the ROM and sign the apk within the flash process before copying it to the internal storage. Is this possible?
Or have I misunderstood something and it is much easier as I think?