When trying to build the Magisk tool (https://github.com/topjohnwu/Magisk), I encountered these errors during the build process
mv target/x86_64-linux-android/debug/libmagisk.a -> ../../native/out/x86_64/libmagisk-rs.a
Android NDK: ERROR:jni/Android.mk:boot-rs: LOCAL_SRC_FILES points to a missing file
Android NDK: Check that jni/../out/armeabi-v7a/libmagiskboot-rs.a exists or that its path is correct
Are there any settings I need to change?
Related
Ubuntu only finds ANDROID_HOME when not running with sudo. When sudo is used, it does not find the installation. Please help!
administrator#administrator-System:~/ap_ids/app$ cordova requirements
Requirements check results for android:
Java JDK: installed 1.8.0
Android SDK: installed true
Android target: installed android-29,android-28
Gradle: installed /home/administrator/gradle-6.4.1/bin/gradle
administrator#administrator-System:~/ap_ids/app$ sudo cordova requirements
Requirements check results for android:
Java JDK: installed 1.8.0
Android SDK: not installed
Failed to find 'ANDROID_HOME' environment variable. Try setting it manually.
Failed to find 'android' command in your 'PATH'. Try update your 'PATH' to include path to valid SDK directory.
Android target: not installed
android: Command failed with exit code ENOENT
Gradle: not installed
Could not find gradle wrapper within Android SDK. Could not find Android SDK directory.
Might need to install Android SDK or set up 'ANDROID_HOME' env variable.
Some of requirements check failed
Global paths should be set at /etc/profile. So put your export ANDROID_PATH ... statement there.
But why would you want to run cordova in sudo?
Quoting:
Many Linux distributions support the Linux Standard Base /etc/profile.d directory where configurations such as additional paths directives can go without touching the stock system files.
cat >> /etc/profile.d/some_name.sh << \EOF
PATH=$PATH:/path_to_android/bin
EOF
I am pretty new to Qt (and linux for that matter), but need to build an Android app based on Qt with some basic bluetooth functionality. I have been able to build Qt for Android from source and develop a simple app, but QtBluetooth cannot be found.
Starting point:
Ubuntu 18.10 x64
Android NDK r18b
Android SDK (android-27)
OpenJDK v1.8.0_212
Qt 5.12.3
This is my configure command:
./configure -xplatform android-clang -android-ndk [path to NDK] -android-sdk [path to SDK] -android-ndk-host linux-x86_64 -android-toolchain-version 4.9 -no-warnings-are-errors -android-ndk-platform andoird-27 -opensource -confirm-license -v
The configure output shows that none of the Qt Bluetooth components are enabled, and that this is because
"None of [libbluetooth.so libbluetooth.a] could be found in [] and global paths."
"pkg-config use disabled globally"
This is really frustrating because I've installed those libraries: both of those files are in the /usr/lib/x86_65-linux-gnu/ directory! Also pkg-config is installed...
I have tried adding this path (/usr/lib/x86_64-linux-gnu/) to the configure command and copying these libraries into directories that I would have thought are already included, but these workarounds have been fruitless. I am using git to clean the submdodules and main directory between each attempt.
What am I missing?? It feels like this is sooo close to working.
How do you define the NDK installation that ndk-build uses? I used the r10e build for a good while, then updated my NDK and modified my $PATH to point to the new location, but when I build using the ndk-build command in Terminal it still uses the older android-ndk-r10e version.
I know this because I use the NDK_LOG=1 option when invoking ndk-build and it produces the following verbose information as it builds my project. Notice the references to "/NDKDev/android-ndk-r10e". That's my old installation.
~/Documents/MyNDKProject-- $ ndk-build NDK_LOG=1
HOST_OS=darwin
HOST_ARCH=x86_64
HOST_TAG=darwin-x86_64
GNUMAKE=/Users/user1/Documents/NDKDev/android-ndk-r10e/prebuilt/darwin-x86_64/bin/make (NDK prebuilt)
Android NDK: NDK installation path auto-detected: '/Users/user1/Documents/NDKDev/android-ndk-r10e'
Android NDK: GNU Make version 3.81 detected
Android NDK: Host OS was auto-detected: darwin
Android NDK: Host operating system detected: darwin
Android NDK: Host CPU was auto-detected: x86
Android NDK: HOST_TAG set to darwin-x86
Android NDK: Host tools prebuilt directory: /Users/user1/Documents/NDKDev/android-ndk-r10e/prebuilt/darwin-x86_64/bin
Android NDK: Host 'echo' tool: echo
. . .
Also note that when I enter echo $PATH at the Terminal prompt it gives:
/opt/local/bin:/opt/local/sbin:/usr/bin:/bin:/usr/sbin/:/sbin:/usr/local/bin:/Applications/android-sdk-macosx/ndk-bundle:/Applications/android-sdk-macosx
and where you see /Applications/android-sdk-macosx/ndk-bundle is exactly where it used to refer to the android-ndk-r10e path, so I'm certain I've updated my PATH successfully. So anyhow, IF the PATH environment variable is not what ndk-build uses to determine the NDK installation to use, what does it use, and how can I modify it so that it uses my new installation which is at:
/Applications/android-sdk-macosx/ndk-bundle
Fixed. The problem was that when the .bash_profile file is successfully sourced in a given Terminal session it does not have any effect on other instances of Terminal that are open. I had two instances of Terminal open and because I hadn't closed the one with which I was calling ndk-build the changes to .bash_profile weren't being applied.
I tried to make a standalone Android NDK toolchain on Linux 64 bit:
~/build/android-ndk-r9/build/tools $ ./make-standalone-toolchain.sh --platform=android-14 --ndk-dir=/home/user/build/android-ndk-r9 --system=linux-x86_64 --install-dir=/home/user/build/android-14-toolchain
Auto-config: --toolchain=arm-linux-androideabi-4.6
Copying prebuilt binaries...
No files are actually copied. Something goes wrong. The NDK ist the latest release r9.
How can I run the script so that the files get copied to the installation directory?
A suggestion: Use the --verbose option if you haven't already done so; it will tell you in which stage the error occurs.
Here are the options I ran to make a standalone toolchain targeting android-14 and arm-linux-androideabi-4.7
sudo sh make-standalone-toolchain.sh --verbose --toolchain=x86-4.7\
--install-dir=/project/arm-cc --ndk-dir=/project/android/ndk/android-ndk-r9\
--platform=android-14
I am using Ubuntu 11.10 (x64), Using android NDK I am trying to build the stand alone tool chain using the following command line:
/%Some path%/android-ndk-r7b/build/tools/make-standalone-toolchain.sh' --platform=android-9 --install-dir=/%Some path%/Android/stand-aloone-toolchain
while trying to execute any of the resulting files, eg. './arm-linux-androideabi-gcc' I get 'bash: ./arm-linux-androideabi-gcc: No such file or directory'.
I have verified that the file has execute permissions, I have also verified it is a linux executable while checking that it starts with the 'ELF' notation...
Why my generated tool chain doesn't work, why do I get 'No such file or directory' while directly executing './arm-linux-androideabi-gcc' from it's local dir. ?
I am using Ubuntu (x64), it appears that the OS doesn't include the libc & libz x32 version by default, installing libc6-i386 & lib32z1 resolved the problem..