[RECOVERY][GUIDE][F2FS] TWRP 3.5.2_9 with F2FS support for Xiaomi Redmi 8 [olive][Unofficial] - Xiaomi Redmi 8 ROMs, Kernels, Recoveries, & Other

This is TWRP-3.5.2_9 unofficially updated with the ability to convert your /data and /cache partitions to F2FS.
Make sure your kernel and rom support f2fs (the dev of your ROM/kernel should have f2fs support noted).Most Aosp/Lineage based roms support it.Miui doesn't
What is F2FS?
F2FS (Flash-Friendly File System) is a flash file system initially developed by Samsung Electronics for the Linux kernel.
The motive for F2FS was to build a file system that, from the start, takes into account the characteristics of NAND flash memory-based storage devices (such as solid-state disks, eMMC, and SD cards), which are widely used in computer systems ranging from mobile devices to servers
Click to expand...
Click to collapse
- Wikipedia
This is potentially unstable, F2FS is a file system that is very much in active development. There is a reason that most OEMs go with ext4 out of the box.
How to use F2FS for /data and /cache?
Conversion procedure :
Download and install TWRP from the link below
Reboot into recovery
Replace fstab.qcom in /vendor/etc/
Code:
adb push fstab.qcom /vendor/etc
or use twrp file manager to replace
Reboot into recovery again
Flash a kernel that supports F2FS (I use CherryKernel as I know it works and is frequently updated)
Back up any important data as this will wipe your entire internal storage
Boot into TWRP and go into Wipe > Advanced Wipe
Select Data and then hit "Change or Repair File System"
Hit Change File System
Choose F2FS and slide to confirm
Repeat the previous three steps for cache
Reboot and move all of your files back over (if restoring through TWRP, make sure to check the option to use rm -rf instead of formatting)
Downloads:
fstab.qcom: in attachment
Recovery: twrpf2fs-3.5.2_9-0-olive.img
CherryKernel:CherryKernel-V1-hotfix.zip (Follow t.me/CherryKernel_SDM439 for updates)
Credits:
Twrp team
@oguz298 @altsec for twrp device trees
RALegacy-Kernel dev for fstab file
@TheGame455 for much help and prebuilt kernel
@TheGame455 & Akira for CherryKernel
Source Code:
Device tree: https://github.com/TeamWin/android_device_xiaomi_olive
CherryKernel source: https://github.com/AkiraNoSushi/kernel_cherry_sdm439

Reserved

Reserved #2

Reserved #3

Related

Dual-Boot FAQ thread | devil2-kernel by DerTeufel1980 [Note 2]

This thread should clarify the methods you can use to enable dual-boot functionality along with common problems and solutions. Hopefully, the list of questions should help. The initial author of this important thread was RichMD. He has kindly asked me to maintain it further instead of him, as he is too busy for that in the moment. I have accepted it and I do it as of February, 2014. Although I'm an active user of dual boot since I own my N7100, I don't consider myself to be a guru for this and I will highly appreciate any cooperative posts and I will try to add the important information and frequently update this OP.
IMPORTANT: particulary new users, please read especially careful here and mind, as the features of Devil Dual Boot Recovery have been strongly changed between the updates! I have kept first two parts of this OP the way RichMD has written them. So all the information are regarding pre-F2FS recovery versions (until v6.0.4.4). My screenshots also show only UI of the 6.0.4.4 version. From part 3 onwards, th einformation are regarding entirely newer recovery and kernel versions with F2FS support.
LIST OF CONTENTS:
About Devil dual boot recovery
Part 1: FAQs: dual-boot general
Part 2: GUIDE: setup dual-boot
Part 3: FAQs: benefits of F2FS
Part 4: GUIDE: migrate from ext4 to F2FS
Part 5: bootloader info & download links
Click to expand...
Click to collapse
About Devil Dual Boot Recovery
A luxory version of CWM based recovery with touch UI
Each choice must be clicked twice by touch navigation (to avoid accidental touch)
Navigation can be done by swiping with finger up or down beyond the menu contents
The navigation bar on the bottom works identic like with PhilZ recovery
SCREENSHOTS: (v6.0.4.4, the last pre-F2FS version)
{
"lightbox_close": "Close",
"lightbox_next": "Next",
"lightbox_previous": "Previous",
"lightbox_error": "The requested content cannot be loaded. Please try again later.",
"lightbox_start_slideshow": "Start slideshow",
"lightbox_stop_slideshow": "Stop slideshow",
"lightbox_full_screen": "Full screen",
"lightbox_thumbnails": "Thumbnails",
"lightbox_download": "Download",
"lightbox_share": "Share",
"lightbox_zoom": "Zoom",
"lightbox_new_window": "New window",
"lightbox_toggle_sidebar": "Toggle sidebar"
}
Click to expand...
Click to collapse
1: FAQs / dual-boot general
Q.) Can I run all 4.3 and 4.4 AOSP and Touchwiz based ROMs with devil2 dual-boot kernel?
A.) All AOSP ROMs between 4.3 and 4.4.2 will work, but ATM only 4.3 TW based ROMs will boot, 4.4 isn't yet supported.
Q.) Why do I keep getting "Something went wrong..." when trying to install a ROM.
A.) Some people have had this problem when trying to install from the external SD card and the error does not happen after the zip is moved to the SD card. There are additional reasons for that error that I listed below.
Q.) I am having ... problem with the secondary ROM (Play Store FC, no SD card access, no MTP, it fails to install and affects the primary ROM, etc)
A.) 4.2 ROMs do not typically install properly to the secondary partition currently. Additionally, 4.1 roms have a problem with MTP frequently or AROMA roms will fail the ROM to secondary install-script-modification step . Instead, install your desired ROM to primary, boot with the kernel included in the ROM and ensure everything works including MTP. Then flash the dual-boot kernel. Then back it up and wipe the secondary partition. Then restore your backup to the secondary.
Note: DerTeufel has fixed the problem of internal SD card access for 4.2 ROMs for N-7105 (LTE) based phones but N-7100 phones still have the problem. It is being worked on.
Workaround if you can't access the phone via USB
You can load and use easy UMS one time. You will have access to the external SD. Simply reboot and then set the app back to the default MTP mode and both should be accessible. You don't need the app after that. - (https://play.google.com/store/apps/details?id=com.mohammadag.samsungusbmassstorageenabler) and you shouldn't need it anymore.
Q.) Can I revert back to a configuration without dual-boot and how do you do it?
A.) Yes. Use a file manager with root access on the primary ROM to delete the /data/media/.secondrom folder which contains the 1.5GB file and the data folder. Flash another recovery (CWM or TWRP) and flash as you normally would.
Q.) I can't seem to get my nandroid to restore to the secondary partition. What am I doing wrong?
A.) One possible problem is that the secondary /system partition is sized at 1.5GB (recent F2FS kernel version enlarged secondaryFS to 1.9GB). If your nandroid backup has over this amount in /system then it won't work. One possible solution is if you use Titanium Backup (or similar backup program) to do a full backup of apps AND system info. Although it is often written not to restore system info, it is OK if it to the same exact ROM and version. You could then factory reset to wipe it clean, do a nandroid backup and then restore that to secondary. Then install TB and restore selectively only the apps you want. I would probably suggest restoring "missing apps + all system data" but then deselect most of the apps that aren't really necessary. Once that is complete and the configuration is working, you could selectively restore other missing apps and data on a priority basis until you start running low on /system space. TB will show that at the bottom of the initial screen.
Q.) I tried a fresh install to the secondary partition and it completed successfully but now when I boot the primary ROM, I have what I meant to install to the secondary partition. What's wrong?
A.) This will happen if you choose "ZIP to secondary rather than ROM to secondary because of what I listed below in initial setup. Choosing ROM to secondary will cause the installation script to be modified to install to the secondary partition or it will error out with "Something went wrong". Zips installation scripts do not need to be modified because they will reference recovery.fstab which has been modified to support the secondary partition (when you select enable secondary FS.
Q.) Why doesn't vibration work after flashing this kernel?
A.) The default setting for vibration in the kernel is 2%. Use the DevilTools app referenced in DerTeufel's OP and change "Set Vibration Intensity" under the Tweak group.
Q.) Does exFat work?
A.) The kernel supports it but the recovery has not yet been modified to support it.
Click to expand...
Click to collapse
2: GUIDE / how to setup dual-boot
Initial Setup
1) Have you flashed the dual-boot (aka DB ) kernel yet? If yes, go to step 3
2) Flash the DB kernel: Go to the DB OP here and flash the version for your model type - http://forum.xda-developers.com/showpost.php?p=40410021&postcount=1 N7100 is for non-LTE models and t0lte is LTE enabled (AT&T, Verizon, etc). The zip will NOT list recovery in the name...
3) Have you flashed the DB recovery? If yes, go to step 5
4) Flash the DB Recovery: Navigate to DB OP listed above and flash the version for your model type (as in step 2 above)
5) Have you created the secondary system partition? If yes, go to step 7
6) Create the secondary partition image: Boot into the DB recovery and select Dual Boot Menu > enable mounting secondary and then select create secondary system image (also under Dual Boot Menu". This will take a couple of minutes. This only has to be done once.
7) Ready to flash primary or secondary ROMs: Note: It is probably a good idea to get in the habit of always selecting the FS (primary or secondary) that you want to affect just to ensure you don't wipe the wrong one, etc. Select Dual boot menu > enable mounting of (pri or sec.)... It stays selected until you boot into recovery and change it. You will see recovery flash (reload) with the appropriate FS selected. Obviously, don't select it again - logic loop...
8 ) You at least need to follow standard ROM installation instructions at this point such as wipe data, etc (as appropriate). Wipe Data/Factory Reset will leave the ROM (typical) and the 2nd option (wipe data-cache-system-preload) will wipe out the ROM completely so you can start "clean". Only the selected FS is modified so the other ROM is not affected. All apps and data are separate for each ROM. SD card storage is common so keep that in mind for an app that exists in both ROMs.
9) Installing to the primary partition does not need any special instructions. You should have already selected "enable primary". Select "Install zip" > Choose zip from sdcard or external > ROM to Primary FS. The difference between the "ROM" and "Zip" selections is that zips do not typically explicitly access the file systems - they use references in recovery.fstab which DerTeufel modified to point to the appropriate locations depending on your selection (primary or secondary). Yes, choosing install zip might work for installing a ROM to primary but NOT to secondary. Also, the intention is to avoid confusion.
10) Installing to the secondary partition MIGHT be more problematic since the zip has to be modified first to replace FS references with the secondary locations. When you select this option, it can take a couple of minutes since it is changing the references and then re-zipping to a modified file on the SD card. Note: The original will be gone (at least if it was originally on the SD rather than the external SD) so make a copy, etc before proceeding if you want it to be available for standard/primary flashing in the future. The modified file will always install to the secondary partition after being modified. Note: Complicated install scripts (such as AROMA) will likely fail. If you want an AROMA based installation then the safest way is to install it to the primary partition, ensure it is working, make a backup and then restore the backup to the secondary partition (using the DB recovery of course). Backup/restore will be detailed below.
11) Recovery does not automatically mount /system, and /data so ensure /cache and these are already mounted before running a zip that will need to modify them
12) Avoiding MTP issues: After flashing a ROM, recovery prompts you to install the DB kernel again. Otherwise, the kernel installed with your ROM will not be able to boot the secondary ROM. However, if you do flash the DB kernel right away (for now at least) you may have a problem with MTP (access from a PC over USB ). If you boot the new ROM (with the ROM's kernel which will work for PRIMARY) then MTP should be working. You can then flash the DB kernel after rebooting to recovery and MTP will still work (afaik). Similar to the AROMA note above, you might want to install a ROM to primary first even if you want it in the secondary partition. The install script will not need to be modified and a normal kernel will boot the ROM so MTP will work. Then you can flash the DB kernel, make a backup and restore to the secondary. Hopefully, this is only temporary but at least this workaround exists.
13) Ready to flash zips to primary or secondary ROMs Flashing gapps, etc. simply requires that the correct FS is enabled, /system and /data (as necessary) are mounted and select your target under "Install zip" > "Choose zip from..." > Zip to (primary or secondary).
Kashortiexda has created another installation process documented in post #13 > http://forum.xda-developers.com/showpost.php?p=41992232&postcount=13
Click to expand...
Click to collapse
3: FAQs about F2FS / benefits of F2FS and dual-boot in f2fs
Q.) What is F2FS?
A.) "The Flash Friendly File System" created by Kim Jaegeuk (Samsung) and released in February 2013. Read more about F2FS here
Q.) Recently, DerTeufel1980 has updated his devil2 dual-boot kernel and recovery and merged F2FS support. What is the benefit of F2FS?
A.) if the internal sdcard is formatted to F2FS, the system is supposed to be up to 2 times faster than on ext4 (default formatting).
Q.) After update to the newest Devil DB Recovery with F2FS support I had problems by installing ROM to the Secondary FS / my nandroid backup was restored with errors
A.) The newest recovery has enlarged Secondary FS image to 1.9GB (earlier was 1.5GB). This can be cause for many errors. So be sure to create a nandroid backup of your Secondary ROM before you erase /secondrom partition from data/media and to create it again with the new recovery. This is very important to do after the recovery update.
Q.) What should I do to be able to use the benefits of F2FS on my device?
A.) Five steps! First: flash new DB recovery & new DB kernel with F2FS support. Second: create nandroid backup(s) of your ROM(s). Third: move all your data from internal sdcard and save them elswhere, as the formatting to F2FS will erase your entire internal sdcard. Fourth: format in recovery mode all the (internal) sdcard partitions to F2FS one by one. Fifth: restore your ROM(s) and data.
Q.) Can I revert from F2FS back to ext4?
A.) Yes. You can use either of Devil DB Recovery versions to revert back to ext4 (in the new version you will can choose between F2FS or ext4) or you can simply flash any other recivery that doesn't support F2FS and format with it all the partitions. It will format all back to ext4 (you will have to repeat the procedure like described in the question right before).
Q.) After return to ext4 I couldn't format /cache back to ext4
A.) Formatting back to ext4 seems to not work reliably with the newest Devil Touch recovery for N7100. If it is only /cache, it doesn't matter as everything seems to work normally. You can use any other non-F2FS recovery (like TWRP 2.6.3.x or PhilZ touch 6.12.8 to format cache back to ext4)
Q.) Can I with F2FS update my ROM(s) normally with any nightly build?
A.) No, it is not recommended, as the nightlies will ATM reformat some of the partitions back to ext4. Well, yes, in fact you can update, but it is quite complicated way around, therefore, F2FS is more practical for those who want to stick longer time with their ROMs and use benefits of very fast performance of their device on F2FS.
Q.) I've got error message after migration to F2FS when I tried to restore my nandroid backup
A.) This happens occasionally mostly there is a "can't mount /data" error message. Don't worry about that, simply reboot recovery, format again all to F2FS and restore your nandroid backup then.
Q.) After migration to F2FS, I can't reach my Secondary FS partition under "dual boot menu", why?
A.) If the recovery displays "Only with Devil Kernel available" (altough it is flashed already), simply reboot into the Primary FS and reboot into the recovery right after that. Then you will be able to create again the Secondary FS partition and restore your nandroid backup.
It has been reported at least by one user that System, Data, EFS, & Storage had to be remounted manually every time for successful boot up by switching from Primary to Secondary FS and vice versa.
DerTeufel1980's features description just after updating kernel and recovery for t0lte to F2FS (N7100 update was released about one week later):
What's new:
kernel:
added new f2fs filesystem support (supposed to be up to 2 times faster than ext4)
introduce the BFQ-v6r2 I/O sched for 3.3
block, bfq: add Early Queue Merge (EQM) to BFQ-v6r2 for 3.3.0
enable CGROUP_BFQIO by default
backport SLUB from Linux 3.3 (thanks to faux123)
afsync: replace fput() with fput_light() accordingly
cfg80211: Fix memory leak
mm: implement WasActive page flag (for improving cleancache)
fix triangle away
usb: fix 'adb root'
recovery:
completed the rework of recovery ui (primary and secondary rom need to be selected once in dualboot menu) if you can't access dualboot menu, please boot primary or secondary rom with the new kernel once
resized secondary system image to 1.9 gb
possibility to flash roms to secondary without modifying the zip (you HAVE TO CHOOSE ROM). if this fails, select use workaround (this is the old method) next time
added support to format and mount f2fs formated partitions (/system, /data and /cache)
if you format data to f2fs (this gives the maximum performance, you have to select primary rom in dualboot menu, then the option will be in mounts and storage: format /data, /data/media and secondary (please backup before, this wipes your internal sdcard as well)
You only can format data to f2fs, when you select to manage primary Filesystem, because it formats the entire partition, including your internal sd card (which also includes your second rom partitions). Formatting data gives you a complete clean data partition, and you need to backup/restore data, and sdcard (if you backup the sdcard with custom nandroid to external sdcard, you can restore it afterwards, which also restores the secondary rom).
The kernel 2.4.5b for t0lte fixes boot on Omnirom, as well as fixes Selinux on Samsung rom. By default Selinux is set to "enforcing" now, for Samsung as well as for AOSP roms.
If one wants to completely disable selinux, you need to create the file: "/.secondrom/.selinux_disable" (if you are currently booted into secondrom, otherwirse the path would be "/data/.selinux_disable" (both is the same file, and creating it, disables selinux for both roms, once rebooted). selinux stays disabled until the file gets deleted again, and the device rebooted.
On some Sammy roms FC may occur with enforced selinux with the warning: "smartcard service has stopped". Except the fact that only few may know what this service does, usually nothing bad will happen (this message appears once once after boot up)
WARNING: After "fixing" booting on Omnirom, DerTeufel1980 has warned that f2fs only seems to be working properly on CM11 based roms. Samsung ROMs are at least working with selinux disabled, but Omni ROM breaks baseband if selinux disabled!!
Click to expand...
Click to collapse
4: GUIDE / ext4 to F2FS migration
New Devil Touch-DB-recovery v6.0.4.5 has some new features:
Instead of double amount of options (for primary FS or secondary FS, respectively) now there is "dual boot menu" where we can choos which FS to manage
Menu text of the secondary FS is displayed now in red color
The size of secondary FS partition is now 1.9GB so even big ROMs can be installed as secondary FS
SCREENSHOT: (new Devil Touch v6.0.4.5 with f2fs support)
As described above under F2FS FAQ, we will migrate to F2FS in five steps:
Step 1/5: flash Devil Touch v6.0.4.5 recovery & kernel with F2FS support for your device (check the download links on the bottom of this post)
flash Devil Recovery with F2FS support for your device (download links are on the bottom of this post)
reboot recovery (under "power options" on the bottom of the main menu)
for single-boot: flash Devil2-F2FS-kernel.zip to your ROM (2.4.5b for t0lte and Verizon / 2.4.6 for N7100)
for dual-boot: if you are already dual-boot user, now flash Devil2-F2FS-kernel.zip to both your ROMs: primary FS and secondary FS
Step 2/5: create now nandroid backup(s) of both your ROM(s):
under "Backup and Restore" choose "Custom Backup and Restore"
in this sub-menu, choose "Custom Backup to /sdcard1" or optionally: "Custom Backup Job"
check for backup only: /system and /data and then >>Start Custom Backup Job<<
as the final step choose "Backup to /storage/sdcard1" option (your external micro SD card)
repeat the same procedure for your second ROM
OPTIONALLY: under this step you can also create a full nandroid backups, but just make sure that you then after migration to F2FS restore only /system and /data in "Custom Restore Job"!
Step 3/5: move all your data from internal sdcard and save them elsewhere, as the formatting to F2FS will erase your entire internal SDcard!
use either external SD card, or your PC as storage, as the entire internal phone memory will be erased in the following step.
mind that this step can take some time, regarding size of the data that has to be copied (20-30 min)
Step 4/5: reboot into the recovery to fs=1 (primary) and format under "Mounts and Storage" following partitions to F2FS:
format /system
format /data, /sdcard and secondrom (this step will destroy the /.secondrom partition)
Step 5/5: restore your ROM(s) and data.
reboot recovery
restore your primary FS
flash Devil-DB kernel
reboot to system and back to recovery
create secondary FS partition
restore your nandroid backup to secondary FS (if you have used "Custom Backup Job")
flash Devil-DB kernel again
OPTIONALLY: if you have made full nandroid backups under step 2/5 now at this point don't miss that you should restore only /system and /data with "Custom Restore Job" option!
Finished! Enjoy F2FS
reverting from F2FS back to ext4
Repeat whole the procedure, just choose under formatting always "ext4" instead of "F2FS"
Click to expand...
Click to collapse
5: download links / troubleshooting
DOWNLOAD LINKS:
Latest versions of the kernel and recovery without F2FS support for Note 2:
Devil2 dual-boot kernel MAIN THREAD
Note 2 kernel and recoveries with F2FS support:
n7100 Devil2 kernel: download here
n7100 recovery: download here
t0lte Devil2 kernel: download here
t0lte recovery: download here (this one works also for Verizon)
The newest Devil3 hybrid kernel for N7100 and t0lte: download here
BOOTLOADER check
Regarding the fact that Devil2-recovery boots 4.3 and 4.4 ROMs, owners of the Note 2 should mind, that many recent custom ROMs are designed to work flawless only with the recent JB bootloaders. Custom ROMs don't update your bootloader, so your bootloader was flashed together with your latest stock ROM that you were using. While ICS bootloaders are nearly completely outdated, now also earliest JB bootloaders might cause problems and malfunctions. If so, some users will have to consider to update the bootloader.
Experienced users know: this is a damn risky task, as if Odin fails so that the old bootloader gets erased and new doesn't get properly flashed, only JTAG will be able to revive your device.
I have made a little guide and provided download link how to flash a knox-free 4.3 MJ5 bootloader for N7100: CLICK HERE
This 4.3 bootloader will boot any 4.3 or 4.4 OS, but it still has the charging issue (Sammy's fault) if the device is turned off. All the newer 4.4 bootloaders where the issue is solved are KNOX'ed, so bootloader downgrade won't be possible anymore if you use any of the later bootloader versions.
CAMERA APP TROUBLESHOOTING:
All who use AOSP custom ROMs (especially CM based ones) on their Note 2 devices might face the "ERROR: can't connect camera" issue. This problem is not devil2 kernel related. The Camera app is crashy on numerous devices. We can have our Camera working reliably, just mind that it is utterly important to keep the phone in clearly defined position when starting the camera (horizontal/vertical) and to be careful by each change of the axis rotation. Also don't view freshly shot photo in your camera app, but close the Camera and use Gallery for that.
Should you still face the nasty "can't connect..." error, instead of rebooting the OS use either of those apps, that can successfully restart the camera with one click (my N7100 needed to have both apps installed to make reset working, now either works fine):
Camera (CMFix) app from Play Store
Restart Camera.apk from HERE
Click to expand...
Click to collapse
Devil-DB-Recovery screenshots (v6.0.4.4):
Nice work m8!! Appreciate the time in you explaining the processes involved:thumbup:
Sent from my SGH-I317M using Tapatalk 2
Very detail write up Rich. Double:thumbup::thumbup:
Thanx
Sent from my SAMSUNG-SGH-I317 using Xparent SkyBlue Tapatalk 2
Thanks RichMD, appreciated "how-to" guide.
However a few remarks:
Similar to the AROMA note above, you might want to install a ROM to primary first even if you want it in the secondary partition. The install script will not need to be modified and a normal kernel will boot the ROM so MTP will work. Then you can flash the DB kernel, make a backup and restore to the secondary. Hopefully, this is only temporary but at least this workaround exists. Hopefully, this is only temporary but at least this workaround exists.
Click to expand...
Click to collapse
It means that in the future we won't need to backup then restore Roms which have to be installed with a Aroma Installer?
In your guide I suggest to add the following b4 Step 5:
Make a Nandroid backup to save our current configuration! If you don't manage to install DB or if we aren't convinced by DB benefitis we can come back to an "one ROM boot".
totelysw classical
Sounds good so far hope to be able to install to external sd storage instead of the internal
Sometimes this process will need extras. At least it did for me, and more than once. Most probably because recovery is trying to replace or prevent original kernel of the second rom to be installed and causing mishaps..
So my additions are:
After flashing second rom howsoever, reflash dualboot kernel.
Reboot rom if stuck get into recovery and wipe cache and dalvik.
I had the issue of cm roms to use partitions, i had to fix permissions (for sec fs) and also once i had to log into recovery, then advanced menu and select /data location..
Sent from my GT-N7100 using xda premium
Memphis_ said:
Thanks RichMD, appreciated "how-to" guide.
However a few remarks:
It means that in the future we won't need to backup then restore Roms which have to be installed with a Aroma Installer?
In your guide I suggest to add the following b4 Step 5:
Make a Nandroid backup to save our current configuration! If you don't manage to install DB or if we aren't convinced by DB benefitis we can come back to an "one ROM boot".
Click to expand...
Click to collapse
Thanks. I plan to add a "How do you completely remove dual-boot" even if you didn't make a nandroid first but I will add a comment similar to what you mentioned.
Awesome!
great work cheers!:fingers-crossed:
myaslioglu said:
Sometimes this process will need extras. At least it did for me, and more than once. Most probably because recovery is trying to replace or prevent original kernel of the second rom to be installed and causing mishaps..
So my additions are:
After flashing second rom howsoever, reflash dualboot kernel.
Reboot rom if stuck get into recovery and wipe cache and dalvik.
I had the issue of cm roms to use partitions, i had to fix permissions (for sec fs) and also once i had to log into recovery, then advanced menu and select /data location..
Sent from my GT-N7100 using xda premium
Click to expand...
Click to collapse
Flashing the DB kernel again is required after flashing primary or secondary. My comments are simply that you may not want to do it immediately and let the (primary partition ROM only) boot initially with the ROM included kernel to ensure MTP works. You then need to flash the DB kernel after if you ever want to boot the secondary ROM. If you just finished flashing a ROM to secondary then I "believe" you would need to flash the DB kernel before you could ever boot that ROM. However, MTP (at this point) might not work. If it doesn't then the workaround I listed would help. Does that answer your question/comment?
I will add more to the post on fixing permissions, etc. I need a bit more detail on what your process for CM was. You installed CM to secondary and it wouldn't boot so you went into recovery and advanced > fixed permissions (secondary FS was already enabled)?. I'm not sure what your comment about /data means other than you went to mounts and storage and mounted /data. Is that what you meant?
RichMD said:
Flashing the DB kernel again is required after flashing primary or secondary. My comments are simply that you may not want to do it immediately and let the (primary partition ROM only) boot initially with the ROM included kernel to ensure MTP works. You then need to flash the DB kernel after if you ever want to boot the secondary ROM. If you just finished flashing a ROM to secondary then I "believe" you would need to flash the DB kernel before you could ever boot that ROM. However, MTP (at this point) might not work. If it doesn't then the workaround I listed would help. Does that answer your question/comment?
I will add more to the post on fixing permissions, etc. I need a bit more detail on what your process for CM was. You installed CM to secondary and it wouldn't boot so you went into recovery and advanced > fixed permissions (secondary FS was already enabled)?. I'm not sure what your comment about /data means other than you went to mounts and storage and mounted /data. Is that what you meant?
Click to expand...
Click to collapse
No it is the other way around. Everything worked fine, CM booted perfectly, settings were to be applied easily. Gapps flashed well and worked without glitch. However, file managers, play store or anything trying to access fs couldnt manage to do so.. I first changed my ROM tried old sentinel (4.5) then paranoidandroid and then new sentinel.. But same thing happened. Then I booted reflashed DB and fixed permissions. Rebooted CM, still no access. Afterwards, I rebooted into recovery re-fixed permissions but this time under the advanced menu (surely after activating second partition from dualboot menu) I set the storage to /data/media/0 .. rebooted 2nd rom. this time everthing worked fine.
Aforementioned are all for 2nd rom. 1st rom worked like a charm except for the MTP
I would love to see this on the tmobile s4
Sent from my SGH-M919 using xda premium
Strange behaviour on my N7100
After I flash the Devil dual-boot kernel (either the current - Devil-n7100-DUAL-0.21.3_20130529.zip or the previous version) this is happening to my device:
0. flashing is succesful and I reboot
1. the logo "Samsung Galaxy Note II N7100" stays on screen for approx. 4 or 5 minutes. Initially I believed it's completely frozen
2. the ROM specific logo (CyanogenMod or Samsung) appears on screen and ROM is loading shortly
3. everything works perfect, except touchscreen with fingers. Only S-Pen is working. I can check the kernel and it's the version I've flashed. Also when I press Home button 4 times, screen colors becomes negative, as it should.
4. if device enters in Sleep (screen off), the notifications are working (eg. new mail)
5. if phone gets an incoming call or if I wake the phone from sleep, the screen stays on for less than a second, then forcibly reboots
6. back to step 1.
Have anyone encountered this problem? This is happening with either Samsung stock 4.1.1 firmware rooted or with Cyanogenmod 10.1 nightly from last days.
I would love to have this kernel working...
RichMD
sorry to hijack your thread, delete if you need.. here's what works for me, several times ( I used your and Der Teufel guide as reference) just put it in a step by step guide
After a lot of reading and some tinkering, I've got PACMAN 4.2.2 PA /AOKP /CM10 1on ROM1 and 4.1.2 Mike1986 ARHD17 Sammy on ROM2.
Adb, MTP, Trickster works fine on both.
Working great. Even managed to get Simplistic Framework and Xposed working on rom 2 (Sammy)
simply
(a) first put the rom you want as PRIMARY on your ext sd card, either a flashable zip or a CWM nandroid backup (NOT TWRP).. you will need this later in step 32
1 on your existing rom and kernel combination , flash DT recovery,
2 reboot to recovery
3 go to dual boot options in recovery
4 create second partition
5 reboot to first rom
6 check MTP
7 reboot recovery
8 dual boot menu
9 enable mount primary ( second on list of 3 options )
10 go back, Mounts and storage
11 mount efs, system, data, ext sdcard
12 go Back, wipe data (2nd option for FULL wipe)
13 check mounts again and remount as above
14 flash the rom you want to be as SECOND rom
15 do all your fancy mods now (Xposed etc)
16 check mounts, remount if necessary
17 flash DT dual boot kernel with "flash kernel" option
18 reboot
19 check MTP
20 go to step 7 and repeat 7-11 inclusive
21 do a backup to ext sd
to move the rom to second rom position..
22 dual boot menu
23 enable mount secondary ( third/last on list of 3 options )
24 go back, Mounts and storage
25 mount efs, system, data, ext sdcard
26 go Back, wipe data (2nd option for FULL wipe)
27 go to Backup and Restore
28 restore the rom you made in step 21 from the ext sd
29 reboot to second rom (allow full boot)
30 check MTP, should work
31 do steps 7-13
32 flash, or restore the rom you placed on your ext sd card in the very beginning step (a) ie the one that you want to be as FIRST/PRIMARY rom
33 Reboot
Done
DO NOT FLASH ANY KERNEL AFTER STEP 33 ( the kernel will show in primary rom settings as unavailable but check with Trickster Mod or CPU spy, it will show you that it is DT dual boot kernel)
The above has worked for me several times now, and some steps are overkill..
The 0 folder from 4.2.2 is visible from the Sammy rom but the Sammy files are not visible from 4.2.2 that's why I recommend using the ext sd for the above procedures as a failsafe
Sent from my dual boot GT-N7100 using Tapatalk 2
kashortiexda said:
RichMD
sorry to hijack your thread, delete if you need.. here's what works for me, several times ( I used your and Der Teufel guide as reference) just put it in a step by step guide
After a lot of reading and some tinkering, I've got PACMAN 4.2.2 PA /AOKP /CM10 1on ROM1 and 4.1.2 Mike1986 ARHD17 Sammy on ROM2.
Adb, MTP, Trickster works fine on both.
Working great. Even managed to get Simplistic Framework and Xposed working on rom 2 (Sammy)
simply
(a) first put the rom you want as PRIMARY on your ext sd card, either a flashable zip or a CWM nandroid backup (NOT TWRP).. you will need this later in step 32
1 on your existing rom and kernel combination , flash DT recovery,
2 reboot to recovery
3 go to dual boot options in recovery
4 create second partition
5 reboot to first rom
6 check MTP
7 reboot recovery
8 dual boot menu
9 enable mount primary ( second on list of 3 options )
10 go back, Mounts and storage
11 mount efs, system, data, ext sdcard
12 go Back, wipe data (2nd option for FULL wipe)
13 check mounts again and remount as above
14 flash the rom you want to be as SECOND rom
15 do all your fancy mods now (Xposed etc)
16 check mounts, remount if necessary
17 flash DT dual boot kernel with "flash kernel" option
18 reboot
19 check MTP
20 go to step 7 and repeat 7-11 inclusive
21 do a backup to ext sd
to move the rom to second rom position..
22 dual boot menu
23 enable mount secondary ( third/last on list of 3 options )
24 go back, Mounts and storage
25 mount efs, system, data, ext sdcard
26 go Back, wipe data (2nd option for FULL wipe)
27 go to Backup and Restore
28 restore the rom you made in step 21 from the ext sd
29 reboot to second rom (allow full boot)
30 check MTP, should work
31 do steps 7-13
32 flash, or restore the rom you placed on your ext sd card in the very beginning step (a) ie the one that you want to be as FIRST/PRIMARY rom
33 Reboot
Done
DO NOT FLASH ANY KERNEL AFTER STEP 33 ( the kernel will show in primary rom settings as unavailable but check with Trickster Mod or CPU spy, it will show you that it is DT dual boot kernel)
The above has worked for me several times now, and some steps are overkill..
The 0 folder from 4.2.2 is visible from the Sammy rom but the Sammy files are not visible from 4.2.2 that's why I recommend using the ext sd for the above procedures as a failsafe
Sent from my dual boot GT-N7100 using Tapatalk 2
Click to expand...
Click to collapse
Thanks, I certainly don't see that as a "hijack". The intent of the thread is to help anyone that is having a problem with the installations. Having multiple methods to try just helps ensure success if they keep trying.
n4553 said:
After I flash the Devil dual-boot kernel (either the current - Devil-n7100-DUAL-0.21.3_20130529.zip or the previous version) this is happening to my device:
0. flashing is succesful and I reboot
1. the logo "Samsung Galaxy Note II N7100" stays on screen for approx. 4 or 5 minutes. Initially I believed it's completely frozen
2. the ROM specific logo (CyanogenMod or Samsung) appears on screen and ROM is loading shortly
3. everything works perfect, except touchscreen with fingers. Only S-Pen is working. I can check the kernel and it's the version I've flashed. Also when I press Home button 4 times, screen colors becomes negative, as it should.
4. if device enters in Sleep (screen off), the notifications are working (eg. new mail)
5. if phone gets an incoming call or if I wake the phone from sleep, the screen stays on for less than a second, then forcibly reboots
6. back to step 1.
Have anyone encountered this problem? This is happening with either Samsung stock 4.1.1 firmware rooted or with Cyanogenmod 10.1 nightly from last days.
I would love to have this kernel working...
Click to expand...
Click to collapse
Just to confirm, this looks like you aren't trying to do anything with dual-boot - just using his dual-boot kernel on a solitary ROM - correct? If you can flash other custom kernels successfully (perseus, sabre, soap, etc.) then I don't know what to tell you. What recovery are you using to flash it?
HI RichMD,
I am getting error at step 6.
it fails to mount Primary Files.
I tried following
Reloaded Recovery -in duel boot menu -enable mounting of Pri File.
thn i tried to create secondary System image. Still m getting same error.
am i missing something .
Also i noticed that i am not able to mount SDCARD in menu Maount and Storage
regards
JoyMoro
---------- Post added at 11:31 AM ---------- Previous post was at 10:50 AM ----------
JoyMoro said:
HI RichMD,
I am getting error at step 6.
it fails to mount Primary Files.
I tried following
Reloaded Recovery -in duel boot menu -enable mounting of Pri File.
thn i tried to create secondary System image. Still m getting same error.
am i missing something .
Also i noticed that i am not able to mount SDCARD in menu Maount and Storage
regards
JoyMoro
Click to expand...
Click to collapse
Pls ignore it,. I got it working.
regards
JoyMoro
RichMD said:
Just to confirm, this looks like you aren't trying to do anything with dual-boot - just using his dual-boot kernel on a solitary ROM - correct? If you can flash other custom kernels successfully (perseus, sabre, soap, etc.) then I don't know what to tell you. What recovery are you using to flash it?
Click to expand...
Click to collapse
Yes, for now I haven't installed the second rom, however this is what I want to achieve, dual-boot. But firstly I wanted to make sure the kernel is working. I am using Devil recovery, when I flash other things with it, there are no problems...
I am getting error at step 6.
it fails to mount Primary Files.
I tried following
Reloaded Recovery -in duel boot menu -enable mounting of Pri File.
thn i tried to create secondary System image. Still m getting same error.
am i missing something .
Also i noticed that i am not able to mount SDCARD in menu Maount and Storage
Pls ignore it,. I got it working.
How did u get it working since i got the same issue here?
Is it only me who cannot get play store to work on sec.rom or anyone else have the same issue
Sent from my GT-N7100 using xda premium
no prob
myaslioglu said:
Is it only me who cannot get play store to work on sec.rom or anyone else have the same issue
Sent from my GT-N7100 using xda premium
Click to expand...
Click to collapse
Play store works fine for me on second rom

[Q&A] [lt01][CWM Advanced Edition] PhilZ Touch

Q&A for [lt01][CWM Advanced Edition] PhilZ Touch
Some developers prefer that questions remain separate from their main development thread to help keep things organized. Placing your question within this thread will increase its chances of being answered by a member of the community or by the developer.
Before posting, please use the forum search and read through the discussion thread for [lt01][CWM Advanced Edition] PhilZ Touch. If you can't find an answer, post it here, being sure to give as much information as possible (firmware version, steps to reproduce, logcat if available) so that you can get help.
Thanks for understanding and for helping to keep XDA neat and tidy!
ketut.kumajaya said:
This is Extended PhilZ Touch Recovery previously known as blackhawk repack but now compiled from source, extend PhilZ Touch features mainly for dual boot.
Extended Features:
Integrated dual boot tool, only visible on 1st recovery's Andvaced menu
Show nice looking AROMA based dual boot menu if 2nd ROM exist. Completely separate 1st and 2nd ROM's recovery, without different recovery commands.
Using patched reboot function to make boot menu's reboot options work properly, direct access to Android reboot routine without property server
Auto detect filesystem type using patched busybox's blkid but still use fstab as a fallback. A nice feature to adapt a new filesystem, i.e. f2fs
Complete Flash-Friendly File System (f2fs) support for /system, /cache, /data and external SD card. Need a compatible kernel and ROM (with patched vold and e2fsprogs's blkid for f2fs formatted SD card) for normal boot
User selectable device format, ext4 or f2fs
Disable nandroid restore re-format /system and /cache. Solution for easly convert filesystem to/from f2fs from/to ext4.
Commits history: https://github.com/kumajaya/philz_touch_cwm6/commits/cm-11.0
IMPORTANT INFO:
For a brand new Tab 3 8.0, @Phil3759 has made Odin flashable *tar.md5 package:
For WiFi version: http://goo.im/devs/philz_touch/CWM_Advanced_Edition/lt01wifi
For 3G version: http://goo.im/devs/philz_touch/CWM_Advanced_Edition/lt013g
For LTE version: http://goo.im/devs/philz_touch/CWM_Advanced_Edition/lt01lte
You can update to the latest version using PhilZ Touch recovery itself later.
UPDATE 07/04/2014:
PhilZ Touch 6.26.1
Updated NEXT dual boot tool, now we can expand system.img without loosing user data:
Boot into 2nd recovery, nandroid backup /system
Boot into 1st recovery, run dual boot tool from Advanced menu, create larger system.img (2GB, 750MB, or 1GB)
Boot into 2nd recovery, you can reformat /system as ext4 or f2fs filesystem, nandroid restore /system
Only "DELETE 2ND ROM" option completely delete 2nd ROM's system.img and user data.
Credits:
@Phil3759 for PhilZ Touch source and all sources contributors, koush for CWM, CyanogenMod etc
@amarullz for AROMA Installer source and all sources contributors
@DerTeufel1980 for working f2fs backport patch set and all sources contributors, also thanks for Samsung, nowcomputing, etc
@Android-Andi for initial device tree dual boot recovery integration
@gr8nole for initial guide how to build Android from source
PhilZ Touch user for feedback, review, donation, etc
Sources:
https://github.com/kumajaya/philz_touch_cwm6/
https://github.com/kumajaya/android_device_samsung_lt01-common/tree/cm-11.0-philz
https://github.com/kumajaya/android_device_samsung_lt01wifi
https://github.com/kumajaya/android_device_samsung_lt013g
https://github.com/kumajaya/android_device_samsung_lt01lte
busybox: blkid: Add Flash-Friendly File System (f2fs) support
e2fsprogs: blkid: Add Flash-Friendly File System (f2fs) support
https://github.com/kumajaya/android_system_vold
How to convert your internal storage to f2fs filesystem:
Make sure your external SD card free space larger than internal storage contents
Full charge your device for safety
Boot into 1st recovery
Select "Backup and Restore" menu
Select "Custom Backup to /storage/sdcard1" menu
Select "Backup data" and "Backup /data/media" only, and then select "Start Custom Backup Job"
Back to main menu and select "Mounts and Storage" menu
Select "format /data and /data/media", select "f2fs" and confirm
Select "format /cache", select "f2fs" and confirm
Back to "Backup and Restore" menu, and then select "Custom Restore from to /storage/sdcard1"
Select "Restore data" and "Restore /data/media" only, and then select "Start Custom Restore Job"
Flash latest NEXT kernel, the only f2fs compatible kernel for now
Back to main menu and select "Power Options" menu, "Reboot recovery"
Boot into 2nd recovery, recovery auto detect /data filesystem format and reformat /cache
Reboot
Above guide also applicable to convert your /system filesystem to f2fs. To keep your /system as f2fs even after a nightly update, reuse attached PhilZ Touch flashable zip's update-binary to replace CM flashable zip's update-binary and change updater-script mount and format command:
Code:
mount("f2fs", "EMMC", "/dev/block/platform/dw_mmc/by-name/SYSTEM", "/system");
package_extract_file("system/bin/backuptool.sh", "/tmp/backuptool.sh");
package_extract_file("system/bin/backuptool.functions", "/tmp/backuptool.functions");
set_perm(0, 0, 0777, "/tmp/backuptool.sh");
set_perm(0, 0, 0644, "/tmp/backuptool.functions");
run_program("/tmp/backuptool.sh", "backup");
unmount("/system");
show_progress(0.500000, 0);
format("f2fs", "EMMC", "/dev/block/platform/dw_mmc/by-name/SYSTEM", "0", "/system");
mount("f2fs", "EMMC", "/dev/block/platform/dw_mmc/by-name/SYSTEM", "/system");
NOTE:
Non-journaling exFAT filesystem still faster (and widely compatible) than f2fs for SD card. By utilize in-kernel exFAT support, exFAT performance even better than standard CM's exFAT in user space (fuse). For your reference:
https://github.com/kumajaya/android_system_vold/commit/5e70bb7ff266a234891d01ed44661ce75c1e8a25
https://github.com/kumajaya/android_system_vold/commit/20c1f8bbb70ca9ba9266c39689e6ef79b94c9969
https://github.com/kumajaya/android...mmit/7afb06edfbfc71b38b9d81cec3f58c5bf4d17b67
https://github.com/kumajaya/android...mmit/f088a8310b9f5554a75470afbe564cf8a870ae91
Click to expand...
Click to collapse
after installing this Recovery it will auto root my tab t311 or i have to manully root my tab t311 using a root file( which i dont have)
am currently using TWRP and using i rooted my TAB with a root file...
sorry for stupid Question but its only my 3rd day as i started tweaking with my tab...
I have the lastest blackhawk kernel and latest extended philz touch recovery. everything worked smoothly and i got Cyanogenmod as my primary rom. but when i try to flash anything in 2nd recovery, i get "E: failed to set up expected mounts for install; aborting E: Installation aborted." ive reflashed kernel and recovery and deleted and recreated the system.img but i still get the same error. i cant figure out what im doing wrong.
Same issue for me
I'm searching the Philz touch for the Tab 3 8.0....
Thanks for help if someone saved this file...
Backup Copy
Where to download
Where can we download Philz Touch Recovery now that goo.im is down.
Anyone have a backup copy of the latest philz for Tab 8.0 Wifi, lt01wifi???
Thanks
link not working
hello coul u pls provide me another link... the download link is not at all working
mpertz said:
Where to download
Click to expand...
Click to collapse
mpertz said:
Where can we download Philz Touch Recovery now that goo.im is down.
Anyone have a backup copy of the latest philz for Tab 8.0 Wifi, lt01wifi???
Thanks
Click to expand...
Click to collapse
praga dev said:
hello coul u pls provide me another link... the download link is not at all working
Click to expand...
Click to collapse
http://forum.xda-developers.com/showpost.php?p=51364377&postcount=33
gr8nole said:
http://forum.xda-developers.com/showpost.php?p=51364377&postcount=33
Click to expand...
Click to collapse
:beer::beer::beer:
written in stone
Droehnemeier said:
This is goo.im hosted, too
written in stone
Click to expand...
Click to collapse
no it is not....scroll down to the links at the bottom of the post. They are hosted on xda.
Thanks, you made my day:thumbup: I just was scrolling too fast
written in stone
Would you mind to upload the the latest philz_touch for my lt013g please ? ^^
.xda-developers.com/showpost.php?p=51364377&postcount=33
Right hereI asked that before..
written in stone[/QUOTE]
Sent from my SM-T310 using XDA Free mobile app

[TUTORIAL] Migrate filesystem to F2FS

Migrate filesystem to F2FS
Prerequisite
This tutorial is based on TWRP 2.8.0.1
You need mkfs.f2fs support into TWRP 2.8.0.1
Your kernel needs to support f2fs
Your boot.img should have an fstab that permit to mount f2fs filesystem.
Important: contact the ROM maintainer if you are not sure about which partition you can format into f2fs
Download
for F2FS: mkfs.f2fs
You need to download mkfs.f2fs only if your TWRP doesn't include it. Simply push mkfs.f2fs into /sbin when you are on the recovery (eg: adb push mkfs.f2fs /sbin/).
Migrate /data
On this tutorial, we will show you how to migrate /data to f2fs without data lost (you need of course a valid backup).
Convert /data to F2FS :
Reboot into TWRP (push mkfs.f2fs if needed)
Backup the ROM
Go to Wipe/Advanced Wipe
Select Data
Select "Repair or Change File System"
Select "Change File System"
Select "F2FS" (Swipe to change will format the filesystem.)
Restore /data :
Go to Settings
Select "Use rm -rf instead of formatting"
Go to Restore
Select your backup and check ONLY "Data"
Swipe to restore
When the restore is done, go to Settings and uncheck "Use rm -rf instead of formatting"
(Use rm -rf instead of formatting) only necessary if you want to restore a filesystem backup done with another filesystem format. (eg: restore an ext4 backup to an f2fs target). If you don't check it, TWRP will revert the change and format the partition to the filesystem used during the backup of the filesystem.
Migrate /cache
Convert /cache to F2FS :
Reboot into TWRP (push mkfs.f2fs if needed)
Go to Wipe/Advanced Wipe
Select Cache
Select "Repair or Change File System"
Select "Change File System"
Select "F2FS" (Swipe to change will format the filesystem.)
Migrate /system
You need to follow the same procedure than "Migrate /data" but of course you need to format system and to restore system.
Migrate /sdcard
If you want to do a backup, run into recovery and from your computer run "adb pull -p /sdcard backup_folder/".
To restore just do adb push -p backup_folder/ /sdcard
Convert /sdcard to F2FS :
Reboot into TWRP (push mkfs.f2fs if needed)
Go to Wipe/Advanced Wipe
Select Internal SDCard
Select "Repair or Change File System"
Select "Change File System"
Select "F2FS" (Swipe to change will format the filesystem.)
Select terminal and run:
chown -R 1023.1023 /sdcard
chmod -R 770 /sdcard
Boot the ROM
Now it's time to reboot the ROM.
You can check that every partition migrate to f2fs are available by doing that during the "bootanimation" :
Connect with adb shell
Tape the command "mount" (You should see for example "/data f2fs" somewhere in the output)
You can have a long long long reboot if /cache is not available.
You can have a message relative to encrypt device if /data is corrupted or unavailable.
On both case, simply restart into the recovery and check the procedure again.
Rolback procedure
Just do the same migration procedure but of course reformat to ext4 (or what's you want that is supported by your ROM)
ROM known to be supported:
Pure AOSP lollipop (/data and /cache supported) - (mkfs.f2fs not available)
nAOSProm 5.0 (/data, /cache and /sdcard supported)
Any other ? Let me know and I will update the post
Thanks
Thanks to frantisekz and mirhl that permit me to improve the procedure
Many thanks man, it's freakin easy to do! I have some questions:
- I fell dizzy about it, I can't format /system partition to f2fs on nAOSP yet, am I right?
- formatting from ext4 have nothing to do with /data partition size change, yes? (and some off topic question: does increasing data partition size help on Lollipop? Is system feeling more responsive, faster?)
A6ekAK said:
Many thanks man, it's freakin easy to do! I have some questions:
- I fell dizzy about it, I can't format /system partition to f2fs on nAOSP yet, am I right?
- formatting from ext4 have nothing to do with /data partition size change, yes? (and some off topic question: does increasing data partition size help on Lollipop? Is system feeling more responsive, faster?)
Click to expand...
Click to collapse
no you can't format /system to f2fs on nAOSP. You can take a look on nAOSProm thread but there is no good reason to migrate it to f2fs. /system is mounted in read-only mode. But if I have few request to permit it I will integrate it (really easy to do) but I think that this is more trouble for the end user.
There is no link with /data partition size to migrate to f2fs. Increase /data can be necessary depending your own usage. You can take a look on the TUTORIAL to increase the data partition.
Thanks for clarification
Thanks for this tut. Put it in Sony Cross-Device General
Deleted
Sorry for the noob question but what's the benefit from doing this?
zaidx said:
Sorry for the noob question but what's the benefit from doing this?
Click to expand...
Click to collapse
f2fs is faster when you have to write on a SD card for example. This is a filesystem build for this kind of storage in mind.
https://en.wikipedia.org/wiki/F2FS
Hi,
What about to convert sdcard (Intenal Storage) to f2fs as well ?
Christophe
I'm not able to convert the partitions
For those who have tried: is there any improvement?
First i formatted my partitations with twrp to f2fs file system.And then i installed nAOSP rom to my device. Without any problem i'm using my phone but for others Do we need install rom first then backup data before converting partitations and restore data, after formatting f2fs?
zaidx said:
Sorry for the noob question but what's the benefit from doing this?
Click to expand...
Click to collapse
You can check this post for benefits :
http://forum.xda-developers.com/showthread.php?t=2697069
cge_95 said:
Hi,
What about to convert sdcard (Intenal Storage) to f2fs as well ?
Christophe
Click to expand...
Click to collapse
Yes it's possible. I will wrote the procedure when I will do the test on my side.
Does someone have another download link?
SwitzXXL said:
Does someone have another download link?
Click to expand...
Click to collapse
use this linkView attachment mkfs.f2fs.zip
mickybart said:
Restore /data :
Go to Settings
Select "Use rm -rf instead of formatting"
Go to Restore
Select your backup and check ONLY "Data"
Swipe to restore
When the restore is done, go to Settings and uncheck "Use rm -rf instead of formatting"
(Use rm -rf instead of formatting) only necessary if you want to restore a filesystem backup done with another filesystem format. (eg: restore an ext4 backup to an f2fs target). If you don't check it, TWRP will revert the change and format the partition to the filesystem used during the backup of the filesystem.
Click to expand...
Click to collapse
I'm now waiting since 10-20 minutes while "Removing all files under '/data' .... how long does it normally take?
Latest version of TWRP works again on Xperia S
The latest version of TWRP, version 2.8.4.1, works great on our Xperia S! Do not add mkfs.f2fs support to TWRP 2.8.4.1 since this comment applies only to version 2.8.0.1. TWRP 2.8.4.1. has build in mkfs.f2fs support.
Flash TWRP version 2.8.4.1 from the adb shell, or with the terminal app in TWRP by using this code:
Code:
dd if=/tmp/twrp-2.8.4.1-nozomi.img of=/dev/block/mmcblk0p11
Please dubble or triple check the correct spelling of "mmcblk0p11".
mgrinwis said:
However, do not add mkfs.f2fs support to TWRP 2.8.4.1 since this comment applies only to version 2.8.0.1. TWRP 2.8.4.1. has build in mkfs.f2fs support.
Click to expand...
Click to collapse
you're kinda wrong. the rom that you have (in your /system) must have mkfs.f2fs /sbin/ . current pure aosp rom doesnt have it, so you need to push the file manually. it doesnt matter what your twrp version. if there's no mkfs.f2fs in the rom, it cant change to f2fs.
if you have current naosp rom installed, you dont need to push mkfs.f2fs.
Latest test kernel has mkfs.f2fs included.
m1st3r1 said:
you're kinda wrong. the rom that you have (in your /system) must have mkfs.f2fs /sbin/ . current pure aosp rom doesnt have it, so you need to push the file manually. it doesnt matter what your twrp version. if there's no mkfs.f2fs in the rom, it cant change to f2fs.
if you have current naosp rom installed, you dont need to push mkfs.f2fs.
Click to expand...
Click to collapse
Thanks for your quick corrections/remarks! I figured it was related to the TWRP version because the f2fs option was availible after I installed version 2.8.4.1...
Thanks I will take a look on TWRP 2.8.4.1.
mkfs.f2fs need to be available on the recovery itself.
On the ROM you don't have mkfs.f2fs on nAOPSrom or Pure AOSP lollipop because the mkfs.f2fs is build statically and pushed into the boot.img only (ramdisk part). This is a pure choice and default rule for f2fs-tools (mkfs.f2fs) because format a filesystem from the ROM is not really common.
If TWRP 2.8.4.1 embedded mkfs.f2fs, you will have it out of the box. On nAOSProm and pure AOSP lollipop, the init process push the mkfs.f2fs into TWRP to add the feature (necessary for 2.8.0.1 support of mkfs.f2fs).
EDIT: for pure AOSP lollipop this is include with the last test kernel but not in test11. for nAOSProm you need b15 (or b14c boot.img)

[Q&A] MultiSystem for Android

MultiSystem is a powerful tool for locked- and unlocked-bootloader Android devices with many features that at least includes the following:
Keeps stock system partition safe/rooted
Permenant root survival with proper use
MultiROM support via virtual ROMs
Unlimited number of virtual ROMs
Booting options to choose stock, primary, or secondary virtual ROM
Any of the virtual ROMs can work as a recovery replacement
Flashing multiple ROMs at the same time without a reboot
Ability to create/install ROMs on Linux to microSD card
Great performance & battery life on virtual ROMs
Recovery solution to install ROMs or Mods
Easy upgrade to newer versions of Android
Ability to safely apply OTA updates to virtual system
Permissive SELinux and other kernel tweaks
Safe flashing that doesn't trip KNOX flag on Samsung devices
Wrapper script runs via ADB or a Terminal Emulator on device
APK to manage all MultiSystem functions with a nice UI and extra options
Management for the best performance & user experience
Support for all Android devices with microSD card
Portability to almost all devices
Compatibility with all Android versions
Click to expand...
Click to collapse
Q&A​
What is the concept behind MultiSystem?
It runs virtual Android ROMs on microSD, like booting multiple systems on a PC from different partitions/disks. So, your stock system partition is kept safe/rooted. It won't affect performance or anything (might even be better on the virtual system if you've high quality microSD & the device supports its speed). Also, you can freely modify any of the virtual systems & in the worst case, reboot the safe stock system or another working virtual system to recover. So, no root loss or potential damage to the original device partitions.
Click to expand...
Click to collapse
Is it a recovery or an APK tool?
It's a shell script that hijacks system at early boot & force Android to boot from the stock system partition or a virtual system IMG & an APK that manages all booting options, virtual ROMs, and works as a recovery replacement + extra features...
Click to expand...
Click to collapse
Does it work as a recovery replacement?
It IS a POWERFUL recovery replacement. You can do whatever you do in recovery with the APK. HOW? recovery does its magic b/c it doesn't depend on the system & has its own kernel/ramdisk. In MultiSystem, you can boot a virtual ROM from extSD that sure doesn't depend on stock system partition or any of the other virtual ROMs (it does depend on the kernel, which you can't flash on locked devcies anyway). Hence, install, backup, restore, ... & all recovery functions are all possible +++ more features since you're running a full ROM not just a recovery ramdisk like Safestrap.
Bottom Line: I think it's the best & most convenient recovery replacement ever for locked devices & it can also attract unlocked devices for the powerful features, MultiROM, and recovery from within ROM.
Click to expand...
Click to collapse
Can I use FlashFire along with MultiSystem?
Yes. MultiSystem is compatible with FlashFire & fully supports it on stock & virtual ROMs. So, you can use both/any of them for flashing to either a stock or virtual ROM. However, it's recommended to use MultiSystem when flashing to the stock system partition (shouldn't be needed anyway since you can always be safe & flash to your old/new virtual ROMs).
Click to expand...
Click to collapse
Does MultiSystem require FlashFire?
No, MultiSystem doesn't require FlashFire. They're fully combatible though.
Click to expand...
Click to collapse
Would the virtual ROM we install be exactly the one in the stock slot?
In MultiSystem APK, you can create a virtual ROM from stock system, a copy from other virtual ROM, a new IMG, a dev-provided ROM, a flashable .ZIP, ... etc. Literally, your virtual ROMs can be any stock or custom ROM that's compatible with your firmware/kernel.
Click to expand...
Click to collapse
How can it run virtual ROMs from external microSD card?
External MicroSD will be formated into 2 partitions:
exFAT or FAT32 for the 1st partition (your new external storage)
EXT4 for the 2nd partition (your MultiSystem partition)
It'll hijack the system & boot a virtual system from the 2nd partition. The 1st partition will be automatically detected as your extSD.
Click to expand...
Click to collapse
Can I run unrooted virtual ROM for work apps or any other reason?
Yes. You can add unrooted virtual ROM & reboot to it via MultiSystem APK.
Click to expand...
Click to collapse
How do you boot back into a different ROM?
MultiSystem APK manages all functions including ROM activation & reboot to current system, another stock/virtual system, download mode, recovery, ... etc.
Click to expand...
Click to collapse
Will it be OK to still store media like movies/photos/music to extSD?
100% OK; That's my setup a few months ago. 2 virtual ROMs in the SECOND extSD partition in EXT4 format while all personal data are stored on the FIRST extSD partition in exFAT or FAT32 format... TWO COMPLETELY DIFFERET PARTITIONS.
Click to expand...
Click to collapse
How much space are we going to have for virtual ROMs?
The size of the 2nd partition is optional (> 4GB) for your ROMs, but here is an estimated sizes:
1 Virtual ROM Uncompressed = ~2.7 GB ---> ready for running
1 Virtual ROM Compressed = ~1.5 GB ---> for full ROM backups
I'd say better allocate 4 GB for each ROM you plan to run. If you just need one virtual ROM to keep stock system safe, 4 GB 2nd extSD partition is enough; The remaining space is allocated for the 1st extSD partition as your external storage.
For me, I run Linux too from extSD via MultiSystem. So, I've 64 GB extSD card with two partitions 32 GB each.
Click to expand...
Click to collapse
Can I clear up space on an existing SD card and partition it while full or will the entire card need to be wiped and partitioned from scratch?
You need to backup all your files; it'll be wiped & repartitioned.
Click to expand...
Click to collapse
How can I swap microSD cards & be able to run virtual ROMs?
You can swap microSD cards as you wish provided that the device is powered off; don't remove the microSD card when running a virtual ROM. If the new microSD card doesn't include a 2nd parition of available virtual ROMs, the device will boot directly to the stock system.
Click to expand...
Click to collapse
Is there a specific sd card you recommended for this?
I personally have two microSD cards:
SanDisk Extreme Plus 64GB (Up to 80MB/s read speed)
Samsung 64GB PRO (Up to 90MB/s read speed)
You don't have to change your microSD card for MultiSystem; any card you use on your device should work just fine. The need for more speed is relevant when the device supports that speed & if you're going to buy a new card anyway that you may use with a newer device later.
Click to expand...
Click to collapse
Can I copy virtual ROMs to a new microSD card?
Yes. I'll add a feature for swapping microSD cards so that you can backup/restore virtual ROMs from/to the current extSD to/from internal storage as follows:
power off device
use MultiSystem APK to backup your virtual ROMs
insert the new properly formatted microSD,
power on device (it'll boot to stock system)
use MultiSystem APK to restore your virtual ROMs
use MultiSystem APK to activate one of your virtual ROMs
use MultiSystem APK to reboot to any of your ROMs
Click to expand...
Click to collapse
What about other data/cache partitions and internal storage?
Only system img's are in the extSD. All ROMs share all other partitions. This substantially improves the performance & you won't notice any difference between your stock & virtual ROMs. The reason for performance improvement is that EXT4 loop devices are very fast in reading but not in writing. Your system partition is read-only while data (for example) is read write & cache IMGs cause problems like Safestrap issues on ROM slots. Also, you don't have to worry about switching data/settings between ROMs (they're shared), but you just need to regularly backup your important data (which is healthy anyway).
Click to expand...
Click to collapse
Can your elaborate where data is stored?
The userdata partition is also shared; so, you'll have access to all your FULL storage partitions & all apps/data similarly on either stock or virtual ROMs. This also solves the Safestrap issue of having less storage on ROM slots...
Click to expand...
Click to collapse
Will mSDcard incur a significant performance penalty on some devices?
there's no diffrerence between virtual & stock ROMs in terms of performance & battery life. The reason is simple: loop devices associated with the READ-ONLY system IMG mounted from EXT4 partition using a high-quality microSD card IS very fast more than enough.
The read speed is faster than the device can operate anyway + the exact same device should perform on the lowest speed when reading/writing from/to the FAT/FAT32/ExFAT extSD card (where you store your files or even move apps!!!) anyway, which is much slower than the read speed of a loop device mounted from EXT4 partition.
That's why data partition is shared for many reasons, including the poor READ/WRITE performance.
Click to expand...
Click to collapse
If virtual systems are read only, how do we modify them? Do we have to boot to another multisystem rom to modify a virtual rom?
The stock system partition is mounted by default read only & so are the virtual systems. To modify a stock/virtual system, the MultiSystem APK remounts them read/write. You can modify the currently running virtual system, copy it & modify the copy, modify another stock/virtual system.
Click to expand...
Click to collapse
How is a corrupted virtual rom handled? Does it see it's bad and default to stock system?
At early boot, MultiSystem checks for the microSD & active virtual ROM to boot it. There's a boot menu that gives you options to select a stock/virtual system, but it crashes on LP. I'm debugging it, but all functions won't be affected if I removed it. To fail safe, you can remove the microSD card to boot to stock system & restore/repair your virtual ROMs.
UPDATE1: MultiSystem v1.0.1 now allows you to also switch to stock system on boot to repair corrupted virtual IMGs or any other reasons. More options will be added during boot to ultimately select another virtual system if the active IMG is not booting normally (e.g., bootloop after applying a mod or flashing a bad .ZIP).
UPDATE2: Now, on boot, you can choose from two primary/secondary virtual ROM or stock ROM. Flashing multiple ROMs at the same time without a reboot is now possible.
Click to expand...
Click to collapse
How to check if an IMG is corrupted using MultiSystem status?
Code:
Current System IMG: Test_Rom.img
Current System DEV: [B][COLOR="Red"]/dev/block/mmcblk0p23[/COLOR][/B]
When you see "/dev/block/mmcblk0p23"; it's the original system partition; so MultiSystem failed to boot Test_Rom.img, but it should be your current system.
So, the check is simple based on "Current System Device":
/dev/block/mmcblk0p23 = Stock System Partition
/dev/block/loop0 = Virtual System IMG
Note: The block device number (mmcblk0p23) may vary per device & per variant !
Click to expand...
Click to collapse
Does android do any maintenance whatsoever on stored data within /data or external sd? So if I have an app installed on 1 system and not on another system will android see it and clear the data?
No, all storage partitions are shared between ROMs. If you installed an app, it'll be availabe for all of them. Since on locked devcies we're limited to stock manufacturer-based ROMs, this makes the switch between ROMs very convinient (you don't have to worry about your changes/data/setup & storage space on the another ROM; all ROMs share everything except system). However, you should make regular backups in case a virtual ROM (probably with unsafe mods) results in bootloop due to your user data. In this case, it's safe to wipe data & selectively restore apps/data from backup(s). Another advantage of sharing all storage partitions is that your messages/emails/etc received on a virtual ROM are immediated synced (actually shared) to the other ROMs.
Click to expand...
Click to collapse
Will anything like Xposed modify the virtual ROM system IMG as opposed to the stock system IMG?
When you run a Virtual System, everything incldung kernel & apps are hijacked to speak to it as the original system.
Click to expand...
Click to collapse
Can we install AOSP ROMs on locked devices?
You can only install stock/manufacturer-based ROMs on locked devices while unlocked devices can use kexec or flash the required kernel to boot any AOSP/Stock ROMs. I've got a Note 4 Developer Edition & a lot of development is planned to go there (thanks to the unlocked bootloader!) More devices will get supported including unlocked TMO & international variants after adding more features untilizing the unlocked bootloader with kexec'd kernels.
Click to expand...
Click to collapse
Are there limitations to the combinations of ROMs that can be loaded on the "stock" and "virtual" slots? Can you mix KK and LP?
Yes, if they can run on the same kernel. LP won't run on KK kernels & so, you'd have to upgrade the firmware anyway. As for running mixed compatible Android versions, this is possible but your'd have to backup your data before switching ROMs; if it cause no issues, enjoy smooth switch & if it doesn't, do factory reset in recovery & restore your data backup. Backups via MultiSystem are painless.
Click to expand...
Click to collapse
Are applications installed once for each ROM slot that has that applicaiton installed, or can I share a game across ROMs (for instance?)
Everything is shared between ROMs, which is very good for storage & for easy switching. Just make regular backups of your sensitive data.
Click to expand...
Click to collapse
How there are no performance hits while internal storage memory was much faster than any microSD technology?
Read speeds from microSD is very fast compared to write speeds & since virtual ROMs are actually a virtual read-only systems (hence, MultiSystem), they provide a high performance. Moreover, again, read speeds from EXT4 loop devices are higher compared to physical partitions. They're very bad in writing, which we don't need for the read-only "system".
Click to expand...
Click to collapse
Is there a preferred "daily driver" ROM that should be installed in the stock slot?
Uses a stock ODEXED ROM on stock slot for better stability!
Click to expand...
Click to collapse
Is it based off of Safestrap?
Short answer NO. I've been working on MultiSystem & Safestrap for ~7 months. Earlier versions of MultiSystem (called, JasmineREC) was based on Safestrap, but it failed to support newer versions of Android mainly due to TWRP changes in the graphics/UI libraries that cause segmentation fault & the stock kernel framebuffer issues. Then, I decided to find another solution. However, the basic idea of system hijack is powered by Safestrap (or 2nd-init recoveries in general) & all the work done by @Hashcode is GREATLY appreciated.
Click to expand...
Click to collapse
How can it overwrite system files while running?
MultiSystem allows you to install safe mod's or a ROM in full or OTA-like update. It's strongly recommended to install .ZIP files NOT to the current system, b/c some files can not be overwritten while running. So, you can use backup function to copy the current system & install to the new img or any of your other virtual systems. You'll have several options to activate a virtual img & reboot directly to stock system, any virtual img you've activated, quick reboot, Download/bootloader, recovery,... etc.
Click to expand...
Click to collapse
How would I benefit from it if I'm only running Stock ROM or would there be no point for me to install it?
If you run a ROM on stock system, you're vulnerable to root loss unless/untill a new rooting method for LP comes out. MultiSystem gives you the option to run safe-to-mod virtual ROMs + recovery replacement + extra features.
Click to expand...
Click to collapse
Is there a way to convert a normal ROM .ZIP into MultiSystem .IMG?
Create or copy any of your IMGs, activate it & reboot to the active IMG! Then, use FlashFire to flash the ZIP file. However, the updater-script should be safe/compatible. Some devs mount the phyical partition, which will redirect everything to it!!
For example:
Code:
mount(“ext4″, “EMMC”, “/dev/block/mmcblk0p23″, “/system”);
will mount the original system partition; while
Code:
run_program("/sbin/mount", "-t", "auto", "/system");
will mount the current system (stock or virtual). This is recommended/safe.
Click to expand...
Click to collapse
Would a KitKat ROM work with multisystem even though my stock is Lollipop?
Any ROM requires a compatible kernel & modem. So, running KK ROMs requires flashing KK firmware (namely, kernel & modem). This may work with MultiSystem on other devices, especially if the bootlpoader is unlocked. For example, I plan to add features for Note 4 DevED to allow different Android versions (including AOSP, manufacturer-based, & probably Linux systems) by utilizing kernel swapping or execution.
Click to expand...
Click to collapse
When MultiSystem comes out will it be open sourced?
Most probably, haven't decided yet!
Anyway, here's the repository on GitHub: https://github.com/hsbadr/MultiSystem
Click to expand...
Click to collapse
Click to expand...
Click to collapse
Video Tutorials
A quick preview of MultiSystem v1.0 tested on Lollipop for VZW Note 3. The video has been captured on a stable virtual ROM of JasmineROM v5.0.1. It's FULLY compatible with FlashFire on virtual/stock systems. More devices will get supported as well, after required testing.
Facebook: https://www.facebook.com/hsbadr/videos/vb.331488823689599/428178174020663
How to check if you are running a Stock/Virtual System?
There're many ways to check whether you're running a Stock or Virtual system. MultiSystem app should include this simple check at some point. That's important to avoint ruining the Stock system & keep it safe. To make it clear to NOOBZ & anyone who's requesting "another" proof even though I owe hime nothing. Very weird!
Anyway, BusyBox mountpoint applet can print the current block/device mounted to /system mountpoint by running the following command:
Code:
busybox mountpoint -n /system
The stock system is mounts the original system partition:
Code:
[B][COLOR="Red"]/dev/block/mmcblk0p23[/COLOR][/B]
while the virtual system mounts a loop device associated with a system IMG:
Code:
[B][COLOR="Blue"]/dev/block/loop0[/COLOR][/B]
Here're two videos for both stock & virtual systems...
UPDATE:
Now, you could run the following command to print the current system (stock or virtual) and the system device (physical partition or loop device):
Code:
MultiSystem status
Note: The block device number (mmcblk0p23) may vary per device & per variant !
How to repartition microSD card for MultiSystem?
You can use any tool/program for partitioning on Android, Linux, Mac, or Windows. For example, MiniTool Partition Wizard is a good partitioning tool for Windows. So, let's use it for this task. Simply, you need to follow this PDF tutorial (thanks to @carl1961). In sum:
Step 1: delete old partitions on SD card
Step 2: create FAT32 PRIMARY partition
Step 3: create EXT4 PRIMARY partition
Then, apply changes (note that the program UI may get changed in newer versions).
Notes:
This partitioning tutorial doesn't create PRIMARY partitions (it creates logical partitions). So, you need to change "Create As" from "Logical" to "Primary" when creatig a partition.
The sizes of the two partitions are arbitrary depending on number of ROMs you plan to install on the 2nd EXT4 partition.
The 1st partition (check size) is automatically detected as your external storage
In Terminal Emulator or ADB shell, check the existence of the two partitions by running the following command (in red):
Code:
[email protected]:/ # [COLOR="Red"]ls -l /dev/block/platform/msm_sdcc.3/[/COLOR]
drwxr-xr-x root root 2015-05-02 21:08 by-num
lrwxrwxrwx root root 2015-05-02 21:08 mmcblk1 -> /dev/block/mmcblk1
lrwxrwxrwx root root 2015-05-02 21:08 mmcblk1p1 -> [COLOR="Blue"]/dev/block/mmcblk1p1[/COLOR]
lrwxrwxrwx root root 2015-05-02 21:08 mmcblk1p2 -> [COLOR="Blue"]/dev/block/mmcblk1p2[/COLOR]
/dev/block/mmcblk1p1 is mounted by Android as your external storage.
/dev/block/mmcblk1p2 is NOT mounted & will be your MultiSystem partition.
Click to expand...
Click to collapse
How to check microSD card partitions for MultiSystem?
You need to correctly repartition microSD card into two partitions:
exFAT or FAT32 for the 1st partition (your new external storage)
EXT4 for the 2nd partition (your MultiSystem partition)
Use the directions in this post!
You should check your 2nd SD partition in EXT4 format mounted to /MultiSystem:
check that the /MultiSystem directory exists after a reboot
check that the 2nd SD partition (/dev/block/mmcblk1p2) is mounted to /MultiSystem by running the following command in Terminal Emulator or ADB shell:
Code:
mount | grep /MultiSystem
The output should be:
Code:
/dev/block/mmcblk1p2 /MultiSystem ext4 rw,seclabel,relatime,data=ordered 0 0
How to check MultiSystem Installation?
The 1st thing to do after installing MultiSystem is to check the /MultiSystem directory & its contents (it shouldn't be empty!). Then, check usage by running the following commands in Terminal Emulator or ADB shell:
Code:
su
bash
MultiSystem
If it retuns "MultiSystem not found" or permission denied, try to use open MultiSystem app to Update Configurations & try again. If this does't fix it, try the following command:
Code:
/MultiSystem/bin/MultiSystem
This should work if you've MultiSystem binaries installed in (extracted to) /MultiSystem directory. If so, you can create a symlink in /system/xbin as follows:
Code:
mount -o remount,rw /system
ln -sv /MultiSystem/bin/MultiSystem /system/xbin/MultiSystem
Then, test it by running:
Code:
MultiSystem
The last thing before using it is to check the boot options: reboot & monitor the GREEN LED indicator for 3 seconds (change in the app) , which give you the following options:
Volume UP = Primary virtual ROM
Volume DOWN = Secondary virtual ROM
HOME KEY = Stock System
Pressing nothing will boot the active system: stock or primary virtual system. Sure, you should have installed one or more virtual ROMs.
Backup & restore or creating/installing a virtual ROM are easy as copy & paste: all img's will be at
Code:
/MultiSystem/img/system
To backup a virtual/stock system, you have many options:
Use create function to create from stock system
Use copy function to copy the IMG
Copy & paste with a new name
Use FlashFire (fully supported on virtual/stock ROMs)
...
If you've IMG mounting issues, run the following commands:
Code:
mount -o remount,rw /system
busybox ln -sv /proc/self/mounts /system/etc/mtab
If this doesn't help, try mounting from Terminal Emulator or ADB shell after selecting the IMG in MultiSystem app, by running the following command:
Code:
MultiSystem mount virtual
Mind Boggling
hsbadr said:
MultiSystem is a powerful tool for locked- and unlocked-bootloader Android devices with many features that at least includes the following:
Click to expand...
Click to collapse
Had to login just to thank you.
Awesome.
Sent from my SM-N910V DE
Remember: Read twice flash once
I decided to go ahead and try this. Using the latest version it appears to install Multisystem with no problem. Then when I try to flash a rom it says: "file selected: null" when I try to select the rom. So I tried FlashFire and ended up flashing on top of my system instead of the virtual rom partition. How do I tell flashfire where to install to?
MultiSystem Video Tutorial
Thanks To: @Tomsgt , aka RootJunky
Don't forget to subscribe & like the video to show appreciation of his great effort & time spent in making the video :highfive::good:
stueycaster said:
I decided to go ahead and try this. Using the latest version it appears to install Multisystem with no problem. Then when I try to flash a rom it says: "file selected: null" when I try to select the rom. So I tried FlashFire and ended up flashing on top of my system instead of the virtual rom partition. How do I tell flashfire where to install to?
Click to expand...
Click to collapse
Will explain this very soon
hsbadr said:
Will explain this very soon
Click to expand...
Click to collapse
Thanks man. You're awesome as usual. ?
Sent from my SM-N910V using Tapatalk
hsbadr said:
Thanks To: @Tomsgt , aka RootJunky
Don't forget to subscribe & like the video to show appreciation of his great effort & time spent in making the video :highfive::good:
Click to expand...
Click to collapse
I found out I was leaving out the "Create Virtual IMG" step. But even with that it still gives me the "File selected: Null" message.
stueycaster said:
I found out I was leaving out the "Create Virtual IMG" step. But even with that it still gives me the "File selected: Null" message.
Click to expand...
Click to collapse
Update Configurations >>> Activate Virtual System >>> Select Primary IMG
hsbadr said:
Update Configurations >>> Activate Virtual System >>> Select Primary IMG
Click to expand...
Click to collapse
Ok, does this look right? It looks like I have 2 copies of the same rom on the same partition.
Sent from my SM-N910V DE
Remember: Read twice - Flash once
stueycaster said:
Ok, does this look right? It looks like I have 2 copies of the same rom on the same partition.
Click to expand...
Click to collapse
This means that IMG doesn't exist or corupted. You need to create a good IMG & activate it: Create IMG >>> wait for the LED >>> Update Configurations >>> Activate Virtual System >>> Select Primary IMG
hsbadr said:
This means that IMG doesn't exist or corupted. You need to create a good IMG & activate it: Create IMG >>> wait for the LED >>> Update Configurations >>> Activate Virtual System >>> Select Primary IMG
Click to expand...
Click to collapse
I fixed it. The problem was my ext4 partition on the sd wasn't big enough. I tried to set up exactly 4 gb but of course it came out 3.68 gb instead. So I went back and expanded it to 5.4 gb. Now the status is right.
Could I replace this virtual image with the stock rooted LP image with Root Explorer and it would work? This one was done with MoRom. I'd like to have the stock rom too.
Or could I flash the 2 part recovery flashable LP update with either MultiSystem or Flashfire without wiping system or data? If I wipe system I'll lose the MultiSystem directory right?
Update: Or should I wait for Jasmine?
Sent from my SM-N910V using XDA Free mobile app
Any chances this will work for the Note Edge before I go through all the work?
stueycaster said:
I fixed it. The problem was my ext4 partition on the sd wasn't big enough. I tried to set up exactly 4 gb but of course it came out 3.68 gb instead. So I went back and expanded it to 5.4 gb. Now the status is right.
Could I replace this virtual image with the stock rooted LP image with Root Explorer and it would work? This one was done with MoRom. I'd like to have the stock rom too.
Or could I flash the 2 part recovery flashable LP update with either MultiSystem or Flashfire without wiping system or data? If I wipe system I'll lose the MultiSystem directory right?
Update: Or should I wait for Jasmine?
Click to expand...
Click to collapse
Great! Yes, you can add virtual ROMs with any root explorer. I'd suggest to increase the EXT4 partition size & keep it for ROM or even backups (it's faster & more reliable compared to FAT32/exFAT). You can add this rooted ROM, unrooted stock ROM (for enterprise, etc), and/or wait for JasminROM.
rlkirkland said:
Any chances this will work for the Note Edge before I go through all the work?
Click to expand...
Click to collapse
Yes, but not tested yet.
hsbadr said:
Great! Yes, you can add virtual ROMs with any root explorer. I'd suggest to increase the EXT4 partition size & keep it for ROM or even backups (it's faster & more reliable compared to FAT32/exFAT). You can add this rooted ROM, unrooted stock ROM (for enterprise, etc), and/or wait for JasminROM.
Click to expand...
Click to collapse
I'm obviously doing something wrong or I've left a step out. I placed the stock rooted LP .img into the /MultiSystem/img/system file using Root Explorer. I opened MultiSystem, tapped Install MultiSystem, chose the virtual rom that I copied originally as Primary System image, the rooted LP image as secondary System Image, tapped Update Configurations, closed the MS app then rebooted. When the LED lit up I tapped the down volume rocker til the light went out. Then when it finishes booting it says it's the stock system instead of the secondary virtual image.
Update: Even when I try to choose the primary virtual image it boots the stock system.

Installing LOS 15.1 on Nexus 4 with open GApps no longer possible??

Hi, what are the storage requirements for the /system partition for LOS 15.1?
I tried upgrading LOS 14.1 + opengapps nano to 15.1 + opengapps nano after the updater notified me of availability.
Initial attempt to upgrade the system ended in failure (made apparent with opengapps installer, not LOS) which I tracked down to the LOS installer completely exhausting the free space on /system - the build.prop file was empty and opengapps refused to install, citing incorrect SDK version.
So next I tried wiping the /system partition and then installing both again - LOS installer finished successfully, but this left free space of only ~120 MiB, not enough for opengapps nano. Is it expected that a fresh install of LOS without opengapps takes ~700MiB?
I used pico. Wipe the system area, install the nightly, Mount system, delete system/app/jelly or system/app/email and then install gapps.
st3v3ntehl33t said:
I used pico. Wipe the system area, install the nightly, Mount system, delete system/app/jelly or system/app/email and then install gapps.
Click to expand...
Click to collapse
Sorry, can't quickly try that - already reverted the device to the backup of 14.1 Do you mean you had to delete stock LOS apps to even install the pico opengapps package?
According to description, the diff between pico and nano is Health services and Google search, neither of which is installable from the play store, AFAICT (and would prefer to leave them in). Is there an option for a proper solution, eg. repartitioning the flash so that the system partition is big enough to hold it all? (How big is the system partition on phones factory-shipped with Android 8.1, anyway?)
Yes, that's correct there's not enough space to install gapps with all the factory apps installed. It was asked how this ROM could even go official with lineage when you have to do this work around to get play store functionality but technically having the play store is not a requirement for lineage os. (There's other options). Afaik it's only an issue because of the size of the actual system allocated area (call it a partition if you want) on the Nexus 4 itself. After you get it installed you can install apps to replace the ones you deleted.
Glad I found this post. Thanks for the details, because I was going around in circles trying to figure out what could be wrong.
While GApps are technically not "required", not allowing space for their install - which is likely very common - seems very short-sighted. Furthermore, the Install page offers the option (instructions) of flashing the GApps zip. If they're not going to leave any room for it, they should either document that, or mention that they didn't leave any room for you to do it. And really, the partition should just be sized big enough to allow for it.
st3v3ntehl33t said:
I used pico. Wipe the system area, install the nightly, Mount system, delete system/app/jelly or system/app/email and then install gapps.
Click to expand...
Click to collapse
Thank you, pico actually worked!
To anyone is still not on LOS 15:
Repartitioning is fairly simple (although time-consuming, expect the data transfers to/from PC to take ~90 minutes in total), as the device's storage uses plain GPT as a partitioning scheme. Reposting my answer on stackexchange:
I eventually found this thread, where the author prepared an archive with gdisk and a few other tools.
Requirements:
Computer/VM with adb, fsck.ext4 and resize2fs
This zip file
Overview
The relevant partitions (system and userdata) are 21st and 23rd on the storage. The 22nd partition is just cache, so there's no harm nuking it, and making a new one after data from the other 2 are in place.
The TL;DR version of the procedure is:
boot into recovery, unmount everything
pull the data partition to computer
Code:
[PC] adb pull /dev/block/mmcblk0p23 userdata.img
put gdisk on the phone, and use it to modify the partition table - grow system while retaining its starting sector, shrink userdata by the same amount, and re-create cache between them
Code:
[PC] adb push gdisk /tmp/
[adb-shell] /tmp/gdisk /dev/block/mmcblk0
...
use resize2fs on the phone with the system partition to grow it
use resize2fs on the computer with the userdata partition's image to shrink it to appropriate size
push the modified data image to the phone
Code:
[PC] adb push userdata.img /dev/block/mmcblk0p23
format the cache partition, reboot into system
EDIT: I'm intentionally leaving out the details of what to do with gdisk, as I think using sgdisk's output and a text editor to just change the partition boundaries is the proper way to do this. If you really want and need some hints though:
On the phone, all of the affected partitions started on 8MiB-aligned sectors, and I maintained the alignment after the resize. It also makes specifying the new size to resize2fs straightforward
Partition name in the GPT, and unique GUID should be maintained after resize.
Oh, and regarding LOS-15 installation, the installer will image the system partition with original, 840MiB filesystem, and won't grow it, so subsequent g-apps installation will fail. It's necessary to grow the filesystem manually and then install g-apps.
myxal said:
push the modified data image to the phone
Code:
[PC] adb push userdata.img /dev/block/mmcblk0p23
Click to expand...
Click to collapse
putting aside missing information about how to get and use sgdisk (or gdisk) you're also not saying what modification has to be done to userdata.img and if this modification works with encrypted /data
rotanid said:
putting aside missing information about how to get and use sgdisk (or gdisk) you're also not saying what modification has to be done to userdata.img and if this modification works with encrypted /data
Click to expand...
Click to collapse
The modification referred in point 6 is the shrinking done in point 5. I have no experience with encrypted /data (or knowledge how that is implemented, for that matter), so I don't know what extra steps would be needed in that setup.
myxal said:
The modification referred in point 6 is the shrinking done in point 5. I have no experience with encrypted /data (or knowledge how that is implemented, for that matter), so I don't know what extra steps would be needed in that setup.
Click to expand...
Click to collapse
oh, thanks for the fast reply!
in that case, i think it's not possible to keep the data if it's encrypted, because you can't decrypt it on the PC to be able to shrink it

Categories

Resources