You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Further tidy on Android instructions README.md (#7077)
* Further tidy on Android instructions README.md
Fixed some logic when following readme direction
* Clean up redundent information
A new user arriving will see simple directions on llama.cpp homepage
* corrected puncuation
Period after cmake, colon after termux
* re-word for clarity
method seems to be more correct, instead of alternative in this context
* Organized required packages per build type
building llama.cpp with NDK on a pc doesn't require installing clang, cmake, git, or wget in termux.
* README.md
corrected title
* fix trailing whitespace
Copy file name to clipboardExpand all lines: README.md
+18-23Lines changed: 18 additions & 23 deletions
Original file line number
Diff line number
Diff line change
@@ -936,25 +936,35 @@ If your issue is with model generation quality, then please at least scan the fo
936
936
937
937
### Android
938
938
939
-
#### Building the Project using Android NDK
940
-
You can easily run `llama.cpp` on Android device with [termux](https://termux.dev/).
939
+
#### Build on Android using Termux
940
+
[Termux](https://github.com/termux/termux-app#installation) is a method to execute `llama.cpp` on an Android device (no root required).
941
+
```
942
+
apt update && apt upgrade -y
943
+
apt install git make cmake
944
+
```
941
945
942
-
First, install the essential packages for termux:
946
+
It's recommended to move your model inside the `~/` directoryforbest performance:
943
947
```
944
-
pkg install clang wget git cmake
948
+
cd storage/downloads
949
+
mv model.gguf ~/
945
950
```
946
-
Second, obtain the [Android NDK](https://developer.android.com/ndk) and then build with CMake:
947
951
948
-
You can execute the following commands on your computer to avoid downloading the NDK to your mobile. Of course, you can also do this in Termux.
952
+
[Get the code](https://github.com/ggerganov/llama.cpp#get-the-code) & [follow the Linux build instructions](https://github.com/ggerganov/llama.cpp#build) to build `llama.cpp`.
953
+
954
+
#### Building the Project using Android NDK
955
+
Obtain the [Android NDK](https://developer.android.com/ndk) and then build with CMake.
949
956
957
+
Execute the following commands on your computer to avoid downloading the NDK to your mobile. Alternatively, you can also do this in Termux:
Install [termux](https://termux.dev/) on your device and run `termux-setup-storage` to get access to your SD card.
965
+
966
+
Install [termux](https://github.com/termux/termux-app#installation) on your device and run `termux-setup-storage` to get access to your SD card (if Android 11+ then run the command twice).
967
+
958
968
Finally, copy these built `llama` binaries and the model file to your device storage. Because the file permissions in the Android sdcard cannot be changed, you can copy the executable files to the `/data/data/com.termux/files/home/bin` path, and then execute the following commands in Termux to add executable permission:
959
969
960
970
(Assumed that you have pushed the built executable files to the /sdcard/llama.cpp/bin path using `adb push`)
0 commit comments