[HOWTO][TWRP][ROOT] ZTE quest N817 with locked bootloader

Search This thread

jag9906

Member
Dec 12, 2016
19
26
Humboldt
First off doing this will void your warranty and can brick your device. Following these simple steps should work for you. I will state here and further down, make sure you download all programs needed and both recovery.img and recovery_orig.img. I am in no way resposible for your device being bricked.

**Only thing I have not tested is the external sd card, I make no promises that it works. I only have 1 sd micro card its installed in my main device. So install the recoveries and supersu to your internal sdcard.

This is for assurance wireless, I have seen one or two other n817 devices if the specs are the same, they "should" work with this twrp, but use partition backup and restore by wanam on Play store to get a recovery.img for your device. I do not use this program for system back up, for some reason it does not work properly but its fine for boot,aboot, recovery and other smaller partitions.

This is a ported twrp from kis3 twrp version 3.0.2-0 by KonstaT from here http://konstakang.com/devices/kis3/TWRP/. Also this version of chainfire su SR3-SuperSU-v2.79-SR3-20170114223742 download from here https://download.chainfire.eu/1021/. This twrp recovery has Supersu folder but I still installed the zip from recovery to be sure.

The twrp n817 recovery named: recovery.img along with the original n817 recovery named: recovery_orig.img go here https://github.com/jag9906/n817_twrp

Other programs needed [ROOT]Rashr flash tool, online nandroid backup *root*, SD maid from Play Store. The Rashr flash tool is required, you can use any back up you wish, I prefer SD maid for cleaning up system and removing/freezing programs you can use any you use, this is to remove your temp root after recovery and supersu is installed.

**Again I am stating here the Rashr flash tool is required this will allow you to install the recovery.img with a locked bootloader. This is a must to install this twrp recovery. The twrp app will not work until you have supersu installed. There are other flash tools, but this worked flawless with kingo so its the only one I will support for this guide. If you use another flash tool its on you.

First make a back up prior to installing the twrp recovery. Use the online nandoird back up of all partitions I save them as twrp. If you have external SD card you can do all at once if not do all but data and system then copy to your computer and then back up system folder. Your choice on data, I back up my apk so never data.

Next run Rashr flash tool from Play store the first option is recovery from storage, choose this option then go to your location on sdcard and select recovery.img hit ok it will take about 10 to 15 seconds and ask if you want to reboot into recovery, hit yes and then your device will reboot into recovery. Once loaded swipe and go to install, top left find your SR3-SuperSU-v2.79-SR3-20170114223742.zip file and select that, then swipe to install. Once finished hit reboot and system.

Then run SD Maid or any root tool to uninstall you have. You can now delete/remove Kingo or any root you used prior to installing the recovery and have supersu by chainfire as your root for the device.

You now have a twrp recovery, and chainfire's supersu installed on your n817 device.

thanks to KonstaT and Chainfire for the hard work they have done.
 
Last edited:

stevenh512

Member
Apr 17, 2017
7
4
Wow, thanks.

I was able to port KonstaT's CWM for the kis3 to this device and it works almost flawlessly, but when I tried to do the same with TWRP I just got a white screen and had to pull the battery. This boots fine, so I'm interested in taking it apart and seeing what you changed.

External SD card doesn't work on my phone. Since I plan on taking it apart anyway I'll look at the fstab files, if I figure it out I'll be sure to share my changes.
 

jag9906

Member
Dec 12, 2016
19
26
Humboldt
Yeah like I said in post I have no external sdcard so I could not test. With putting in external a few ttimes I was looping. I think I did 6 builds and on my device which is not used. I was able to create boot, system and data backups and flash again amd install supersu from chainfire. I have built a number of kernels but wont boot. I am just going to get working kernel and nethunter it or maybe kexec hardboot for a linux. Also I rhink I used the original recovery kernel, might have gone stock.

Did you do recovery or cm 11. I tried about 5 builds of cm11 furthest i got to was loading applications screen and locking. Did you flash this twrp. With rashr app. Not sure how it will handle it being locked boot. Each of the port guides useless being locked. Days off this week might look into delving into it more. But after 5 months of headaches with exynos kernel and rom might need a break. Tired of these corps releasing broken code to stall people. 3 or 4 from scratch begings with samdung kernel between 2,000 and 6,,000 files edited on each attempt and still borked, with even.trying to back port newer versions of drivers. I have one solid kernel running but just above stock because I removed there fuelgague and charger driver with a Script for deepsleep, might be my best yet before I get a new phone in a few months. Samsung and zte plus any mediatek I'm over them now and swearing off.
 
Last edited:

stevenh512

Member
Apr 17, 2017
7
4
I notice the line for the sdcard is commented out in twrp.fstab, I'll try uncommenting that and see what happens, but I remember to get the sdcard working correctly under CWM I had to use vold. The line for CWM was:

/devices/msm_sdcc.2/mmc_host auto auto defaults voldmanaged=sdcard0:auto,noemulatedsd

This seems to work with or without an sd-ext partition (mounting sd-ext normally as /dev/block/mmcblk1p2 works, no need to use vold for that).

Did you do recovery or cm 11. I tried about 5 builds of cm11 furthest i got to was loading applications screen and locking. Did you flash this twrp. With rashr app.

I did KonstaT's CWM recovery from the kis3. I think the only things I had to change were the kernel (from stock recovery), fstab (based on stock recovery, with some trial and error) and default.prop

Haven't tried flashing CM11 to this phone yet, I have tried building the device/vendor trees to build CM11 from source, but ZTE's kernel source for this device doesn't compile and KnostaT's ZTE msm8610 kernel source doesn't boot, so that's as far as I've managed to get.

I flashed this TWRP with the rashr app, but when I flashed CWM I had no problem using (from a root adb shell) "dd if=/path/to/recovery.img of=/dev/block/platform/msm_sdcc.1/by-name/recovery"

I did need to (once) reboot the device with "adb reboot disemmcwp" when I initially got root before I could mount system rw and install SuperSU.
 

jag9906

Member
Dec 12, 2016
19
26
Humboldt
Yeah that was the issue when.I did stuff with my main phone, I only have one sdcard in main phone so I didn't get around to testung vold. That sould fix the issue. I learned that lesson a few weeks ago with my samsung phone. If it works mind posting that fike so.I can.update this twrp.so people cam atleast have a touch backup with supersu not those roots that auto install garbage apks and have ads.

I found another cm11 I will check later afyer work tomorrow and post link since kis3 is gms this one was cmda for porting rom.
 

jag9906

Member
Dec 12, 2016
19
26
Humboldt
ok can try porting the cm11 unofficial condor, or carbon KK unofficial condor both I think I found through xda, there is an AOPK condor MM nightly if you want to try to up to that or the lineage OS condor 14.1 with a new kernel. can google this cm-11-20140808-UNOFFICIAL-condor to get the link from xda or search here.
 

stevenh512

Member
Apr 17, 2017
7
4
I got my sdcard (with sd-ext partition) working with this twrp.fstab:

Code:
# mount point	fstype		device						[device2, parameters]
/boot		emmc		/dev/block/platform/msm_sdcc.1/by-name/boot	flags=backup=1;
/recovery	emmc		/dev/block/platform/msm_sdcc.1/by-name/recovery flags=backup=1;
/system		ext4		/dev/block/platform/msm_sdcc.1/by-name/system	flags=backup=1;
/cache		ext4		/dev/block/platform/msm_sdcc.1/by-name/cache	flags=backup=1;
/data		ext4		/dev/block/platform/msm_sdcc.1/by-name/userdata	flags=backup=1; length=-16384
/sdcard		vfat		/dev/block/mmcblk1p1 /dev/block/mmcblk1		flags=display="MicroSD";storage;wipeingui;removable
/sd-ext		auto		/dev/block/mmcblk1p2				flags=wipeingui;removable;backup=1

I'm sure that's not quite right, there are probably some flags I'm missing and definitely some other partitions you'd want to back up. I also have TWRP 3.1.0-0 compiling for this device from source (against LineageOS cm-11.0 tree with precompiled kernel from stock recovery) and booting with internal "emulated" SD and external SD both working, but I need to tweak my BoardConfig.mk a bit more to solve a couple minor issues. If I can get that 100% working I might try to "make bacon" and see what happens, I'm pretty sure the rest of my device tree is right and I've pulled all of the vendor files from the device. I didn't remember to take a backup of my stock ROM when I rooted, but I do have a full backup of my device in its current state.
 
Last edited:

stevenh512

Member
Apr 17, 2017
7
4
Sorry to double-post, just an update. Between what I already had, your work here and a conversation with KonstaT about kernels, I have the ZTE N817 kernel and TWRP 3.0.2-0 compiling against LineageOS cm-11.0, newer versions of TWRP may build and run fine against KitKat but the OTA tools need a newer version of Android to build.

local manifests:
https://github.com/stevenh512/local_manifest_zte_n817

device tree:
https://github.com/stevenh512/android_device_zte_n817

kernel tree:
https://github.com/stevenh512/android_kernel_zte_n817

vendor tree:
https://github.com/stevenh512/proprietary_vendor_zte_n817

Just repo init -u https://github.com/LineageOS/android.git -b cm-11.0 and copy the local manifests into .repo/local_manifests before you sync, then:

Code:
. build/envsetup.sh
lunch cm_n817-userdebug
make -j4 recoveryimage
adb push out/target/product/n817/recovery.img /storage/sdcard1/recovery-twrp-new.img

(replace /storage/sdcard1 with /storage/sdcard0 if you have no external SD)

I haven't tried to build the ROM yet, but TWRP works flawlessly, external SD and internal "emulated" (/data/media) SD are both recognized.

Have fun. :)
 
Last edited:

pyrohydrosmok

Member
Oct 11, 2010
32
5
First off doing this will void your warranty and can brick your device. Following these simple steps should work for you. I will state here and further down, make sure you download all programs needed and both recovery.img and recovery_orig.img. I am in no way resposible for your device being bricked.

**Only thing I have not tested is the external sd card, I make no promises that it works. I only have 1 sd micro card its installed in my main device. So install the recoveries and supersu to your internal sdcard.

This is for assurance wireless, I have seen one or two other n817 devices if the specs are the same, they "should" work with this twrp, but use partition backup and restore by wanam on Play store to get a recovery.img for your device. I do not use this program for system back up, for some reason it does not work properly but its fine for boot,aboot, recovery and other smaller partitions.

This is a ported twrp from kis3 twrp version 3.0.2-0 by KonstaT from here http://konstakang.com/devices/kis3/TWRP/. Also this version of chainfire su SR3-SuperSU-v2.79-SR3-20170114223742 download from here https://download.chainfire.eu/1021/. This twrp recovery has Supersu folder but I still installed the zip from recovery to be sure.

The twrp n817 recovery named: recovery.img along with the original n817 recovery named: recovery_orig.img go here https://github.com/jag9906/n817_twrp

Other programs needed [ROOT]Rashr flash tool, online nandroid backup *root*, SD maid from Play Store. The Rashr flash tool is required, you can use any back up you wish, I prefer SD maid for cleaning up system and removing/freezing programs you can use any you use, this is to remove your temp root after recovery and supersu is installed.

**Again I am stating here the Rashr flash tool is required this will allow you to install the recovery.img with a locked bootloader. This is a must to install this twrp recovery. The twrp app will not work until you have supersu installed. There are other flash tools, but this worked flawless with kingo so its the only one I will support for this guide. If you use another flash tool its on you.

First make a back up prior to installing the twrp recovery. Use the online nandoird back up of all partitions I save them as twrp. If you have external SD card you can do all at once if not do all but data and system then copy to your computer and then back up system folder. Your choice on data, I back up my apk so never data.

Next run Rashr flash tool from Play store the first option is recovery from storage, choose this option then go to your location on sdcard and select recovery.img hit ok it will take about 10 to 15 seconds and ask if you want to reboot into recovery, hit yes and then your device will reboot into recovery. Once loaded swipe and go to install, top left find your SR3-SuperSU-v2.79-SR3-20170114223742.zip file and select that, then swipe to install. Once finished hit reboot and system.

Then run SD Maid or any root tool to uninstall you have. You can now delete/remove Kingo or any root you used prior to installing the recovery and have supersu by chainfire as your root for the device.

You now have a twrp recovery, and chainfire's supersu installed on your n817 device.

thanks to KonstaT and Chainfire for the hard work they have done.

Unfortunately Kingo can't root my device and neither can anything else...... Sucks but hey the phone was free. Hopefully something can work in the future *shrugs*

Edit: rebooted "adb reboot disemmcwp" and Kingo worked ._.
 
Last edited:

stevenh512

Member
Apr 17, 2017
7
4
Yeah, this phone was pretty difficult before King/Kingo supported it, and with no fastboot I don't think there's any way other than a ZTE signed update to alter the /system partition without rebooting with "adb reboot disemmcwp" first. Before I discovered a post mentioning using that command to disable the write-protection on another ZTE device I was able to get a root prompt with the right SELinux context but I still couldn't write anything to /system. Once I got the write-protection disabled, I didn't even bother with any of the one-click rooting apps. I just got a root shell, mounted /system rw and proceeded to put all of the SuperSU files where they go and set their permissions by hand, rebooted and I was good to go. Of course, once I got a recovery installed I did re-flash SuperSU from an update zip just to make sure it was right.
 
Last edited:

morpheous1777

Member
May 7, 2017
8
1
46
Warrenton
does anyone have a stock backup, i don't kn0w what i did, but now the standard android recovery tells me there are missing files when i do md5 check and it boot loops right back to recovery, anyone have and recommendations for repair, i can get to stock recovery, i can adb side load updates or choose from cache or sd card, when i pop out the battery and plug in its recognized as:
ZTE WCDMA Technologies MSM

right before boot loop to recovery:
Product: ZTE HSUSB Device Manufacturer: ZTE Incorporated (dmesg)

while in recovery in adb sideload mode
Product: N817 Manufacturer: ZTE (dmesg)
18d1:d001 Google Inc. Nexus 4 (fastboot)(lsusb)

whitout battery black screen:
QSHSUSB_BULK qualcom CDMA technologies MSM

i dont know if im in ftm mode, screen just stays black and shows up as above? when in recovery
 
Last edited:

leetree2001

Senior Member
Apr 8, 2013
76
20
houston
I got my sdcard (with sd-ext partition) working with this twrp.fstab:

Code:
# mount point	fstype		device						[device2, parameters]
/boot		emmc		/dev/block/platform/msm_sdcc.1/by-name/boot	flags=backup=1;
/recovery	emmc		/dev/block/platform/msm_sdcc.1/by-name/recovery flags=backup=1;
/system		ext4		/dev/block/platform/msm_sdcc.1/by-name/system	flags=backup=1;
/cache		ext4		/dev/block/platform/msm_sdcc.1/by-name/cache	flags=backup=1;
/data		ext4		/dev/block/platform/msm_sdcc.1/by-name/userdata	flags=backup=1; length=-16384
/sdcard		vfat		/dev/block/mmcblk1p1 /dev/block/mmcblk1		flags=display="MicroSD";storage;wipeingui;removable
/sd-ext		auto		/dev/block/mmcblk1p2				flags=wipeingui;removable;backup=1

I'm sure that's not quite right, there are probably some flags I'm missing and definitely some other partitions you'd want to back up. I also have TWRP 3.1.0-0 compiling for this device from source (against LineageOS cm-11.0 tree with precompiled kernel from stock recovery) and booting with internal "emulated" SD and external SD both working, but I need to tweak my BoardConfig.mk a bit more to solve a couple minor issues. If I can get that 100% working I might try to "make bacon" and see what happens, I'm pretty sure the rest of my device tree is right and I've pulled all of the vendor files from the device. I didn't remember to take a backup of my stock ROM when I rooted, but I do have a full backup of my device in its current state.[/Q
Change sdcard to sdcard1
 
Last edited:
  • Like
Reactions: pyrohydrosmok

stevenh512

Member
Apr 17, 2017
7
4
does anyone have a stock backup

I also wouldn't mind having a stock backup, unfortunately I didn't remember to take a backup before I started tinkering with my system partition, but thankfully I haven't managed to break anything I couldn't fix.

while in recovery in adb sideload mode
Product: N817 Manufacturer: ZTE (dmesg)
18d1:d001 Google Inc. Nexus 4 (fastboot)(lsusb)

While in this mode, are you able to actually use fastboot? I ask for two reasons. First, if you're on a stock recovery, the only way you're going to be able to restore a stock ROM (or install any other ROM) from recovery is if it's signed by ZTE, otherwise you'll need another way (like fastboot). Second, as far as I can tell, there is no fastboot on my phone.
 

pyrohydrosmok

Member
Oct 11, 2010
32
5
I got my sdcard (with sd-ext partition) working with this twrp.fstab:

Code:
# mount point	fstype		device						[device2, parameters]
/boot		emmc		/dev/block/platform/msm_sdcc.1/by-name/boot	flags=backup=1;
/recovery	emmc		/dev/block/platform/msm_sdcc.1/by-name/recovery flags=backup=1;
/system		ext4		/dev/block/platform/msm_sdcc.1/by-name/system	flags=backup=1;
/cache		ext4		/dev/block/platform/msm_sdcc.1/by-name/cache	flags=backup=1;
/data		ext4		/dev/block/platform/msm_sdcc.1/by-name/userdata	flags=backup=1; length=-16384
/sdcard		vfat		/dev/block/mmcblk1p1 /dev/block/mmcblk1		flags=display="MicroSD";storage;wipeingui;removable
/sd-ext		auto		/dev/block/mmcblk1p2				flags=wipeingui;removable;backup=1

I'm sure that's not quite right, there are probably some flags I'm missing and definitely some other partitions you'd want to back up. I also have TWRP 3.1.0-0 compiling for this device from source (against LineageOS cm-11.0 tree with precompiled kernel from stock recovery) and booting with internal "emulated" SD and external SD both working, but I need to tweak my BoardConfig.mk a bit more to solve a couple minor issues. If I can get that 100% working I might try to "make bacon" and see what happens, I'm pretty sure the rest of my device tree is right and I've pulled all of the vendor files from the device. I didn't remember to take a backup of my stock ROM when I rooted, but I do have a full backup of my device in its current state.[/Q
Change sdcard to sdcard1

I'd really love this and I'd love it more if I could contribute in some way... this phone is painfully slow on the stock OS.
 

equitube

Senior Member
Feb 27, 2014
205
39
OnaHill
This worked great, thanks

---------- Post added at 10:03 PM ---------- Previous post was at 09:32 PM ----------

It works, but my system is very unstable right now. I have a feeling it's that KingCrap . It doesn't like to be replaced with another SU. That stuff is malware and I never use it unless I"m desperate. I'm going to try to push 3c toolbox to it. It won't stay up long enough to install it from playstore.
 

slacker8135666

Senior Member
Mar 1, 2017
52
48
52
Philadelphia
Moto G5
Moto Z2 Force
Member96 posts Thanks: 16

Does anyone have the stock rom?? The recovery bricked my assurance n817.Please help

I did a full backup of my zte n817. it's in .img format. pm me and I'll send it to my google drive and give you the link. Do you know what partition goes where? I also have that info too !! After 3 bricked phones I have learned somewhat of a lesson
 

equitube

Senior Member
Feb 27, 2014
205
39
OnaHill
I can't do anything with it now. It won't stay up long enough. I have a nandroid backup but it's on the external sd which this TWRP can't see. There isn't enough space on the internal to copy it to. I'm giving up for now, I"ve spent way too much time on a $20 phone
 

tnomtlaw

Senior Member
Oct 26, 2013
128
25
Project Ara
Project Treble
Member96 posts Thanks: 16

Does anyone have the stock rom?? The recovery bricked my assurance n817.Please help

I did a full backup of my zte n817. it's in .img format. pm me and I'll send it to my google drive and give you the link. Do you know what partition goes where? I also have that info too !! After 3 bricked phones I have learned somewhat of a lesson


Sent from my LGLS770 using Tapatalk
 

Top Liked Posts

  • There are no posts matching your filters.
  • 12
    First off doing this will void your warranty and can brick your device. Following these simple steps should work for you. I will state here and further down, make sure you download all programs needed and both recovery.img and recovery_orig.img. I am in no way resposible for your device being bricked.

    **Only thing I have not tested is the external sd card, I make no promises that it works. I only have 1 sd micro card its installed in my main device. So install the recoveries and supersu to your internal sdcard.

    This is for assurance wireless, I have seen one or two other n817 devices if the specs are the same, they "should" work with this twrp, but use partition backup and restore by wanam on Play store to get a recovery.img for your device. I do not use this program for system back up, for some reason it does not work properly but its fine for boot,aboot, recovery and other smaller partitions.

    This is a ported twrp from kis3 twrp version 3.0.2-0 by KonstaT from here http://konstakang.com/devices/kis3/TWRP/. Also this version of chainfire su SR3-SuperSU-v2.79-SR3-20170114223742 download from here https://download.chainfire.eu/1021/. This twrp recovery has Supersu folder but I still installed the zip from recovery to be sure.

    The twrp n817 recovery named: recovery.img along with the original n817 recovery named: recovery_orig.img go here https://github.com/jag9906/n817_twrp

    Other programs needed [ROOT]Rashr flash tool, online nandroid backup *root*, SD maid from Play Store. The Rashr flash tool is required, you can use any back up you wish, I prefer SD maid for cleaning up system and removing/freezing programs you can use any you use, this is to remove your temp root after recovery and supersu is installed.

    **Again I am stating here the Rashr flash tool is required this will allow you to install the recovery.img with a locked bootloader. This is a must to install this twrp recovery. The twrp app will not work until you have supersu installed. There are other flash tools, but this worked flawless with kingo so its the only one I will support for this guide. If you use another flash tool its on you.

    First make a back up prior to installing the twrp recovery. Use the online nandoird back up of all partitions I save them as twrp. If you have external SD card you can do all at once if not do all but data and system then copy to your computer and then back up system folder. Your choice on data, I back up my apk so never data.

    Next run Rashr flash tool from Play store the first option is recovery from storage, choose this option then go to your location on sdcard and select recovery.img hit ok it will take about 10 to 15 seconds and ask if you want to reboot into recovery, hit yes and then your device will reboot into recovery. Once loaded swipe and go to install, top left find your SR3-SuperSU-v2.79-SR3-20170114223742.zip file and select that, then swipe to install. Once finished hit reboot and system.

    Then run SD Maid or any root tool to uninstall you have. You can now delete/remove Kingo or any root you used prior to installing the recovery and have supersu by chainfire as your root for the device.

    You now have a twrp recovery, and chainfire's supersu installed on your n817 device.

    thanks to KonstaT and Chainfire for the hard work they have done.
    3
    Well everyone I finally got the cm11 completed for this phone. I will be testing it for now. If anyone else wants to test it let me know and I will be willing to share it. I will post updates about it.
    3
    Could I get a copy? Would be good to have at this point

    I'll send you the link in pm since I cant post links. It's 3.4 gigs so expect it to take some time.

    If you need only boot.img or system.img etc use diskinternals linux reader and mount the img and it will show every partition and pick for example system and right click and make .img file and your good to go
    3
    Member96 posts Thanks: 16

    Does anyone have the stock rom?? The recovery bricked my assurance n817.Please help

    I did a full backup of my zte n817. it's in .img format. pm me and I'll send it to my google drive and give you the link. Do you know what partition goes where? I also have that info too !! After 3 bricked phones I have learned somewhat of a lesson
    3
    Ok here's the update with the cm11 rom for this device . I fixed the black screen issue and now im just waiting for this to finish up and it should be good. It should be done in a hr or 2 so just hang in there. We r so close to a working cm11 rom for this slow phone. As soon as it gets done I'll post my results