Install build tools on arm64 doesn't work - android

I've been trying to install sdkmanager "build-tools;30.0.2" on an arm64 processor (ampere CPU).
But every time I get this:
Warning: Dependant package with key emulator not found!
Warning: Unable to compute a complete list of dependencies.
I'm trying to build an app and I get this error:
Failed to install the following SDK components:
build-tools;30.0.2 Android SDK Build-Tools 30.0.2
Edit: I think the problem is the package emulator isn't available. I tried downloading it from here but sdkmanager didn't recognize it.

(Assumption: CMD Line Tools are installed)
SDK manager package "emulator" is missing on ARM
Workaround:
Download emulator from Google for Linux: https://developer.android.com/studio/emulator_archive
Extract it to $ANDROID_SDK_HOME/emulator
You need a license file called "package.xml" which is automatically created when you download it via Android Studio UI SDK Manager, you copy that file to $ANDROID_SDK_HOME/emulator and change all version numbers related to the version you have downloaded:
... <revision><major>31</major><minor>1</minor><micro>4</micro></revision>...

I was able to install build-tools using sdkmanager on arm64 by copying to the sdk dir emulator from
https://chromium.googlesource.com/android_tools/+/refs/heads/main/sdk/emulator/
Unfortunately the installed packages seem to be not compiled for arm64 and are not working.

Anybody help to cross compile emulator for arm64 ?
https://developer.android.com/studio/releases/emulator
Emulator for ARM64 hosts
Linux emulator source code now supports cross compilation from x86_64 to arm64 hosts, enabling running arm64 system images with KVM virtualization. Currently, only -gpu swiftshader_indirect (Swiftshader arm64 host rendering) is supported, but a compatible set of host GPU libEGL/libGLESv2 libraries may also be used by replacing lib64/gles_swiftshader with them and then relaunching with -gpu swiftshader_indirect. Snapshots may also not be working (add -no-snapshot to the command line).
Instructions:
cd emu
repo init -u https://android.googlesource.com/platform/manifest -b emu-master-dev --depth=1
repo sync -qcj 12
cd external/qemu
pip install absl-py
pip install urlfetch
sudo apt-get install crossbuild-essential-arm64
python android/build/python/cmake.py --noqtwebengine --noshowprefixforinfo --target linux_aarch64
Anybody try this one ?
I got error and unable install one toolm

Related

How to run the Android Emulator with Cordova?

Prerequisite
Android SDK is well installed (directory : /Users/gamecube/Library/Android/sdk)
How to reproduce :
Run this command : cordova build android
Run this command to launch android emulator : cordova emulate android --verbose
Expected result
The emulator is launched.
Obtained result
Command finished with error code 0: /Users/gamecube/Desktop/geocars/platforms/android/gradlew cdvBuildDebug,-b,/Users/gamecube/Desktop/geocars/platforms/android/build.gradle
Built the following apk(s):
/Users/gamecube/Desktop/geocars/platforms/android/app/build/outputs/apk/debug/app-debug.apk
No scripts found for hook "before_deploy".
Checking Java JDK and Android SDK versions
ANDROID_SDK_ROOT=undefined (recommended setting)
ANDROID_HOME=/Users/gamecube/Library/Android/sdk (DEPRECATED)
Running command: adb devices
Command finished with error code 0: adb devices
Could not find either `android` or `avdmanager` on your $PATH! Are you sure the Android SDK is installed and available?
CordovaError: Could not find either `android` or `avdmanager` on your $PATH! Are you sure the Android SDK is installed and available?
at /Users/gamecube/Desktop/geocars/platforms/android/cordova/lib/emulator.js:176:35
at processTicksAndRejections (internal/process/task_queues.js:97:5)
My questions
Why Android Emulator does not work?
and
Why is there this error? :
CordovaError: Could not find either `android` or `avdmanager` on your $PATH! Are you sure the Android SDK is installed and available?
I solved my problem.
How did I do it?
I opened Android Studio, and went to the SDK Manager.
I clicked on the SDK Tools tab, and in the list displayed, I checked: Android SDK Command-line Tools (latest)
I then clicked on Apply (then OK on the pop-up) to download the package in question.
I added the path of avdmanager to PATH in my .bash_profile
I have run source ~ / .bash_profile to refresh
And I launched my command: cordova emulate android --verbose successfully since the emulator has opened well.
Without Android Studio, merely with Android Command Line Tools from Android SDK. Be sure these Android Command Line Tools (such as sdkmanager or avdmanager) are in the PATH, otherwise run them using the full path (for Debian/Ubuntu see this to install Android SDK).
Install the emulador
sdkmanager --install "emulator"
Install the platforms, example for Android API 32 and 33 (Android 12 and 13 respectively):
sdkmanager --install "system-images;android-32;google_apis;x86_64"
sdkmanager --install "system-images;android-33;google_apis;x86_64"
Create the Android Virtual Device (AVD), example:
avdmanager create avd -n emulator32 -k "system-images;android-32;google_apis;x86_64"
Confirm that was installed
avdmanager list avd
Run
cordova emulate android --target=emulator32

How to install SDK manager on linux ubuntu 16.04?

I was trying to install Android SDK with the help of the SDK command line tools downloaded from the link https://dl.google.com/android/repository/sdk-tools-linux-3859397.zip
on my Linux Ubuntu 16.04 PC.
i run the command following command for installation
./android update sdk
but the installation has stopped and gave the following message on terminal
------------------------------------------------------------------------------------------------------------------------------------
The "android" command is deprecated.
For manual SDK, AVD, and project management, please use Android Studio.
For command-line tools, use tools/bin/sdkmanager and tools/bin/avdmanager
"android" SDK commands can be translated to sdkmanager commands on a best-effort basis.
Continue? (This prompt can be suppressed with the--use-sdk-wrapper command-line argument or by setting the USE_SDK_WRAPPER environment variable) [y/N]: y
Running /home/user/Android/Sdk/bin/sdkmanager --update
Warning: java.net.SocketException: Connection reset
Warning: Failed to download any source lists!
Done
-----------------------------------------------------------------------------------------------------------------------------------
how to solve this error.or suggest me a way to install android sdk on my linux pc without installing android studio.
A bit late, but in the same situation. It looks like this isn't an error, but the way the tools evolved: they are pushing users to use Android Studio if they want the GUI for the sdk manager, it's usable only from the IDE.
You still have the command line available at bin/sdkmanager in this folder from the download, and instructions can be found here, but they are not great, either, so I'll share what I did:
downloaded the latest compressed file from this page (link way down there)
unzipped somewhere (I chose /opt/Android/android-sdk)
created a symlink to add sdkmanager to my path (ln -s /opt/Android/android-tools/bin/sdkmanager ~/.local/bin/sdkmanager)
installed platform tools and build tools for kitkat and up using sdkmanager "platform-tools" "platforms;android-19" "build-tools;19.1.0" (sudo may be needed)
You can check the versions available using sdkmanager --list, and figure what you need to support and download tools for other versions. The download will not show any kind of progress, it'll only tell you it's done after a while.
I suppose it's not a big deal to keep Android Studio installed solely to have access to the sdk manager GUI, but I'll make do with the command line tools. That's very shady of Google, specially to people not really into their hacked up Intellij version.

Run android emulator on headless linux machine

I am trying to run android emulator on my linux headless machine. I install android sdk, required platofrms and so on. I already created android avd using following command
android create avd -n TestDevice4.4.2 -t 17 ( 17 is id of from targets list )
Now i try to start emulator by following command
emulator -avd TestDevice4.4.2 -no-skin -no-window
And i got the following error on my terminal.
/home/ubuntu/sdk-android/tools/emulator64-arm: error while loading
shared libraries: libGL.so.1: cannot open shared object file: No such
file or directory
Since it is the first time setting up from termial in headless linux machine, i faced several issues. I can't figure out what's going on with this one. Appreciate your help :-)
EDITED
I've seen similar issues here. I had to install following library and create symbolink in sdk/tools/lib dir.
sudo apt-get install libgl1-mesa-dev
ln -s /usr/lib/x86_64-linux-gnu/mesa/libGL.so.1.2.0 libGL.so
After done these steps, i start emulator again. i got following problem :-(
sh: 1: glxinfo: not found emulator:
ERROR: This AVD's configuration is
missing a kernel file!! emulator: ERROR: ANDROID_SDK_ROOT is undefined
For each version of Android you want to run, install at least:
1) Platform SDK (eg 17 for 4.2 version)
2) A system image for the emulator (eg ARM EABI v7a System Image )
bye

Can i build Linphone in Android Studio on Mac?

I think we can build it. But I am getting error to build it on Android Studio. First I download the Android Studio and NDK. Then add the PATH of Android Studio and NDK to the PATH Variable. When I run
./check_tools.sh
I get the output
Could not find automake. Please install it.
Could not find autoconf. Please install it.
Could not find pkg-config. Please install it.
Could not find ant. Please install it.
Could not find yasm. Please install it.
Could not find wget. Please install it.
Could not find libtoolize. Please install libtool.
Invalid version of nasm: your version does not support elf32 output format. If you have installed nasm, please check that your PATH env variable is set correctly.
Failed to detect required tools, aborting.
But i doubt whether i need these tool on Android Studio or not. When I run the project i get the error
java.lang.UnsatisfiedLinkError: Couldn't load linphone-armeabi-v7a: findLibrary returned null.
Can anybody tell me the solution for that.
Yes you can do this
follow the step by step guide at this blog
How to build culinphone on Android Studio using Mac OS X?
http://culinphone.wordpress.com
Here is a step to step guide.
Setup Linphone Sdk on Mac OS X
How to build Linphone in Android Studio on Mac?
Step by step guide :-
Required Knowledge :-
Android Tools
Android Studio
A little bit about mac-terminal(shell)
S/W Requirements:-
Mac OS-X with these tools (You definetely need these tools to build linphone) :-
coreutils, automake, autoconf, libtool, intltool, wget, pkgconfig ,cmake,
gmake, yasm, grep, doxygen, ImageMagick, optipng, antlr3
STEP 1:-
Concerning these useful tools you can install the tools with this command
$sudo port install coreutils automake autoconf libtool intltool wget pkgconfig cmake gmake yasm grep doxygen ImageMagick optipng antlr3
STEP 2:-
Check out these Instructions how to upgrade nasm
STEP 3:-
Then install ant by typing
brew update #update if already installed
brew install ant
If you haven’t installed brew just type command give below
its a medium size download which takes 5 mins to download
ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
Just follow the process which involves installing various components. If you already have brew installed, make sure it’s up to date by executing:
brew update
Once installed you can simply type:
brew install ant
STEP 4:-
Now its time to install libtool. To install libtool run the command given below
curl -OL http://ftpmirror.gnu.org/libtool/libtool-2.4.2.tar.gz
tar -xzf libtool-2.4.2.tar.gz
cd libtool-2.4.2
./configure && make && sudo make install
STEP 5:-
if you have not installed these programmes download and install
Download Android Studio & SDK
Download Android NDK
STEP 6:-
Download git repository of LInphone Android by running command
$ sudo git clone git://git.linphone.org/linphone-android.git –recursive
Now everything is configured perfectly
STEP 7:-
Open terminal and cd into linphone-android
Now when you get into the directory on terminal then check your PATH of SDK & NDK installed on your Mac run
$ echo $PATH
if you see the path with SDK and NDK location then it’s ok to proceed skip the below part and if not then you need to setup the PATH before you execute the make and make install script in
To setup path use:-
$export PATH=/Users/<yourusername>/android-sdks/platform-tools/:/Users//android-sdks/tools/:/Users//Documents/ndk/:/nobackup/local/prog/nasm/bin/:$PATH
it’s like export PATH=(Path of your SDK platform tools folder):(Path of your SDK tools folder):(Path of your NDK folder):$PATH
This will set up the path and to confirm again run
$ echo $PATH
Now if the Path is already setup you can simply run
$ make
Now connect your Device to you Mac and see if eclipse has detected it. After the device is connected run:
$ make install
Now if everythink is OK:-
After you have made your build then now you can import it into your Android Studio.
Open Android Studio
Import Project (Eclipse,ADT,Gradle,etc.) > select linphone-android > OK
I am able to build the limphone on mac by follow the steps describe here :-
Linphone for android is not working/missing libraries
You definetely need these tools to build linphone.
Concerning nasm I had the same problem. You can use this site that instructs you how to upgrade to a newer nasm:
Instructions how to upgrade nasm
Concerning other useful tools you can install the tools below with this command:
$sudo port install coreutils automake autoconf libtool intltool wget pkgconfig cmake gmake yasm grep doxygen ImageMagick optipng antlr3
All these are found in the linphone build instructions README.md file.

Qt Creator 2.8.1 doesn’t see samsung galaxy s4 on Ubuntu 13.10

Please, help with the following.
I'm trying to run example app with Qt 5.1.1 & Qt Creator 2.8.1 OS: (Ubuntu 13.10) on my Samsung galaxy s4 with Android 4.3.
But get error from Qt Creator: "cannot deploy:no device or emulator found for your package".
I tried using an emulator directly running it from SDK manager too, but got the same error.
adb sees devices:
"4d00050f7aa540c3 device // - samsung s4
emulator-5554 device"
I activated usb debugging on the telephone through developer options.
I also added udev rule and now when device's plugged in, file with mode 0777 is created in /dev/bus/usb. In file manager i can see the telephone and can enter its storages. I also get request to accept RSA key and click OK.
Project settings:
- API level 14 (also tried latest versions);
- gcc 4.6 (android for armv7);
If I missed some info, please ask. Thanks!
I was lucky to solve question: i'm using 64-bit version of Ubuntu, and installed appropriate android SDK Tools. But when i began to update it with "android" command line tool, it downloaded 32-bit versions of build-tools and platform-tools.
Therefore i added 32-bit architecture:
sudo apt-get install libc6-i386 lib32stdc++6 lib32gcc1 lib32ncurses5
sudo apt-get install lib32z1
Then i got some errors from ant and downgraded build-tools from 19.0 to 18.1.1 with "android" cmd tool.
And it works!

Categories

Resources