I am in the process of creating a program that will automate the packaging, signing and installing of an apk file.
I have 3 terminal commands listed below that I am unsure how to place into my Java program. This section of the program must be able to open a terminal, call these commands, and at one point allow the user to enter the password all from a Java IDE.
aapt package -u -f -F "/home/jay/testing_FILES.apk" "/home/jay/testing_FILES"
jarsigner -verbose -digestalg SHA1 -sigalg MD5withRSA -keystore my-release-key.keystore "/home/jay/testing_FILES.apk"
zipalign -f -v 4 "/home/jay/testing_FILES.apk" "/home/jay/filesystem.apk"
Does anyone know how to make these run through a JAVA IDE? Thanks.
Assuming that you can get the password through command line and somehow patch this as part of your command execution process, you can then call use
Runtime.exec()to call these functions from your java program. You can consult the javadoc to get more information on this optionThe other option is to use Plexus Utils. Have a look at this stackoverflow link