@magnargj Success!!! Wow, finally...
Ok, assuming that the necessary tools like adb and fastboot are installed on the PC. The phone is in developer mode, bootloader is unlocked and usb debugging enabled.
- Download the latest twrp for the device, it is sufficient with the img file. Here: https://eu.dl.twrp.me/jasmine_sprout/
- Download the zip file with Android 9 as indicated by the ubports installer
- Turn on the phone in Fastboot mode (volume down + power).
- Boot the phone with the twrp img file: fastboot boot filename.img (No point in flashing twrp to the device, it worked fine just by booting with it)
- Just use the file manager (nautilus or whatever) and copy the zip file in point 2 above to the phone
- In twrp press the big install button in the main menu and browse to the zip file and flash
- Go to the big reboot button in the main menu and change slot to the other and repeat point 6.
- Reboot the phone into Android 9. Enable developer mode and usb debugging.
- Run the UBports installer and follow its instructions.
It worked!!! Finally.
BUT: USE A GOOD USB CABLE!!!!!!! Half of my problems were because the zip file was corrupted when transferred over to the phone. The first cable (which was the one that came with my pinephone) just didn't do the job. This caused error messages when attempting to flash.