diff --git a/README.android b/README.android deleted file mode 100644 index a537c0eeee..0000000000 --- a/README.android +++ /dev/null @@ -1,60 +0,0 @@ -To build for Android the first thing to do is to read the README.md in -$KRITA_ROOT/3rdparty - -1) Set the neccessary environment variables -``` -KRITA_ROOT # project root directory -CMAKE_ANDROID_NDK -QT_ANDROID # example: /opt/Qt/5.12/android_armv7/ -ANDROID_API_LEVEL # example: 21 (I used 28) -ANDROID_SDK_ROOT -PY_INCLUDE_PATH # python3 includes directory usually /usr/includes/python3.5/ -PY_LIBRARY # python3 lib directory usually /usr/lib/python3.5/ -``` - -2) Create three directories in build root(BUILD_ROOT): `d, i, b` - -3) First we'll have to build kf5 dependencies which we use `kdesrc-build` -to do. So, run `$KRITA_ROOT/packaging/android/build_kf5.sh`. - - -4) `cd` to `$BUILD_ROOT/b` and run -```$KRITA_ROOT/packaging/android/build_ext.sh``` - -5) Now we have to build boost. -Run: -```$KRITA_ROOT/packaging/android/build_boost.sh``` -This should build without any errors. - -6) set `INSTALL_PREFIX` environment variable to install built binaries into -the directory. -(please create a new directory and use that as a location to install) -Then run `$KRITA_ROOT/packaging/android/configure_krita.sh` -```shell -$KRITA_ROOT/packaging/android/configure_krita.sh -``` - -7) If build is configured properly then run - -```shell -make -j5 -make install -``` - -ARM binary should be ready - -8) Now to create APK, run and sit back as gradle can be really slow -```shell -make create-apk -``` - -Now if `adb` is in your PATH then run `make install-apk-krita`, if it is not -in your `PATH` you can add it or use this: - -```shell -$ANDROID_SDK_ROOT/platform-tools/adb install -d -r krita_build_apk/build/outputs/apk/debug/krita_build_apk-debug.apk - -``` - -Now if the app crashes you can use `logcat`, to see the trace. - diff --git a/README.android.md b/README.android.md new file mode 100644 index 0000000000..6aa4fbf5a8 --- /dev/null +++ b/README.android.md @@ -0,0 +1,57 @@ +# Building Krita for Android + +First of all, I use linux to do my builds and testing. Although, +they _should_ work on Windows/macOS, I cannott give any guarentee +that it will. + +## Setting up Android SDK and NDK + +We right now use android ndk version `r18b` to do our builds. So, +I would recommend to use that. Download it from [google's website](https://developer.android.com/ndk/downloads/older_releases.html) +then extract it. + +Next, Android SDK. You can either download Android Studio or just +the `sdk-tools`. Both could be downloaded from [googl'e website](https://developer.android.com/studio). + +If you downloaded Android Studio then open sdk manager and download +`Android SDK Build-Tools`. +(more info: https://developer.android.com/studio/intro/update#sdk-manager) + +If you download just `sdk-tools`, then, extract it and run: + +```shell +cd /tools/bin +./sdkmanager --licenses +./sdkmanager platform-tools +./sdkmanager "platforms;android-21" +./sdkmanager "build-tools;28.0.2" +``` + +If you get some `ClasNotFoundException` it might be because `java` +version is set to `11`. For `sdkmanager` to work, set it to `8` and +then run it again. + +That's the only dependency we have to manage manually! + +## Building Krita + +Now, to build krita, run `/packaging/android/androidbuild.sh --help` +and pass the required arguments. + +Example: + +```shell +./androidbuild.sh -p=all --src=/home/sh_zam/workspace/krita --build-type=Debug --build-root=/home/sh_zam/workspace/build-krita-android --ndk-path=/home/sh_zam/Android/Sdk/ndk-bundle --sdk-path=/home/sh_zam/Android/Sdk --api-level=21 --android-abi=armeabi-v7a +``` + +That's all! + +## Installing Krita APK + +To install run `adb install -d -r /krita_build_apk/build/outputs/apk/debug/krita_build_apk-debug.apk`. + +`adb` should be in `/platform-tools/` + +## Crash + +If Krita crashes you can look up the logs using `adb logcat`