Flashing Factory 8.1 - After ADB Reboot Bootloader: Error "Connect USB Data Cable" - Nexus 6P Q&A, Help & Troubleshooting

Flashing Factory 8.1 - After ADB Reboot Bootloader: Error "Connect USB Data Cable"
GOAL: flash factory stock 8.1 image on phone purchased from Swappa. Why? To eliminate any possibility of any lingering software (e.g. Cerberus) that might have been installed by the previous owner.
PROBLEM: after issuing command ADB Reboot Bootloader at Windows terminal, the phone boots in to bootloader mode, but says, Connect USB Data Cable despite the fact that it is, in fact connected to my Win10 computer via a USB cable (the very same one that forced the phone to reboot into bootloader mode).
{
"lightbox_close": "Close",
"lightbox_next": "Next",
"lightbox_previous": "Previous",
"lightbox_error": "The requested content cannot be loaded. Please try again later.",
"lightbox_start_slideshow": "Start slideshow",
"lightbox_stop_slideshow": "Stop slideshow",
"lightbox_full_screen": "Full screen",
"lightbox_thumbnails": "Thumbnails",
"lightbox_download": "Download",
"lightbox_share": "Share",
"lightbox_zoom": "Zoom",
"lightbox_new_window": "New window",
"lightbox_toggle_sidebar": "Toggle sidebar"
}
Of course, I do notice that the above screen says, device is LOCKED, but my belief is that the bootloader on this phone is UNlocked. Why? Two reasons. (1) Because that's the way it was described in the Swappa listing. (2) the Developer Options \ OEM unlocking is set to "allow the bootloader to be unlocked."
By the way, if (while the phone is in bootloader mode) I run the flash-all.bat script, I get these errors:
C:\Users\me>"C:\BIN\angler-opm1.171019.011-factory-39448337\angler-opm1.171019.011\flash-all.bat"
error: cannot load 'bootloader-angler-angler-03.78.img': No such file or directory
rebooting into bootloader...
OKAY [ 0.022s]
finished. total time: 0.023s
error: cannot load 'radio-angler-angler-03.85.img': No such file or directory
rebooting into bootloader...
OKAY [ 0.022s]
finished. total time: 0.023s
W/ziparchive( 6844): Unable to open 'image-angler-opm1.171019.011.zip': No such file or directory
error: failed to open zip file 'image-angler-opm1.171019.011.zip': I/O error
Press any key to exit...
Click to expand...
Click to collapse
With the phone in normal mode (booted up normally), and then run ADB devices the system returns
List of devices attached
myserialnumber device
Click to expand...
Click to collapse
so I know that the computer and phone are talking. Immediately after that, if I try to run the same (flash-all.bat) command when the phone is not in bootloader mode, I get back waiting for any device as though computer and phone cannot communicate.
I am so confused. :cyclops:
What am I doing wrong?

UPDATE:
I just realized that I needed to issue the command fastboot flashing unlock at a Windows terminal prompt, then select (on the phone) to unlock the bootloader.
Furthermore.... I just noticed that in the Windows Termminal, I needed to navigate to the folder containing the IMG file to be flashed before running the flash-all.bat script. Since that location wasn't in my Windows 10 computer's PATH command, the script couldn't "see" the IMG file, which explains the errors above.

UPDATE # 2 - Solved
1. At windows terminal, issue command "adb devices" (to verify that computer and phone are connected).
2. At windows terminal, issue command "fastboot flashing unlock" then on phone choose the option to unlock bootloader.
3. At windows terminal, issue command adb reboot bootloader or on phone, with phone off, press power and volume-down simultaneously.
4. At windows terminal, with prompt located at the same drive and folder where the IMG you want to flash is located, run the flash-all.bat script.
5. After new OS is installed and phone reboots, then at Windows Terminal, , issue command "fastboot flashing lock" then on phone choose the option to re-lock bootloader. This will wipe the phone, reinstall the OS and reboot the phone.
There may be (probably are) smarter and better ways to skin this cat. If so, I hope that someone smarter than me will add that in the comments to help anyone who reads this thread.

Related

Nexus 4 Not Recognized by ADB in Mac OS X

Hi Folks,
I am running Mac OS X 10.8.2 and I have ran into the following issues. I am trying to root a friend's Nexus 4 that's on 4.2.2, unlocked bootloader and USB debugging enabled/on.
I can easily root this on my Windows desktop but I thought I'd try out the Mac. Do note that I am not getting the "Allow USB Debugging" message that pops up on the phone when you connect it to a computer normally and you select Allow for the respective RSA key. The one that shows up after 4.2.2 is updated from 4.2.1.
I am not getting the above prompt when hooking up the phone to my Mac. *PS I removed the name of my MBP pro and the user name.
Okay so here are the two issues/scenarios:
1) I downloaded the latest ADB and Fastboot Mac OS X 64 bit files from the ADB dev tools website, etc. The files are "adb" and "fastboot"
When I type "./adb devices" since the "./" command is for Mac on the terminal, I get the following message and it does not show up any device listed.
{
"lightbox_close": "Close",
"lightbox_next": "Next",
"lightbox_previous": "Previous",
"lightbox_error": "The requested content cannot be loaded. Please try again later.",
"lightbox_start_slideshow": "Start slideshow",
"lightbox_stop_slideshow": "Stop slideshow",
"lightbox_full_screen": "Full screen",
"lightbox_thumbnails": "Thumbnails",
"lightbox_download": "Download",
"lightbox_share": "Share",
"lightbox_zoom": "Zoom",
"lightbox_new_window": "New window",
"lightbox_toggle_sidebar": "Toggle sidebar"
}
Then when I type "./adb reboot-bootloader", I get the following:
__________________________________________________________________________________________________________
2) When I use an older adb and fastboot files from last year: "./adb_Mac" , "./fastboot_Mac" and "ADB-Install-Mac.sh", I get the following:
When I type in the adb devices command and the adb reboot-bootloader command:
The serial # shows up this time (Again I have crossed out half of it lol)
When typing in the reboot-bootloader command:
Now to my knowledge, I know that I am getting the device offline mode based on using the old ADB and Fastboot files. So the way to fix it, is to download the updated files but it doesn't result in anything at all.
With the updated ADB and fastboot files, and by booting into fastboot mode manually and then typing in ".fastboot devices", I get the Error Could Not Get Pipe Properties error in a loop.
Would appreciate the help folks!
T.I.A
Try this command
adb kill server
adb start server
scream4cheese said:
Try this command
adb kill server
adb start server
Click to expand...
Click to collapse
Beauty! I didn't know that it has to be done for the same in OS X. Query, does this have to be done every time or?

Root Nexus 4 on Linux

I just rooted my Nexus 4 using Ubuntu 12.04.
The instructions I found weren't quite what I'd liked them to be, none of them were for Linux and I had to do quite a bit of trial and error.
I know that a few years ago I wouldn't have been able to do it with those instructions.
So I thought I'd write down what I did so others can do it easier and faster than me.
To be able to easily understand this guide you need to know the basics about using a terminal, but other than that I'm trying to not to require the reader to know anything.
If you use another Linux distro everything should work pretty much exactly the same, but for the additional packages I had to install, but their name should be easy to guess because they are usually similar across distributions and how you install them should be explained in the documentation of your distro.
Connect your Nexus 4 to your computer using an USB cable.
First I downloaded the ADT Bundle from there developer.android.com/sdk/index.html and unpacked it into a new folder. Doesn't matter where, I'll use ~/androidSDK in those instructions. The tools which you need to root your phone are ~/androidSDK/adt-bundle-linux-x86-20130514/sdk/platform-tools/adb and ~/androidSDK/adt-bundle-linux-x86-20130514/sdk/platform-tools/fastboot
"x86" means I downloaded the 32bit version and "20130514" is the date of when the version I'm using was published, that will most likely be different for other people.
Now most likely adb and fastboot won't run yet (if you run them it will tell you something like "~/androidSDK/adt-bundle-linux-x86-20130514/sdk/platform-tools/adb: error while loading shared libraries: libncurses.so.5: cannot open shared object file: No such file or directory"). To fix this you need to install the packages "lib32ncurses5" and "lib32stdc++6". You can run the following command to do that:
Code:
sudo apt-get install lib32ncurses5 lib32stdc++6
(got that from there: stackoverflow.com/questions/10005907/eclipse-android-plugin-libncurses-so-5)
For adb to work you also need to activate USB debugging: Go to Settings->About phone and tap "Build Number" until it says you are developer. Then a new entry will appear in "Settings", called "{ } Developer options". Check the box next to "USB debugging", confirm with ok.
Now you need to backup everything on your Nexus 4 because it will be wiped while rooting. You can do this by running:
Code:
cd ~/androidSDK/adt-bundle-linux-x86-20130514/sdk/platform-tools
(in the future I'll assume you stayed inside that directory)
Code:
./adb backup -apk -shared -all -system
Before this command can finish you need to confirm on your Nexus 4 that it's okay to do that backup (just do what it says on it's screen).
This will put a file named backup.ab in the current directory. You can change the name and location of that file using the -f paramter, if you want.
Run
Code:
./adb reboot bootloader
to boot into the bootloader. After a moment the Nexus 4 should display something like this:
{
"lightbox_close": "Close",
"lightbox_next": "Next",
"lightbox_previous": "Previous",
"lightbox_error": "The requested content cannot be loaded. Please try again later.",
"lightbox_start_slideshow": "Start slideshow",
"lightbox_stop_slideshow": "Stop slideshow",
"lightbox_full_screen": "Full screen",
"lightbox_thumbnails": "Thumbnails",
"lightbox_download": "Download",
"lightbox_share": "Share",
"lightbox_zoom": "Zoom",
"lightbox_new_window": "New window",
"lightbox_toggle_sidebar": "Toggle sidebar"
}
(image stolen from reviews.cnet.co.uk/mobile-phones/how-to-root-your-google-nexus-4-50010361/)
Now the actual unlocking happens: Enter
Code:
sudo ./fastboot oem unlock
Maybe try without sudo first (just leave it out), but it only worked with sudo for me; without sudo it displayed "waiting for device" forever and I needed to abort with Ctrl+C.
Download SuperSU from there http://download.chainfire.eu/supersu (at the moment "CWM-SuperSU-v0.98.zip").
Put that file on your Nexus 4 any way you want, one possible way is to do:
Code:
./adb push ~/CWM-SuperSU-v0.98.zip /sdcard/
That assumes you downloaded SuperSU to your home directory. For that to work you need to activate USB debugging again (it was deactivated during unlocking).
Download the Nexus 4 "Touch Recovery" from www.clockworkmod.com/rommanager.
I guess you shouldn't need the touch version, but it's more comfortable for sure. When I downloaded it the file was named "recovery-clockwork-touch-6.0.4.7-mako.img" and that's what I'm going to use when I give you commands to run.
This "Touch Recovery" needs to be installed to the Nexus 4. To do this first boot into the bootloader again:
Code:
./adb reboot bootloader
And then flash the file using the fastboot utility:
Code:
sudo ./fastboot flash recovery recovery-clockwork-touch-6.0.3.1-mako.img
(if it needed sudo the last time it will need it again, if not, not)
Now go to the recovery mode (use volume buttons to navigate and power to confirm).
Tap "install zip from sdcard"
Tap "choose zip from sdcard"
Tap "0/"
Find the SuperSU .zip file you put on the phone earlier (tip: scrolling works as usual by swiping or if you want with the volume buttons) and tap on it.
Confirm that you really want to install it.
Boot into Android again and restore the backup you made earlier (if you made one).
Code:
./adb restore backup.ab
You need to confirm that command on the Nexus 4.
As you are now finished you can of course disconnect your Nexus 4 from your computer.
You should be finished now. Unless I remembered something wrongly when writing this because I mostly wrote this from memory, after rooting my Nexus 4. If something doesn't work as I claim then please tell me and I'll fix it (possibly eventually).
I myself followed those instructions http://forum.xda-developers.com/showthread.php?t=2018179 as far as possible and then googled what didn't work or just tried around for a bit.
Edit: As of now (18.8.14), those instructions should still work.

Forgot pattern and cannot recover- nexus 4 with android 5+ lollipop

Hello.
I've repaired a nexus 4 screen and digitizer but I got it back because my friend can't recover access from a forgotten pattern lock.
He is running stock android 5 lollipop and he doesn't get the email recovery option when he inputs wrong pattern. I've searched even in google support but I didn't find a solution to recover his photos.
My main concern is to recover files and photos!!! There isn't a reason to suggest a factory reset....
--Phone Status---
Boot loader seems unlocked "Locked state is marked as unlocked in bootloder in red letters" while secure boot is enabled in green letters
USB debugging seems OFF: There is no android device listed in device manager. I only get a music player in disk drives which is empty.
adb devices command in bootloader recognises it
When entering to recovery I get the message "no command" along with the icon of an android under repair.
No dropbox no google+ photos backup
---What I've tried---
UPDATE: Managed to flash TWRP 2.7.1.0 I can see the files but since usb flash drive doesn't work I can't copy the files...
Android Device manager: Returns error that the phone is already locked and there is no need to apply new password.
Tried about 30 wrong patterns and it didn't came up the google mail recovery option.
Tried during a phone call to see the files but I only managed to turn on WiFi.
{
"lightbox_close": "Close",
"lightbox_next": "Next",
"lightbox_previous": "Previous",
"lightbox_error": "The requested content cannot be loaded. Please try again later.",
"lightbox_start_slideshow": "Start slideshow",
"lightbox_stop_slideshow": "Stop slideshow",
"lightbox_full_screen": "Full screen",
"lightbox_thumbnails": "Thumbnails",
"lightbox_download": "Download",
"lightbox_share": "Share",
"lightbox_zoom": "Zoom",
"lightbox_new_window": "New window",
"lightbox_toggle_sidebar": "Toggle sidebar"
}
When you say the USB flash drive doesn't work, do you mean the USB port in the phone?
MTP doesn't always work in TWRP, meaning it won't show up as a normal usb drive on a pc. ADB will still work though, you have to set up ADB on your computer, boot into twrp on the phone and use 'adb pull' to copy the files to the computer. On windows you will need to download adb and the drivers, I use http://www.koushikdutta.com/post/universal-adb-driver
I'm trying to install the drivers for adb but I cannot find the right one.
Edit: Also it cannot be detected from boot loader now. I'll try in a pc that already has been connected and worked.
I have adb and fastboot installed already and worked with this and my own phones.
Edit: It seems to be a lost cause the phone fell down many times. Don't bother maybe I'll solder a usb port first... if it is possible with my less than basic equipment.
There are many methods on the following page,
http://forum.xda-developers.com/showthread.php?t=2620456
The way I did it was an alternative version of method 5 while in twrp.
Method 5 - alternatively, Mount system in twrp and delete the file /data/system/gesture.key
If it asks for a pattern on boot just try any random pattern it should let you in. I did this when a version before lollipop was installed but there is no reason it shouldn't work on lollipop as the same file is saved in the same location, just checked.
Using adb
adb shell rm /data/system/gesture.key
Click to expand...
Click to collapse

Install TWRP Without Root. Xperia Z1 Lollipop 5.1.1

Fast go to the Setting/About phone then tap the "Build number" 5 time .
Then back now you show the "Developer options" Open it
then "On" it and on the "USB debugging" option .
Now Power Off your phone ,
Now Hold the 'Volume UP' button and connect with your pc.
Install ABD Driver on you pc.
If you don't have ADB Driver : www.mediafire.com/file/8p39tf9zudil916/adb-setup-1.4.3.exe
Download This File : www.mediafire.com/file/pvapp0t3oz2ty9m/Twrp.zip
Unzip The file , open folder , hold the "Shift Key" + Right Click !
Click "Open Commend windows here"
CMD commands :
fastboot devices
fastboot flash boot boot.img
fastboot reboot
Now press the Volume UP Button 10 Time..
Or, If you still have any problem check The Video : https://www.youtube.com/watch?v=qNbaHaBeZFo&feature=youtu.be
WoW You Have Done The work,:fingers-crossed: Enjoy IT..:good:
File Is Here !!!
If you don't have ADB Driver : www.mediafire.com/file/8p39tf9zudil916/adb-setup-1.4.3.exe
Download This TWRP File : www.mediafire.com/file/pvapp0t3oz2ty9m/Twrp.zip
I was under the impression that you cannot flash a kernel when the bootloader is locked?
Instead of making mirrors link the adb tools to its thread instead
[OFFICIAL][TOOL][WINDOWS] ADB, Fastboot and Drivers - 15 seconds ADB Installer v1.4.3
https://forum.xda-developers.com/showthread.php?t=2588979
flash boot
emon415 said:
Fast go to the Setting/About phone then tap the "Build number" 5 time .
Then back now you show the "Developer options" Open it
then "On" it and on the "USB debugging" option .
Now Power Off your phone ,
Now Hold the 'Volume UP' button and connect with your pc.
Install ABD Driver on you pc.
If you don't have ADB Driver : www.mediafire.com/file/8p39tf9zudil916/adb-setup-1.4.3.exe
Download This File : www.mediafire.com/file/pvapp0t3oz2ty9m/Twrp.zip
Unzip The file , open folder , hold the "Shift Key" + Right Click !
Click "Open Commend windows here"
CMD commands :
fastboot devices
fastboot flash boot boot.img
fastboot reboot
Now press the Volume UP Button 10 Time..
Or, If you still have any problem check The Video : https://www.youtube.com/watch?v=qNbaHaBeZFo&feature=youtu.be
WoW You Have Done The work,:fingers-crossed: Enjoy IT..:good:
Click to expand...
Click to collapse
Hi i think i have a problem with the guide as you said i installed adb drviers and i opend cmd in the following location but when i turn my phone off then holding the volume up button and connect it to pc i hear that phone is connected and I see a blue light in notification light as well but i cant use the commands cause it wont show any device is connected
(Im already in dev mode and debuging usb is on)
thanks in advanced
HELP!installed driver! fastboot mode not work!I tried almost everything!
there is twrp 2.8.6.0 I want to update 3.3.1
{
"lightbox_close": "Close",
"lightbox_next": "Next",
"lightbox_previous": "Previous",
"lightbox_error": "The requested content cannot be loaded. Please try again later.",
"lightbox_start_slideshow": "Start slideshow",
"lightbox_stop_slideshow": "Stop slideshow",
"lightbox_full_screen": "Full screen",
"lightbox_thumbnails": "Thumbnails",
"lightbox_download": "Download",
"lightbox_share": "Share",
"lightbox_zoom": "Zoom",
"lightbox_new_window": "New window",
"lightbox_toggle_sidebar": "Toggle sidebar"
}

[Root Guide] INSTALL ROOT / WITHOUT RECOVERY / ADB-FASTBOOT / MAGISK

Hello, first of all I apologize for my English if you don't understand me somewhere, I'm learning English. Greetings from Peru.
Files and programs you need to download​THIS PROCESS WORKS WITH ALMOST ALL DEVICES, ONLY IF THEY HAVE THE BOOTLOADER CORRECTLY UNLOCKED WITHOUT THE NEED OF A TWRP.
In the computer​1- Lenovo Rescue and Smart Assistant, will help you in 2 things: In case your device is frozen or in a loop, there you can recover it and right there you can find and download the ROM of your device for free.
As you can see in this image my device is already selected and the ROM is already downloaded (just follow the steps and your device will be fine again)
{
"lightbox_close": "Close",
"lightbox_next": "Next",
"lightbox_previous": "Previous",
"lightbox_error": "The requested content cannot be loaded. Please try again later.",
"lightbox_start_slideshow": "Start slideshow",
"lightbox_stop_slideshow": "Stop slideshow",
"lightbox_full_screen": "Full screen",
"lightbox_thumbnails": "Thumbnails",
"lightbox_download": "Download",
"lightbox_share": "Share",
"lightbox_zoom": "Zoom",
"lightbox_new_window": "New window",
"lightbox_toggle_sidebar": "Toggle sidebar"
}
Here you will find the ROM
as you can see, location, folder and files of the ROM (it is necessary that you know where it is since you will need some files later)
2-You need to have ADB/FASTBOOT installed to be able to install the ROOT (remember that this is the safe way, there is no risk of your device freezing or in a loop, but everything is possible).
Link : https://forum.xda-developers.com/t/...vers-15-seconds-adb-installer-v1-4-3.2588979/
on device​1- First of all, you have to have the bootloader unlocked, here I leave the guide since it is somewhat long to read
Link : https://www.mobilewithdrivers.com/download/unlock-bootloader/lenovo-tab-m10-fhd-plus-tb-x606f
2- After unlocking the bootloader, you have to have Magisk.apk installed on your device
Link : https://github.com/topjohnwu/Magisk/releases
3- After installing Magisk, on the main screen you have to see if Ramdisk is "yes" or "no".
It says "si" because my native language is Spanish.
4- Go back to the computer and in the ROM folder you have to find the file "boot.img" and copy it to your device
5- within Magisk where it says "install", they give it to install and something similar to this will come out:
6- They only give the following next "siguiente " and select the option of Select file "seleccionar y parchar un archivo" (I repeat again ignore if it comes out in Spanish, you in English)
7- from there the explorer will open and they will look for where they copied the "boot.img" and select it.
Once the selector is given to start or let's start "comencemos"
the process has to be something similar to the image that I will post below, you can several certain lines but at the end it has to say "done!" without any error.
8- Now to finish the process on your device, copy the file that appears in your magisk "the patched file". Copy and paste it into the ADB/FASTBOOT folder
we return to the computer​
1- First of all, you have to enable "usb debugging" on your device
Link : https://www.embarcadero.com/starthe...bling_usb_debugging_on_an_android_device.html
2- Now go to your ADB/FASTBOOT folder and in a blank part open "powershell",
Now go to your ADB/FASTBOOT folder and in a blank part open "powershell" .
Holding SHIFT and right clicking open POWERSHELL
now they write "cmd" without quotes so that inside PowerShell you can use it as cmd
3- Here I will explain it in a long but correct way without errors, do not turn off the computer and leave it on since you will write an ADB command to order the device to enter Fastboot mode.
By typing "adb devices" you will find out if the drivers are correctly installed and your computer, cmd and adb/fastboot should recognize it.
now type "adb reboot-bootloader" , this will command your device to reboot into "bootloader" mode
Now this part is important that you pay attention as some people make mistakes.
Once your device has rebooted and you get to the "fastboot mode" screen, you will type the following in powershell :
fastboot devices
If the following appears, it is because your computer detects your device in fastboot mode.
Now comes almost the end of this guide, to install root do the following.
To root your device they usually tell you to type the following "fastboot flash boot boot.img", but sometimes there are errors.
what you will do is the following :
once you have written the following
you are going to drag the "magisk patches" file to the poweshell
and you will have to leave the path where the saved file is (this is a safe way so that you do not get errors)
now you just hit "enter" and it will be installed on your device
Now to finish, restart the device, install "root checker" and you will realize that you have it activated.
attached image of my device "Tab M10 FHD 2nd TB-x606x" with the latest ROM installed, having ROOT, MAGISK and modules installed
THIS PROCESS WORKS WITH ALMOST ALL DEVICES, ONLY IF THEY HAVE THE BOOTLOADER CORRECTLY UNLOCKED WITHOUT THE NEED OF A TWRP.
If the guide helped you, please comment, if it didn't work for you, please comment as I will try to help you solve the problem.
Currently I will not be contributing more to the community since I do not have my own computer, the computer I use will only be there for a few days, after that they will take it away.
when I have a new computer, I will be sharing RecoveryTWRP for some devices modified by me or some other help that I am able to carry out and finish as a project.
I thank XDA for creating this space to help, guide and for everyone to learn in the process.
I send you greetings from Peru.
Nice, thank you very much, sir.

Categories

Resources