Sunday, May 15. 2022
Installing magisk in my lineage phone
A very quick personal entry to summarize how to install magisk in my lineage device. It seems that now every time the OS is upgraded magisk should also be re-installed on it. The procedure is described in the project documentation but I prefer my usual detailed steps.
Download and install/upgrade the latest magisk app on the phone once it is upgraded.
Magisk need to patch the boot.img of the lineage distribution. Download the used lineage bundle for your phone.
Install python and the protobuf package on your laptop in order to extract the zip.
dnf install python python-protobuf
Download extract_android_ota_payload tool and execute it over the zip file.
wget https://raw.githubusercontent.com/cyxx/extract_android_ota_payload/master/extract_android_ota_payload.py wget https://raw.githubusercontent.com/cyxx/extract_android_ota_payload/master/update_metadata_pb2.py python extract_android_ota_payload.py lineage-18.1-YYYYMMDD-nightly-XXX-signed.zip . Extracting 'payload.bin' from OTA file... Extracting 'boot.img' Extracting 'system.img'
Use adb to push the image to the phone:
adb push boot.img /sdcard/Download/
Open the application on the phone, click install, Select and patch File and locate the image. Click Let's go. A patched magisk_patched-XXXXX_XXXXX.img is generated. Copy it to your laptop.
adb pull /sdcard/Download/magisk_patched-XXXXX_XXXXX.img
Now just flash the new boot image to your phone.
adb reboot-bootloader fastboot devices fastboot flash boot magisk_patched-XXXXX_XXXXX.img
And that is all. Magisk is installed and now my firewall can be configured again.
Regards!
Saturday, January 23. 2021
Pissed off about installing updates at shutdown
Today the entry is just a quick one to show my complete disagreement about automatic software updates at shutdown/reboot. I really do not know if I have understood this completely (not much information is available or it is really hard to find) but I am not going to spend more time on this shit.
First I detected in my fedora laptop that, after upgrading to version 33, when I powered off the computer the popup window showed a check with an option to install pending software updates, and it was ticked by default. I do not know why it was activated, I have never manually clicked it before or manually enabled something (at least that I am aware of it). I think that it is because of the upgrade to gnome 3.38 but not sure. Maybe if I had unchecked the option it would have remained unchecked for the next shutdown or restart, I do not know. This was the window but with the checkbox ticked.
In my laptop I just removed the package-kit to avoid this nonsense completely. The option and the check are not even shown now at shutdown.
dnf remove gnome-packagekit-common PackageKit
But the biggest surprise came later from my desktop. It is a testing debian box and I upgraded it a few days ago. It was almost midnight and I power it off just going to sleep. The fucking box appeared enabled by default and I was so fast that I clicked the power off button mechanically. I had just the time to see that I had screwed it up. As I commented several times in the blog my sansumg TV does not send the modelines to my PC, so I have to set them forcefully and the console is lost. So the upgrade started and I could not see it. After some minutes I decided to force the shutdown and start the machine again. Obviously I needed to connect from my laptop (switching it on) and run a reconfigure, finish the upgrade and fix some issues with a corrupted locale. It could have been worse. I also removed the package-kit again to avoid this shit.
apt-get remove packagekit
It was 1 a.m. when I went to the bed that day. Thanks a lot!
I was searching about this behavior and found nothing. I do not know why the checkbox appeared clicked in my two computers (fedora and debian) or if it can be disabled or defaulted to unchecked. Removing package-kit seems to work for me. I hate when linux picks up windows habits. If you are not careful you will start an upgrade (how long could it be?) when you are shutting down your PC. Maybe you are in a hurry but, what the hell! Upgrade it now! I do not know if I am the only one seeing this nonsense but I have a terrible feeling that I will suffer this again.
Please default the option to disabled! Or give an easy way to disable it!
Tuesday, April 30. 2019
Upgrading tissot to LienageOS 16
Just a very quick entry today. The previous weekend I wasted a lot of time trying to upgrade my phone to LineageOS 16. In general I followed the upgrading guide for my phone model but when I started the adb sideload it always failed with the error: "Error applying update: 7(ErrorCode:: kInstallDeviceOpenError)". I tried Friday evening with no success, I was searching for information a couple of hours at Saturday and I finally got it working on Sunday. I think summarizing what was needed in the blog would be better, maybe it is useful for someone else.
In general the reason seems to be that tissot (my phone model, Xiaomi Mi A1) needs something special in the TWRP boot loader. Finally I got it working after reading this beautiful issue. The problem is explained by the maintainer himself in this thread. My model, unlike most of the usual A/B devices, has a weird partitioning where most partitions are not slotted (except of boot, system, modem). By default, TWRP does not expect to have any non-slotted partition in the A/B OTA package. That is why the installation fails on all TWRP packages except the one provided by the maintainer. So, if having this model, you need to download that exact TWRP image in order to upgrade the system.
After using the correct TWRP version everything went successfully and I have LineageOS 16 in my phone. The main problem was finding the issue, I needed to google a lot until I found that page which described my exact problem.
Regards!
Comments