Android Cross Compile environment
I took my Android ports build environment and turned it into a docker image.
To download it (should be around 2.3GB), install docker on Linux and then run:
# docker pull ddrown/android-cross-compile Pulling repository ddrown/android-cross-compile c9c1ce340d35: Download complete 511136ea3c5a: Download complete 34e94e67e63a: Download complete 0c752394b855: Download complete dea657cfb317: Download complete a57744a66647: Download complete 6095c0e0dd30: Download complete 50238768c290: Download complete 7656d93d2e31: Download complete 452fe4b92a3c: Download complete 4fe616594f1b: Download complete
To use it (note: all changes are reverted, copy your work outside the VM before exiting)
# docker run -i -t --rm ddrown/android-cross-compile /home/admin/shell
An example session:
# (echo '#include <stdio.h>' ; echo 'int main() { printf("hello world\n"); }') >test.c # ARCH_NAME=arm agcc -pie -fPIE -o test-arm test.c # scp test-arm [webserver]:
And on the phone:
# cd /data/local/tmp # wget [webserver]/test-arm # chmod 755 test-arm # ./test-arm hello world
Sources: Dockerfile, puppet recipies