yashsingh1/xdaforums huggingface dataset:
[prjkt.io] bcool15:
updated, to 8.1 with substratum active

I have a Pixel XL, screen is locked with PIN and fingerprint, pin is required after restart obviously, NOT rooted, Bootloader LOCKED I GUESS, I bought this from google and kept it all stock...

is there any way to salvage my data?

or factory reset is my only option,

I have tried to run adb shell and its not working, I am on a macbook pro (new mac user) with windows on VMware fusion pro
[prjkt.io] Acid0057:
First you don't need to use Windows in VM. That might be why it isn't working. ADB is available natively in mac os via terminal. You need to download the mac ADB from Google. Usually drivers aren't needed.

Did you have usb debugging enabled? Are you able to boot the phone and turn on usb debugging?

Hope this helps.
[prjkt.io] bcool15:
phone shuts down a few mins after booting in, and displays "system UI stopped" then reboots to a recovery screen where my only two options are...

1 retry

2 factory reset
[prjkt.io] Acid0057:
Do you know if usb debugging was enabled before this happened?
[prjkt.io] bcool15:
yes it was, but I remember sometimes hitting an allow button on the phone

I also mentioned above that my phone is bootloader locked and screen locked,

could be why adb shell isnt connecting to device

or as I said I am a total noob on MAC
[prjkt.io] Acid0057:
Good that it was enabled. Yes that might be why since it could be asking you to authorize.

Here's the downloads for ADB on mac https://developer.android.com/studio/releases/platform-tools.html

Once there installed the commands in terminal are the same as they are on the command line in windows.

I'd try booting into recovery and running ADB from there.
[prjkt.io] bcool15:
Mac installation of adb isn’t goin well here, it keeps saying java Jdk needed I follow the link java site agree and download that still nothing....I’m missing something can anyone think of some?
[prjkt.io] Acid0057:
Maybe download java directly from java.com then try running the ADB install again. I hate to say it but if this doesn't work with ADB then you do have to factory reset from recovery.
[prjkt.io] bcool15:
can some one spare a few mins on a screen share service before i blow my YEARS WORTH of DATA away!!!
[prjkt.io] bobby janow:
What data?
[prjkt.io] Acid0057:
I can't right now sorry. Any luck running ADB in the first place?

I had this happen with a theme and quit using Substratum myself. Great app but the risk wasn't worth the reward for me.
[prjkt.io] bcool15:
Just got back home from a work trip

adb installation went fine after a few googles

since my phone was in a bootloop, there was some time gap before it booted and then went back into bootloop and eventually to recovery, I managed to start ./adb shell in mac terminal

by repeatedly hitting the command mentioned above gave me access to ADB shell eventhough the phone was screen locked with a PIN and fingerprint

the phone restarted while I was looking for the command to disable overlay on com.android.settings <<< IF I am not mistaken...

I repeated the initial process where I got success on gettin in ADB shell

and disabled a few more overlays and phone stabilized after one more boot,

I am continuing to disable further overlays manually

just to be sure,

If any one else is having problems, I can help on a screen share service for free, using a prescheduled time.

Thanks to all who tried to and helped.
[prjkt.io] Acid0057:
Awesome glad you got it working again!
[prjkt.io] nomipakistanli:
i dont know why but for some reason using the command gives me this. i am in the phone. and the reason i am using 3rd party launcher i have the access to apps, when i launch the SUBSTRATUM it does show a blank black screen. and ofcourse the system UI failed message is continuously appearing. i am rooted and twrp installed. what to do? to remove all the overlays.

C:\adb>adb shell

oxygen:/ $ cmd overlay

Can't find service: overlay

20|oxygen:/ $ cmd overlay list

Can't find service: overlay

20|oxygen:/ $ cmd overlay list

Can't find service: overlay

20|oxygen:/ $
[prjkt.io] Café King:
Nevermind...

/CK
[prjkt.io] nomipakistanli:
look, if u are rooted u can go to TWRP ADVANCED FILE MANAGER DATA SYSTEM and find the apks with the name of your theme. mine was BELLO. so i deleted them all and then rebooted the system. and it worked fine... phew.. might not work for u.
[prjkt.io] Café King:
I wasn't rooted. I deleted everything to do with Substratum via adb and everything works again... Phew...

/CK
[prjkt.io] Cinekk:
I have just fixed my S8+. Thanks for the tutorial!
[prjkt.io] kearlsaint:
rescue via usb debugging + root

TLDR;

I had a failed substratum theme and I couldn't get into anything. After booting up my device only showed a black screen. My sdcard and internal data were encrypted so I couldn't use TWRP or Rescue.zip to remove/disable substratum. Thankfully, I had usb debugging enabled.

I'm running on RR Treble 8.1, rooted and had usb debugging enabled.

I checked the SubstratumRescue.zip and found out that it just removes /data/system/overlays.xml and /data/system/theme, so I used adb shell to do the same.

adb root (or adb shell + su?)
adb shell rm /data/system/overlays.xml
adb shell rm /data/system/theme
adb reboot

Hope this can help anyone!
[prjkt.io] Sonalk:
HELP

My phone isnt working now, UI has stopped working

How do I use this code??
[prjkt.io] Acid0057:
See the post right above you. You'll need to setup ADB and hopefully you already have usb debugging enabled.
[prjkt.io] Sonalk:
I fixed it somehow but I tried using adb (I had usb debugging enabled) but had no clue how to use it, i guess it's so simple no-one made a tutorial on it because I didn't find one.
[prjkt.io] Acid0057:
Glad it's fixed. I'd investigate getting ADB working as it's useful for so many fixes. There are ADB tutorials on how to set it up on XDA.
[prjkt.io] WarAxe:
I got permission denied.

I'm not rooted. :(

I tried to run SubstratumRescue.zip but my Galaxy S9+ won't let me since it's not signed for my locked bootloader.

Is there ANY way to run SubstratumRescue.zip via ADB on a non-rooted device?

---------- Post added at 09:05 PM ---------- Previous post was at 09:03 PM ----------

That's awful!!! That's the last thing I want to do. :-|

---------- Post added at 09:43 PM ---------- Previous post was at 09:05 PM ----------

Disregard. My problem fixed itself by unchecking and then rechecking the "Substromeda" option. :confused:
[prjkt.io] sheik124:
I have no idea how to use Linux, or PowerShell for that matter. But over the last fifteen minutes, after figuring out how to dump the output of "cmd overlay list" to a text file (fack.txt) using select-string to only capture lines that started with [x], and then opening Notepad to Find & Replace every instance of

"[X] "

with literally nothing, I managed to get a command running that disabled every overlay.

cat .\fack.txt | %{.\adb shell cmd overlay disable $_}

Anybody speak PowerShell AND POSIX? There has to be a one-stop shop for doing this.
[prjkt.io] _Jakeu:
This worked for me!

Thank you SO MUCH, this helped me out and made me fix my LG V30 that was stuck with a bad substratum theme which caused a constant "SystemUI stopped working" bug and turned the screen black because the UI didn't work at all.

After listing all overlays with the help of "cmd overlay list" I found the SystemUI Theme and disabled it with "cmd overlay disable" and everything showed up as normal again.

You saved my night dude, was pretty hectic since I've never used adb or anything like that before...
[prjkt.io] Psychlone:
I just experienced a kind of unique situation on my Verizon S8+ last night.

I had wiped the phone after forcing through a manual flash update via Odin and set it up fresh (was running slow and battery life was decreased and it was time to just start over) --anyway I had it *almost* perfect with the way I wanted everything, installed Substratum and Andromeda and proceeded to install a few overlays (I really like Flux).

I had noticed that Flux didn't give me the white notification text but didn't realize that I actually had it set to gray - just thought I hadn't set it at all, so I found another theme called Wings that has a white notification text on dark background that had worked for me in the past and installed it without double checking my already-installed overlays.

BAM, reboot to black screen where nothing works except the power menu. Oh, and it was about this time that I realized that I hadn't turned on USB Debugging (simply missed it by going too fast in the setup process)

The verizon S8+ is not rootable and has a locked bootloader on Oreo (which I'm on), but we're super lucky to have a dev (jrkruse) that has discovered a way to get TWRP Safestrap in a semi-working state that was part of my flashing process to upgrade to the latest firmware.

So no ADB available, no root and locked bootloader, but I had TWRP Safestrap.

I booted into Safestrap and flashed the Substratum Rescue zip and wiped dalvik and cache but upon reboot it booted to the same black screen where nothing works. So I booted back into Safestrap, used the Advanced button and went into the File Manager and used it to navigate to /data/app where I discovered a dozen folders with the names "Flux" and one with "Wings" - I deleted every one of them, wiped dalvik and cache on my way back out and upon reboot it booted normally.

I know that the Substratum Rescue zip had removed the overlays.xml file and the directory, but it leaves behind ALL of the folders created for the overlays.

If anyone finds themselves in a similar situation and have TWRP of any flavor already installed, use it's File Manager to navigate to /data/app and manually remove the overlay folder(s).
[Moto Z2 Force  Guides, News, & Discussion] Uzephi:
Don't you hate it when you flash something and it puts you in an unrecoverable state?

Does it aggravate you to no end when you flash something and then all you can do is go into bootloader and nothing else?

Well, have no fear Motorola Z2 Force users! Your issues will be resolved!

Reasons for using this method:

If you haphazardly flashed a ROM, and now can't boot.

If you tried flashing an audio mod and have issues getting things to work.

If you accidentally (or purposefully) deleted a file and now can't OTA.

Anything else that you can do to soft brick your device.

This zip will fix that and put you back to stock.

You then can update.

If you rooted and cannot update but want the update, this will make your phone clean to accept updates again.

Now, to the meat of this thread. In post two, there is flash all zips for each patch version and instructions on what to do. This does need an unlocked bootloader.

Credits:

Motorola Firmware Team for the zips
[Moto Z2 Force  Guides, News, & Discussion] Uzephi:
Great, So you've read why you might have borked your phone!

Now, let's get it fixed! Below is the link to the only flashall bat file I currently have. This is a simple process to do. There are some requirements though.

Requirements:

Correct drivers (ADB and fastboot is included in the utilities zip if you don't have minimal adb and fastboot installed, or don't have the SDK.)

Over 4GB of RAM.

How to fix your phone:

Download the Utilities zip

Extract the zip to it's own folder

Download the flash all for your device from the options below.

Extract the flash all zip into the same folder as the Utilities.

Run the Flashall.bat file

Watch windows command prompt put your phone back to stock!

This process can take up to 10-15 minutes depending on USB connection and your PC

Disclaimer: I did not personally test the zips below besides the Sprint and T-Mobile ones. These are the official Firmware links from the Motorola Firmware Team. My only contribution is this thread and the utilities zip.

Disclaimer 2: it is never suggested to flash a zip not intended for your device/major patch version. If you're on Oreo, DO NOT FLASH NOUGAT. (I flashed T-Mobile to my Sprint phone for testing purposes and so I can tell you what it does. I lost all sim functionality and had to do some wonky stuff to get my phone back to working shape... Word of advise: don't do it.)

Disclaimer 3: if you have minimal adb and fastboot or the Android SDK, please be sure you update to the latest fastboot. The exe files included in the zip are for those who don't have a development environment set up.

Downloads:

Flash All Utilities

AT&T Oreo Flash All

Sprint Oreo Flash All

T-Mobile Flash All (Not official download link, but official files, See here)

USC (check version) Flash All

Verizon Flash All

NOTE: yes, it's in the Z2 play folder. Motorola Firmware Team did not make another folder for our device. Check the file name. It has "Nash" specifying the Z2 force. If you ask why it's in the Play folder, I will not respond.
[Moto Z2 Force  Guides, News, & Discussion] Uzephi:
If you have any other official links, I will add to second post and give proper credits to who found the zip. Only perm links like the AFH ones I posted.
[Moto Z2 Force  Guides, News, & Discussion] joemossjr:
I was going to add yours in but kinda got busy
[Moto Z2 Force  Guides, News, & Discussion] crazyjimbo:
Thanks for this! I flashed a modified boot.img for root to get my phone unlocked, and flashed the stock kernel back, but I couldn't update to the September patch. After flashing this, updates are working fine. A bit of a lifesaver!
[Moto Z2 Force  Guides, News, & Discussion] esuormai:
full circle...

i went from stock, to rooted to soft bricked and hopefully after these download ill be back at stock... thanks for all your hard work ...payday ill buy ya beer!
[Moto Z2 Force  Guides, News, & Discussion] Uzephi:
I don't take donations, just pay it forward! Thanks for the offer though.
[Moto Z2 Force  Guides, News, & Discussion] WeUseLord-:
NOTE: make sure your computer has more than 1 GB ram when you flash this you will get a buffer error because this requires a lot of memory I MADE THIS MISTAKE
[Moto Z2 Force  Guides, News, & Discussion] Uzephi:
Added in requirements, thank you for verifying that.
[Moto Z2 Force  Guides, News, & Discussion] WeUseLord-:
Okay thanks OP
[Moto Z2 Force  Guides, News, & Discussion] cooleoboom5:
when i did this (i did this so that i could go back to stock with a locked bootloader which as of writing i just realized would work fine if i just did fastboot oem lock without anything else, goddamnit) it told me that a different operating system had been installed, even though it's (presumably) the same os. what's going on?
[Moto Z2 Force  Guides, News, & Discussion] Uzephi:
That is a "permanent" flag that triggers when you flash something unsigned and not from Motorola. I.E. custom boot image for root. Reason it's in quotes is because we don't know how to return it back or if we even can.
[Moto Z2 Force  Guides, News, & Discussion] irule1977:
moto z2 force

where do you download the bat file from
[Moto Z2 Force  Guides, News, & Discussion] WeUseLord-:
It's in the zip
[Moto Z2 Force  Guides, News, & Discussion] ben_jiang:
So Sprint Z2 can't get GSM unlocked by flashing ROMs from other carriers? Any idea how it can be unlocked?
[Moto Z2 Force  Guides, News, & Discussion] robdevil:
How to get back to software status official in bootloader menu? I did managed to do it with T-Mobile version but cant get that from this one.
[Moto Z2 Force  Guides, News, & Discussion] robdevil:
Would you be able to make T-Mobile Stock? I've got flash all zips 7.1.1 but when flashing them I can't get any ota's. Every ota just failing on installation even via sideload. I've had multiple carriers ROMs installed on my device earlier looking the way to sim unlock it. Now my device unlock app failing to request unlock.
[Moto Z2 Force  Guides, News, & Discussion] Uzephi:
I would only release something I can test. I don't have TMobile service, so I won't be releasing TMobile only firmware. There is a thread by joemossjr for TMobile flashall.
[Moto Z2 Force  Guides, News, & Discussion] hackenggr:
A quick question sorry for newbie question in advance, I return to Motorola after a long years a lot changed

I got a Moto Z2 from a friend (he no have knowledge of rooting and modifying) which he got from his cousin in UK so when I got it seem it have a Tmobile sprint hybrid rom installed and google warning screen on the start, it is my guess it is Sprint's phone but I am not confirm.

XT-1789-03 is etched on the bottom near the and by search on google it is showing sprint so please if anyone can confirm -03 is sprint or not? imei is also showing the clean on the sprint site but it NOT definitely saying this phone is sprint.

Please someone tell me if I can flash this and get back to normal and get the OTA updates.
[Moto Z2 Force  Guides, News, & Discussion] Uzephi:
My Sprint model has the -03 identifier. You should be safe if the bootloader is unlocked. Needs that to flash this
[Moto Z2 Force  Guides, News, & Discussion] zagusa:
Hi everyone. Please someone can help ?please explain me step by step what to do, i am new for moto and i don't want brick it , i have USA T-mobile Moto Z2 force (7.1. 1 and.ver.bootloa.. unlocked) and i have update problem.thank you.
[Moto Z2 Force  Guides, News, & Discussion] Uzephi:
Follow instructions in post 2 while in bootloader. (Same spot you unlocked) and download the last Nougat flash all here. Use the utilities zip in post two. Reboot and take all OTAs before doing any modifications.
[Moto Z2 Force  Guides, News, & Discussion] always6s:
Will this work for Sprint variant. I've been stuck trying to get the security update for a while now.

---------- Post added at 09:06 PM ---------- Previous post was at 09:02 PM ----------

Nevermind. I wrote before I bothered to check the first posts. Lol
[Moto Z2 Force  Guides, News, & Discussion] Uzephi:
Updated second post with T-Mobile, AT&T and Verizon June/July updates. MFT uploaded them July 21st.
[Moto Z2 Force  Guides, News, & Discussion] Josh McGrath:
The most recent patch date is May 1 2018 correct?
[Moto Z2 Force  Guides, News, & Discussion] Uzephi:
I go by the release month. Moto hasn't released a security patch in the correct month for any Z2 force besides the Verizon model.
[Moto Z2 Force  Guides, News, & Discussion] crunchthem:
I think I have a similar problem like teradark.I was on latest security patch from OTA and with a locked bootloader. Because my wifi was buggy I wanted to reflash with an actual Stockrom. So I followed the guide from this post https://xdaforums.com/showpost.php?p=76850077&postcount=6. The flashall.bat should be the same like in this thread.

My bootloader is still locked and have never been unlocked!

While flashing the latest XT1789-06_NASH_RETAIL_8.0.0_OPXS27.109-49-5 I got some errors and afterwars my phone says it is corrupted and cant be trust anymore. So i'm stuck at this screen and can only enter the fastboot mode. I got an european retail XT1789-06, so the Firmware should be the right one.

Maybe i could unlock the phone and then it's no Problem. But I bought it a few days ago and if the wifi problems still remain i want to give it back. So unlocking is not my preference :/

Somebody an idea how to solve this?

Greetings

Lukas
[Moto Z2 Force  Guides, News, & Discussion] doubledragon5:
Ok all done, and no installing newest update. Thanks
[Moto Z2 Force  Guides, News, & Discussion] Marcowerjr:
It won't work
[Moto Z2 Force  Guides, News, & Discussion] crunchthem:
What won't work? You mean fix it with locked bootloader?

actually it says "Your device is corrupt. It can't be trusted and will not boot. Visit motorola.com/unlockbootloader"

I think my bootloader is too new so it doesn't accept the boot.img. Could that be possible?
[Moto Z2 Force  Guides, News, & Discussion] TwoBuells:
this did it! OTAs function again on my Sprint Z2F

thanks!
[Moto Z2 Force  Guides, News, & Discussion] TwoBuells:
So I'm trying to figure out the slots, When I took the July OTA update it was on slot B. I then installed TWRP and Root.

Slot A is still on the last update and not rooted. So I rebooted into slot B and lost Root.

I tried to boot into recovery and TWRP is gone. the phone just boots normally when I choose recovery.

So I had to install TWRP and Root again.

My question is, When the next OTA update is released I will Flashbat back to stock and take the update, will both slots be updated?

Currently I have the July update on slot B and May update on slot A

Slot B is rooted and running fine.
[Moto Z2 Force  Guides, News, & Discussion] Uzephi:
Flash all resets slot, so it will swap to A after a flash all, that is the command "fastboot erase DDR". That swaps the phone back to slot A. It is best to do a flash all twice with how the script is currently set up. (flash all, reboot bootloader so you're on slot A, flash again.) You can alternatively run "fastboot --set-active=_a" but that can cause oddities as well.
[Moto Z2 Force  Guides, News, & Discussion] doubledragon5:
Should you do a fastboot erase DDR before you do a flash all I never heard of that command I'm just curious
[Moto Z2 Force  Guides, News, & Discussion] Uzephi:
Eh, I never have. That is why the original script I made flashed both slots. If you're on B, it would be pretty bad that you just flashed everything to B and then reboot to A because of DDR being erased.

Edit: If the phone works like it's supposed to, it would fail over back to B when A can't boot, but... You know, you had to flash all for a reason.
[Moto Z2 Force  Guides, News, & Discussion] doubledragon5:
Your right, phone is running good. it's' running good on slot A. slot B everything works except for wifi, I still haven't figured it out. But as long as everything is running good on slot A that's where I'm staying. Just wish I could get Viper4 Android to work. Is your kernel that I'm running permissive? I wonder if it is because I have encryption set in twrp. Because Magisk shows preserve force encryption.
[Moto Z2 Force  Guides, News, & Discussion] Josh McGrath:
Not to hijack , but [MENTION=4604067]Uzephi[/MENTION] , this is the only model I've seen that can be revived from a 9008 hard brick. Do you know if the flash-all has the commands and protocols to "talk" to QC loader in the same way as QFIL etc?

If so, this could be useful for almost every qcom device without the mbn files as long as the proper gpt file was made and firmware of course.
[Moto Z2 Force  Guides, News, & Discussion] Uzephi:
No, flash all only does fastboot commands.
[Moto Z2 Force  Guides, News, & Discussion] wiswis:
A few months ago I used the tmo flashall to return to stock, but I am trying to use the updated tmo flash all and it does not seem to be working. The flashall keeps getting 'stuck' in the process. The last time I tried to use it it got stuck at "sending dsp". Both the flashall and the utilities are in the same folder so Im not really sure why it inst flashing. Also, whenever it does get stuck i reboot and it goes back to to the original rom. Any help would be great!
[Moto Z2 Force  Guides, News, & Discussion] TitoXx:
Anyway possible to Flash sprint z2f to T-Mobile version?
[Moto Z2 Force  Guides, News, & Discussion] shook187:
I'm trying to find out myself... But I doubt it
[Moto Z2 Force  Guides, News, & Discussion] shadowcliffs:
Is there a way to only restore the stock recovery? I think I'm good with temp TWRP. I'm kinda regret for flashing the TWRP zip. TIA.
[Moto Z2 Force  Guides, News, & Discussion] Josh McGrath:
You'll have to go back to stock and reroot as far as I know unless you can find a stock recovery file. But why do you want stock recovery? Twrp is failproof and system updates won't go through with root anyway if that's what you're thinking
[Moto Z2 Force  Guides, News, & Discussion] jugernot:
I'm trying to get Google Pay and SafetyNet restricted apps working. I am on Sprint Oreo release OCXS27.109-48-9 and was rooted with SuperSU, but that has since been uninstalled completely. I am not rooted at all now, but Safetynet still gets tripped.... I'm thinking it's because of the unlocked boot loader. Would this firmware allow me to pass SafetyNet or do I just need to relock my boot loader?
[Moto Z2 Force  Guides, News, & Discussion] Uzephi:
The cmdline that the kernel makes at boot has a bootloader lock flag. Locked = 0 unlocked =1 and "re" locked = 2, so no.