Android apps¶
Anbox is a minimal Android container and compatibility layer that allows you to run Android apps on GNU/Linux operating systems such as UBports.
Note
Lorsque le terme « hôte » est utilisé dans ce document, il se réfère à un autre appareil auquel vous pouvez connecter votre appareil sous Ubuntu Touch. adb
et fastboot
doivent être installés sur votre appareil hôte.
Note
You will need to execute commands on your Ubuntu Touch device to install Anbox and APKs. You can do that by using the terminal application, but it is easier to use adb shell
or set up ssh to access your phone from your host.
Appareils pris en charge¶
Assurez-vous que votre appareil est pris en charge :
- Le Meizu Pro 5 (nom de code :
turbo
, nom de la partition de démarrage :bootimg
) - Le Fairphone 2 (nom de code :
FP2
, nom de la partition de démarrage :boot
) - OnePlus One (codename:
bacon
, name of the boot partition:boot
) - Le Nexus 5 (nom de code :
hammerhead
, nom de la partition de démarrage :boot
) - Le BQ M10 HD (nom de code :
cooler
, nom de la partition de démarrage :boot
) - Le BQ M10 FHD (nom de code :
frieza
, nom de la partition de démarrage :boot
)
Le nom de code de votre appareil ainsi que le nom de la partition de démarrage sont nécessaires.
Comment l’installer¶
Avertissement
Installing Anbox is only recommended for experienced users.
Avertissement
To install Anbox, you need to flash a specific boot image. You will need to re-flash that image after each Ubuntu Touch update so when you update from OTA-10 to OTA-11 for example. Not doing so can put your phone into an unstable state. Only update your Ubuntu Touch device when you have a computer with you to re-flash that boot image.
Make sure your supported device runs on 16.04 (Anbox doesn’t work on 15.04).
Be sure to have a backup of the device.
Ouvrez un terminal sur votre appareil hôte et définissez quelques variables spécifiques à l’appareil en exécutant
export CODENAME="turbo" && export PARTITIONNAME="bootimg"
, mais remplacez la partie entre guillemets avec respectivement le nom de code et le nom de la partition de démarrage de votre appareil. Regardez dans la liste pré-citée.Activer le mode développeur sur votre périphérique.
Connect the device to your host and run the following commands from your host (same terminal you ran the
export
command in):wget http://cdimage.ubports.com/anbox-images/anbox-boot-$CODENAME.img adb shell # connect from your host computer to your UT device sudo reboot -f bootloader # 'adb shell' will exit after this command, the prompt will be back on your host sudo fastboot flash $PARTITIONNAME anbox-boot-$CODENAME.img sudo fastboot reboot rm anbox-boot-$CODENAME.img exit
Wait for the device to reboot, then run this from your host:
adb shell # connect from your host computer to your UT device sudo mount -o rw,remount / sudo apt update sudo apt install anbox-ubuntu-touch anbox-tool install exit
C’est fait ! Il vous faudra sans doute actualiser le moteur de recherche des applications (faites glisser votre doigt vers le bas de l’écran et relâchez) afin que les nouvelles applications Android s’affichent.
Note
You now have an adb server running inside your phone. This guide asks you to run some adb
commands, sometime on your computer, sometime on your phone. Carefully check on which device you are!
You can check that adb server is correctly running locally on your phone by opening the terminal app and enter adb devices
. You should see something like:
[email protected]:~$ adb devices
List of devices attached
emulator-5558 device
How to install new APKs¶
Copy the APK to
/home/phablet/Downloads
, then run the following from your host:adb shell # connect from your host computer to your UT device sudo mount -o rw,remount / sudo apt update sudo apt install android-tools-adb adb install /home/phablet/Downloads/my-app.apk # This is the adb of your device, not your host exit
C’est fait ! Il vous faudra sans doute actualiser le moteur de recherche des applications (faites glisser votre doigt vers le bas de l’écran et relâchez) afin que les nouvelles applications Android s’affichent.
Gardez vos applications à jour¶
- To keep your apps up to date you can use of F-Droid or ApkTrack. If you want to install any of the above apps you can find them here:
- F-Droid : https://f-droid.org/
- ApkTrack : https://f-droid.org/packages/fr.kwiatkowski.ApkTrack/
How to uninstall apps¶
Pour désinstaller des applications, exécutez
adb uninstall [APP_ID]
à partir de votre appareil sous Ubuntu Touch:adb shell # connect from your host computer to your UT device sudo mount -o rw,remount / adb uninstall [APP_ID] # This is the adb of your device, not your host exit
C’est fait ! Il vous faudra sans doute actualiser le moteur de recherche des applications (faites glisser votre doigt vers le bas de l’écran et relâchez) afin que les nouvelles applications Android s’affichent.
Résolution de problèmes¶
Si l’installation sur l’appareil de
anbox-ubuntu-touch
ou deandroid-tools-adb
échoue en raison d’une erreur d’espace insuffisant, essayez ceci:adb shell # connect from your host computer to your UT device sudo mount -o rw,remount / sudo rm -r /var/cache/apt # delete the apt cache; frees space on system image sudo tune2fs -m 0 /dev/loop0 # space reserved exclusively for root user on system image set to zero sudo apt update # recreate apt cache to install Anbox and adb sudo apt install anbox-ubuntu-touch android-tools-adb sudo mount -o ro,remount / exit
Lorsque vous souhaitez installer un APK mais que vous obtenez l’erreur
Fichier APK invalide
, cette erreur peut aussi signifier « fichier non trouvé »- Check that you typed the file name correctly
- If the APK does not reside in the current folder where you execute adb, you have to specify the full path, e.g.
/home/phablet/Downloads/my-app.apk
instead of justmy-app.apk
Signaler des bugs¶
Please report any bugs you come across. Bugs with Ubuntu Touch 16.04 are reported in the normal Ubuntu Touch tracker and issues with Anbox are reported on our downstream fork. Thank you!