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.
I was able to get around the issue by putting the USB option to “File Transfer Mode” from the notifications menu
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
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
Or on Linux
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.
The following command will remove all saved networks from your Android Things devices.
adb shell am startservice -n com.google.wifisetup/.WifiSetupService -a WiFiSetupService.Reset
From the start menu search for “Edit environment variables for your account”
Click Path and then Edit.
Edit Environment Variables
Then click new and paste in the path to the ADB directory which should be
And hit OK
Adding ADB path
You should be good now. You’ll need to relaunch and Command Prompts you have open, but you should be able to run adb without having to navigate to the adb folder.
https://twrp.me/Devices and download the correct version TWRP for your device.
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
Then hit ADB Sideload.
Swipe to start the sideload and then sideload from your computer
adb sideload image.zip
More detailed explaination
Install Android Backup Toolkit
Unpack backup. Changes it from an ab to a tar file
java -jar abe.jar unpack ~/path/to/backup.ab ~/path/to/backup.tar
After thats complete, you can untar it. Change Desktop to the path you want to extract to.
tar -xvf ~/path/to/backup.tar -C ~/Desktop/
Install Android Studio. This will install the SDK and tools like adb and fastboot
here To run adb, you’ll need to be in the same directory as it, so open a Command Prompt and cd to the following directory. cd %APPDATA%..\Local\Android\Sdk\platform-tools
Full directory path is
On your Android device you will need to enable USB debugging from the developer options. Enable the developer options if you have not already.
When you plug your phone in it should ask you to Allow USB debugging. Hit OK to enable it.
Now run the backup command from your computer. Replace UserName with your computers User Name
adb backup -apk -obb -shared -all -f \Users\UserName\Desktop\android-backup.ab
On your phone you should get a window that shows Full Backup
Add optional password for backup and hit “Back up my data on phone”
Now Wait for it to finish…
Restore Backup adb restore C:\Users\UserName\android-backup.ab
Should get a restore window on your phone, hit restore and wait.
Errors error: device unauthorized.
This adb server's $ADB_VENDOR_KEYS is not set Try 'adb kill-server' if that seems wrong. Otherwise check for a confirmation dialog on your device.
USB Debugging is not allowed for computer. Try replugging the USB cable and accepting the USB Debugging.