FORUMS
Remove All Ads from XDA

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

16 posts
Thanks Meter: 21
 
By jag9906, Junior Member on 10th April 2017, 05:17 AM
Post Reply Email Thread
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.
The Following 11 Users Say Thank You to jag9906 For This Useful Post: [ View ] Gift jag9906 Ad-Free
 
 
17th April 2017, 07:37 AM |#2  
Junior Member
Thanks Meter: 3
 
More
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.
17th April 2017, 07:55 AM |#3  
OP Junior Member
Flag Humboldt
Thanks Meter: 21
 
More
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.
17th April 2017, 08:18 AM |#4  
Junior Member
Thanks Meter: 3
 
More
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).

Quote:
Originally Posted by jag9906

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.
17th April 2017, 08:47 AM |#5  
OP Junior Member
Flag Humboldt
Thanks Meter: 21
 
More
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.
17th April 2017, 08:54 AM |#6  
OP Junior Member
Flag Humboldt
Thanks Meter: 21
 
More
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.
17th April 2017, 09:46 AM |#7  
Junior Member
Thanks Meter: 3
 
More
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.
The Following 2 Users Say Thank You to stevenh512 For This Useful Post: [ View ] Gift stevenh512 Ad-Free
19th April 2017, 01:49 AM |#8  
Junior Member
Thanks Meter: 3
 
More
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/propri...endor_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.
21st April 2017, 05:35 AM |#9  
Junior Member
Thanks Meter: 1
 
More
Quote:
Originally Posted by jag9906

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 ._.
22nd April 2017, 08:38 AM |#10  
Junior Member
Thanks Meter: 3
 
More
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.
The Following User Says Thank You to stevenh512 For This Useful Post: [ View ] Gift stevenh512 Ad-Free
7th May 2017, 11:17 PM |#11  
Junior Member
Thanks Meter: 0
 
More
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
Post Reply Subscribe to Thread

Guest Quick Reply (no urls or BBcode)
Message:
Previous Thread Next Thread
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes