{{tag>Xenial android BROUILLON}} ---- {{ https://www.numerama.com/content/uploads/2017/04/ubuntuandroid.png?145}} ====== Anbox - Android in a Box ====== [[http://anbox.io|Anbox]] est un projet OpenSource qui lance des applications Android dans un container, permettant ainsi au système d'exploitation de faire tourner les applications de manière transparente. \\ Le système permet d’utiliser les applications Android comme si elles avaient été compilées pour votre système. Elles profitent des mêmes enrichissements ergonomiques. __MAJ 2023__: Le développement de ce projet est stoppé. //"The Anbox project was once ago created in 2017 to bring Android to any Linux based desktop operating system. It's development has however stalled in the past years and it's only fair to say that now in 2023 it's no longer actively developed." // L'auteur renvoie sur le projet : [[https://docs.waydro.id/usage/install-on-desktops|Waydroid]] pour les ordinateurs ayant un affichage graphique [[wayland|Wayland]]. ===== Installation de Anbox ===== L'installation est super bien décrite dans le site officiel : [[https://github.com/anbox/anbox/blob/master/docs/install.md|Install Anbox]] mais elle ne prend pas en compte la version Ubuntu 20.04 et supérieur, [[https://github.com/anbox/anbox/issues/1581|qui ne nécessite pas l'installation des modules]]. Actuellement (septembre 2020), voici un résumé rapide de leur procédure : ====Installer Anbox, via snap==== Seule méthode officielle soutenue par Anbox (voir site, au 28/10/2020) Prérequis, avoir [[snap|snap]] installé, puis : snap install --devmode --beta anbox **Pour mettre à jour Anbox via snap, faire :** snap refresh --devmode --beta anbox Il est possible qu'**Anbox ne s'installe pas si votre CPU est trop ancien**. The CPU of your computer (AMD Athlon(tm) 64 X2 Dual Core Processor 4800+) does not support all features Anbox requires. It is missing support for the following features: SSE 4.1, SSE 4.2, SSSE 3 You can for example find more information about SSE here https://en.wikipedia.org/wiki/Streaming_SIMD_Extensions * **(fr)** [[https://fr.wikipedia.org/wiki/SSE4|Page Wikipedia sur le jeu d’instructions SSE (Streaming SIMD Extensions)]] Dans ce cas, essayez le dépôt (testé sous zesty) : https://ftp.ustclug.org/~zsj/anbox pour installer snap : snap install --devmode --edge anbox ===== Utilisation ===== Pour lancer l'application, cliquer sur l'icône **Anbox Application Manager** ou lancer la commande anbox.appmgr ==== Paramétrages ==== === Paramétrage de la langue système === Cliquer sur l'onglet "settings", ajouter la langue française et supprimer éventuellement la langue anglaise. === Paramétrage du clavier === Pour changer le clavier qwerty en azerty : - Télécharger "Generic_fr_FR.kcm" à partir de https://sourceforge.net/projects/androidx86rc2te/files/Generic_fr_FR.kcm - Dans un terminal entrer : sudo snap stop anbox mkdir -p /var/snap/anbox/common/data/system/devices/keychars mv Generic_fr_FR.kcm /var/snap/anbox/common/data/system/devices/keychars/anbox-keyboard.kcm sudo snap start anbox ==== Pour télécharger une application ==== ===Via "Webview"=== Ouvrir Webview et entrer dans la barre d’adresse : https://play.google.com/store/apps/ Installer une application en vous connectant avec votre compte Google NB: Copier et coller le lien depuis le navigateur dans Ubuntu fonctionne. ===Via l'extension "Apk Downloader"=== Les fichiers .apk du Play Store peuvent être récupérés via l'extension "APK Downloader", installée sur [[chromium-browser|Chromium]] ou [[google_chrome|Google Chrome]]. ===Via l'installation du "Play Store"=== Dans un terminal entrer : sudo apt install wget curl lzip tar unzip squashfs-tools wget https://raw.githubusercontent.com/geeks-r-us/anbox-playstore-installer/master/install-playstore.sh chmod +x install-playstore.sh ./install-playstore.sh Ouvrir Anbox et aller dans "Paramètres > Applications". Choisir "Google Play Services" puis "Autorisations" et activez toutes les autorisations. Faire la même chose avec "Google Play Store". Ouvrir "Play Store" et se connecter. ====Installer un fichier .apk, sous Anbox==== Commencez par installer "adb" : sudo apt install android-tools-adb Puis, installer votre fichier .apk (adapter le chemin en fonction de l'endroit où se trouve votre fichier) : adb install mon-appli.apk ===== Autre ===== ==== Codecs audios et vidéos ==== La lecture de vidéos et de fichiers audio fonctionne avec certaines applications en entrant au préalable ces commandes dans un terminal : cd /var/snap/anbox/common/rootfs-overlay/system/etc sudo wget https://raw.githubusercontent.com/anbox/anbox/master/android/media/media_codecs.xml sudo wget https://raw.githubusercontent.com/anbox/anbox/master/android/media/media_codecs_google_audio.xml sudo wget https://raw.githubusercontent.com/anbox/anbox/master/android/media/media_codecs_google_telephony.xml sudo wget https://raw.githubusercontent.com/anbox/anbox/master/android/media/media_codecs_google_tv.xml sudo wget https://raw.githubusercontent.com/anbox/anbox/master/android/media/media_codecs_google_video.xml sudo wget https://raw.githubusercontent.com/anbox/anbox/master/android/media/media_profiles.xml sudo snap set anbox rootfs-overlay.enable=true sudo snap stop anbox sudo snap start anbox ==== Créer un raccourci vers une application ==== Les raccourcis se trouvent dans : /home/user_name/snap/anbox/common/app-data/applications/anbox ===== Liens ===== * Source sur le [[http://anbox.io/#get-started|site de Anbox]] * https://github.com/anbox/anbox