took kevin to market basket this morning, along the way visiting the dollar store and walgreens. he bought a plastic container for his food and tried to use his chinese ICBC debit card, which unsurprisingly was rejected. i never use a credit card at the dollar store, their card machine is so old and slow i think it's actually a modem that dials up somewhere to make the transaction. those were the only stores that were opened, every place else was closed. MB was one of the least crowded i've ever seen, but still busy compared to nearby star market. i noticed they had some cosmic crisp apples but i didn't get any, maybe next time or wait for a sale. kevin committed the rookie mistake of buying too much and not thinking how he'd carry everything back. i tried to help him carry some stuff but he wouldn't hear of it; at least i gave him a spare grocery tote bag to use. once again he tried his chinese debit card and once again it was denied. the only place that card seems to work is that star market.

MB had some lobster roll on sale so i bought one for lunch. kevin was hesitant because he saw they were due to expire today and didn't think they were fresh. i was going to split it with him, but given his risk aversion to foods, i decided to just have it all for myself. start off the new year in style with some lobsters! funny thing is, i don't really like lobster. i can eat it, but there are so many other things i'd choose before i'd pick lobster. luckily i was pretty hungry and ate it all in just a few bites, before kevin even had time to finish making his lunch, which was just some noodles. i told him tonight i'd be making my meat sauce pasta for dinner and he could try some.

i spent the rest of the day upgrading my android OS from 8 to 9. the ROM i've been using is lineage 15 (based on android 8), which i upgraded from the stock cyanogen OS on my oneplus one more than a year ago. that was a bit more dramatic, as i had to completely wipe the phone in order to install the new ROM. this time around i was simply upgrading lineage 15 to 16 (based on android 9), which i thought would be easier.

first i had to back up my phone as an insurance in case the upgrade fails and i need to restore the phone. using the TWRP recovery tool, it told me the backup would require 18GB of space; i only had about 8GB down from the original 64GB. i tried connecting a 64GB external USB flash drive via an OTG adapter, but my phone only ever saw it as just 196MB. i ended up erasing files on my phone to make more room.

i then used the dexteroid TWRP backup tool (run from the OSX terminal) to save a backup directly to my mac. even though i had enough space on my phone, it would've taken up all the remaining storage and i wouldn't be able to install the new OS afterwards. it took some time for the dexteroid tool to create the backup, and i wasn't even sure if it was saving it onto the phone first before copying it onto my mac, but when it finally finished making the backup, there was a 11GB typeless file on my computer. could this be a complete nandroid backup despite the smaller size? i read that during backup it'd give me the option of compressing the files; even though it didn't in this case, could it have automatically compressed the backup?

since i couldn't be certain i decided instead to backup again using the normal way, with the TWRP recovery tool saving the backup onto the phone instead of my mac. i then read a blog posting i made last year where i talked about android backups, and back when i did my last upgrade, that's exactly what i did: create the nandroid backup on the phone first, before copying it over onto my computer. in fact, there was already an old backup from 2018. since i already had a viable backup on my mac, i was able to erase the duplicate backup on the phone, thereby creating more space.

so that took a while, since i was essentially making two backups: one was the original backup, then a second time to copy that backup to my mac (using the ADB pull command). it was backing up 4 partitions: system, boot, data, cache. data was the last to update and took the longest (because it's the largest section). it also did a weird thing where the progress had exceded 100% (103%) and took a while to create digests (not sure what those are, i think it's an error check).

while the phone was backing up, i went to go show kevin how to make spaghetti pasta meat sauce for dinner. this was the most basic recipe, a package of ground beef, a jar of tomato sauce, and some garlic and onion. kevin wanted to help but i told him he could just watch. we then left the sauce to simmer for 30 minutes, with halfway through we started cooking the pasta. i was going to use my cellentani pasta but kevin wanted to try the italian-imported shell pasta he bought earlier so we used that, each person having 2 cups of shell pasta. when it was all finished we ate in the kitchen. i didn't think i could finish it all, but when it comes to eating i have tremendous endurance and ending up finishing my whole bowl before kevin did.

once backup was finally done, i went to my phone to initiate the OTA lineageOS upgrade. however, i got an unexpected message: the system doesn't allow an OTA upgrade from 15 to 16 (android 8 to 9), it can only be done manually using the TWRP recovery tool. okay, not as easy as i'd first thought, but up to this point i've been mucking around with TWRP, so i was pretty familiar with it.

at one point kevin asked me if i could send him the photo i took of tonight's dinner. because my phone was undergoing the upgrade, i couldn't log into wechat. instead i asked him for his e-mail. i sent the photo without thinking, but realized too late i'd used my iamtonyang.com e-mail, which i never give out to roommates because if they're curious they might discover my blog. fortunately the e-mail address he give me had a typo so the message got bounced. i used my other public e-mail address to finally send him the photo.

i read the instructions for upgrading lineageOS for my oneplus one (codename bacon). i downloaded the lineageOS 16 install package, followed by my choice of google apps (gapps): i ended up deciding on the full version (ARM android 9.0 full), just to save myself some time by not having to manually install them all later.

i went back and reread the upgrade instructions a few more times to make sure i didn't make any mistakes. i ran adb devices to make sure the computer was properly recognizing the usb-connected phone. i then ran adb reboot sideload followed by adb sideload /Users/tony/Downloads/lineage-16.0-20200101-nightly-bacon-signed.zip. i'm not quite sure what sideloading does, i was simply following the directions. for some reason it'd always crash at 47%. i tried rebooting the computer but every time i issued the command, the same crash would happen. maybe TWRP was the culprit. the version i had on my phone was 3.2.3-0. i went online and found a version 3.2.3-20190125. i installed it by using an adb push command to copy the installer file onto the phone and installing it via TWRP itself. that seemed to work. but right after it finished the install (taking more than 30 minutes to wipe the dalvik cache using make_ext4fs), it rebooted the phone on its own. and instead of reaching the desktop, it would hang on the bootloop animation. so i tried again, this time installing the gapps first. it still didn't work, so i went through a few different iterations, like initiating sideload from TWRP itself. eventually i realized there was an even newer version of TWRP (3.3.1-0), which i installed. this latest version seemed to work much better, but the installation was still failing.

finally i tried this: save (push) the lineageOS install package and the gapps package onto the phone and install it that way. luckily i had a lot of space, the OS package was 400MB, the full gapps was around 500MB. one final hiccup before i made some progress, which was for some reason only the nano or pico version of gapps could be installed, so i had to download the smaller package and install that instead of the full package.

that seemed to finally work, the bootloop animation flashed for a few seconds before finally entering the desktop. the phone had to update some system files, but everything looked good. if i didn't know, i'd think it was still the old OS, except the menubar is slightly different (different battery status icon), the pulldown control panel has a new look, and notification messages were different as well. i checked the system to confirm it was running lineageOS 16 (android 9). all seemed well, but i kept getting mysterious messages saying that certain apps kept on stopping. i also tried some google apps and they didn't seem to work, i couldn't open them and kept getting "get google play services" messages. and actually, the whole system felt a little sluggish, like refreshes were just a split second slower.

the instructions had warned me that i needed to install gapps immediately after flashing the system ROM otherwise there'd be issues. but i wasn't able to do that because the phone had restarted on its own the first time, which seemed to mess everything up. the only solution was to either erase the data partition or reset to factory default. i ended up going with the factory reset, before reinstalling the lineageOS ROM one final time followed by gapps installation.

i rebooted and this time it was something different. it gave me the welcome screen, as if i was a new user. i asked it to restore some data from my google account. i then watched as the phone rebuilt itself piece by piece. icons were greyed out but then activated once the corresponding app was installed. once all 133 apps were finally installed back onto my phone, the icons were different, i lost my icon pack setting. i went to the google play store looking for the matching icon pack but i couldn't find it. by then it was already after 2am, so i decided to go to bed, working on the phone again tomorrow.