Scrcpy on openSUSE | Display and Control Android devices over USB

Every once in a while, I am in the position where I am tethering my computer to my phone and lazy me doesn’t like to interface with the phone when my fingers are on a real keyboard. I can’t say exactly why I am so anti-mobile at times but it’s just how it is sometimes.

I was introduced to this application called Scrcpy which I think look like “screen copy” so that is how I verbally communicate it.

Installation

To install from the openSUSE software library, I navigated to openSUSE’s software site.

https://software.opensuse.org/package/scrcpy

I chose the Experimental Repository, Hardware

Alternatively, you can install the Snap package

sudo snap install scrcp

Whatever works best for you. I have tried both on openSUSE Tumbleweed and they both work well.

Changes to the phone

The Android device you intend on using requires at least API 21 (Android 5.0) in order to utilize this feature.

Make sure you enabled adb debugging on your device. This is done by going into your Settings > System > About Phone then scroll down to the “Build Number” section and tap that until you are in “Enable Developer Settings”.

Back out of the About Phone menu and enter the { } Developer options menu.

Scroll down to the Debugging section and enable Android debugging. This will allow you access the ADB bridge interface from your computer. I do want to make it clear that at this point, it is not a good idea to just plug your device in anywhere. You had better know that USB port and trust it. Random public chargers are probably not a good idea unless you trust the custodian of it.

Optionally, you can enable the ADB over network where you can debug over Wi-Fi or USB networks. Unless you are on a trusted network, this is also not a good idea. For example, I would not recommend this on a public hotel or coffee shop Wi-Fi but home is a good bet. The neat thing about this option is that you can interface with your device and not be physically plugged into it.

Now the phone is set up and ready to have the display piped over to your desktop.

Run

Running requires you to go into the terminal as well. Plug the Android device into your openSUSE (or other) machine’s free USB port. You will be given a screen, similar to this:

I have selected to “Always allow” from my computer. Select OK and run the this in terminal:

scrcpy

And that is all there is to it. You can now interact with your phone through your computer. Interestingly, Plasma disabled compositing when I initiated the scrcpy command. It could easily be reactivated (Shift+Alt+F12) and it didn’t seem to affect performance of the window into the device.

Wireless Connection

Scrcpy has the capacity to do adb over TCP/IP. This can be activated by going into Settings > System > Developer Options scroll down to “Debugging” and Enable ADB over Network.

You will be given a warning which you have seen previously and will be given an IP with a port number. In this case, I the IP and Port numbers are: 172.20.2.250:5555

Next, ensure your device is not plugged into your computer, just to prove to yourself it is working over the magical Wi-Fi. Next, enable TCP/IP on your computer:

adb tcpip 5555

Connect to your device

adb connect DEVICE_IP:5555

Where DEVICE_IP is the IP Address of the mobile device. Then run just as previously run:

scrcpy

It is also possible to adjust your bit-rate in the definition if you see fit. An example of usage is here.

scrcpy --bit-rate 2M --max-size 800

This is just scratching the surface of what you can do with Scrcpy. It is pretty useful and an alternative, to input and interact with your phone. Since I am not a fan of interacting directly with the phone. There are numerous other features you can read about here from the project GitHub. This is just enough to get you started.

Final Thoughts

If nothing else, this is a fun application to play with, even for the novelty factor. These are only just a few highlights of this really cool application. What are the use cases for this? I can see many, really. I am not a huge fan of the phone interface. I prefer typing on a real keyboard. I have a tendency to leave my phone in another room on a charger. With Scrcpy, I am able to check mobile apps only from my computer as opposed to directly handling the phone. Another use case would be to record the screen for the purpose of a pre-recorded demonstration or in a classroom environment, demonstrate the function of an application projected from the computer hooked into a projector. The limitations of this application is bound by the limitations of your own imagination.

References

Scrcpy Project on GitHub
Scrcpy from software.opensuse.org
Scrcpy from Snap Store

Noodlings | Christmastime, xLights, Exploring Media Servers and Computer History

To squeeze one more blathering in before the end of the year, here are a few things I am noodling around currently.

The 10th Noodling arriving, not because anyone asked for it…

Christmastime Activities

Post Christmas Day shopping yielded me a really nice find, specifically something pretty fantastic from Lowe’s that allows me to fix my AC light strands. A Holiday Living Light Tester. The directions could have been a bit more clear… maybe worth a video… but I was able to recover three of my LED bush nets. Since they retail for about $10 each, that has made the purchase worth it already. This device is supposed to work with LED as well as incandescent lights. I’ve only tested it on LED thus far and it works well.

This is a device that I wish I had discovered long ago.

Christmas Lights Sequence to Music with xLights

Very comprehensive software that allows you to look at the wave forms, change playback speed and make it easier to adjust the actions to occur at the right time. I’ve only began to scratch the surface of the power and capability of this and the reality is, I don’t know what I don’t know on using this software. My set up is really quite simple, therefor I can’t take full advantage of its capabilities.

Some of my favorite effects to date are the butterfly, marquee, fireworks, life and fan. They currently give me the visual excitement for which I am looking to put into the sequences.

There are many more effects to discover but due to the limited nature of my display as it currently is, I can’t do some of the more fancy enhanced items, yet.

I recorded a two videos an posted them to YouTube, they are nothing terribly special, but I am quite pleased with how it turned out.

Funny aside, I went to record the second sequence and there was a car parked in front of my house, waiting to watch it.

I did decide to employ an FM transmitter so that people can listen to the music in their vehicle but I don’t actually have a sign to inform that fact.

More on the Christmastime Lights here

Exploring Media Servers

PLEX

The old boy on the block that is well known. I haven’t used or tried it yet but this is still the one I hear the most about. Because it is the popular one, I tend to go for other things… for reasons unknown

Jellyfin

This will be the next version I try. I have noticed that they do have a Docker image so I am going to take this as an opportunity to learn some things about docker while I’m at it. The key feature of this one is it is completely open source and that has a great appeal to me.

Emby

This is the media server with which I started this journey and am currently testing. I planned to test the others already but I have been engaged in other matters. It has decent name recognition but did go closed source after they gained some momentum. I have been using this for about a few weeks and the features I like are that it works much like you would expect in Netflix. If you activate notifications, you’ll be notified about a “new release” when you put something in your repository of media. I thought that was kind of cute. Setting it up is pretty trivial and I will be doing a write-up on this as well.

I want to do reviews of each of these media servers with my openSUSE Tumbleweed based workstation / server and see how it goes. Really, there is enough horsepower, I can have all three running and see how each of them, play out, as it were.

Restoring my Nexus 6P To Working Order

As a kind of Christmas gift to myself, I spent the 5th day of Christmas disassembling and installing a new battery into this phone. I shelved the project in August but didn’t put it out of sight. Seeing it almost daily, I’ve had it gnawing on me to get it done and I finally did it.

I bought a battery replacement kit on eBay for this phone that had most of the tools I needed. I had no interest in doing a tear down video as there are plenty of those on YouTube. YouTube Video demonstrating battery replacement of the Nexus 6P. Although the repair of the device was rather annoying and tedious, you know, just difficult enough to scare off smarter people than me, the part that took me the longest was updating the phone and installing LineageOS with everything working.

There was only one issue, really, working cell service. The problem ended up being that the was a security lock out that prevented the SIM from being accessed and disabling it is what ended up fixing it.

More on the repair and installation of LineageOS here

BDLL Followup

As we wrapped up the year in BDLL challenges, our task for this week was to make some predictions about the year 2020. They didn’t have to be Linux related so, exactly but since Linux and tech is the focus of the show, it would only make sense to keep it as such.

What I am wishing for, in 2020, is commercial grade CAD / CAM, manufacturing technology software to come to Linux, not necessarily for home use but for use in business.

Specifically, what I would like to see is Fusion 360 by Autodesk supported in some level on Linux. It already runs well in Linux through Lutris but having actual support for it would be fantastic. I would also like to see PTC’s Creo running on Linux. PTC once supported Linux with earlier offerings of their mechanical design package but no longer do so today. It would be great to see.

BDLL Community Predictions for 2020

openSUSE Corner

Tumbleweed Snapshots 20191210, 20191211, 20191213, 20191214, 20191216, 20191221

Aside from bug fixes, removing dependencies that are not needed, here are some of the highlights of the last six snapshots

Rammina, an rdp client to version 1.3.7 which included improvements to translations, better authentication MessagePanel API, Printer sharing improvements, and various bug fixes

NetworkManger, updated to 1.8.25+20. Applet scales icons for HiDPI displays.

Bluez, the bluetooth stack, received a version update to 5.52. Fixed AVDTP session disconnect timeout handling, disabled one more segfaulting patch, and fixed numerous issues.

KDE Plasma updated to 5.17.4. Discover Fwupd will no longer whine when there is unsupported hardware. Improvements to KWaylend integration, and numerous other fixes and improvements.

GNOME Desktop was updated to 3.34.2 which has undoubtedly further improved the experience for it’s users.

GTK3 updated to 3.24.13+0

Gstreamer Plugins, updated to 1.16.2. Fixed numerous issues in the v4L2video codecs

Wireshark updated to 3.0.7 which addressed CVE-2019-19553 CMS dissector crash

Akonadi has been updated to 19.12.0 There weren’t any features added but improvements and bug fixes were implemented.

Wireguard updated to version 0.0.20191219 that added support for nft and prefer it, and fixed other various issues.

YaST updated to 4.2.47, bug fixes and refinements to how it operates

php7 updated to 7.4.0 where systemd restrictions for FPM were relaxed and other various improvements

Tumbleweed Snapshot Reviewer gives 20191210 a stable 99; 20191211 a stable 99; 20191213 a stable 91, 20191214 a moderate 90; 20191216 a stable 96 and 20191221 a stable 98.

Computer History

This is a new segment I am going to try out for a few episodes to see how it fits. Since I am vintage tech enthusiast, not an expert, I like looking back and seeing the interesting parallels between the beginning of the home computer or micro-computer revolution compared to now.

The Computer Chronicles is a program that spanned for 20 seasons, starting in 1983. The original hosts, Stewart Cheifet and Gary Kildall’s first episode focused on Mainframes to Minis to Micro computers and it was such a fascinating discussion. Stewart Chiefet asks Gary, right of the bat, if he thinks whether or not we are at the end of the line of the evaluation of computers hardware or if there major new phases of this evolutionary process.

Gary responds with “no” and saying that they are getting smaller, faster and less expensive. He speculated that they will get so small you will lose them like your keys.

Couldn’t help but think if Gary was still alive today, how many times would he have lost his cell phone today and would he think back to those words. I know that I lost my cell phone in my house, the one I just fixed three times.

Watching the demonstration of the TX-0, the first transistor powered computer give a demonstration was quite fascinating.

The Super computer from the 1960s filled entire rooms while they experimented with parallel processing In the 1970s, computers miniaturized to Something resembling a single server rack and were called minis and were considered portable because they were on wheels. The late 70s and into the 80s, micro-computers came into prominence and although substantially cheaper the Mainframes, Minis and Micros, still far more expensive than what can be picked up today.

I found this particular episode very interesting due to the excitement of how small computers were getting but by today’s standards, really quite large. The hunger for speed was just as apparent in 1983 as it is today in 2019… almost 2020.

The micro-computer they demonstrate here is a Hewlett Packard HP-150 which was an attempt at being user friendly with a touch screen interface. Nothing like the touch screens of today as it uses infra red transmitters. It is noteworthy that in the demonstration of the machine by Cyril Yansouni, the General Manger of the PC Group at HP, it was stated that the most intuitive tool to interact with the computer is your finger. That holds true today, looking at how people interact with tablets and mobile devices. The interaction seemed rather clunky by today’s standards but I think it is pretty cool to see the innovation of the time. Mr. Yannsouni also stated that he doesn’t think that this alone is the most ideal interface. He stated that he thinks that there will be some combination of touch, keyboard, mouse and even voice that will be something more idea. I think he was correct on this. This machine, the HP-150 has a kind of goofy look about it but at the same time, pretty cool as well. I’m really glad it was demonstrated.

The direction that was being discussed here was the future of computer technology. Herb Lechner stated that the future will be networking computers together through local area networks so data can be shared. Gary Kildall and Cyril Yansouni speculated, very excitedly, that the data communication will be over the phone system as the future of networking because local networks are too expensive and difficult to set up. I wonder what they would say today about this.

What I really learned from this particular episode is that, one, our desire for smaller, faster, better computers hasn’t changed. There was experimentation on form and function of computers with what the best of technology had to offer for the time and there was lots of fragmentation, far more than anything we have today. I also learned that most of the experts tend to be wrong about the future of technology, that hasn’t changed today either.

The Computer Chronicles, Mainframes to Minis to Micros (1983)

Final Thoughts

2020 is on the horizon, and to quote my favorite fictional character of all time, Doc Brown, “the future is whatever you make it, so make it a good one.” Make 2020 the best year you can, be kind to one another and should things not go as you planned, don’t hold any resentment against yourself or those around you.

Restoring my Nexus 6P To Working Order

As a kind of Christmas gift to myself, I spent the 5th day of Christmas disassembling and installing a new battery into this “shelved” phone of mine. It is something I have wanted to do since the battery started fading and I finally got to it.

I bought a battery replacement kit on eBay for this phone that had most of the tools I needed. I am not going to provide you a tear down video, there are plenty of those on YouTube and if you are interested in that, click here. This will tell you everything you need to know and possibly more. I am going to focus more on the ares of difficulty and the installation of LineageOS.

Pixel was an okay phone but was a bit too small for my hand, I didn’t like how it fit in my phone holder in my truck, the battery didn’t end up being much better on that phone after about 6 months of use and I couldn’t put LineageOS on it because it is locked down.

Repair Supplies

The video gives you a list of tools to use to do the repair. I didn’t have everything, exactly as they suggested. I grabbed my whole kit of tools available and this is what I ended up using:

Plastic triangle opening tool of two different thicknesses

Tweezers. I used whatever tweezers I had in my tool box which ultimately came from the bathroom medicine cabinet. I would recommend a better set but something is better than nothing

Box cutter. I didn’t have a precision knife set as per recommended in this video and I would highly recommend something like that and I won’t do another repair without it. The box cutter worked but that is a little like using a sledge hammer when all you need is a 16 oz claw hammer. Sure, it gets the job done but makes a bit of a mess of your project surface.

Paper clip in place of a sim card ejection tool.

Heat gun. Mine was probably overkill but it worked fine.

Small Cross-recessed (Phillips) screw driver. The battery kit came with screw drivers but I prefer my nicer, more professional set. Even I can show up to a party in the right outfit from time to time…

The video recommends playing cards but those were chewed up pretty quick on me so I had to use some more ridged cardboard to slide between the battery and the body of the phone. Your mileage may vary. In my case, this “Hello Fresh” junk mail bit worked better than a playing card. Basically, anything ridged that is not so stiff as to crease the battery and cause it to vent with flame.

I used a spudger but not a fancy black nylon one, this one was able to pry and get between the frame and the screen well enough.

Double sided sticky tape to put the lower back panel back on

I also used a dental pick to help with the picking at the device. I recommend something like this for so many of your smaller projects, especially if you have giant sausage fingers.

1 hour of time to devote to the project

The two areas of extra care for this project is removing the glass around the camera and the battery.

The glass needed to be loosened up with the heat gun, gently, as to not over heat the device. Doing so can cause irreparable damage to the device. Once I got this portion heated up enough, the glue started to let go of the glass plate enough to allow me to get that knife in there. This would have been easier with smaller, more precise tools. Thankfully I didn’t break it.

Once the glass and the plastic cover are removed, that will expose the 6 screws holding the device together.

The spudging tool will be required to carefully pull the body of the phone from the screen assembly. I was “fortunate” that this phone has a bit of an area of buckling around the volume button and made it a bit easier to get the case away from the screen assembly.

The phone comes apart and exposes all the little secrets of its design. It also exposed the fact that this thing is incredibly dirty and needed a good cleaning with some isopropyl alcohol.

The other area of concern is the battery. It is imperative you take extra care as to not bend the lithium-polymer battery too much or this will “vent with flame” and it can be a rather spectacular event, one that I was not interested in having. There is a small amount of clearance that will allow you to start prying away at this battery. I carefully used the heat gun to loosen the glue here as well. Once I got the battery up a little, I used several card like things to pry this up.

The rest of the instruction per the video was spot on but the emphasis on the glass and the battery was a bit understated, from my view.

Reassembly of the device was pretty straight forward. It assembles pretty easily. Install the battery, I reused the adhesive pads from the previous battery. Then carefully install the cables, make sure they are fitted well. The glass still had enough adhesive on it that it will keep the glass in place. The bottom plastic bit needed some double-sided tape to keep it in place.

Since this phone wasn’t exactly a “looker” when I started, I am not concerned about how it looks when complete. It is also in a case that will help to hold things in place.

Upgrading the Operating System

This was actually a lot more time consuming than fixing the battery, I am sorry to say. When I started the phone I was greeted with this error about a vendor mismatch.

I have seen this error before so it wasn’t a big deal in fixing this. I downloaded the Google image and flashed the vendor image as per the instructions I found here. In short, here is the process I went through:

  • Downloaded the nightly ROM and the Gapps (mini Gapps) and put them on your phone
  • Download the Google Angler image
  • Wiped device (do not wipe the internal storage)
  • Flashed the three image files (using fastboot commands)
  • fastboot flash bootloader bootloader-angler-angler-*.img
  • fastboot reboot bootloader
  • fastboot flash radio radio-angler-angler-03.78.img
  • fastboot reboot bootloader
  • Flash the Lineage ROM and the mini Gapps
  • Wipe cache, reboot

I admit these instructions are not as verbose as I normally give. If you have any issues, please leave a comment or email me and I will take the time to make it more verbose.

After this process, the phone would not recognize SIM for cell service. I tried flashing the radio and vendor image and still, nothing. I used this little trick from here which also didn’t help, it only told me that it didn’t know the IEMI.

That trick is, on the dial pad, Type in *#*#4636#*#*
It exposes some very interesting bits of information about your phone.

I reinstalled using these instructions several times. Service mode didn’t provide me any solutions and I feared that I somehow erased the very definition of the phones cell radio identification.

As a kind of last ditch effort, I installed the stock Android image and the cell phone signal miraculously worked again. Installing Lineage OS once again left me with no access to the radio. After some more web crawling, the solution sort of come from this Reddit post that said the issue has something to do with the system lock not releasing the cellular radio to the system.

Sure enough, after disabling all the security features, and rebooting the cell service works once again. The specific issue is with this “Secure start-up” where it requires a bit before starting the system. There is some kind of bug in this that is causing issues. Where exactly, I have no idea.

In order to implement this solution, to disable the “Secure start-up” feature and prevent the SIM from being locked out. Go to, Settings > Security & Privacy > Screen lock. I prefer a pin lock screen and when you do enter your desired pin, you are asked for your “Secure start-up” preference. Say “No”, rebooting the device and the cell service will work normally.

I have installed all the important applications and I am back to full mobile capacity… which… is a pretty short list, really.

Final Thoughts

Phones today are, frankly, terribly designed. The process to replace the battery is unnecessarily tedious. At this point, I would consider any phone without a user accessible battery a terrible design and I will not purchase another phone that locks away a battery. That signals a design with planned obsolescence. All that does is encourage greater levels of e-waste. I have great hope in the up and coming PinePhone that may not have the performance capabilities of a modern “flag-ship” phone but no matter how much it may lack in processing power, storage, or RAM, it does have a replaceable battery. That means it won’t be a turd of a design that you get from the likes of Apple, Samsung or Huawei.

LineageOS is now a must to have a good Android experience. I tried to go several months on Google-locked Android and frankly, that is not a good experience. The lock down of applications on the phone is terrible. I should be able to remove whatever applications I want. I have reaffirmed that I will not purchase another locked mobile device, newer does not mean better and stock Android is vastly inferior to Lineage OS Android. It’s not even a fair comparison on the significant user improvements the Lineage team puts into Android.

Ultimately, I look forward to the PinePhone. To have an unlocked, user serviceable device that may be a bit less capable on raw performance is a welcome upgrade to just about any mobile phone out there. Give me a headphone jack and access to my battery! I am now done with these mobile nightmare devices.

References

Nexus 6P Repair Video
Lineage OS installation Guide
Reddit Post on SIM not detected
PinePhone from Pine64
Factory Install Google Android on Nexus 6P
Vendor Mismatch Fix for LineageOS on Reddit

HP Touchpad with Plasma Mobile and openSUSE — Fall Time Blathering

HP_TouchPad_Title-2.png

After working with Plasma Mobile on the Nexus 5X and although it is not quite ready for prime time, it is nearly there. It is so close, I can taste it and I am very ready to see Plasma Mobile as all I see on my mobile. I am also continually seeing interest on the aging HP Touchpad. It too is a fine piece of hardware that is still very capable and now, I can’t help but wonder how much work it would be to port Plasma Mobile to that hardware. I see that there has already been work with the Halium Project for the HP Touchpad. Unfortunately, my understanding at what goes on at the base hardware level is EXTREMELY limited.

Plasma Mobile Experience

Nexus 5X-PlasmaMoble-01The look and feel of Plasma Mobile is pretty great. Like all things Plasma, it is highly customizable. What that means to me, I can make my Mobile experience exactly the way I want, not something dictated by a corporation as to how they intend for me to use my technology.

So then I thought, I know Plasma Mobile is still in early stages, many things are still being taken from Plasma Desktop but that really should only require some adjustments. Over time, Plasma Mobile, much like the Desktop Counterpart could very well end up being the nicest, cleanest and yet most customiziable interface ever.

The HP Touchpad

HP_TouchPad-12-LineageOS.pngThe Touchpad, by today’s standards is not spectacular, but it isn’t terrible either. Its CPU is a dual core Scorpion clocked at 1200 MHz. It has 1 GiB of RAM and either 16 or 32 GiB of storage. It is certainly adequate for many tasks. I can’t help but think how fantastic this Touchpad would be with proper Linux, access to the breadth of open source software.

HaliumThe good news is, the possibility of having a working Plasma Mobile interface on the HP Touchpad may be closer to reality than not. According to the Halium Project on GitHub, three have already been tests completed successfully. This is, unfortunately far outside my skill sets so there isn’t much I can offer here but I am watching the project with great interest.

How Useful Could It Be?

kontactI know multimedia is the thing… streaming Netflix, watching YouTube and GPU intensive games is the common usage for tablets but that is not what I am interested in doing with it. There are far more interesting and productive activities. Using the Touchpad as my window into my digital recipe collection, reference technical documents, access to Kontact, the KDE Personal Information Manager, or at least parts of it for time and task management.

HP Touchpad with Plasma Mobile and openSUSE

opensuse-logo2Then I did some more thinking. I have only begun dabbling in the fantastic Open Build Service, but what if that system could be used to build an openSUSE Tumbleweed distribution specific to the HP Touchpad, tested by the openSUSE openQA and released in a similar rolling snapshot to the regular openSUSE Tumbleweed. Even with a fraction of the stability, reliability of upgrades and the breadth of software, this would be a fantastic improvement as compared to what is available today. It would be a gigantic library of goodness with many the most useful tools readily available.

Now What?

Even though the HP Touchpad is far past its end of life, I continue to use it on a daily basis. I am very interested in seeing the HP Touchpad get a more genuine Linux upgrade and would like to toy with it now but I have to personally determine, do I want to take my HP Touchpad out of service? Would I even have the time test and experiment on it or do I continue to use it as it is? It is very usable today and works mostly well but a project like this might give it enough life for perhaps several more years and be more useful than it is now. For now, I will keep tabs on it but maybe in the very near future I will be able tip my toes in this arena.

Further Reading

Halium for HP Touchpad Project on GitHub

HP Touchpad Specifications

Open Build Service

Halium Project

open QA

openSUSE Tumbleweed Home

HP Touchpad in 2018

Plasma Mobile installation on Nexus 5X

KDE Kontact Personal Information Manager

Plasma Mobile installation on Nexus 5X

PlasmaMobile-00

I have been watching Plasma Mobile for a little while and have tested it in a virtual machine but haven’t made it a priority to get some real hardware to test it on until now. I recently broke my Samsung Galaxy 5S… again… but in many ways it was falling apart. I could not unlock the bootloader and every consecutive update from Samsung made the phone less usable. It would get hot and chew through the battery quickly but be incredibly slow. Looking at the battery usage it was always the Android System that was on top of the list. The last time it was used was when navigating to a destination, the phone became unresponsive, the screen went black and was incredibly hot.

Recently, it was announced that KDE Connect is available for Plasma Mobile which was the tipping point for me to say, it is time to test Plasma Mobile on something other than a virtual machine. So, I purchased Nexus 5X on ebay for $80, I figured, why not.

Nexus 5X-Android

Using this guide, Unlock for Beginners, as my base, I put this together as a distilled version of the guide that can be used on openSUSE but probably any other distribution of Linux as well.

Going through this, it took me a bit to really understand and take a course of action so to make this easier for someone of similar goals. I am running this on openSUSE Tumbleweed but the instructions for Leap should be the same. It really was a rather painless process so this doesn’t write-up doesn’t have much for trouble shooting.

Download the Tools

After some extensive reading and poking around, I chose the minimal method to perform this task. Instead of the full Android SDK, just the ADB Tools.

First step was to download the ADB/Fastboot (platform-tools)

I put it in my Projects folder.

~/Projects/adb/

In that folder, extracted the downloaded zip file, which is easy to do with KDE Plasma’s file manager, Dolphin. If you would like to do it in the terminal (your version may vary):

unzip platform-tools_r28.0.1-linux.zip -d platform-tools

Next, navigate to the folder, platform-tools and executed:

./adb version

which gave the output

Android Debug Bridge version 1.0.40
Version 4986621
Installed as /home/cubiclenate/Projects/adb/platform-tools/adb

Activate Developer Mode on the Nexus 5X

Navigate to: Settings > System > About phone

Scroll to the bottom of the list and tap Build Number 7 times. It will give you a countdown of how many more times you need to tap it after a few taps

Enable adb/USB Debugging

Navigate to: Settings > System > Developer options

There should be three toggles that are on:

A toggle at the top of the screen that should be On

Toggle OEM unlocking to On

Nexus 5X-Developer Options

Scroll down to the Debugging section and ensure that USB debugging is toggled On.

Prepare Desktop Linux

On my openSUSE machine, check to see if you have a plugdev group.

cut -d: -f1 /etc/group | sort | grep plugdev

If you don’t see plugdev returned, add it.

sudo groupadd plugdev

Then add your username to the plugdev group

sudo usermod -aG plugdev $LOGNAME

Logout and log back in for the group changes to take affect

Flash the Phone

Send the command to reboot into the Fastboot Mode

./adb reboot bootloader

The phone will reboot into this screen:

Nexus 5X-Fastboot

Note the PRODUCT NAME is bullhead. More on that later.

Just to verify, I checked that I could do the fastboot thing

./fastboot devices

And it gave me the output

00493e6b7693cba7        fastboot

I have no idea if I should leaving that number is a security risk or not but in this case, I’m not terrible worried.

Next step was to perform the oem unlock and make this phone do some complaining

./fastboot oem unlock

Nexus 5X-Unlock Bootloader

Select YES to Unlock the bootloader on the Mobile.

It should give you very encouraging output similar to this:

OKAY [301.881s]
Finished. Total time: 301.881s

Point of No Return

This process will erase the complete memory of the Nexus 5X. If that matters to you, be sure to back up everything that matters to you.

./fastboot format cache

Output should be similar to this:

Couldn’t parse erase-block-size ‘0x’.
Couldn’t parse logical-block-size ‘0x’.
Creating filesystem with parameters:
Size: 100663296
Block size: 4096
Blocks per group: 32768
Inodes per group: 6144
Inode size: 256
Journal blocks: 1024
Label:
Blocks: 24576
Block groups: 1
Reserved block group size: 7
Created filesystem with 11/6144 inodes and 1422/24576 blocks
target reported max download size of 536870912 bytes
erasing ‘cache’…
OKAY [  0.081s]
sending ‘cache’ (5688 KB)…
OKAY [  0.214s]
writing ‘cache’…
OKAY [  0.063s]
finished. total time: 0.357s

Then format the User Data:

./fastboot format userdata

With the output similar to this:

mke2fs 1.44.3 (10-July-2018)
Creating filesystem with 6661115 4k blocks and 1667904 inodes
Filesystem UUID: fea22557-b249-45e8-aca6-3230969b647b
Superblock backups stored on blocks:
32768, 98304, 163840, 229376, 294912, 819200, 884736, 1605632, 2654208,
4096000

Allocating group tables: done
Writing inode tables: done
Creating journal (32768 blocks): done
Writing superblocks and filesystem accounting information: done

Sending ‘userdata’ (4272 KB)                       OKAY [  0.181s]
Writing ‘userdata’                                 OKAY [  0.064s]
Finished. Total time: 0.388s

Now your phone is ready to flash Plasma Mobile. Though, it can also be noted that if you want to install custom firmware, that could be done as well.

Flashing Plasma Mobile

For this initial foray into Plasma Mobile, I used the the Neon Architecture reference.

In my ~/Projects folder I created a subdirectory PlasmaMobile

mkdir PlasmaMobile

Then pulled the latest Plasma Mobile flashing tool from GitHub

git clone https://github.com/plasma-phone-packaging/pm-flashtool.git

Changed directory to the location of flashtool

cd pm-flashtool

While still in fastboot mode, in terminal, Executed pm-flash

./pm-flash

This required a bit of interaction. It is important that you do not install the wrong image on the phone, something about bricking the device… which is bad.

+ CACHEDIR=cache
+ echo ‘Waiting for device to be in the fastboot mode’
Waiting for device to be in the fastboot mode
+ fastboot getvar product
product: bullhead
finished. total time: 0.020s
++ fastboot getvar product
++ head -1
++ awk ‘-F: ‘ ‘{print $2}’
+ DEVICE_NAME=bullhead
+ confirm ‘Connected device is bullhead, is that correct? [y/N]’
+ read -r -p ‘Connected device is bullhead, is that correct? [y/N] ‘ response
Connected device is bullhead, is that correct? [y/N]

I input y then hit enter as this is a bullhead device which is verified on the Fastboot Mode.

Unfortunately, due to my lack of prep work, I ended up on a Google Splash screen. Thanks to the fine folks on the Plasma Mobile Telegram group I was instructed to run the Flash-Vendor application to put the correct driver blob that would be compatible with Plasma Mobile

./flash-vendor

As soon as it completed, the phone rebooted and very shortly thereafter, I was greeted with a snazzy looking Plasma Mobile desktop. My initial impressions are very positive. I like the look and feel. The application menu is a different take from what you would see on Android but perfectly functional.

Nexus 5X-PlasmaMoble-01.jpg

The settings tool is similar to what you would see on the Plasma Desktop with real customization options. The kind of options that bring an ear-to-ear smile to your face.

Instead of Google Play, the application manager is Discover. This manages your updates as well of which I was told I had 309 updates waiting for me…. but I learned that updating in this manner is not yet supported, so don’t do that.

The authentication dialog feels like it isn’t really meant for mobile but I can overlook that small bit.

The network manager is by far the best network manager I have ever seen on a Mobile. I will admit, I am quite biased about this bit as I think the Plasma Desktop Network Manager is the best I’ve seen yet.

PlasmaMobile-Network Manager.jpg

I have only one issue, at the time of this writing, that prevents me from using this full time. I cannot actually place any calls with it. I am sure that the fix is forthcoming or maybe the problem is entirely with me. Once I have that hammered out, I will update this accordingly.

Final Thoughts

I am just now exploring the fine offerings of Plasma Mobile what it can do and what it can not do. The scope of this blathering is just the installation of Plasma Mobile on the Nexus 5X. I will continue to noodle around with it in hopes of making it my full-time daily driver mobile device in the very near future.

If you have a compatible device and some time to experiment, I recommend this as a fine afternoon activity. Perhaps you can even help out with the project and further the cause of having a truly free and open platform on your mobile.

References

Plasma-Mobile Project Site

XRA Developers Forum, Nexus-5X How To For Beginners Guide

platform-tools-latest-linux.zip

Neon Architecture Reference

Nexus 5X specifications on GSM Arena