yashsingh1/xdaforums huggingface dataset:
[Galaxy S 4 i9505 Original Android Development] singh54:
These are the steps i followed:

1. I installed the dual boot patcher in my primary rom and had set the kernel for that.

2. Then i used Windows GUI Dual boot patcher to create the patched files of Rom and Gapps by selecting the external sd slot and i used the "same id" for both the files while patching. Copied both the patched files to my sdcard.

3. Then from my primary rom i rebooted to the recovery and installed the secondary rom and then i complete the set up of the secondary rom. After that i installed the dual boot patcher app in the secondary and had set the kernel for Secondary. I am using CM 11, i installed the latest super su file in the secondary rom (cm 11) and i updated the binary of supersu (as it was told to me by one of my friend in xda). After that i switched over to the primary rom.

4. Then after rebooting i flashed the patched gapps file from the recovery. No problem arises, the flashing went well. After rebooting i once again switched over to secondary i saw the google play store and playservices in the secondary:good::good::good::good:

P.S: Also i did another one step, whether i dont know its necessary or not. I renamed the Gapps "file name" same as that of the Rom file after patching the gapps:eek::eek::eek:

I dont know whether the above step is must or not, bcuz one of the user here told me earlier that i have to keep the same name for rom and gapps. Thats y i did like this. I think "the slot id" while patching the files must be same for both, that's what he said i think. But you follow the above steps, it will definitely work dude. Otherwise you try this step i.e. keeping the file names of rom and gapps as same.

Check it out and tell:D:D:D:D:D:D

Hope this simple tutorial !!!!!:cool::cool: will be helpful for you:cowboy::cowboy::good::good:;););)
[Galaxy S 4 i9505 Original Android Development] monkteo:
For my works every time, if I flash the rom and gapps one after one without reboot (or in app flash both, at the same time):good:
[Galaxy S 4 i9505 Original Android Development] todivefor:
It is not necessary to rename the gapps. You only need to be sure the slot-ID is the same.
[Galaxy S 4 i9505 Original Android Development] remowrx:
[MENTION=4277844]chenxiaolong[/MENTION] I'm trying to install CeKMTL's latest 5.0 and 5.1.1 kernels to my Rreapective touchwiz roms but they fail to boot. Stuck at Samsung logo precisely. Attached is the log from attempt of flashing 5.0 kernel to TWrom.

But when I install another kernel in order to get boot I see that Synapse and the other app which comes with the kernel are installed.

Here is the link of the kernel;

http://www.precog.me/2016/01/release-shinto-kernel-nessa-l09a09-for-5-x-x/4/
[Galaxy S 4 i9505 Original Android Development] HearMeWhisper:
any ideas?
[Galaxy S 4 i9505 Original Android Development] chenxiaolong:
Give me a few minutes. I just need to add a little code that says "if AT&T or Verizon, this is a loki'd kernel".

EDIT: Supported in version 2.5.3. Remember to flash loki-doki afterwards :)
[Galaxy S 4 i9505 Original Android Development] HearMeWhisper:
You are honestly one of the best devs I've seen, tremendous support! When I have a few more bucks, I'll donate again. Thanks again, in behalf of everyone who uses this mod
[Galaxy S 4 i9505 Original Android Development] chenxiaolong:
Thanks a lot for the compliments! :laugh::highfive:

ChronicKernel AOSP for locked bootloaders can now be patched in version 2.5.3.
[Galaxy S 4 i9505 Original Android Development] chenxiaolong:
Just dual booted Kit Kat :D Unfortunately, the proprietary binaries crash so the phone can't be used, but hey, at least it boots up as a secondary ROM :)
[Galaxy S 4 i9505 Original Android Development] DreenHotdog:
Hahaha CLOSE ENOUGH! ;D
[Galaxy S 4 i9505 Original Android Development] DreenHotdog:
5
[Galaxy S 4 i9505 Original Android Development] Bejda:
2.5.3 generate-patch.bat on Win7 32 doesn't produce "ready to use" .patch files for me..i need to add an empty line at the end of .patch file for it works otherwise it gives error such as:

Detected HellyBean ROM zip
--- Please wait. This may take a while ---
Creating boot image--- ERROR BEGIN ---
--- STDOUT BEGIN ---
patching file META-INF/com/google/android/updater-script
patch unexpectedly ends in middle of line

--- STDOUT END ---
--- STDERR BEGIN ---
cygwin warning:
MS-DOS style path detected: c:\users\g3\appdata\local\temp\tmp5d80g_
Preferred POSIX equivalent is: /cygdrive/c/users/g3/appdata/local/temp/tmp5d80
g_
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
/windows/hctap: **** malformed patch at line 41:

--- STDERR END ---
--- ERROR END ---
Failed to apply patch

Edit:No sorry,it must be somehow specific to what i was doing (adding a specific hellybean.dualboot.patch file for the patcher handles an edition of "assert getprop" lines of HellyBean updater-script).

It works then if i add the empty line to that one but Vrtheme.dualboot.patch i made before has no empty line at the end and worked perfect as generated.
[Galaxy S 4 i9505 Original Android Development] SilentEYE:
Are we now able to install a AOSP ROM as primary and a Full Stock ROM as secondary on the S4 16 model?

Echoe Roms v6 (non-slim) don't seem to be supported at the moment. ( I posted a feature request to our super Dev chenxiaolong :victory:)
[Galaxy S 4 i9505 Original Android Development] RK:
[MENTION=4277844]chenxiaolong[/MENTION], I patched and installed the cm M1 release on jflteatt and got a bootloop. Any ideas?
[Galaxy S 4 i9505 Original Android Development] FiRe || TeaR:
Hi

really, i like your project

but i try to use the patcher wih HTC One M7 v1.5 (( Port )) to galaxy S4 i9505

http://xdaforums.com/showthread.php?t=2402208

and didn't work

it's give me this message "Unsupported zip"

can you support this rom or no because it's PORTED ??

Thanks :laugh::good::good:
[Galaxy S 4 i9505 Original Android Development] egren58:
Ok so I downloaded everything set up my kernal and patched the 2nd rom. jow idk what the process is to have booth rom boot. Do I juat flash 2nd rom without wiping or when do I flash dualboot utitlities

EDIT I tried to patch goldeneye and it says unsoported file.
[Galaxy S 4 i9505 Original Android Development] hotspace:
I tried patching Negalite-Wonderom-R11 (Sprint) It's a no go. I tried patching Negalite-Wonderom-66 and it worked. I'm going to look at the bash file and try to figure it out again....but the newest Negalite, R11 is not working with the Dual Boot Patcher.apk.
[Galaxy S 4 i9505 Original Android Development] Dugan1017:
I've successfully patched and installed. ..Alpha v11 as my primary and IOKP 10/30 as my secondary. What is the recommended process if I want to update my secondary ROM to a newer build? I've already updated and patched the newer IOKP build, so the file and the gapps are ready to go, but I'm not sure how to wipe beforehand. I'm hoping to avoid a full factory data reset, since that would also mean I'd have to set up everything again in my primary.
[Galaxy S 4 i9505 Original Android Development] tylerholbrook:
Dualbootutilities.zip, flash that in recovery and can't you just wipe second Rom from there?
[Galaxy S 4 i9505 Original Android Development] Dugan1017:
Probably...lol. I haven't played with the utilities since I didn't need them for the initial install. Sounds like there's an potion to only wipe the second ROM? That would certainly make life easier. I'll check it out....thx for the help.
[Galaxy S 4 i9505 Original Android Development] tylerholbrook:
Yeah no problem. Yeah that's definitely an option. There's also an app on here to back up your primary and secondary

http://xdaforums.com/showthread.php?t=2491299

App by rlorange.
[Galaxy S 4 i9505 Original Android Development] smehks:
I cant patch the miui for i9505, says error on zip file? :(it is in the working section so just wondered if anyone have a suggestion? :)
[Galaxy S 4 i9505 Original Android Development] Bejda:
If the error was "unsupported zip" I would have told you to check your miui zip name,support is based on the one from that thread:

http://xdaforums.com/showthread.php?t=2306650

Zip name must fit/includes "miuiandroid_jflte".

Edit: Was thinking (still if the error is unsupported zip) that maybe you're trying to patch the languages pack version? It is named "miuiandroid_lang_jflte" so maybe rename it/remove "_lang" part.
[Galaxy S 4 i9505 Original Android Development] SynnyG:
Hi all !

I've a i9505 with miui v5 translated by miui france as primary ROM. I've used the patcher app on android and correctly done the instruction with the latest PAC ROM and latest PA gapps (the New version compatible with all ROm) and everytime I try To boot on PAC my phone boot on miui... Do you have an idea of what I could done wrong ? Or someone have the couple PAC/gapps for me ? Thanks all !!!
[Galaxy S 4 i9505 Original Android Development] todivefor:
[MENTION=4277844]chenxiaolong[/MENTION] we are getting close on this. I am having two problems. First problem If I flash as outlined above the flash fails running out of space (see multiboot.log). I should have enough space because I am starting with both roms in place. Flashing OTA system over existing data-slot-stockol1 system.

The second problem. I deleted data-slot-stockol1 and reflashed the patched ota md5. It flashed with no problem and booted. At startup, I was setting up wifi when it rebooted to recovery. I did getlogs that are attached. They have a funny date 12/31/14, hopefully because I was in setup (only logs I had). I rebooted and skipped through everything. Now after a minute or two, it reboots to recovery.

Using patcher 22.55 in app.

Let me know if you need anything else.

EDIT 1: One other oddity. Booting back to primary (airplane mode), date is January 1. Also my primary was doing soft reboots, but appears to be fine now.

EDIT2: I think problem two has something to do with a verification failure (custom recovery). I flashed stock recovery and got the same problem. But, when it went to recovery (stock) at bottom there was a message, "dm-verity verification failed..." I still think my recovery is still causing the problem.

EDIT3: I am officially above my head. I think problem 2 has something to do with EFS. I am out of ideas.
[Galaxy S 4 i9505 Original Android Development] tomaasz:
Thank you for help.

You inspired me to try flash gappas from recovery and it works :)

From DualBootApp application I had every time "Installation aborted - error code 70"
[Galaxy S 4 i9505 Original Android Development] ewangw:
Support for Moto X Pure

[MENTION=4277844]chenxiaolong[/MENTION], It was difficult to get, but I finally had to copy the contents of the MB log to a text file in order to get it to you. To answer your question, I believe the X Pure uses F2FS for userdata partition.

Thanks for all your help:D
[Galaxy S 4 i9505 Original Android Development] stiw47:
I have a one question: What is a Leaks app, who cames with DualBoot patcher app?? What means all that notifications/messages MainActivity leaks, leaks this, leaks that, etc... and what mean that message about memory dumping?? Thanks for answer.
[Galaxy S 4 i9505 Original Android Development] nutpants:
The issue where patched TouchWiz 4.4 ROMs (or after updating the ramdisk) will not boot should be fixed in 8.0.0.r2243.g5f809b2.

(Tagging [MENTION=417657]nutpants[/MENTION] since you ran into this issue)

--------

I downloaded 2244 and tried again

Still hangs and after 15 minutes I have up and flashed my boot back to reboot.

Should I wait longer, try a fresh install or would you like another log?

Getting newest now with try again and return with logs

Btw,What is the mbtool used for ?
[Galaxy S 4 i9505 Original Android Development] george stamatos:
Ί have te the same issue for so long, don't bother, mbtool is only for exchange data between roms. So if you don't share app data , you don't need it. I'm happy as it is
[Galaxy S 4 i9505 Original Android Development] physwizz:
To install GApps on a secondary ROM you need to

1. Boot into the primary ROM.

2. Patch the GApps, naming it for the slot you are going to flash to.

3. Flash to the secondary.

Works every time for me.
[Galaxy S 4 i9505 Original Android Development] jroq8400:
Lately I find that I need to flash gapps right after the ROM without booting into it in the middle. Seems to work for all MM CM or AOSP
[Galaxy S 4 i9505 Original Android Development] gc_geforce:
I have noticed that I need to patch the gapps on my computer instead of on my phone and then flash it from the dual boot app.
[Galaxy S 4 i9505 Original Android Development] chenxiaolong:
That is the safest way to do it :)
[Galaxy S 4 i9505 Original Android Development] chenxiaolong:
Hmm, I'm willing to bet you're right about the second issue. Booting the stock recovery won't work since it checks the system partition for any modifications (that's what the dm-verity error is).

The good news (or bad, depending on how you see it) is that the kernel log says something is explicitly trying to reboot into recovery and it's not the result of something crashing, so in theory, it should be fixable. Do you have enough time within the 2 minutes to go to the developer options and enable adb? If so, could you grab a logcat with:

adb logcat -v time -b all '*' > logcat

until the command is killed due to the rebooting. Thanks! I'll take a look at the free space issue once we have this sorted out.
[Galaxy S 4 i9505 Original Android Development] r4veren:
You dude are awesome, this post will be on page 850-something of you giving support to us :) thank you!

And now my findings, I got some better understanding of Android fs, and the roadblock I hit is this:

launching

ls /system/multiboot/dual/system/etc

I get total 0 (I think I rm'ed the /etc contents earlier in attempt to drilldown the cause of the misbehaviour), but launching the

same

command after remounting /system as writeable (mount -o rw,remount /system) I get an instant reboot. Meanwhile I could both ls and rm the bin directory in the same path.

This is not directly related to Multiboot, but perhaps you know how to diagnose this problem?
[Galaxy S 4 i9505 Original Android Development] todivefor:
[MENTION=4277844]chenxiaolong[/MENTION], here you go. It looks like it caught the reboot to recovery.

EDIT: I wish I were better at reading logcats so I could be of more help. I have been staring at this one and it looks like everything is in error :D ie, missing files, R/O system, failure to connect to google API. Actually, my best guess is something with modem. Hope whatever it is, it is fixable.
[Galaxy S 4 i9505 Original Android Development] Champi12301:
Hello, before to proceed i want to know if there is any problem to install any CAF based Rom in my Opo with the patcher....? My primary Rom is not CAF based.

Thanks!

Tecleado desde mi 1+1.
[Galaxy S 4 i9505 Original Android Development] chenxiaolong:
Oh man, I think those *are* all errors lol. The /data partition looks like it's getting mounted read-only, probably because of the date issue because ext4 saves the date it was last repaired/checked for errors. I'd try repairing the filesystem from TWRP by going to Wipe (yeah, I know...) -> Advanced Wipe -> Check "Data" -> Repair or Change File System -> Repair File System. That may be all that's needed to fix the issue.

EDIT2: Those thousands of lines of errors at the end are caused just by the reboot. It's like the apps aren't being killed before the reboot. That's doesn't make me feel very confident about Android's design :D

EDIT: Oh man, this isn't good. It's the factory reset protection:

38338 01-01 00:00:04.230 W/MasterClear( 4458): !!! FACTORY RESET !!!
38339 01-01 00:00:04.230 I/ActivityManager( 4458): Killing 11309:com.sec.android.service.health/u0a22 (adj 15): empty #31
38340 01-01 00:00:04.230 I/am_kill ( 4458): [0,11309,com.sec.android.service.health,15,empty #31]
38341 01-01 00:00:04.230 I/power_partial_wake_state( 4458): [0,StartingAlertService]
38342 01-01 00:00:04.230 W/MasterClear( 4458): !!!Just Exit (For Bypass Factory Reset)!!!

It's trying to reboot to the stock recovery to wipe your data. Good thing the stock recovery doesn't work! Is there a stock rooted ROM (preferably with little to no modifications) available for your device? I can compare that to the Odin image to see what other people have disabled to get the ROM working. If not, that's fine. I'll just have to decompile the framework and take a look.
[Galaxy S 4 i9505 Original Android Development] todivefor:
I tried the repair, but it made no difference (ran very fast). Here is the rom I am running. It is very stock. If aroma is a problem, I can use a prior version I have.

EDIT: That code above looks bad, but backing up from there, I can't see what is causing this???
[Galaxy S 4 i9505 Original Android Development] 911-Future_Maker:
Not necessarily. I'm always patching the zips on my phone and all is good. :)

---------- Post added at 20:48 ---------- Previous post was at 20:46 ----------

I can 1000% confrim that. In the past I was silly enough to flash a new primary rom that wasn't patched and my data-slot rom was gone.
[Galaxy S 4 i9505 Original Android Development] jroq8400:
Loving this on my S4 M919 :)
[Galaxy S 4 i9505 Original Android Development] chenxiaolong:
I can't see what's causing it either... You've dual booted other TouchWiz ROMs before and they worked right? Hmm...

From another ROM, could you add the following to the broken ROM's build.prop?

persist.log.seclevel=1

I'm looking at some decompiled parts of the framework and it looks like there are quite a few places where Samsung hides the logs unless that property is set.

EDIT: And man, do I hate logcats. It's like a giant garbage can for everyone to dump their logs and there's no good way to filter them
[Galaxy S 4 i9505 Original Android Development] todivefor:
I added the code above to build.prop. Attached logcat. Hope it is helpful. There are not many roms available for S6 Sprint. I have another I will try. I have backed up my TW primary and restored to data-slot and booted.
[Galaxy S 4 i9505 Original Android Development] chenxiaolong:
Thanks! Looks like the logcat doesn't contain any more information unfortunately. Just to be sure we didn't miss the obvious, from your working ROM, is Reactivation Lock enabled? (Settings -> Lock screen and security -> Find My Mobile -> Reactivation Lock) I ask only because it seems like many ROMs either remove this feature or modify it in a way that it no longer works.

I'm just not sure why other ROMs would work in the same slot, but not the stock ROM. I downloaded the OJ7 tar.md5 for your device and compared it to the 920P_Renegade_OJ7_Aroma_v1.zip ROM you linked to. These were the differences I found:

Custom ROM disabled SELinux (most likely unrelated)

Custom ROM has various kernel tweaks (most likely unrelated)

Custom ROM is deodexed (definitely unrelated)

Custom ROM deleted /system/bin/install-recovery.sh (possibly related. That script checks the recovery partition)

Custom ROM added "ro.securestorage.support=false" and "wlan.wfd.hdcp=disable" to build.prop (the first property might be related)

EDIT: I see that the date is still incorrect. Does that always happen when you boot into the data-slot? I wonder if that's the cause of the issues.

EDIT2: You mentioned that you thought it might be an EFS issue before. I'm just curious, what made you think it was related to the EFS? Was there something wrong with calls/data/baseband/etc.?
[Galaxy S 4 i9505 Original Android Development] todivefor:
I don't have reactivation lock setting. Is that the same as OEM unlocking in developer options?

I googled "dm-verity verification failed..." and it lead me to efs.
[Galaxy S 4 i9505 Original Android Development] chenxiaolong:
Ah okay, I guess Sprint also disabled the option like T-Mobile did. From what I understand, if you enable the setting and somebody factory resets your phone after stealing it, then the phone won't work until you login with the same Samsung account. I was just wondering because I saw some stuff in the logcat related to it.

Ahh okay. dm-verify is a feature that checks the integrity of the system partition. If so much as one byte changes, then the check fails. Even mounting rw changes some bytes for the "Time of last mount". The stock recovery checks this because OTAs for Lollipop and newer contain the updated bytes instead of updated files, so it needs to know if any changes to /system would break OTAs.

---

I'll keep digging to see if I can find anything related to the issue. If you wouldn't mind, could you check if flashing a custom kernel (like UniKernel) and SuperSU prevents the issue from happening?

Also, does fixing the time in primary also fix it for the data-slot? EDIT: See my next post.
[Galaxy S 4 i9505 Original Android Development] chenxiaolong:
[MENTION=2688336]todivefor[/MENTION]: I think I might know what is causing the issue. But just so I can make sure, could you change "ro.build.type" in build.prop to:

ro.build.type=eng

and grab a logcat again?

I think the currently detected CSC code ("XAS") in either /carrier/chameleon.xml, /efs/imei/mps_code.dat, or /system/csc/sales_code.dat does not match the expected value for Sprint ("SPR"). That can be caused by flashing a custom ROM meant for a Sprint MVNO (like Ting, Virgin Mobile, etc.) instead of just Sprint or if my Odin flasher is not flashing the CSC properly.

From your primary ROM, could you grab those three files I mentioned above? I think we're close to finding the root cause of the issue.

Thanks!

EDIT: I'm 100% sure the CSC is not being flashed properly. Samsung is doing some ugly stuff in the stock recovery. Now to figure out what exactly it's doing...