For some security reasons I need to change apk file before user can download apk file. But when I change .apk content, my app cant be installed. Its need to be resigned.
So I want to know how do I resign it using only zip-open/read/write operations or something else using php.
The only way I see is to install sdk tools on server and work with them with shell command in php. But I want to know if there are more easy ways to do this
In all likelihood, that is your only option. Even if somehow PHP had a fully-functioning
jarsignerembedded in it, it is unlikely to also havezipalign.Note, though, that by “sdk tools”, you only really need the Java SDK (for
jarsigner) and thezipalignbinary (which, AFAIK, has no other dependencies). You should not need the entire Android SDK.