Re: building for Android
Posted: Thu Apr 20, 2017 9:08 pm
/data/local seems to not be accessible on my phone.
--Jon
--Jon
I am sorry. This worked on my phone that does not have root, maybe the rom is pre-rooted.jdart wrote:/data/local seems to not be accessible on my phone.
--Jon
Code: Select all
# ./arasanx-ab
Arasan 20.0-ab Copyright 1994-2017 by Jon Dart. All Rights Reserved.
uci
id name Arasan 20.0-ab
id author Jon Dart
option name Hash type spin default 32 min 4 max 2000
option name Ponder type check default true
option name MultiPV type spin default 1 min 1 max 10
option name OwnBook type check default true
option name Book selectivity type spin default 50 min 0 max 100
option name Threads type spin default 1 min 1 max 64
option name UCI_LimitStrength type check default false
option name UCI_Elo type spin default 2600 min 1000 max 2600
uciok
go
info multipv 1 depth 1 score cp 58 time 0 nodes 0 hashfull 0 pv e2e3
info multipv 1 depth 1 score cp 58 time 1 nodes 21 hashfull 0 pv e2e3
info multipv 1 depth 2 score cp 0 time 6 nodes 467 hashfull 0 pv e2e3 e7e6
info multipv 1 depth 3 score cp 54 time 11 nodes 1045 hashfull 0 pv e2e3 d7d5 b1c3
info multipv 1 depth 3 score cp 54 time 11 nodes 1045 hashfull 0 pv e2e3 d7d5 b1c3
bestmove e2e3 ponder d7d5
I know this thread is a bit dated, but there's a gotcha: the PIE position independent code is required from Android 5.0, but it is only supported from API level 16 onwards. Generating the toolchain with API level 9 is likely not to work.jdart wrote:I downloaded the NDK and followed the instructions to set up a standalone toolchain. I used this command:
$NDK/build/tools/make_standalone_toolchain.py --install-dir=/home/jdart/chess/chess/android-toolchain-clang --arch arm --api 9 --stl=libc++
I'm not familiar with C++ and its implications for Android; however, my C-engine works under PC-Linux, and from there, it was easy to get an Android build done. In fact so easy that I managed to do it although I don't even own an Android device.jdart wrote:Thanks for the hint. I am going to revisit this eventually.