Android Auto, desktop head unit won't start - android

I develop and app with Android Auto capabilities. I have two computer, one under Windows with no problems and my other under Ubuntu 16.04 (where DHU won't start).
When I start the DHU, I got this message:
./desktop-head-unit: error while loading shared libraries: libSDL2_ttf-2.0.so.0: cannot open shared object file: No such file or directory
I don't know which package should I install to solve this problem...
Tkanks in advance!

You need to install libraries, open terminal, type in the command,
sudo apt-get install libsdl2-2.0-0 libsdl2-ttf-2.0-0 libportaudio2 libpng12-0
see details at https://developer.android.com/training/auto/testing/index.html

Related

How to use windows cmd commands in flutter code?

I need to start an exe on Windows from a flutter app build for Windows.
In the app, when "Avvia SedisRemoteController" is pressed, an exe installed on Windows should run.
Anyone knows how to do it with the code? The command for windows cmd is simply
"C:\Program Files (x86)\Sedis Remote Controller\SedisRemoteController.exe"
I founded a workaround: using
https://pub.dev/packages/open_file/example
Adding this
OpenFile.open("C:/Program Files (x86)/Sedis Remote Controller/SedisRemoteController.exe");

Android emulator no sound in ubuntu

I am running android emulator in ubuntu-19.10 and I have attempted following solutions with no results,
Link-1
Link-2
Link-3
Error,
1:10 PM Emulator: pulseaudio: pa_context_connect() failed
1:10 PM Emulator: pulseaudio: Reason: Connection refused
1:10 PM Emulator: pulseaudio: Failed to initialize PA contextaudio: Could not init `pa' audio driver
Some notes on solution I tried,
When trying Link-1 i don't see "Qemu-system" in settings. Also created many different versions of AVDs but does seem to work.
After trying Link-2 pulseaudio -D command errors out.
I have also tried Link-3 which looks like widely suggested solution in multiple blog posts. But still I find the same error on emulator startup. I would like to note that I am not smart enough understand this solution.
Thanks in advance for helping out.
Same problem in Ubuntu 20.04, with Android Studio installed from Ubuntu Software. Tried everything (paprefs, this), nothing worked. Uninstall Android Studio Snap and reinstall from tar package downloaded from Android Studio website, works perfect.
I was having a similar issue on Ubuntu 20.04 but I fixed it by uninstalling the store version of Android Studio and following the installation instructions on the Official Android Studio website here: https://developer.android.com/studio/install
If you are running a 64-bit version of Ubuntu, you need to install some 32-bit libraries with the following command:
sudo apt-get install libc6:i386 libncurses5:i386 libstdc++6:i386
lib32z1 libbz2-1.0:i386
To install Android Studio on Linux, proceed as follows:
Unpack the .zip file you downloaded to an appropriate location for your applications, such as within /usr/local/ for your user profile, or /opt/ for shared users.
If you're using a 64-bit version of Linux, make sure you first install the required libraries for 64-bit machines.
To launch Android Studio, open a terminal, navigate to the android-studio/bin/ directory, and execute studio.sh.
Select whether you want to import previous Android Studio settings or not, then click OK.
The Android Studio Setup Wizard guides you through the rest of the setup, which includes downloading Android SDK components that are required for development.
I had the same issue, runing Intellij on Ubuntu 20.04. I solved it by adapting a solution from this link
I run this:
sudo ln -s /run/user/1000/pulse/native /run/user/1000/snap.intellij-idea-community/pulse
If you're using Android studio, just try to find "snap.intellij-idea-community" will be named differently, referring to your android studio installation.
On Ubuntu, is possible open the emulator with terminal and change the sound in System Preferences. Works with the instant version of Android Studio. It works with the snap version of Android Studio.
First is needed to add the emulator command to the PATH.
This can be done by editing .bashrc or .zshrc. Preferably these lines should be placed at the end of the file.
export ANDROID_SDK_PATH=$HOME/Android/Sdk
export ANDROID_NDK_PATH=$HOME/Android/Sdk/ndk
export PATH="$PATH:$HOME/Android/Sdk/platform-tools"
export PATH="$PATH:$HOME/Android/Sdk/emulator"
The PATH variable needs to be reloaded. This can be done manually, as shown below, or simply by opening another terminal:
source ~/.bashrc
# OR
source ~/.zshrc
Another way is to add adb and android-sdk-platform-tools-common packages to have the emulator command available. Package names may vary depending on the Ubuntu version.
After that, the emulator command can be used to list available emulators:
emulator -list-avds
Example of output:
Pixel_4_API_30
Pixel_C_API_30
Then can be opened one of the available emulators:
emulator #Pixel_4_API_30
Finally, the emulator probably will appear at the System Preferences:
If this is a Snap it's got strict requirements as far as i/o; that said, if the requirements are similar to those of running Androidx86 using Vbox on Debian (I realize Qemu is a different environment, however, this may be of use for both Jbaba as well as future reference. Step one: make sure that you belong to the group Qemu (or the equivalent for Ubuntu/Snap?). Step two: make sure you belong to the group pulseaudio. Step three: make sure that Qemu is explicitly permitted to access whatever your audio output device is and that it's the device that pulseaudio is configured to output to. There should be a fairly intuitive way of seeing this using Qemu (it's been awhile, so I am not able to tell you where to find it). As for pulseaudio; its GUI will show you.
I got crazy while trying to solve this issue but finally, it was solved. I figured out that we have to enable multiple simultaneous audio outputs in order to hear both sounds the emulator and the OS.
The solution is by installing paprefs small app as the following.
1- Install it:
$ sudo apt install paprefs
2- Open it:
$ paprefs
3- Go to the last tab Simultaneous Output and click on the only option there in order to enable the Simultaneous Output.
4- Restart it:
$ pulseaudio -k
5- If it fails then you have to restart the daemon
$ pulseaudio -D
6- Almost finished, go to the system settings and navigate to Sounds options and change the output sounds to the newly added one as below.
OS : Ubuntu 20.04.
Android studio (snap).
I tried all the methods, none worked for me.
By installing these libs, the sound works now.
sudo apt-get install libc6:i386 libncurses5:i386 libstdc++6:i386 lib32z1 libbz2-1.0:i386
as Gigi mentionned before

Jupyter notebook on android using Termux doesn't upload files and recognize directories

I installed jupyter notebook on android via Termux, but I still can't open my .ipynb or .py, because I can't open directories neither upload a file.
This is my jupyter for opening files page:
I get this when I'm trying to upload file:
Jupyter must be started from the directory containing the notebooks. Maybe this is the information you need.
I could not successfully install Jupyter on Termux on my Android devices (phone and tablet) due to errors when trying to install numpy.
So, I turned to an alternate solution which did work perfectly with no hassle:
I installed Pydroid 3, a Python 3.6 IDE for Android. Then, I pip installed within the IDE the required libraries (numpy, pandas, jupyter) without any difficulty.
To start Jupyter, I launched a terminal using the relevant Pydroid menu.
And finally, I changed the directory to the one where I had dowloaded a whole bunch of Jupyter notebooks and launched Jupiter which automatically open the notebook tree in my browser:
Fully executable notebook:
To install jupyter notebook into termux Android, you need to copy paste these codes one by one into termux terminal. (Note: for python programming language)
pkg remove game-repo
pkg remove science-repo
pkg update
apt install python
pkg install libzmq
pip install jupyter
After you have completed all these, just type jupiter notebook on termux terminal to open the jupyter every time. An url like "http://localhost:8870/?token=d2845af71c0d9b0ea3b43......abansk" (not complete real url, just an example) will come out and you will need to copy and paste into your browser.

Genymotion does not find VirtualBox when run from Android Studio

Using Ubuntu 16.04, Android Studio and Genymotion (latest versions).
Genymotion works perfectly when run directly, but does not work from Android Studio with the Genymotion plug-in installed. The error I get from Genymotion is "In order to work, Genymotion requires VirtualBox to be installed on your computer. You can download the latest version of VirtualBox from www.virtualbox.org/wiki/Downloads.".
Of course VirtualBox is installed. Even tried removing it and installing again (v. 5.1).
There is an odd issue with the Genymotion Android Studio plugin, which makes it impossible to start a device. This often manifests with genymotion.log containing error messages such as:
Output command: "/usr/lib/virtualbox/VBoxManage: ./libssl.so.1.0.0: version 'OPENSSL_1.0.2' not found (required by /usr/lib/x86_64-linux-gnu/libcurl.so.4)"
It comes from the fact that Android Studio defines LD_LIBRARY_PATH to be /android/studio/install/dir/bin:$LD_LIBRARY_PATH which becomes /android/studio/install/dir/bin: if LD_LIBRARY_PATH is not set. This causes VBoxManage to try to load the libssl.so shipped by Genymotion, which is too old for Ubuntu 16.04 (because when LD_LIBRARY_PATH ends with ":", the linker looks for libraries in the current directory)
You can do one of the following:
Edit studio.sh to stop adding a trailing ":" at the end of LD_LIBRARY_PATH (I can provide more details if needed)
Remove libssl.so and libcrypto.so from Genymotion install directory
Define LD_LIBRARY_PATH to some random value before starting Android Studio so that the LD_LIBRARY_PATH defined by studio.sh does end with ":"
Note that this has been fixed in Android Studio 3.1.
After visiting the Genymotion site, it might have something to do with the dkms package:
Make sure that the dkms package is installed and that it compiles VirtualBox kernel modules each time a new kernel update is available.
To do so, run sudo /etc/init.d/vboxdrv status.
You should get the message "VirtualBox kernel modules (vboxdrv, vboxnetflt, vboxnetadp, vboxpci) are loaded".
If not, force VirtualBox kernel modules compilation by running sudo /etc/init.d/vboxdrv setup.
Make also sure that you are part of the vboxusers group.
If not, run sudo usermod -a -G vboxusers <login>.
Maybe it is caused because of the dkms package is not updated, so you are not able to use Genymotion from Android Studio but only running it directly.
ok this took me some quality time to figure out take this step
locate your etc folder
cd into init.d
run virtualbox status:
if it tells you that you need to install dkms package. then on a new terminal
sudo apt-get install linux-headers-uname -r
sudo dpkg-reconfigure virtualbox-dkms
6.enter a password and renenter
then reboot and load to MOK(Your will get a blue screen that will ask to reload to MOK before rebooting)
Ok
your machine by now is rebooted
start your terminal go to etc/init.d
run virtualbox staus
I believe no errors
on a new terminal cd to your directory with genymotion
13.cd into genymotion
run ./genymotion
congrats

How to use Genymotion to launch an android app on PC?

I created an android project with the eclipse ADT from the android-bundle, and generated the apk. I downloaded and installed Genymotion with the integrated Oracle Virtualbox on my computer running Windows XP. How to run my application with Genymotion ?
If you have a genymotion emulator running ADB will detect it and give you the option to install it directly on it from eclipse. Another option is to install it through terminal by doing:
adb install myapk.apk
Before using adb from terminal remember to set up ANDROID_HOME, and add ANDROID_HOME/platform-tools to the path. Hope this helps
if you have APK than just Drag and Drop to Genymotion emulator by default it store in
/sdcard/download(its toast location where store file) go to there and manually install your APK
you can also put any file not only APK :)
This is online plugin for eclipse http://plugins.genymotion.com/eclipse
after install it you can use as native emulator.You can find icon in eclipse menu start emulator from it and run project
To deploy an application to a virtual device, use either of the following methods:
Drag and drop the application APK file into the virtual device window.
Run the following command: adb install .apk.
Download and install the application directly from the virtual device
using a web link.

Categories

Resources