Often I will eschew convenience for the sake of digital privacy (more than most, not as much as some). I had decided to get a “new” phone as an upgrade to my current phone. I’d been eyeing the Librem 5, but it’s not mature enough for me (and it’s way outside of my price range). I’ve also considered the pinephone. I almost decided to get the pinephone, but in the end I decided that it’s not mature enough either. The price range is right though.
My “requirements”, if you would call them such, are loosely “I don’t want to have google play services installed, and I want my phone to still work”. To do this well, I would want my device to run a LineageOS build that would hopefully have active maintainers. Going the extra mile, I would like it to run a Linux on phone OS as well, but is not necessary. Something like mobian, postmarketOS, or ubuntu touch (preference in that order).
I settled on the Moto G7 because it is currently actively maintained (As of fall 2020, the wiki lists three maintainers), it is a definite hardware upgrade over what I had before, it is a newer model of phone (released Q1 2019), and (with those other things) I have hope that some kind and dedicated person might come a long and create a well supported community build of either postmarketOS or of ubuntu touch for this device. (I have doubts about someone doing this for mobian).
I purchased my Moto G7 (XT1962-4) on eBay and it was shipped from new york. The first thing I did when i got my phone was inspect it. The second thing was boot it up and inspect it that way. The third thing was to put my old SIM card in my new phone. My current carrier is Metro PCS. I like some things they do but I hate their marketing tactics. For example, you cannot switch phones to an unlocked - non Metro PCS phone - by using their web portal. You have to call in and use their automated phone system (where, if it completes, it in theory won’t charge you), call in and talk to a person (who will try and charge you 20 bucks), or go into a branch (where someone will try and charge you 20 bucks).
Swapping phones was it’s own ordeal. I ended up looking up a video showing me how to do this. They deliberately make this process harder than they need to. I do appreciate that their process is pretty secure though. I like the thought of not having my sim card stolen from underneath my nose. I tried the automated process twice and both times after the last step, it sent me to a live person to help me, even though everything seemed to have worked. The customer service person was nice and waved the fee after I explained that I had been trying to do this the free way, but I was still annoyed that none of the automated process worked. During the process I got a one time password texted to my phone (that I was moving away from) which I had to read back into the system. After this was done I made a test call on my new phone. It was working! I had successfully changed phones.
After determining my new phone was fully functional, I immediately voided any warranty by unlocking the bootloader. I then looked through two sets of instructions to try and flash LineageOS onto my phone. One of those sets was random people on the XDA forum post for LineageOS and the other was the “official install instructions”.
There was a key difference between these two though. I was actually trying to install a fork of LineageOS called LineageOS for microG. It’s essentially the same as LineageOS except it contains an open source replacement for google play services called microG. The main reason I wanted this was so that I could still get decent GPS while using a different location service backed. Specifically I wanted to use Mozilla Location Service which works really well actually.
Something I didn’t even know existed until I got this phone was that there are phones out there with two kinds of slots used for booting and other things, an A slot and a B slot. This caused a bit of confusion for me. The official instructions don’t tell you to do anything with the partitions, the old instructions from the XDA forum post tell you set the slot at certain stages. However, both point you to a zip file to flash called ‘copy partitions’ which is supposed to copy the firmware from the active slot to the inactive slot.
I flashed LineageOS for microG and I had really weird issues that made the phone unusable. The boot took forever and when it finally made it, I couldn’t use the touch screen.
From that point forward, I panicked. I don’t remember everything I did, but I started blindly following a handful of “how to reset your phone” posts and one thing led to the other and…
My phone was bricked. And worse, it now said my bootloader was locked again. I couldn’t flash stock firmware, and I couldn’t boot into an OS of any kind.
My phone stayed this way for over 30 hours. During this time I tried a couple of times to find a way to move my SIM back to my old phone. It became very apparent that I would have to go into the store. My wife had a cold at the time and so we were self quarantining “just in case”. As a result going to a store in person wasn’t immediately an option.
I felt so awful. I was quite upset about breaking my new toy / tool. Though not as upset as a younger me would’ve been. I had made peace that I needed to get a new phone. But, I still had time so I kept trying. During those 30 hours I read many articles about what to do and how to do it. I found links to official firmware to flash as well, I even learned how to flash it manually (with fastboot).
I learned that their is a tool colloquially known as “blankflash”. It looks like it’s a Qualcomm tool. I had tried using this tool several times and it didn’t work. None of the ones that had been posted seemed to work at all. They all just hung there and did nothing. Eventually I was perusing old conversations on the Moto G7 group on telegram searching for posts related to my problems. There was exactly one person who seemed to be having the same problems as me. He was told “Try running blankflash in windows”. His next post was “Yes, that worked!”.
After reading that message, my wife lent me one of her old computers for me to install windows 10 on. This was its own ordeal that took several hours. During that time I learned that to create a bootable windows 10 USB, all you need to do is format a thumb drive and dump the contents of it to that thumb drive. HOWEVER it’s not that simple. If you are using a windows 10 ISO created after spring 2018, you need to format the flash drive as ‘ntfs’. If you are using one at or before that date you don’t need to but you can. But that’s still not the whole story. Newer computers can boot from an ntfs flash drive just fine, but older ones can only boot from fat32 (and even ancienter ones need a different USB setup). Eventually I got a hold of an old enough windows 10 version and copied it to a fat32 flash drive. To my amazement, it worked and I was able to boot!
I was so excited. I copied over the blankflash and the stock firmware files to the new machine. I then entered my phone into blankflash mode by running fastboot oem blankflash
on my Linux PC and then plugging in the device to the windows computer. I ran blankflash.bat and… I got the same results as before. I was no longer excited and quite sad.
I stopped working on it at this point resigned to the paper weight status of my shiny new phone. I then went and played DnD with some family and friends.
After the game I had the thought “Maybe I should install the platform tools and run fastboot from the windows machine in an administrative prompt?”. And so I did that. I ran fastboot oem blankflash
on the host machine and immediately ran blankflash.bat
. It worked immediately! It rebooted and I saw those beautiful words flashing_unlocked
.
My phone still couldn’t boot at this point. I tried running an old Motorola flash tool and it did nothing.
At that point I went into the stock firmware folder that I had and opened up in a text editor “flashing.xml” which had all of the fastboot commands I needed to flash the stock firmware on my phone. I went though each and every command line by line, double checking I had each line correct before hitting the enter key.
After the final line I rebooted. I saw the stock Moto G7 boot screen. Hallelujah!
After all of that heartache and worry I did what any one in my shoes would probably not do. I tried again!
I had the same results each time. But I knew enough now to not brick my phone.
After several attempts I stopped trying and kept the latest stock firmware installed.
I still didn’t want google play services installed or running, but since it was apart of the stock ROM I couldn’t delete it. I could however disable it. Which I did.
After disabling google play services I started getting tons of notifications saying “[insert app name here] - requires google play services! tap here to enable!”. I started hunting those apps down one by one and disabling them. I had to replace a few system apps as well, including the phone dialer app, the SMS texting app, and the keyboard app to avoid these pop ups. By the way, the apps I used as replacements were the simple mobile tools apps (for things like the dialer, contacts, calendar, photo gallery) and f-droid to replace the app store.
In the end I had one pop up I couldn’t disable or get rid of in any way. And they came from the built in “WiFi manager” system app. Any time I disconnected from WiFi I got a pop up. Any time I reconnected, I got a pop up. If I pulled up the WiFi to check for routers in the area, I got a pop up. I also noticed that my phone would no longer connect to WiFi automatically as well. I had to open the system menu for WiFi networks to reconnect.
One last consequence of doing this: I couldn’t receive system updates anymore. Even though my phone was not rooted (just unlocked) I couldn’t receive system updates. They would try and install and would fail. I could receive them before I had disabled google play services, so I know it was a consequence of disabling them.
It really bothered me that my WiFi manager was so dependent on google play services. I also didn’t like not getting updates. I decided to give it another go.
After a few days, I was really settling into my phone. But I knew it wasn’t really how I wanted it. So I decided to try again… To the same result.
I then remembered that my wife had suggested I try the stock LineageOS and not the one bundled with microG. I decided to give it a go… and it worked! first try, no problems. It just worked!
For the curious what I did (more or less) exactly was:
fastboot boot <mytwrpimage>.img
- Booted TWRP but didn’t flash it as my recovery.adb push lineageos<allthatmiddlestuff>.zip /sdcard
fastboot erase userdata
- I don’t know if this is necessary or not.notes: With the older firmware, it seemed that my phone was booting on the ‘a’ slot. But with the latest it was running on the ‘b’ slot. LineageOS installed to the ‘a’ slot with this method, and it worked.
also notes: I am have the default LineageOS recovery installed as my recovery this time and not TWRP.
If you want a phone that is privacy respecting out of the box, there are easier ways than doing it yourself. But you won’t learn as much. A phone isn’t a play thing for everyone, many people just want something that works. For those people I’d recommend just buying a phone where someone has taken the time to de-google it for you. There are a few options out there. One of those is /e/ and also Rob Braxman.
The /e/ is probably the most complete nearly google play services free option out there. It comes with microG installed by default (with push notifications and device registration turned on), an app store (with more options than f-droid including some popular apps). You can even sign up for an /e/ account and have email and contacts sync. It’s close enough that I’d use it, if I liked the default app launcher more and if there were fewer apps pre-installed.
Rob Braxman is a privacy nut on the internet who runs a YouTube channel and his own social media platform. I mean that as a compliment.
Glad that’s over. For now.
9/10 would do this again.