yashsingh1/xdaforums huggingface dataset:
[Galaxy S 4 i9505 Original Android Development] chenxiaolong:
That's something I want to work on when I have a little more time ;) I'm probably going to compile Python 2 or 3 for Android and leave the current patcher unchanged. I will need to use other non-script executables, like mkbootimg and unpackbootimg, so I probably won't rewrite the patcher as a bash script.

My goal is to have a simple app where you can select a file to patch and then the app will run the patcher with the arguments it needs. Maybe I'll even have it download the latest patcher automatically :)
[Galaxy S 4 i9505 Original Android Development] chenxiaolong:
It is exactly the size of the second ROM. And there is no effect on the RAM at all :)

You have a few ways to go back to the original state:

1. Restore a non-dual boot backup

2. Delete /system/dual, /system/dual-kernels, /cache/dual, and /data/dual using a root file manager

3. Flash WipeSystemSecondary.zip, WipeCacheSecondary.zip, and WipeDataSecondary.zip

Just remember to switch back to the primary ROM before doing that.
[Galaxy S 4 i9505 Original Android Development] chenxiaolong:
Awesome, thanks for testing!

Thanks for bringing the /cache partition too. I was originally planning on allowing a 3rd ROM to be installed in /cache/triple-system. So,

First - /system

Second - /system/dual

Third - /cache/triple-system

But any combination will also work. It would be possible to have a first and third ROM. I just don't know what I should call them. It would be kinda weird for the app to show Primary and Tertiary ROM with no Secondary. Do you have any ideas? Thanks!
[Galaxy S 4 i9505 Original Android Development] Bejda:
Follow noobdev's CM11 thread instructions ;)
[Galaxy S 4 i9505 Original Android Development] Kondra007:
Can't understand it :(
[Galaxy S 4 i9505 Original Android Development] Bejda:
Basically no need to patch the ROM but to flash a dual boot enable zip first if you want to use it in a dual config as secondary ROM.

It's all written there.
[Galaxy S 4 i9505 Original Android Development] chavdar:
So I currently ran into the following problem - until now I cannot find a way to create a working backup of my second rom.

The dual boot back up app created the backup but cannot restore it

Today I made a full nandroid backup with Philz Recovery 7,5 GB both second and first ROM, but when I restotred, the second rom seems to have lost its /dara partition, although it is all there. No apps from /data are visible (system apps are there) and I get Error -110 when I try to install something with google play. First Rom works fine after the restore. I guess the permissions are somehow mixed up.

Is there a way to backup and restote second Rom? I use as Primary Phoenix v5 and as secondary PAC metaiiica Black Edition

Sent from the GT-I9505 Galaxy
[Galaxy S 4 i9505 Original Android Development] respider:
where is it? cant find it
[Galaxy S 4 i9505 Original Android Development] Bejda:
http://xdaforums.com/showthread.php?t=2383143

Dual-boot instructions> click to show content.

Then same instructions as here except that rom is "pre-patched"/flash dual-boot enable zip before the rom.
[Galaxy S 4 i9505 Original Android Development] respider:
oh didnt know the CM11 thread started in the same thread, title still says CM 10.2

thanks!
[Galaxy S 4 i9505 Original Android Development] Sushibagel:
The dual boot backup app works for me. What error are you having with it. In order to restore you may need to rename one of the backed up files. Check the OP of the thread for it.
[Galaxy S 4 i9505 Original Android Development] rlorange:
UPDATE!! Dual Boot Backup & Restore V1.1a

- Big update!! Bugs fixed both internal and ext SD location supported.

-Tested and working on cm11

http://xdaforums.com/showthread.php?p=46641708

[APP][DUAL-BOOT][19/11] Dual Boot backup & Restore V1.1a
[Galaxy S 4 i9505 Original Android Development] gaww:
I am glad you did what I asked - lol.
[Galaxy S 4 i9505 Original Android Development] gaww:
I cannot patch KT 4.4 kernels (using the Android App) - are they supposed to be supported ?
[Galaxy S 4 i9505 Original Android Development] chenxiaolong:
Yeah, I should probably fix that :P
[Galaxy S 4 i9505 Original Android Development] chavdar:
j already did that (rename). There is no real error message - backup starts, goes very fast through the partitions and says done, but hasn't actually restored anything.

Will try now with 1.1a

Sent from the GT-I9505 Galaxy
[Galaxy S 4 i9505 Original Android Development] rlorange:
If you had problems on an earlier version too then something else might be broken. Bysybox is a likely culprit... Trying to decide which path from the maze of virtual mounted folders is proving tricky
[Galaxy S 4 i9505 Original Android Development] rejanmanis:
Speak English please :rolleyes:
[Galaxy S 4 i9505 Original Android Development] gaww:
Originally Posted by rlorange View Post

If you had problems on an earlier version too then something else might be broken. Bysybox is a likely culprit... Trying to decide which path from the maze of virtual mounted folders is proving tricky

?? - plain enough English from here !
[Galaxy S 4 i9505 Original Android Development] rejanmanis:
Yes, but if someone explain something but it was not easily to understand, we simply said "speak English please"

Means that, could you please explain in brief so that we can follow the instruction :cool:
[Galaxy S 4 i9505 Original Android Development] gaww:
:cyclops:

Understood. Plain English here - he acknowledged the problem and is looking for its source, so unless you are a Dev and can help, sit tight until it is fixed.

I am going to hold off installing new version (I use it a lot) until he and other posters are agreeing it works. Use the current one with the work-arounds until new one is fixed.
[Galaxy S 4 i9505 Original Android Development] chavdar:
This was with 1.0d. Now with 1.1a it even can't start the recovery. Seems that it does not see the folders!

Sent from the GT-I9505 Galaxy
[Galaxy S 4 i9505 Original Android Development] ShAdOw NiNjA:
I'm not able to patch the 4.0 triforce rom. Also tried it with 11-9 pacman rom and cm 11 and none of them were able to patch. Kept getting this message when I tried on windows:

Detected TriForceROM zip

--- Please wait. This may take a while ---

Creating boot image--- ERROR BEGIN ---

--- STDOUT BEGIN ---

patching file META-INF/com/google/android/aroma-config

Hunk #2 FAILED at 89.

1 out of 3 hunks FAILED -- saving rejects to file META-INF/com/google/android/ar

oma-config.rej

patching file META-INF/com/google/android/updater-script

Hunk #5 FAILED at 29.

Hunk #6 FAILED at 31.

Hunk #7 succeeded at 290 (offset -150 lines).

Hunk #8 succeeded at 299 (offset -150 lines).

2 out of 8 hunks FAILED -- saving rejects to file META-INF/com/google/android/up

dater-script.rej

--- STDOUT END ---

--- STDERR BEGIN ---

cygwin warning:

MS-DOS style path detected: c:\users\derek\appdata\local\temp\tmp_27v4b

Preferred POSIX equivalent is: /cygdrive/c/users/derek/appdata/local/temp/tmp_

27v4b

CYGWIN environment variable option "nodosfilewarning" turns off this warning.

Consult the user's guide for more details about POSIX paths:

http://cygwin.com/cygwin-ug-net/using.html#using-pathnames

--- STDERR END ---

--- ERROR END ---

Failed to apply patch

Press any key to continue . . ."

I should also note that I was able to patch chronic kernel without issue.
[Galaxy S 4 i9505 Original Android Development] JoshDaWhite:
Here.Check it out, thanks.
[Galaxy S 4 i9505 Original Android Development] 911-Future_Maker:
[MENTION=4277844]chenxiaolong[/MENTION] Here are the outputs of the ls-lZ binary while corrupted sdcard on primary.

Wohoo! Congrats on the page #1000 of your thread mate!
[Galaxy S 4 i9505 Original Android Development] JoshDaWhite:
Yes this is page 1000.Yay !
[Galaxy S 4 i9505 Original Android Development] Pcsx2006:
[MENTION=4277844]chenxiaolong[/MENTION] [MENTION=6651577]JoshDaWhite[/MENTION] build 285 is working for me I upgraded the ramdisk and it reboot just fine.

Currently I'm using CB 3.5.4 (3.2.7 firmware) as primary and cm14 as secondary rom on data slot
[Galaxy S 4 i9505 Original Android Development] JoshDaWhite:
I will try to update ramdisk and report back, thanks.
[Galaxy S 4 i9505 Original Android Development] samer menla:
Hey guys i need help pls!!, i dualboot cyanogen as my secondary rom and my primary rom is a note 7 porn to the note 5. Ive managed to boot to cm once and then back to primary rom. But then when i wanna go back to cm it says could not determine boot partition because this device's codename "gracelte" is not recognized. Please hepo guys asap!!!!
[Galaxy S 4 i9505 Original Android Development] edyny1:
[MENTION=4277844]chenxiaolong[/MENTION] finally i figured it out to make it work on my Galaxy S6 Edge G925T

See Screenshots:
[Galaxy S 4 i9505 Original Android Development] KaMyKaSii:
Thank you. Attached are the logs. I made on RR, where in a boot the external sd is mounted on / raw / extsd / and the other does not (but in both the corrupted sdcard notification continues and can not use). I also made in primary rom and after updating the ramdisk (thus causing the same error)

But then it means that it really is not necessary to add other partitions in "extra"?

But this will only unmount the mount done by your app. And how can I mount it again with Android and other applications without acknowledging error very elevated permissions for non-root apps or something similar?

But you do not have S4? As the FlashFire is an evolution of Mobile Odin, should work. Or does not work because DualBootPatcher?
[Galaxy S 4 i9505 Original Android Development] Nagytoll:
Hello! Can someone PM me some instructions on how to set this dualboot up? I am using a Oneplus 3 with multirom twrp and freedomOS(OOS 3.2.4) primary, MIUI8 and RR(cm13) as secondaries. I would like to fully migrate from multirom to multiboot with keeping my data.
[Galaxy S 4 i9505 Original Android Development] 911-Future_Maker:
I think you won't be able to remount the extsd once Android already recognized the card as corrupted even that the card is 100% functional and this is false notification. I'm researching about this issue a lot the past few days and I think this is as Chen said a conflict with the file system check on boot (fsck) running by the system and the mbtool mounting the card at the same time. The result is that the rom can't check the card and it's wrongly marked as corrupted. Now, some roms like the latest AICP 11 are bypassing this may be by using kernel scripts or other methods and this is fact. The problem don't exist there. I believe that we'll see a fix in the patcher regarding this issue in the future. The other reason is the delayed mount of the extsd by the kernel which is a part of the above problem, because if the kernel is fast enough to check the card before the mbtool mount it than all will be fine. The questions now are: How we can extend the extsd mount time at boot or how to disable the fsck at boot by the system. The first is hard and the second is impossible I think.

[MENTION=4277844]chenxiaolong[/MENTION] Tell us some magical Linux command to disable fsck at boot that will work in Android. :D

PS: I even tried app like LSpeed for speeding up the kernel at boot, but no luck. Reading some old comments on the web someone said that init.d script at boot will eventually work, but it's questionable moreover we want to run the whole rom from that card.

[MENTION=4277844]chenxiaolong[/MENTION] I have an idea! What if I edit the fstab and move the extsd check to be on top. You know that way the system will check the card first even before checking itself lol. :p The other problem is that I have 3 fstab files on the rom on my K3 Note. .fstab.mt6752, .fstab.mt6752.gen and .fstab.mt6752.completed I don't know which I need to edit, not to mention this is dangerous.

Current .fstab.mt6752, you can see where is the extsd by now, it's checked at the very last position only before the usb otg and the frp partition (Factory Reset Protection).

Most probably editing the boot.img is also required...

/dev/block/platform/mtk-msdc.0/by-name/protect1 /protect_f ext4 noatime,nosuid,nodev,noauto_da_alloc,commit=1,nodelalloc wait,check,autoformat
/dev/block/platform/mtk-msdc.0/by-name/protect2 /protect_s ext4 noatime,nosuid,nodev,noauto_da_alloc,commit=1,nodelalloc wait,check,autoformat
/devices/mtk-msdc.0/11230000.MSDC0* auto vfat defaults voldmanaged=sdcard0:emmc@intsd,noemulatedsd
/devices/mtk-msdc.0/11240000.MSDC1* auto auto defaults voldmanaged=sdcard1:auto,noemulatedsd
/devices/platform/mt_usb auto vfat defaults voldmanaged=usbotg:auto
/dev/block/platform/mtk-msdc.0/by-name/frp /persistent emmc defaults defaults
[Galaxy S 4 i9505 Original Android Development] Andycar:
There are many smart xda users here, so I ask for some help (especially [MENTION=4277844]chenxiaolong[/MENTION])

After I modified ramdisk of my i9505 S4 kernel (machinex by [MENTION=4763308]robcore[/MENTION]), Synapse is bugging me with "No UCI support" mesage upon launch.

I checked the uci script and it's still there with correct permissions:

in uci script, the first two lines get executed correctly i think:

However the "busybox mount -t rootfs -o rw,remount rootfs;" ends up with

If I run the same command straight from the shell , the rootfs gets remounted in rw okay!

So, I went ahead and executed from shell

, and cleared app's data, but still synapse doesn't launch... ((((

Is it because of modified init.rc or something because of other seandroid propertes?

I need hints - thanks!!!
[Galaxy S 4 i9505 Original Android Development] Nagytoll:
Okay I migrated from multirom to this patcher. I have freedomOS(oos 3.2.7) as my main rom but when I tried to install it as primary from the patcher app my phone wouldn't boot, it vibrated 5 times and dropped me into twrp, so I just simply flashed the rom from twrp and now it works. Next I tried to install Resurrection rermix as secondary, everything went well but it only bootloops. What should I do? I'm on oneplus 3
[Galaxy S 4 i9505 Original Android Development] JoshDaWhite:
I have been working with Chen on a solution, follow this thread closely and soon there will be a solution. You need to install boot up, but boot up has some errors now Chen is looking on it.
[Galaxy S 4 i9505 Original Android Development] Nagytoll:
Thank you. Evene though I read the past 30 comments it seemed like someone had some success. Guess I have to stick to oos for now. I have a strange problem where I am unable to install or restore fb messenger to any rom except OOS.
[Galaxy S 4 i9505 Original Android Development] franzyroy:
[MENTION=4277844]chenxiaolong[/MENTION]

Thank you for your work which I liked participated, I changed model, so I do not think I could participate soon as my model does not really other choice than the official firmware. It is a HuaWei Mate 8.

Thanks for all!;)
[Galaxy S 4 i9505 Original Android Development] chenxiaolong:
Is it aio_oftp_m or aio_otfp_m?

Can you post your /sdcard/MultiBoot.log file? You probably ran out of space on your system partition. You may have to install to another slot.
[Galaxy S 4 i9505 Original Android Development] chenxiaolong:
If you're using a ported ROM, you need to add the following to your build.prop:

ro.patcher.device=my_real_device

where "my_real_device" is your device's real codename. Otherwise, the app will think you're using a Note 7 (gracelte).
[Galaxy S 4 i9505 Original Android Development] robcore:
Haha you dweeb send me what you have and what your end goal is! We can figure out whatever you need :)
[Galaxy S 4 i9505 Original Android Development] JoshDaWhite:
Hey check my logs please.
[Galaxy S 4 i9505 Original Android Development] chenxiaolong:
Hmm, without seeing what the app checks for, I wouldn't know what breaks it. The following changes are made to files in rootfs during boot:

If the binary /file_contexts.bin file exists (Android 7.0), it is converted to the text-based /file_contexts format for easier modification.

/file_contexts is modified to include the following lines:

/data/media <<none>>
/data/media/[0-9]+(/.*)? <<none>>
/raw(/.*)? <<none>>
/data/multiboot(/.*)? <<none>>
/cache/multiboot(/.*)? <<none>>
/system/multiboot(/.*)? <<none>>

Any conflicting lines are removed.

/init.rc is modified to include the following at the beginning

import /init.multiboot.rc

/init.multiboot.rc is created with the following contents

service mbtooldaemon /mbtool daemon
class main
user root
oneshot
seclabel u:r:init:s0

If app sharing is enabled, the "installd" service in /init.rc will be disabled and the following contents will be added to /init.multiboot.rc

service appsync /mbtool appsync
class main
socket installd stream 600 system system
seclabel u:r:init:s0

If any of the /*.rc files call the mount command and one of the parameters is "/system", "/cache", or "/data", then the line will be commented out

Various multiboot properties will be added to /default.prop

The /system, /cache, and /data entries will be removed from the /fstab.* file (only in the main fstab file if there are multiple).
[Galaxy S 4 i9505 Original Android Development] JoshDaWhite:
[MENTION=4277844]chenxiaolong[/MENTION] , I want to mention I use unofficial twrp by grarak. I even changed my password to ""password"", but the boot ui doesn't work...
[Galaxy S 4 i9505 Original Android Development] santajulia.ego:
my bad, its aio_otfp_m

this is my log and this its my space in system
[Galaxy S 4 i9505 Original Android Development] chenxiaolong:
Thanks for the logs! Can you try the new test build at https://github.com/chenxiaolong/DualBootPatcher/pull/237?

Everything looks good in the logs you gave me. The reason I think fsck is failing to run (causing corruption notification) is because it was overridden with a shell script and the SELinux policy doesn't allow the shell to run. This new test build overrides fsck with an actual binary.

Correct. That option exists for installers that need direct access to partitions. For example, the "update-binary" for most Lenovo K3 Note (another MTK device) ROMs always requires access to the "preloader" partition.

I was wrong about what I said. You'll want to unmount /raw/extsd first and the look at:

mount | grep fsck

If you see any fsck paths in the output, you'll need to unmount them (eg. "umount /system/bin/fsck_msdos").

For some reason, it doesn't work on my old S4 (SGH-M919 - T-Mobile Galaxy S4). Even without multiboot, it crashes the device and causes it to reboot before anything happens.
[Galaxy S 4 i9505 Original Android Development] chenxiaolong:
Thanks!

You're not going to want to hear this, but looking at the logs, your device uses Qualcomm's hardware encryption and thus, will probably never work properly with DualBootPatcher (unless you decrypt your device). It's the same reason why MultiROM won't work with encryption either.

The hardware encryption requires Qualcomm's "qseecomd" service to be started in order to mount the encrypted /data partition. With some effort, DualBootPatcher can do this. However, Android will no longer boot because it also needs to start "qseecomd" and two instances cannot run at the same time. Your best bet is probably to decrypt your device.
[Galaxy S 4 i9505 Original Android Development] chenxiaolong:
I may have found a way around the corrupted SD card error. Could you try the test build here? https://github.com/chenxiaolong/DualBootPatcher/pull/237 (It contains some unrelated changes, but they won't affect you.)

The error basically boils down to Android not being able to run /system/bin/fsck_msdos to check the SD card's filesystem. mbtool normally disables this program by mounting a dummy shell script on top of /system/bin/fsck_msdos. This is needed because Android can't check the filesystem if the SD card is already mounted at /raw/extsd when Android boots. For whatever reason, the dummy script won't run on these MTK devices so Android thinks that the filesystem check failed and thus, displays the corrupted SD card notification.

The mount options are the same as what the patcher uses, so we should be good there :)

Done!

Boot UI won't help here because the partitions are mounted before the Boot UI starts. Otherwise, it wouldn't know what ROMs are installed.

This is done to support both 32-bit and 64-bit ROMs on your device. Since all 64-bit ROMs can run 32-bit programs perfectly fine, having the "armeabi-v7a" value will not be a problem.
[Galaxy S 4 i9505 Original Android Development] chenxiaolong:
Thanks! These all look good.

Thanks! And congrats on making the #10000'th post :D

Try:

# If using SuperSU:
su --mount-master -c "umount /system/bin/fsck_msdos"
# If using other root methods:
su -c "umount /system/bin/fsck_msdos"

Not sure if it'll work, but maybe...

That won't help unfortunately. There's no way to slow down mbtool (yet) so that the kernel detects the SD card sooner.

Btw, the ".gen" and ".completed" files are useless. mbtool creates those to remain compatible with very old 8.0.0 versions of the patcher.
[Galaxy S 4 i9505 Original Android Development] chenxiaolong:
Yep, looks like you ran out of space:

665 Symlinking... writing 8192 bytes from zip file from 0xffe2b4ec: [b]No space left on device[/b]

You'll need to install to a different slot. The system partition is different from the internal storage. You can see the size of this partition from the "Free space" section of the DualBootPatcher app.

Also, the codename has been added and will be available in the next version.
[Galaxy S 4 i9505 Original Android Development] chenxiaolong:
Could you try this test build? https://jenkins.noobdev.io/job/Dual...r-builder && fast,target=android-all-gcc/294/

When it gets stuck at the Note 3 logo, please let it sit there for 1 minute before flashing the old boot image. If all goes well, it should create a log file at /cache/kmsg.log. If you could upload that file, that would be great!

Yep, I added a small hack to hide the "KERNEL IS NOT SEANDROID ENFORCING" message. The bootloader doesn't actually check for SELinux/SEAndroid, so the message is inaccurate and to be honest, it looks very ugly :)
[Galaxy S 4 i9505 Original Android Development] MisiekDP:
File is in attachment. Thank you! I wait for more info and I will go sleep :p

It could be a problem with symlinks. I saw "File exist" in kmsg.log.

Thank you again! :)

EDIT: And congrats for 10 000+ posts in your thread :D
[Galaxy S 4 i9505 Original Android Development] chenxiaolong:
Woohoo! I'm glad we finally have a way to grab the kernel log. So it looks like the boot is failing right after trying to load SELinux. Do you happen to be using TW 6.0? If so, that's not working with DualBootPatcher yet. It's the next big thing I plan to fix now that I have an S7 Edge.

Thanks! :D
[Galaxy S 4 i9505 Original Android Development] santajulia.ego:
Excelente!!! :victory::victory::victory::victory::victory::victory::victory:

Tnx man, you are awersome, and i gona keep an eye on that problem, tnx again and i will wait for the new update then.:good:
[Galaxy S 4 i9505 Original Android Development] dikime:
You're welcome :)

https://youtu.be/55KJ9efF-MA?t=1752
[Galaxy S 4 i9505 Original Android Development] JoshDaWhite:
Thank you. It was worth a try...
[Galaxy S 4 i9505 Original Android Development] 911-Future_Maker:
[MENTION=4277844]chenxiaolong[/MENTION]I raised my hopes high and I'm surprised that the new build with the fsck fix didn't fix the issue, the "sdcard corrupted" message is still there. I'm starting to think that updating the ramdisk is causing this. And for whatever reason using the new 42 build I can't boot a rom from data slot (data3, you'll see it in the logs) while previously I successfully installed that rom (and using right now) again on data slot. Also I deleted the kernel.log after installing the new build to give it a fresh start and now I don't see the file anywhere, it's not getting recreated.

Also running the command:

su --mount-master -c "umount /system/bin/fsck_msdos"

returned Invalid argument:

umount: /system/bin/fsck_msdos: Invalid argument

I noticed the same with the fsck while using the ls-lZ commands. It worked while the extsd was "corrupted".