yashsingh1/xdaforums huggingface dataset:
[Galaxy S 4 i9505 Original Android Development] chenxiaolong:
Could someone please test version 2.0 beta (especially on Windows)?

This version completely reorganizes all of the patches to make everything more clear (and to prepare for triple boot ;)). Every supported ROM and kernel is supported by adding a small file like this https://github.com/chenxiaolong/DualBootPatcher/blob/master/patchinfo/jflte/ROMs/AOSP/cyanogenmod.py along with the patch file.

As you have probably noticed, I get behind in adding support for new ROMs. This should make it easier for people to help in adding support for ROMs. It's literally just editing the updater-script and dragging it on top of a script :)
[Galaxy S 4 i9505 Original Android Development] ktetreault14:
Will right now

Sent from my GT-I9505
[Galaxy S 4 i9505 Original Android Development] RK:
Will do sir!
[Galaxy S 4 i9505 Original Android Development] Nick0703:
I think there is a problem with the ramdisks.tar.xz. Because when I'm trying to patch Pac, I'm getting an error saying "filename 'jflte/AOSP/cyanogenmod.dualboot.cpio' not found". I looked inside the ramdisks.tar.xz and I saw that there is a "." folder then "jflte".
[Galaxy S 4 i9505 Original Android Development] ktetreault14:
It tells me that aokp_jfltexx_jb-mr2 is unsupported.
[Galaxy S 4 i9505 Original Android Development] chenxiaolong:
Ah yes, you're right. The ramdisks.tar.xz wasn't being created properly. Could you try this version and see if it works now? Thanks!
[Galaxy S 4 i9505 Original Android Development] Nick0703:
It worked. Flashing the ROM now to see if it booting.

---------- Post added at 11:40 PM ---------- Previous post was at 11:30 PM ----------

It seems that PAC ROM still isn't working. I check the init.rc in the cyanogenmod.dualbooot.cpio and I saw that this patch is not included. http://review.pac-rom.com/#/c/2915/2/rootdir/init.rc,unified
[Galaxy S 4 i9505 Original Android Development] chenxiaolong:
Thanks! I'll update it right now.
[Galaxy S 4 i9505 Original Android Development] chenxiaolong:
Awesome! Glad you guys got it working :D (I never would have though to use an init.d script)

One thing to note is that both ROMs should be the same Android version. Some apps in Google Play will install different versions for different Android releases. :good:
[Galaxy S 4 i9505 Original Android Development] ktetreault14:
I also get errors when trying to patch 4.3 sense and hellybean for tmo
[Galaxy S 4 i9505 Original Android Development] chenxiaolong:
My dual boot project does not support the i9500, only the Qualcomm-based variants. But don't worry, I'm almost done porting OmniROM to the i9505 :D
[Galaxy S 4 i9505 Original Android Development] chenxiaolong:
Thanks! I'll double check my filename matching patterns for AOKP. Could you post a link to the ROM you tested?
[Galaxy S 4 i9505 Original Android Development] Tyler.Boston1:
Just wondering but is there a way you could possibly patch roms on the phone itself?
[Galaxy S 4 i9505 Original Android Development] chenxiaolong:
PAC-Man should be fixed in 2.0 beta 3 (attached to this post) :)
[Galaxy S 4 i9505 Original Android Development] chenxiaolong:
Not yet. That's still a work in progress :)
[Galaxy S 4 i9505 Original Android Development] Nick0703:
It's not working lol. I can't patch now. I'm getting "filename 'jflte\\\\AOSP\\\\pacman.dualboot.cpio' not found".
[Galaxy S 4 i9505 Original Android Development] chenxiaolong:
Do you mean Enable individual app sharing -> Share apk/data -> Reboot (all while in the same ROM) causes the app to disappear? It is definitely possible to share between AOSP and TW (that's what I'm doing), but so far, I've only tested on Lollipop.

EDIT: Reproduced the disappearing app error. I'm working on a fix for it.

EDIT2: Fixed in 8.0.0.r1262.gca1ef74

Thank you!!
[Galaxy S 4 i9505 Original Android Development] Quote100:
[MENTION=4277844]chenxiaolong[/MENTION] sure I can try but I've never collected a log like this so could you guide me through the process or tell me what to single out?
[Galaxy S 4 i9505 Original Android Development] chenxiaolong:
Yes, you do have to have it installed, but the app sharing code will ensure that there's a single copy of the apk in the shared location (/data/multiboot/_appsharing). All ROMs that have app sharing enabled will just have a link to it.
[Galaxy S 4 i9505 Original Android Development] gaww:
Does this mean that there will not be two of the same apps (or more) still residing in the /data partition as a whole ?
[Galaxy S 4 i9505 Original Android Development] chenxiaolong:
That's right (as long as sharing is enabled).

If you want (and are interested), you can verify this by checking to see if the inode numbers are the same:
[Galaxy S 4 i9505 Original Android Development] gaww:
So then sharing WILL save space ?
[Galaxy S 4 i9505 Original Android Development] gaww:
Just installed latest patcher, updated ramdisk, but now won't reboot (goes to recovery). Cleaned and reflashed kernel - back in business, but what happened?
[Galaxy S 4 i9505 Original Android Development] Quote100:
Okay so did I do it right? [MENTION=4277844]chenxiaolong[/MENTION]
[Galaxy S 4 i9505 Original Android Development] chenxiaolong:
Yep, you did it right! Is there a way to save the output? There should be a bit more then what was in the screenshots.
[Galaxy S 4 i9505 Original Android Development] chenxiaolong:
If you wouldn't mind, could you try again and when it reboots into recovery, flash the attached zip? It will copy a few logs to /sdcard/logs.
[Galaxy S 4 i9505 Original Android Development] Quote100:
I've no idea how to save the output
[Galaxy S 4 i9505 Original Android Development] gaww:
Will mess it up again just for you but will have to wait on an ESB and some Buffalo wings at local pup.
[Galaxy S 4 i9505 Original Android Development] noobiedev83:
ok, I decided to start all over again and I install kikat tw as my primary rom then a patched a lollipop rom tw as a data-slot and now the lollipop rom is in a bootloop in samsung logo dont know whats happening any advice please thanks!
[Galaxy S 4 i9505 Original Android Development] chenxiaolong:
Thank you!! Gimme a sec and I'll make a new build that backs up /sdcard/multiboot/[ROM]/boot.img to /sdcard/multiboot/[ROM]/boot.img.before-ramdisk-update to make it easier on you.

EDIT: 8.0.0.r1265.g3ce0a6d
[Galaxy S 4 i9505 Original Android Development] todivefor:
Still have this same setup. Can't get it to work. TWRP Restore prior to trying to patch. Updated ramdisk (which I don't understand). Got convertr.apk (btw from amazon store, app that I don't care about). Had it on both dual and slot-1. Set it to share and rebooted. It is gone from DB apps to share list and app drawer. It is in /raw/data/multiboot/_appsharing. I deleted /raw/data/multiboot/_appsharing and tried several times. No better results. restored with TWRP again. What can I try? Is deleting that folder a good way to start over with sharing or do I have to restore?
[Galaxy S 4 i9505 Original Android Development] unibomber:
Any ideas why cm remix won't install to dual? W8 note 4
[Galaxy S 4 i9505 Original Android Development] chenxiaolong:
This was with 8.0.0.r1262 right? I testing with the Speedtest app on Stock TW 4.4 (T-Mobile) and CM12.1 AntaresOne and it seems to be working now. I'll give it a try with convertr. If you could send me the /sdcard/MultiBoot/appsync.log file, that might give me some hints as to why it's not working.

EDIT: Deleting /raw/data/multiboot/_appsharing is enough, no need to restore. If you want to delete the app sharing configuration file too, then also delete /sdcard/MultiBoot/[ROM]/config.json
[Galaxy S 4 i9505 Original Android Development] chenxiaolong:
Where is it failing? If I had to guess, it's due to the lack of free space on /system (you can check from the app). I say this because my T-Mobile Note 4 with stock TouchWiz has about 0.63 GB free, which is not enough for CM + Gapps.
[Galaxy S 4 i9505 Original Android Development] unibomber:
Which is weird because I can load tw and aicp or tw and temasek rom which both are cm. Let me take a look again
[Galaxy S 4 i9505 Original Android Development] todivefor:
I am using r1257. I'll update to r1262. If it doesn't work will collect what you ask for. Thank you.
[Galaxy S 4 i9505 Original Android Development] unibomber:
Did u flash a kernel too?

[MENTION=4277844]chenxiaolong[/MENTION]

[V] /chroot/update-binary-tool: xattrs not supported on filesystem
[V] /chroot/default.prop: xattrs not supported on filesystem
[V] /chroot/file_contexts: xattrs not supported on filesystem
[D] [Installer] Filesystem mounting stage
[E] Failed to create /cache/multiboot/dual/cache: Read-only file system
[D] [Installer] Cleanup stage
[V] Finished cleanup
[Galaxy S 4 i9505 Original Android Development] noobiedev83:
nope just the rom
[Galaxy S 4 i9505 Original Android Development] jotade:
Can we use dual boot with Stock Lollipop and CM12.1? If so please explain because i've been trying and i cant not. I have 910G Note 4 Thanks and please help
[Galaxy S 4 i9505 Original Android Development] unibomber:
Try flashing a kernel too.

Chen it seems to have worked with the 1262 snapshot.
[Galaxy S 4 i9505 Original Android Development] noobiedev83:
yep, that was it, thanks a lot man.

so when I flash a tw rom it doesnt use the kernel that is included?
[Galaxy S 4 i9505 Original Android Development] unibomber:
Weird as it sounds, some roms don't have a kernel included
[Galaxy S 4 i9505 Original Android Development] noobiedev83:
good to know thanks
[Galaxy S 4 i9505 Original Android Development] gaww:
I have never run into that - but have trouble with modified kernels in custom ROM occasionally - usually fixed with another kernel.
[Galaxy S 4 i9505 Original Android Development] gaww:
View attachment recovery.log

View attachment appsync.log

Am working with Able95 LL 3.1 (not the S6 port). ROM patched and runs fine - and updated ramdisk OK on older patcher OK. Using patched hydromax 3.5 TWLP kernel.

Updated Ramdisk om CardROM HD 4.4.4 Ok. Its all ready to app shatre - just need to get the LL setup now.
[Galaxy S 4 i9505 Original Android Development] todivefor:
Just to muddy the waters. Restored with TWRP prior to doing any app sharing. I installed r1262. Made sure I had an app that was both on dual and slot-1. Shared app on dual, it didn't go away on app sharing or app drawer. Did the same on slot-1, same result. Looks like it worked. Tried my convertr app and it worked also. I was kind of mystified why some of my app sharing configs were surviving my restore, I guess from above (/sdcard/MultiBoot/[ROM]/config.json). Something must have changed in r1262. I attached the appsync.log from when I did r1257. One other note, Titanium Backup said I didn't have root access after sharing on r1262. In settings, I toggled root access, didn't help. Rebooted, that fixed it. Let me know if I can test anything else.

EDIT: see screenshots. Isn't this doubling on sharing?
[Galaxy S 4 i9505 Original Android Development] noobiedev83:
now when I flash the roms the modem is not flashing and the kernel either, I guess something goes wrong when it patch the rom if I flash another kernel it boots the rom but no modem
[Galaxy S 4 i9505 Original Android Development] chenxiaolong:
Yes, that's the exact setup I have (albeit on an SM-N910T). What kind of issues are you having?

This is how I have my phone set up:

Set kernel from primary ROM

Patch official CM 12.1 for data-slot-cm

Patch SlimRoms gapps (5.1) for data-slot-cm

Flash both patched zips

Reboot
[Galaxy S 4 i9505 Original Android Development] chenxiaolong:
Weird. I'm assuming this was with in-app flashing? Could you send me the full log?
[Galaxy S 4 i9505 Original Android Development] chenxiaolong:
Thanks! Logs look good. It looks like you just need to enable sharing on multi-slot-1 now.

[E] JSON error on line -1: unable to open /data/media/0/MultiBoot/multi-slot-1/config.json: No such file or directory
[W] Failed to load configuration file; app sharing will not work
[Galaxy S 4 i9505 Original Android Development] chenxiaolong:
Nice! Looks like you got it working! The apk shows in both locations, but they are hard links, meaning both files are pointing to the same 1.94 MB of data that the apk takes up. I don't know any file manager that lets you check this, but if use you the "ls -i" command in the Terminal Emulator app (or adb), you can see that they are hard links (the inode numbers match):

Regarding the Titanium Backup issue, did you share the Titanium Backup app itself?
[Galaxy S 4 i9505 Original Android Development] chenxiaolong:
Do you know if the modem is compatible with both Lollipop and KitKat? I upgraded to the Lollipop modem and bootloader already (N910TUVU1COD6), which might not work with KitKat. The reverse might be true in your case, but I'm not sure.
[Galaxy S 4 i9505 Original Android Development] Technical:
[MENTION=4277844]chenxiaolong[/MENTION], why didn't the app data get shared? Is there any log file that I could send to you?
[Galaxy S 4 i9505 Original Android Development] chenxiaolong:
The OP finally got a much needed update! (Some parts were still talking about version 3.0.0, which had separate switcher and patcher apps...)

I've also added a new section on app sharing that should hopefully make it much clearer. Apologies if you don't like my analogy ;)
[Galaxy S 4 i9505 Original Android Development] noobiedev83:
no I dont think is compatible but I thought that when you patched a rom and flashed is separate to the rest of them or all of the roms share the modems and kernels?
[Galaxy S 4 i9505 Original Android Development] chenxiaolong:
The global app sharing options can't share data at the moment (that's actually really hard to do).

If I'm understanding you right, what you need to do is enable individual app sharing and share apk/data for Amazon Store in both the primary and secondary ROM. Then, both ROMs will load the data from a shared folder (/data/multiboot/_appsharing). If that doesn't work, could you send me the /sdcard/MultiBoot/appsync.log file? Thanks!
[Galaxy S 4 i9505 Original Android Development] chenxiaolong:
The modem is the only thing that is shared across all ROMs. There is a way to have the app automatically flash a modem when you switch ROMs, but I'd like to test it myself before having you try that :) Only problem is that I might not be able to boot any KitKat ROM because I'm also on the Lollipop bootloader.

EDIT: By the way, it's a known issue where many Lollipop kernels can't boot if you're on the KitKat bootloader. This isn't specific to dual boot, just an annoying fact about the Note 4. Only some custom kernels have worked around this (as you've found).
[Galaxy S 4 i9505 Original Android Development] noobiedev83:
there's no problem I can try it if you provide it thats why we here for to test and fix issues

thanks
[Galaxy S 4 i9505 Original Android Development] jotade:
Hi and thanks. I have stock Lollipop in my 910G

succesfully patched todays version of CM12.1

but when i try to flash it via recovery gives me an binary error

when try to flash it via same app gives an error too

and when try to repach via the repatch app that applications dosent detect it when i place in the correct folder

Please advise thanks
[Galaxy S 4 i9505 Original Android Development] todivefor:
I have not shared Titanium Backup. On both dual and slot-1, I had to toggle root access in CM settings and reboot.

Thank you.
[Galaxy S 4 i9505 Original Android Development] ktetreault14:
[MENTION=4277844]chenxiaolong[/MENTION] would it be possible to update the recovery thing and add in moving primary to /data? Lol forgot what its called
[Galaxy S 4 i9505 Original Android Development] chenxiaolong:
Hmm, I'll give it a quick try and see if it's working for me. Right now, I'm running a nightly from a couple of days ago.

(Btw, the repatch app is no longer needed.)
[Galaxy S 4 i9505 Original Android Development] chenxiaolong:
What do you mean? Moving the primary ROM to a data-slot?
[Galaxy S 4 i9505 Original Android Development] chenxiaolong:
Thanks!

Just copy the KitKat modem to /sdcard/MultiBoot/[Your KK ROM]/modem.img and the Lollipop modem to /sdcard/MultiBoot/[Your LL ROM]/modem.img. When you switch ROMs from the app, it'll flash the modem automatically. If something goes wrong, just reflash the right modem from recovery or Odin.
[Galaxy S 4 i9505 Original Android Development] jotade:
Well when i had Kitkat as primery everything worked great but in Lollipop there is no way look i tried these two methods
[Galaxy S 4 i9505 Original Android Development] ktetreault14:
[MENTION=4277844]chenxiaolong[/MENTION] Im gonna repatch and try to flash again. But i want to switch the data slot rom and the primary rom. Will dualbootutilities
[Galaxy S 4 i9505 Original Android Development] ktetreault14:
I cant pick es file explorer
[Galaxy S 4 i9505 Original Android Development] chenxiaolong:
The in-app flashing issue is because the zip expects "trltexx" or "trltedt" and your build.prop says "trlte". The easiest would probably be to change "ro.product.device" to "trltexx" in your build.prop.

I have a feeling it won't flash because of the lack of space. The stock KitKat ROM is 2.64GB and the stock Lollipop ROM is 3.14GB (at least for the T-Mobile version) :) Anyway, if you could send me the /sdcard/MultiBoot.log file, that would tell me exactly why it's failing. Thanks!
[Galaxy S 4 i9505 Original Android Development] ktetreault14:
[MENTION=4277844]chenxiaolong[/MENTION] what happened?
[Galaxy S 4 i9505 Original Android Development] chenxiaolong:
Ahh, okay. I actually have no idea how to this... The data-slots can be named anything and the aroma config has to be hardcoded...

You could do it like this though:
[Galaxy S 4 i9505 Original Android Development] chenxiaolong:
I knew I'd screw up something lol. For now, just hit the 3 dots on that screen to show the internal storage.
[Galaxy S 4 i9505 Original Android Development] ktetreault14:
Oh ok :D
[Galaxy S 4 i9505 Original Android Development] chenxiaolong:
What path did it show when you selected the file?
[Galaxy S 4 i9505 Original Android Development] chenxiaolong:
Yay! More TouchWiz bugs!

Should be fixed in 8.0.0.r1266.gb452840 :D

https://code.google.com/p/android/issues/detail?id=70697

http://stackoverflow.com/questions/...nt-does-not-show-documents-on-samsung-devices
[Galaxy S 4 i9505 Original Android Development] chenxiaolong:
Sorry, I should have mentioned I need the log after you flashed from recovery. (Because the in-app flashing won't work unless you edit build.prop). Thanks!
[Galaxy S 4 i9505 Original Android Development] gaww:
No can do. LL Multi will not boot up after updating ramdisk - it goes straight back into recoveyr. Then have to reflash the kernel, which wipes out updated ramdisk - so no app sharing.

Would repatching the kernel and reflashing it accomplish anything?
[Galaxy S 4 i9505 Original Android Development] chenxiaolong:
Oh, if you flash a custom kernel and you can boot up, make sure to set the kernel from the app. Otherwise, it'll keep restoring the kernel that was bundled with the ROM.

EDIT: Wait, I think I understood you wrong. You know this..

EDIT2: When it goes straight back into the recovery, could you flash the attached zips? It'll copy last_kmsg and a few other logs to /sdcard/logs. Thanks!

EDIT3: Yes, repatching the kernel and reflashing it would have the exact same effect as updating the ramdisk.
[Galaxy S 4 i9505 Original Android Development] chenxiaolong:
Haha, my inbox

never

looks like this :D
[Galaxy S 4 i9505 Original Android Development] chenxiaolong:
Thanks! Yep, that was it:

[W] /system/multiboot/dual/system/lib/libpac.so: Failed to copy data: No space left on device
[W] /system/multiboot/dual/system/lib/libpagemap.so: Failed to copy data: No space left on device
[W] /system/multiboot/dual/system/lib/libpci.so: Failed to copy data: No space left on device
[W] /system/multiboot/dual/system/lib/libpcre.so: Failed to copy data: No space left on device
[W] /system/multiboot/dual/system/lib/libpdfium.so: Failed to copy data: No space left on device
[W] /system/multiboot/dual/system/lib/libpixelflinger.so: Failed to copy data: No space left on device
[W] /system/multiboot/dual/system/lib/libpng.so: Failed to copy data: No space left on device

The /system partition ran out of space because the Lollipop ROM was too huge. You can install to a data-slot, which will definitely be big enough, but will eat into your internal storage space.
[Galaxy S 4 i9505 Original Android Development] jotade:
Thanks i selected data-slot but it gives error also. What should i do?
[Galaxy S 4 i9505 Original Android Development] noobiedev83:
lmao! thats crazy!!
[Galaxy S 4 i9505 Original Android Development] ktetreault14:
[MENTION=4277844]chenxiaolong[/MENTION] i want to patch the same ktoonz kernel to use on my primary and secondary? How to go about this?
[Galaxy S 4 i9505 Original Android Development] gaww:
It worked and I shared several apps - but no improvement in free space. It appears the shared apps still take up the the same space. I rebooted both ROMs and initial boot took much longer.

I really don't get it.
[Galaxy S 4 i9505 Original Android Development] ktetreault14:
It frees space cause you are not downloading app twice

---------- Post added at 05:06 AM ---------- Previous post was at 05:05 AM ----------

@chenxiaolong how come i cant flash this on a data slot

https://mega.co.nz/#!Uwc0lDyB!HkaMJPlwXtvxcEShtyuLSf0k6RO-_VMbgk0dHlYWsEA
[Galaxy S 4 i9505 Original Android Development] jotade:
Do you know how to install in 910G data-slot?
[Galaxy S 4 i9505 Original Android Development] gaww:
Wrong - they both have to be resident to app share - but then they both stay there apparently. The original app sharing only had to have one installed
[Galaxy S 4 i9505 Original Android Development] chenxiaolong:
Oh man, that KT zip builds the boot.img while it's flashing. I'll have to write some special code to handle that tomorrow.
[Galaxy S 4 i9505 Original Android Development] chenxiaolong:
No, the original one needed it installed in every ROM too, but it happened automatically. (And it used the same hard link method used now.) If it's not saving space, it's probably a bug I overlooked. I'll look into it tomorrow.

EDIT: Can you give me a list of apps you shared and on which ROMs?
[Galaxy S 4 i9505 Original Android Development] ktetreault14:
Damn. Can't boot into the data slot atm. Its all good though. Testing a new rom with cool customizations. I vould boot into it until i flashed the ktoonz kernel onto it from the primary
[Galaxy S 4 i9505 Original Android Development] ESTIMULO:
Thankyou for your fantastic work chenxiaolong!

I can't do an update ramdisk for app sharing (allways error) so I have attached a log. Can you try to find the problem?

My device is a Note 3 (hlte) and the main rom is a note 4 port (trlte),

but in /system/build.prop I added to the end:

ro.patcher.device=hlte

no luck.

please help
[Galaxy S 4 i9505 Original Android Development] Technical:
I've done this and did not work.

My goal is a complete mirror on two ROMs (both app and their data).

I've followed this:

1. Choose to share all apps in the secondary, reboot, all app where there but none data.

2. Enter in primary and shared 5 apps individually to test. Reboot. The 5 apps disappeared from primary :crying: and, of course, did not appear in secondary.

3. I've restored these 5 apps with Titanium in the primary. Ok. But they do not appear in secondary to get shared there.

How do I complete mirror app/data between my ROMs in baby steps? :silly:
[Galaxy S 4 i9505 Original Android Development] franzyroy:
French translation is done!;)
[Galaxy S 4 i9505 Original Android Development] haoyangw:
[MENTION=4277844]chenxiaolong[/MENTION]

Unfortunately Alucard's Kernel zips also build boot.img during the flashing process(after it determines your partition type e.g. ext4/f2fs). Could you support that too? Thanks a lot!
[Galaxy S 4 i9505 Original Android Development] todivefor:
All apps you want to share have to already be on primary/dual/slot-* before sharing. So sharing between primary and dual, all apps would have to be on both.