Rebuilding Laptop OS

So I made the mistake of attempting to get 2FA setup to login to my Ubuntu MATE laptop (i.e.: How to Set Up 2-Factor Authentication for Login and sudo). Well, that didn’t go well. I’m pretty sure I had the same problem this time around as the last time — since my Home directory is encrypted, login couldn’t read the Google Authenticator config from my ~/.config/. Ended up locking myself out of my system, couldn’t access my encrypted home drive & ended up blowing my system away. Fortunately, I don’t usually save oo much to my local drive (for reasons like this) but I did lose some simple image work I was doing, so that kind of sucks…

Regardless: learned my lesson & will not be messing with 2FA on login for the foreseeable future =]

S Symbol: White: Cyan Glow
Recreating some of the icons I was working on before the wipe.

Magisk on Project Treble ROMs

So it looks like LineageOS 15.1 for the Xiaomi Mi MIX 2 is now Treble supported, which is apparently leading to Magisk issues, at least for me…:

Archive: /sdcard/
inflating: META-INF/com/google/android/update-binary
inflating: META-INF/com/google/android/updater-script
inflating: arm/magiskboot
inflating: arm/magiskinit
inflating: chromeos/futility
inflating: chromeos/kernel.keyblock
inflating: chromeos/kernel_data_key.vbprivk
inflating: common/
inflating: common/
inflating: common/magisk.apk
inflating: common/
inflating: x86/magiskboot
inflating: x86/magiskinit
inflating: META-INF/CERT.SF
inflating: META-INF/CERT.RSA
* Magisk v16.6 Installer
- Mounting /system, /vendor
mount: can't find /vendor in /etc/fstab
! Cannot mount /vendor
- Unmounting partitions
Updater process ended with ERROR: 1
I:Install took 4 second(s).
Error installing zip file '/sdcard/'

Hopefully there is a simple fix for this, but for right now, it looks like I’m stuck with root-less. XDA appears to be having issues as well, so I can’t look for my answer there. I guess that’s what I get for not reading changelogs before flashing ?

EDIT: 20180710-0900: So of course it was a simple fix… Just needed to update TWRP to the latest version, for me that’s: v.3.2.2-1.
I got some help from Jerry981028 on GitHub, who let me know what line supported recoveries need to have for Treble support: Android-Jerry/android_device_xiaomi_mido-twrp/twrp.fstab

Setting up an SSH Server on Android through Termux

After a little trial & error, I was finally able to get an SSH server running on Android through Termux. Some help from the following three articles as well:

You have to make sure you have the openssh package installed. If not, run pkg install openssh. Then start the service via sshd. Something I didn’t realize at first was that the default port was changed to 8022, instead of the standard 22. Fine by me, considering I wanted to change it from the default anyway.

Termux doesn’t support password authentication, & instead does it the more secure way, via keys. Below are the commands to get your keys setup properly.
touch ~/.ssh/authorized_keys
chmod 600 ~/.ssh/authorized_keys
ssh-keygen # You can follow all of the defaults here, unless you want to have a passphrase
cat ~/.ssh/ >> ~/.ssh/authorized_keys
chmod 600 ~/.ssh/authorized_keys

You then need to copy the id_rsa file (private key) to the device you want to connect from. To keep better track, I usually change the name of the file once it is on the other device. Keep in mind, the permissions on this file need to be changed as well. chmod 600 [file].

To connect, just run ssh [IP_Address] -p 8022 -i ~/path/to/private_key.

Sonic Mania

Loving the game so far… It looks like they finally learned what users wanted: a game truly modeled off the classic Genesis games, same graphics, music, level design… Happy to have my first Chaos Emerald with Knuckles too =]