yashsingh1/xdaforums huggingface dataset:
[Moto Z2 Force  ROMs, Kernels, Recoveries, & Other ] jhofseth:
VIDEO: How to update Pixel 2 XL TWRP zip for Z2 Force

(Note: the video is a lot higher quality if you download it first.)

I made a brief video set to music on how to update Pixel 2 XL TWRP zip for Z2 Force:

https://drive.google.com/file/d/12B8mBlixTvM8vV6oVfF04_c4CU8hf98Q/view?usp=drivesdk

the filename is: how_to_update_Pixel2XL_TWRP_zip_for_Z2Force.mp4

A sample zip that could updated is attached; it was also included in this post:

https://xdaforums.com/showpost.php?p=74627577&postcount=303

You have to root with latest Magisk zip (or SuperSU 2.82 beta SR5) after flash updating, but your kernel stays the same--only TWRP gets updated, which is how the official site TWRP.me provides installers. Also, the music is a portion of track #2, 'Bike', from the album 'Incunabula', and the artist is Autechre. :)
[Moto Z2 Force  ROMs, Kernels, Recoveries, & Other ] joemossjr:
Lol going all at it
[Moto Z2 Force  ROMs, Kernels, Recoveries, & Other ] OptimaPrime:
Tried OP Method, and other methods found throughout the thread. It does not matter which IMG file or method I keep getting this message in Terminal:

david@Heather:~/Desktop/Moto$ sudo fastboot flash boot TWRPREV3.1.img

(bootloader) partition-: not found

(bootloader) max-download-sizeot: not found

sending 'boot' (19724 KB)...

(bootloader) Requested download size is more than max allowed

FAILED (remote failure)

finished. total time: 0.000s
[Moto Z2 Force  ROMs, Kernels, Recoveries, & Other ] Uzephi:
I would try without sudo. I never needed root to flash anything on any of my phones. It is odd your phone isn't sending the max download size. Can you do a "fastboot devices" and see if your phone is being recognised in fastboot mode?
[Moto Z2 Force  ROMs, Kernels, Recoveries, & Other ] jhofseth:
I dual-boot Fedora 27 (KDE Spin) Linux and Windows 10. In Linux, fastboot surprisingly fails, because I use the default repo's binaries; however, it succeeds in Windows 10, because I use Google's official fastboot (which I could also download for Linux if I needed to, and probably should):

https://developer.android.com/studio/releases/platform-tools.html

Also, we do not have a partition called 'boot'. We have a partition called boot_a and a partition called boot_b . I know sometimes 'fastboot flash boot xyorz.img' works due to the binary appending which one, but sometimes you have to use boot_a and boot_b. There is no harm in flashing both boot_a and boot_b. :)
[Moto Z2 Force  ROMs, Kernels, Recoveries, & Other ] OptimaPrime:
I dual boot Ubuntu and W10 and have been using Ubuntu for this. Just because I am more comfortable with the Linux Terminal.

So fastboot is being weird with this device. It always shows the device if it is in the OS. However when in the bootloader sometimes it detects it sometimes it does not. This is something I have never experienced with my U11 or Shamu. I will attempt with the boot_a or boot_b and see what happens.
[Moto Z2 Force  ROMs, Kernels, Recoveries, & Other ] joemossjr:
On fastboot on Ubuntu sometimes you have to run sudo before fastboot devices
[Moto Z2 Force  ROMs, Kernels, Recoveries, & Other ] OptimaPrime:
Finally got TWRP updated sdk and then flashed boot_a no dice, flashed boot_b and money. So I guess that means I am on slot b
[Moto Z2 Force  ROMs, Kernels, Recoveries, & Other ] OptimaPrime:
Okay so I formatted data as the OP states. I also flashed the decryption zip. However, my files are still jumbled and device still says encrypted. Do I need to allow TWRP more than Read access? Am I missing a step?
[Moto Z2 Force  ROMs, Kernels, Recoveries, & Other ] blackwing182:
You need to read again.
[Moto Z2 Force  ROMs, Kernels, Recoveries, & Other ] OptimaPrime:
Flashed TWRP, Formatted data, flashed root. Still encrypted tried flashing decryption zip still encrypted. I have read several times before and several after.
[Moto Z2 Force  ROMs, Kernels, Recoveries, & Other ] blackwing182:
Format data typing yes?
[Moto Z2 Force  ROMs, Kernels, Recoveries, & Other ] OptimaPrime:
Yes, just like it stated
[Moto Z2 Force  ROMs, Kernels, Recoveries, & Other ] blackwing182:
When i did it, i had to do it like 2 times dont know why
[Moto Z2 Force  ROMs, Kernels, Recoveries, & Other ] OptimaPrime:
Going to try again when I get home
[Moto Z2 Force  ROMs, Kernels, Recoveries, & Other ] enetec:
Follow my guide and it will work... ;)
[Moto Z2 Force  ROMs, Kernels, Recoveries, & Other ] OptimaPrime:
Okay got home formatted data twice and flashed ext 4 decryption and all is good.
[Moto Z2 Force  ROMs, Kernels, Recoveries, & Other ] Chrisy8s:
There is a deencrypt file that [MENTION=3659125]joemossjr[/MENTION] gave me that finally did the trick for me on the stock ROM... No matter what I did wouldn't stay unencrypted.. with NCP was much easier...

Oops.. didn't read all new posts first. Lol
[Moto Z2 Force  ROMs, Kernels, Recoveries, & Other ] OptimaPrime:
Thanks yeah I finally got everything g2g. Now to sit back and wait for the ROMs start rolling in. Wish there was still an NPC zip available guess I'll have to wait for the update.
[Moto Z2 Force  ROMs, Kernels, Recoveries, & Other ] enetec:
It's not necessary to format /data twice... it's only required to do it in the *right* moment... :p

Anyway if it finally worked... it's obviously ok! ;)
[Moto Z2 Force  ROMs, Kernels, Recoveries, & Other ] jhofseth:
info for those interested in a fastboot bootable TWRP

see attached screenshot

screenshot was from this URL:

https://source.android.com/devices/tech/ota/ab_implement
[Moto Z2 Force  ROMs, Kernels, Recoveries, & Other ] blackwing182:
Whats your point with this? [emoji848]
[Moto Z2 Force  ROMs, Kernels, Recoveries, & Other ] jhofseth:
The fastboot boot to TWRP boot image should have a kernel compiled or patched to ignore skip_initramfs added to kernel command line by bootloader, I believe, and then it becomes a matter for init in ramdisk. How ramdisk init is configured becomes relevant at that point, I think, and that is defined in TWRP source code for our device.
[Moto Z2 Force  ROMs, Kernels, Recoveries, & Other ] enetec:
If I have well understood, skip_initramfs is the switch we were seeking for... a boot.img modified to ignore this bootloader parameter should ever boot on TWRP (which is what we were seeking for...).

It seems to be a simple to be implemented modify (and this were my expectations...;) ).

Interesting too is the declared link between TWRP and Kernel, mostly for standard flashable TWRP and its updates: as already first hand seen (by me...) on Mediatek devices in past, a bad kernel update causing e.g. early bootloops, could make flashed TWRP unusable too! :eek:

This, if needed, is *another* good reason to have a working bootable-only TWRP... ;)
[Moto Z2 Force  ROMs, Kernels, Recoveries, & Other ] Uzephi:
Just reflash then. Every time someone wants a flash bootable TWRP and implies it, it makes me personally push it back two weeks. It isn't needed. It would be a nice QOL for specific circumstances. current TWRP is working just peachy.
[Moto Z2 Force  ROMs, Kernels, Recoveries, & Other ] jhofseth:
I think it would be nice if our TWRP was able to be officially added to TWRP.me website. As far as I know, the only thing possibly preventing that is encryption support. Personally, I would prefer whatever performs better; so, if encryption hinders performance, I would prefer unencrypted userdata. :)
[Moto Z2 Force  ROMs, Kernels, Recoveries, & Other ] enetec:
OK, backup a stock kernel of which a flashall is not available... ;)
[Moto Z2 Force  ROMs, Kernels, Recoveries, & Other ] Uzephi:
I'll pull one easily... It's as simple as fastboot booting a rooted boot and the DD if/of command and extract it.
[Moto Z2 Force  ROMs, Kernels, Recoveries, & Other ] joemossjr:
Or booting to the other partition and flashing twrp and pulling it like that with a being stock and b being twrp
[Moto Z2 Force  ROMs, Kernels, Recoveries, & Other ] enetec:
Yeah, all things for average Mr. & Mrs. Smith... :rolleyes:

It's obvious to all but both of you that they are both potentially tricky and dangerous for /data operations...

But I was forgottin' how official TWRP team are a bounch of stupids with their unuseful solutions... :rolleyes:
[Moto Z2 Force  ROMs, Kernels, Recoveries, & Other ] Uzephi:
They did a workaround for their phone. we didn't need the work around. we got it working with a flashable boot image. (all boot images are interchangeable with our phone. everything different is in the /oem partition) We never called [MENTION=912474]Dees_Troy[/MENTION] or other TWRP developers stupid. They got encryption working when we're still working on it for our device. If bootable TWRP is a must for all msm8998 devices, then why does the OP5 not have it? If you're so hell bent on a bootable TWRP when our flashable one works fine (encryption not included) why don't you learn and do it?

Our kernel for our device was the first one I officially made. I tinkered and built before, but it was from available sources from other developers. You want something do it yourself. No one else took the kernel development on this device, so I learned along the way. It's not that hard, I suggest you try as well if you really want bootable TWRP.
[Moto Z2 Force  ROMs, Kernels, Recoveries, & Other ] enetec:
Just to be clear...

I was just askin' on a my own topic if someone could help on developing something that is *clear* to quite all it would be useful to many.

I've not asked to anybody (included you...) to develope this one for me (I'm OK with my setup and don't need anything at the moment...).

You, without giving any help on this, tried to persuade all here that what I'm helping to develope is unuseful.

This is *wrong* in my opinion and I think I have all rights to explicit what are my thoughts about this.

If my opinion and my help here are not welcome... I would live fine with it. Stay sure.

But this don't give you (or other...) rights to exit with sentences like "if you want it, do it yourself" when you don't know me and don't have any idea on what could be reasons for not doing this myself (and they, stay sure, are not about skills... are only about time because of my - well paid... - IT work, just FYI...).

When I've asked something because I needed it, I've thanked and made a donation too (and to be honest, I've not received any thanks about it...).

This is *not* the case. I don't need it. Other will. And they will find hard way... :rolleyes:

Let me conclude in my years on XDA (and before on other forums...) this is the first time I have found both talented and mindclosed developers...

Best regards.
[Moto Z2 Force  ROMs, Kernels, Recoveries, & Other ] Uzephi:
How would you know? [MENTION=3659125]joemossjr[/MENTION] [MENTION=4275707]TheKnux[/MENTION] and I have been talking since we started development. There have been telegram communications and Hangouts communications. They also use Slack. We talk, we try. One of us hard bricked his phone trying this method. You only see what's done here. Don't throw claims "you haven't tried" just because I haven't stated on a forum that I've tried doesn't mean I haven't. I took a break from it because of said bricks. Every time someone asks about it, I get agitated because you think we don't work on things. We don't want to give people's hopes up on things if it doesn't work. Why do you think I sat on a kernel for a month before releasing? It wasn't because it wasn't done. I wanted to make sure it was stable for a release. I tried plenty of times to edit the boot image. I have had some luck but same issue. Encryption. I won't release a fastboot bootable TWRP image if it can't read the device without a wipe and decrypt zip. That's just stupid.

Edit: as I have stated: encryption is in Java, I was going to actually check into the Pixel 2's twrp source for how they translated the Java to C for decrypting but it's all Greek to me and our keys are stored differently as it was engineered by Lenovo and not Google

Edit 2: You repeatedly ask about the status or someone to get a bootable TWRP working. We can make it work. It has the same decryption issue as the released one. No point in releasing it if encryption doesn't work. Developing takes time especially when you have to learn a new programming language to understand an idiosyncrasy to get the portion not working for our device. It isn't high priority since we have TWRP working the same way right now with a different install method. We are working on getting AOSP and other things going for the masses. bootable TWRP can take a break on the back burner until we have a reason for TWRP besides kernels and backups. (which work fine right now)
[Moto Z2 Force  ROMs, Kernels, Recoveries, & Other ] enetec:
I *do not* agree. And never will.

You spoke about brick... many will (hope "soft"...) brick their device since of this not available.

Not my problem anyway. I'm OK.

P.S.: FYI ... https://www.reddit.com/r/oneplus/comments/7aamxz/does_the_oneplus_5_use_ab_partitions_when_updating/

(we should be *serious* during discussions and not speak as "fanboy"...:rolleyes:)

Discussion closed for me.
[Moto Z2 Force  ROMs, Kernels, Recoveries, & Other ] Uzephi:
Erm.... No, HARD brick. One of us had to actually get an insurance replacement. the device wouldn't boot or be recognized via USB any more. I can link the TWRP bootable image but I will say hard brick is highly possible and we are not responsible for breaking your phone permanently.
[Moto Z2 Force  ROMs, Kernels, Recoveries, & Other ] joemossjr:
I've bricked permanently 3 times now
[Moto Z2 Force  ROMs, Kernels, Recoveries, & Other ] jhofseth:
unbricking within Qualcomm EDL mode

One thing to look into is latest Qualcomm QFIL flash program (included in QPST) in conjunction with an EDL 8998 .elf programmer binary flashing official partitions in Qualcomm's EDL mode (i.e., .elf not .mbn binary, I believe). Programmer binaries can be hard to find, and they often have to be model specific; but, we may have flexibility due to OEM unlocked bootloader. There are also small xml config files involved, but those are easy to modify for our partition structure, etc. I have found EDL mode useful in the past.

(initial command into EDL mode via root Android terminal; flashing afterward via regular USB cable from PC)

su

reboot edl

(or using USB cable from PC adb to go into EDL mode; flashing afterward via regular USB cable from PC)

adb reboot edl

Or, via an EDL flash cable (purchased or DIY; easy to make, see attached pics of my DIY EDL flash cable; pics are wonky on XDA right now, apparently, so I removed them; linked here,

pic 1

, and here,

pic 2

, instead) purchased via Amazon.com, etc., that is connected to PC with latest QFIL/QPST installed (Win 10 also auto-installs Qualcomm drivers).

To get out of EDL mode after using the first two methods above, I would use button combo press to fastboot mode. If you have to use the third method, clearly you would already need to flash official partitions first. :)

QPST 2.7.460 (includes QFIL) download here: https://drive.google.com/open?id=1rDlU5RL2jkNojNikpgx6BHCDs8HdYqqW

or here (i.e., where I got it from): http://www.androidbrick.com/download/download-latest-qualcomm-flasher-qfil-qpst-2-7-460/

2 programmer examples are attached (i.e., will not work for Moto Z2 Force, but you will see the config files, an 8998 .elf firehose, etc., which would be extremely similar to how it would be for us; these are for the Xiaomi Mi6). People who have connections get these all the time for various Qualcomm phones, so if you have connections to others in the industry or know others on XDA who do, they may send them to you privately. They are not super-secret or anything, they're just a way to flash official partition images to Qualcomm phones (e.g., can also be used to unbrick).
[Moto Z2 Force  ROMs, Kernels, Recoveries, & Other ] Chrisy8s:
It's getting a little tense so I just wanna say thank you to Uzephi and JoeMossJr (again) for all the work and risking your devices to help us all. I think we all have the same goal (edit: to do make our device the best it can be) and disagreements happen. You all have helped (entec included) me learn all this from scratch as a complete newbie to this stuff and I am very grateful... So since I am clueless ,as usual, to what is actually discussed I will bow out of this now but you all are heros in my book.
[Moto Z2 Force  ROMs, Kernels, Recoveries, & Other ] enetec:
Could you open a specific topic to explain how so that others would avoid same errors eventually? ;)
[Moto Z2 Force  ROMs, Kernels, Recoveries, & Other ] jhofseth:
I don't know what [MENTION=3659125]joemossjr[/MENTION] was doing, but I would personally be very careful with:

rpm_a

rpm_b

xbl_a

xbl_b

abl_a

abl_b

rpm_a and rpm_b are the primary OS bootloader and xbl_a and xbl_b the extended OS bootloader; abl_a and abl_b are also bootloaders, and I think they may contain fastboot but I'm not sure. Just keep one slot as backup. So, if you mess up _a it will try _b--or vice-versa; but, messing up really only means messing up bootloaders, because everything else should be easily fixable via fastboot. The good news is the primary OS bootloader is actually not the true primary bootloader, which is really Qualcomm (hardware-level, so-to-speak) and that's why EDL mode can be used to unbrick. Qualcomm Snapdragon phones really are virtually unbrickable, we just have to get a 8998 .elf EDL programmer binary (often model specific). Thankfully, I've unbricked one Snapdragon 835 phone with EDL mode in 2017; I had given up on the phone, but someone on XDA knew somebody else on XDA, and that person apparently had a connection in China (not a Xiaomi, I Googled those zips). Some people on XDA have connections. :)
[Moto Z2 Force  ROMs, Kernels, Recoveries, & Other ] joemossjr:
Flashed the leaked 8.0 image. Second. I tried booting to slot b and there was nothing on b so I got a nice "your about to brick message" before I did it and didn't listen and still did it. Third. Was trying to install a blank flash from verizon. Stay away from those things and you'll be good lol
[Moto Z2 Force  ROMs, Kernels, Recoveries, & Other ] kendallgreen:
I agree with Uzephi, joemossjr and jhofseth. I can wait for a TWRP that can handle an encrypted phone for now. All I need is the ability to backup my encrypted phone for now. I believe that rooting and unlocking the bootloader are possible now. Flashing new images to avoid the unlocked bootloader would be good. Eventually I would like to be able to boot a custom rom, etc. Lineage OS has been very good to me, keeping my previous OPO and Moto E2 up to date when the manufacturer abandoned them.
[Moto Z2 Force  ROMs, Kernels, Recoveries, & Other ] enetec:
:laugh:

Well, not so common operations anyway...

On Griffin there was some well more common operations that (absurdely...) bring to Qualcomm state... :rolleyes:
[Moto Z2 Force  ROMs, Kernels, Recoveries, & Other ] joemossjr:
Apparently if you haven't took an ota and haven't unlocked slot b that's a good way to brick
[Moto Z2 Force  ROMs, Kernels, Recoveries, & Other ] jhofseth:
TWRP 3.2.0-0 released!

TWRP 3.2.0-0 was released today! :)

https://twrp.me/site/update/2017/12/01/twrp-3.2.0-0-released.html
[Moto Z2 Force  ROMs, Kernels, Recoveries, & Other ] joemossjr:
I'll get on it
[Moto Z2 Force  ROMs, Kernels, Recoveries, & Other ] Uzephi:
https://xdaforums.com/pixel-2-xl/development/twrp-alpha-pixel-2-xl-t3698148/post74704704

FYI, 3.2.0.0 currently isn't officially working on pixel 2. (Older devices work fine with just a pull and update like my old M7) so the decryption improvement might be the issue.
[Moto Z2 Force  ROMs, Kernels, Recoveries, & Other ] joemossjr:
UPDATE:

NEW TWRP 3.2.0.0

Allow restoring adb backups in the TWRP GUI (bigbiff)

Fix gzip backup error in adb backups (bigbiff)

Fix a bug in TWRP's backup routines that occasionally corrupted backup files (nkk71)

Better support for installing Android 8.0 based zips due to legacy props (nkk71)

Support vold decrypt with keymaster 3.0 in 8.0 firmwares (nkk71)

Decrypt of synthetic passwords for Pixel 2 (Dees_Troy)

Support newer ext4 FBE policies for backup and restore in libtar (Dees_Troy)

v2 fstab support (Dees_Troy)

Bring TWRP forward to android 8.0 AOSP base (Dees_Troy)

Various other minor bugfixes and tweaks

UPDATES FROM ME:

Added latest upstream from [MENTION=4604067]Uzephi[/MENTION]
[Moto Z2 Force  ROMs, Kernels, Recoveries, & Other ] enetec:
Veeery fast release!! :good:

Am I wrong or there is no zip-flashable of v.3.2? :confused:

What Pantheon kernel version is included in .IMG?
[Moto Z2 Force  ROMs, Kernels, Recoveries, & Other ] Uzephi:
"Added latest upstream" so I assume v1.3 4.4.103
[Moto Z2 Force  ROMs, Kernels, Recoveries, & Other ] joemossjr:
I have to make one I just wanted to get it out
[Moto Z2 Force  ROMs, Kernels, Recoveries, & Other ] enetec:
Have you found some interesting news for our development needs on new v. 3.2? :confused:
[Moto Z2 Force  ROMs, Kernels, Recoveries, & Other ] joemossjr:
Haven't had time to mess with it
[Moto Z2 Force  ROMs, Kernels, Recoveries, & Other ] Team DevDigitel:
flashed 3.2 but now i get stuck in a reboot to twrp loop, flashed magisk after and still no working. Been waiting for it to launch to see if it will flash a/b roms to the z2force better to get this rom released. Good work on the compiled twrp tho!

Edit: added a 3.2 flash-able for anyone who wanted, but like i said its not working for me here.
[Moto Z2 Force  ROMs, Kernels, Recoveries, & Other ] joemossjr:
New update added with update guide! Added in a certian mount that allows certian things to be changed! Stay tuned!
[Moto Z2 Force  ROMs, Kernels, Recoveries, & Other ] jhofseth:
delete
[Moto Z2 Force  ROMs, Kernels, Recoveries, & Other ] joemossjr:
working on it lol
[Moto Z2 Force  ROMs, Kernels, Recoveries, & Other ] meathammer386:
You are the bestest
[Moto Z2 Force  ROMs, Kernels, Recoveries, & Other ] X_man.:
:

If you are working on that then I may just wait a bit. I like the idea if flashing TWRP from inside of TWRP. Sounds a little safer to me but I may be wrong. I'm gonna flash it regardless which ever way I have to do it. But thank you for all the work. I've been waiting for this on pins and needles. I don't like having a device without a recovery to back it up. Makes me nervous lol
[Moto Z2 Force  ROMs, Kernels, Recoveries, & Other ] :
This whole phone makes me nervous [emoji23]
[Moto Z2 Force  ROMs, Kernels, Recoveries, & Other ] X_man.:
:laugh:

I feel ya LOL
[Moto Z2 Force  ROMs, Kernels, Recoveries, & Other ] WeUseLord-:
New updated TWRP is working and no problems happening nice job OP

One issue is my boot time is close to 20 seconds longer though :confused:

But other than that there are no issues in the log or anywhere else

FLAWLESS
[Moto Z2 Force  ROMs, Kernels, Recoveries, & Other ] TheKnux:
Note to everyone having issues with formatting data:

Do not go to advanced wipe and wipe data. This does nothing. You have to go to format data and type "yes" as stated in op.
[Moto Z2 Force  ROMs, Kernels, Recoveries, & Other ] psycho4us4:
shouldn't this thread be in : roms, kernels, recoveries, and other development section?

keep up the good work
[Moto Z2 Force  ROMs, Kernels, Recoveries, & Other ] Pizzuto:
Do I need to do this with stock boot img? I'm on August image with Magisk root boot.img. Can I just proceed with current setup, or should I flash back to stock?
[Moto Z2 Force  ROMs, Kernels, Recoveries, & Other ] :
Be safe and start fresh.
[Moto Z2 Force  ROMs, Kernels, Recoveries, & Other ] DsturbD:
oh this is so freakin awesome

will this overwrite the boot.img installed from CFAR?
[Moto Z2 Force  ROMs, Kernels, Recoveries, & Other ] DsturbD:
works great!

during a backup when you choose storage it shows Internal Storage and sdcard, along with MicroSD Card and OTG

also on the Advanced Wipe screen it lists internal storage twice as well, when you select both to wipe it errors saying unable to wipe /sdcard. wiping Internal Storage works though

did a backup, wiped and restored, everything looks good