yashsingh1/xdaforums huggingface dataset:
[Android General] Alberto96:
In order to keep this thread clean, please use this one to discuss about Development, Support or Software Updates.​

HOW-TO Root, Install Custom Recovery (TWRP) and Restore Stock ROM guide: https://docs.google.com/presentation/d/1NJcDBkLk8zMwyv2BTqRjn2NB_ZOWKjP1fRpSVr44Oxk

ROMs:

To avoid any possible issue, do not forget to backup your NVRAM so that you won't risk to lose your IMEI. How-to: http://www.anythingultimate.in/2015/11/how-to-backup-your-nvram-partition.html

Stock (Android 7.0)

- 20170914 V3.06: https://drive.google.com/file/d/0B2UgfPwW3cDUZWkwLXNjUVBXbFk/view

DO NOT USE THE "Format All & Download" OPTION IF YOU CARE ABOUT YOUR IMEI! Choose "Firmware Upgrade" instead.

Previous Releases:

None yet.

Flash Tool

- Latest SP Flash Tool for Windows and Linux: https://mega.nz/#F!dYUm0TbB!SWeMLb5Wu1NbRzTPQ8-s_A​

Recovery:

- TWRP 3.1.1 by [MENTION=2022881]vps[/MENTION]56 : https://yadi.sk/d/2Cskfu-M3NxP3q (no scatter included, please grab it from the Stock ROM)​

Root:

Rooting Methods (if you are on Stock ROM)

- SuperSU (flashable using TWRP): http://xdaforums.com/apps/supersu

- Magisk (flashable using TWRP): https://xdaforums.com/apps/magisk/beta-magisk-v13-0-0980cb6-t3618589​

Extras (Root-Only):

Customization

- Xposed Framework: http://xdaforums.com/showthread.php?t=3034811​

Useful Third-Party Apps:

Battery Life

- Amplify: https://play.google.com/store/apps/details?id=com.ryansteckler.nlpunbounce&hl=en

- Greenify: https://play.google.com/store/apps/details?id=com.oasisfeng.greenify&hl=en​
[Android General] davde1:
I've tried to install Xposed (this exact version: xposed-v89-sdk24-arm.zip)

The device stay stuck at boot and only if I go to the recovery to install the xposed uninstaller zip I can restore the proper boot

May I ask if someone has solved this issue?
[Android General] DavidExtream:
the

In the first place... How did you enter fastboot mode?

:confused:
[Android General] hubino:
the link is not working

Stock - 20170914 V3.06: https://drive.google.com/file/d/0B2U...NjUVBXbFk/view

please help
[Android General] maxregner:
Der Link funktioniert nicht mehr
[Android General] karkhi:
how to install twrp on mnet power 1 or root it

hello. i own this device but i cannot install twrp or root it.

if i try to flash the twrp.img file, i cannot because the phone doesn't enter fastboot also if windows correctly install the drivers. it always restarts normally when i enter the "adb reboot bootloader" command (i unlocked the bootloader in the developer options).

installing twrp with spflash tool isn't possible because the stock rom from which extract the scatter file cannot be found in internet. can someone help me or suggest a windows software with which root the phone?

thanks.
[Android General] boykingrei:
Is this the stock rom or it's a custom one with some improvements?

Nowadays the phone is almost not usable with the stock rom...

ALSO, the link is dead!
[Google Pixel 2 ROMs, Kernels, Recoveries, & Other ] Deuces:
Download script: HERE

Download Factory Images: HERE

Download ADB/Fastboot: Platform Tools

Download USB Drivers: USB Drivers -- Driver Installation Video

-----------------------------------------------------------------------------------------------------------------------------------------------------------

This script is for the UNLOCKED BOOTLOADER pixel2 / pixel2 XL, and will help:

Fix Bootloops

Flash both Slots A and B

Work with any Google-provided factory image

Detect bootloader and radio special *.img names automagically

(Optional): Unlock Bootloader and Critical

(Optional): Format Userdata

-----------------------------------------------------------------------------------------------------------------------------------------------------------

Instructions:

Extract factory image zip file, as well as the image zip file within it!

This will lead to ~21 .img files in the same folder, with the deuce-flash-all script!

SEE SCREENSHOT!!

.

Once you have all these together, run the Deuce-Flash-All script. ( .bat for Windows, .sh for Linux)

-----------------------------------------------------------------------------------------------------------------------------------------------------------

If you are having issues with this script:

Verify you have the environment variable (path) set for adb and fastboot

Try a different USB port

Try a different cable (preferably USB A -> USB C)

Format Userdata in Stock Recovery

Boot plain factory image before doing mods like Locking Bootloader / Kernel / TWRP / Magisk

​
[Google Pixel 2 ROMs, Kernels, Recoveries, & Other ] Deuces:
This was built for the 2 xl but I have modified it to work with the pixel 2.

The main thread, which has lots of troubleshooting Q/A is here:

https://xdaforums.com/pixel-2-xl/development/tool-deuces-bootloop-recovery-flashing-t3704761

Changelog:

06-13-2018: Added support for latest platform tools

01-14-2018: Fixed bug. Made unlocking optional to speed it up, combined scripts for taimen & walleye

01-09-2018: Removed support for locking bootloader, added hard-coded slot selections

12-26-2017: Added support for Pixel 2 (Walleye)
[Google Pixel 2 ROMs, Kernels, Recoveries, & Other ] razrlover:
I have been using this on my walleye since v4, guess now we no longer get the errors for the critical unlock status.

Makes sense, thanks as always most beneficial tool besides adb itself for a pixel device!
[Google Pixel 2 ROMs, Kernels, Recoveries, & Other ] Wcepeda89:
Hey. When I boot my Pixel 2 XL I get a can’t find valid OS. Will this fix it?
[Google Pixel 2 ROMs, Kernels, Recoveries, & Other ] Matt17000:
It's possible ton unlock bootloader, install magisk / root without wipe the phone ?

Anyway, thanks for your great work !
[Google Pixel 2 ROMs, Kernels, Recoveries, & Other ] cntryby429:
Unlocking the bootloader always wipes. Magisk, recovery, and other things will not.
[Google Pixel 2 ROMs, Kernels, Recoveries, & Other ] Lightn1ng:
You've saved me twice from a brick. Thank you.
[Google Pixel 2 ROMs, Kernels, Recoveries, & Other ] 39emfive:
Dude you are a freaking god send! THANK YOU!
[Google Pixel 2 ROMs, Kernels, Recoveries, & Other ] Deuces:
Had anyone tested this with January 8.1 release? Just asking so I can update the top post. Working fine on XL
[Google Pixel 2 ROMs, Kernels, Recoveries, & Other ] infamousvincci:
I am about to use it in 3 hrs. I am currently running dec patch with twrp and magisk. Ill try to sideload january patch soon.
[Google Pixel 2 ROMs, Kernels, Recoveries, & Other ] DumbleCore:
I used it to recover from a softbrick, had an error on mac address 02:00 etc and fingerprint hardware, not sure if related to your Tool, but it did let me Boot back into system after everything else failed, all working again after factory flash with wipe
[Google Pixel 2 ROMs, Kernels, Recoveries, & Other ] Deuces:
I modified the script to take away the locking section, as people can't seem to RTFM

Also included changes to hard-select the slot A/B and further warnings on relocking bootloader
[Google Pixel 2 ROMs, Kernels, Recoveries, & Other ] JayBlack_686:
Hi [MENTION=1812777]Deuces[/MENTION], I wonder if you could take a look at this. I just tried running your script (third time so far). I used the latest Walleye script, made sure I had the latest fastboot and adb. Please see below...it looks like the script got as far as trying to write bootloader_b...then it got stuck at "waiting for any device" with the display blank. Eventually (after a long time) I gave up and unplugged the phone. I can't get it to turn on at ALL. Not by holding down power, not by using the key combo to get into fastboot...the phone just seems DEAD. I plug it into a charger, and nothing happens. Plug it back into PC, and the computer doesn't know that the phone has been plugged in. It's just not there in the Device Manager.

I tried following Google's steps to troubleshoot a phone that doesn't turn on. I did find that if I hold the power button down for about 30 seconds, I do feel the phone vibrate, and see a line across the display, like the few times that I've had to hard reboot. But that was it. Trying to get into fastboot mode, even holding the buttons for a long time, doesn't work.

Any idea what could have happened, or what I can do? The battery wasn't 100% full when I started, but it was at least at 85%. I'm sure the battery didn't die. I'm a bit freaked out, as I can't even get it to power on. Thanks in advance.

Deuces-flash-all-script-V4.3-Windows

for Walleye - Google Pixel 2

USE AT YOUR OWN RISK

Press any key to continue . . .

Make Sure your Device is in Fastboot Mode

(Power off, hold Volume-Down, hold Power)

Once you are in fastboot,

Press any key to continue . . .

Running Unlock

Look at your device,

press up arrow and Power to confirm

...

FAILED (remote: Device already : unlocked!)

finished. total time: 0.006s

This will say "failed" if already unlocked - ignore

Locating Bootloader and Radio Filenames

Flashing...

Setting current slot to 'a'...

OKAY [ 0.012s]

finished. total time: 0.014s

target reported max download size of 536870912 bytes

sending 'bootloader_a' (38644 KB)...

OKAY [ 1.189s]

writing 'bootloader_a'...

(bootloader) Updating: partition:0 [MENTION=702555]0000[/MENTION]2000 sz=0000B000

FAILED (remote: Command Flash Error)

finished. total time: 1.206s

rebooting into bootloader...

OKAY [ 0.004s]

finished. total time: 0.005s

target reported max download size of 536870912 bytes

sending 'radio_a' (60428 KB)...

OKAY [ 1.851s]

writing 'radio_a'...

(bootloader) Updating: modem [MENTION=6558468]00001[/MENTION]000 sz=03B01000

OKAY [ 0.690s]

finished. total time: 2.545s

rebooting into bootloader...

OKAY [ 0.004s]

finished. total time: 0.005s

Setting current slot to 'b'...

OKAY [ 0.015s]

finished. total time: 0.017s

target reported max download size of 536870912 bytes

sending 'bootloader_b' (38644 KB)...

OKAY [ 1.051s]

writing 'bootloader_b'...

(bootloader) Updating: partition:0 [MENTION=702555]0000[/MENTION]2000 sz=0000B000

FAILED (remote: Command Flash Error)

finished. total time: 1.069s

rebooting into bootloader...

OKAY [ 0.003s]

finished. total time: 0.005s

< waiting for any device >
[Google Pixel 2 ROMs, Kernels, Recoveries, & Other ] Deuces:
I've seen something similar as far as the phone not powering on. Technically tho, it was on but with a black screen.

Try holding VOL- and POWER for 30+ seconds to see if it powers off, then again to see if it comes back on.

I did read thoroughly and read that you've kinda tried this already, but after you get it to "power on" - do you get any return on the command:

fastboot devices

or

adb devices

?

Then, maybe try the new script i just updated - or tell me what OS you are running? if it's MAC / OSX, might wanna hold off.
[Google Pixel 2 ROMs, Kernels, Recoveries, & Other ] JayBlack_686:
Hi, thanks. I did try holding VOL - and power down for 30 seconds+. Actually, I did feel a vibration, but...nothing after. Couldn't get it to act like it was turning back on. Now that you mention it...I wonder if I did get it to turn on at some point during trying this over and over, because at times I saw the "scan line" appear across the screen briefly, like when I hard power off the device. But I've never seen the display light up at all, and nothing I've done has shown a device when issuing the "devices" command, either via fastboot or adb. I guess I need to screw around until I see that scan line, then it's "off." Then I've gotta get the thing to vibrate again, so it's "on." Then try seeing if I can run your script.

Boy am I glad I didn't try this late at night.

Oh, sorry, I'm on Windows 10.
[Google Pixel 2 ROMs, Kernels, Recoveries, & Other ] Deuces:
Based on the return it looks like your bootloader got jacked up. I haven't seen that issue before. May want to get on chat with Google about an RMA.
[Google Pixel 2 ROMs, Kernels, Recoveries, & Other ] JayBlack_686:
Sheeeeeeeit, just did that. Man...honestly, I might just go stock when I get this new one. Too much risk of mishaps, since I only keep the one phone around. Was just hoping to recover this one, as I'll be phone-less for a few days.

Side question - let's say I get the new phone, unlock the bootloader just in case, then don't do anything else, no rooting, etc. Do you know if that'll affect my ability to get OTAs actually over the air? I'm just bummed that every time there's an update, I've gotta go manually flash stuff and risk some shenanigans like this (and there's that persistent notification that doesn't go away unless I do so!). Should be easy, but I never had any luck with Google's flash-all script and always had to use yours to recover. Your script worked great...except for this time, something clearly went wrong (not pointing fingers, it's just how it goes).

Anyway, if you've got any other ideas, I'd try them out. Thanks for the responses thus far.
[Google Pixel 2 ROMs, Kernels, Recoveries, & Other ] Deuces:
If you can't get into bootloader, there's nothing I can do. There's some talk about using LG's downloader mode but LG has not released an image for it that I know of.

You can see this download mode by: Powered Off. Hold Vol+, insert USB cable connected from laptop.

If you have an unlocked bootloader, play store knows it - and some apps (netflix for example) - won't allow you to download their app from the play store. You could sideload the apk and it works fine, but still no updates from play store.. All of the apps I have work fine unlocked, minus Netflix.

You could disable OTA updates via developer options so that the notification goes away.

If you decide to stay stock, you could technically leave the bootloader locked, but the "allow oem unlocking" enabled in developer options. However, if something corrupts your OS, it's unlikely you'd be able to issue the unlocking commands from bootloader. That's the main reason I stay unlocked.

I've got the process down for upgrades myself. Download image, unzip, unzip the image within that, run my deuce-flash-all script. Boot up to Android once. Reboot to bootloader, fastboot boot twrp img, install magisk, reboot.

I do not flash twrp zip b/c it has been problematic for touchscreen drivers, and I'm around a computer anyway when doing these things.

The only reason I root is to use adaway. Every time I try to get used to stock, I hate using my phone because of ads.

I've tried the no-root-required VPN adblockers, but they drain battery.
[Google Pixel 2 ROMs, Kernels, Recoveries, & Other ] JayBlack_686:
Hey, thanks. I hear you. Oddly, I could've sworn that I had Netflix installed and updating on my bootloader-unlocked Pixel 2. Can't verify, sadly!
[Google Pixel 2 ROMs, Kernels, Recoveries, & Other ] donlu30:
I can verify! I watch Netflix on my phone at work, downloaded from the play store on a pixel 2 unlocked, twrp installed and rooted with magisk. Not sure why everyone is having problems with it.
[Google Pixel 2 ROMs, Kernels, Recoveries, & Other ] JayBlack_686:
Right on! Now can you help un-f!ck my bootloader, please?
[Google Pixel 2 ROMs, Kernels, Recoveries, & Other ] yunghunter:
hi thanks for all your hard work but i am having a problem with your script seems all goes well until the end then it gets stuck on the the line that says fastboot unrecognized option -- set-active_b then just stops I have installed the latest platform tools and am running a linux on my chromebook
[Google Pixel 2 ROMs, Kernels, Recoveries, & Other ] Deuces:
Are you using a chrooted Linux or full install? Vm? Sounds like a fastboot out of date problem. Try pasting the full log here.
[Google Pixel 2 ROMs, Kernels, Recoveries, & Other ] dviree:
it erased my data without me pressing Y/N?? wtf?
[Google Pixel 2 ROMs, Kernels, Recoveries, & Other ] smorgar:
Your tool saved my phone from beeing unable to update. Thank you!
[Google Pixel 2 ROMs, Kernels, Recoveries, & Other ] forintuser:
Helpful

Today was a great help for me.:highfive:
[Google Pixel 2 ROMs, Kernels, Recoveries, & Other ] Pixxelated:
Unreal

I literally made the account to reply to this thread, your script is EXACTLY what i neededf to bring my phone back to stock, after many days searching for the ANSWER , THANK YOU!!!!!!!
[Google Pixel 2 ROMs, Kernels, Recoveries, & Other ] razrlover:
You are among many who are so thank full
[Google Pixel 2 ROMs, Kernels, Recoveries, & Other ] Rookx:
Saved me from a bootloop (and got me to upgrade my system which I was being lazy on), you're the man! Thanks so much for this.
[Google Pixel 2 ROMs, Kernels, Recoveries, & Other ] Rukbat:
Pixel 2 (not XL). Updated to March update. Soft-bricked. I can get to bootloader. I can boot TWRP and install twrp<latest>.zip. No luck there.

I found your script, so I ran it (on March factory walleye). Still stuck in bootloader - the only things that work are barcodes and power off.

Any ideas? (The same thing happened with the February update. After an hour on the phone with Google, they RMAd that one.)
[Google Pixel 2 ROMs, Kernels, Recoveries, & Other ] Deuces:
Are you trying to boot and flash twrp before booting bone stock? If so, don't. Did you unlock the bootloader? If all else fails, format user data, and always boot bone stock for the upgrade to process before doing any modifications or additional flashing. Whatever you do, do not re-lock the bootloader without being positive everything is bone stock, and working properly
[Google Pixel 2 ROMs, Kernels, Recoveries, & Other ] sam0yed:
I'm getting an error that I cannot generate image for userdata when I try to fastboot format userdata. It also comes up when I run your script. Any suggestions?
[Google Pixel 2 ROMs, Kernels, Recoveries, & Other ] Shaxpya:
It stuck here:

sending 'vendor_a' (354112 KB)...

FAILED (data write failure (Unknown error))

finished. total time: 9.503s

Mighty Deuces, what should i do, im so desperate...
[Google Pixel 2 ROMs, Kernels, Recoveries, & Other ] razrlover:
Have you tried to reflash script?

What i have done when it gets stuck and other wise I'm screwed, I use the skipsoft toolkit as last resort, always worked just lose data
[Google Pixel 2 ROMs, Kernels, Recoveries, & Other ] Shaxpya:
thanks man i'll try that
[Google Pixel 2 ROMs, Kernels, Recoveries, & Other ] navi_j:
sir,

i have tried this script.

Please go through screenshot and give me solution.

My phone is not able to start stuck at google logo then goes into TWRP mode, in TWRP mode it shows red lines and again stuck at Google logo.

Please help.
[Google Pixel 2 ROMs, Kernels, Recoveries, & Other ] Rukbat:
Change

fastboot deuce-flash-all-v4.4.bat

to

deuce-flash-all-v4.4

Then it should run. The script isn't a fastboot command, it's a batch file and runs on its own.
[Google Pixel 2 ROMs, Kernels, Recoveries, & Other ] Deuces:
almost correct :)

you do need the .bat, but remove the fastboot.

deuce-flash-all-v4.4.bat
[Google Pixel 2 ROMs, Kernels, Recoveries, & Other ] Rukbat:
Correct. That v4.4 part requires the .bat, because Windows takes .4 as the file type. (I renamed mine to deuces.bat, so it ran as deuces. [.com, .exe and .bat is the order in which files still run in Windows.])

And again, thank you for the file.
[Google Pixel 2 ROMs, Kernels, Recoveries, & Other ] kornesque:
Followed instructions, it saved my hide. Thanks Deuce.:good:
[Google Pixel 2 ROMs, Kernels, Recoveries, & Other ] ipandroid:
Thanks for the file. Couldn't get it to work on Mac OS X, however, I took the file and did the flashing line by line. that worked like a charm.

My question is..... Can I do this to downgrade the OS?
[Google Pixel 2 ROMs, Kernels, Recoveries, & Other ] dviree:
how can i remove the dialogue with the "format userdata" and unlock bootloader"? and just make the deuces script flash everything without prompting with "format userdata or unlock bootloader"?
[Google Pixel 2 ROMs, Kernels, Recoveries, & Other ] ApoelEllhnwn:
You cant do anything
[Google Pixel 2 ROMs, Kernels, Recoveries, & Other ] Hadookie:
So this script saved my phone today. I tried to install the june factory image on my phone which had magisk+elemental installed and ran into a weird error where my phone wouldn't boot out of the bootloader. I may stop rooting my device as every month I run into an issue with the OTA's. Not only that, it always ends up wiping my userdata even though I remove the -w flag from the stock flash all bat.
[Google Pixel 2 ROMs, Kernels, Recoveries, & Other ] Rukbat:
Do you want to format userdata or not? As for the unlock bootloader question, I assume you have so you just don't want the prompt. At line 12, if you want to be sloppy (the text will just flash by on the screen without pausing), put a : (colon) in front of the pause -

:pause

That turns it into a label instead of a command.

For the "format userdata", what you do depends on whether you want it to format without asking or skip formatting without asking.

(Or you could look online for batch files and learn how they work. This script isn't complex, it just has a brilliant idea that kind of forces the phone to accept the system files. The Special Theory of Relativity wasn't anything special either, it was just a brilliant idea. Batch [or script, depending on what you;re running] files aren't anything more than the commands you'd type in by hand, plus a few things you wouldn't normally use, like pause statements and labels.)

---------- Post added at 03:37 PM ---------- Previous post was at 03:31 PM ----------

Reading that gave me shudders.

I just back up my data (just in case) and run Deuce's script on the full factory package every month. I plan on having to do it. (Even cleaning the phone as much as I thought I could caused the OTA update to fail.)

But Deuces, if you tell it not to, doesn't. Granted, it takes a little longer, but the actual work isn't much - and I have a full backup (/sdcard including today's TWRP data backup) on my PC.

The only problem I'm noticing about the June update is that it seems to have broken Magisk's ability to load modules. MCS fails every time.
[Google Pixel 2 ROMs, Kernels, Recoveries, & Other ] Deuces:
bumped for update
[Google Pixel 2 ROMs, Kernels, Recoveries, & Other ] razrlover:
Awesome

Been a while but still works bro!.

Thanks for the update
[Google Pixel 2 ROMs, Kernels, Recoveries, & Other ] atifaslam7:
I keep getting error , fastboot device does not support slots

It's not working please help also all command write fails
[Google Pixel 2 ROMs, Kernels, Recoveries, & Other ] Rukbat:
atifaslam7, which phone are you running this on - what model number? Pixel 2 or 2 XL - or something else?
[Google Pixel 2 ROMs, Kernels, Recoveries, & Other ] atifaslam7:
Pixel 2, I was on android DP 4

I think I messed it up by trying to flash the android 8.1 image instead of the DP 4 . Anyways I got it back working by manually flashing the DP 4. Thanks anyways.

Seems like google phone doesn't allow backwards flashing.
[Google Pixel 2 ROMs, Kernels, Recoveries, & Other ] Rukbat:
Many Android phones stop you at some point from going back, not just Google. Samsung messed a lot of us up back around 2013 by doing that.
[Google Pixel 2 ROMs, Kernels, Recoveries, & Other ] Sanddroid:
I have no errors when flashing, but when I switch slots I get Error: LoadImageAndAuth Failed: Load Error on the bootloader
[Google Pixel 2 ROMs, Kernels, Recoveries, & Other ] jdeere12:
I've been doing this since Gingerbread and I swear I've never been so close to actually bricking a phone. You saved me. THANK YOU!
[Google Pixel 2 ROMs, Kernels, Recoveries, & Other ] Organics:
Hey! thanks for this!

I've got a Moto X4 and I know this isn't my phone's forum, but I can't find anything like this anywhere else. D'you think you can help me? My phone also has slot A and slot B, but they seem to be corrupted and won't boot into system, it will get stuck in a bootlop even after I fastboot flash a stock rom. Any ideas?

-----

Edit: I borrowed the structure of your script and adapted it to motorola file names, downloaded another system image (in case the one I was using is corrupt) and is working perfectly now. Thanks!