yashsingh1/xdaforums huggingface dataset:
[Miscellaneous Android Development] famewolf:
Compiled qdl from source...it appeared to run but finished in like 1 second and phone is still sitting on black screen. Is that expected behavior or should it have "hung" for the two minutes you mentioned?

famewolf@hp810-135qe /workarea/android/r2 $ adb devices

List of devices attached

320193852216 device

famewolf@hp810-135qe /workarea/android/r2 $ adb reboot edl

famewolf@hp810-135qe /workarea/android/r2 $ sudo qdl prog_emmc_firehose_8917.mbn rawprogram_recovery.xml patch0.xml

famewolf@hp810-135qe /workarea/android/r2 $

Rather annoying as I've now tried 3 "different" ways and they all failed for something even when appearing to work. Will try the debug.

---------- Post added at 11:35 PM ---------- Previous post was at 11:30 PM ----------

The win install is still win 7. 2 additional attempts, the second with absolute path..both with --debug and nada shows up.

famewolf@hp810-135qe /tmp $ adb devices

List of devices attached

320193852216 device

famewolf@hp810-135qe /tmp $ adb reboot edl

famewolf@hp810-135qe /tmp $ sudo qdl --debug prog_emmc_firehose_8917.mbn rawprogram_recovery.xml patch0.xml

famewolf@hp810-135qe /tmp $ ls

adb.0.log sddm-:0-kHrVDM

calibre_3.42.0_tmp_BaLXR3 sddm-auth219c3f8e-49ec-4971-af1a-998460f520d9

calibre_3.42.0_tmp_j2OflK snap.qdl

firefox-esr_famewolf ssh-xafbeSEV3SOf

hsperfdata_famewolf systemd-private-bfda26f5acfc40928fc28357e457f554-colord.service-sgS1e2

krusader.tmp systemd-private-bfda26f5acfc40928fc28357e457f554-ModemManager.service-fSvxNw

lastChanceDst15645395250301067926194585733791.jar systemd-private-bfda26f5acfc40928fc28357e457f554-rtkit-daemon.service-iLKF8a

patch0.xml systemd-private-bfda26f5acfc40928fc28357e457f554-systemd-resolved.service-V160Q4

prog_emmc_firehose_8917.mbn systemd-private-bfda26f5acfc40928fc28357e457f554-systemd-timesyncd.service-5C5Tli

qtsingleapp-clemen-d211-3e8 twrp-3.3.1-1-z5151v.img

qtsingleapp-clemen-d211-3e8-lockfile vboxdrv-Module.symvers

rawprogram_recovery.xml xauth-1000-_0

famewolf@hp810-135qe /tmp $ sudo qdl --debug ./prog_emmc_firehose_8917.mbn ./rawprogram_recovery.xml ./patch0.xml

famewolf@hp810-135qe /tmp $

*update* Just confirmed factory recovery is still installed so it's not actually doing anything.

Can you provide a md5sum for your twrp zip?

Copied all 4 files to c:\temp and attempted from windows again with identical sahara protocol errors.
[Miscellaneous Android Development] FEGuy:
In linux, make sure ModemManager is disabled before entering EDL mode. You'll know if its working as there'll be output rather than a hang, and at the end it'll reboot. If ModemManager is enabled when you enter EDL, you may need to reboot the phone and boot back into EDL after disabling it.

In Windows, look in Device Manager and try to find the phone when it's in EDL mode (I think it'll be under COM ports, but I could be wrong). If bringing up the properties shows a status error 52 or something similar, look into whether you need to disable driver signature enforcement for Windows 7.

I can get an md5 in a little bit just as soon as I remember where I put the zip file. In general, though, if the XMLs extracted properly I have to assume the rest of the file was good.
[Miscellaneous Android Development] famewolf:
famewolf@hp810-135qe ~ $ sudo systemctl stop ModemMangager

[sudo] password for famewolf:

Failed to stop ModemMangager.service: Unit ModemMangager.service not loaded.

famewolf@hp810-135qe ~ $

The phone was previously showing up on COM3 (displayed at top of QFIL program) however now it's showing unknown device so I'm rebooting the pc and phone.

---------- Post added at 12:41 AM ---------- Previous post was at 12:22 AM ----------

famewolf@hp810-135qe ~ $ sudo systemctl stop ModemMangager

[sudo] password for famewolf:

Failed to stop ModemMangager.service: Unit ModemMangager.service not loaded.

famewolf@hp810-135qe ~ $

The phone was previously showing up on COM3 (displayed at top of QFIL program) however now it's showing unknown device so I'm rebooting the pc and phone. Ok..I reinstalled the usb drivers from 1st post and let them use "compatability mode" to see if it helped any. Ran Qfil and it showed the whole log of finding the twrp image and writing it....all the way till it said the download was finished but the phone never rebooted....after about 5 minutes I reset it and did adb reboot recovery...it pulled up TWRP.

---------- Post added at 12:44 AM ---------- Previous post was at 12:41 AM ----------

@FEGuy

Can you upload your magisk 16.7 zip...maybe attach it to your twrp upgrade instructions as a possible followup? Just a thought. All I seem able to find is Magisk 16.7 Beta unless that's what you meant.

If it is here are the 2 relevant files:

https://github.com/topjohnwu/Magisk/releases/download/v16.7/Magisk-v16.7.zip

https://github.com/topjohnwu/Magisk/releases/download/manager-v5.8.3/MagiskManager-v5.8.3.apk

---------- Post added at 01:05 AM ---------- Previous post was at 12:44 AM ----------

Replacing the fstab.qcom in vendor is pretty much a necessity if you install magisk and should be done BEFORE you install magisk unless you like being in an infinite loop of booting to be told data is corrupt and must be factory reset which sends you to twrp for 2 seconds before booting to do the same thing again. I had to send "adb reboot recovery" when it was in the middle of the brief update in twrp to get out of it.
[Miscellaneous Android Development] FEGuy:
That should be the right Magisk link. Just be careful if your data partition is encrypted as it might tamper with it, causing it to need a wipe. Just flash it through TWRP and it should work. Updating Magisk will cause bootloops, and updating the manager will cause it to stop working because it doesn't support older Magisk versions.

At the moment I don't plan on adding it to that particular guide because it's an outdated, unsupported version; some of the Magisk Hide features like randomized names for the manager, etc. weren't implemented yet, and there are a handful of root-detection systems that'll catch it. I have a custom kernel working with newer versions of Magisk, I just haven't uploaded a compiled version as I've been making sure it's stable (some tweaks had to be made to compile as ZTE deliberately left out bits of the kernel source).

I'll probably post an updated guide with corrections and a Magisk-ready boot.img tomorrow, learning from what did or didn't work with the current guide.
[Miscellaneous Android Development] famewolf:
Replacing the fstab.qcom in vendor is pretty much a necessity if you install magisk and should be done BEFORE you install magisk unless you like being in an infinite loop of booting to be told data is corrupt and must be factory reset which sends you to twrp for 2 seconds before booting to do the same thing again. I had to send "adb reboot recovery" when it was in the middle of the brief update in twrp to get out of it.

..and now after following the fstab instructions it's hung on the visible blue screen (highly reminiscent of the blue screen of death) so I'm calling it a night. I tried both vol up and vol down on boot both standalone and with power held down and I'm not finding the combo to get to twrp so if anyone knows the sequence please let me know.

As a last resort I guess I'll flash B12 tomorrow (which isn't gonna work unless I can get access to adb to put it in edl mode so I might have an issue) via windows and make the recovery twrp to start with. I did the fstab update using adb while phone was in recovery since it wouldn't boot to the point adb worked.

famewolf@hp810-135qe /workarea/android/r2 $ ls

368480B1860Z5151VSBLV1-B12 fstab.qcom prog_emmc_firehose_8917.mbn rawprogram_recovery.xml twrp-3.3.1-1-z5151v.zip

B10 META-INF prog_emmc_firehose_8917.zip Thumbs.db

'Flash TWRP on Visible R2.pdf' patch0.xml R2_TWRP-3.3.1-1_Recovery.zip twrp-3.3.1-1-z5151v.img

famewolf@hp810-135qe /workarea/android/r2 $ adb pull /vendor/etc/fstab.qcom fstab.qcom.bak

/vendor/etc/fstab.qcom: 1 file pulled. 0.0 MB/s (2282 bytes in 0.046s)

famewolf@hp810-135qe /workarea/android/r2 $ adb push fstab.qcom /vendor/etc/fstab.qcom

fstab.qcom: 1 file pushed. 0.2 MB/s (2230 bytes in 0.011s)

famewolf@hp810-135qe /workarea/android/r2 $ adb shell chmod 644 /vendor/etc/fstab.qcom

famewolf@hp810-135qe /workarea/android/r2 $ adb shell umount /vendor

famewolf@hp810-135qe /workarea/android/r2 $

I may have a paperweight. Will leave it on blue visible screen in case it's just taking long long LONG time to recover from factory reset.

Finally found TWRP....volume up AND volume down at same time on boot.

Back in business....I've been doing factory reset's...needed to actually choose "format data".

The current "Magisk Uninstaller" zip doesn't work...won't be an issue after the updated kernel you mentioned but something to keep in mind.
[Miscellaneous Android Development] famewolf:
Anyone know where the 150mb B12 system update actually gets stored? It doesn't seem to have worked with TWRP. The phone downloaded it and then booted into twrp which just sat there so I'm figuring I will have to manually run it (after verifying it will leave recovery alone).

*update*

The file is located in /cache and is named update.zip. Folks needing the update can find it here(150.2mb): https://mega.nz/#!bhUG1AoT!7X_8n_F5Q9mrYsvX-rpA5yhSkD6Mr94aVKFyM9DpS6c

This is the unmodified version and will NOT work if you have installed twrp or magisk.

*update* So apparently the update still did SOMETHING cause when I rebooted twrp it shows the zte screen then goes to a black screen (similar to how it does when in edl mode) and just sits there as far as I can tell. I'm unable to get into twrp either so I'm wondering if the update messed with the boot partition. I'll keep fiddling but if anyone has suggestions I welcome them.

*update2* I had to do a factory reset as the update did something to the userdata partition before failing. I've been fighting with QFIL and had enough. Grabbed the Treble A only Pie Rom and have built a flashable zip for it...will add gapps and see how it does. Only thing I'll hopefully need is the updated kernel to support current magisk.
[Miscellaneous Android Development] famewolf:
Can you also enable writing images to system in TWRP? This would make it easy for folks to try different treble images.
[Miscellaneous Android Development] FEGuy:
I actually just finished getting a more-or-less proper device tree done up for TWRP last night, letting me compile from source rather than hacking things into a build for another device; I still don't think decryption is working properly (I have another R2 coming tomorrow that I'll run tests on, rather than reverting my own to stock to test that much), but at the very least it should accept the default encryption password and then fail to mount /data rather than hang indefinitely. Features that are broken in the current version like writing images to /system and /vendor also seem to work.

Also, I recall reading some time ago that Magisk had some issues with Treble images, but I can't recall what exactly they were. If it's just stuff like safetynet failing, I don't know how much of an issue it's going to be for most people.

I'll also make a note in the next guide that people should try to take OTAs or update their system before setting up TWRP and Magisk to avoid headaches later on. Since it's all just security patches I don't think anyone should be averse to the idea anyways.
[Miscellaneous Android Development] ConnCarl:
Thanks for the walkthrough, I'd like to use it just to be able to get TWRP and flash Magisk to gain root. New phone so I'm not worried about losing any data. Are there any updates for that process?

Also, as far as TWRP freezing on boot while it tries to encrypt the data partition, is that likely to happen only on the first boot, or every time?
[Miscellaneous Android Development] FEGuy:
Hang tight for a little while; I'm in the process of getting a newer TWRP build uploaded as well as a patched boot image that's compatible with newer Magisk versions. The guide needs a bit of an overhaul and you'll probably still need to do the decryption process (including wiping data) to get Magisk working, but it shouldn't hang at boot on encrypted devices anymore, just prompt for a password that you can cancel out of. With the older version uploaded now, it'll freeze up every time unless the data partition is unencrypted.
[Miscellaneous Android Development] ConnCarl:
Sounds good to me. No worries with a data wipe on my end. Thanks!
[Miscellaneous Android Development] FEGuy:
Actually, a data wipe might not even be necessary. I backed everything up and reset the device to (more or less) stock, and TWRP seems to be able to mount and decrypt the partition. No idea how well it'll work if any sort of protection features are set up, though.
[Miscellaneous Android Development] ConnCarl:
No problem. I'm happy to wait for an update, don't need to use the phone right away.
[Miscellaneous Android Development] famewolf:
Ok so I got the Treble Pie system image. I ran simg2img to convert it to a raw image and even mounted that image under linux to a folder named "system" with all the expected files underneath but for the life of me I can't get zip or Ark to successfully add the system directory to an existing flashable zip.

Since I've had such issues with qfil and qdl I'm doing my best to keep everything in TWRP. It's frustrating that we don't have fastboot and the problem will go away when the new version of TWRP comes out but as a learning experience I'd really like to know what I SHOULD have done to get it added to the zip so it could be flashed preferably under LINUX.

Also are there alternative programs other than qdl on linux and qfil on windows? The op mentioned one and I downloaded it but did not find an executable in the zip. If QFIL is showing the com port then the driver appears to be working yet trying to flash even twrp repeatedly till one time it worked at random. I've been unable to repeat that while trying off and on all day to flash the B12 Rom (with twrp copied to recovery.img).
[Miscellaneous Android Development] FEGuy:
New guide is here, covering how to install TWRP, remove encryption, install Magisk, and test Treble images if you're feeling brave. Seemed like a better idea to move it into its own thread rather than keep going in one dedicated to the stock firmware.

---------- Post added at 12:17 AM ---------- Previous post was at 12:15 AM ----------

Sorry, check out the new guide I just posted. TWRP from there will work for flashing images, sparse or unpacked, for /system. Unfortunately I don't know of any way to get around QFIL or qdl for initially installing TWRP, but once it's set up you can just flash new TWRP builds on top of it.
[Miscellaneous Android Development] famewolf:
Yeah my main issue there is I need to do one of the following to stop the endless attempts to do system updates:

1) Get B12 installed on my system which requires either getting qfil or qdl working other

2) Get a flashable zip of the B12 update that doesn't much with userdata and recovery. (I THINK I can stumble through that. Right now the factory update fails pretty much right away because the fingerprint no longer matches what it expects.)

3) Get a Treble image working. We have an aosp oreo, a pie image and even lineage 15.1 (maybe 16 as well).
[Miscellaneous Android Development] famewolf:
Appreciate the wallpapers...running the treble Pie rom and it didn't come with any wallpapers.

Ok I just crumbled and ordered a 2nd R2 I really didn't need. *sigh*
[Miscellaneous Android Development] dharary:
I am trying to flash the stock image but I think something is going wrong. QFIL isn't finding the device when I chose select port. I installed QDLoader and ZTE Android USB Driver, but I don't know what to do with the ZTE V889F_V880G_V955 A2_Drivers file. There doesn't seem to be an installer to run, just files.
[Miscellaneous Android Development] famewolf:
Pull up QFIL then plug in your device. If the top part of the qfil screen doesn't show a com port and something about 9008 then the drivers are not correctly installed. I don't recall needing the QDloader drivers...just the ZTE USB ones. You may have to reboot the phone and the pc but QFIL isn't going to do anything till you have the drivers installed correctly. You can look under your devices in device manager (control panel) and you will probably see one listed as unknown or with an exclamation point. All I can recommend is uninstall the drivers (from programs) reboot and reinstall the ZTE one....the DLoader one and the ZTE one may be conflicting with each other....you also have to have the phone in EDL mode before it will show up.
[Miscellaneous Android Development] dharary:
I uninstalled everything and rebooted. Now I only have QPST and the ZTE USB drivers installed. I have OEM unlocked USB debugging enabled. I put my phone in EDL mode started up QFIL but I still don't see the phone in the port. In the Device Manager the only yellow triangle exclamation point I see is under the ADB Interface by the ZTE Composite ADB Interface. I don't see the phone under anything in the device manager. When i reboot the phone and conect it PTP mode i can find the phone under Portable Devices listed as Visible R2 but there is no yellow triangle exclamation point. [The only thing I was able to do before all of this was to get TWRP installed by following the directions posted. Im not sure that even worked 100% since i cant access anything on tye phone. After that I started to run into the problems when I tried getting the stock image back.]

I hope I described enough . I would appreciate any guidence you can give. Thanks
[Miscellaneous Android Development] famewolf:
I can give it a go but I'm a linux user and only occasionally use windows .....I had major issues getting win 7 and QFIL to cooperate but eventually got twrp flashed.....From a powered down phone if you hold up volume and power till the phone resets, when you see the white ZTE screen release power but keep up arrow held...this will take you into recovery...you can confirm there if you have twrp or not. Nothing about flashing twrp should mess up the stock rock...you shouldn't NEED to flash the stock rom and the b10/b12 zips are NOT flashable zips....they are intended to be used with QFIL. First thing you need to confirm is whether you do have twrp....cause from twrp you can always install one of the treble roms. You should really be asking your questions in the TWRP thread since you don't know if you have that installed yet and [MENTION=3540215]FEGuy[/MENTION] may be able to assist you more.
[Miscellaneous Android Development] dharary:
Thanks for replying. I can get into TWRP by holding up the volume key at power up. I am trying to do this because I can't get the ota update that is constantly trying to be downloaded so I wanted to go back to stock, update and then reinstall TWRP and try rooting with magisk. Am I correct thinking that QFIL can load the b10 and flash it to the phone? Still not sure why QFIL can't find my phone.

Anyone else have any ideas where I went wrong?
[Miscellaneous Android Development] famewolf:
You always have the option to flash either the treble A-Only Oreo rom or what i did was install the Treble Pie Rom....no more issues with upgrading. Are you on win 7 because it gave me alot more grief than the win 10 users seemed to have. Ideally you should have done the update FIRST which is what the instructions suggest. I'm not sure what else to suggest other than play with the drivers until you can get qfil to recognize the com port.
[Miscellaneous Android Development] R2user:
What Treble Pie ROM are you using?
[Miscellaneous Android Development] famewolf:
https://droidfeats.com/android-9-pie-update-project-treble-gsi/
[Miscellaneous Android Development] dharary:
I'm not sure what went wrong. I tried using QFIL to go back to stock with the B12 Firmware. I followed the directions and I put the missing prog_emmc_firehose_8917.mbn inside the folder of the B12 firmware but QFIL gave me an error "Download Fail:Firehouse Fail:FHLoader Fail:Process Fail. What should I try to make it work?
[Miscellaneous Android Development] famewolf:
You have to install the ZTE usb driver mentioned in the first post. Next time paste the entire session log as it shows more than just that one error like what caused it to fail.
[Miscellaneous Android Development] glebanych:
I bricked the Z2 to the point where i wasn't able to load into EDL and had the same error. Here's what i did to flash stock image:

1) Open rawprogram0.xml and remove 2 strings that mention "userdata" and "ddr".

2) Download MiFlash. It's much better and works just fine. Open it before connecting the phone and choose the folder with the B12 firmware. Choose "clean all" at the bottom of the window

3) If you can boot into EDL- act fast. I don't know why, but you have around 7 seconds before the COM port becomes unresponsive.

So boot into EDL and click "Flash" as fast as you can after you saw the phone appeared in MiFlash.

4) If you can boot into DFU but not EDL - follow this instruction. Worked fine for me.
[Miscellaneous Android Development] dharary:
Thanks. Do you have a link for MiFlash? I'm not sure where to find it for the R2.
[Miscellaneous Android Development] glebanych:
Sure, follow the link and download MiFlashSetup.msi
[Miscellaneous Android Development] daniel_mdk:
Sorry if slightly off-topic, but what did you do to get Visible to work on an unsupported model?
[Miscellaneous Android Development] paulCIA:
Figured a Pixel 2XL couldn't be that different from a 3XL and just told em i had an iPhone so they'd send me a Sim card figuring that as with most prepaid carriers, the card is only bound to a subscription and not any particular device, popped it in, and it worked.... Sort of. It would rarely and randomly but fairly reliably lose its connection to the LTE network (how I discovered it doesn't support CDMA), and then just as randomly reconnect after somewhere between 5 seconds and 5 hours. Didn't happen often, not the end of the world, might have stuck with it, but I still had pretty slow data speeds, almost as if the cap hadn't been removed, but it varied so wildly from <1 to >125 mbps I don't think that's the issue.

Got the R2 for the hell of it since it was only $20, a perfect device to **** around with some firmware with or without service since there is nothing lost in bricking it, sure enough no service dropping out but same slow data speeds, maybe even slower, best I can figure is I was just getting pigeonholed into the highest/lowest 9th level of LTE QOS hell so I ended up cancelling it and switching to tmobile since I happen to live next to one of their towers, but it was an interesting experiment and i still haven't bricked the R2 so the next challenge will be made that work with Tmo.....

[Note I do actually have an iPhone too but it's a 5s and those really are not supported at all!]
[Miscellaneous Android Development] daniel_mdk:
Ah ok. I have a Pixel XL that has never worked. Tried using MagiskHide Props Config and some serial ID spoofing but it doesn't fool the network (or anything outside the scope of the OS). Maybe the Pixel 2s have enough in common with the 3s for partial support?

The QOS definitely sucks. When it gets down to <1 mbps at completely off-peak times, and on. Unfortunately I don't live close enough to any towers to influence my decision, going to stick this plan out for a bit and hope for improvement.

Thanks for all the info!
[Miscellaneous Android Development] ryan0720:
Is there still rooting avail? The twrp file is gone I got this device and was wondering if there was still anyway of rooting?
[Miscellaneous Android Development] deadman96385:
Take a look here it has everything you need

https://xdaforums.com/android/development/recovery-install-twrp-remove-encryption-t3953494
[Miscellaneous Android Development] ryan0720:
Thanks for suck a quick reply. This was the easiest directions ever to follow got twrp installed in under 5 min. Really appreciate it the details and the time good job.