Skip to content

Instantly share code, notes, and snippets.

@detunized
Created February 7, 2014 19:21
Show Gist options
  • Save detunized/8869882 to your computer and use it in GitHub Desktop.
Save detunized/8869882 to your computer and use it in GitHub Desktop.
Build and run a command line application on Android
#!/bin/sh
arm-linux-gnueabi-g++ -o yo -static main.cpp
adb push yo /storage/sdcard0/Android/data/
adb shell su -c "cd /storage/sdcard0/Android/data; cp yo /data/local/; rm yo; cd /data/local; chmod 751 yo; ./yo; rm yo"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment