Software problem: Music players on Android

One might thing that making a program that plays music stored locally on a computer shouldn’t be that difficult. It must be able to find music files, to play them correctly, to play songs in the correct order, and provide a decent user interface, with some search capabilities. Considering that the most difficult tasks can be outsourced to libraries, there should be no special challenge. Yet all the music players I’ve tried on desktop computers or mobile devices suffered from significant problems of various kinds.

On Android, almost all the music players (or at least those from F-Droid) cannot read tags from music files correctly. That means some tags containing non-ASCII characters are read incorrectly, resulting in displaying album/artist/song names garbled and, what is worse, arbitrarily splitting songs of a single album to two sets, one with a garbled album name and one with the right album name. Additionally, the track numbers may be interpreted incorrectly, resulting in a wrong order of the songs. It looks like almost all Android music players use some common, broken Android library.

A special exception is Vanilla Music, which apparently uses its own, working tag reading library. But even this player is not without problems. It has already happened to me in the past that Vanilla Music couldn’t find new songs uploaded to a phone, whatever I tried, including rescanning the whole media library and reboots. And now I experienced another problem. This time, Vanilla Music search function stopped working, it couldn’t find anything in the displayed lists of artists, albums and songs. After rescanning the whole media library (which takes quite a lot of time), all the lists were split in two parts, sorted separately of each other (i.e. A … Z A … Z instead of A … Z) and one of them being searchable while the other one not. So I ended up with split lists and only one part of each searchable. After more rescanning and reboot attempts, I gave up.

A possible explanation could be that Vanilla Music got damaged by update of my phone from Android 10 to Android 11. So I uninstalled Vanilla Music, installed it again and it started working. Apparently a problem of category 3, a bug somewhere. The lesson learned is that whenever I experience problems with Vanilla Music database, I should reinstall the application instead of attempting to fix its database.

Back to Vanilla Music

I have found out that I was mistaken, Odyssey Android music player cannot always play the tracks in the right order. Additionally, it has sometimes problems (as many Android music players have) with non-ASCII characters in file tags. So I’m returning back to using Vanilla Music. I abandoned it when it was incapable to play newly added albums whatever I tried to do. This seems to be fixed now. And there are also no problems with non-ASCII characters so far.

Another good news about my phone is that the occasional very short (and very annoying) interruptions of music play (regardless of the music player used) are, hopefully, also no longer present.

It’s sooo nice when one can play music on a mobile phone.

A usable music player for Android

It’s surprisingly difficult to find a music player that works. I have the following minimum requirements on a usable music player for Android:

  • It is free software.
  • It can play music.
  • It can play album tracks in the correct order.
  • It can search by artist and by album.
  • It can recognize music library updates.

There are many free music players for Android. But finding the album I want to play and to play it in the correct order is a problem for most of them.

I could find (exactly) one music player on F-Droid that works: Odyssey. So far it looks flawless, it’s well usable and can play music well. And it’s licensed under GPLv3, which is another plus.

Fairphone owner

I own a Fairphone now. When I first heard about the Fairphone project it looked interesting to me, but I haven’t thought about it seriously for two reasons: 1. price, 2. I wanted the phone to be fair not only in the production chain but also to its users. When I recently started looking for a possible replacement of my old smartphone, I found out that the second problem has been fixed.

Now how about the price? A smartphone with similar hardware specifications can be obtained maybe for half the price. But Fairphone has some unique features:

  • It officially supports a free operating system with optional root access. You can freely choose whether you want to use a restricted proprietary system with Google applications or a free operating system without them. Both the options are officially supported.
  • You may also install another operating system on the phone without voiding the warranty. You’re still responsible for damages caused by malware or improper use of the root access, but the mere fact that you install another system on the phone doesn’t void your warranty.
  • Some parts of the smartphone are replaceable and they may be (in theory) upgraded in the future. And you can replace them yourself easily.
  • The smartphone is designed to last. I think nobody can tell whether it will really last, but there is at least some effort to make it more likely to happen.
  • And of course, the production of the smartphone tries to be fair. Ethics matters.

Fairphone is not perfect, but it’s the only reasonable smartphone I’m aware of that provides such a level of fairness. Considering that fact, the price is actually reasonable – freedom and ethics have their price. We must be ready to pay it, otherwise we lose those basic values. Fairphone is very unique on the distorted smartphone market, where harsh restrictions, previously rejected on the PC market, were successfully introduced without any big protests. Consider my previous smartphone:

  • It occasionally rebooted itself. Well, I could live with that.
  • The provided operating system was proprietary and contained proprietary applications that I didn’t want to use, that wasted the small storage space available and that I couldn’t remove. This is not acceptable.
  • The provided operating system was already obsolete when I bought the smartphone, even security upgrades weren’t provided. Using an old operating system is debatable, lack of security patches is not acceptable.
  • Installing an alternative operating system was possible but only with a clear message from the vendor that it would void my warranty. I’m not sure it’s legal in the E.U. but it’s not acceptable in any case.
  • Nothing was advertised about how the smartphone was produced and what harm it caused to workers or regions of the world.

Would I like to pay any money for such a device again? The obvious answer is “no”. And that was one of the better smartphones on the market, where additional restrictions such as impossibility to install a different operating system or even just unapproved applications were present.

There are some problems with Fairphone too, for instance:

  • Not everything in the supply chain is fair. The nice fact is that the vendor admits it and tries to do what’s possible in the current world.
  • Proprietary binary blobs are used in the operating system. This is the sad reality of the current market that Fairphone can’t change itself. We all must call for the change.
  • There’s no waterproof version, I miss that feature from my previous smartphone. The nice fact is that the vendor explains why the phone is not waterproof, with good arguments. (Compare it to an approach of a well known company that sells more expensive smartphones without offering a waterproof version; it officially sells an expensive waterproof case instead, which is not very useable according to the user reviews.)
  • It doesn’t provide the best hardware and the newest Android available today. But it still provides all I need and is much modern than my previous smartphone, so I don’t care much.
  • When the smartphone is charged, the touch screen works very unreliably with most chargers (charging from a computer USB port works fine for me). It was scary at first, it’s very annoying and it must be a design problem.
  • Switching from Cyanogenmod, which I used on my old smartphone, to something close to the stock Android is frustrating, many useful features are missing.
  • Fairphone can’t change that much. But it raises the awareness and makes some important steps towards a better society.

No smartphone is perfect and I like the fact that the company tries to be transparent about problems.

So I decided to buy a Fairphone. I dislike how most other vendors treat their customers and I don’t like paying them for that. I’m sad that many people pay big money to companies that mislead users and try to restrict their freedom and privacy. Fairphone 2 reviews often complain about the hardware etc. and don’t mention how nice it is to its users. That pretty well illustrates what we care most about – having funny toys without caring about our freedom.

One of good ways of fighting evil behavior is to support good behavior. And this is one of the major reasons why I decided to buy the Fairphone. I still can’t equip my whole family with Fairphones, it’s not affordable. But I wish that would change one day, so I should support the project.

Did I say that I own my Fairphone? Yes, it’s a great feeling of owning the device, instead of being owned by the device. The phone is fair.

Debian GNU/Linux on Android

Android tablets are useful portable devices. Unfortunately Android makes them less useful than they could be. There are several problems with Android, one of them being lack of applications. While there are free Android applications for many common tasks, they are typically not suitable for serious work and many applications are completely missing, most notably (real) Emacs.

But it’s possible to partially overcome the problem by installing GNU/Linux in a chroot environment on Android, making an Android tablet a poor man’s substitute for a laptop on occasional traveling. Here’s what I’ve found about running Debian GNU/Linux on Android after some experiments and testing a couple of alternatives:

  • Get a Bluetooth or other hardware keyboard. The software keyboards take screen space, are not suitable for touch typing and are especially uncomfortable to use with X.
  • Install XSDL X server, available also on Google Play. The other Android X Server, available on F-Droid, doesn’t work very well, nor the free VNC servers I tried.
  • Install GNURoot, together with one of its root images, available from Google Play. GNURoot environment works very well for many tasks, as long as you don’t need real root access.
  • Start the X server, start GNURoot, install your favorite Debian packages, set DISPLAY to localhost:0, run your favorite window manager and the applications you need. The X environment is slow but useable.
  • If you need real root access, you can use Lil’ Debi, available on F-Droid. But there are some limitations: Your Android must be rooted (obviously), the file system size is limited to about 2 GB and I couldn’t connect to the X server under user other than root.

Installing an alternative ROM on Google Nexus 10

Enough is enough. I don’t like how the stock Android installation treats its users and I finally decided to replace it on my Google Nexus 10 with something else. The reasonable choices were CyanogenMod, AOKP and OmniROM. I decided to install AOKP.

Installation instructions looked like installing an alternative ROM on Nexus is a completely easy (and safe) process. It wasn’t that easy though, there is some missing and misleading information in those installation instructions. Due to it, I got a bit scared about three times during the process and had to search the Web for solutions. Thanks to all those kind people who post instructions, answers and solutions I was able to complete the installation successfully. So here is another short guide summarizing how to install an alternative ROM on current (4.4) stock Nexus 10, based on my own experience:

  • Accept that by following these or other similar instructions you can brick your device, lose warranty, etc.
  • Backup everything on your tablet you want to retain. All data may get deleted during the installation.
  • Install Android SDK on your PC. You need it to get working adb and fastboot.
  • On your PC, download TWRP recovery image for your device. You can use ClockworkMod as well, I chose TWRP so that I could contingently install OmniROM without replacing the recovery again.
  • Download the desired ROM and Google applications (if you want them) and put them to /sdcard/ directory on your tablet.
  • Enable developer’s setting on the tablet: Go to settings, device information and tap several times on the build number, until you see the message about being a developer.
  • Go back in settings, enter the developer’s settings and enable USB debugging.
  • Connect the tablet to your PC via a USB cable. The tablet should indicate that you’re in USB developer’s mode.
  • Check that sudo adb devices (use adb binary from Android SDK) shows your tablet on your PC. Note it’s important to run adb as root for the first time. It starts a server process on the first invocation and if that starts under an ordinary user, adb functions may not work even under root later.
  • If there is something strange in adb devices output, such as no entry at all, question marks or a message about permissions, then there is something wrong with your setup.
  • Run adb reboot bootloader. The tablet reboots and enters bootloader menu.
  • Run sudo fastboot oem unlock (use fastboot binary from Android SDK). The tablet should reboot, with unlocked lock displayed under “Google”.
  • Perhaps the tablet gets stuck on the boot. It looks scary, but it can (hopefully) be fixed following the next instructions. If the tablet boots normally, skip a few next instructions and continue with “re-enable USB debugging”.
  • Long press Power + Volume Up + Volume Down to restart the tablet and to enter the boot menu.
  • Select “recovery mode” using the volume buttons and press Power. An Android robot with a triangle appears after a short while.
  • Shortly tap Power + Volume Up (the volume key on the right). A menu appears.
  • Select “wipe data” and wait until it finishes.
  • Select “reboot” and the tablet should reboot fine now. Your data is lost (no problem as that will happen during the installation anyway) and the tablet must be set up as when it was started for the first time after you had bought it.
  • Re-enable USB debugging in developer’s settings.
  • Run adb reboot bootloader to enter the bootloader.
  • Run sudo fastboot flash recovery RECOVERY-IMAGE.zip (if you decided to use TWRP then RECOVERY-IMAGE should be something like openrecovery-twrp-*-manta.img).
  • Select “power off” on the tablet.
  • Long press Power + Volume Up + Volume Down to power the tablet on and to enter the boot menu. Don’t start the tablet normally otherwise the installed recovery may get replaced with the original one during the boot.
  • Select “recovery mode” and you should be in TWRP now.
  • Perform “Backup” in TWRP to backup the original system.
  • Perform “Wipe” in TWRP.
  • If your installation .zip files are not in /sdcard, you can upload them now using adb push YOUR-DOWNLOADED-ROM-FILE.zip /sdcard/ from PC.
  • Perform “Install” in TWRP for your ROM (and Google applications, if you want them) zip files.
  • Perform “Reboot” in TWRP.
  • Hopefully the new system starts now and you are freed from the Google restrictions.

Many thanks to all those who develop alternative Android installations with improved user freedom!

CyanogenMod user

Enough is enough. I got sufficiently annoyed by Samsung Android to install an unofficial port of CyanogenMod (no better alternative) on my phone. What are the first impressions?

The system installed without problems and has been running reasonably well. The user restrictions are gone: I got rid of many useless proprietary applications wasting the very limited space on the internal storage, some things got customizable and root access is available when needed. There is improved functionality: I especially like profiles and swype on the Google keyboard works much better than on the Samsung one. Software freedom was improved by removing some pieces of unwanted proprietary software and replacing some components of unknown origin and license. While I miss a few things from the original Samsung system, I absolutely don’t regret abandoning it and have no intention to return to it unless I experience some serious problem.

As for stability, neither of the systems is perfect. Samsung system suffered from random reboots and other random stability problems. CyanogenMod has problems to start on my phone, suffering from boot loops, but once it’s completely up and running it seems to be stable (so far). Time will tell but it seems the Samsung official preinstalled system isn’t more stable than an experimental unofficial port of an alternative ROM.

Samsung produces user friendly hardware: replaceable battery, SD card slot, standard SIM size, a lot of different models for different needs, available bootloader. Too bad they cripple it with their proprietary software. I’d probably recommend my friend buying a Samsung phone, but only one of the models for which one’s favorite alternative system (e.g. Replicant, OmniROM or CyanogenMod) is officially available.

CyanogenMod removed from Google Play Store

CyanogenMod installer application was removed from Google Play Store on Google’s request. Not much issue itself as it can be installed from elsewhere and without using the proprietary Play Store application. The more interesting part is the reasoning about the issue.

According to Google the installer encourages users to void their warranty and thus is in violation of the terms of service. This seems fair at the first glance but we must ask Google some questions about its stock Android systems: Why can’t we install security updates on your Android without voiding the warranty? Why can’t we mount USB devices on your Android without voiding the warranty? Why can’t we remove proprietary applications from your Android without voiding the warranty? Why can’t we install applications on the SD card on your Android without voiding the warranty? Why can’t we install another operating system on our devices running your Android without voiding the warranty?

Even more interesting are users’ comments. Some people claim that voiding the warranty makes sense as replacing the stock Android is indeed dangerous for various reasons: The device may be destroyed by overheating; LED control can be destroyed by incorrect use; the device may be bricked by reflashing due to an undocumented feature of the device. Compare this with PCs: How many of them have you damaged or destroyed by installing another operating system on them? Clearly there is something very wrong with the stock Android devices and with all those arguments.

Given the questions above, people have a lot of valid reasons to install less restrictive Android systems, such as Replicant, CyanogenMod or even the closed Chinese distribution (can you believe it’s not under the control of Chinese army?), on their devices. The primary question is: Why are the Android devices designed to void the warranty in case the original software gets replaced? The answer is clear: Google applies invasive user and vendor lock-in. The most sad fact is that some users accept and support it.

Well, one can argue user lock-in is in the best interest of Google business: We are the products and restricting us makes us better products, to be sold for a better price. We don’t pay for Android development, Google customers do. Unfortunately, this is the perverted fact of todays economy. But Google at one time used the motto “don’t be evil”. Google had to be nice to its users when it needed to acquire them; as a monopolist today it just exploits them. Google is an evil company these days (don’t be confused: Apple, Microsoft, Samsung and others are no better): It applies aggressive user (and vendor) lock-in, it replaces its previously free software with proprietary software, and it supports DRM on the Web and in W3C standards.

Google and other such companies deserve boycott to force them to change their behavior but that can be hardly effective nowadays. So what can we do? I suggest fighting for consumer rights, using replacements of proprietary software and services, developing free software including distributed free software services, donating to organizations such as Free Software Foundation, Electronic Frontier Foundation or Software Freedom Law Center, and educating the users.