Nexus 5 F2FS Tools - Nexus 5 Android Development

EDIT 05 September 2014: Added fstab.hammerhead formatted for f2fs-all and f2fs-data for those who wish to manually replace the ramdisk's fstab.hammerhead in a kernel to mount the partitions as f2fs.
NOTE: This will only work on kernels that have f2fs tools commited to their kernel image. Make sure the kernel you wish to modify has F2FS support otherwise it WILL NOT WORK!
22 July 2014: Made changes to the Android Kitchen to retain the USB stick mount.
16 July 2014 If you have used any previous version of F2FS ROM CONVERTER prior to the date, please update to the latest version in the links below to correct major errors, to put more fault checks in place and provide better instructions for non Nexus 5 devices to use. Version number is in the Window Title from v0.3.
First off I have to say that I did not create any of these tools but rather I brought them together and I modified them to make it straight forward and easier to format the partitions as F2FS, make a ROM F2FS-ALL and modify a kernel for F2FS-ALL or just F2FS-DATA.
I would suggest you click on each link and click Thanks for each of them.
Thanks and links to the original authors and software.
Hammerhead FSTAB files formatted for F2FS-ALL and F2FS-DATA
Note1: Rename the desired file to fstab.hammerhead to replace the exisiting one in the ramdisk.
Note2: Use Android Image Kitchen to unpack and repack a kernel file (boot.img) during which you can replace the fstab.hammerhead
Note3: Some kernels' updater-script mounts /system or /data as EXT4. Therefore it needs to be modified from the original and added back to the zip.
e.g. Change mount("ext4", "EMMC", "/dev/block/platform/msm_sdcc.1/by-name/system", "/system"); to run_program("/sbin/busybox", "mount", "/system");
and change mount("ext4", "EMMC", "/dev/block/platform/msm_sdcc.1/by-name/userdata", "/data"); to run_program("/sbin/busybox", "mount", "/data");
Link: http://d-h.st/l87
Download: follow above link
Thanks: kdh2834
Tool: F2FS and F2FS-ALL kernels modified by kdh2834 with help on how to do it. (Actually it was because of him I can now get my N5 running with a full F2FS-ALL ROM and kernel)
Link: http://forum.xda-developers.com/showpost.php?p=52550395&postcount=1
Thanks: osm0sis
Tool: Android Image Kitchen (for unpacking and repacking a kernel)
Link: http://forum.xda-developers.com/showpost.php?p=36067074&postcount=1
Download my version: http://d-h.st/E74
Thanks: TeamWin
Tool: TWRP recovery for formatting the partitions as F2FS (use the latest version)
Note: It can also show the format of a partition in Wipe -> Advanced Wipe
Link: http://techerrata.com/browse/twrp2/hammerhead
Download follow above link
Thanks: Phil3759 and to rootSU for the Nexus builds
Tool: Philz touch recovery for formatting the partitions as F2FS (use the latest version)
Link: http://forum.xda-developers.com/showpost.php?p=48377548&postcount=1
Download: follow above link
Thanks: legolas93's FormatPartitions.zip
Note: These flashable zips need one of the above recoveries to work
Tool: Flashable zips to format the partitions automatically
Link: http://forum.xda-developers.com/showthread.php?t=2678140
Download my version to format all partitions to F2FS: http://d-h.st/RCz
Download my version to format the data partition to F2FS: http://d-h.st/2AI
Thanks: NABENDU1 for F2FS ROM CONVERTER
Note: Mine has been heavily modified for Nexus 5 phones but can be used by any device
Link: http://forum.xda-developers.com/showpost.php?p=52201672&postcount=1
Tool: F2FS ROM Converter v0.5 to make a flashable ROM with F2FS support.
Download my version: http://d-h.st/Uiq
EDIT: Latest version (v0.5) replaced the AOSP F2FS-ALL kernel (boot-f2fs-all.img) as it was not fully F2FS-ALL compatible. Previous version still had /cache partition as EXT4
EDIT: Latest version (v0.4) has support for Slimkat and similar ROMs that need to mount the /data partition.

Instructions
Note: The following steps can be done in any order EXCEPT that step 1. must be done before step 2.
1. Install one of the recoveries.
Note1: If you are on a stock recovery and your phone is locked you will need to backup everything first!
Note2: There is a flashable zip to lock and unlock the boot loader without formatting (only after initial unlock) and Philz Touch Recovery has a password lock as well if you are concerned about security.
WARNING: Before doing the below step, backup your ROM AND your DATA on your sdcard as it will be formatted!
Suggestion: Do an adb pull.
2. Format the partitions using the flashable zips.
3. Use the Android Image Kitchen I provided to modify a kernel with F2FS support. Drag and drop the boot.img on 1_mod_f2fs_kernel.bat file and just follow the instructions.
The kernel can then be installed by sideloading the zip file (see step 4.) or using fastboot from the bootloader (e.g. fastboot flash boot boot.img)
4. Use the F2FS Converter I provided to convert a ROM to mount the /system with a F2FS partition
The ROMs flashable zip will have to be sideloaded (In Philz Touch go to Install Zip -> Install zip from sideload, / In TWRP click Advanced -> ADB Sideload)
Note1: Only needs to be used with a F2FS-ALL kernel.
Note2: There is an option to use your preferred F2FS-ALL kernel as opposed to the default ones.
EDIT: Added which batch script to drop the image file onto in step 3.

Thanks, makes it easy for lazy people like me. Will use it later and let you know how it went.
Sent from my Nexus 5 using XDA Premium 4 mobile app

Волк said:
Thanks, makes it easy for lazy people like me. Will use it later and let you know how it went.
Sent from my Nexus 5 using XDA Premium 4 mobile app
Click to expand...
Click to collapse
If I missed anything let me know although I tested it to make sure it worked for myself.
Please remember to do a sdcard backup on to your computer. The backups from the the custom recoveries does not back up the sdcard.

Any devs working on a similar method for sgh-I747?
Sent from my SAMSUNG-SGH-I747 using XDA Premium 4 mobile app

aircooledbusses said:
Any devs working on a similar method for sgh-I747?
Sent from my SAMSUNG-SGH-I747 using XDA Premium 4 mobile app
Click to expand...
Click to collapse
I found a TWRP recovery that should support f2fs for your i747 here:
http://techerrata.com/browse/twrp2/d2att
Download the latest version.
Or you can use Philz Touch Recovery but it seems like you will need to build it yourself (if you know how)
Backup everything and move the backups to a computer.
And run one of the format tools according to which partitions will have F2FS (only /data f2fs-data OR /system /data & /cache f2fs-all)
I found one kernel that supports F2FS, there are probably others.
http://forum.xda-developers.com/showthread.php?t=2390147
To answer your question: I am not sure. I am just sharing what I did to make my life easier with others.
These tools will not work for your i747 as they are but I will look into what I can modify to make it work for yours and you can tell me if it works.
If you are getting problems I will see what I can do to help if I have the time.
I will post something when I can.

F2FS-ALL Kernels
You can check http://forum.xda-developers.com/google-nexus-5/development/kernel-f2fs-modified-kernels-t2746951 for some kernels.
The CM kernel was modified by me for F2FS-ALL
You can get it here:
http://d-h.st/1rS
I have modified the ElementalX kernel (ElementalX-N5-1.02-cm.zip) to F2FS-ALL.
Original kernel is here:
http://forum.xda-developers.com/showpost.php?p=47286518&postcount=1
Note1: You need to install the CM kernel above first as the Elemental X uses the ramdisk of the current working kernel, which in this case has the fstab.hammerhead with the f2fs information.
Note2: I had to modify the mount command as well in the updater-script from this:
mount("ext4", "EMMC", "/dev/block/platform/msm_sdcc.1/by-name/system", "/system");
to this:
run_program("/sbin/busybox", "mount", "/system");
You can get the working ElementalX 1.02cm F2FS-ALL version here:
http://d-h.st/oEt
Chaos Kernel v13.0 July 08 (nightly) F2FS-ALL - http://d-h.st/h3H

nice! this collection of tools might have me finally trying f2fs on my Nexus5...
however, I've set my sights on this kernel http://forum.xda-developers.com/google-nexus-5/development/kernel-t2697951
there seems to be no interest to include f2fs support by default, could I perhaps ask for you to add it and compile? :angel:
I'm currently on stock 4.4.4 and faux kernel. but from what I read faux causes issues on f2fs-all, right? and other kernels I've looked at don't seem attractive enough to me... is there pure 4.4.4 stock with f2fs-all added? ^^ I found only 4.4.2 stock kernel.
Also... if I backup my /data can I restore it later onto f2fs partition? so I don't have to start from scratch and install/update apps?
no biggie, just wondering on this one.
thanks alot! :silly:

GizmoTheGreen said:
nice! this collection of tools might have me finally trying f2fs on my Nexus5...
however, I've set my sights on this kernel http://forum.xda-developers.com/google-nexus-5/development/kernel-t2697951
there seems to be no interest to include f2fs support by default, could I perhaps ask for you to add it and compile? :angel:
I'm currently on stock 4.4.4 and faux kernel. but from what I read faux causes issues on f2fs-all, right? and other kernels I've looked at don't seem attractive enough to me... is there pure 4.4.4 stock with f2fs-all added? ^^ I found only 4.4.2 stock kernel.
Also... if I backup my /data can I restore it later onto f2fs partition? so I don't have to start from scratch and install/update apps?
no biggie, just wondering on this one.
thanks alot! :silly:
Click to expand...
Click to collapse
I will look at that kernel later.
If you backup it up using an adb pull, that's what I did not sure about the custom recovery backups as they usually name the backups according to the format, at least for Philz Touch Recovery.
In regards to the stock 4.4.4 with f2fs-all, I just had up a post about that.
Here it is: http://forum.xda-developers.com/showthread.php?t=2791580

GizmoTheGreen said:
nice! this collection of tools might have me finally trying f2fs on my Nexus5...
however, I've set my sights on this kernel http://forum.xda-developers.com/google-nexus-5/development/kernel-t2697951
there seems to be no interest to include f2fs support by default, could I perhaps ask for you to add it and compile? :angel:
I'm currently on stock 4.4.4 and faux kernel. but from what I read faux causes issues on f2fs-all, right? and other kernels I've looked at don't seem attractive enough to me... is there pure 4.4.4 stock with f2fs-all added? ^^ I found only 4.4.2 stock kernel.
Also... if I backup my /data can I restore it later onto f2fs partition? so I don't have to start from scratch and install/update apps?
no biggie, just wondering on this one.
thanks alot! :silly:
Click to expand...
Click to collapse
Sorry about the kernel but I only change the ramdisk to set which partitions are to boot with F2FS. So if it doesn't already support F2FS I don't know how to add it. I am relatively new to linux and android. I will like to setup a build environment and learn how to build the kernels and ROMs myself but I have been procrastinating as I need to free up some space on a drive.
Some kernels have the support but are not set up to boot the partitions. I am skimming the forums looking for different kernels to try.
At the moment I am using a CM (CAF based) kernel although there are a lot more ASOP kernels. I will try going to stock to try out some of them.

Huge time reduction!
Thank you for your mod.

Thanks for the great tools!
Could you please provide the modified f2fs-all Elemental X kernel you mentioned earlier? You seemed to have forgotten to post it.

mzheng086 said:
Thanks for the great tools!
Could you please provide the modified f2fs-all Elemental X kernel you mentioned earlier? You seemed to have forgotten to post it.
Click to expand...
Click to collapse
It is in post #7 but it is the caf version. Or did you want the AOSP version?

dechronic said:
It is in post #7 but it is the caf version. Or did you want the AOSP version?
Click to expand...
Click to collapse
I might have missed something obvious. In that case, please point it out to me. In post #7, I only see a link to the original thread of Elemental X kernel, and two links to the modified CM11 kernel. But there is no link to modified Elemental X kernel.

mzheng086 said:
I might have missed something obvious. In that case, please point it out to me. In post #7, I only see a link to the original thread of Elemental X kernel, and two links to the modified CM11 kernel. But there is no link to modified Elemental X kernel.
Click to expand...
Click to collapse
Oh shoot you are right. I don't how come I posted the same kernel twice. Uploading it now. I will edit that post and copy the link into the next post once I am done and I also have a link for Chaos-Kernel_v13.0-[07-08]-[11-16]-f2fs-all.zip (nightly) which I will post shortly too.

---Copied from Post #7--
You can get the working ElementalX 1.02cm F2FS-ALL version here:
http://d-h.st/oEt
Chaos Kernel v13.0 July 08 (nightly) - http://d-h.st/h3H

I tried your version of the tools on CharizardX (AOSP) kernel and this 4.4.4 stock rom. http://forum.xda-developers.com/goo...-android-4-4-3-ktu84m-rooted-busybox-t2557523
it failed to mount my data partition and I got a 128mb temp ramdrive at each boot... not sure what went wrong.
temp booted cwm recovery to reformat back to 4ext and then philz to restore my backup from usb drive, so I'm back at a working system...
edit:working now with your kernelupload in the other thread, but I can't seem to get superuser working, flashing koush's superuser via .zip. also I et a bootloop running antutu... probably kernel. what AOSP kernel do you recommend? I'd love to use faux's but last I heard there was trouble with wifi for some reason...

GizmoTheGreen said:
I tried your version of the tools on CharizardX (AOSP) kernel and this 4.4.4 stock rom. http://forum.xda-developers.com/goo...-android-4-4-3-ktu84m-rooted-busybox-t2557523
it failed to mount my data partition and I got a 128mb temp ramdrive at each boot... not sure what went wrong.
temp booted cwm recovery to reformat back to 4ext and then philz to restore my backup from usb drive, so I'm back at a working system...
edit:working now with your kernelupload in the other thread, but I can't seem to get superuser working, flashing koush's superuser via .zip. also I et a bootloop running antutu... probably kernel. what AOSP kernel do you recommend? I'd love to use faux's but last I heard there was trouble with wifi for some reason...
Click to expand...
Click to collapse
Honestly, I only just started using F2FS in the last week or so. I haven't tried an AOSP Roms yet to try out the AOSP kernels.
I just downloaded Slimkat as the script mounts the /data partition as well, so I have modify my script to account for that. I will try out some AOSP kernels that I will mod for F2FS-ALL and let you know what I got to work.

dechronic said:
I just downloaded Slimkat as the script mounts the /data partition as well, so I have modify my script to account for that. I will try out some AOSP kernels that I will mod for F2FS-ALL and let you know what I got to work.
Click to expand...
Click to collapse
You should be able to remove that mount if the user already has /data on f2fs, since data isn't normally formatted, and hence fully wiped and unmounted. If the user is migrating to f2fs, then, yes that would need to be changed. Also, ROM scripts format /system to ext4, which has to be removed or changed to the f2fs command.
Sent from my Nexus 5 using XDA Premium 4 mobile app

Волк said:
You should be able to remove that mount if the user already has /data on f2fs, since data isn't normally formatted, and hence fully wiped and unmounted. If the user is migrating to f2fs, then, yes that would need to be changed. Also, ROM scripts format /system to ext4, which has to be removed or changed to the f2fs command.
Sent from my Nexus 5 using XDA Premium 4 mobile app
Click to expand...
Click to collapse
The script searches for the mount /data command because as was pointed out to me, some ROM scripts mount it. Particularly Slimkat. It only changes it if it finds it. Otherwise it is ignored. If the the ROM is selected to be reconfigured as F2FS-ALL then it looks for any format /system, mount /system and mount /data commands. If is set to reconfigured as F2FS-DATA then only the /data is mounted as F2FS if required by the ROM's updater script
Sent from my Nexus 5 using XDA Free mobile app

Related

F2FS | Improved I/O Performance on /data

For those who don't know what F2FS is, check these links out:
General info
Benchmarks
Warnings
1. Make sure you have a standard kernel for backup that uses ext4 just in case. If anything goes wrong, just install the backup kernel and reboot to recovery.
2. You will have to wipe your /data and /cache partitions for this. Basically factory reset.
3. For 2, you could try to backup data and restore after formatting. I haven't tried this but I could work.
Instructions to format /cache and /data as F2FS:
1. Boot into recovery
2. Install this kernel with F2FS CWM recovery
3. Reboot to recovery again
4. Go to 'Mounts and Storage'
5. Enable "toggle f2fs <-> ext4 migration"
6. Format /data and /cache to F2FS
7. Reboot
And now you have F2FS on /data and /cache :]
To install a new ROM that is not F2FS compatible, edit the updater-script as follows:
1. Replace strings
"mount("ext4", "EMMC", "/dev/block/mmcblk0p3", "/system");"
with string
"run_program("/sbin/busybox", "mount", "/system");"
2. Replace string
"format("ext4", "EMMC", "/dev/block/mmcblk0p3", "0", "/system");"
with string
"run_program("/sbin/mkfs.f2fs", "/dev/block/mmcblk0p3");"
Note: this string needs this patch in ROM
3. Add string
"run_program("/sbin/busybox", "mount", "/data");"
after strings
"run_program("/sbin/mkfs.f2fs", "/dev/block/mmcblk0p3");"
"run_program("/sbin/busybox", "mount", "/system");"
4. Add string
"unmount("/data");"
before string
unmount("/system");
what the benefit of this?
@up
if you read the links you will understand...
Seems faster... and using much more the /cache partition...
zipperX said:
what the benefit of this?
Click to expand...
Click to collapse
Read the first 2 links, mainly the 2nd one. It delivers better I/O performance than what ext4 has to offer.
monstro78 said:
@up
if you read the links you will understand...
Seems faster... and using much more the /cache partition...
Click to expand...
Click to collapse
It uses more /cache because it is a log-based filesystem
For install rom updates, the steps from install this kernel is always format data and cache?
Thanks by advance.
AtEExll
Sent from my GT-I8160 powered by CyanogenMod 11
AtEExll said:
For install rom updates, the steps from install this kernel is always format data and cache?
Thanks by advance.
AtEExll
Sent from my GT-I8160 powered by CyanogenMod 11
Click to expand...
Click to collapse
if you have already formatted to f2fs before, all you have to do is install this kernel again after installing the rom.
@zwliew Only /data for now? How about /system too?
exodius48 said:
@zwliew Only /data for now? How about /system too?
Click to expand...
Click to collapse
i'll work on it. probably have it done within a few days :]
when I try to format my cache partition I always get an error, that formatting was not possible.
also now im not able anymore to write on my /system partition. installing zips and restoring backups are always cancelled... sh***
S.AMU said:
when I try to format my cache partition I always get an error, that formatting was not possible.
also now im not able anymore to write on my /system partition. installing zips and restoring backups are always cancelled... sh***
Click to expand...
Click to collapse
Try re-partioning using this technique http://forum.xda-developers.com/showthread.php?t=2596521
or reflashing via ODIN.
zwliew said:
2. Install this kernel with F2FS CWM recovery
Click to expand...
Click to collapse
Hello! Where I can download separated F2FS CWM image?
ChronoMonochrome said:
Hello! Where I can download separated F2FS CWM image?
Click to expand...
Click to collapse
i believe we don't have separate recovery and boot partitions
zwliew said:
i believe we don't have separate recovery and boot partitions
Click to expand...
Click to collapse
I meant *.cpio image.
ChronoMonochrome said:
I meant *.cpio image.
Click to expand...
Click to collapse
lol i didn't think someone would want that. anyway i don't have it anymore.
zwliew said:
lol i didn't think someone would want that. anyway i don't have it anymore.
Click to expand...
Click to collapse
Is there any way to getting *.cpio image except compiling it from source? I can't extract initramfs from your kernel with f2fs support because it's compiled with LZ4 compression.
zwliew said:
anyway i don't have it anymore.
Click to expand...
Click to collapse
But why f2fs support hasn't been added in your newest kernel releases? it's unstable?
It's possible to format /system as F2FS also or not at the moment ?
No way ??!!!
And: can i use this Kernel for formatting F2FS on my codinap Device ?? Or that will be a brick ?
Many Thanks !!

[bacon][CWM Advanced Edition] PhilZ Touch

Main thread + features + install instructions + dev support
http://forum.xda-developers.com/showthread.php?t=2201860
PhilZ Touch is a CWM Advanced Edition that adds all the features you could ever miss in CWM
It is a well proven recovery for many phones
It also adds a full touch interface a completely configurable GUI
Please give your feedback, what works, and any bug you could encounter
Read the features, and check if you are missing something
Also, do not forget to read about the powerful aroma file manager integration and double tap shortcut
Credits
Phil3759 for his awesome recovery
Koush for having created and maintaining cwm
Cyanogenmod for making all this possible
Android-Andi for helping with aroma issue
XDA:DevDB Information
[bacon][CWM Advanced Edition] PhilZ Touch, Tool/Utility for the ONEPLUS ONE
Contributors
katinatez
Version Information
Status: Stable
Current Stable Version: 6.59.4
Stable Release Date: 2015-09-22
Last Updated 2015-09-22
This is flashable through custom recovery, if you prefer fastboot commands extract recovery.img
Code:
adb reboot bootloader
fastboot flash recovery recovery.img
fastboot reboot
Changelog​
Code:
[SIZE="4"]
2015-09-22
Updated 6.59.4
Fixed backup of LOGO partition
2015-09-21
Updated 6.59.3
Added f2fs to system partition
to support 3 partition f2fs backup
2015-05-18
Updated 6.59.2
updated f2fs with Jaegeuk Kim repo
[URL="https://git.kernel.org/cgit/linux/kernel/git/jaegeuk/f2fs.git/log/?h=linux-3.4"]https://git.kernel.org/cgit/linux/kernel/git/jaegeuk/f2fs.git/log/?h=linux-3.4[/URL]
Backup Firmware all 8 partitions, and modem partition named firmware
/dev/block/platform/msm_sdcc.1/by-name/modem /firmware
Compatible backup & restore with unofficial twrp v2.8.6.1 in Philz twrp mode
cm-12.1 kernel
exfat kernel support
f2fs data & cache in fstab
/dev/block/platform/msm_sdcc.1/by-name/userdata /data f2fs rw,noatime,nosuid,nodev,discard,nodiratime,inline_xattr,inline_data,nobarrier,active_logs=4 wait,check,encryptable=/dev/block/platform/msm_sdcc.1/by-name/reserve4
/dev/block/platform/msm_sdcc.1/by-name/cache /cache f2fs rw,noatime,nosuid,nodev,discard,nodiratime,inline_xattr,inline_data,nobarrier,active_logs=4 wait,check
2015-01-31
Updated 6.59.1
switched to cm-12.0 kernel for faster loading
updated recovery.fstab
updated f2fs commits
2014-12-14
6.59.0
add larger font, thanks [user=2661222]@xiaolu[/user]
2014-10-26
6.58.8
Added CM fix for persist partition
Added backup/restore of persist partition
2014-10-13
6.58.7: Source Update and Fixes
merge NTFS sources into recovery
add NTFS check binary (ntfsfix)
compile NTFS binaries as libraries and link them to recovery binary
spares 500Kb space
fix compile error when NTFS is disabled
2014-10-11
Update to developers: v6.58.4
Fixes building errors and issues related to new CyanogenMod changes
2014-10-05
Update 6.58.0
libtouch_gui 1.42
CWM 6.0.5.1
update sources
Fix display turned off on auto dim timer:
Some devices, like Motorola and Nexus, have their screen turned off is brightness is set to 0
add option to define min brightness value at compile time
by default, min brightness value is now 10 instead of 0
2014-09-18
6.57.9
fix install in "Free Browse Mode" from non vold managed volumes
2014-09-14
Update v6.57.8
CWM 6.0.5.1
fix for ROM OTA updates generating two install scripts (openrecovery + extendedcommands)
merge CWM updates to selinux permissions for init services
fix adb for 3.10 kernel
2014-09-13
Faster boot
Fixed usb-otg
Updated F2FS version 3.4.y
2014-09-03
6.57.5
Full F2FS Support
format,mount,read f2fs
Initial Release
2014-08-28
6.57.5
CWM 6.0.5.0
libtouch_gui 1.41
Aroma File Manager fixed
Screenshots fixed
EFS backup
[/SIZE]
DOWNLOADS
Android File Host
​
I added a couple of more recoveries I built here, but there will be seldom updates if any.
CWM Full Touch recovery now supports aroma file manager loading.
And stock bacon recovery has been updated, it's here for those who want to take it back to stock recovery​
Thanks @katinatez
Thanks!
But this recovery can't mount f2fs. The log show
can't mount /data
cant' mount /system
can't mount /cache
And i cannot flash anything.
F2fs support in recovery kernel will be back?
gulp79 said:
Thanks!
But this recovery can't mount f2fs. The log show
can't mount /data
cant' mount /system
can't mount /cache
And i cannot flash anything.
F2fs support in recovery kernel will be back?
Click to expand...
Click to collapse
I was afraid of that, so f2fs is needed in recovery kernel then correct? Need more time at the moment use previous version with ak kernel then.
katinatez said:
I was afraid of that, so f2fs is needed in recovery kernel then correct? Need more time at the moment use previous version with ak kernel then.
Click to expand...
Click to collapse
Yes, is needed in kernel. Btw at the moment you can put 2 versions, until a kernel with aroma and f2fs will be available. Have you tried to ask @ak to add aroma fix to his kernel? Or maybe @Dees_Troy can add f2fs support.
gulp79 said:
Yes, is needed in kernel. Btw at the moment you can put 2 versions, until a kernel with aroma and f2fs will be available. Have you tried to ask @ak to add aroma fix to his kernel? Or maybe @Dees_Troy can add f2fs support.
Click to expand...
Click to collapse
@johnnyslt said he would help patch the f2fs, just give us time.
Del
radzmin said:
Del
Click to expand...
Click to collapse
Don't understand. What is the question?
katinatez said:
Don't understand. What is the question?
Click to expand...
Click to collapse
Me too[emoji12]
By the way, whats the difference? This works on s4 i9505 right?
katinatez said:
This is flashable through custom recovery, if you prefer fastboot commands extract recovery.img
Click to expand...
Click to collapse
Would you detail your fix for Aroma?
Maybe we could patch aroma sources hopefully
Also, please rename your files so that they fit in goo host
Many third party apps rely on the naming to update recovery images
Phil3759 said:
Would you detail your fix for Aroma?
Maybe we could patch aroma sources hopefully
Also, please rename your files so that they fit in goo host
Many third party apps rely on the naming to update recovery images
Click to expand...
Click to collapse
All I did was to follow your instructions to compile with other kernels! But I should have started with twrp kernel instead! I also unpacked Dees_Troy, dr87 , KINGbabasula twrp recoveries because they all loaded aromafm.zip. After comparison I added rpm, tz, aboot into recovery.fstab. Compiled with Dees_Troy twrp kernel & dt.img and success.
Also changing naming convention of zip files. Sorry about that
radzmin said:
Me too[emoji12]
By the way, whats the difference? This works on s4 i9505 right?
Click to expand...
Click to collapse
Will not work on s4, your in one plus one forum.
Bah, time and date still borked. My backups are a mess. Does twrp also have this issue?
Mr Woolf said:
Bah, time and date still borked. My backups are a mess. Does twrp also have this issue?
Click to expand...
Click to collapse
Set up your time in options...
gulp79 said:
Set up your time in options...
Click to expand...
Click to collapse
Tried it mate, won't stick. Time was fine on my s3 using philz - have never managed to get it to work on my OnePlus though.
Mr Woolf said:
Tried it mate, won't stick. Time was fine on my s3 using philz - have never managed to get it to work on my OnePlus though.
Click to expand...
Click to collapse
Try with options, have you enabled battery clock? In the options there are some flag to set. For me works, I've to set up time only after option reset
Mr Woolf said:
Bah, time and date still borked. My backups are a mess. Does twrp also have this issue?
Click to expand...
Click to collapse
Correct settings is time settings/Qualcomm time daemon. That should fix your time.
katinatez said:
All I did was to follow your instructions to compile with other kernels! But I should have started with twrp kernel instead! I also unpacked Dees_Troy, dr87 , KINGbabasula twrp recoveries because they all loaded aromafm.zip. After comparison I added rpm, tz, aboot into recovery.fstab. Compiled with Dees_Troy twrp kernel & dt.img and success.
Also changing naming convention of zip files. Sorry about that
Click to expand...
Click to collapse
:good:
As I thought, the issue is Aroma is no more compatible with many CM kernels
I am not sure about the exact missing part though as I never had an affected device

[Dev][Guide][JB+KK] Dedicated recovery/boot.cpio partition

Hi there!
Today I finally found how to make our codinas' kernels universal, i.e. allow to install kernel on whatever ROM and finally separate recovery from kernel. It's well known, bootloader decides what will be loaded - kernel or recovery. That probably may explain why AnyKernel installer(or other similar) doesn't work on codina, because we can't move recovery partition anywhere.
But there is also a little trick that allow us load recovery and boot.cpio from different partition - https://github.com/ChronoMonochrome/Chrono_Kernel/commit/df9094f1f12618ad9599da266792d6b2f8106170 - just an another approach
Don't worry, we won't touch bootloader at all.
As can be seen, /dev/block/mmcblk0p17 (kernel2 partition) will be used for storing recovery.cpio and boot.cpio. On stock that may not work (I don't know for what exactly uses Kernel2 partition, besides of manually restoring of kernel1 partition. I only know that is almost useless on custom ROMs, and we can use it as we want )
First do some preparations:
Download this kernel and needed recovery/boot scripts(4.4.x.cpio.zip, 4.4.x_f2fs.cpio.zip, etc... 4.4.x.cpio means that it support only ext4) from my google drive (folder ramdisks), unzip recovery (twrp or cwm) and rename to recovery.cpio, then move it to external SD card. Then do it with boot scripts that you've downloaded (e.g. 4.4.x_f2fs.cpio.zip - unzip and rename to boot.cpio)
Well, that all that needs for installation. Read following instruction very carefully, otherwise that may cause brick Keep in mind, all that you do at your own risk! I'm not responsible if you brick your phone!
Installation method:
1) reboot into recovery, plug your phone to your PC, enable adb:
Code:
adb shell
2) Format kernel2 partition to ext4 file system:
Code:
mke2fs -T ext4 /dev/block/mmcblk0p17
Think twice before you hit 'enter' button - wrong command may cause hardbrick!
3) create /ramdisk folder and mount kernel2 partition
Code:
mkdir /ramdisk
mount -t ext4 /dev/block/mmcblk0p17 /ramdisk
move your recovery.cpio and boot.cpio to this folder, give 777 permissions:
Code:
chmod 777 /ramdisk/recovery.cpio
chmod 777 /ramdisk/boot.cpio
4) install downloaded kernel
Now you can change recovery via changing /ramdisk/recovery.cpio - just make a backup of this file, and then replace with one of another recoveries. If you want to install another ROM or change filesystem of partition then replace /ramdisk/boot.cpio with one of needed boot scripts. Don't forget to give 777 permission (probably 644 is enough, but I didn't test it) to both of these files.
This method tested and working on 4.4.x TC ROM + twrp recovery + kernel with full F2FS support.
Well, now it's time to create uncompressed kernel, that may slightly decrease the boot time
@ChronoMonochrome
Thanks. do you mean that kernel2 partition is useless in stock and cyanogenmod firmware?
Is it right that boot loader will read kernel1 partition then it will read system partition? and kernel2 is not necessary for booting?
I have installed new universal kernel (2.5) , so I flashed new ramdisk for 4.4.x , can I roll back to older versions or stock firmware with this ramdisk or I should restore Partition17 backup?
sorset said:
@ChronoMonochrome
Thanks. do you mean that kernel2 partition is useless in stock and cyanogenmod firmware?
Click to expand...
Click to collapse
As it turned out, it's unneeded even on stock. So if you won't restore kernel2 partition, nothing will happen.
Is it right that boot loader will read kernel1 partition then it will read system partition? and kernel2 is not necessary for booting?
I have installed new universal kernel (2.5) , so I flashed new ramdisk for 4.4.x , can I roll back to older versions or stock firmware with this ramdisk or I should restore Partition17 backup?
Click to expand...
Click to collapse
Yes, you can roll back to usual kernels. it doesn't matter what written on kernel2 partition - real kernel or anything else...
ChronoMonochrome said:
As it turned out, it's unneeded even on stock. So if you won't restore kernel2 partition, nothing will happen.
Click to expand...
Click to collapse
Ok, thanks , But why do you mount kernel2 partition inside of OS? As I understand boot.cpio is necessary before booting OS . And inside of OS is just an extra storage! (is that true?)
sorset said:
And inside of OS is just an extra storage! (is that true?)
Click to expand...
Click to collapse
Yes and no, is 16 Mb big enough to be called "storage"? I did it, just to be able replace ramdisks even without booting to recovery. But newest boot scripts doesn't have it.
Ace 2 has 15 - 20 Partitions my Friend
ace2nutzer said:
Ace 2 has 15 - 20 Partitions my Friend
Click to expand...
Click to collapse
And what ? We actually talking about kernel2 partition.
ChronoMonochrome said:
And what ? We actually talking about kernel2 partition.
Click to expand...
Click to collapse
sorry, i meant @sorset
ChronoMonochrome said:
Yes and no, is 16 Mb big enough to be called "storage"? I did it, just to be able replace ramdisks even without booting to recovery. But newest boot scripts doesn't have it.
Click to expand...
Click to collapse
You are right , but I remember days that 1.44MB floppy disk was a large STORAGE and 16MB was HUGE
sry , I have another question , So can I remove its line from fstab to prevent mounting?
I'm confused
boot.img in kernel archive is recovery image that will extract on partition15 (kernel) , but what recovery.cpio exactly is that yu copy on partition17 (kernel2) ?
ace2nutzer said:
Ace 2 has 15 - 20 Partitions my Friend
Click to expand...
Click to collapse
Yes,With counting internal storage , 17 exactly , but thats not the point , I'm afraid.
sorset said:
sry , I have another question , So can I remove its line from fstab to prevent mounting?
Click to expand...
Click to collapse
just redownload bootscripts(kernel/ramdisks), as I said, newest scripts doesn't mount kernel2 partition.
boot.img in kernel archive is recovery image that will extract on partition15 (kernel) , but what recovery.cpio exactly is that yu copy on partition17 (kernel2) ?
Click to expand...
Click to collapse
I don't get it rephrase please
ChronoMonochrome said:
just redownload bootscripts(kernel/ramdisks), as I said, newest scripts doesn't mount kernel2 partition.
I don't get it rephrase please
Click to expand...
Click to collapse
I didn't too
There is an Image named boot.img in kernel flashable zip archive that extracts into partition 15 (named kernel) as I understood is recovery (TWRP or CWM) image and you wont touch linux orginal image , and your modified custom kernel is new modules for linux image that loads while booting (sry, I cant explain fine), So what is recovery.cpio that is in recovery flashable zip image that extracts into partition 17 (named kernel2) ?
sorset said:
as I understood is recovery (TWRP or CWM) image and you wont touch linux orginal image
Click to expand...
Click to collapse
originally kernel + recovery
, and your modified custom kernel is new modules for linux image that loads while booting (sry, I cant explain fine), So what is recovery.cpio that is in recovery flashable zip image that extracts into partition 17 (named kernel2) ?
Click to expand...
Click to collapse
In my mod kernel(mmcblk0p15) and recovery (mmcblk0p17) are splitted.
Thank you. I see.
This is probably the best (and only?) way to rebuild the ramdisk without having to compile anything, which is an excellent base for my NoUMS patches
:good:
<remove>

[GUIDE][Lollipop]Dual Boot CM and/or Stock OS

This guide is show you how to install second OS in SDCard, so you can have two complete separate OS (each have their own /system, /data and /cache), this will be useful if you want to try out a new ROM or a new version, like CM or latest Stock build etc. I have pre-build 2 ROMs in this guide. and list the instructions of how to do it in post #2.
The whole method is just an implementation of @SHM (Modding.MyMind) guide that inside the post here, so all the credit goes to him:
http://forum.xda-developers.com/showpost.php?p=62460895&postcount=325
Highlight of the steps:
1. Partition a SDCard (32GB or bigger) to have 3 ext4 partitions after regular FAT32 partition
2. Flash two customized flashable zip in twrp so that:
boot image flashed to /dev/block/mmcblk0p18 (regular boot partition)
system image flashed to /dev/block/mmcblk1p2 (sdcard)
The boot image contains the fstab file, it has been updated to use partitions on sdcard as the /system, /data and /cache for the 2nd OS.
And of course, the flashable zip has updater script changed so that, it will flash they system image to correct partition on SDCard.
Note / Limitation:
1) After boot to 2nd OS on the SDCard, theoretically, while you are in Android OS, everything should work. The speed/performance may differ depends on the SDCard read/write speed.
2) TWRP, except flash the zip to install the customized system image to SDCard, all other function will not work for the 2nd OS, The backup/restore function is still working on the primary OS /system, /data etc.
3) Boot partition (/dev/block/mmcblk0p18), this partition will decide which OS it will boot, and the boot image should corresponded to your OS system partition. So if you flashed above boot image for 2nd OS, it will find /system on SDCard and boot it. And if you flashed (or restore) your primary OS boot image, then it will boot to your primary OS /system.
Things you need before you start:
1. MT2L03 with Lollipop installed, TWRP installed, and have a backup of your primary OS (at least /system, and /boot partitions)
2. An empty SDCard that is 32GB or bigger, strongly recommend class 10 or faster. (16GB will work, then you don't have much external space left)
Steps to install 2nd OS to sdcard:
(Note, I will call the empty SDCard as sdcard#2, and your current sdcard in the phone as sdcard#1.)
1. Make a backup of your current OS using twrp, include at least /system and /boot, to your sdcard#1.
2. Install the PartitionWizard (files location below) on windows, and put the empty SDCard#2 to computer sdcard reader.
3. Launch Partition Wizard, and carefully re-partition your SDCard#2 to following:
(pls refer to xda wiki about the usage: http://forum.xda-developers.com/wiki/SD_card_partitioning )
1st Partition: FAT32 primary size: (Total size minus 15000MB), for example, for 64GB(60000MB) card, choose 45000MB
2nd: ext4 primary size: 1800MB (/system for 2nd OS)
3rd: ext4 primary size: 12500MB (/data for 2nd OS)
4rd: ext4 primary size: rest space, should be great than 200MB (/cache for 2nd OS)
Since partition 2/3/4 total size is 14320MB, thus the 1st partition size is (Total size minus 15000MB)
4. Apply the change, this will take some time (like 20 to 30min).
5. Once sdcard#2 is re-partitioned and formatted, unplug and re-plug sdcard#2 to windows again. Right click the sdcard drive letter, and click "Open" to open the FAT32 partition. ( I found double click the drive letter will give error if the FAT32 is bigger than 32GB, but right click and open works)
Copy two flashable zip (file location below) to the sdcard#2.
6. Reject the sdcard#2, and remove it from windows machine.
7. In Mate2 phone, go to settings, storage, and un-mount your current SDCard#1, after it is unmounted, take out the sdcard#1 and put it to a save place. Do not mess the two sdcards!!
8. Put in the sdcard#2 to the phone, and reboot to TWRP.
9. Install the two zip you download in step 5 from sdcard#2. Reboot.
How to go back to your primary OS:
a. Put in sdcard#1 to the phone, boot into TWRP, restore your /boot partition from the backup you took in above step 1. then reboot.
How to switch to the 2nd OS on the sdcard again:
a. Put in sdcard#2 to the phone, boot into TWRP, flash the "MT2L03_xxx_BootOnly.zip" you downloaded in step 5.
Files to download:
PartitionWizard in above step 2:
http://tinyurl.com/q62m68x
location: under Lollipop/SD_Partition_Tools
FileName: pwfree91.exe
This tools is mentioned in XDA wiki: http://forum.xda-developers.com/wiki/SD_card_partitioning
You can use any tool you know to do the re-partition, above tools is what I used and it works.
Customized flashable in zip in above step 5:
http://tinyurl.com/q62m68x
location: under Lollipop/OS_on_SDCards
FileName:
If you want install B309 as 2nd OS, please download "MT2L03_B309_DBoot_BootOnly.zip" and "MT2L03_B309_DBoot_SystemWithRoot.zip"
If you want install CM12 as 2nd OS, please download "MT2L03_CM12_0820_DBoot_BootOnly.zip" and "MT2L03_CM12_0820_DBoot_SystemWithRoot.zip". (Please note the GApp is already included in the zip)
Attached two screenshot of the partition tool, one for 32GB, one for 64GB. Please note though the pic showing in GB, but when config the size, please use MB to make sure the partition size is accurate and big enough.
//reserved
I am not sure how many people is interested in dual boot, so for now, I have pre-built B309 and CM12 only.
In order to build a customize ROM for installing in SDCard, as detailed in SHM original post, two steps are required:
1) For Mate2, after split the original boot image, and unpack the ramdisk, only need following cmd to update the fstab:
cd ramdisk
sed -i 's/platform\/msm_sdcc.1\/by-name\/system/mmcblk1p2/g' fstab.qcom
sed -i 's/platform\/msm_sdcc.1\/by-name\/userdata/mmcblk1p3/g' fstab.qcom
sed -i 's/platform\/msm_sdcc.1\/by-name\/cache/mmcblk1p4/g' fstab.qcom
Then repack it back to boot2.img. Please note the un/repack boot image tool need support DTB section.
2) Then in the updater script of /META-INF/com/google/android/updater-script, install system.img to /dev/block/mmcblk1p2, and still install the new boot2.img to /dev/block/mmcblk0p18.
@SHM, Unfortunately, many tools mentioned in original post, the Aparted tool, and the android binary mkbootimg etc all have problem running under Lollipop, so for now, I am doing all the ROM modification under linux.
Lol. You just had to do it. Lol awesome work. And you picked up on that fast. Thanks Xordos.
Our divices supposedly only support up to a 64 gb SD card. I wonder if since we would partition the SD if it would accept a 128GB card and see it as two x 64GB's
MikeyLee said:
Our divices supposedly only support up to a 64 gb SD card. I wonder if since we would partition the SD if it would accept a 128GB card and see it as two x 64GB's
Click to expand...
Click to collapse
I think if huawei mention 64gb probably because they didn't have 128gb to test when they release the phone. 128gb has nothing special compare with 64gb card. But I could be wrong since I don't have 128gb.
For general use, no need to partition 128gb card unless you want to do something like this thread.
@xordos, no worries. Many things were broken because of Lollipop using a new linker file that checks if the binary is PIE or not. If it is not PIE or if it's not Statically compiled then it won't work on Lollipop. The linker file can be modified though to ignore this check and thus allow them to work regardless. This too could also resolve some issues with other apps not wanting to work on Lollipop . Modifying the linker file is relatively simple but this is off topic so I shall end it here.
Great work. Knew you would be able to get it done. Cheers!
Sent from my C525c using Tapatalk
SHM said:
@xordos, no worries. Many things were broken because of Lollipop using a new linker file that checks if the binary is PIE or not. If it is not PIE or if it's not Statically compiled then it won't work on Lollipop. The linker file can be modified though to ignore this check and thus allow them to work regardless. This too could also resolve some issues with other apps not wanting to work on Lollipop . Modifying the linker file is relatively simple but this is off topic so I shall end it here.
Great work. Knew you would be able to get it done. Cheers!
Sent from my C525c using Tapatalk
Click to expand...
Click to collapse
yup, exactly PIE problem.
So this is pretty cool that no need to worry about /data mixed up by different rom. but open the back cover is a little bit pain and my main sdcard is almost full so I am thinking to use otg cable. So i am wondering if we have grub-like boot image to have boot menu, or, the root is not ramdisk, but a file system, so we can modify the fstab after mount it. I know, maybe I ask too much, android is not design like linux.
xordos said:
yup, exactly PIE problem.
So this is pretty cool that no need to worry about /data mixed up by different rom. but open the back cover is a little bit pain and my main sdcard is almost full so I am thinking to use otg cable. So i am wondering if we have grub-like boot image to have boot menu, or, the root is not ramdisk, but a file system, so we can modify the fstab after mount it. I know, maybe I ask too much, android is not design like linux.
Click to expand...
Click to collapse
Yea, it's pretty nice. You can even modify the TWRP recovery for use with making backups and restoring to each Rom specific to their partition. Look at TWRP Unified and check out it's script inside the ramdisk. Modify the script to check some stuff and tell it which fstab to use . This way when you jump back and forth between roms just by the boot.img you flash TWRP will automatically recognize the change upon it booting up and target the partitions properly when you make a backup/restore. Put some thought into all of this and I am sure you could take this thread a bit further.
There are projects out there that are designed for multibooting on android devices but you would need to port one of them.
Sent from my C525c using Tapatalk
Just an update that the AParted app works for Lollipop now. Tested it out on my external sd tonight by resizing my fat partition without losing any of my contents and adding additional partitions with multiple filesystem's such as f2fs and ext4. Quick and effective .
Sent from my Ascend Mate 2 using Tapatalk
I have a HUGE GIFT that I am about to share for all you mate2 fans out there. Dual Booting just got taken to another level. Think of it as Multi Booting . Here are two screenshots to share as teasers. I have it working for our device and its a beast!
Sent from my Ascend Mate 2 using Tapatalk
SHM said:
I have a HUGE GIFT that I am about to share for all you mate2 fans out there. Dual Booting just got taken to another level. Think of it as Multi Booting . Here are two screenshots to share as teasers. I have it working for our device and its a beast!
Sent from my Ascend Mate 2 using Tapatalk
Click to expand...
Click to collapse
Can't waiting.
MT2-User said:
Can't waiting.
Click to expand...
Click to collapse
More teasers. These pics show that its possible to install roms without the need for TWRP. Will be sharing this very soon. I'm running CM, PAC, and Carbon right now.
Sent from my Ascend Mate 2 using Tapatalk
SHM said:
More teasers. These pics show that its possible to install roms without the need for TWRP. Will be sharing this very soon. I'm running CM, PAC, and Carbon right now.
Sent from my Ascend Mate 2 using Tapatalk
Click to expand...
Click to collapse
You run all three (or four including stock one)?
MT2-User said:
You run all three (or four including stock one)?
Click to expand...
Click to collapse
Yes. I can install the roms using either the system, data, and/or cache partition however I don't recommend cache because it's size is way too small for our device. Can even choose to install them on your external sd. I can install and run as many roms as I like as long as I have space for the new ROM. The app even makes it possible to install new builds to the proper ROM without touching your primary ROM or any other ROM other than what its told to target. More info will be shared when I open a thread on it. In short, you just download the ROM, then patch the ROM.zip using the app. You then flash that patched zip which in turns will modify the boot.img to give it dualboot support. You can patch zips for SuperSU, gapps and so forth so you may install them to a specific ROM. Its legit bro.
Sent from my Ascend Mate 2 using Tapatalk
SHM said:
Yes. I can install the roms using either the system, data, and/or cache partition however I don't recommend cache because it's size is way too small for our device. Can even choose to install them on your external sd. I can install and run as many roms as I like as long as I have space for the new ROM. The app even makes it possible to install new builds to the proper ROM without touching your primary ROM or any other ROM other than what its told to target. More info will be shared when I open a thread on it. In short, you just download the ROM, then patch the ROM.zip using the app. You then flash that patched zip which in turns will modify the boot.img to give it dualboot support. You can patch zips for SuperSU, gapps and so forth so you may install them to a specific ROM. Its legit bro.
Sent from my Ascend Mate 2 using Tapatalk
Click to expand...
Click to collapse
Could they or some of them share Data?
MT2-User said:
Could they or some of them share Data?
Click to expand...
Click to collapse
Not at the moment. You would have to reinstall your user apps again. You can backup your apps on your primary rom using something like Titanium backup and then restore them on the other ROM.
Sent from my Ascend Mate 2 using Tapatalk
SHM said:
Not at the moment. You would have to reinstall your user apps again. You can backup your apps on your primary rom using something like Titanium backup and then restore them on the other ROM.
Sent from my Ascend Mate 2 using Tapatalk
Click to expand...
Click to collapse
oh ic
MT2-User said:
oh ic
Click to expand...
Click to collapse
The app implements this feature but I'm working it out if that makes you feel better lol.
Sent from my Ascend Mate 2 using Tapatalk
Damn nice work SHM.. Congrats. And thanks!
Moody66 said:
Damn nice work SHM.. Congrats. And thanks!
Click to expand...
Click to collapse
I have it working %100 now. Its 3:35 am where I am at so time for bed. Sharing apps works as well between roms.
Sent from my Ascend Mate 2 using Tapatalk

Boot multiple roms on nexus 6p using Dual boot patcher!

Haven't seen anyone else discussing this particular solution yet so figured I'd share that we can boot multiple roms using dual boot patcher by @chenxiaolong.
*The only things I'd recommend are the following:
*MAKING A BACKUP FIRST IN RECOVERY. Especially if you've never used the app, this helps in case you misunderstood something or didn't read enough or didn't think enough or the dog ate your homework.
*I recommend using TWRP version 3.0.3-0 which can be found here - https://dl.twrp.me/angler/
* I have not tried this with f2fs only ext4 so naturally I'd only recommend using ext4 partitioning on your device.
* If your device is encrypted in any way booting multiple roms will not work, which should be obvious but I'll state that anyways. Thanks @JKforUA for helping us figure this out.
*If you want to boot more than just two roms, that you use the data slot options for your roms which can be named anything you'd like and they will be stored on the phones internal storage.
* Make sure you're on the latest Radio and Bootloader for the nexus 6p, I flashed this and it works fine and is backwards compatible with Marshmallow roms.
Radio & Bootloader link -
https://forum.xda-developers.com/nexus-6p/general/nexus-6p-radio-bootloader-recovery-t3433637
* Use the patcher app to update the ramdisk and set your primary rom's kernel as Primary before patching or flashing anything.
*If you use the fingerprint scanner you'll have to delete the file /data/system/locksettings.db in each multi boot directory, this disables getting an incorrect pin error when switching roms.
*If using a marshmallow and nougat rom you'll need to flash the appropriate vendor image in recovery before boot.
*Vendor images should not be patched.
This process is fairly simple to me because I've been using it for years but if you have any questions feel free to ask in this thread and hit thanks if I helped ya.
* Before reporting errors I would suggest you try the following steps-
1. Make sure you're using this version of the patcher app because it is the one I have been using without issue -
Version 9.1.0r80-
https://dbp.noobdev.io/files/9.1.0....atcherAndroid-9.1.0.r80.gd5920b2-snapshot.apk
2. Make sure you have enough free space to have two of the zips you want to use because that is what you will have after you patch.
3. Make sure your path to the zip is correct when browsing for the zip, go through internal storage to the directory where the zip is.
4. If you get any error patching, uninstall the patcher app, re-download it, and reinstall it.
5. There is also a Windows version you can try if you prefer.
*If you are still having issues we can discuss it here, and if nobody can seem to come up with a fix in this thread then errors can further be reported by following instructions here - https://dbp.noobdev.io/downloads/
Credits - @chenxiaolong for the patcher app!
Links :
Dual boot patcher (All versions) - https://dbp.noobdev.io
Original forum - https://forum.xda-developers.com/showthread.php?t=2447534
* Screen shots of my current setup attached below for additional guidance if desired.
Status - sharing, using, in some cases testing, always learning (^_-)...
Thanks for sharing, I've never heard of this before. A few questions;
How similar/dissimilar to multirom is this?
Do I need a specific kernel, or will it with with any kernel?
I briefly read through the original thread, am I creating a zip that flashes two Roms, or is the zip something that flashes alongside the ROM I currently have?
Thanks for sharing. Used this on my further G4. Didn't know that our device is supported. So no need to wait until multirom is working on 7.1.1. Gonna play around now.
Where do we report errors? I was about to patch several files and the app crashed. I have a couple log files.
DaringDomino3s said:
Thanks for sharing, I've never heard of this before. A few questions;
How similar/dissimilar to multirom is this?
Do I need a specific kernel, or will it with with any kernel?
I briefly read through the original thread, am I creating a zip that flashes two Roms, or is the zip something that flashes alongside the ROM I currently have?
Click to expand...
Click to collapse
I actually prefer it because it's what I'm used to, you can patch whatever kernel you choose and flash it in recovery, reboot into that rom, open the patcher app, set kernel, profit.
Basically you patch the rom zip you want to flash as secondary, or in my case data slot, naming them 2 and 3 because the Multislot options won't flash anything for me but using data slots works fine. Patch rom, patch gapps, patch whatever kernel, flash all in the whatever succession recommended by the rom op, and you'll automatically boot into the newly flashed rom when you reboot.
OmegaBlaze said:
Where do we report errors? I was about to patch several files and the app crashed. I have a couple log files.
Click to expand...
Click to collapse
Hmmm I found this
https://forum.xda-developers.com/showpost.php?p=64727670&postcount=8259
I would try re-downloading the app because I haven't had it crash in any roms I've used yet, I just grabbed the latest build, installed, opened, granted root when prompted, updated the ramdisk if needed which is indicated the app, rebooted when prompted, set kernel, and done.
If it's still crashing for you there's the usual force closing the app from your roms settings and clearing the apps cache and data but you probably already tried that?
t83wood said:
I actually prefer it because it's what I'm used to, you can patch whatever kernel you choose and flash it in recovery, reboot into that rom, open the patcher app, set kernel, profit.
Basically you patch the rom zip you want to flash as secondary, or in my case data slot, naming them 2 and 3 because the Multislot options won't flash anything for me but using data slots works fine. Patch rom, patch gapps, patch whatever kernel, flash all in the whatever succession recommended by the rom op, and you'll automatically boot into the newly flashed rom when you reboot.
Click to expand...
Click to collapse
I'm gonna play with this over the weekend, I like new stuff!
So whatever fkashable zip I patch will be designated during the flash as secondary (or whatever) and won't overwrite my current ROM allowing it to exist along side it?
DaringDomino3s said:
I'm gonna play with this over the weekend, I like new stuff!
So whatever fkashable zip I patch will be designated during the flash as secondary (or whatever) and won't overwrite my current ROM allowing it to exist along side it?
Click to expand...
Click to collapse
Correct, so long as you don't patch it as Primary. It will tell you where it's flashing to in recovery. You can also use the dual boot patcher recovery zip for things like switching roms from recovery and wiping roms, wiping multiboot files will get rid of a rom in its entirety if you wanted to replace it with something else. I've always installed the patcher app in my other roms after first boot and used it to set the kernel for that rom too.
t83wood said:
Correct, so long as you don't patch it as Primary. It will tell you where it's flashing to in recovery. You can also use the dual boot patcher recovery zip for things like switching roms from recovery and wiping roms, wiping multiboot files will get rid of a rom in its entirety if you wanted to replace it with something else. I've always installed the patcher app in my other roms after first boot and used it to set the kernel for that rom too.
Click to expand...
Click to collapse
If I'm patching for the data partition, am I correct in making all zips (ROM, Gapps, and su) to the same name? (Ex. I named the ROM zip slot "rom2", and then used the same name for the other zips)
DaringDomino3s said:
If I'm patching for the data partition, am I correct in making all zips (ROM, Gapps, and su) to the same name? (Ex. I named the ROM zip slot "rom2", and then used the same name for the other zips)
Click to expand...
Click to collapse
Yep looks good!
t83wood said:
Yep looks good!
Click to expand...
Click to collapse
Awesome, thanks, I'll see what happens :good:
Edit: it worked! It's a little more involved than multirom, but it seems to be fine! Easier than I thought.
I've not yet switched between the two, but the app on the secondary (data slot) recognizes the primary
Wow great. Running great on data-slot. Even magisk is supported. Good to have a new playground. Happy to have the 128 GB variant. Gonna do some test with Viper.
How do I switch roms
All perfect. Viper running with magisk. Every rom i tried booting without any problem. So atm the perfect tool to test other rom!
---------- Post added at 11:45 AM ---------- Previous post was at 11:43 AM ----------
DEVILOPS 007 said:
How do I switch roms
Click to expand...
Click to collapse
Install dualpatcher app and choose rom in 'ROMs'. Then reboot. Or run utulities in twrp (install).
What do I do? It says failed error code - 1 tried doing cortex rom and selecting data. Is there something I need to do?
DEVILOPS 007 said:
What do I do? It says failed error code - 1 tried doing cortex rom and selecting data. Is there something I need to do?
Click to expand...
Click to collapse
Cortex also flashes the vendor. Maybe this gives the error because in dualboot all roms use the same vendor partition (could be a problem to flash vendor through dualpatcher...). All other roms i tried vendor was not included to flash (only rom und gapps separately). I am just trying cortex too (just ready to flash). Gonna report, if i succeed.
Donric13 said:
Cortex also flashes the vendor. Maybe this gives the error because in dualboot all roms use the same vendor partition (could be a problem to flash vendor through dualpatcher...). All other roms i tried vendor was not included to flash (only rom und gapps separately). I am just trying cortex too (just ready to flash). Gonna report, if i succeed.
Click to expand...
Click to collapse
Okay thanks Bro, I might try out lineage. Also open gaps failed for me bit do I need the rom first or do I need to use dynamic gaps? I appreciate the help!
DEVILOPS 007 said:
What do I do? It says failed error code - 1 tried doing cortex rom and selecting data. Is there something I need to do?
Click to expand...
Click to collapse
Cortex rom running fine on multiboot on my device. So no problem with vendor in multiboot. I can also switch back to another rom. As gapps i suggest you to use only dynamic gapps (banks gapps). I always use mini dynamic gapps. Opengapps give many problems.... On primary i got rr oms-release from 12.01. ATM running with 3 different rom all on internal sd card. Just pay attention to give always the same name when patching a zip file in dualpatcher.
Donric13 said:
Cortex rom running fine on multiboot on my device. So no problem with vendor in multiboot. I can also switch back to another rom. As gapps i suggest you to use only dynamic gapps (banks gapps). I always use mini dynamic gapps. Opengapps give many problems.... On primary i got rr oms-release from 12.01. ATM running with 3 different rom all on internal sd card. Just pay attention to give always the same name when patching a zip file in dualpatcher.
Click to expand...
Click to collapse
What do you mean by same name? I am on pimps rr oms and whenever I flash any rom it says error code - 1. Any idea what I can do?
DEVILOPS 007 said:
What do you mean by same name? I am on pimps rr oms and whenever I flash any rom it says error code - 1. Any idea what I can do?
Click to expand...
Click to collapse
Did you flash in twrp (3.0.3.0)? I only use twrp to flash a new multiboot rom. Before flashing a new rom just make sure, you patch all necessary zip files (rom, gapps, etc.). Same name means u choose where (on angler i always choose Data slot - this is internal sd card). Then you give the name (no capital letters) and choose the directory to save the patched file. This you do with every zip file for the rom u gonna flash. The new zip file have the original name and the text "....._data-slot-namegiven.zip" (example for data-slot). The part "data-slot-namegiven" should appeir in every name of the patched zip file. I think with our device it's goot to use the data-slot if you have enough space on your internal sd-card. Using Multi Slot could lead to space problems on system partition of the device. Then just flash the patched files one after another in twrp. Don't forget to flash also patched supersu.zip oder magisk.zip to get root (if it's not in the rom included). You need to patch gapps and supersu or magisk for each slot separately. The name of the patched file just says the path for the multiboot rom. So twrp flashes the patched zip to the right place. Sorry if i wrote to much. Hope it's gonna give you some help. More information you find in the original thread of multiboot.

Categories

Resources