Hi everyone,
Without further ado, here is a guide to backup and restore your DS7 in nvflash mode.
Scripts where modified from existing scripts for another device. Thank you to whoever created it.
Note: be prepared, the output files are about 15 - 20 GB in size
Guide:
1. Prepare your computer by downloading this and extracting.
Removed for editing
2. Connect the DS7 in nvflash mode by powering off, holding down both volume keys (+ and -), and then while still holding down those keys plug the USB into your PC.
3. Open the folder downloaded in step one and double click the backup_DS7 file.
*Sit back and relax* This will take quite some time but after the script completes your DS7 should be backed up to that folder.
Now to restore simply double click the restore_DS7 file in nvflash mode.
Hope this helps out!
Please report any problems with my scripts on this thread
Files taken down until corrected as pointed out by The Manii below.
You realize that ICS, HS r2-r6 and stock 5xx roms all have different partition maps right?
Those bat files will only restore correctly 5xx -> 5xx backups as at best it will write images to the wrong spot. I dont believe it will flat out corrupt partitions, but it will definitely screw up ICS -> 5xx data restores as ICS uses the 5xx sdcard partition as it's data partition.
Repartitioning is a seperate step, at least with those scripts you can only repartition to 5xx but not away, and only if you had made a backup of a 5xx rom beforehand.
If you use --download instead of rawwrite you can make it backup and restore to the same layout, but it wont be able to cross restore/backup. But this leads back to it doesnt really do anything that CWM cant already do.
--download for both scrips will allow to backup and restore to the correct partitions then, only based on the ROM being backed up, correct?
I have taken down the zip temporarily until corrected.
As for the CWM function, with ICS flashing to different partitions CWM for HC does not work with ICS and vice versa so some people on the DS7 ICS thread wanted a way to backup and restore their devices that can be deployed without worry or issue.
Thanks for the pointers!
This is why we had a hard time with ICS because of the completely different partition mapping.
Cant see any download link, can u share it again thx
Credits :- @Snoop05 for 15 sec ADB Installer , @Grarak for TWRP , @Chromium for the thread template !
{
"lightbox_close": "Close",
"lightbox_next": "Next",
"lightbox_previous": "Previous",
"lightbox_error": "The requested content cannot be loaded. Please try again later.",
"lightbox_start_slideshow": "Start slideshow",
"lightbox_stop_slideshow": "Stop slideshow",
"lightbox_full_screen": "Full screen",
"lightbox_thumbnails": "Thumbnails",
"lightbox_download": "Download",
"lightbox_share": "Share",
"lightbox_zoom": "Zoom",
"lightbox_new_window": "New window",
"lightbox_toggle_sidebar": "Toggle sidebar"
}
Information
Rooting this device is actually quite a simple and easy process. Before you begin, it is recommended that you at least try to understand what each part of the process will do. Although this guide will elongate each step in order to show all of the details, the method used can be broken up into 3 main steps: Unlocking the Bootloader, Installing a Custom Recovery and finally Rooting. Each new step relies on the previous step to have been completed, and a basic summary of each part is:
Unlocking Bootloader: Opens the door to the internal memory of the device to be written on to. This allows you to flash images onto the main partitions of the phone.
Installing a Custom Recovery: A custom recovery is flashed onto the recovery partition of the device and overwrites the stock recovery that exists by default. Custom recoveries bring lots of functionality and give you the ability to perform wipes, install flashable zips, create full backups of your NAND (Nandroid backup), and various other features. An unlocked bootloader is needed to install a custom recovery.
Rooting: You can gain root by either flashing via recovery a pre-rooted custom rom, or flashing a zip containing the SuperSU binaries. A custom recovery is necessary to do this.
After completing these steps your phone will be rooted, the phone will have a custom recovery installed, and the phones bootloader will be unlocked. This, in our opinion, is the most practical and beneficial method for rooting your phone. It gives you some basic adb/fastboot knowledge, and should hopefully help you have a decent understanding of what is going on. Also this method will work regardless of what android version your phone has.
If you are confused by anything in this guide, we would highly suggest getting it clarified being before moving on. Ask your question in this thread and we or someone else will likely answer. Also we would suggest that you read over the whole thread a few times before actually doing anything to the phone.
Understood? Good...let's begin
Setup, Preparation and Prerequisites
Basic tasks that may be referred to throughout this guide:
Open command prompt - Press Shift + Right Click anywhere on the screen and select Open Command Window here/
Enter fastboot mode- Turn the phone off. Hold volume up + power until the "fastboot" screen appears. [Alternatively, if Advanced Reboot is enabled, you can press Reboot -> Bootloader from the power menu.]
Enter recovery mode - Turn the phone off. Hold volume down + power until the "OnePlus Logo" screen appears. [Alternatively, if Advanced Reboot is enabled, you can press Reboot -> Recovery from the power menu.]
ADB and Fastboot Installation
1. Download the ADB For Windows from here :- https://drive.google.com/open?id=0B0MKgCbUM0itNVB1elljU2NPR0k
2. Run the .exe file downloaded from above as Administrator.
3. Press 'Y' every time the installer asks for.
4. Continue Driver Installation.
Now,ADB and Fastboot have been installed on your PC. Great !
Some Important Things
Show File Extensions - Open a command prompt window and run "Control folders" (without the quotes). Go to the View tab and uncheck the "Hide extensions for known file types" option. This will help avoid confusion when renaming files.
Battery - Ensure that your phone has at least 60% battery remaining, and that your PC is plugged in and wont shut down spontaneously during the process. The procedure doesn't take very long , but its best to have enough charge in case something goes wrong.
Backup (Optional) - Unlocking the bootloader will/should completely wipe all data from the device. This includes apps, settings and even the contents of the internal sdcard (pictures, music, etc.). Copy all important files off the phone onto a PC or upload them to a cloud.
Downloads
Download a custom recovery and the SuperSU zip below. Place both files on the desktop.
TWRP:
TWRP
Root:
SuperSU
USB Debugging - On your phone go to Settings > About phone > Tap on Build number 7 times. This will enable Developer options. Now go back to Settings > Developer options > Enable USB debugging
Enable OEM Unlocking - On your phone go to Settings > Developer options. Then enable the 'OEM Unlocking' option. Also,a free advice, make sure that from now on,OEM unlocking option is enabled before you reboot. Sometimes,it might get disabled itself.
Enable Advanced Reboot - On your phone go to Settings > Developer options. Then enable the 'Advanced Reboot' option.
1. Unlocking Bootloader
Turn the phone off. Then boot it into fastboot mode by holding volume up + power. The phone will display "fastboot" text indicating that it has successfully entered fastboot mode.
Plug the phone into your PC, then open a command prompt window on the desktop (Shift + Right Click -> Open Command Window here) and type :-
Code:
fastboot devices
This command will list the connected devices. If your phones serial number shows up you are good to go and may continue. If the phone is NOT listed this indicates that your drivers are not installed correctly. In order for you to continue you must fix your drivers so that your phone is listed under fastboot devices.
If the phone has been recognized by the command above, proceed to unlocking the bootloader with the following command: Remember that this step will/should wipe EVERYTHING off the phone
Code:
fastboot oem unlock
After the above command has finished excuting, run the following
Code:
fastboot reboot
Now, your phone will reboot. Continue to the next step to install Custom Recovery ...
Wait until the phone has fully booted up into android, then adjust the following settings on the phone:
USB Debugging - On your phone go to Settings > About phone > Tap on Build number 7 times. This will enable Developer options. Now go back to Settings > Developer options > Enable USB debugging
Enable OEM Unlocking - On your phone go to Settings > Developer options. Then enable the 'OEM Unlocking' option. Also,a free advice, make sure that from now on,OEM unlocking option is enabled before you reboot. Sometimes,it might get disabled itself. [Most probabaly,it will already be enabled as you did it above.Then,NO NEED to disable and enable it.]
Enable Advanced Reboot - On your phone go to Settings > Developer options. Then enable the 'Advanced Reboot' option.
2. Flashing TWRP
Turn the phone off. Then boot it into fastboot mode by holding volume up + power.
Rename the recovery file that you downloaded above to recovery.img. *Make sure that you rename it to recovery.img NOT recovery.img.img* ,Make sure that this file is placed on the desktop.
Open a new command prompt on desktop and run the following commands:
Code:
fastboot flash recovery recovery.img
Once the flash has completed, Don't use the "Fastboot Reboot" Command Instead Unplug Your phone then Manually boot it into recovery by keeping Power + Volume Down button pressed.
In TWRP, select Reboot and then select System. Now your phone will boot into System and you have cleared Steps 2/3 . Grats.
So, now, time has come to do what we want to achieve through all this. The 'ROOT' . Keep following .
But,before that, take a Nandroid Backup.
3. Making a Nandroid Backup
Warning: before you make a backup with TWRP you must remove all lockscreen security. If you do not do this you will not be able to unlock your device after restoring your backup (entering your pin will result in an "incorrect pin" message), you'll be forced to perform a factory reset to boot into Android. To remove lockscreen security go to Settings>Security>Screen Lock and set it to swipe/none.
A Nandroid Backup is a very important thing to have before installing any custom software on your device. It's basically a backup of your stock system that you can fall back on if anything goes wrong or if you just want your stock ROM back. You can also use Nandroid Bckup to create a backup of your favorite ROM set up exactly the way you like it. The backup you create can be easily restored using the restore tool in TWRP recovery.
Boot into TWRP Recovery .
Go to Backup Menu and select all the listed partitions.
Swipe to take Backup. The process will take some time.
Reboot
Now, let us continue to rooting !
4. Rooting
Now that your phone has an unlocked bootloader and a custom recovery installed, you have two options to gain root (Pick one or the other. You don't need to do both. ).
Option A) Flash SuperSU binaries which will give you root with the stock ROM
Confirm that you have downloaded the SuperSU zip from the downloads section above. Connect OP3 to PC and send SuperSU to your phone.
Turn the phone off. Then boot into recovery mode by holding volume down + power. Leave the phone at the main screen of the custom recovery for now.
Install > browse to SuperSU zip and select it
Swipe to confirm the installation. Then reboot.
Option B) Flash a custom rom which will come pre-rooted
Note that not all custom roms will be pre rooted, however the majority of them are. Read the OP of the ROM thread to see what the verdict is.
Copy a custom rom (you can find these in the OnePlus 3 ROMs, Kernels, Recoveries, & Other Development section of XDA or Custom OP3 Software section on OnePlus Forums) onto the phone (remember the location of where you copy it to)
Turn the phone off then boot into recovery mode by holding volume down + power. To install a custom ROM the general procedure to follow is: wipe Dalvik + System + Data + Cache, flash ROM, flash GApps.
Wipe > Advanced Wipe > Select Dalvik + System + Data + Cache > Swipe to Wipe
Install > browse to the location where you previously copied the ROM zip and select it > Swipe to confirm the installation
Install GApps using same process as ROM, then reboot.
Keep in mind that the first boot after installing a custom ROM & wiping the phone may take longer than usual, as the phone will need to rebuild the dalvik cache and initialize other first boot stuff.
Congrats! That is all! Your phone now has an unlocked bootloader, a custom recovery installed and is rooted. Enjoy !
The very first thing we highly recommend you to do now is to take EFS Backup and save it at your cloud and PC. It is very very important.
5. Making an EFS Backup
All too often, we've seen folks who have a corrupted or missing EFS Partition. This results in your IMEI being lost and no cellular activity on the device at all. This can be a royal PITA to fix, and some folks haven't been able to fix it at all. You can take a precautionary measure to safeguard yourself against this by taking a couple of minutes to back up your modemst files.
Open up Terminal Emulator on your phone (if you don't have it you can download it here).
Once it's open you'll be greeted with a command line prompt, in which you can enter text commands, the first thing you need to do is enable root access by entering this line (press the enter key on your on-screen keyboard after each command to issue it):
Code:
su
If this is the first time you've used Terminal Emulator a Superuser or SuperSU popup will appear, make sure you grant root access.
Now enter these two commands:
Code:
dd if=/dev/block/sdf1 of=/sdcard/modemst1.bin bs=512
Code:
dd if=/dev/block/sdf2 of=/sdcard/modemst2.bin bs=512
This will place two files (modemst1.bin & modemst2.bin) on your internal storage. Make sure you copy them to your PC and other Clouds immediately so that you have a backup there to use if you need to restore it in future.
That's it !! Incase you ever need to restore Nanroid or EFS Backups, continue.
6. Restoring a Nandroid Backup
Note: If you happened to forget to remove lockscreen security (PIN/Pattern/Fingerprint) before creating your backup, and you cannot get into your OS after restoring, you can do the following to fix the issue. Boot into TWRP and use the built in file manager to delete /data/sytem/locksettings.db. This should be enough to get you into your OS again. If it isn't you can also try deleting /data/system/locksettings.db-shm and /data/system/locksettings.db-wal. If this still doesn't fix your issue you can delete /data/system/gatekeeper.password.key and /data/system/gatekeeper.pattern.key.
Boot into TWRP Recovery .
[Only and Only if you want to restore /system and /data too from the Backup] Wipe > Advanced Wipe > Select Dalvik + System + Data + Cache > Swipe to Wipe. Go back to TWRP Home.
Go to Restore Menu and select the backup you want to restore.
Select the partitions you want to restore.
Swipe to Restore. The process will take some time.
Reboot
7. Restoring an EFS Backup
If by chance you end up with a corrupt EFS partition all you need to do is flash the files back to your device using fastboot.
Boot into fastboot mode (power + volume up) and connect your phone to your PC via usb cable.
Keep modemst1.bin and modemst2.bin (backed up earlier) on your desktop and open command window there.
These fastboot commands will restore the files:
Code:
fastboot flash modemst1 modemst1.bin
Code:
fastboot flash modemst2 modemst2.bin
Reboot your device.
Code:
fastboot reboot
Now disconnect phone from PC. Hope your IMEI etc is back.
That's it for the guide. Enjoy !
Source of TWRP image?
anandbibek said:
Source of TWRP image?
Click to expand...
Click to collapse
Oneplus 3 forums. I think it's against XDA rules for me to link it there, so I'll link a similar post
http://forum.xda-developers.com/oneplus-3/how-to/custom-rom-op3-t3398784
Does rooting the op3 voids warrenty ???
just now got the phone .. Need to restore backups from titanium backup
And kindly tell me whether after unlocking bootloader only datas will be erased or the stock rom too ??
Only data
Sent from my LG-D855 using XDA-Developers mobile app
HatRiGt said:
Does rooting the op3 voids warrenty ???
just now got the phone .. Need to restore backups from titanium backup
And kindly tell me whether after unlocking bootloader only datas will be erased or the stock rom too ??
Click to expand...
Click to collapse
#YOLO
yes and yes
HatRiGt said:
Does rooting the op3 voids warrenty ???
just now got the phone .. Need to restore backups from titanium backup
And kindly tell me whether after unlocking bootloader only datas will be erased or the stock rom too ??
Click to expand...
Click to collapse
No. Rotting OP3 doesn't void warranty, as is the case with OPO, OP2, OPX.
Only Data.
Sent from my OnePlus2 using XDA Labs
Has anyone successfully rooted the device with this method yet? Any reports on how you had to modify it or what may have gone wrong and how you corrected it?
i rooted my op3 successfully =) the only bad sideeffect is the "warning bootloader is open" message. this only appears at boot and tells that the devices is not googles trusted anymore.
Dr4g0n said:
i rooted my op3 successfully =) the only bad sideeffect is the "warning bootloader is open" message. this only appears at boot and tells that the devices is not googles trusted anymore.
Click to expand...
Click to collapse
A kernel with dm verity disabled can be flashed. None for now. Will try to get one soon.
Best Regards,
Naman.
Sent from my OnePlus2 using XDA Labs
Dr4g0n said:
i rooted my op3 successfully =) the only bad sideeffect is the "warning bootloader is open" message. this only appears at boot and tells that the devices is not googles trusted anymore.
Click to expand...
Click to collapse
And opening the bootloader probably disables the possibility of getting OTA updates as well? Could it be rooted without opening the bootloader, so OTA updates can still be obtained?
UnnamedFile said:
And opening the bootloader probably disables the possibility of getting OTA updates as well? Could it be rooted without opening the bootloader, so OTA updates can still be obtained?
Click to expand...
Click to collapse
Yes. It is because of dm verity
Sent from my OnePlus2 using XDA Labs
Dr4g0n said:
i rooted my op3 successfully =) the only bad sideeffect is the "warning bootloader is open" message. this only appears at boot and tells that the devices is not googles trusted anymore.
Click to expand...
Click to collapse
UnnamedFile said:
And opening the bootloader probably disables the possibility of getting OTA updates as well? Could it be rooted without opening the bootloader, so OTA updates can still be obtained?
Click to expand...
Click to collapse
BTW You guys rooted from this guide ? Because, ideally, it should disable dm verity.
Sent from my OnePlus2 using XDA Labs
I don't guess you can do a "fastboot boot recovery.img" like on Nexus devices? I'd like to keep stock recovery but will flash twrp if that's the only option once the stock images are available.
lensgrabber said:
I don't guess you can do a "fastboot boot recovery.img" like on Nexus devices?
Click to expand...
Click to collapse
Nope, I just tried:
http://forum.xda-developers.com/showpost.php?p=67349425&postcount=14
I'd like to keep stock recovery but will flash twrp if that's the only option once the stock images are available.
Click to expand...
Click to collapse
Same here.
Hi All,
We all know that unlocking the bootloader resets the device to factory defaults which means you loose installed apps, their settings and user data. Reconfiguring the device(system apps), installing user apps and transferring the userdata back to the phone can be lengthy process. It will also result in unnecessary usage of your wi-fi and/or mobile data and which can be quite expensive (as updated versions of user and systems app, need to be installed again)
So in order to bypass the above issues, follow the following steps:-
Step 1 - Take a full dump of your ROM using SP Flashtool's readback method. Go to readback tab, create a new item and put the following start address and length values :-
Start address would be 0x0
length of the dump file would be 0x3A3E00000 (Lenovo K4 Note only)
Start the process, it will take around one hour to complete depending on the speed of your computer. The dump would be 15 GB file, so ensure you have space.
Step 2:- Unlock the bootloader now
Firtst enable the developer option menu if not already enabled by doing the following steps
a. go to "about phone"-->"Build number"
b. tap it 7 times, you will get a message that "your are a developer now"
c. Go back to about menu, click on newly visible "developer options" and enable "OEM unlocking", ignore the warning. Scroll down and enable "usb debugging"
Open command prompt and enter fastboot mode by issuing the command
"adb reboot bootloader"
Once in the fastboot mode, issue the command "fastboot oem unlock" and follow the on screen instructions to unlock the bootlaoder
3. Now reboot the phone and configure the initial steps. As of this step user data and apps are lost, system apps are reset to factory defaults, but don't worry we have a backup (created in step one). Once done power off your device.
4. Now comes the real part. Launch SP Flash tool and create the dump of the following partitions (You create the dump file in the same manner you have created the full ROM dump file in step 1. The difference would be the values of start address and the length of individual partitions, which you can get from the scatter file).
1. Boot
2. Secro
3. Seccfg
For safety purpose i suggest to also take the backup of the following partitions
1. preloader (you can also flash preloader from stock rom)
2. lk
3. recovery (this is stock recovery with unlocked bootloader)
4. nvram
5. tee1
6. tee2
Till date I haven't has a need to use the above mentioned 6 partitions, so it's your call
Once done, power off and disconnect your phone.
5. Now enter advanced write mode in SP Flashtool (ctrl+alt+v), then open write tab from windows menu item.
Select the ROM dump file you created in step 1, put the start address as 0x0.
Once the process is started, it will take roughly an hour to complete. Disconnect the phone and reboot. Power off the phone once again.
6. Your SP Flashtool write tab is still open, if you have closed the application then relaunch the flash tool and again enable advanced write mode. Now one by one write the partitions images(dump files only boot, secro and seccfg needed) created in step 4. Use scatter file for start address.
7. Reboot your phone.
Congratulations your phone is up and running with unlocked bootloader, rooted and/or twrp custom recovery (if you chose to install it in the first place itself) and all data preserved
You can verify whether your bootloader is indeed unlocked by entering in fastboot mode and executing the command "fastboot getvar all"). You should see the values of the variables
unlocked - yes
secure - no
The first boot might take a litter longer so be patient.
Once you have an unlocked bootloader you can install custom recovery and root your phone.
I think this method should be working on any mediatek chipset based smartphones.
Note:
1. Although till date I haven't had any issues with this method, but follow the tutorial at your own discretion. I am not responsible for any damage caused to your phone by following the above mentioned procedure.
2. Sometimes while trying to perform more than one operations at a time, like you will need to perform write memory operation 3 times since unlike readback operation you can only write one image at a time in sp flashtool, you may get the following error "ERROR: S_BROM_CMD_STARTCMD_FAIL", if that is the case then try the following steps
1. Simply pull out the usb cable at the phone end, close the dialog box and try again. If not resolved after trying 2-3 then step 2
2. Restart the application and repeat the write process. If the problem is still not resolved then step 3
3. Reboot the machine, relaunch the app and repeat the write process.
I don't know why this happens but my guess is it has something to do with cpu cycles allocation causing the delay in usb signalling since SP Flash tool is a single threaded application. So for the best results try to ensure sp flashtool is the only application opened on your machine.
If you use other applications, most of the time you will get through but you will notice significant slowdown during the read and write operations especially during reading and writing full ROM dumps.
Thanks
Thank you for your effort, but I lost you in step 4, how to create dump file using SP
tamerhaikal said:
Thank you for your effort, but I lost you in step 4, how to create dump file using SP
Click to expand...
Click to collapse
Hi,
You create the dump file in the same manner you have created the full ROM dump file in step 1. The difference would be the values of start address and the length of individual partitions, which you can get from the scatter file.
You can add multiple entries in the readback tab.
Hope this helps. Let me know if you have any trouble.
Thanks.
Sent from my Lenovo A7010a48 using XDA-Developers mobile app
After seeing another user on here (hopefully soft) brick their Maven 3 from trying to root using ZPST and the rooting guide here, as well as myself, I want to warn anyone else to not attempt to use any other tool other than the QFIL application from the Qualcomm QPST (the v2.7.480 should be good) software package.
QFIL can backup and flash any partition on the device, negating the need to use any other tool, including ZPST. I am not sure if it is enabled by default, but on the (new) Maven 3 board I have, the devinfo partition did already have the necessary bits for the bootloader to be unlocked (guide for that can be found here). I was able to successfully backup the boot partition (boot.img), put it on my device from my computer, then build a modified Magisk boot.img from the Magisk Manager app. With that, I flashed it as a boot.img partition and it works fine. I can write a full tutorial if there is interest.
But the most important information you should take from this thread is to backup all of your partitions before doing anything to the phone using QFIL. Once you do this, I don't think you can hard-brick your phone, as, if necessary, you can short two solder joints by the SD card slot (message me if you need a picture) to automatically put your device in a functional EDL mode in order to flash your original partition(s) back to the device.
do you have backup files for the phone, I can get into edl mode only. My backup file will not restore the phone
xecutionkrk said:
do you have backup files for the phone, I can get into edl mode only. My backup file will not restore the phone
Click to expand...
Click to collapse
What partitions do you need? boot? I know there seems to be different bootloader versions and stuff
000Nick said:
After seeing another user on here (hopefully soft) brick their Maven 3 from trying to root using ZPST and the rooting guide here, as well as myself, I want to warn anyone else to not attempt to use any other tool other than the QFIL application from the Qualcomm QPST (the v2.7.480 should be good) software package.
QFIL can backup and flash any partition on the device, negating the need to use any other tool, including ZPST. I am not sure if it is enabled by default, but on the (new) Maven 3 board I have, the devinfo partition did already have the necessary bits for the bootloader to be unlocked (guide for that can be found here). I was able to successfully backup the boot partition (boot.img), put it on my device from my computer, then build a modified Magisk boot.img from the Magisk Manager app. With that, I flashed it as a boot.img partition and it works fine. I can write a full tutorial if there is interest.
But the most important information you should take from this thread is to backup all of your partitions before doing anything to the phone using QFIL. Once you do this, I don't think you can hard-brick your phone, as, if necessary, you can short two solder joints by the SD card slot (message me if you need a picture) to automatically put your device in a functional EDL mode in order to flash your original partition(s) back to the device.
Click to expand...
Click to collapse
can you please writ a tutorial on how you did it and also which 2 points to solder in case its needed?