Please help me, I have been searching for a solution for hours but couldn't find.
I want create a APK file and sign it using PHP. I read many posts here for this and all of them suggested to install SDK on server and use exec
or shell_exec
to build the project.
Well, that's pretty easy but how can I sign it using PHP? I use the keytool
`command for signing APK, but while signing it asks me for many details like my key passphrase, my name and my organization details. I don't know how to give this information when using PHP.
For an instance:
###SHELL###
$ keytool -genkey -v -keystore TestApp.keystore -alias TestApp -keyalg RSA -keysize 2048 -validity 10000
Enter passphrase: my passphrase here
Repeat the passphrase: my passphrase again
Enter your full name: my name
Enter your organization unit: my org. unit
Enter your organization name: my org. name
Enter password for keystore (press return for same as key passphrase): i press enter here
Success!!
$ _
How can I provide those details using PHP's shell_exec
function? Any help will be greatly appreciated.