[Q&A] MultiSystem for Android - Verizon Galaxy Note 4 Q&A, Help & Troubleshooting

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.

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] KitKANG 4.4 by spezi77 - how to remove INT2EXT4 script properly?

Hi all,
i was testing this ROM and it works pretty well for a pre-alpha release. Actually there is a known issue (Settings / Apps / Properties -> FC) that is driving me nuts... I really need to open the Properties to move certain apps to "internal".
There are a couple of apps natively installing parts on SD card, for example Final Fantasy 4 or the XDA developers app. For whatever weird reason when the phone is rebooting these apps are completely disappearing and need to be reinstalled from the Playstore. This is happening to all apps which are "on SD card" in Settings / Apps.
So far i could not figure out why these apps are disappearing, but i believe the Properties FC is related to the INT2EXT4 script. I tried removing the script from init.d folder in the zip file to use Mounts2SD from Playstore instead. Did a full wipe and reinstalled, but then everything was force closing at setup wizard sceen.
Is it possible to remove the INT2EXT4 script from this ROM without crippling it completely? If yes, what is the procedure to remove it properly?
Any help would be appreciated.
Thanks for opening up a Q&A thread.
To remove INT2EXT and make a full restore of A2SD, you have to
1. remove 40int2ext from system/init.d/
2. copy the following files from any JB rom with A2SD support:
- system/init.d/03sdcard
- system/init.d/10apps2sd
- system/bin/a2sd
Click to expand...
Click to collapse
I hope this will solve your problem.
Another thing to check, how did you partition your sd card? Should be done with 4EXT recovery or gparted only (not minitool)
Backup and repartition your sd card if it's not done with those methods. One FAT32 partition, one 1.5-2GB max ext4 partition, no need for swap even though I think it says in OP.
To get around apps installing partially on sd card you could try a couple of things instead of replacing the script as it should work:
- Use titanium backup, long press an app and to move them to 'internal' to move to sd-ext, gets around having to navigate app settings
- I believe the ROM comes bundled with Xposed? Find a module called Modaco Toolkit, has a system option to 'Disable Forward Lock' which should prevent auto installation of apps to SD card (it works for me on Nexus devices preventing apps installing to virtual /mnt/asec sdcard partition, not tested with a real SD card but I believe the principle is the same, try it). If this method works, it's cleaner as apps should always get installed to 'internal' (sd-ext) in the first place.
spezi77 said:
Thanks for opening up a Q&A thread.
To remove INT2EXT you have only to remove it from system/init.d/
But you will have to copy 03sdcard into system/init.d/ folder. This script comes along with a2sd and is responsible for mounting the sd-ext.
I hope this will solve your problem. If not you should insert the following files for a full restore of a2sd:
- system/init.d/03sdcard
- system/init.d/10apps2sd
- system/bin/a2sd
Click to expand...
Click to collapse
Thanks for the quick response.
Tried your suggestion without success. As soon as I remove INT2EXT from init.d in the zip file ROM is going crazy force closing everything after fresh installation. Very strange... Restoring A2SD didnt help either. Is it only me or is it reproducible for other users?
eddiehk6 said:
Another thing to check, how did you partition your sd card? Should be done with 4EXT recovery or gparted only (not minitool)
Backup and repartition your sd card if it's not done with those methods. One FAT32 partition, one 1.5-2GB max ext4 partition, no need for swap even though I think it says in OP.
To get around apps installing partially on sd card you could try a couple of things instead of replacing the script as it should work:
- Use titanium backup, long press an app and to move them to 'internal' to move to sd-ext, gets around having to navigate app settings
- I believe the ROM comes bundled with Xposed? Find a module called Modaco Toolkit, has a system option to 'Disable Forward Lock' which should prevent auto installation of apps to SD card (it works for me on Nexus devices preventing apps installing to virtual /mnt/asec sdcard partition, not tested with a real SD card but I believe the principle is the same, try it). If this method works, it's cleaner as apps should always get installed to 'internal' (sd-ext) in the first place.
Click to expand...
Click to collapse
1 GB sd-ext partition created with 4EXT, no swap. Had bad experience with minitool and even gparted so I always use 4EXT for partitioning. Works fine for every other JB or ICS ROM.
***facepalm*** YES OF COURSE TB!! - that's the workaround, shame on me... Sometimes you don't see the wood for the trees...
BTW with Xposed and Gravity / Modaco toolkit Final Fantasy 4 refused to start, I had to remove both modules to get it working again.
Thanks a lot for driving me to the right direction, I'm fine with the workaround for now.
Siluxsept said:
Thanks for the quick response.
Tried your suggestion without success. As soon as I remove INT2EXT from init.d in the zip file ROM is going crazy force closing everything after fresh installation. Very strange... Restoring A2SD didnt help either. Is it only me or is it reproducible for other users?
Click to expand...
Click to collapse
Did you make those changes directly on your device? If yes, I suppose to modify the .zip instead and then flash it after doing a full wipe.
spezi77 said:
Did you make those changes directly on your device? If yes, I suppose to modify the .zip instead and then flash it after doing a full wipe.
Click to expand...
Click to collapse
No I did not change anything at OS level - that's the weird thing, i always adjust the zip file and flash it after full wipe.
Siluxsept said:
No I did not change anything at OS level - that's the weird thing, i always adjust the zip file and flash it after full wipe.
Click to expand...
Click to collapse
Tested one more time with a fresh download. As soon as I remove int2ext from zip file and flash it after full wipe all apps are force closing at setup wizard screen.
Siluxsept said:
Tested one more time with a fresh download. As soon as I remove int2ext from zip file and flash it after full wipe all apps are force closing at setup wizard screen.
Click to expand...
Click to collapse
That's really strange. However, thanks for your feedback. For the next version, I will create two variants of the rom (a2sd/int2ext).

[APP][UTILITY] Dual Boot Patcher

Dual Boot Patcher - Dual boot any ROMs on your Galaxy Grand Prime VE
Huge thanks to @chenxiaolong for his wonderful app, bringing a new life to our device
Now let's get started!
This app patches...
Custom kernels for dual boot support
ROMs so that they can be installed as secondary
Google Apps packages for AOSP-based ROMs
SuperSU so that it can be used in the secondary ROM
NOTE: If you want to dualboot a TouchWiz ROM, I highly recommend installing TW as the primary ROM. Otherwise, any mods will need to be patched before flashing.
How to use the patcher
Android
Download the patcher apk and run it. Tap "Patch Zip File" from the navigation drawer and choose the file you want to patch.
Windows (GUI)
Double click DualBootPatcher.exe and choose the file you want to patch.
--------
After patching the zip file, a new file, like some_rom_dual.zip file will be created. For example, patching ktoonsez's
KT-SGS4-JB4.3-AOSP-TMO-08.28.2013.zip
would create a new
KT-SGS4-JB4.3-AOSP-TMO-08.28.2013_dual.zip
Instructions for dual booting
Before doing anything, download the Dual Boot Patcher app and the DualBootUtilities.zip from the download section below.
The patcher offers several locations for installing ROMs:
Primary: This is normally used for installing a zip to the primary ROM. It is not required, but is strongly recommended because it has code to prevent the zip from inadvertently affecting other ROMs.
Dual: Dual/Secondary is the first multiboot installation location. It installs to the system partition. This is a good spot for installing a second ROM because it doesn't take any space away from the internal storage.
Multi-slots: There are 3 multislots: multi-slot-1, multi-slot-2, multi-slot-3. These install to the cache partition. This is specifically for devices, like the Galaxy S4, that have a massive cache partition.
Data-slots: There can be an unlimited number of data slots. These install to the data partition and eat up space on the internal storage. This is useful for devices where the system partition is nearly full and the cache partition is tiny. These slots are named "data-slot-[id]", where "id" is something you provide in the app.
Extsd-slots: There can be an unlimited number of extsd slots. These install to the external SD card, which is useful as it keeps the ROMs off of the internal storage. Note that the ROM's data files are still stored on the data partition.
With that said, let's get to the "how to"!
First, boot into your primary ROM and install the Dual Boot Patcher app
Open the app and go to "Roms" in the navigation drawer. It will ask if you want to set the kernel. Make sure that you do.
Go to "Patch zip file" in the navigation drawer and patch the ROM or zip you want to install. You can select one of the installation locations described above.
There are two ways of flashing the patched zip file. You can either flash it normally from recovery or flash it using the in-app flashing feature. Both methods are explained below.
Flashing from recovery
To flash from recovery, just flash the patched zip file like you would for any other zip. Nice and simple.
In-app flashing
To use in-app flashing, go to "Roms" in the navigation drawer, tap the floating button on the bottom right, and add the zips you want to install. You can queue multiple zips and they will all be flashed in one go. Once you've added all the zips you want to flash, click the check mark in the action bar and they will be flashed right away.
A normal backup from recovery will backup every ROM. If you would like to back up ROMs individually, please see @rlorange's awesome tool: http://forum.xda-developers.com/showthread.php?t=2491299
How do I...?
Switch the ROM if something doesn't work properly?
You can flash the DualBootUtilities zip from recovery. It will provide a menu interface that allows switching to the various ROMs.
If you have TWRP, you can also switch manually by tapping Install -> Images (bottom right) -> Go to /sdcard/MultiBoot/[Your ROM]/ -> flash boot.img.​
Wipe /cache, /data, /system, or dalvik-cache?
The easiest way is to do it from the app while booted in another ROM. Just go to "Roms" in the navigation drawer, tap the 3 dots options menu for the ROM you want to wipe, and tap "Wipe ROM".
Alternatively, flash the DualBootUtilities zip from recovery, which will also allow you to wipe a ROM.
NOTE: Don't use the recovery's built-in wiping abilities as that may delete non-primary ROMs!​
Update the primary ROM?
Patch the zip for primary and flash it. The "primary" installation target is designed so that other ROMs won't be affected when you want to flash something for the primary ROM.​
Update a non-primary ROM?
Patch and flash the zip exactly like how you did it the first time.​
Flash a mod or custom kernel for the primary ROM?
Patch it for primary before flashing. If the zip does not wipe /cache, it is also safe to flash it directly.​
Flash a mod or custom kernel for a non-primary ROM?
Just patch and flash it ​
Downloads:
[LINK] Dual Boot Patcher
[LINK] DualBootUtilities.zip
Source code:
DualBootPatcher: https://github.com/chenxiaolong/DualBootPatcher
Build instructions: https://github.com/chenxiaolong/DualBootPatcher/tree/master/docs
XDA:DevDB Information
Dual Boot Patcher, Tool/Utility for the Samsung Galaxy Grand Prime
Contributors
doesntexits, chenxiaolong
Source Code: https://github.com/chenxiaolong/DualBootPatcher
Version Information
Status: Testing
Created 2016-12-21
Last Updated 2016-12-21
Reserved
Reserved
Whats dual boot do?
Owen007 said:
Whats dual boot do?
Click to expand...
Click to collapse
That means you can install both rom and use it both. Its like when you install another OS on top of Windows
naimrlet said:
That means you can install both rom and use it both. Its like when you install another OS on top of Windows
Click to expand...
Click to collapse
Oh ok like in windows gr8 thing. Mean I can have two os.
Owen007 said:
Oh ok like in windows gr8 thing. Mean I can have two os.
Click to expand...
Click to collapse
Like cm13 and 14.1on the same phone or touchwiz and cm
Not Working
it's a great utility bt needs fix. I tried dual booting cm13 but image verification failed when flashing the patched image then i looked up updater-script and removed code block of SHA verification. pathced zip flashed successfully this tym bt still i m not able to boot cm13. dual boot patch app says cant switch the rom then i tred dual boot utilities frm recovery but it also dnt let to continue after the device information screen is shown
d1v1n3 said:
Not Working
it's a great utility bt needs fix. I tried dual booting cm13 but image verification failed when flashing the patched image then i looked up updater-script and removed code block of SHA verification. pathced zip flashed successfully this tym bt still i m not able to boot cm13. dual boot patch app says cant switch the rom then i tred dual boot utilities frm recovery but it also dnt let to continue after the device information screen is shown
Click to expand...
Click to collapse
First, to work with CM13, you have to edit updater-script of the patched ZIP a little bit
Find any lines with "/dev/block/bootdevice/by-name/XXXX", for example:
Code:
block_image_update("/dev/block/bootdevice/by-name/SYSTEM", package_extract_file("system.transfer.list"), "system.new.dat", "system.patch.dat");
Change "bootdevice" to "platform/sdio_emmc", like this:
Code:
block_image_update("/dev/block/platform/sdio_emmc/by-name/SYSTEM", package_extract_file("system.transfer.list"), "system.new.dat", "system.patch.dat");
The partitions path I used before for CM13 was for recovery usage only, and DBP seems couldn't find bootdevice path from /dev/block. Also, there's no need to remove system verification from updater-script
Cheers,
working perfectly
doesntexits said:
First, to work with CM13, you have to edit updater-script of the patched ZIP a little bit
Click to expand...
Click to collapse
Thank you so much. i am happy that u have fixed this in the new update of cm13 and yes it's working now. without updating the updater-script i've another question too. there is app sharing feature bt when i try to open that it says that mbltools not enabled and ramdisk needs update. it would be so nice if app sharing can be enabled. any solution for this?
waleeds1 said:
Like cm13 and 14.1on the same phone or touchwiz and cm
Click to expand...
Click to collapse
Any rom m8
naimrlet said:
Any rom m8
Click to expand...
Click to collapse
I know mate. I was giving an example
---------- Post added at 04:55 PM ---------- Previous post was at 04:53 PM ----------
Btw will it heavily affect the space as 8gb rom is really less with arround 3 gb left for use apps and after another rom it will be even less
Thanks for this man !
Can this work on g530h xxu,?
naimrlet said:
Any rom m8
Click to expand...
Click to collapse
Is it safe to use this with the 8.0 ROM with Los 14.1 ?
waleeds1 said:
Is it safe to use this with the 8.0 ROM with Los 14.1 ?
Click to expand...
Click to collapse
Yes, of course. I use this app for the whole time to test new Oreo builds
remilia15 said:
Yes, of course. I use this app for the whole time to test new Oreo builds
Click to expand...
Click to collapse
Thanks gonna try both of em now, Oreo and this because I was reluctant to switch from your los 14.1 to Oreo untill stable build for Oreo would have been released but now I'll try it.
remilia15 said:
Yes, of course. I use this app for the whole time to test new Oreo builds
Click to expand...
Click to collapse
Can you tell me how much system space does the ROM needs as I am running out of system partition while flashing the ROM I have applied the screen shot of how much space I have, the system size is the free storage as I will be removing that ROM. You could look it in the patcher app
waleeds1 said:
Can you tell me how much system space does the ROM needs as I am running out of system partition while flashing the ROM I have applied the screen shot of how much space I have, the system size is the free storage as I will be removing that ROM. You could look it in the patcher app
Click to expand...
Click to collapse
For convenience, better keep system partition more than 700MB free space. IMO, most of our N ROMs are more than 600MB big
Or you can install the secondary ROM on SD card or the data partition instead. DBP has that option tho
remilia15 said:
For convenience, better keep system partition more than 700MB free space. IMO, most of our N ROMs are more than 600MB big
Or you can install the secondary ROM on SD card or the data partition instead. DBP has that option tho
Click to expand...
Click to collapse
Thanks for the reply, I know it has that option but but I want it to be in system partition so that it doesn't take up other space and also to maintain stability.

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

[OFFICIAL] TWRP 3.7.0 | DRG/DRG_sprout support thread

Note - I am not responsible for bricked devices
About TeamWin Recovery Project
TWRP is an open source, community project. TWRP development is done by roughly 4 people at this point. We also have a large support community with many people who are willing to answer questions and help people with their devices either through our Zulip channel or on forums like xda-developers.
Team Win was originally formed to work on porting WiMAX to CM7 for the HTC EVO 4G. After our work on the EVO 4G we wanted to work on a project that would work on more devices than just the EVO 4G and we settled on working on a recovery. Today TWRP is the leading custom recovery for Android phones.
A custom recovery is used for installing custom software on your device. This custom software can include smaller modifications like rooting your device or even replacing the firmware of the device with a completely custom "ROM" like OmniROM
You can find the source code for TWRP at github.com/teamwin/android_bootable_recovery/
Installation procedure
1 . Download the latest TWRP img file from the downloads page
2. Boot to fastboot, and use a PC to boot into TWRP using the command: fastboot boot (TWRP filename).img
3. Head to TWRP's advanced section
4. Press "Flash Current TWRP"
Note: the installed TWRP will be lost if you flash another ROM or update your ROM, and the process has to be repeated then.
Find the Nokia 6.1 Plus (OPEN SOURCE!) Community here​
XDA DevDB Information
TWRP for the Nokia 6.1 Plus / X6
Device Tree
Version Information
Status: Stable
Current Stable Version: 3.6.0
Like my work? Consider donating!
https://ko-fi.com/Sid127
UPI users - [email protected]
Great job !
Official builds are now up for download, please refrain from downloading any version other than v3.6.0
Will it work for Android 12? Thanks for the good work...
goodlife1870 said:
Will it work for Android 12? Thanks for the good work...
Click to expand...
Click to collapse
yessir, you can flash any ROM that our device supports with this TWRP
Sid127 said:
yessir, you can flash any ROM that our device supports with this TWRP
Click to expand...
Click to collapse
Thanks so much Sir Sid127... I appreciate...
How awesome is that - thank you for your hard work, @Sid127.
TWRP's new Advanced -> "Flash Current TWRP" feature has the same effect as its predecessor "Install Recovery Ramdisk", with the advantage of not having to manually select the twrp.img file and then flash it - very convenient! So more appropriately it should be labeled "Flash (or Install) Current TWRP as Recovery Ramdisk". Both features enable booting into TWRP rather than the ROM's built-in recovery when choosing to boot into Recovery.
So here's my report:
(Almost) all ¹ is working mighty fine on my new Nokia 6.1 with the official LineageOS 18.1 (Android 11) ROM, except three things (+ one feature missing):
1) After (while booted into LOS) formatting my SD card as internal and having LOS move all data from phone internal to SD, making the SD card the only/ exclusive Internal, TWRP does't or can't access the SD card anymore.
As supposed, I have a PIN set in LOS. Once TWRP has booted, I enter the PIN as requested by TWRP, but after doing so, only see (as before with the SD as mobile storage) that DATA gets decrypted successfully, but no mention of or even an attempt to also decrypt the content of the SD card.
In TWRP storage picker, I do see my SD card with full size (appr. 128 GB), + Internal Storage (19 of the nominal 32GB). But regardless if I choose Internal Storage or MicroSD, TWRP does not see my previous backups (which are now on the encrypted "internal" SD).
Same in TWRP File Manager: the content of the SD formatted as and then dedicated as sole internal and thus encrypted by LOS does not show up anywhere (SDCARD/ SDCARD1/ Storage/ mnt etc.).
Still, after choosing "Internal Storage" as backup location, TWRP does backup. Afterwards I can choose that backup via "Restore", and also see it in File Manager in /sdcard/TWRP. But when I boot LOS, I do not see the new backup in /sdcard/TWRP, only the older ones. The new backup is nowhere to be found, not even via FX File Manger with root privs, querying the entire file System. Obviously TWRP created the backup into the phone's real internal, but LOS has blinded that out after migrating Internal -> SD, most likely by means of a virtual symlink internal /sdcard -> external /sdcard1, and TWRP does not honor that.
Therefore backup options right now are:
- backup to USB via OTG (only partially working, see 3) below)
- backup to internal phone storage, then (while still in TWRP) move (copy then delete) the backup via MTP from internal to a storage on one's computer
All that said, the following (non-exclusionary) questions arise:
1. Are you aware of that?
2. Can you or somebody else reproduce this?
3. Is this fixable somehow, either in TWRP or in LOS?
4. Is this a shortcoming of TWRP in general, failing to also decrypt an SD card if a) it's formatted as internal and b) serves as the phones *only* internal?
5. Or is that an issue that only arises with LOS (18.1) but not with other Android 11 ROMs?
I hope some insights on this issue can be shared and gathered, or even better a fix
2) fastboot reboot recovery doesn't work for me; instead my ROM boots.
Nokia connected to my Mac via USB cable and booted into bootloader. Active slot is the correct one with TWRP and my ROM (LineageOS 18.1, Android 11).
I can however boot TWRP just fine via key combo (Volume Up + Power), and also via Magisk in LineageOS, so it's installed correctly.
3) USB OTG is only working with limitations:
works if TWRP was flashed/ installed as per instructions above, then (with the device powered off and (via USB cable) either connected to your computer or plugged into your charger) boot TWRP via the Power/ Volume Up key combo. (This also works in native install - not recommended because then standard boot will boot into TWRP as default rather than into your ROM)
- NOT working if booted live!
on your connected USB drive, TWRP only sees the 1st partition with a compatible file system (FATxy, ExFAT, ExtFS) incl. the EFI partition! Therefore make sure a) your USB drive does not have an EFI partition as 1st partition; b) the partition you want to backup to is the 1st with one of the compatible file systems!
4) The "Fix Recovery Bootloop" feature option in the "Advanced" section is missing. I was experiencing a boot loop and had to live-boot another TWRP to execute that feaure, which did fix the issue as expected. @Sid127 it would be great if you could re-add that feature.
________________________________________
¹ run live via fastboot w/o flash, flash then boot, decrypt, backup, restore, USB OTG partially
@BladeRunnerA2C @goodlife1870
has any of you inserted an SD card, and if so, have you formatted it as Internal in Android, and then confirmed when Android asked to move all data from Internal Storage to now "internal" SD, making the SD the only internal?
And if so, can TWRP see that?
For the context see my previous post. Trying to narrow things down.
Does fastboot reboot recovery work for anybody? Instead my ROM boots.
Nokia connected to my Mac via USB cable and booted into bootloader. Active slot is the correct one with TWRP and my ROM (LineageOS 18.1, Android 11).
I can however boot TWRP just fine via key combo (Volume Up + Power), and also via Magisk in LineageOS, so it's installed correctly.
When you share if it's working or also not working for you, please let us know your OS + version of fastboot.
twrp-3.6.1_9-0-DRG_sprout.img | ChangeLog
@RootedLee
1 and 3) If I'm not mistaken, SD card as internal is only supported by the ROM, and not by TWRP, and has been a limitation since Marshmallow days. As for USB OTG, most people don't use partitioned USB drives, and hence TWRP returns after finding the first compatible partition.
2) fastboot reboot recovery isn't a valid command on our device, sadly, since the recovery image is embedded in the boot image and not its own partition.
4) I sadly have no control over TWRP features, I can only work on device side things.
hey @Sid127 Friendly Neighborhood Cacodemon, good to hear from you
SD card as internal can't generally be accessed by TWRP if encrypted: OK, bummer - esp. in the light of that you say it's been requested/ suggested since "prehistoric" times. Needless to say it's feasible technically because TWRP can decrypt /Data. Oh well..
TWRP USB OTG:
a) only finding the first compatible partition: as long as only attaching a USB flash drive - OK. But when attaching an external hard disk whose 1st partition usually is the ESP when it's partitioned as GUID, that's inconvenient. At least a function to skip the ESP would make a lot of sense.
b) reliability: does it always work on your Nokia and in any scenario, regardless if you boot into TWRP via key combo after powering on, or from your running ROM?
2) fastboot reboot recovery & 4.) OK, gotcha
BTW did you do the current 3.6.1 port for this Nokia?
@Sid127 I have a (hopefully simple to implement) request: could you add the "Fix Recovery Bootloop" patch into the "Advanced" menu? Because for the Nokia 6.1 (2018) it's necessary.
Would be really awesome if that's not too much out of your way
RootedLee said:
hey @Sid127 Friendly Neighborhood Cacodemon, good to hear from you
SD card as internal can't generally be accessed by TWRP if encrypted: OK, bummer - esp. in the light of that you say it's been requested/ suggested since "prehistoric" times. Needless to say it's feasible technically because TWRP can decrypt /Data. Oh well..
TWRP USB OTG:
a) only finding the first compatible partition: as long as only attaching a USB flash drive - OK. But when attaching an external hard disk whose 1st partition usually is the ESP when it's partitioned as GUID, that's inconvenient. At least a function to skip the ESP would make a lot of sense.
b) reliability: does it always work on your Nokia and in any scenario, regardless if you boot into TWRP via key combo after powering on, or from your running ROM?
2) fastboot reboot recovery & 4.) OK, gotcha
BTW did you do the current 3.6.1 port for this Nokia?
Click to expand...
Click to collapse
yes indeed, 3.6.1 is also out, and it supposedly fixes adoptable storage, so maybe give that a whirl
RootedLee said:
@Sid127 I have a (hopefully simple to implement) request: could you add the "Fix Recovery Bootloop" patch into the "Advanced" menu? Because for the Nokia 6.1 (2018) it's necessary.
Would be really awesome if that's not too much out of your way
Click to expand...
Click to collapse
as much as I'd love to implement features, there's not much I can do on that front because it's again a source side thing and not a device side thing
You are right - 3.6.1 did fix adoptable storage, thanks for letting me know (that fact slipped my attention somehow).
"Fix Recovery Bootloop" patch: OK, gotcha. With 3.6.1 + the latest LOS boot/ recovery that error seems to be fixed anyway
Keep up your friendly neighborhood commitment !
Correction: support for adoptable storage ("AS") is not fully implemented into TWRP 3.6.1:
- in File Manager it's still only the internal storage which shows up
- in the 'Select Storage' dialogue only 'Internal' can be selected, which is still only the internal but not the merged internal/ SD AS
I simply hadn't migrated any data yet which is why all data still resides on internal.
I'm beyond sick & tried of this (not just in TWRP but all across Android) faultily implemented "AS BS" and will revert back to mobile storage for the SD card!
RootedLee said:
will try. Thanks for the links (I had already come across some of them during my research). Quick question in between (just have a minute right now): could it be of any help to edit the twrp.img and replace contained tar binary with the GNU one?
OT: this whole thread should be moved to the TWRP section where it belongs to in the first place because this is a TWRP not a Xiaomi Redmi Note 3 issue to begin with
Click to expand...
Click to collapse
actually (gnu) gtar is only used by my own linux scripts (to imitate twrp look-a-like backup) and schily (standard) star only used by android-backup-extractor. /sbin/tar -> toybox is a symlink, if you want to replace make sure to unlink /sbin/tar first. but it's not used by twrpTar anyway therefore pointless. your backup looks completely broken, try with another backup first. once you ruled out Error 255 you could try to repair backup
@aIecxs smart and circumspect of you to continue the issue (TWRP restore not producing a functional system from FBE (file-based encryption) Data backup after factory reset: either stuck before reaching login screen, or tar error 255 trying to restore Data) here
Now guess what: I'M BACK UP 'N RUNNING !!!! Even (almost) all apps appear to be working fine apart from a few apps which realize that security settings have changed but performed just fine again after restoring from their own built-in backups, see below ¹ (exceptions also see below ²)
Eventually (after all the steps I had already documented in the other thread), here's the only things I just did:
with LOS installed to slot B unencrypted (no PIN), booted into stock TWRP
because the last backup I made with TWRP from my working and encrypted (PIN > FBE) install was in slot A, changed slot to A
thought, what the heck - just try and see if restore of Data (which so far, if I booted into TWRP with an unecrypted Data present and TWRP not asking for the decrypt PW, had always failed with the notorious tar error 255) works, and indeed, it would suddenly run!!!
decided to at this point to only also restore Boot, but not (yet) System
BOOM - back to Homescreen WITHOUT having to enter any PW thus NOT encrypted - Yeeha !!
the Homescreen launcher (stock LOS Trebuchet) was behaving iffy > restart
launcher now working as supposed; everything else (apart from Signal), too, as it seems, incl. Wi-Fi and making calls.
I am not 100% sure but I think the main do-jobbie indeed was
Code:
./busybox gzip -cd data.ext4.win00# | ./tar --selinux --xattrs -P -vxp
run via adb shell, based on your script, along with the special SELinux tar + busybox (all info see here), + the unencrypted install (currently on the other slot), maybe changing the slot to the inactive one and restore form there - I am honestly not sure.
I am SOOO thrilled about your high-profile help (esp. looking at the numerous threads over at TWRP/Issues where people were not able to resolve this). Let me know if I can buy you a coffee or something.
-----------
¹ Apps also running again after restoring their built-in backups: Signal, Swift Backup, Banking4
² Country-specific apps of mine which required a reset by deleting their data: luca, SBB Mobile, Payback)
In general, since some apps rely on software keystore, it is worth making recurring backups of the data/misc/vold folder which is said to contain the keystore files.
-----------
PS: Once all apps are verified running, I'll apply multiple backup tools, not just TWRP..
donate to Sid127 don't thank me
agreed, friendly neighborhood Cacodemon @Sid127 deserves a donation - done !

Categories

Resources