S5 Flip Flap Flop

When we last left our hero (me? ha ha), he had installed the latest LineageOS installed on my second T-Mobile Samsung S5 (actually my original from T-Mobile). I like it! It’s not quite as pretty as the stock O/S (OK OK, stock ROM), but it works well, more quickly, and, most importantly (related to the quickness), uses much, much less flash!

I had to (re-re-) install all of my programs, of course, and that was a pain. Worse, several of my “go to” programs are now “abandonware”. Sigh. Notably, “Profiles”, which gave me one-touch change of settings – I used this to turn off BlueTooth, dim display, and, in earlier phones, change volumes etc. However, in the S5, even with the T-Mobile ROM, I had to use “do not disturb” to prevent overnight E-mail & text notifications.

Anyway, so now the phone works… mostly. Still adding programs…

My use case is to leave the phone plugged in, face down, on my dresser overnight. Often my tablet is sitting there as well, plugged in, because I like to read the news, devotions, etc., before going to sleep. Well, what do you know, the tablet is large and thin, so I put it on the dresser first, then the phone on top, face down.

The past two mornings, the phone is working – I can see notifications in my web-based “WhatsApp” and text messages on “PushBullet” – but it seems to be locked up! The clock is present on a blue background in the top half of the screen, but the bottom half of the screen is black 🙁 It’s doing the haptic feedback on button presses (including the “soft” buttons), but won’t change screens for anything. If you plug it into the charger, the blue background changes to yellow, whoo hoo. My only recourse was to open it up, remove the battery, and reboot the phone that way.

Well, it turns out that this is a known problem with the Galaxy S5 – well, actually, a feature! Ugh. Apparently, there are some cases out there (or “covers” as they are sometimes called) that have a magnet in them, so that the S5 knows when the face is closed. It’s called a “flip flap”. Well, when the face is closed for a period of time, it automatically goes into “flipflap” mode, which shows the clock on the solid background, per above, through a lightly tinted upper window in the cover.

There were posts on this issue from a year ago – see https://www.reddit.com/r/LineageOS/comments/6yzpn1/how_to_disable_flip_flap_klte/ . Apparently there was a setting to disable this so-called “feature” (does my disdain show here?), but it would keep re-enabling itself “automagically”, as one post put it. You have to use “debloat” under “Magisk”. Now, here is a journey down a rabbit hole.

Installing Terminal Emulator
Go to the Google Play store and install Terminal Emulator from Jack Palevich. It will eventually need root privileges, but that should be automatic. Just remember that.

Installing Magisk
There are two parts of Magisk – the actual program, which you download as a ZIP archive and install in TWRP Recovery, and the manager program, which is an Android program but is no longer in the Google Play store, so you have to download the APK and sideload it. Here is the installation guide. To perform the sideload, you download the APK, find it in your file explorer and click on it to “open” it. I use ES Explorer. This will ask if you want to sideload this ultra-dangerous application, to which you reply “yes”, and there you have it!

Optionally Check for Root
The next part requires root access, so you can check for root with Root Checker from joeykrim. This may fail the first time, because Magisk has to wake up and ask to give it root privileges, which, if you want it to detect root privileges, you will say “yes” to. Ha ha.

Installing Debloater
Unfortunately, you are just getting started. You may have to reboot to get Magisk Manager fully loaded. Open Magisk Manager, click the upper left menu, go to Modules. It will be empty. OK then, click the upper left menu, go to Downloads. Install Bash for Android. Do not install Debloater from here, unless you are on Magisk 19 or later – this is a bug in my opinion. Instead, that thread leads to a scary filesharing site to get old version. Now go back to Modules, click the bottom middle plus, navigate and select the downloaded older debloat ZIP archive, and it will install.

Now, reboot.

Doing the Deed in Terminal Emulator
Once I got Terminal Emulator running, I just:

  • su – up to superuser mode
  • debloat – if it says “module not found” then you have too new of debloat, go to this thread which leads to a scary filesharing site to get old version
  • 2 System Priv-Apps – which will list available applications to be removed / masked by debloat
  • 25 – FlipFlap program!
  • exit – to get out of “su” mode
  • exit – to exit the terminal emulator
  • – now, reboot the phone to apply changes
  • Load Terminal Emulator again, do “su”, “debloat”, “2 System Priv-Apps” again, and “FlipFlap” is no longer in the list, yay!

    Blank Terminal Emulator Screen
    I goofed and uninstalled Bash for Android instead of the too-new version of Debloater. ( hint: there’s no double check, it just does it – so be careful! )

    After I reinstalled Bash for Android, Terminal Emulator just gave a blank screen! I’m not sure if it was related. Maybe I hit the “X” to close a window, rather than typing “exit”.

    Anyway, it did come in after some fiddling. Not sure what I did. I waited a long time, I went to “windows” and tried to add one (killed the program?), and I tried to add a window using the big plus on the screen. I uninstalled and reinstalled Terminal Emulator.

    If this does happen, be patient. Click things, try things, it will eventually work.

    Better, be careful when clicking things in Magisk.

    Shall see if this fixes the problem. Maybe will find out tomorrow morning 🙂

    Samsung Galaxy S5 needs a boost

    Well, the Galaxy S5 was a nice phone when I bought it from T-Mobile in 2015 in Phoenix. Not a fire breather, by any stretch, but nice. Unfortunately, it has become a dog. I’m not sure that it’s the phone’s fault – with Samsung and T-Mobile putting all that “crapware” on it, taking way too much memory all the time. In addition to all that, T-Mobile is responsible for the base Android firmware updates, even though I’ve moved back to Canada and put it on Bell-MTS… and they haven’t updated it in over 18 months. They probably will never update it again.

    So, now I’m thinking that I’ll have to do what I did on my trusty old Motorola Atrix phone when it started to dog out some 6 years ago – root it and put Cyanogenmod, or equivalent, on it. No crapware (nothing that you can’t delete anyway), only what you want, and up-to-date Android firmware. Cyanogenmod has morphed into Lineage OS. I don’t recall what the reason for the morph was, but I think it was that the Cyanogen corporation that was formed to maintain & support the O/S, got carried away and did some dumb things (including trying to make their own phone and compete with Apple/Samsung/LG etc.). Anyway, it’s Lineage OS now.

    I actually have two identical phones, so I can modify one and not take the hit when I goof up. So I’m actually changing my original T-Mobile S5 phone, and my “newer” phone still has the original firmware. Ugh, it’s so slow that I can barely use it.

    The T-Mobile Galaxy S5 is model SM-G900T. Lineage calls it “klte” and firmware for it is at this location on the LineageOS website. Note that it’s not an ARM64 but just ARM architecture.

    You first need to root the phone. Go to this article in Tom’s Guide which will show you how to root your phone with a program called Odin. You should be able to boot the original Android firmware, but it will moan and groan about being rooted. Good!

    Next you install TeamWin Recovery Program “TWRP”, which is a middle stage loader that allows you to change OSes (“ROMs” in Android parlance). To install TWRP, you use Odin again. You power down your phone, power up with a specific key combination to get into “recovery”, and then blast the TWRP image onto the phone. See this TWRP page to get the image, which right now is version twrp-3.2.3-0-klte.img.tar .

    The instructions for Lineage OS installation , but ignore the part about “heimdall”, that didn’t work for me at all. You did all that with Odin. Skip down and use ADB to “sideload” Lineage, Google Apps “GApps”, and LineageOS SU Addon. If you don’t have ADB, here it is. The Lineage image as of today, is lineage-16.0-20190324-nightly-klte-signed.zip . There are links in the instructions over to Google Apps, present version is 20190325. There are several sizes of download, check out the chart of the different sizes. I used “mini”. Then also install the optional LineageOS SU Addon. Do not reboot until all three packages are installed.

    It seemed to take forever for the phone to boot, the first time after installing Lineage, GApps and the SU Addon – but it did boot. Have patience.

    Once you log in to your Google account, you can restore your applications, etc. In may case, I “restored” it from what was saved by the other phone (grin). I had to re-delete some of the crapware, but that’s a small price to pay.

    SRP Perkins Substation Installation

    This was interesting.  A 500 kV substation.  Everything overhead is humming and buzzing, 24 hours a day.  Only our little section of the substation is powered off, the rest is still working.  We installed some equipment in an outdoor cabinet, and also in a rack indoors.  We’re doing a bit of a joint demonstration of digital substation technology.

    One of the challenging things about this kind of work is that the guys start soooo early.  They generally arrive at 5:30 AM.  We’d show up 6:30 or 7 AM, just as the sun was coming up.  I understand why they do it, of course – there’s no shade out there, and the sun is unrelenting & hot!  Hard to believe it until you feel it!