yashsingh1/xdaforums huggingface dataset:
[Moto Z2 Force  ROMs, Kernels, Recoveries, & Other ] jhofseth:
[MENTION=4881555]jbats[/MENTION] , I suppose I should've asked you #90 as well, since you had the kernel repo. Thanks. :)
[Moto Z2 Force  ROMs, Kernels, Recoveries, & Other ] Bestplayer55:
Oh man I feel so happy to have a custom rom. The stock rom is giving me a lot of hard time
[Moto Z2 Force  ROMs, Kernels, Recoveries, & Other ] Chrisy8s:
Custom ROM? How did I miss that? Do mods still work with it?
[Moto Z2 Force  ROMs, Kernels, Recoveries, & Other ] joemossjr:
Yep
[Moto Z2 Force  ROMs, Kernels, Recoveries, & Other ] enetec:
Hi, can somebody confirm "firsthand" this TWRP works fine on European XT1789-06 64GB Dual SIM version too? :confused:

Any particular Google patch version required?
[Moto Z2 Force  ROMs, Kernels, Recoveries, & Other ] StonedYoda:
I'm not sure if anyone knows the answer to that, but I can tell you that if this phone is anything like the Moto G4 Plus, all the ROMS worked for all the different international variants for that device. I would say that they haven't deviated much since that phone but with this dual slot setup, I wouldn't be positive. If you can't wait, I'd make sure you have a fastboot-flashable stock img to flash if things go sideways and give it a shot. That's what I usually do for all my phones, but only after making sure I can recover in any case scenario except the permanent hard brick. But I've also hard bricked a Moto before even flashing anything somehow so it may be trial and error. Although this is my personal opinion, it should be noted that I'm not a licensed professional or any sort, nor do I play one on television.
[Moto Z2 Force  ROMs, Kernels, Recoveries, & Other ] enetec:
So, do all here have the US XT1789-01 branded version (Tmobile or Sprint since what I've seen...) ?

On Moto Z (my actual device) there is no difference on versions.... even single and double sim can use same software... as you say too.

But is there no European here to share some experiences?

I'm a bit afraid since of the "recovery-in-boot" solution adopted with this phone... :rolleyes:
[Moto Z2 Force  ROMs, Kernels, Recoveries, & Other ] StonedYoda:
I don't blame you for being cautious. I haven't seen anyone using the EU version, but maybe you could also check the Motorola/Lenovo forums or perhaps G+ communities as well. And as dumb as this sounds, I always type in exactly what I'm looking for in Google search and it leads me to where 9 can get the info I need. Good luck!
[Moto Z2 Force  ROMs, Kernels, Recoveries, & Other ] enetec:
An Idea... can I test this TWRP by using an ADB BOOT TWRPFILE. IMG and see what happens?

If it works I could do a backup of the original boot partition and eventually I could even restore it if needed...

What do you think about it? :confused:
[Moto Z2 Force  ROMs, Kernels, Recoveries, & Other ] jhofseth:
Yeah, you can try fastboot boot command. If all is OK, then no need to swap your kernel. The recovery is in the ramdisk. The other main part of the extracted boot image is the kernel. It's possible to permanently swap the kernel yet keep the TWRP containing ramdisk. I would also recommend backing up your current boot image, and saving to an external drive before any actual fastboot flash command. If you have to swap kernels, I can vouch for Superr Kitchen, which has a free Linux version as well as a donate Windows/Linux version.

FREE Linux Superr Kitchen

https://xdaforums.com/apps/superr-kitchen/kitchen-superr-s-kitchen-v1-1-50-v2-1-6-t3597434

DONATE Windows/Linux Superr Kitchen

https://xdaforums.com/apps/superr-kitchen/windows-linux-superr-s-kitchen-v3-0-0-0-t3601702

You can extract your original boot image and the rev2 boot image, and copy-paste your extracted original kernel zImage into the extracted folder of the rev2 boot image (i.e., overwriting rev2 kernel zImage). Then you can repack the rev2 boot image and fastboot flash. When I did it, I also deleted the rev2 boot image (in the project folder) after extracting to make sure that a new boot image was properly generated in the appropriate project folder during repack (just ignore any warning, it repacks OK). Of course, there are way more easier tools than Superr Kitchen; I just used it successfully with rev2, so I can recommend same. Hopefully, you won't have to swap kernels. Superr Kitchen also allows for other boot image modifications.
[Moto Z2 Force  ROMs, Kernels, Recoveries, & Other ] enetec:
Thanks a lot for your reply...

So, the problem is that this way I can only "test" the boot part included in rev2 on my device, but there is no adb command available to boot directly into recovery part of rev2.... am I right?

(Like I could do in a "separate recovery" device...)

Well, better than nothing (if boot included in rev2 works fine quite no risk to brick and at 99% even TWRP would work fine too) but no way to backup original boot.IMG by it or by adb commands... :/

I don't know Superkitchen and probably it would be a bit over my actual knowledge, bit I'll take a look on it...

Anyway the Moto people decision to include recovery in boot partition instead that in a separate one is A MESS for modders and/or advanced users... :(

Two more questions...

- XT1789-01 US versions on which TWRP has developed come with 32 or 64 GB of storage? EU XT1789-06 comes with 64 GB...

(I'm a bit worried about partitions issues...)

- on OP there is a warning about not to enable R/W in TWRP since of DM Verity presence that could block bootup... but no more info on it in setup instruction part... does it simply SuperSU flashing is needed to disable DM Verity check? :confused:

Thanks again... and if anybody has already tested it on -06 devices, PLEASE contribute to this thread...

(In EU this device is quite expensive - well over 1000$! - so not so happy to eventually brick it.... :eek: )
[Moto Z2 Force  ROMs, Kernels, Recoveries, & Other ] loaferkan786:
hey I got my bootloader unlocked, and I would need a bit help. I need to root? how do I do that please reply with links, and next do I install this app, so I can flash new roms? I just got this phone, but would love to have some cutomization such as show a different battery icon extra, or be able to cast the screen to tv without chrome cast just like my note 8? possible. thanks.
[Moto Z2 Force  ROMs, Kernels, Recoveries, & Other ] jhofseth:
Yes, you should be able to test the REV2 TWRP boot image via the fastboot boot command, and the American version that I have has 64GB storage. Also, I looked on Italian TRE website and saw Moto Z2 Play but not Moto Z2 Force; so, it wasn't possible to see if they had downloads. If you can't back up your original boot image but needed to go back to as close as possible for some reason, maybe you could use nash_retail? You can get nash_retail original and rooted images from Chainfire's firmware.mobi website:

https://desktop.firmware.mobi/device:1724

Good luck with the TWRP boot image! :)
[Moto Z2 Force  ROMs, Kernels, Recoveries, & Other ] jhofseth:
Just download REV2 boot image linked in OP. Backup anything you care about. fastboot flash it to your phone, then boot into TWRP, format per OP instructions and flash OP linked SuperSU, etc.
[Moto Z2 Force  ROMs, Kernels, Recoveries, & Other ] enetec:
Thanx a lot!

I'm buying the EU unbranded version XT1789-06 dual SIM and SIM unlocked sold on German market to be sharp... so the software you linked should be the right one...

Anyway, as soon as I'll receive it I would post some screenshots to see bootloader and kernel versions info and doublecheck them with rev2... ;)
[Moto Z2 Force  ROMs, Kernels, Recoveries, & Other ] loaferkan786:
I don't need to root it first? I only have the bootloader unlocked, or does this process above will also root my phone? A bit confused and don't want to risk breaking my phone in the first week. thanks.
[Moto Z2 Force  ROMs, Kernels, Recoveries, & Other ] jhofseth:
No, you don't have to root before fastboot flashing. It's much easier to root phones after TWRP is flashed, because all you have do is flash SuperSU zip (or another rooting zip) from inside TWRP.
[Moto Z2 Force  ROMs, Kernels, Recoveries, & Other ] loaferkan786:
how exactly I do that? I downloaded the OP and kept it in download file.

I hit on power and low volume key at the same time I'm inside now I open Command Prompt now?

4. Flash the twrp from below. Using the command "fastboot flash boot /path/to/twrp.img

and if I open the OP file .img on my computer it say the file is corrupted.
[Moto Z2 Force  ROMs, Kernels, Recoveries, & Other ] jhofseth:
One way is to copy that image to your fastboot folder (or vice-versa), then open up a command prompt and cd to that folder and execute the command with the exact name of the file. Another way is to include the file path to the flashed file in the fastboot command.

Official Google ADB & FASTBOOT:

https://developer.android.com/studio/releases/platform-tools.html#download
[Moto Z2 Force  ROMs, Kernels, Recoveries, & Other ] blackwing182:
Is there a way to have magisk boot repacked with twrp?

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

Its been years sin i touch a PC to root a Phone.

If the power autorithy restores the power in my home (damn you HC Maria) i might be able to help a bit
[Moto Z2 Force  ROMs, Kernels, Recoveries, & Other ] logikism:
There's a boot.img with magisk included it but security fails and mods don't work. Also no twrp. You could flash TWRP and try install magisk after. You would still need a computer either way! No other way right now.
[Moto Z2 Force  ROMs, Kernels, Recoveries, & Other ] blackwing182:
Why a computer? [emoji848]
[Moto Z2 Force  ROMs, Kernels, Recoveries, & Other ] jhofseth:
If your phone is already rooted, all you need is FlashFire or a root terminal to install TWRP; if not rooted, then easiest to fastboot flash TWRP first. For example, you already fastboot flashed a pre-rooted boot image from firmware.mobi (search on site: nash), then rename rev2 download to boot.img and firmware flash with FlashFire. FlashFire auto-detects what slot you're on. Of course, you could flash other rooting zips from FlashFire, if desired. Sometimes I like to flash stuff from Android terminal for the heck of it:

su

cat /dev/block/bootdevice/by-name/boot_b

(If you see nothing output, you're on boot_a)

dd if=/dev/zero of=/dev/block/bootdevice/by-name/boot_a

dd if=/sdcard/Download/TWRPREV2.img of=/dev/block/bootdevice/by-name/boot_a

(only reboot if flash successful)

reboot recovery
[Moto Z2 Force  ROMs, Kernels, Recoveries, & Other ] blackwing182:
I get all that, i was going to use something like magisk hide (but with all the magisk components).

I have now super su, the question is.

I will be able to use SuHide or something similar.

I patched the twrp with magisk but ended up un bootloop. And had to reflash like 4 times [emoji23].

I just want to play pkmn go with a joystick for the hell of it. And have normal use of root.
[Moto Z2 Force  ROMs, Kernels, Recoveries, & Other ] jhofseth:
You can flash suhide from FlashFire or TWRP, but it will only install correctly if you have SuperSU installed to /sbin.

https://xdaforums.com/apps/supersu

You will see the thread for suhide and SuperSU beta. The latest stable release of SuperSU is older than the latest 2.82 SR5 beta. SR5 beta installed to /sbin for me, but older stable 2.82 failed /sbin install for me.
[Moto Z2 Force  ROMs, Kernels, Recoveries, & Other ] blackwing182:
Thank you. done it and got it all working.

Bypass works fine and safety net is bypassed right!

[emoji41]
[Moto Z2 Force  ROMs, Kernels, Recoveries, & Other ] enetec:
Since of what reported in this thread https://xdaforums.com/z2-force/how-to/how-to-return-to-stock-sprint-t3694783 different versions of Z2 use different boot.IMG and it would be better not to mix them, so my question is: on what ROM and exact release is based this rev2 considered that it includes a boot.IMG too?

More.... one unanswered before question: is flashing SuperSU all that is needed to disable DMverity and so be free to enable system r/w without boot denied issues?

It is not so clear on OP...
[Moto Z2 Force  ROMs, Kernels, Recoveries, & Other ] enetec:
Since of what reported on this https://www.xda-developers.com/twrp-has-been-released-for-the-google-pixel-and-pixel-xl/ interesting article, booting with fastboot boot boottwrp.IMG it should boot to twrp and not to a normal boot. Somebody can confirm this for our twrp too?

More... in that thread they use a different method/commands to flash twrp to both boot_a & boot_b partitions... why does here have been used a different way?

Finally... with the way indicated in OP I think twrp will be flashed on only one boot partition, the current one... this could be fine for security purpose to avoid eventual soft brick... but how can we switch from a & b by a fastboot command (if possible)?

Thanx again for all the replies...
[Moto Z2 Force  ROMs, Kernels, Recoveries, & Other ] jhofseth:
This was interesting (i.e., flashing to both):

fastboot flash boot_a boot.img

fastboot flash boot_b boot.img

I'll have to read it later (just glanced quickly). In other cases, sometimes the TWRP file is only the ramdisk inside a flashable zip, which means it doesn't contain a kernel. We could create such a zip installer easily that merely swaps ramdisk TWRP and does not also replace existing kernel. I think the zip route is preferrable for me, yet it requires either already being rooted and using some app like FlashFire, or flashing via pre-existing or booted custom recovery (e.g., to upgrade TWRP version or install).
[Moto Z2 Force  ROMs, Kernels, Recoveries, & Other ] blackwing182:
I think we can make something similar to any kernel updater. But with the recovery nesesary files.

I need to study how this works.

I don't work with a boot.img repacked with a recovery since the galaxy and galaxy s2.

But it can be done... Its easy.
[Moto Z2 Force  ROMs, Kernels, Recoveries, & Other ] enetec:
Ooohhh, well, [MENTION=368744]Last[/MENTION] somebody who is understanding my thinks....!!!

First, I think we shouldn't try to invent something new, simply follow what has already be done for Pixels, nothing more, nothing less....

Second, I think the right path to follow is *not* the actual, but the following:

- a "bootable-only-to-TWRP" recovery to be used to flash the real twrp in zip format as they developed with pixels... (preferable)

or

- root achieved by CF-Autoroot (or Magisk) and then a flashable zip to install TWRP (less preferable)

This because there are too many different boot versions & release (and more will come..!) and to be "forced" to install a don't-know-how-much-compatible version only to have a recovery it''s *not* a great solution IMHO....

More, we should be able to use AS BENEFIT the a/b partition system, using it as a "safe backup/safe boot" just in case (of issues) not different as it has been developed for OTAs safety, and not only as a "problem to face"...

E.g., by fastboot/adb commands (if possible...) and/or by bootable-only twrp to be free to select a/b to flash/boot so we could use one partition to test something new (recovery, root, etc...) having other still untouched and working just in case... only when all has been tested working, simply extend flashings to other partition too...

I want to be clear, I'm really grateful to all who worked to what has been developed so far, but I think it''s time to rethink a bit future development path... ;)

Edit: still unanswered....

More.... one unanswered before question: is flashing SuperSU all that is needed to disable DMverity and so be free to enable system r/w without boot denied issues?

It is not so clear on OP...
[Moto Z2 Force  ROMs, Kernels, Recoveries, & Other ] Uzephi:
A kernel I have been working on already has CRC check disabled so boot denied issue won't be present. Been working with [MENTION=3659125]joemossjr[/MENTION] on trying to get a stable one going. We both have lives, so it is taking a little longer to get everything going. I am working on native SafetyNet bypass (normal methods aren't working with our phone via kernel for some reason). Most governors aren't building right, etc. It's a work in progress, but we are progressing.

---------- Post added at 09:30 ---------- Previous post was at 09:26 ----------

CF auto root method replaces a lot of things in boot including kernel. I know, I have flashed a custom kernel and rerooting via CFAR boot image loses my kernels.
[Moto Z2 Force  ROMs, Kernels, Recoveries, & Other ] blackwing182:
This is tricky... Hope this gets figured out.

Till i recover from huracane maria i cant hellp :/
[Moto Z2 Force  ROMs, Kernels, Recoveries, & Other ] Uzephi:
You're telling me... Adding conservativex governor parked all the cores to idle and they all sat at 38.00 Mhz... surprised it even booted... it took about 10mins to boot though, lol
[Moto Z2 Force  ROMs, Kernels, Recoveries, & Other ] blackwing182:
I quoted the wrong post about the partitions etc etc [emoji23].
[Moto Z2 Force  ROMs, Kernels, Recoveries, & Other ] enetec:
I think it should be intended by project, since I've seen on Chainfire's site it starts patching from an available stock boot.img... (but at least one can choose it''s own kernel to patch and not a not well identified one as in OP...).

Anyway I still think best way is to realize a "minimal" TWRP image to be booted only by fastboot boot command and then a zip to flash (inject) complete TWRP in stock boot.img lIke Pixels people dId.... ;)

After that there is a good guide here to flash SuperSU with Suhide too... :good:

Just to be clear, these are Official Pixel's TWRP installation instructions...

Why can't us do same way? ;)
[Moto Z2 Force  ROMs, Kernels, Recoveries, & Other ] jhofseth:
We can create a flashable TWRP zip with only TWRP ramdisk (no kernel) inside, that is easy enough. Part of the problem is some people's kernels won't have force encrypt disabled, etc. It is possible to configure SuperSU to disable encryption, dm-verity, etc.; but, sometimes some non-default SuperSU configuration options can cause unending boot-loops when used with some boot images. I previously used Superr Kitchen free for Linux to create an insecure boot image with other stuff disabled too, which combined T-Mobile's latest kernel with rev2 TWRP ramdisk; it works very well. But, if I ever flash an unmodified stock boot image to experiment, it could easily mess up my install by wiping data and starting encryption. That happened to me today with an unmodified stock boot image, but I restored everything due to having a full FlashFire backup on micro-SD card. In an instant, all your internal storage could be wiped if not careful about what unmodified boot images are flashed. :)
[Moto Z2 Force  ROMs, Kernels, Recoveries, & Other ] enetec:
[MENTION=6298645]erfanoabdi[/MENTION] created a flashable zip capable of disable force encryption on every software version of Moto Z (Griffin).

I think it could work for Z2 too or, anyway, it should be simple to add to TWRP zip installer.... what do you think?

I can attach it if you need... ;)

EDIT: removed! [MENTION=6298645]erfanoabdi[/MENTION] told me it could cause nuclear explosions & volcano eruptions on our device... :D
[Moto Z2 Force  ROMs, Kernels, Recoveries, & Other ] enetec:
Anyway, I *really* have urgent need to TWRP/root/Xposed my new Z2... (My Griffin is going to leave me... :( )

This (attached in zipped format) is the NPXS26.122-68-1 boot image of the international retail version XT1789-06 sold in Europe. It's the last one, with September 2017 security patch too...

Is there somebody ( [MENTION=3659125]joemossjr[/MENTION] or [MENTION=7308704]jhofseth[/MENTION] or somebody else....) who could realize a TWRP fitted version of it?

I would be *really* very grateful...
[Moto Z2 Force  ROMs, Kernels, Recoveries, & Other ] joemossjr:
No prob will when I wake up in the morning
[Moto Z2 Force  ROMs, Kernels, Recoveries, & Other ] jhofseth:
Daisy-chaining in same zip as ramdisk only TWRP is definitely doable with some encryption disabler, as long as it didn't cause non-stop bootloops with some boot images.
[Moto Z2 Force  ROMs, Kernels, Recoveries, & Other ] enetec:
GREAT! :fingers-crossed:
[Moto Z2 Force  ROMs, Kernels, Recoveries, & Other ] enetec:
Interesting, but if I fastboot boot actual TWRP image it boots to recovery or to system? :confused:

Bootable TWRP for Pixels is specifically developed to boot on recovery...

---------- Post added at 12:29 PM ---------- Previous post was at 12:26 PM ----------

Any news for me? :fingers-crossed:
[Moto Z2 Force  ROMs, Kernels, Recoveries, & Other ] jhofseth:
Our rev2 TWRP image needs to be modified to fastboot boot to it, I believe. Clearly, one major reason to fastboot boot a TWRP image is so you don't lose your current kernel during initial install. Maybe [MENTION=3659125]joemossjr[/MENTION] can create a fastboot bootable version--in addition to the flashable one?
[Moto Z2 Force  ROMs, Kernels, Recoveries, & Other ] enetec:
Clearly. But not only. It's needed to flash the zip one indeed... ;)

With previous device a fastboot boot TWRP.IMG command worked fine... with this new recovery location (inside boot.IMG) we need a specific one otherwise, I think, it will boot normally since there is a boot image inside too... (and no switch command to select...)

On Pixels they clearly realized a bootable twrponly version, in fact they say that if you wrongly flash it, you need to flash stock boot.IMG again... (since it contains TWRP only...!)
[Moto Z2 Force  ROMs, Kernels, Recoveries, & Other ] enetec:
Hi [MENTION=3659125]joemossjr[/MENTION], I have to quote myself... I've unlocked my bootloader, flashed latest NXPS26.122-68-1 build updated to September 2017 patch and downloaded and prepared latest SuperSU and Xposed...

Only thing I still need is an updated boot.img with your twrp and based on latest boot.img I've posted on page 13... (it contains 25 Sept Kernel...).

My Moto Z is really dying (needs a new battery and wifi has gone...! :rolleyes:), so *please* I really need it ASAP........ :p

Bounty available if needed... ;)
[Moto Z2 Force  ROMs, Kernels, Recoveries, & Other ] joemossjr:
Guess I'll get to it today but don't do a bounty if you want to donate I do accept that though
[Moto Z2 Force  ROMs, Kernels, Recoveries, & Other ] blackwing182:
Thats rude bro!.
[Moto Z2 Force  ROMs, Kernels, Recoveries, & Other ] Uzephi:
Wait... What is so important about the lastest boot image? The recent updates have almost identical boot images. All changes were system for security updates or apps...
[Moto Z2 Force  ROMs, Kernels, Recoveries, & Other ] enetec:
I'll glad to!! :highfive:

---------- Post added at 06:24 PM ---------- Previous post was at 06:22 PM ----------

Really? :laugh:
[Moto Z2 Force  ROMs, Kernels, Recoveries, & Other ] blackwing182:
Yes... Its like asking for ETA... And here things wont work that way bro. You dont push developers to do work... They work when they can when they have free time. They have familys and personal things to do.
[Moto Z2 Force  ROMs, Kernels, Recoveries, & Other ] enetec:
To be honest... I don't know! :laugh:

BUT...

- I don't know on exactly what kernel/version is based boot IMG of TWRP2 since it hasn't be reported on OP...

- anyway it has been for sure developed starting from a US branded one (I don't know exactly what...), while mine is an international unbranded one, so small differences there could be...

- I don't know if sizes count, but mine is over 4 MB bigger than IMG including TWRP2... :confused:

- since I have to install really A LOT of apps on it and need it daily for my servers and my investments monitoring, I prefer to have a "more-stock-as-possible" installation on it, to avoid any issues or downtime...

- last but not the least... because I like it? :silly:

---------- Post added at 06:40 PM ---------- Previous post was at 06:35 PM ----------

I *really* know. They are some years I'm on XDA and even if not a developer (too busy with my works...) I've posted a lot of guides and found solutions during these years. A lot of alpha & beta testing too...

I'm sorry for my request, but it's really *urgent* for me in these days because of the not planned dying of my old Griffin... :/

So, for that reason I'll be very happy to donate since of my needs... ;)