[Guide][Devs] Dual Boot Android Roms - HTC One SV

- Dual booting is the process through which you can switch between any two or more roms without the need of wiping data or making backups before flashing, all you need to do is switch between the roms, meanwhile all the apps you've installed remain intact in their specific rom.
Click to expand...
Click to collapse
Strictly put forth by Developers for Developers! If you are inexperienced with Android Development then proceed forward with extreme caution! As for the experienced, this will be easy for you.
***DISCLAMER***
I am not responsible for bricked devices, dead SD cards, thermonuclear war, or you getting fired because the alarm app failed. YOU are choosing to make these modifications!
Click to expand...
Click to collapse
As always, do anything at your own risk. The above warning/disclaimer is only there because unfortuantely there will be someone who messes this up. The following guide will be conducted straight from the phone so if you are more comfortable using a computer then you will need to adapt this guide to your prefered surroundings. Please insure you have multiple ways to go about restoring your device in case you failed to follow the instructions or misunderstood something within the instructions - A Nandroid Backup, and/or RUU, and/or a ROM fitted for your specific device which you can apply via adb sideload.
Credit goes to @dreccon for bringing this to my attention with a more clear understanding over at his thread,
[GUIDELINES]Dual-Boot on (theoretically) any Android device. He was very helpful to opening my mind and thus putting up this thread. This thread is initially based around working with K2 Variant devices, but I am also aware that this will work on many other devices too.
The following numbers I will be using for partitioning the SD Card is based on maximum used space from a Stock Rom of my own K2_CL device using 4.1.2 Jelly Bean! These numbers are not to be taken literally, so USE COMMON SENSE, and insure you know the sizes for your System, Data, and Cache Partitions!
To determine the proper sizes of your partitions you can use the apk called, Partition Table, mentioned for requirements below. That APK is literally self explanatory so I will not be going over it. You will use this APK to determine the size of each partition and its current format. Do this and take note of them.
The Secondary Rom should be equal to or greater than the Primary Rom OS.
Requirements:
Device SPECIFIC boot.img and custom recovery.img
A text editor of the sorts - I use Quoda Code Editor
A Class 6 or better SDCard (I am talking about the external)
Partition Table from the Play Store
Working roms for your device
A compression tool (I use ZArchiver from the Play Store)
AParted (SD Card Partition) from the Play Store
Steps:
A. PARTITIONING YOUR SD CARD:
Plug your memory card (SD Card) in to your computer using either a card reader or by plugging your device in via usb, and copy everything from it over to your PC as we are going to partition your SD Card (which means it WILL be wiped out). Be sure to unmount your device from your pc if plugged in via usb or any other known method.
Unmount your SD Card on your device by going to, settings > storage > unmount sdcard,on your phone and then proceed to open up the apk, AParted.
Grant root access when prompted. Decline the "Agreement" because it will just try to install junk. Tap configuration, then tap the drop box under Detected devices. You should see mmcblk0, mmcblk1, and usbdisk. If you don't have both "mmcblk0", & "mmcblk1", then stop here, because either something is wrong on your end or this guide isnt for you. If you do, then select mmcblk1 from the list, tap Save, then OK. Tap TOOLS, you should now see parts 1 through 4. "Part: 1" should say fat32, and say the size in MB of your external SD card. If it does, then tap the checkbox next to "Part: 1", next tap the drop box that says Create, select Delete and tap apply. Once done, all parts should say empty. We're going to create 4 partitions. The first partition is going to be the standard external sd partition that will show up in both roms. Tap Create on the top, tap "+", tap the box with "0MB" in it, set it to the size you want the card to be, keeping in mind, that we need space for the second ROMs' partitions. Repeat these steps for System, Data, and Cache as seen below and once completed you will tap the menu button, and tap Apply changes, when done we are finished with the partition setup.
Partition it as followed:
First Partition-FAT32 (total memory card size - I recommend at least 20mb or more depending upon the actual size of your SD Card as a whole) <----- SD CARD
This is the space you will see as your memory card (external sd) in both of your roms (Primary and Secondary).
Second Partition-EXT4 (1339mb) <------ SYSTEM
This will be the System Partition of your Secondary Rom
Third Partition-EXT4 (1165mb) <----- DATA
This is Data Partition of your Secondary Rom, apps will go here
Fourth Partition-EXT4 (220mb) <----- CACHE
You can reduce it a bit more if you want to.
B. PREPARING SECONDARY ROM'S ZIP:
Get the updater-script of the rom you want to dual boot and open it up using Quoda as mentioned in the requirements or with anything else similar to a text editor which won't disrupt the unix coding of that file when you save it later.
SEARCH FOR-mmcblk0p35 (may vary for different devices, look for "mount("ext4", "EMMC", "/dev/block/mmcblk0p35");" in the updater script in order to know what yours is)
Replace with-mmcblk1p2
Save it and move it back to its location in the rom zip (META-INF\com\google\android).
Note: if there is a data folder in the rom's zip then you also have to replace the data partition block with mmcblk1p3, like: mmcblk0p37-->mmcblk1p3
C. PREPARING SECONDARY ROM'S BOOT.IMG:
Unpack the boot.img of the rom you want to dual boot using the proper unpacking and packing binaries. This can be done using your PC and/or phone. There is also the dsixda Kitchen via Windows using Cygwin and/or Linux. However, my guide will be based on doing this directly from my phone so for those who qualify may use this thread - Unpack, Edit, Repack Boot.img/Recovery.img. Otherwise, you will need to approach this differently.
You will need to go through all files which are feasible to view and read within the ramdisk of your boot.img.
Then find and replace:
Find-[email protected]
Replace with-/dev/block/mmcblk1p2
Find-[email protected]
Replace with-/dev/block/mmcblk1p3
Find-[email protected]
Replace with-/dev/block/mmcblk1p4
Save all the files that have had these changes made to them and then repack the ramdisk with the kernel to your new dualboot.img.
D. PREPARING SECONDARY ROM'S RECOVERY (OPTIONAL IF YOU DON'T WANT TO CHANGE THE SECONDARY ROM AGAIN):
Unpack the recovery.img like you unpacked your boot.img and open '/etc/recovery.fstab'.
Edit from this (May vary with other devices):
Code:
# mount point fstype device [device2]
/boot emmc /dev/block/mmcblk0p20
/cache ext4 [COLOR="darkred"]/dev/block/mmcblk0p36[/COLOR]
/data ext4 [COLOR="darkred"]/dev/block/mmcblk0p37[/COLOR]
/devlog ext4 /dev/block/mmcblk0p25
/misc emmc /dev/block/mmcblk0p22
/int_sd vfat /dev/block/mmcblk0p38
/recovery emmc /dev/block/mmcblk0p21
/sdcard vfat /dev/block/mmcblk1p1 /dev/block/mmcblk1
/system ext4 [COLOR="darkred"]/dev/block/mmcblk0p35[/COLOR]
to this
Code:
# mount point fstype device [device2]
/boot emmc /dev/block/mmcblk0p20
/cache ext4 [COLOR="red"]/dev/block/mmcblk1p4[/COLOR]
/data ext4 [COLOR="red"]/dev/block/mmcblk1p3[/COLOR]
/devlog ext4 /dev/block/mmcblk0p25
/misc emmc /dev/block/mmcblk0p22
/int_sd vfat /dev/block/mmcblk0p38
/recovery emmc /dev/block/mmcblk0p21
/sdcard vfat /dev/block/mmcblk1p1 /dev/block/mmcblk1
/system ext4 [COLOR="red"]/dev/block/mmcblk1p2[/COLOR]
Save the file and repack the modified ramdisk with the kernel as dualrecovery.img.
E. MAKING THE UPDATE.ZIP FOR YOUR BOOT.IMG:
By now, you should have your edited boot.img (dualboot.img) and your edited updater-script. Just place both of them within the Secondary rom zip and you are now good to go to flash and/or share to others (but you better test it prior to sharing it!).
F. FLASHING/SWITCHING ROMS:
Just reboot to your recovery and flash the Secondary rom and after that flash your dualboot.img, unless you have already added it to the rom zip then you wont be required to flash the dualboot.img unless you are S-On.
To Switch between Roms just reboot to your recovery and flash your Boot for primary rom and DualBoot for secondary rom.
NOTE: you can literally flash just your stock boot.img and your primary stock rom will appear as if nothing ever happened.
Sent from my C525c using Tapatalk

Quick question. While I appreciate the tutorial greatly... wouldnt it be safer to use a recovery like SafeStrap?
What would the benefits be of using thia method over SS?
Posted from my I337 NB1 Dark Venom 3 SS version --- 20G Free Cloud --- https://copy.com?r=vtiraF

This is currently built with the K2 variant devices kept in mind. I will not guarantee anyone else who does not own a K2 variant that this will work. If you do not own a K2 variant and this does work, please, comment on this thread to let myself and other viewers know. Please specify your device and Rom. However, if you read my first post and everything you saw is fitting to your device and roms, then it is VERY LIKELY that this WILL work for you - Thanks.
To automatically generate your boot.img and/or rom zip to be 'dual bootable' you must download the DualBoot_v1.0 zip at the end of this post and extract it to the root of your internal sdcard. This will save you the hassle of manually unpacking, editing, and repacking the boot.img and as well as extracting, editing, and pushing back the updater-script originally from your rom zip. This process is really fast at accomplishing its goals while doing all the work for you .
The ZipEditor.sh will use my three binaries to edit your boot.img and while doing so, it will create a temporary repack.sh file to allow it to be properly rebuilt again. It will also create a backup of your original boot.img which will be named boot1.img. The dual boot.img will be named boot2.img.
This script is literally built around my three executable binaries - unmkbootimg, mkbootfs, and mkbootimg.
Of course, in order to use the scripts, you need to have had partitioned your SD card the way I described in the first post.
Initial Setup
First of all download the zip at the end of this post, unzip it and copy the DualBoot folder to the root of your SD card.
Install Script Manager from Play Store
How to use
A. ZipEditor.sh
Download the ROM you want to install and copy the zip into /sdcard/DualBoot/OriginalZIPs
Also download a suitable GAPPS.zip and copy it to the same directory (if this applies to you)
If you need to convert additional zips, the tool is designed to process as many as it finds in this directory
Open Script Manager, browse to /sdcard/DualBoot and tap on ZipEditor.sh
In the next screen, select the first two icons on top (Favorite and SU) and then select, Run.
The tool will give you some info about your device. Check them and if they are not right, then kill the script. If they are correct, press Enter to continue. The Editor will process the zips one by one. Everytime a zip is completed, it will prompt you to press Enter.
When all zips are processed you may reboot to recovery, make a backup of your current ROM and flash them.
When you reboot, your secondary ROM will load.
B. SwitchROM.sh
The name is self-explanatory. This tool can only function if it finds the files boot1.img and boot2.img inside the /sdcard/DualBoot/img folder.
These files will be automatically generated when you convert a ROM zip in the ZipEditor. Alternatively, if you know what you are doing, you can create and put them there yourself.
Tap it in Script Manager and again select the first two icons (Favorite and SU) and Run. It will automatically detect the current ROM, flash the boot.img of the other one and prompt you to reboot. Use your Power-Menu and reboot your device. Your device will now boot to the other ROM.
So, for now, you can automatically convert zips for installation to the external partitions with ZipEditor and you can switch between your two ROMs using SwitchROM. You will notice that your normal recovery cannot backup, restore, factory-reset or wipe your secondary ROM. Therefore, @dreccon is currently working on his next project to upload another script that will function as a full fledged Recovery for the secondary ROM, so stay tuned... Meanwhile, you will be required to edit your custom recovery image manually as described in the first post. This will allow you to flash to your secondary rom. For example, the ability to flash and root your secondary rom if it happens to not be rooted.
Click to expand...
Click to collapse
Credits for the ZipEditor.sh and SwitchROM.sh goes to @dreccon
Credits for the executable binaries goes to @Modding.MyMind - That's me

kevp75 said:
Quick question. While I appreciate the tutorial greatly... wouldnt it be safer to use a recovery like SafeStrap?
What would the benefits be of using thia method over SS?
Posted from my I337 NB1 Dark Venom 3 SS version --- 20G Free Cloud --- https://copy.com?r=vtiraF
Click to expand...
Click to collapse
Simple, using your sd card prevents hard bricks and or changes to your actual partitions. This prevents the user from screwing up their device, while also, this prevents malicious roms that have been improperly built to be prevented from destroying the users devices which is really helpful for those who are flashaholics and messing around with nightlies. In addition, when all is said and done, all they need to do is put back their primary Rom boot.img and they will have back their primary (or stock) Rom again as if nothing ever happened.
Buying an sd card are a dime a dozen (cell phones are not)
Sent from my C525c using Tapatalk

Oh... I dont think its a bad idea... but the could be done by creating multipe rom slots with SafeStrap.
I'm really just wondering what the benefit would be chooaing this route over another.
I for one think its a great tutorial and is definately a handy way to do it... not so keen on the sd card usage tho... just due to varying speed issues and googles words on write issues to it...
Posted from my I337 NB1 Dark Venom 3 SS version --- 20G Free Cloud --- https://copy.com?r=vtiraF

kevp75 said:
Oh... I dont think its a bad idea... but the could be done by creating multipe rom slots with SafeStrap.
I'm really just wondering what the benefit would be chooaing this route over another.
I for one think its a great tutorial and is definately a handy way to do it... not so keen on the sd card usage tho... just due to varying speed issues and googles words on write issues to it...
Posted from my I337 NB1 Dark Venom 3 SS version --- 20G Free Cloud --- https://copy.com?r=vtiraF
Click to expand...
Click to collapse
Aren't any issues. You are formating the sdcard to the same format as your system, data, and cache partitions. That would be ext4. With that said, I have done this on a 2gig sdcard using a deodex Rom and it ran faster and smoother than from the actual device itself. Even the first boot time of the deodex Rom was cut down dramatically.
Sent from my C525c using Tapatalk

NICE. Gotta be a class 10 card and the ext4 filesystem.
I would imagine with a slower card it would slow down... tho.
Very cool and great info.... thanks bud!
Posted from my I337 NB1 Dark Venom 3 SS version --- 20G Free Cloud --- https://copy.com?r=vtiraF

kevp75 said:
NICE. Gotta be a class 10 card and the ext4 filesystem.
I would imagine with a slower card it would slow down... tho.
Very cool and great info.... thanks bud!
Posted from my I337 NB1 Dark Venom 3 SS version --- 20G Free Cloud --- https://copy.com?r=vtiraF
Click to expand...
Click to collapse
Over time it may slow down some, but that would only be due to its available memory filling up which you can only imagine with a 2gig to have but only so much available space when you format it. Now, if you have like a 16 or 32 gig or something close to it, then you would be set . You could even go as far as using any extra space as a swap for more ram .
Sent from my C525c using Tapatalk

kevp75 said:
Oh... I dont think its a bad idea... but the could be done by creating multipe rom slots with SafeStrap.
Click to expand...
Click to collapse
I also failed to mention, that if you use some general common sense you can use the guidelines provided in this thread, and create additional space on the sdcard for more roms
So, instead of dual booting, you could technically have three, four, or even 5 depending on the sdcard and what your device can handle. Not to mention, it doesn't take up space on your device. It is just a matter of swapping out your sdcard which can be handy.
Sent from my C525c using Tapatalk

awesome... i'm going to bookmark this so when i can get a spare device I can give it a whirl =)
hopefully my daughter gets sick of her cracked glass s3 soon and i'll be able to do this on that HA!
Posted from my I337 NB1 Dark Venom 3 SS version --- 20G Free Cloud --- https://copy.com?r=vtiraF

kevp75 said:
awesome... i'm going to bookmark this so when i can get a spare device I can give it a whirl =)
hopefully my daughter gets sick of her cracked glass s3 soon and i'll be able to do this on that HA!
Posted from my I337 NB1 Dark Venom 3 SS version --- 20G Free Cloud --- https://copy.com?r=vtiraF
Click to expand...
Click to collapse
Sounds good, and remember to not flash anything to your secondary Rom with your custom recovery. It must be done with your dualrecovery. This is only optional for those who plan to keep their secondary Rom.
Sent from my C525c using Tapatalk

gotcha. Thanks for this.
Posted from my I337 NB1 Dark Venom 3 SS version --- 20G Free Cloud --- https://copy.com?r=vtiraF

Nicely written guide. Well done!
One alternative to constantly flashing the boot.img is to flash the secondary one into the recovery partition and then install bootstrap recoveries to both systems. This way, each ROM would have its own recovery and you would switch ROMs by key combination at bootup.

dreccon said:
Nicely written guide. Well done!
One alternative to constantly flashing the boot.img is to flash the secondary one into the recovery partition and then install bootstrap recoveries to both systems. This way, each ROM would have its own recovery and you would switch ROMs by key combination at bootup.
Click to expand...
Click to collapse
Would do this, but as my knowledge goes, we (meaning our K2 variants) currently do not have bootstrap support at this time, but if you know how to help in that matter, please pm me
Sent from my C525c using Tapatalk

Modding.MyMind said:
Would do this, but as my knowledge goes, we (meaning our K2 variants) currently do not have bootstrap support at this time, but if you know how to help in that matter, please pm me
Sent from my C525c using Tapatalk
Click to expand...
Click to collapse
I haven't tried it. It's just an idea but I'm sure it works. As for building a bootstrap recovery, no I don't know how it's done. I was hoping you already had one.
Sent from the 3rd dimension!

dreccon said:
I haven't tried it. It's just an idea but I'm sure it works. As for building a bootstrap recovery, no I don't know how it's done. I was hoping you already had one.
Sent from the 3rd dimension!
Click to expand...
Click to collapse
I'm confident it would work. I may need to work on bringing it over to us. Will see if I can find time for that though.

Hey guys, a script is in the mix for automating all of what I described within the OP. It will save you the trouble of editing the boot.img, updater-script, and so forth. Some changes need to be made, but I cannot take credit for this. It all goes to dreccon. He is the one writing it out, and I am testing it to insure its integrity. When it is ready, I will be posting it in the third post giving full detailed instructions on how to set it up and use it.
Edit: However, you will still be responsible for formatting the sdcard yourself.
Sent from my C525c using Tapatalk

Third post has been updated. You can now use the available attachment in the third post to automatically generate your dual Rom/dual boot.img. So for those who read my guide in the first post that are scratching their heads... You don't need to anymore lol. All that is required from you is to format your sdcard.
Sent from my C525c using Tapatalk

Hey guys, I will be reconstructing the instructions for post three. Nothing to be concerned about for any of you reading this. Just to keep in accordance with a simple request out of respect and to hold true with the XDA rules.
-- Happy Hunting!!
Sent from my C525c using Tapatalk

Modding.MyMind said:
This is currently built with the K2 variant devices kept in mind. I will not guarantee anyone else who does not own a K2 variant that this will work. If you do not own a K2 variant and this does work, please, comment on this thread to let myself and other viewers know. Please specify your device and Rom. However, if you read my first post and everything you saw is fitting to your device and roms, then it is VERY LIKELY that this WILL work for you - Thanks.
To automatically generate your boot.img and/or rom zip to be 'dual bootable' you must download the DualBoot_v1.0 zip at the end of this post and extract it to the root of your internal sdcard. This will save you the hassle of manually unpacking, editing, and repacking the boot.img and as well as extracting, editing, and pushing back the updater-script originally from your rom zip. This process is really fast at accomplishing its goals while doing all the work for you .
The ZipEditor.sh will use my three binaries to edit your boot.img and while doing so, it will create a temporary repack.sh file to allow it to be properly rebuilt again. It will also create a backup of your original boot.img which will be named boot1.img. The dual boot.img will be named boot2.img.
This script is literally built around my three executable binaries - unmkbootimg, mkbootfs, and mkbootimg.
Of course, in order to use the scripts, you need to have had partitioned your SD card the way I described in the first post.
Initial Setup
First of all download the zip at the end of this post, unzip it and copy the DualBoot folder to the root of your SD card.
Install Script Manager from Play Store
How to use
A. ZipEditor.sh
Download the ROM you want to install and copy the zip into /sdcard/DualBoot/OriginalZIPs
Also download a suitable GAPPS.zip and copy it to the same directory (if this applies to you)
If you need to convert additional zips, the tool is designed to process as many as it finds in this directory
Open Script Manager, browse to /sdcard/DualBoot and tap on ZipEditor.sh
In the next screen, select the first two icons on top (Favorite and SU) and then select, Run.
The tool will give you some info about your device. Check them and if they are not right, then kill the script. If they are correct, press Enter to continue. The Editor will process the zips one by one. Everytime a zip is completed, it will prompt you to press Enter.
When all zips are processed you may reboot to recovery, make a backup of your current ROM and flash them.
When you reboot, your secondary ROM will load.
B. SwitchROM.sh
The name is self-explanatory. This tool can only function if it finds the files boot1.img and boot2.img inside the /sdcard/DualBoot/img folder.
These files will be automatically generated when you convert a ROM zip in the ZipEditor. Alternatively, if you know what you are doing, you can create and put them there yourself.
Tap it in Script Manager and again select the first two icons (Favorite and SU) and Run. It will automatically detect the current ROM, flash the boot.img of the other one and prompt you to reboot. Use your Power-Menu and reboot your device. Your device will now boot to the other ROM.
Credits for the ZipEditor.sh and SwitchROM.sh goes to @dreccon
Credits for the executable binaries goes to @Modding.MyMind - That's me
Click to expand...
Click to collapse
dang it... now i gotta get me a 64G card
Rockin it from my Rockin Smartly Deadly Venom NE5 S4 (much thanks to: @Venom0642 @ted77usa @rebel1699 @iB4STiD ~ 20GB free cloud https://copy.com?r=vtiraF

Related

[mod][tool]dual boot for zte blade/modify-tool

Hello guys. This my dual booting project for our amazing ZTE BLADE!
What is this?
>This mod works on the basis of two scripts which are to be executed in the terminal emulator or script manager and a modified boot.img to boot the rom from sdcard instead of NAND.
FOR ADVANCED USERS ONLY!!!
I WILL NOT BE RESPONSIBLE FOR ANY BRICKED DEVICES, DAMAGED SDCARDS ETC.
DO IT AT YOUR OWN RISK!!!
It is in alpha stage, so lot of work is still needed to make it more safer and convenient.
I will add this mod for more ROMS like CM10, Paranoidandroid etc.
Downloads:
Cyanogenmod9(KonstaKang)
Boot.img - Download
Updater-script - Download
Cyanogenmod10
Boot.img - Download
Updater-script - Download
Gapps::
Jelly Bean Gapps Updater-script - Download
Tool:
Modify-Boot - Download
Now no need to wait for me to mod your boot.img.Mod your boot image for dual boot with this tool!!!
Guide for the tools is on the second post.
Thanks go to:
Sulthekk for guiding me towards right way.
SNAP.iT for giving me some mounting ideas.
All the people who have helped me(can't remember all names ).
And the big community to test it for me.
SCROLL DOWN to 2nd POST FOR THE WHOLE GUIDE...
GUIDE
So here is the full guide:
PARTITIONING SD CARD TO MOUNT /SYSTEM AND /DATA
Take the backup of your sd card data first
Make sure you have partitioned your sdcard before.
Connect your phone to your computer and mount usb storage.
Download the EASEUS partition manager from here.
Open partition manager and delete all partitions of your sdcard.
Right click on the 'unallocated' and click create partition.Don't label it select partition type as primary and filesystem as FAT32 and enter the partition size bot remember this will hold your photos,media etc,you should leave about 600 mb space free click OK.
right click again and create partition as primary and filesystem as EXT3 and size of 250 mb click OK.
Repeat above step again.
Apply all the changes by cliking on apply tap and you have succesfully partitioned your sdcard for dual booting.
​
GUIDE FOR THE TOOL
Extract the downloaded zip file extract to any concinient directory.Here I will explain the guide as a cygwin user.
Extract the zip to directory say c:\
The extracted folder will look like 'Modify-boot".Now open the terminal or cygwin bash and mount the directory by typing
cd c:\modify-boot
Click to expand...
Click to collapse
Now drop your boot.img in the WORKING_313 folder and execute the script by typing
./modify-boot.txt
Click to expand...
Click to collapse
It will mod your boot.img for dual booting.Output boot.img will be in the WORKING_313 folder as boot.img.
MODDING THE ROM FOR DUAL BOOTING
Open the ROM.zip.
Get the modded boot.img from the tool and replace with the original one.
Now download the attached updater-script from 1st post and replace the orignal one with this modded one(path to udater-script META-INF/com/google/android).
Zip up the rom.
ADAPTING A ROM TO INSTALL IN THE SD CARD
If you want to mod your own rom other than the posted here,then you have to mod the updater-script in the rom
For that open your rom zip go to /META-INF/com/google/android and open the updater script
Now replace every line looking like following as;
From
mount("yaffs2", "MTD", "system", "/system");
Click to expand...
Click to collapse
TO
run_program("/sbin/mount", "dev/block/mmcblk0p3", "/system");
Click to expand...
Click to collapse
and this one
From
format("yaffs2", "MTD", "system", "0");
Click to expand...
Click to collapse
TO
run_program("/sbin/mkfs.ext2", "dev/block/mmcblk0p3");
Click to expand...
Click to collapse
and add the following line next to the line written above
run_program("/sbin/mkfs.ext2", "dev/block/mmcblk0p2");
Click to expand...
Click to collapse
Save the file and zip up the rom.Your rom is ready to install to SD CARD!!!!
FLASHING GUIDE
Remember, before partitioning the sd card you should wipe data and cache in the recovery during NAND rom installation or it will erase the partitions created before.
First flash the rom you want to install in the NAND,do not wipe data or anything do it before partitioning.
Then install the rom without wiping data or anything.
reboot the system. You will be in your sd card rom!!!
Now create folder in the sd card as /sdcard/multiboot.
Take both boot.img from NAND rom and cm9 rom rename the cm9 boot.img to bootsd.img and keep the NAND boot.img as it is.
Copy both imgs to multiboot folder.
Now download attached(or use above link for unregistered users) bootnand.sh and bootsd.sh and place at the root of the sdcard.
Open terminal emulator,type su and execute bootsd.sh to boot into sd card rom or execute bootnand.sh to boot into NAND rom.
THAT'S IT . ENJOY DUAL BOOT ON YOUR ZTE BLADE!!!!
[email protected] said:
So here is the full guide:
PARTITIONING SD CARD TO MOUNT /SYSTEM AND /DATA
Take the backup of your sd card data first
Make sure you have partitioned your sdcard before.
Connect your phone to your computer and mount usb storage.
Download the EASEUS partition manager from here.
Open partition manager and delete all partitions of your sdcard.
Right click on the 'unallocated' and click create partition.Don't label it select partition type as primary and filesystem as FAT32 and enter the partition size bot remember this will hold your photos,media etc,you should leave about 600 mb space free click OK.
right click again and create partition as primary and filesystem as EXT3 and size of 250 mb click OK.
Repeat above step again.
Apply all the changes by cliking on apply tap and you have succesfully partitioned your sdcard for dual booting.
​
MODDING THE CM9 ROM FOR DUAL BOOTING
Open the konstakang.zip (currently only supported rom, will add more soon).
Download modded boot.img from here extract it and rename the .img file to boot.img.
Delete the boot.img from the cm9 rom and put the downloaded one.
Now download the attached updater-script (remove .txt) or from here (for unregistered users)and replace the orignal one with this modded one(path to udater-script META-INF/com/google/android).
Zip up the rom.
FLASHING GUIDE
Remember, before partitioning the sd card you should wipe data and cache in the recovery during NAND rom installation or it will erase the partitions created before.
First flash the rom you want to install in the NAND,do not wipe data or anything do it before partitioning.
Then install the cm9 rom without wiping data or anything.
reboot the system. You will be in your sd card rom!!!
Now create folder in the sd card as /sdcard/multiboot.
Take both boot.img from NAND rom and cm9 rom rename the cm9 boot.img to bootsd.img and keep the NAND boot.img as it is.
Copy both imgs to multiboot folder.
Now download attached(or use above link for unregistered users) bootnand.sh and bootsd.sh and place at the root of the sdcard.
Open terminal emulator,type su and execute bootsd.sh to boot into sd card rom or execute bootnand.sh to boot into NAND rom.
THAT'S IT . ENJOY DUAL BOOT ON YOUR ZTE BLADE!!!!
Click to expand...
Click to collapse
hi, thank u ....... the link for 'boot.img' is not working. Pls fix it
Can't thank you enough for this,if it works.. Great stuff btw.. At least,you were the first one that tried and got it working..
Sent from my LT26i using xda premium
karthiknr said:
Can't thank you enough for this,if it works.. Great stuff btw.. At least,you were the first one that tried and got it working..
Sent from my LT26i using xda premium
Click to expand...
Click to collapse
+1
We've been waiting on this ever since karthik and wbaws discussion made it sound impossible
Just reported as a news tip for the portal
Thanks!!
New update coming for tool soon!!!
Its a great achievement .. future updates will be easy to go on for basic user. Btw thanks man. .
Sent from my Blade using Tapatalk 2
I've found that making four partitions and installing /data to mmcblk0p4 and /system to mmcblk0p3 helps with certain roms that have S2E configured.
I'm also trying to get it to boot two mounted loop filesystems instead, i installed SSRLS7 and GB-Gapps as per your instructions in the OP (just changed the partitions for installation and the updater-script and init.rc so that it would work) did a dd of the entire partitions to files on the sdcard and edited the init.rc like this:
Code:
on fs
# mount mtd partitions
chmod 777 /sbin/busybox
symlink /sbin/busybox /sbin/losetup
mount vfat /dev/block/mmcblk0p1 /mnt/sdcard
losetup /dev/block/loop0 /mnt/sdcard/multiboot/snow/system.img
losetup /dev/block/loop1 /mnt/sdcard/multiboot/snow/data.img
mount ext2 /dev/block/loop0 /system
mount ext2 /dev/block/loop1 /data
mount yaffs2 [email protected] /cache nosuid nodev
on post-fs
# ZTE_JCD_CTSCONFIG, 2011.05.03, BEGIN
mkdir /system/lost+found 0770
chmod 0770 /system/lost+found
# ZTE_JCD_CTSCONFIG 2011.05.03, END
# once system is setup, no need to modify /system , ZTE_BOOT_LIWEI_20110331
mount ext2 /dev/block/loop0 /system ro remount
I also copied busybox to /sbin in the ramdisk before letting the process finish and make bootsd.img
It doesn't work though and i have no idea why not. I've mounted the system.img and data.img files on the phone via the terminal to test if the procedure works and it does mount them just fine.
If anyone has any clue why this doesn't work then please tell me.
Dual boot on ideos x6
[email protected] said:
hello guys. This my dual booting project for our amazing zte blade!
What is this?
>this mod works on the basis of two scripts which are to be executed in the terminal emulator or script manager and a modified boot.img to boot the rom from sdcard instead of nand.
For advanced users only!!!
I will not be responsible for any bricked devices, damaged sdcards etc.
Do it at your own risk!!!
It is in alpha stage, so lot of work is still needed to make it more safer and convenient.
I will add this mod for more roms like cm10, paranoidandroid etc.
Downloads:
cyanogenmod9(konstakang)
boot.img - download
updater-script - download
cyanogenmod10
boot.img - download
updater-script - download
gapps::
Jelly bean gapps updater-script - download
tool:
Modify-boot - download
now no need to wait for me to mod your boot.img.mod your boot image for dual boot with this tool!!!
Guide for the tools is on the second post.
Thanks go to:
Sulthekk for guiding me towards right way.
Snap.it for giving me some mounting ideas.
All the people who have helped me(can't remember all names ).
And the big community to test it for me.
Scroll down to 2nd post for the whole guide...
Click to expand...
Click to collapse
dear friends is it possible on huawei ideos x6?
Plz reply
vimi93 said:
dear friends is it possible on huawei ideos x6?
Plz reply
Click to expand...
Click to collapse
Seriously? Dude can't u see this is the Blade forum. It will not work on any other phones
QuantumFoam said:
Seriously? Dude can't u see this is the Blade forum. It will not work on any other phones
Click to expand...
Click to collapse
Actually, it'll work on any phone that runs android and has a working recovery that can be used to install boot.img and system files via an updater script.
It works fine on my Mini and Huawai G300.
Jinxxed said:
Actually, it'll work on any phone that runs android and has a working recovery that can be used to install boot.img and system files via an updater script.
It works fine on my Mini and Huawai G300.
Click to expand...
Click to collapse
I stand corrected.
---------- Post added at 01:42 AM ---------- Previous post was at 01:37 AM ----------
Oh and btw, [email protected], check the xda portal. You're on the front page.
Congratulations
Jinxxed said:
Actually, it'll work on any phone that runs android and has a working recovery that can be used to install boot.img and system files via an updater script.
It works fine on my Mini and Huawai G300.
Click to expand...
Click to collapse
Will try it out on my LG P500 then!
thanks
Jinxxed said:
Actually, it'll work on any phone that runs android and has a working recovery that can be used to install boot.img and system files via an updater script.
It works fine on my Mini and Huawai G300.
Click to expand...
Click to collapse
thank you for the reply

[SCRIPT] Multiboot via loop file, completely rewritten [25/10]

The script is now completely rewritten and a lot easier to use.
This is the general walkthrough for this script, if you have more questions than this answers please ask in this thread.
Download and unpack the script to the root of your sdcard, the easiest way to do this is to download it to the root of the sdcard and do the following:
1. start terminal session
2. cd /sdcard
3. tar xvf MakeLoopROM-Android-V11.tar
===============================================================================================================================
NEW! READ THIS! - The original ROMs and Packages are now stored in /sdcard/MakeLoopROM/original-roms and /sdcard/MakeLoopROM/original-packages. Copy the ROMs and packages
that you want to convert into those folders!
===============================================================================================================================
Ok, once you're done there you're ready to start the script, it's now completely menu driven.
1. start terminal session
2. cd /sdcard/MakeLoopROM
3. sh startup
That will start up the menu, for a new ROM work your way from 1 - 4 to make your first loop ROM, at the end of 4 it will be ready for installation, for upgrades that install into
existing loop files (that you have made once with step 1) start at step 2.
The menu options and how they work:
1. Make system, data or both loop files
This option will allow you to do just what it says, make the system and data images you'll install your ROM into, it's very
straightforward but i'll give a brief summary of how
it works.
"Do you want to make an image file to hold the system for this ROM? (not neccessary if it's an upgrade from a previous ROM) Y
for yes N for no."
Pretty straightforward, if you don't have a system loop file enter y for yes, if you're going to upgrade then running this
step is completely unneccessary but since you have
chosen to run it, press no.
"What do you want to call your system image? (give it a name you'll remember, like cm-7-system for a cm-7 loop install)"
Name the system loop file, call it whatever you want but make it something relevant to the ROM or you'll end up wondering what
that file is for when you stumble upon it at a
later time. it'll be stored under /multiboot/system-loop-files when it's done.
"What size do you want your system image to be (in MB's)? (WARNING: if you make it too small your ROM +other packages like
gapps might not fit, make it 250)"
The size of /system for the loop ROM, read the thread you downloaded the ROM from to find out what size is ok, i just use 250
for everything in case i want to reuse it with full
at a later time.
"Do you want to make an image file to hold the data for this ROM? (not neccessary if it's an upgrade from a previous ROM or
you want to share a data image with another ROM)
Y for yes N for no."
Same as with the system loop file, if you don't have one, you'll want one, if you're upgrading you shouldn't be running this
step but there is another time when you want to say
no to this, when you want to share a loop file with another installation (not with NAND ROMS). Like for example if you want to
share the data partition between CM-10 and PA-JB.
"What do you want to call your data image? (give it a name you'll remember like cm-7-data for a cm-7 loopinstall)"
Same as for the system loop file, just name it something relevant, the name is of no importance to it's function.
"What size do you want your data image to be (in MB's)? (This file will hold all of your data, don't skimp on the size)"
How many apps do you plan to install? 10 - 50 - 500?
Make it a size that you can live with and that will fit on your sdcard, it really depends on how many apps you'll install.
2. Make a Loop ROM
It's exactly what it says, this will make your loop ROM ready for installation.
"Available ROMs:"
just enter the number that's next to the ROM you want to convert, if it's not there it's because you didn't copy it to /sdcard
/MakeLoopROM/original-roms, you can do so now and
hit r to refresh the list.
"You previously created the system loop file [nameofyourfile], do you want to use it for this ROM? (y/n)"
You'll only get this question if you created a system loop file by going through step 1. If you did so and that's the file you
want to use (check the [nameofyourfile]) then
answer y for yes, otherwise you answer n for no and the following question comes up.
"Available system loop files:"
This choice will only come up if you answered no to the previous question or didn't make your system loop file with the script
in step 1 during this session. Anyways, just enter
the number next to the file you want to use as a system loop file.
"You previously created the data loop file [nameofyourfile], do you want to use it for this ROM? (y/n)"
See the system loop file above, this is the same but for the data loop file
"Available data loop files:"
See the system loop file above, this is the same but for the data loop files
Do you want this installation to format the data image used with this ROM?
Answer Y for yes if it's a new installation and N for no if you are upgrading
and want to keep the data on the data image. (Say yes if you would run wipe
data/factory reset in recovery if this was a normal install)
Y if this is a new install or you're reusing an old data loop file that you want to wipe.
when done hit enter to get back to the menu.
3. Make a loop package (such as gapps)
This, like it says, is for converting non-rom packages (not kernel packages though) such as gapps or bravia or what have you.
"Available packages:"
type the number that is next to the package you want to convert, if the package isn't there you didn't copy it to /sdcard
/MakeLoopROM/original-packages
"You previously created the system loop file [nameofyourfile], do you want to use it for this ROM? (y/n)"
You'll only get this question if you created a system loop file by going through step 1. If you did so and that's the file you
want to use (check the [nameofyourfile]) then
answer y for yes, otherwise you answer n for no and the following question comes up.
"Available system loop files:"
This choice will only come up if you answered no to the previous question or didn't make your system loop file with the script
in step 1 during this session. Anyways, just enter
the number next to the file you want to use as a system loop file.
Repeat No. 3 for all your packages
4. Make (or update) NAND boot image.
This will read the information in your boot partition and store it as boot.img under /sdcard/multiboot so you can boot back to
your NAND installed ROM by running step 6 or
flashing nandboot.zip (also stored under /sdcard/multiboot) from cwm.
Run this every time you update your NAND ROM so the boot.img is fresh.
"This script will update your nand boot.img in the multiboot folder to the version of boot.img you're currently running, make
sure you're running the updated ROM and not
a loop ROM before hitting Y for yes here. If you're not sure type N for no."
If you updated your NAND ROM or haven't run this option before you have to say y for yes here, you have to run this option at
least once or you can't boot back to NAND. Just
make sure you've got your NAND ROM booted and not a loop rom because this will take the boot partition content of your
currently running ROM.
5. Remove a loop installation
If you've come this far you know what you're doing in this option. I'm not going to go through all combinations but they are
self-explanatory.
6. Boot an installed ROM.
Exactly what it says, just remember that even non-installed ROMs may be listed here, if you happen to try to boot to one of
those it will hang at boot, in that case, pull the
battery, reboot to recovery (press and hold vol down while you press power) and use the boot zips that have been created for
your roms.
the Boot zips are located in /sdcard/multiboot/nandboot.zip for the NAND and /sdcard/multiboot/loop-roms
/[namofyoursystemloopfile]/[nameofyourROM]boot.zips
I think that's all, if there is any questions, feel free to ask.
Android version: MakeLoopROM-Android-V11.tar
MD5: 1b33ad6c3078711444c01867e436b65a
===============================================DEPRECATED==============================================================
It took a while but i managed to sort out how to boot to loop filesystems stored on the SD-card.
This means that you don't have to partition anything and you can have as many ROMs installed as you can fit on your SD-card.
You don't have to worry about a2sd/S2E/mounts2sd or anything like that (just make your data partition large enough to hold your apps, you can share the data partition between as many loop ROMs as you like) but this doesn't prevent it either, your sd-ext partition will be untouched and mountable by any ROM you install into a loop file (if the ROM supports sd-ext, that is). Swap will work just fine too.
The script is self explanatory but there are a few things it doesn't explain so i'll explain it here.
Here we go:
1a. Download the MakeLoopROM(version).zip and unpack it to any directory of your choice, just remember where you put it, if you're going to do this under cygwin i suggest you put it in a directory that is easily accessible from the cygwin terminal (IE cygwin/home/"yourusername") and if you're using Linux, just unzip it to your home directory.
1b. Download the MakeLoopROM-Android.tar and unpack it to the root of your sdcard or copy the file to the root directory of your sdcard, open up a terminal session and run tar -xvf MakeLoopROM-Android.tar.
2. Copy the rom and gapps and whatever other package you want to convert to the MakeLoopROM directory that was created during the unzipping above.
3a. In Linux, open up a terminal, cd to the MakeLoopROM directory and type sudo ./makelooprom (losetup requires root permissions).
3b. In windows, open up the cygwin terminal, cd to the MakeLoopROM directory and type ./makelooprom-cygwin
3c. On Android, open up a terminal session, type su and hit enter, type cd /sdcard/MakeLoopROM and hit enter and then sh mkrom and hit enter.
4. Follow the instructions, it should be easy enough to understand.
5. If you want to convert a gapps package and/or other packages you repeat step 3 but type ./makeloopgapps instead of ./makelooprom it'll work for any package you want to install into your loop files, root is not needed for this step.
5a. For android you type sh mkgapps to make gapps and other packages.
6. To be able to reboot back to NAND (the ROM on your phones internal storage) you need to copy the boot.img of your current ROM into the multiboot directory.
6a. The android version now copies the running boot.img if you answer yes when you get the question if you want it to so there is no need to copy it in another way.
After you're done converting your ROM and the packages you'll find all important stuff in the multiboot folder within the MakeLoopROM directory, just copy the whole folder to the root of your SD-card (if you are running on android this step is unneccessary, the script will copy the files for you). You'll find your image files under multiboot (if you created them) along with the "nameofyourrom"boot.img and boot"namofyourrom".sh that you'll need to boot into the ROM from another ROM and finally under loop-roms/[nameofyoursysimage] you'll find all your converted ROMs and packages, ready for installation.
Now you're ready to install the loop ROM and the loop packages, it installs like any other ROM/package via your recovery of choice (I recommend my CWM Touch 6.0.1.1, it's what this is tested on but it should work fine on any recovery).
To switch between ROMs you open up a terminal window, type su to get root permissions, cd to the multiboot folder (cd /sdcard/multiboot) and type sh bootnand.sh to switch to your internal ROM or boot"nameofrom".sh (bootcm-7.2.0-blade.sh if you installed cm-7.2.0-blade for example) for any of the loop roms. You can also install script manager and script manager widgets and make widgets for those scripts on your homescreen, that way rebooting to another rom is as easy as pressing the icon on your homescreen.
I'm sure there'll be a lot of questions about things i haven't thought of, but if you should fail or do something wrong then just hit ctrl-c and start over, the script cleans up and restarts the build.
Thanks to:
[email protected] for some ideas.
championswimmer for some scripts from his Kernel Kitchen.
Tilal for suggestions that helped fix running this script on the phone itself as well as the app he's making to make reboots between the different installs much easier and better.
[email protected] for being a very patient tester.
Files:
Linux version: MakeLoopROM-Linux.tar
MD5: 8907e2519276f4abcbb5bab0de168ae5
Windows Cygwin version: MakeLoopROM-Windows.zip
MD5: 096921e7a08eba98329bb7ec486068f0
Android version: MakeLoopROM-Android-V8.tar
MD5: f4ee326faf65bd032a95a1e2b4e8bc9f
25/10:
* Completely rewritten, it's now entirely menu driven with choices so you don't have to type filenames.
* Fixed faulty boot flashing
* Now copies a flashable zip of each loop ROM and NAND ROM boot images to /sdcard/multiboot for NAND and /sdcard/multiboot/loop-roms/[nameofyoursystemloopfile/[nameofyourrom]boot.zip so you can flash it via CWM if you need to.
* Includes a cross compiled version of bash for arm to fix a lot of scripting problems.
12/10:
* Streamlined, a LOT faster now.
* Possible fix for the random faulty boot.img flashing when switching between ROMs, need feedback on this.
* Removed unnecessary file creation (all of it runs within one loop file and questions (if you create the system and data images you won't get the question twice, it checks if your ROM is a JB rom without your interference).
* Added cleanup script, to use it run sh cleanup as su and follow the instructions.
* Lots of other bits and pieces that makes it safer and faster to use.
3/9:
* Fixed the Android version to work with CM7 roms [changed let=size to size=$(expr], thanks to Sulthekk for the heads up on that
* Added a failsafe to the Android version on creation of system loop file if it already exists and on giving the script a name for system and data image that doesn't exist. You get one retry, if you can't get it right after that... It is possible to multitask on android, just open a file manager if you forgot the name of the system or data image.
* Fixed the Linux and Windows versions to work with JellyBean ROMs, thanks to jpeg729 for the heads up on that
* Change the file names to reflect which version is which
1/9:
* Finally fixed the problems with no permissions running the script on some ROMs.
1/9:
* Added the choice to copy your currently running roms boot.img to your multiboot automatically, no user interaction needed for the process.
31/8:
* Changed the android version to a tar to keep file permissions intact.
* Fixed it up so it runs on CM-10 and PA as well as all other roms (i hope).
30/8:
* Release of the Android version, now runs completely on your phone.
28/8:
* Changed the Linux version to tar format to ensure that permissions are correctly set.
* Fixed the Cygwin version so it can make the data and system image files, they will be formatted on install and if it's a new installation you have to choose y to format the data image file or it will not have a filesystem.
* Changed a few misspellings in user interaction texts and tried to make it easier to understand.
Woah. Cwm and Multiboot in a week's time?
When you getting your RD status?
Good work man
Sent from my Ouya
QuantumFoam said:
Woah. Cwm and Multiboot in a week's time?
When you getting your RD status?
Good work man
Sent from my Ouya
Click to expand...
Click to collapse
I've got one third project that i'm about to wrap up and after that i'll just do incremental updates on those three while devoting my time to kernel development which is sorely needed.
Found a util for windows called winDD, i'll check it out and include it in the next version if it's of any use. That will fix the problem with not being able to create the loop files on windows.
I've built makebootfs and makebootimg for android and will include them along with a script that works on android in the next release.
I'll make the next release a tar version along with a zip version for windows users, this is to preserve file permissions.
Any other suggestions are most welcome.
After a lot of issues i finally got the Android version ready, i've tested it and it works fine on my phone, both the makelooprom-android and the makeloopgapps.
I had to cross compile perl and the mkbootfs and mkbootimg files to run on armv6l which took a while because i kept getting errors, both are included with the script.
Then there was a problem with running split-bootimg.pl on the sdcard, fat32 doesn't support symbolic links so i had to make three different loopfiles within the script to use for bootimg-contents ramdisk-contents and output.
Anyway, now it runs just fine, try it out.
New version up and running.
Only for zte blade ?
Sent from my B15Q using XDA Free mobile app

[DUAL_BOOT][ANY_ANDROID]Dual booting in an android phone with external SD card

So here you come. To read and perform this tutorial, you obviously need a first hand experience on flashing a ROM and/or kernels. Otherwise this tutorial and my efforts to get you a device with two OSes running might end up giving you a bricked device. So, if you're hearing the terms "flashing" or 'kernels' for the first time and thinking it's kinda good food, then bro, just go and taste those first.
Something's to remind before we gonna dig deep into this tutorial->
Noone but you will be responsible for what you end up with.
The warranty of your device will be voided after this if it isn't already after rooting. For MI users, the good news is that you can reclaim it by just flashing the fastboot ROM for your device.
Enough lectures. Bro let's get to work.
Things you'll be needing =>
One working Windows PC(because I doesn't know any replacement of bootimg.exe on any other OS. If you know, then let me).
ADB, fastboot and the device drivers (easily found in XDA)
Any custom CWM based recovery installed.(since TWRP is most popular, I will demonstrate using it. You can use any other you want overall process will be the same)
A custom ROM and kernel for your phone(the second os)
A class 10 memory card ( I recommend 32GB for the spaces)
PART 1: MODIFYING THE BOOT
At first, how does your device boots up? What are the partitions called /data and /system? The answer is quite simple. It's your kernel that points out the location from where the OS should be picked up. So for booting into the second OS we need some modifications to it at first.
Search and download bootimg.exe on XDA, I'll post a link later. Create two folders. Name them "Internal OS" and "External OS" respectively. Put the zip file of the OS you're currently using to the first one and the OS you're gonna use on the external storage to the second one. Rename the second OS to originalExternalOS.zip. Extract originalExternalOS.zip. Pick the boot.img file from the root of the extracted folder and move it to a new folder named "boot2". Extract the IMG using bootimg.exe. Navigate to the initrd folder and you will get a file named 'fstab".
Basically it's the file that tells the kernel which partition does the OS resides in.
Open the file in your favourite text editor.
Replace every instance of the first line with the second one:
/dev/block/bootdevice/by-name/system => /dev/block/mmcblk1p2
/dev/block/bootdevice/by-name/userdata => /dev/block/mmcblk1p3
/dev/block/bootdevice/by-name/cache => /dev/block/mmcblk1p4
Save the file without giving any extension to it. Repack it using the same tool. You'll have boot-new.img and boot-old.img. Rename boot-new.img to boot.img and replace the one in the root folder with this. Basically what we're doing here is replacing the old boot.img with the modified one.
For your knowledge, blocks are the partitions of any storage you have on your device. For example, your internal storage is partitioned to near about 30 different blocks each starting with prefix "mmcblk0p". We here just told the kernel to load the OS from the blocks mentioned. We'll be creating these blocks in the external SD card next.
PART 2: PARTITIONING THE SD CARD
Connect your device with the memory card inserted to your PC. If you haven't installed fastboot, ADB, and the drivers, do it now.
READ THE FOLLOWING CAREFULLY
Reboot the device to recovery mode. Type the commands in cmd:
Code:
adb shell
parted
unit MB
print
quit
umount external_sd
Read and store the minimum and maximum capacity of your card. Since different cards will have different capacities I will point it as variable MIN_SIZE and MAX_SIZE. You'll need to calculate and put the values in the commands. Now type the following commands on cmd:
Code:
parted /dev/block/mmcblk1
rm 1
//START_BLOCK = MAX_SIZE - 5000
mkpartfs primary fat32 MIN_SIZE START_BLOCK
//SYS_START = START_BLOCK+1
//SYS_END = SYS_START + 1200
mkpartfs primary ext2 SYS_START SYS_END
//DATA_START = SYS_END+1
//DATA_END = DATA_START + 3500
mkpartfs primary ext2 DATA_START DATA_END
//CACHE_START = DATA_END + 1
mkpartfs primary ext2 CACHE_START MAX_SIZE
//We have partitioned the memory card. Let's format them. Ignore all "Do you wish to continue" question in the next commands as we're already mentioning yes.
mkfs yes 1 fat32
mkfs yes 2 ext2
mkfs yes 3 ext2
mkfs yes 4 ext2
quit
//Now they are almost ready. Just make the newly created blocks readable by the OS.
make_ext4fs /dev/block/mmcblk1p2
make_ext4fs /dev/block/mmcblk1p3
make_ext4fs /dev/block/mmcblk1p4
//Now you get where does the blocks come in the kernel right?
exit
//You've covered up the hardest part. Let's get some coffee.
PART 3: MODIFYING THE NEW OS
You've left the OS extracted in the "External OS" folder right? It's time to do some magic in it. We're gonna tell the OS to be installed in the blocks we created just like the kernel. But wait, where does the OS know before installing where it should get installed? Well, the answer hides in the updater-script in the folder META-INF > com > google > android. Navigate yourself in it. Open the updater-script file in your favourite editor ( I use notepad++ ) and modify it in the same way as the boot.
Replace every instance of the first line with the second one:
/dev/block/bootdevice/by-name/system => /dev/block/mmcblk1p2
/dev/block/bootdevice/by-name/userdata => /dev/block/mmcblk1p3
Leave the /dev/block/bootdevice/by-name/boot as it's the fundamental block and we can't replicate it. Don't think for the /cache partition as we've already done that in the boot.img file. Now navigate to the root of the folder where you extracted the External OS. Select all files, add them to a zip file using WinRAR. Name the file to newOS.zip. Open newOs.zip and originalExternalOS.zip with WinRAR and compare them if you find any change in the folder tree. They must and they should be exactly the same. You're 80% done.
PART 4: MODIFYING THE RECOVERY
We often flash many zips including very popular Xposed and other mods to our OS right? They also look for the /system partition. So what are we gonna do? Modifying each of them? Nah. Let's modify where they get which one the /system is. The recovery. Extract the img of the recovery you're using with the same bootimg.exe. Modify exactly the same things. I.e.
Replace every instance of the first line with the second one:
/dev/block/bootdevice/by-name/system => /dev/block/mmcblk1p2
/dev/block/bootdevice/by-name/userdata => /dev/block/mmcblk1p3
/dev/block/bootdevice/by-name/cache => /dev/block/mmcblk1p4
in the following files : initrd/fstab.qcom
initrd/etc/recovery.fstab
initrd/etc/twrp.fstab(For TWRP only)
Save them. Repack. And you got your recovery-new.img and recovery-old.img. Put recovery-new.img and newOS.zip in the same folder. Now wake up, it's time for some action.
PART 5 : INSTALLING THE OS
Open cmd in the folder where newOS.zip resides. Reboot the device in fastboot mode. Type the following commands:
Code:
adb push newOS.zip external_sd
fastboot flash recovery recovery-new.img
fastboot boot recovery
Now your device should boot up in recovery mode. To check if everything has gone fine mount system using TWRP. Use twrp's built in file manager and navigate to system folder. It's empty? Yup. You've done a great job. Now flash the newOS.zip using TWRP and your device should boot up in the new OS. To cross check again remove the SD card and try to boot. If you're headed towards recovery or bootloop after that then it's a win. Put the SD card back again and watch the new OS to boot.
PART 6: SWITCHING BETWEEN THE TWO
Extract the boot.img from the "Internal OS" zip file and put it together with recovery-old.img. To check if your old system is untouched type the following commands in fastboot mode:
Code:
fastboot flash recovery recovery-old.img
fastboot flash boot boot.img
fastboot boot system
Your device should take you back to the old one. Surprised? Now let's make a switch between the two. There are two methods.
METHOD 1: USING FLASHIFY
Create two folders in your SD card. Put boot.img and recovery-old.img to one and boot-new.img and recovery-new.img to the other. To switch to the external OS, just flash boot-new.img as boot and recovery-new.img using flashify. Ignore reboot now dialog and reboot directly to the system. To go back, first install flashify in the new OS and flash boot.img and recovery-old.img. Easy right?
METHOD 2: USING ZIPS
I'm gonna tell you that tomorrow as I can write no more today.
More to come....
CREDITS:
justzzshadz from MIUI forum for this revolutionary concept. @iamsubhranil for adding TWRP, Flashify support and completely rewriting the tutorial.
Thank u so much for ur efforts... It helps me a lot
I don't understand members on xda ...why they don't give thnaks on thread ..they only see the thread and go away...
Sry 4 my english ..
Thanks again
---------- Post added at 08:07 AM ---------- Previous post was at 07:48 AM ----------
Pls lemme know that if i can use dsixda's kitchen for modifying boot.img (kernal ) ???
Coz i didn't find bootimg.exe tool... If u have then pls give me the link.
Thanks
yes you can use android kitchen
When You Will Continue Writing The Thread Im Really Interested in trying it
Faisal Z Ahmad said:
When You Will Continue Writing The Thread Im Really Interested in trying it
Click to expand...
Click to collapse
I will after a while as I'm having final exams you can still try with flashify bro
sc123001.11 said:
Thank u so much for ur efforts... It helps me a lot
I don't understand members on xda ...why they don't give thnaks on thread ..they only see the thread and go away...
Sry 4 my english ..
Thanks again
---------- Post added at 08:07 AM ---------- Previous post was at 07:48 AM ----------
Pls lemme know that if i can use dsixda's kitchen for modifying boot.img (kernal ) ???
Coz i didn't find bootimg.exe tool... If u have then pls give me the link.
Thanks
Click to expand...
Click to collapse
http://forum.xda-developers.com/redmi-1s/general/guide-unpack-repack-kernel-t2908458
Most comfortable
iamsubhranil said:
I will after a while as I'm having final exams you can still try with flashify bro
Click to expand...
Click to collapse
Yeah I Know I Can Try But i Need To Know Method 2 To Switch ROMS Because Second One Is Faster Using Zips Otherwise Great Post And Guide ,Thank You
Good Luck With Your Exams
Nice tutorial.
Dual boot for Mediatek devices is so easy to me. But I don't have any idea for Other devices like Samsung or Sony.
When I bought some SD Card, I'll try this one.
Keep it up!
Faisal Z Ahmad said:
Yeah I Know I Can Try But i Need To Know Method 2 To Switch ROMS Because Second One Is Faster Using Zips Otherwise Great Post And Guide ,Thank You
Good Luck With Your Exams
Click to expand...
Click to collapse
Thanx a lot
BTW flashify is also very convenient method
1)Just choose boot image from the option
2)Find and select the internal or external boot image to boot
3)Have a normal reboot
jbliz said:
Nice tutorial.
Dual boot for Mediatek devices is so easy to me. But I don't have any idea for Other devices like Samsung or Sony.
When I bought some SD Card, I'll try this one.
Keep it up!
Click to expand...
Click to collapse
This one is universal bro
iamsubhranil said:
This one is universal bro
Click to expand...
Click to collapse
I did not see you make any modification to boot.img.
Sry My bad. I didn't read at the top.
iamsubhranil said:
Thanx a lot
BTW flashify is also very convenient method
1)Just choose boot image from the option
2)Find and select the internal or external boot image to boot
3)Have a normal reboot
Click to expand...
Click to collapse
I am gonna try this anyway, maybe tomorrow
Because i want two ROMS mainly, one for CM cuz i love it, daily drivers and everday usage, second one mainly focused on battery life (when i don't use my device much)
Another Question ,How do I Flash Zips (from recovery) To A Specific ROM?
And I Have CM 12.1 And Im Using M5 Kernel so Where Do the Edit Goes?
Faisal Z Ahmad said:
Another Question ,How do I Flash Zips (from recovery) To A Specific ROM?
And I Have CM 12.1 And Im Using M5 Kernel so Where Do the Edit Goes?
Click to expand...
Click to collapse
The edit goes to the recovery. At the end of the process you'll have two different recovery files for two OSes. Flashing any zips via modified recovery will flash them straight to the new os. Switch between those recoveries as required. Read the TUT carefully.

[U-Boot/SD] External Recoveries (TWRP 2.8/3.0 & CWM) for Nook HD/HD+

These SD card images are built in same vein as @verygreen's here, except with a few differences:
Modified, and re-built the second bootloader (uImage) to present a menu of three recovery distributions: TWRP 3.0.0-0, 2.8.7.5, and original CWM.
Replaced the CM11 kernel therein (3.0.31) with my latest from Marshmallow. While this wasn't strictly necessary, the XZ compression helps the kernel image load faster (especially on slow SD cards).
Packaged the new TWRP RAM disks in a way that U-Boot can load them. The original ramdisk.cwm is left as was for whoever needs it.
The use is pretty standard: hold the Nook/Home button for the menu, otherwise it should boot directly into the new TWRP 3.0.0-0. People still on CM12 will need the customized 2.8.7.5 because of reasons discussed on that thread (e.g., LZMA, blockimage format). The files that were replaced completely are moved in the OLD folder, just in case. Assuming everything works well, these cards should be the only things needed to root/rescue/etc a Nook HD/HD+. Bug reports are enabled, in case major issues remain.
That being said, the images live in the experimental folder here, although they will probably be moved into the respective device folders soon.
XDA:DevDB Information
External Recoveries, Tool/Utility for the Barnes & Noble Nook HD, HD
Contributors
amaces, verygreen, fattire
Version Information
Status: Testing
Created 2016-02-14
Last Updated 2016-02-14
Reserved
Did fix messages make it through?+ new recovery trial
Sorry--I TRIED to send you a message by commenting on a couple of commits, and to attach an ovation uImage. Learning to program on Ubuntu, with repo, git, useing github, etc. all in a couple of months has me rather confused. I hope you got the message
Anyway, I just tried compiling a standard cm recovery to see if it would deal better with f2fs--I don't think it does, but other than coming up upside-down on hummingbird, it does at least come up from the sd card. I'll check into it further...
I note that when I tried to install a zip (internal twrp 3.0.0-0) from TWRP 3.0..0-0 on SD Card, I did get error messages about data, but somehow didn't manage to catch them in a log. ( I will try again, if you need me to). I think the install succeeded anyway. Does something need to be changed in the recovery.fstab for running from the SD Card?
Additional testing info
I've attached a recovery log from running sd card twrp 3.0.0-0 and installing a zip.. (which as, I've said I think succeeded) . Trying to do anything with data or cache will generate error messages in any of these recoveries. I also note they can't deal with selinux contexts, apparently. I don't think the new cm rom gives as much flexibility as TWRP or even CWM, except that it will reboot into the bootloader, but it would be easier to recompile ...
FWIW
belfastraven said:
I've attached a recovery log from running sd card twrp 3.0.0-0 and installing a zip.. (which as, I've said I think succeeded) . Trying to do anything with data or cache will generate error messages in any of these recoveries. I also note they can't deal with selinux contexts, apparently. I don't think the new cm rom gives as much flexibility as TWRP or even CWM, except that it will reboot into the bootloader, but it would be easier to recompile ...
FWIW
Click to expand...
Click to collapse
Feeling more stupid then usual:
Are these the instructions we use(using the current files) to create the sd card from the linked thread? Thanks
For new Installs:
Download the initial sdcard image
ungzip and write to sdcard using dd (winimage or whatever for those stuck on Windows)
Instert the card into your nook and reboot
Flash the recovery image
Flash cm11 image
Flash whatever other extra things you need like gapps
remove the sdcard
reboot the nook
prsa01 said:
Feeling more stupid then usual:
Are these the instructions we use(using the current files) to create the sd card from the linked thread? Thanks
For new Installs:
Download the initial sdcard image
ungzip and write to sdcard using dd (winimage or whatever for those stuck on Windows)
Instert the card into your nook and reboot
Flash the recovery image
Flash cm11 image
Flash whatever other extra things you need like gapps
remove the sdcard
reboot the nook
Click to expand...
Click to collapse
What are you trying to do--i.e. which rom are you trying to install and what is running now? (I am not sure to which linked thread you are referring) I want to make sure I give you the correct information. You will definitely make an SD Card, (it's how you do it and what you put on it I would like to clarify) And the steps following that will be the same.
I'm using Amaces great current CM MM rom (2/22) just wanting to create the recovery sd in this thread. The link I was referring to was to the verygreen thread in the OP
Thanks
prsa01 said:
Are these the instructions we use(using the current files) to create the sd card from the linked thread? Thanks
Click to expand...
Click to collapse
No. Make the SD. Card using the method in the howto thread.
I don't have the link handy...
Basically, format card to full size, set partition to active/bookable, uncompress the download, copy milo first (has to be first directory entry, first file written after formatting).
Then copy the rest of the files.
That gives an SD card that boots to recovery that can be used to flash/backup/restore EMMC.
Thanks ST Dog, just what I needed
New Sd Card recoveries available:
I have built new versions of the recoveries by @amaces in the OP.
I have fixed a few menu issues, e.g. the correct message about which recovery you choose will now come up and the the proper default (TWRP 3.0.0-0) will be highlighted. I ihave ncreased the amount of time you have to press the n (nook) key before the recovery defaults to TWRP (3.0.0-0) , and I have compiled a new version of TWRP (3.0.0-0). The older TWRP and CWM recoveries are the same: be aware that with CWM, if you have formatted data/and or cache with f2fs, CWM will throw off error messages that it cannot mount those partitions, (or wipe them), but you could still use it to install recoveries or zips. Opengapps is now recommending TWRP for installation.
the necessary files are available in two formats -
1.-a zip of a directory containing seven files. You need a fat32-partitioned and marked-bootable empty sdcard on which you copy the MLO file first, and than the remaining files in any order. You can then add whatever installation files you want to play with. You can add whatever zips/ .img files (with twrp) you wish to flash to the card.
2. -A zip of an .img file, which can be written to any unpartitioned card which is 4G or larger. (I understand that this .img may be necessary for mac people, but it also works for me from UBUNTU)
The Nook HD hummingbird version of this works fine for me. And although I don't have an ovation, a couple of intrepid testers have tried this and found that is works.
These are now available on Android File Host:
hummingbird
ovation
I will monitor this thread for problems at least every couple of days : if you mention @belfastraven in your message I will be notified. Please don't bother @amaces who has greatly helped me for with what are now MY mistakes .
In the near future I intend to increase the time you have to press the n(nook) key further, and to put up a version of TWRP 3.0.0-0 that can be used with a mouse, in case of touch screen problems.
here are now additional zips for both Hummingbird and Ovation that will allow you to boot recovery with a mouse and use the mouse to navigate in TWRP3 (in case of broken/malfunctioning touchscreen). If you already have one of the other recoveries set up, you should just be able to replace the kernel, or the kernel and ramdisk file (which is actually TWRP3 here) to achieve this result . You need to have a USB_OTG mouse. (that is, you need to use the nooks charging cable and an adapter to connect the mouse) I have forced USB-HOST on in this particular kernel. These devices don't charge with USB host forced on, I believe, so I wouldn't recommend making this a permanent option if you ever charge your device in recovery.
The ovation version has not yet been tested, but hummingbird works well.
xx
I'm going through OP's stuff, including his guide on CM 12.1. I picked up a free Nook HD from a coworker that currently has CM 10.2 and CWm 6.0.3.2 on it. Should I be using the TWRP and CM 12.1 builds in this experimental folder with the same installation guide or should I be using the stable builds in the hummingbird folder?
Can anyone help me replacing cyanoboot with unit? There's no clear indication of which files to use for the bootloader replacement. Thanks in advance for any and all help!!

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

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.
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.
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.
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).
jag9906 said:
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.
Click to expand...
Click to collapse
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.
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.
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.
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.
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.
jag9906 said:
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.
Click to expand...
Click to collapse
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 ._.
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.
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
stevenh512 said:
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
Click to expand...
Click to collapse
morpheous1777 said:
does anyone have a stock backup
Click to expand...
Click to collapse
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)
Click to expand...
Click to collapse
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.
leetree2001 said:
stevenh512 said:
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
Click to expand...
Click to collapse
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.
Click to expand...
Click to collapse
Have nothing to contribute right now.Just want to THANK all you guys for your unselfish work!!!
Sent from my LGLS770 using Tapatalk
Does anyone have the stock rom?? The recovery bricked my assurance n817.Please help
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.
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
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
slacker8135666 said:
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
Click to expand...
Click to collapse
Sent from my LGLS770 using Tapatalk

Categories

Resources