Today, i had planned to finish going over the assembly language lectures that happened last week.

I am struggling to finish it. I’d rather do a bunch of other stuff. Maybe its my mindset.

So I looked for other intresting things to do. I wanted to use my old Indian phone as a camera for zoom calls. But I had to root it for convenience sake.

Why can’t I do that without rooting? This phone (LG g7 Thinq plus) needs me to manually switch on usb tethering everytime I reconnect for ADB to work. Rooting would allow me to configure it such that upon reconnect, USB tethering is switched on automatically.

Can’t it stream over wifi? It can, but my router is far and I think cable would ensure better quality and less lag. (Just my intuition, I maybe wrong)

So I went about rooting my phone. This actually started yesterday night.

Unlocking the bootloader required me to me enter EDL mode and read and modify four specific partitions of data using Qualcomm Flash Image Loader (QFIL). (things used to be simpler)

Finally got the bootloader unlocked. Wait actually there was a hickup. I read and modified the partition data using QFIL but to restore it, my phone wouldn’t boot into EDL mode I finally realised i could restore those partitions with fastboot. Alright, made it so far. Bootloader Unlocked! Now, I downloaded a stock image 3.5 gigs and flashed it. It got bricked, stuck in boot loop. I managed to get it into download mode again and flashed another more recent firmware. Boots, But not root yet.

Searched for guides, found nothing specific for my phone.

I looked up a general procedure that used magisk app to patch the boot partition. To extract the boot partition, it was another hassle, as LG release .kdz files. Had to convert that to .dz using a python script i found online and and extracted boot.img using another windows application i found online. Finally fed the boot.img to magisk, it spat out a patched boot.img which i overwrote on both A and B boot partitions (might’ve been a stupid move, but the guide asked me to lol) and voila i was stuck in another boot loop.

This one did not allow me to evern switch off the phone so I could boot into fastboot. I had to wait for it to die. After the power died, i powered it backup. It booted up and asked for a screen pattern. It did not accept the one I had set. Wierd. Googled a bunch of stuff. Found nothing.

Then booted to fastboot, flashed the backed up boot.img i had. Still same issue. Reflashed the firmware and i got back to a working phone.

This time I did not set the screen lock. That magically allowed USB debugging to work without me having to switch on USB tethering everytime I reconnect.

TLDR; Bricked it a couple of times, finally flashed the stock and did not set a screen lock. That somehow allowed USB debugging to work without me having to switch on USB tethering everytime I reconnect.

Learning

  1. I am trying to change my mindset to one of progress than results. I think that would help.
  2. Vague idea of how fastboot, download mode, boot and other partitions work on Android devices.
  3. Try unconvential stuff. Research before trying a solution/whats in my head.
  4. Learnt to setup a blog using github.