there is a pretty old module doing same things as yours, but out of date lot of years. it called https://github.com/pylerSM/XInstaller . maybe you can use it as a reference of adding features. or considering porting it to newer version of android? since it have much more features than yours
Hello. Please add a signature comparison function. I request that you compare the established signature with the one attempting to be set. Please make sure that the installer indicates at least whether they are different or the same.