We need something similar to this done, server side.
[login to view URL]
We are looking to automatically create APK with the build information for debugging purposes.
Apk's are just securely signed zips, and must be created with the Java tools provided by the android platform.
In the apk there is a [login to view URL] with a version number as an XML attribute e.g. :
android:versionName="1.0"
that needs to be updated via the php/python script with the current server timestamp (in milliseconds since 1907) of the build. e.g. :
android:versionName="1.0.123412341234134"
A python or php file should be able to call (e.g. via exec) the Ant build script to package the signed apk.
At the end the script should call a another script to let it know that it's done, and upload the finished apk to a folder.