I strongly recommend Settle GPU driver first if you are using dual GPU and one of them is Nvidia. Because one of my systems can’t be open again after following a set of processes for installing an Nvidia driver. As it said by Linus Torvalds: F**K YOU, NVIDIA! After you switched to the Nvidia driver, your OBS could work fluently.
This post from linuxconfig could help you install driver appropriately.
The trick is you need to switch into an old kernel (exp: 5.4.116). I even failed to install it on kernel 5.4.106_rt54-1.
cd ~ # install adb sudo pamac install android-tools, dpkg # install java sudo pacman -S jre8-openjdk-headless jre8-openjdk jdk8-openjdk openjdk8-doc openjdk8-src # Make invironment for some python library sudo pacman -S cmake source kivyven/bin/activate # enter the working directory then buildozer android debug deploy run
RAN: /run/media/karobben/Data/Kivy_env/Kivy2Py3.8.1MD0.104.2.dev0/.buildozer/android/platform/build-armeabi-v7a/build/other_builds/hostpython3/desktop/hostpython3/native-build/python3 setup.py build_ext -v
STDOUT:
Could not find platform independent libraries
Consider setting $PYTHONHOME to [:]
Python path configuration:
.
.
.
Python runtime state: core initialized
ModuleNotFoundError: No module named 'encodings'
STDOUT:
Traceback (most recent call last):
File "setup.py", line 20, in
from setuptools import Extension, setup
ModuleNotFoundError: No module named 'setuptools'
CMake Error at cmake/android/OpenCVDetectAndroidSDK.cmake:176 (message):
Android SDK Tools: OpenCV requires Android SDK Tools revision 14 or newer.
Use BUILD_ANDROID_PROJECTS=OFF to prepare Android project files without
building them
Call Stack (most recent call first):
CMakeLists.txt:780 (include)
The problem of building fail for opencv is the SDK tool was changes. But we could settle our own sdk too by setting android.sdk_path= in buildozer file.
[DEBUG]: -> running gradlew assembleDebug
[DEBUG]:
[DEBUG]: > Task :compileDebugJavaWithJavac
[DEBUG]: Note: Some input files use or override a deprecated API.
[DEBUG]: Note: Recompile with -Xlint:deprecation for details.
[DEBUG]: Note: Some input files use unchecked or unsafe operations.
[DEBUG]: Note: Recompile with -Xlint:unchecked for details.
[DEBUG]:
[DEBUG]: > Task :transformNativeLibsWithStripDebugSymbolForDebug
[DEBUG]: /home/karobben/.buildozer/android/platform/android-ndk-r19c/toolchains/arm-linux-androideabi-4.9/prebuilt/linux-x86_64/bin/arm-linux-androideabi-strip:/run/media/karobben/Data/Kivy2.0MD0.104.2.dP3.7.5/.buildozer/android/platform/build-armeabi-v7a/dists/opencvtest__armeabi-v7a/build/intermediates/transforms/mergeJniLibs/debug/0/lib/armeabi-v7a/gdb.setup: File format not recognized
[DEBUG]:
[DEBUG]: Unable to strip library '1' due to error /home/karobben/.buildozer/android/platform/android-ndk-r19c/toolchains/arm-linux-androideabi-4.9/prebuilt/linux-x86_64/bin/arm-linux-androideabi-strip returned from '/run/media/karobben/Data/Kivy2.0MD0.104.2.dP3.7.5/.buildozer/android/platform/build-armeabi-v7a/dists/opencvtest__armeabi-v7a/build/intermediates/transforms/mergeJniLibs/debug/0/lib/armeabi-v7a/gdb.setup', packaging it as is.
[DEBUG]:
[DEBUG]: Deprecated Gradle features were used in this build, making it incompatible with Gradle 7.0.
[DEBUG]: Use '--warning-mode all' to show the individual deprecation warnings.
[DEBUG]: See https://docs.gradle.org/6.4.1/userguide/command_line_interface.html#sec:command_line_warnings
[DEBUG]:
[DEBUG]: BUILD SUCCESSFUL in 5s
[DEBUG]: 27 actionable tasks: 27 executed
[INFO]: <- directory context /run/media/karobben/Data/Kivy2.0MD0.104.2.dP3.7.5/.buildozer/android/platform/python-for-android
[INFO]: Of the existing distributions, the following meet the given requirements:
[INFO]: opencvtest: min API 21, includes recipes (freetype, hostpython3, jpeg, libffi, librt, libshine, libx264, libxml2, openssl, png, sdl2_image, sdl2_mixer, sdl2_ttf, sqlite3, ffpyplayer_codecs, libxslt, python3, sdl2, cymunk, ffmpeg, setuptools, cppy, cython, decorator, ffpyplayer, lxml, pillow, six, zope_interface, kiwisolver, numpy, pyjnius, twisted, android, audiostream, kivy, matplotlib, , pygments, imageio, docutils, opencc-python-reimplemented, urllib3, plyer, constantly, plumbing, cycler, python-dateutil, idna, imageio_ffmpeg, pypinyin, biopython, pyparsing, https://github.com/kivymd/kivymd/archive/master.zip, certifi, chardet, tqdm, requests, moviepy, autopaths, incremental), built for archs (armeabi-v7a)
[INFO]: opencvtest has compatible recipes, using this one
[INFO]: # Copying android package to current directory
[INFO]: # Android package filename not found in build output. Guessing...
[INFO]: # Found android package file: /run/media/karobben/Data/Kivy2.0MD0.104.2.dP3.7.5/.buildozer/android/platform/build-armeabi-v7a/dists/opencvtest__armeabi-v7a/build/outputs/apk/debug/opencvtest__armeabi-v7a-debug.apk
[INFO]: # Add version number to android package
[INFO]: # Android package renamed to opencvtest__armeabi-v7a-debug-0.1-.apk
[DEBUG]: -> running cp /run/media/karobben/Data/Kivy2.0MD0.104.2.dP3.7.5/.buildozer/android/platform/build-armeabi-v7a/dists/opencvtest__armeabi-v7a/build/outputs/apk/debug/opencvtest__armeabi-v7a-debug.apk opencvtest__armeabi-v7a-debug-0.1-.apk
WARNING: Received a --sdk argument, but this argument is deprecated and does nothing.
No setup.py/pyproject.toml used, copying full private data into .apk.
Applying Java source code patches...
Applying patch: src/patches/SDLActivity.java.patch
# 1. Download [cmdlines-tools from google](https://developer.android.com/studio#cmdline-tools)
# 2. prepare the sdk by yourself # export the path you'd like to place it export PREFIX=/run/media/karobben/Data/Kivy2.0MD0.104.2.dP3.7.5 mkdir $PREFIX/.buildozer/android/platform/android-sdk cd$PREFIX/.buildozer/android/platform/android-sdk/