no permissions (user in plugdev group; are your udev rules wrong?)

While trying to use ADB on a Linux Computer, I received the following error from “adb devices”

no permissions (user in plugdev group; are your udev rules wrong?);

Not exactly sure what causes the above error, but the information in the following Stack Exchange link was helpful.

https://stackoverflow.com/questions/53887322/adb-devices-no-permissions-user-in-plugdev-group-are-your-udev-rules-wrong

I was able to get around the issue by putting the USB option to “File Transfer Mode” from the notifications menu

How to Restore Pixel to Factory Image

Restoring a Pixel to the factory image is a pretty straight forward operation if you are familiar with fastboot and adb. This guide assumes you have fastboot already installed and setup in your user path. If not you can refer to the following link for more information.

WARNING – THESE STEPS WILL DELETE ALL USER DATA OFF THE DEVICE.

https://developers.google.com/android/images#instructions

1. Download OTA Image

Go to the following link and download the Factory Image for your device

https://developers.google.com/android/images

Extract the file and then open a terminal or command prompt in that directory.

2. Boot up Pixel in recovery

You can do this with “adb reboot recovery” or with the volume key to boot into the Android boot menu.

3. Flash Image

On Windows you can flash the firmware with

flash-all.bat

Or on Linux

./flash-all.sh

Should take it a couple of minutes to complete.

Next we can lock bootloader with

fastboot flashing lock

You will need to confirm the lock on your phone.

TWRP – ADB Sideload

Go to https://twrp.me/Devices and download the correct version TWRP for your device.

Boot into boot loader menu

Plug you phone into a computer that has fastboot installed and run

sudo fastboot boot Downloads/twrp-3.3.0-0-sailfish.img

Note you may need to unlock your boot loader.

Your phone should now boot up into TWRP

Boot into TWRP

Swipe to Allow Modifications

Select Advanced

Select advanced

Then hit ADB Sideload.

Swipe to start the sideload and then sideload from your computer

adb sideload image.zip

More detailed explaination
https://www.cyanogenmods.org/adb-sideload-twrp/

Installing LineageOS 17 Android 10 on Pixel

https://forum.xda-developers.com/pixel-xl/development/rom-lineage-17-0-pixels-marlin-sailfish-t3971039

Download twrp from here
Download LineageOS 17 from here

Boot phone to boot menu then fastboot twrp

sudo fastboot boot Downloads/twrp-3.3.0-0-sailfish.img

Wipe to factory defaults

Side load LineageOS Android 10 from the Advanced page on TWRP

adb sideload Downloads/lineage-17.0-withMTG-20191217-UNOFFICIAL-sailfish.zip 

Reboot and setup.