LineageOS-17.1 is based on Android-10
Before doing this upgrade I'm going to do a TWRP backup, depositing the result on partition 2 of my SD card. Steps:
adb devices, and the prolix dirname includes the date, time, kernel build ID, and something that looks random. Inside that dir you find separate image-type files (
ddfrom the raw device to this file, no compression) for each of boot, system and vendor, plus three different segments of the /data dump, which may or may not be tar files and may or may not be compressed. Each has an accompanying sha256 checksum.
I have a modest amount of confidence that the backup can be restored and will work, unlike confidence and experience with other backup methods.
I/you also need to back up user content in /data (/storage/emulated/0) using my/your normal procedure. This content is not included in the TWRP backup. Aargh, the backup bloated up to 2.30Gb from 0.39Gb and took 35min vs 4min. Probably one of my various backup attempts that won't be restorable.
Now for the upgrade. Read the version-to-version upgrade instructions first. They are almost but not quite identical to the instructions for installing LOS over a stock image. Here's a summary adjusted for jimc's situation:
0.5. I checked the available LOS-17.1 packages. A search on Google revealed no complaints or warnings about any of the 4 nightly versions. So I picked the most recent one.
1. Download the install package (.zip file) for the new version, as well as Google Apps (Nano variant for arm64, Android-10) and Magisk. I'm going to use the Magisk app to install Magisk, once the OS is installed. For reference, I'm storing the downloaded files in xena:/s1/sony-xperia-xa2/los-17.1 .
URLs of download directories:
These files were downloaded. The LineageOS image had a checksum file, which was checked successfully, but Google Apps didn't.
3. In Settings - System - Advanced - Developer Options, make sure USB
Debugging is turned on, and also Root Access Options should be at least
ADB Only. (Not clear if there's a reason not to have
Apps. Hey, the
ADB and Apps choice is gone.)
If you're coming from LOS-17.x this setting is called
2. Make sure ADB is still available on the host. Connect the USB
cable from the host to the phone; see Struggles
with Unlocking the Bootloader for nasty details of this seemingly simple
adb devices to check the connection. Confirm ADB execution
on the phone. Then you need to do
adb root and confirm again.
4. You don't need TWRP to do this upgrade; you can use the LOS
recovery program. On the host do
adb reboot sideload. Update:
this is true for installing the LOS upgrade, but if you want to also install
Google Apps, you will need to boot TWRP for that.
The phone reboots (unlock bootloader; Sony splash screen; screen goes black and no indicator light).
adb sideload package.zip. This is the install package
for the new version.
Screen comes on with LOS logo. Ignore message about can't mount (whatever), stopping adbd (which it has to do, to reboot into fastboot). It shows steps in the installation. Verification took 56sec. Installation took about 3min (estimated). It ends by dropping into LOS Recovery.
6. For Google Apps, repeat steps 4 and 5. Do not allow the phone to reboot into the OS until after Google Apps is installed.
If you do
adb reboot on the host, it doesn't happen.
reports the device is unauthorized (so how do you authorize it?)
Hit Advanced. Choices are reboot to bootloader, reboot to recovery, etc.
Trying reboot to recovery. No improvement, same options but without nice GUI.
Reboot to bootloader. It doesn't go through the splash screens; screen goes
black but the notification light is dim blue.
fastboot devices shows the phone (whew!) Now booting TWRP:
fastboot boot twrp-3.3.1-5-pioneer.img. Proceeds normally through the
various splash screens. On the main screen select Advanced - ADB Sideload.
On the host, adb sideload open_gapps-arm64-10.0-nano-20200422.zip
It shows progress messages from the gapps installer. Installation successful.
Actually, I'm going to hit TWRP's
Reboot System. Splash screens.
And it shows the LOS boot animation, same as in LOS-16.0.
We're setting up permissions. Keep existing permissions. In Settings - System - Advanced - Updater, it says we're updated to Android-10. We don't have developer options. About Phone - Android Version says it's 10 also. Give self developer privileges, tap the Build Number 7 times. It says you've already enabled developer mode (???) And now Developer Options is in the System menu.
In Settings - System - Developer Options, turn on Android Debugging
(should already be on from the old OS), and Rooted Debugging (not yet on,
allows running adbd as root, i.e. doing
adb root on the host).
So what have I noticed that's new in LOS-17.1?
All(?) of my apps seem to still be there. I haven't yet run Google Play updater.
Trebuchet icon layout is unchanged. Live wallpaper (Yet Another Phase Beam) is still alive.
We're using the correct DNS, what DHCP on Wi-Fi would have told it. According to Hurricane Electric Network Tools, it has the Wi-Fi IPv4 address (but not IPv6), but it's not clear what interface has this IP. There also does not seem to be an interface with other than a link-local IPv6 address. Whatever this display is telling me, ping to an internal host's global IPv6 address succeeds. Also succeeding: an IPv6 ping to the internal host's alphabetic name. Firefox to http://[:IPv6:addr]/ gets the requested index page. But Firefox failed to resolve http://ipv6.test-ipv6.com/ which only has an IPv6 address. Firefox on Gnu-Linux (desktop) can do so.
The notification bar has a new icon: a microphone. It vanishes when a normal app has focus, and returns when Trebuchet has focus. Here's a list of apps which have (or want but don't have) permission for the microphone. See Settings - Apps & Notifications - Permission Manager - Microphone. Some need to be turned off, some need to be turned on. I think, but didn't confirm in detail, that the permission for Google is what causes the microphone to be opened on the home screen (not Trebuchet itself). With Google's (etc.) permission revoked, the microphone icon is gone.
Let's see about updating apps. Apparently there isn't a big API
revolution in the jump to Android-10. Only 2 to update: Maps and Google Pay.
Updating Maps; refusing Google Pay because I want to see if the latest version
of Magisk can make it work. If so I'll save the relevant APKs to restore if
It's possible that Dropbear has become inoperative. I can't do ssh to port 2222. Update: fixed later.
What bloated stuff has gotten into my shared storage (/storage/emulated/0)?
I have a feeling I'm going to have to wrap the whole 2.3Gb in a tar file and
un-tar it on the host, then use normal Gnu-Linux tools to analyse it. Well,
let's get that started…
rsync --rsh="ssh -4 -p 2222" --log-format="%o %f" -a -r selen:/storage/emulated/0/ /scr/selen-data/
The content is there, but only 86Mb. Various cruft that is totally obsolete and needs to be deleted, but is not exactly huge and doesn't take 2.3Gb.
Let's retry this, attempting to store everything in /data. Total content: 3.55Gb, took about 2min to transfer. It's all miscellaneous stuff, no backups, just cruft and bloat. The biggest offender is Firefox (cache 0.44Gb and profile 0.16Gb). Also notable are Google Quick Search Box (0.30Gb), Amazon Kindle (0.20Gb), Ring (0.18Gb), and several others.
I need to work some more on getting a balance in my backups between saving important stuff and bypassing worthless stuff like the browser cache.
Tidbit: someone in a forum post mentioned adbfs. You connect to the phone
with adb, then run adbfs which uses FUSE to
mount your phone on a
specified host mountpoint, similar to sshfs. A prime use case is backups.
It's available on SBS:
adbfs FUSE Filesystem for Android Debugger. (It's a community package.)
adbfs-rootless by spion is the Github repo for the source code.
Growl! Night Clock is out of action, no way to open the menu to set alarms.
Repeating the checkout tests:
So what's going on with the GPS? These apps have permission to use location:
Settings - Location - Advanced - Google Location Accuracy: It says it may use Wi-Fi, mobile networks, and (other?) sensors to estimate the location. If you turn this off, it only uses GPS, resulting in low accuracy if GPS is not actually available. Spot testing with this off: did not bring GPS Status back to life. I also tried turning the Location master switch off. This resulted in no satellites at all being shown by GPS Status.
Although GPS Status (actually the Location daemon) has AGPS data, suppose it requires a real Almanac from the satellites. Let's run it for half an hour and see if anything improves. No, GPS Status is still trying to turn the locations of the 23 satellites into a fix.
At the exact same time and location, the old Galaxy S5 took 303 secs. It needed to get new AGPS data (54 days old) and a new ephemeris. It found 4 or 5 satellites fairly quickly, but after five minutes it finally got the whole constellation, and promptly delivered a fix. This shows that GPS has not been disabled as a part of the USA's response to COVID-19.
In the Launcher (Home) Settings, these items were present in LOS-16.0 but not in 17.1: Grid size, Change icon shape (it's now fixed as circles).
Redoing Installing Magisk…, possibly with modifications. Here's what I actually did.
Install, not the body text. Installation mode: download zip only (I picked this), vs. patch a file. OK, it's downloaded. It's in /storage/emulated/0/Download (not Downloads).
lock your bootloaderand Sony splash screen, ends up in LineageOS Recovery with ADB Sideload action item.
No(don't install), Advanced, Reboot to Bootloader.
lock your bootloader, Sony, TeamWin splash screens. Give your pattern. It gets to the main screen. Advanced, ADB Sideload, swipe to begin.
Infinite loop while booting:
lock your bootloaderscreen, the Sony screen, then an animated battery icon for 10sec.
Trying to reinstall LOS-17.1:
CQ30010NGY fastboot, good.
???????? fastboot, bad. I pulled the USB cable (light went out after a few seconds), retried with the same 15sec hold with the same result, and tried with holding 20sec, and this time it got into fastboot.
Wipe Cache andWipe Dalvik Cache.Unable to find partition for path /cache, but it did wipe /data/dalvik-cache. Better to do just dalvik-cache in Wipe - Advanced. That claimed to have worked.
- In Sideload, it sucks in the zip file and stores it in /sideload/package.zip, then installs it as if separately uploaded. Or at least that's what the progress notices imply and it corresonds with what I've seen on forum posts.
- Sideloading these images, rebooting TWRP each time:
- lineage-17.1-20200425-nightly-pioneer-signed.zip (progress to 47%) (current slot is B)
- open_gapps-arm64-10.0-nano-20200422.zip (progress to 58%) (current slot is A)
- Magisk-v20.4(20400).zip (progress to 71%) (current slot is still A)
- Idiot, no you don't hitReboot System. Re-doing from the beginning.
- You see the current slot on Reboot from the main screen.
- Now that everything is allegedly installed, let's reboot system. 20:50:00 (approx). Boot animation plays. At 170sec it paused, then resumed. For 10min. Back to squre 1, letting it bootloop overnight.
- Next plan will be to reinstall minus Magisk, and wait for a fix to eventually appear.
- 30min on charge brought the battery to 36% (according to TWRP, once I got it booted). 50% is recommended, but 36% should be plenty.
- fastboot boot ../twrp-3.3.1-5-pioneer.img
- adb sideload lineage-17.1-20200425-nightly-pioneer-signed.zip
- Back to main screen - Reboot - to Bootloader. Current slot: A.
- fastboot boot ../twrp-3.3.1-5-pioneer.img
- adb sideload open_gapps-arm64-10.0-nano-20200422.zip
- Back to main screen - Reboot - to Bootloader. Current slot: B. I could have rebooted from the sideload screen, but I wanted to see the current slot. Battery is down to 34%.
- Rebooting: 10:03:45. Boot animation starts. !@#$%^* after 220sec it paused for about 20sec, then boot animation resumed. Same behavior as before.
- The one difference is, I didn't wipe the Dalvik cache (although the 220sec boot time suggests that it was not populated yet). When I get control of the machine again, I'll try doing factory reset, then reboot again.
- When rebooting it showedAndroidfor under 1sec, then rebooted again. LOS Recovery said,Can't load Android system, your data may be corrupted.I took its option to factory data rest again. Boot animation appears. 14:48:55 ... 51:45 (170sec), finished booting, running initial setup.
- Diffs in initial setup: It actually found updates (to apps I assume) and installed them. (That's the only difference I saw.)
- Next big job: to install a zillion apps. What I really need is a big list of URLs for installation. I should restore from backup.
- How to import my home directory:
- Make a tar file on Diamond of jimc and htdocs. (40.5Mb compressed)
- Use AndFTP to import it to the root of internal storage.
- Use the local terminal in JuiceSSH and un-tar it.
- It worked.
- Set a pattern, set up fingerprints. Settings - Security.
Android Settings: http://localhost/~jimc/hardware/sam-galaxy-s5/settings.shtml In addition to the steps in the above URL, or supplementing them, I set these:
Apps in the pristine state, from LOS and Google Apps (there are a lot more in /system/apps).
Announcement of LineageOS-17.0 for Pioneer (OP LuK1337, 2019-10-08).
See particularly the
Reporting Bugs section. Specifically
you can turn off SELinux by running
setenforce 0 from a root shell,
and enforcement actions are logged in /data/misc/audit/audit.log .
Later in the discussion, LuK1337 says he tried the then-prevailing Magisk and
it worked for him.