mirror of
git://git.code.sf.net/p/sbcl/sbcl
synced 2026-09-10 07:26:40 -04:00
Uses NDK as C crosscompiler and ADB to run code on the target device. Uses both :linux and :android features (android is almost a linux). It also reserves a folder android-libs/ for putting precompiled libraries to link agains (for example zstd for core compression). See doc/internals-notes/Android-build.txt for more details
14 lines
510 B
Bash
14 lines
510 B
Bash
android_run() {
|
|
adb push $1 /data/local/tmp/temp.out > /dev/null
|
|
adb shell chmod +x /data/local/tmp/temp.out > /dev/null
|
|
adb shell ./data/local/tmp/temp.out
|
|
adb shell rm /data/local/tmp/temp.out > /dev/null
|
|
}
|
|
|
|
android_run_for_exit_code() {
|
|
adb push $1 /data/local/tmp/$1 > /dev/null
|
|
adb shell chmod +x /data/local/tmp/$1 > /dev/null 2>&1
|
|
adb shell "echo input | ./data/local/tmp/$1 > /dev/null 2>&1 ; echo \"\$?\"" 2>/dev/null
|
|
adb shell rm /data/local/tmp/$1 > /dev/null 2>&1
|
|
}
|