Tag Archives: Android

Android without Google and GNU/Linux with APK

Content

* GNU/Linux on your phone now
* GNU/Linux with Android APK compatibility layer
* Managing APK of a device
** Listing APK installed on the device
** Dumping an APK installed on the device
** Installing an APK onto the device from the computer
** Removing closed source spywares from your current Android system as a transition phase

Android will move from Linux kernel and open specs APK format to a more closed package format and to their closed source Fuschia kernel going away from Free Open Source software (FOSS) that make Google, Android, ChromeOS grow, but also that are used on most of the internet servers, on most of supercomputer in the world, on most spacecrafts, on most internet boxes, TVboxes, etc…

GNU/Linux on your phone now

At the same time GNU/Linux distributions for mobile grow a lot the 2 recent years, thanks to availability of PinePhone for developers for about 2 years. There are now at least 15 Linux distributions for phone and applications maturated a lot, including since few month MegaPixels hardware accelerted camera application, that use GL and other processor to accelerate rendering/computing of what camera receive.

PostMarketOS is a GNU/Linux distribution available for a bunch of available market phones, but not everything is managed an all devices.

GNU/Linux with Android APK compatibility layer

Just like there is Wine to run Windows application on GNU/Linux, there are also several systems allowing to run Android APK on your phone if needed. Jusr as Wine, beside the possibility of running Android in a qemu VM, you can also run these application inside your the standard GNU system.

AnBox allow to run APK/Android application inside a snap packaged container.

Google goes away from FOSS, afraid by the lost of market share, and they probably loose a lot from this, as Microsoft does by the past. Chinese company, thanks to Trump restrictions, embrace more FOSS.

Huawei the maker of the probably highest quality phones, that was going in first seller position just ahead Samsung, when Trump blocked it, already very active in Linux kernel and community for years, made HarmonyOS for their devices, a system, that continue tu uses Linux kernel for their power devices, and LiteOS for their low end/old devices. LiteOS is a FOSS embedded devices oriented light kernel. They keep the EMUI User Interface they used previously on Android, moving step by step away from it, and at the same time keep a compatibility layer with current APK open-source format.

Another Chinese company, JingOS, made high quality tablets, based on GNU/Linux distribution, that derivates from Ubuntu, with KDE tools and Android APK application compatibility using Anbox. And they are active with KDE and open source communities. Few demos here and here.

Managing APK of a device

For managing package of an Android device from a computer you need adb. This command is available on android-tools package on Arch Linux.

Listing APK installed on the device

List packages:

adb shell pm list packages

See which one are related to facebook:

adb shell pm list packages facebook

Dumping an APK installed on the device

You need first to find the path of the APK with the commande adb shell pm path :

adb shell pm path com.sec.android.app.myfiles
package:/system/app/SecTabletMyFiles.apk

Then you can use this path (remove the initial package:) to backup it on your file system with the adb pull command:

adb pull /system/app/SecTabletMyFiles.apk

Installing an APK onto the device from the computer

Simply type the command install with the path of the APK on y »zour disk:

adb install f-droid.apk

Removing closed source spywares from your current Android system as a transition phase

Beside long time F-droid Free software apk app repository (I use it for year as main source of APK).

You can remove Android pre-installed (memory+cpu+bandwidth thieves) applications, including NSA compliant one like Google, Amazon, FaceBook, Microsoft ones using from a computer with adb. This allowed me to have less bloated phone and to gain few more days of on-battery usage.

For easier copy paste and have only the package name without package: prefix

adb shell pm list packages | cut -d: -f 2

The corresponding application, can be checked by using in a web browser, this does not work for some system applications, for example, for com.google.android.videos:

https://play.google.com/store/apps/details?id=com.google.android.videos

Remove never at least first seen, never used application:

# FaceBook spyware

adb shell pm uninstall --user 0 com.facebook.katana
adb shell pm uninstall --user 0 com.facebook.system
adb shell pm uninstall --user 0 com.facebook.appmanager

# Microsoft stuff
adb shell pm uninstall --user 0 com.microsoft.office.excel
adb shell pm uninstall --user 0 com.microsoft.office.onenote
adb shell pm uninstall --user 0 com.microsoft.office.powerpoint
adb shell pm uninstall --user 0 com.microsoft.office.word
adb shell pm uninstall --user 0 com.microsoft.skydrive # data thief

adb shell pm uninstall --user 0 com.google.android.apps.docs # Google Drive (data thief)
adb shell pm uninstall --user 0 com.google.android.apps.photos # Google photos (data thief)
adb shell pm uninstall --user 0 com.google.android.googlequicksearchbox # Google Search box (behavior thief)
adb shell pm uninstall --user 0 com.google.android.apps.maps # Gaogle Maps (location/move/destination search thief)
adb shell pm uninstall --user 0 com.google.android.gm # GMail
adb shell pm uninstall --user 0 com.google.android.talk # Hangouts
adb shell pm uninstall --user 0 com.google.android.music # Google Play Music
adb shell pm uninstall --user 0 com.google.android.videos # Google Play Film & Series
adb shell pm uninstall --user 0 com.google.android.youtube # Youtube application

To be checked

adb shell pm uninstall --user 0 com.google.android.gms # Services Google Play

Tablette Wacom et autres périphériques USB sur système Android

J’ai fais quelques petits test sur un Galaxy Note III lite avec des périphériques USB via un cable µUSB <=> USB femelle. Comem Android utilise un noyau Linux, il est normal qu’au moins tous les périphériques reconnus par ce dernier soient reconnus. Qu’ils soient interfacés avec une application est un autre problème.

Dans les exemples que je site, j’ai eu un problème une fois lors d’une connexion, peut être problème d’alimentation USB après avoir branché la wacom, en essayant ensuite avec un câble deux prises (comme pour les disques durs externes), la Wacom ayant le même type de connecteur miniUSB (et non microUSB). le clavier ne fonctionnait pas après. J’ai du rebooter le téléphone, et tout fonctionnait directement ensuite.

Joypad type PSX2

Un joypad type PSX2 en USB à l’avantage d’avoir pleins de boutons, deux manches analogiques dont un peut être passé au choix en analogique ou digital), ce qui offre pas mal de possibilité pour l’interaction avec des tonnes d’applications.

J’ai un Saitek Rumble depuis un tas d’années, le retour de force ne marche pas pour ce modèle sous Linux, je me disais que je ingénierie-inverserais bien le pilote histoire de, ça a pas l’air compliqué, mais ça n’a pas réussi à franchir le cap de la TODO vaporeuse et du regard rapide de l’API bien foutu de Linux sur ce point. Il me sert pour quelques expérimentations de bidouilles et sur des jeux ou abandonwares émulés (bornes Mame/Mess ou vieilles consoles en abandonware comme GameCube/Wii, PSX2, etc…). Pour le simulateur de vol (Flightgear Flight Simulator), je préfère souris+clavier, sans doute à tort. Il est immédiatement. J’ai envie d’expérimenter un peu plus des applications interactives dans un futur proche, mais on en est encore dans le TODO à tendance vaporeuse. Bon, donc, j’ai testé sur Android, il est bien détecté, sous l’émulateur de terminal, terminal IDE, il permet de remonter à la ligne précédente de l’historique ^^). Testé avec l’émulateur PSP (PPSSPP, également disponible sur f-droid), ça marche impeccablement. Il faut penser à reconfigurer les boutons dans le menu commandes.

Clavier USB

bon, ben là presque rien à dire, ça marche directement. Par contre, autant sur les tablette chinoises, on peut choisir la disposition du clavier (AZERTY/QWERTY/Bépo…), autant là, rien pour le clavier physique.

Tablette graphique Wacom

Alors là, ça se gatte, elle est détecté comme une souris, mais ne semble gérée par aucune application, et encore une fois, comme pour le clavier, rien dans les préférences. J’essairais de la brancher sur une tablette/téléphone chinoise quand j’en aurais une sous la main.

Pour vérifier la détection dans Terminal IDE :

terminal++@172.0.0.1:-$ lsusb
Bus 001 Device 002: ID 1519:0443
Bus 002 Device 011: ID 056a:00ba <= Wacom
Bus 001 Device 001: ID 1d6b:0002
Bus 002 Device 001: ID 1d6b:0002
Bus 002 Device 001: ID 1d6b:0003

Au niveau du système, sur un Note III lite qui contient un stylet Wacom avec gestion de pression, on pourrait s'attendre à un éventuel fonctionnement de base (on peut toujours rêver), et bien non. Pourtant, Wacom fourni une API pour les senseurs intégrés et tablettes en USB ou bluetooth. Ça marche pas avec Markers, ni avec les applications de dessin fournis par Samsung. Il n'y a rien dans les préférences du système Samsung qui ne permette de le configurer non plus. Dommage. C'est pareil sur une tablette Galaxy Note.

Nettoyer les taupes Android avec « /system/app mover »

L’application /system/app mover permet de déplacer les applications sous Android entre les applications système et les application utilisateur. Il faut cependant l’utiliser avec précaution et savoir ce que l’on fait, afin de ne pas risquer de bloquer les fonctionnalités de base de son téléphone. Le téléphone doit être administrable/déprisonné (rooted/jailbreaked).

Quelle est la différence entre ces deux modes ?

Google Voice en application utilisateur, prête à être supprimée

Google Voice en application utilisateur, prête à être supprimée

Les applications utilisateurs peuvent être supprimées, pas les applications système. Au passage, il est toujours possible de bloquer leur démarrage à l’aide de l’application autoStart.

Il faut donc, pour pouvoir supprimer ces applications, les déplacer avec /system/app mover :
* À chaque application, la confirmation sera demandée. Accepter
* À chaque application, le redémarrage sera demandé pour que ce soit appliquer. Il vaut mieux en grouper quelques unes avant de redémarrer.

Une fois redémarré. Les applications seront disponible dans :
* Paramètres =>
:* Général =>
::* Gestionnaire d’applications =>
:::* Onglet Téléchargé (normalement affiché par défaut).

Il n’y a plus qu’a appuyer sur l’item de l’application, puis sur le bouton Désinstaller (en haut à droite à priori).

Continue reading

Écrire en mongol traditionnel sous Android et Linux

Suite au précédent article : Écrire en mongol traditionnel avec Firefox

* Méthode de saisie Chimee pour Android par un auteur qui a également écrit un tutoriel sur la création d’une méthode de saisie mongol pour iBus. Son site contient également des cours de mongol, en anglais.
* Nationsoft.org (民族语言软件创新平台) 基于Android系统的蒙古文输入法 (méthode de saisie du mongol pour Android (nécessite de s’enregistrer).
* 基于Android平台的蒙古文输入法研究与实现 (Projet de l’Université de Mongolie intérieure).