[Google Pixel 3 Questions & Answers] John M Michael:
Hi,

This is my first adventure with custom ROM. I hope to be on the good forum.

I installed LINEAGEOS 17.1 Official on my new pixel 3. It works fine but some very useful apps do not work. Probably problem with microg. So i decided to install lineage-17.1-20210107-microG-blueline.zip

The install failed because of "Signature verification failed".

According to this post on Github I intend to spoof signature by myself. I had some difficulties to extract public signature from update-binary file but i succed manually.

I worked on my linux (Ubuntu 20.04) PC on which i had downloaded lineage-17.1-20210107-microG-blueline.zip and where adb and fastboot run. The following describe what i intend to solve the problem but it has not be sufficient :

a) On the device running LineageOs Legacy i boot lineage 17 recovery (it was previously installed on the device when i installed official LineageOS 17).​

$ adb reboot bootloader​

b) I boot into recovery and did that on the device :​

- Factory reset (Factory Reset -> Format data)​

- enable ADB (Advanced -> Enable ADB)​

c) I got and extract lineage-microg public key​

$ wget https://download.lineage.microg.org/extra/lineageos-for-microg-keys-migration.zip[/INDENT][/INDENT][/INDENT]
[INDENT=2][INDENT=2][INDENT=2]$ unzip -p lineageos-for-microg-keys-migration.zip META-INF/com/google/android/update-binary > update-binary[/INDENT][/INDENT][/INDENT]
[INDENT=2][INDENT=2][INDENT=2]$ cat update-binary | (grep release_key= update-binary | cut -d '"' -f 2 | fold -w 64) > update-payload-key.pub.pem​

NB : that is where i didn't exactly did what is said in the post because i didn't understood the commands. I use linux for 15 years but i'm not a professional.​

d) I pushed the new public key to the device​

$ adb push update-payload-key.pub.pem /system/etc/update_engine/[/INDENT][/INDENT][/INDENT]
[INDENT=2][INDENT=2][INDENT]e) I also decided to fix the manual prompt for signature verification and provided my own otacerts.zip and extracted cert from lineage-os-microg zip[/INDENT][/INDENT][/INDENT]
[INDENT=2][INDENT=2][INDENT=2][ICODE]$ unzip -p lineage-17.1-[BUILD]-microG-[DEVICE].zip META-INF/com/android/otacert > cert.x509.pem​

f) I pulled and extracted otacerts from device​

$ adb pull etc/security/otacerts.zip[/INDENT][/INDENT][/INDENT]
[INDENT=2][INDENT=2][INDENT=2]$ mkdir otacerts && cd otacerts[/INDENT][/INDENT][/INDENT]
[INDENT=2][INDENT=2][INDENT=2]$ unzip ../otacerts.zip​

g) I replaced certs and bundled all this​

$ cp ../cert.x509.pem vendor/lineage/build/target/product/security/lineage.x509.pem[/INDENT][/INDENT][/INDENT]
[INDENT=2][INDENT=2][INDENT=2]$ cp ../cert.x509.pem lineage/signing/signing-keys/releasekey.x509.pem[/INDENT][/INDENT][/INDENT]
[INDENT=2][INDENT=2][INDENT=2]$ zip -r otacerts.zip .[/INDENT][/INDENT][/INDENT]
[INDENT=2][INDENT=2][INDENT=2]$ adb push otacerts.zip /system/etc/security/[/INDENT][/INDENT][/INDENT]
[INDENT=2][INDENT=2][INDENT=2]$ cd ..​

f) then i applied the update​

- Enable sideload on the device (Apply update -> Apply from ADB)​

g) and pushed the lineage-microG zip​

$ adb sideload llineage-17.1-20210107-microG-blueline.zip​

​

Unfortunately the recipe succeed in suppressing the "Signature verification failed" but not the final error.

Here are the informations given by the device :

Finding update package...​

Opening update package...​

Verifying update package...​

E:failed to verify whole-file signature​

Update package verification took 38.2 s (result 0).​

Installing update...​

Step 1/2​

Error applying update: 26 (ErrorCode:kDownloadMetadataSignatureMismatch)​

E:Error in /sideload/package.zip (status 1)​

​

Install completed with status 1.​

Installation aborted.​

​

Well, finally my Pixel 3 remains in LineageOS Legacy.

I didn't find a lot of threads upon my problem on the web. Is there somebody here who can help me solving this problem ? It would be great. Thanks for help.