Category Archives: Sécurité

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

An ultra-portable medical equipement based on Rockchip RK3288

Found on the excellent CNX-Software site, a portable medical device (a tablet with Rockccip RK3288 SoC), which support digital equipments like scanner for echograph, analyse of blood pressure etc.

Should allow to reduce the cost of medical equipments, and allow to have this kind of analysis on places far from hospitals and cities. Could help a lot emergency people, for a first diagnostic before doing anything. The product is in conformity with medical rules.

SanStar WS-3A Medical Board Runs Android 5.1 on Rockchip RK3288 SoC.
* Official page of the SanStar WS-3A Medical Motherboard.

The nightmare of Samsung, progressive regression of basic usefull functions. (Corrected on Galaxy A after april 2 & 23, 2016 updates)

This entry was first published in mid-February 2016. April 2, 2016 system update correct the problem. Now, device can be used as MTP and PTP device.
April 23, 2016 system update correct the second problem. Now, USB mass storage device (lke usb keys) can be used trhough a USB-OTG wire.

Samsung doesn’t want anymore customers… at least with the Galaxy A series.
* Now, there is no more support for MTP/PTP (mass storage was already removed some years ago), so, you can’t anymore connect via USB on any computer and exchange files…
* Worst, USB mass storage media (like USB keys) are not recognised by USB-OTG wire :(. Why do they remove this basic functionnalities found on any Android devices, including 20$ chinese ones.
* Fuckin/Suckin Microsoft applications are added, as Samsung and Google overload was not enough, reducing battry lifetime to nearly nothing. You need lot of work to disable most of them (in settings, applications submenues), and rooting device to have really peace and battry life.

I was very used to buy Samsung phones with Samsung processors, as there was not US ones, because of current wars in several Asian (Irak, Afghanistan…) and African (Libya, etc…) countries. No Us even add lot of money (with their France, Germany, and Saudian Arabia partnerrs) to Daech, as if libyan was not enough. And as Samsung is a weaponry partner of US (like LG and Daewoo). And their are anti electronic-freedom, I will make everything to avoid them…

At the same time, chineses companies make nice phones, like Huawei with their own processors, Xiaomi, but with US, Snapdragon processors, Meizu, and taiwan chineses like Asus or some other made some too. In this area I really prefer Rockchip that work openly with the internationally made Linux kernel, and I hope to found smartphones with those fine processors. Their new generation RK3399 seems really promising for best computing and energy efficient performances. That’s definitivly last time I buy a Samsung phone :(.