• After 15+ years, we've made a big change: Android Forums is now Early Bird Club. Learn more here.

Root ZTE Zmax Pro Official Root Discussion

Status
Not open for further replies.
Wonderful. I was trying to think of where our payload would physically sit in memory, but this is actually a better explanation.

The only thing I see being a pain in the ass will be truncation of the payload. Overflows by nature are chaotic, and it could truncate the payload anywhere. We are going to have a lot of 'off by one' errors before we get the location right, but after that we should be golden.
 
I've read every single post on this thread just hoping to find root and on these last threads I see that we are so close to find a working exploit have you tested it yet?
 
I've read every single post on this thread just hoping to find root and on these last threads I see that we are so close to find a working exploit have you tested it yet?
I'm currently in the (!very) very very early concept stage at this point. Testing shows a lot of promise at this time though.
 
I'm rooting for you guys (pun intended). I'm using the BLADE Z MAX and 7.1 is pretty cool. But, the BLADE isn't really worth the $160 to upgrade away from the PRO (in my opinion). If you can get root, staying with the PRO would be the best choice.
 
I'm rooting for you guys (pun intended). I'm using the BLADE Z MAX and 7.1 is pretty cool. But, the BLADE isn't really worth the $160 to upgrade away from the PRO (in my opinion). If you can get root, staying with the PRO would be the best choice.
I'm still waiting for Ubuntu Touch lol. That's really the only reason I want to root this phone; Just to flash Linux/GNU. I'm sure once we are done with the Z981, we will move on to other ZTE protected devices (I know I will at least)
 
I'm still waiting for Ubuntu Touch lol. That's really the only reason I want to root this phone; Just to flash Linux/GNU. I'm sure once we are done with the Z981, we will move on to other ZTE protected devices (I know I will at least)

Ubuntu Touch? You'll be waiting a long time for something from Canonical. Shuttleworth killed the project.
 
Ubuntu Touch? You'll be waiting a long time for something from Canonical. Shuttleworth killed the project.
Meh. I can always compile it myself. They already have the framework down, adjusting it to the Z981 won't be a problem.
 
Rendered a 2 second video with an absurd res. Totally failed. Phone couldn't handle a 28k video for 2 seconds. I think thats a native decoder fail... possibly. Gonna try setting the height to 0 and working back from there. Dunno where to hide the payload and call it, but, I'll give it a shot. :)
 
I have a ZTE ZMAX PRO still on B14 because I disabled the updater apk, ready to test if you have something stable to try at some point.
 
Rendered a 2 second video with an absurd res. Totally failed. Phone couldn't handle a 28k video for 2 seconds. I think thats a native decoder fail... possibly. Gonna try setting the height to 0 and working back from there. Dunno where to hide the payload and call it, but, I'll give it a shot.
What exactly happened?
 
Thank you Sapphire for not giving up <3. I have a bunch of parts for z981 that I have enough to be able to slap together to do some testing if you need.
If you are familiar with SoCs, soldering, and code, you could attempt to directly read the NAND from the chip itself.
 
AVC Encoder started to fire up, then shat itself. Don't have the logs on hand.
Tested and crashed the AVC decoder. Here's a list of things we can do to narrow down the exact entry point, then post crash exploiting.
1. Reduce number of frames one by one until we don't get a crash or apphang, then increase by one. Test. If it crashes, we found the magic frame (this arbitrary frame number could be potentially pointless if it's just the raw total number of frames crashing it, and not a specific frame point). Then overwriting the image data of that frame with our custom script. We should probably start with something simple like opening a custom error dialogue or playing a sound.
1a. This only applies if we have high level language execution.

Create a script that disables/ removes DM-verity, while also giving RWX to all users for /system/ and /dev/. While this is a security issue, it'll be used temporarily to gather the resources needed to do a public, safe rooting method.
2. Track the CPU/RAM usage of the decoder during the video playback, and find when exactly it crashes (if it crashes in a non chaotic way), then lower the file size until we can reliably crash the decoder without a gigabyte+ video needed.  Then, do 1/1a.
3. Check if file content actually matters. If actual video frames don't matter, overwrite the entire file with 0s, then replace whatever bit of code at the front of the data with our custom code, then do 1/1a. We may need to preserve content headers and magic bit, but that's about it.
4. Attempt to completely crash the kernel with a video so large the stack just stops responding. This could lead to one of two things. Either

4a. We gain complete, unprotected access to the system or

4b. Kernel just panics and restarts the main thread, leaving us back to 1/2/3.
 
Tested and crashed the AVC decoder. Here's a list of things we can do to narrow down the exact entry point, then post crash exploiting.
1. Reduce number of frames one by one until we don't get a crash or apphang, then increase by one. Test. If it crashes, we found the magic frame (this arbitrary frame number could be potentially pointless if it's just the raw total number of frames crashing it, and not a specific frame point). Then overwriting the image data of that frame with our custom script. We should probably start with something simple like opening a custom error dialogue or playing a sound.
Let's go for the custom dialogue option for now. Baby steps. If we can do this, and document it, that'll be enough to get the ball rolling.

Don't update if you want root, thanks guys.

Who knows, ZTE could be watching us right now. :oops:
 
Hello all.
I see that i was mentioned a wile back.
Not to be off topic but im working on rooting the zte blade x max.
This is on topic because what is going to work to root one current ZTE device should be similar to other current ZTE Devices.

Please don't bash me if you disagree with anything i suggest.

My approach is much different and largely based off of my experience cracking the VZW Bootloader on HTC Desire 526 HTC Desire 626 and HTC Desire 530. Took 6 months but i was successful.

The newer android M and N as we know requires system less root. Much that applied to earlier rooting of lp no longer applies.

Im leaning to believe that convention root methods just aren't going to work.

Ok enough of that and please dont bash me.

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

MY approach to getting Root.

After researching how the bootloader is unlocked for the axon 7.
Downloading axon 7 firmware i found that the unlock is very similar to HTC but much easier.

ZTE provided a Fastboot.img that enables fastboot and allows oem unlock.
My guess is that the fastboot image they provided was originally made for zte to service the device.

My thought is if we can make the same changes in the fastboot (FBOP) partition (Set the flags to allow fastboot and oem-unlock) we can flash FBOP using miflash.

Who knows if we are lucky the axon 7 fastboot.img might work on our devices with small modifications.

So as said Miflash can flash partitions as long as we have the firehose. We can get the firehose cause ZTE uses default qualcomm hoses. Unsigned.

The axon 7 is unbrickable using MIFlash and the firehose from Zuk Z2.

http://www.androidbrick.com/zte-axon-7-unbrick-guide-qd-loader-9008-edl/#
http://www.androidbrick.com/zuk-z2-z2-pro-qpst-qfil-miflash-rom-flashing-guide/

We know that the firehose is not Vendor specific cause it works for the ZUK 2 and the Axon 7 and theese are from different Vendors.

I would bet our devices have the same security scheme as the axon 7.

Another interesting fact is that there is a axon7tool that can backup axon7 partitions and GPT with the phone in edl mode.

This tool has to use the same protocol as MiFlash.
Maybe saraha ??

I know these protocols are very well documented so it is very possible someone can write a linux tool using these protocols to backup the partitions from our devices. And write them too.

This is the difference from the unlockable fastboot and stock fastboot for the axon 7.

bigcountry907@bigcountry907-NV55S:~$ hexdump -C -v /home/bigcountry907/Desktop/ZTE/FB-UL-EDL/A2017U_FASTBOOT_UNLOCK_EDL/fastboot.img > /home/bigcountry907/Desktop/ZTE/FB-UL-EDL/fbunlck.txt
bigcountry907@bigcountry907-NV55S:~$ diff home/bigcountry907/Desktop/ZTE/FB-UL-EDL/fbunlck.txt /home/bigcountry907/Desktop/ZTE/stock/fbstock.txt
diff: home/bigcountry907/Desktop/ZTE/FB-UL-EDL/fbunlck.txt: No such file or directory
bigcountry907@bigcountry907-NV55S:~$ hexdump -C -v /home/bigcountry907/Desktop/ZTE/FB-UL-EDL/A2017U_FASTBOOT_UNLOCK_EDL/fastboot.img > /home/bigcountry907/Desktop/ZTE/FB-UL-EDL/fbunlck.txt
bigcountry907@bigcountry907-NV55S:~$ diff /home/bigcountry907/Desktop/ZTE/FB-UL-EDL/fbunlck.txt /home/bigcountry907/Desktop/ZTE/stock/fbstock.txt
257c257
< 00001000 01 00 00 00 78 56 34 12 00 00 00 00 01 00 00 00 |....xV4.........|
---
> 00001000 00 00 00 00 78 56 34 12 00 00 00 00 00 00 00 00 |....xV4.........|
579,595c579,595
< 00002420 62 6f 6f 74 02 02 20 00 04 82 01 00 04 e0 4f a3 |boot.. .......O.|
< 00002430 b8 c0 79 df 98 9a ce 8b 47 ed f6 23 61 e8 3e 4d |..y.....G..#a.>M|
< 00002440 7a 43 fc 4b d4 39 60 c5 5a a6 96 ea c0 4d e2 52 |zC.K.9`.Z....M.R|
< 00002450 27 3e b6 d0 21 72 72 c8 59 03 44 90 ff 4a 86 3b |'>..!rr.Y.D..J.;|
< 00002460 29 2c 16 7a 04 2b 36 07 6f 8f 04 8e 35 7c f2 9f |),.z.+6.o...5|..|
< 00002470 cc 29 e5 0b 74 30 e9 0c ec cd 23 4b 19 84 c7 d1 |.)..t0....#K....|
< 00002480 f7 46 9b 7d dc 8b 6b bb 01 d3 f0 0a ab 96 ca 7e |.F.}..k........~|
< 00002490 a2 6e 91 6b d9 38 d6 d6 2e 4f 50 3e 2d 17 55 e3 |.n.k.8...OP>-.U.|
< 000024a0 e5 50 e4 1f dc 03 26 9e e9 22 19 dc 60 e1 0b a0 |.P....&.."..`...|
< 000024b0 b5 06 25 bd e4 08 24 4f 7b dd 42 29 82 55 06 84 |..%...$O{.B).U..|
< 000024c0 a1 5f d7 c1 99 3f 83 30 5d 10 59 5e 9d 2a 31 3f |._...?.0].Y^.*1?|
< 000024d0 f9 87 54 55 1e 82 40 68 5b c8 e4 18 98 80 d1 ec |..TU..@h[.......|
< 000024e0 df d7 01 d1 ec a5 a2 e4 c1 86 76 63 e0 82 13 35 |..........vc...5|
< 000024f0 61 30 63 d7 cd e8 21 33 73 e9 c4 93 ad 65 68 77 |a0c...!3s....ehw|
< 00002500 3e eb 3e 90 8a bb 8b 07 1b 26 ff d5 0d 37 a4 6c |>.>......&...7.l|
< 00002510 ec c6 69 30 dd 22 1b 9f 69 79 47 69 22 ba 9e c8 |..i0."..iyGi"...|
< 00002520 0c 23 96 f8 cf 66 74 74 11 98 d6 e4 |.#...ftt....|
---
> 00002420 62 6f 6f 74 02 02 20 00 04 82 01 00 a8 e0 dd 69 |boot.. ........i|
> 00002430 5b b2 47 12 bf 74 41 7a 00 37 a0 b8 10 15 d4 4e |[.G..tAz.7.....N|
> 00002440 a6 59 74 9b 7d a4 df 95 eb 3f 1a 29 1c 60 23 7c |.Yt.}....?.).`#||
> 00002450 91 37 2a 07 d3 e9 45 17 ac ac ab a9 ba b4 42 70 |.7*...E.......Bp|
> 00002460 46 5f 67 22 f7 37 1f de 46 f9 67 44 74 d7 26 42 |F_g".7..F.gDt.&B|
> 00002470 49 9c e8 ee 98 78 89 2b b2 1e c3 58 a8 d2 3a 7f |I....x.+...X..:.|
> 00002480 39 7d 22 09 c6 01 c5 0f 95 65 57 1e af 79 d9 d6 |9}"......eW..y..|
> 00002490 8d 99 84 4f 24 ff 55 b2 b0 20 07 00 39 e6 9a 27 |...O$.U.. ..9..'|
> 000024a0 a0 bc 97 dd 27 7d f2 a2 88 b6 b5 53 4a ba 7a 8e |....'}.....SJ.z.|
> 000024b0 65 98 f6 ef 4d 7e 2e 91 01 66 35 9e e1 da 15 c4 |e...M~...f5.....|
> 000024c0 fe a4 d2 26 a1 99 88 a3 55 2f ac 65 71 f8 5f 86 |...&....U/.eq._.|
> 000024d0 a7 79 f8 b5 61 b5 da 2c 7b 89 39 3b ff 45 a3 7f |.y..a..,{.9;.E..|
> 000024e0 dc 92 d5 4e 8b df 68 c0 e9 43 18 7b 60 5a 03 60 |...N..h..C.{`Z.`|
> 000024f0 18 da 96 84 e7 97 a7 09 a9 1a 2d b6 5b d3 d2 f6 |..........-.[...|
> 00002500 c8 33 a2 8f ef 32 5e 6a 45 39 66 b5 a6 a4 35 0f |.3...2^jE9f...5.|
> 00002510 03 0c 9d 57 79 28 43 09 9a 3e 7b 01 8c 6e 66 b2 |...Wy(C..>{..nf.|
> 00002520 1a f3 3d 92 d1 66 91 04 4a 3e 79 69 |..=..f..J>yi|
bigcountry907@bigcountry907-NV55S:~$ hexdump -C -v /home/bigcountry907/Desktop/ZTE/Fastboot-UL/fastboot.img > /home/bigcountry907/Desktop/ZTE/Fastboot-UL/fbul2.txt
bigcountry907@bigcountry907-NV55S:~$ diff /home/bigcountry907/Desktop/ZTE/FB-UL-EDL/fbunlck.txt /home/bigcountry907/Desktop/ZTE/Fastboot-UL/fbul2.txt
bigcountry907@bigcountry907-NV55S:~$

Its not alot.
And to flash the FBOP image this is the line from the partition.xml used by MiFlash.

This is from partition.xml
<data><program SECTOR_SIZE_IN_BYTES="4096" file_sector_offset="0" filename="fastboot.img" label="fbop" num_partition_sectors="32" partofsingleimage="false" physical_partition_number="0" readbackverify="false" size_in_KB="128.0" sparse="false" start_byte_hex="0x321a8000" start_sector="205224"/></data>

So where im at is.
#1 We know how to write partitions using MIflash.
#2 We know flags in FBOP partition allow the bootloder to be unlocked.

What we are missing.
#1 we need a copy of the GPT from our devices.
#2 we need a copy of all partitions from our devices.

Conclusion.
If we can develop a tool like axon7tool that uses the same protocol as miflash we can get these things.
 
Last edited by a moderator:
Hello all.
MY approach to getting Root.

After researching how the bootloader is unlocked for the axon 7.
Downloading axon 7 firmware i found that the unlock is very similar to HTC but much easier.

ZTE provided a Fastboot.img that enables fastboot and allows oem unlock.
My guess is that the fastboot image they provided was originally made for zte to service the device.

My thought is if we can make the same changes in the fastboot (FBOP) partition (Set the flags to allow fastboot and oem-unlock) we can flash FBOP using miflash.

Who knows if we are lucky the axon 7 fastboot.img might work on our devices with small modifications.

So as said Miflash can flash partitions as long as we have the firehose. We can get the firehose cause ZTE uses default qualcomm hoses. Unsigned.

We know that the firehose is not Vendor specific cause it works for the ZUK 2 and the Axon 7 and theese are from different Vendors.

I would bet our devices have the same security scheme as the axon 7.

Another interesting fact is that there is a axon7tool that can backup axon7 partitions and GPT with the phone in edl mode.

This tool has to use the same protocol as MiFlash.
Maybe saraha ??

I know these protocols are very well documented so it is very possible someone can write a linux tool using these protocols to backup the partitions from our devices. And write them too.

This is the difference from the unlockable fastboot and stock fastboot for the axon 7.

So where im at is.
#1 We know how to write partitions using MIflash.
#2 We know flags in FBOP partition allow the bootloder to be unlocked.

What we are missing.
#3 we need a copy of the GPT from our devices.
#4 we need a copy of all partitions from our devices.

Conclusion.
If we can develop a tool like axon7tool that uses the same protocol as miflash we can get these things.
Hi friend. Welcome to our hell. The Axon is a phone with an unlockable bootloader and is massively different from the Zmax pro. We don't have root on the ZMax so we can't grab partitions.

#1 We do, but, our access to FB and all of that is extremely limited.
#2 The partition is probably different from the Axon 7, which is a device aimed toward devs.
#3 Yes we do. We need root.
#4 Yes. We need root.

One thing you could help with, since you seem knowledgeable, is to look into the CVE Sapphire linked a couple pages ago. He's got a couple tests going, and so did I before my phone died last night.

Stay strong bro. Someday... haha.
 
Status
Not open for further replies.
Back
Top Bottom