Skip to content

Commit

Permalink
[docs] update the Android build guide to set up NDK
Browse files Browse the repository at this point in the history
Fixes issue: openthread#243
  • Loading branch information
wgtdkp committed Mar 27, 2024
1 parent 5eea3b0 commit cea55c9
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions android/BUILDING.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ This document describes how to build the OT Commissioner Android App.

- macOS or Linux computer.
- Install latest Android Studio from [here](https://developer.android.com/studio).
- Install Android NDK by following https://developer.android.com/studio/projects/install-ndk#default-version

## Bootstrap

Expand All @@ -21,9 +22,12 @@ The Commissioner Android App is built on top of the native OT Commissioner libra
ANDROID_ABI=arm64-v8a ANDROID_NDK_HOME=$HOME/Library/Android/sdk/ndk-bundle ./build-commissioner-libs.sh
```

This script creates a build directory (`.build-${ANDROID_ABI}`) in the current directory and copies generated libraries into target sub-folders in `openthread_commissioner`.
> Note:
>
> 1. you need to set env `ANDROID_ABI` to the ABI of your phone. This value can be got with command `adb shell getprop ro.product.cpu.abi` after connecting the phone to your computer.
> 2. you need to set `ANDROID_NDK_HOME` to your Android NDK directory. This is typically `$HOME/Android/sdk/ndk/xx.x.xxxxx` (where `xx.x.xxxxx` is the NDK version) on Linux and Mac OS or `$HOME/Library/Android/sdk/ndk-bundle` on older OS versions.
> Note: you need to set env `ANDROID_ABI` to the ABI of your phone. This value can be got with command `adb shell getprop ro.product.cpu.abi` after connecting the phone to your computer.
This script creates a build directory (`.build-${ANDROID_ABI}`) in the current directory and copies generated libraries into target sub-folders in `openthread_commissioner`.

## Build the App with Android Studio

Expand Down

0 comments on commit cea55c9

Please sign in to comment.