yashsingh1/xdaforums huggingface dataset:
[Galaxy S 4 i9505 Original Android Development] Bejda:
Let's say that secondary rom system is installed under primary rom system.

Primary and secondary rom share our /system partition.

While under primary rom or on a usual "single boot" configuration you can use a root file manager, go to "/" and see this /system partition where system folder of a rom's zip get extracted (/system/app ; /lib ; /bin ; /media ; etc...) yeah?

Once a secondary rom is installed if you go there again (still while on primary rom otherwise you have to check /raw-system to see the original structure) you see now a /system/dual/ folder that contains secondary rom system.

So that's it,any rom updater-script will wipe system before installing its own,our primary rom updater-script aren't patched/edited to preserve /system/dual so secondary rom system is wiped when updating our primary rom.

Way to prevent this is in OP,it goes by editing the updater-script of the primary rom we're about to flash.

(Imho something goes wrong in the process and we end up forced to reflash secondary rom anyway but that's another story which is not yet confirmed..anyway you've seen that it wasn't a big deal huh, we just reflash secondary rom and it's ok without data loss [all,dual and multi rom's,data are under our /data partition so until we don't wipe data from recovery and keep using dualboot utility zip to do such things distinctly on prim or secondary rom it's ok]).

For multislot's rom's it's different, their system are installed on our /cache partition and you wiped primary romche (you did use dualboot utility zip but he's not yet updated to handle multislot installations).

Same story,all our rom's data's are under /data partition so they stayed untouched here also, you just wiped your multislot rom system by wiping /cache.

About same thing to check where things are installed with a root file manager:

If you're on primary rom it's the usual structure under "/" except that once dual/multibooting we see new folders:

/system/dual (secondary rom system).

/system/dual-kernels (all rom's boot.img).

/system/multi-slot-* (multislot rom's cache)

/data/dual (secondary rom data).

/data/multi-slot-* (multislot rom's data's).

/cache/dual (secondary rom cache).

/cache/multi-slot-* (multislot rom's systems)

If you're not on primary rom when you go check there it's the rom your using at the moment that you see under "/" , structure is different and won't show things the same way.

To see the original files and folders structure you have to go under:

/raw-system/

/raw-data/

/raw-cache/
[Galaxy S 4 i9505 Original Android Development] gravedigger76:
Makes sense. Thanks. I'll check the updater script next time for primary.

What I'm wondering there is a multiboot util i use with nexus 7. That util is built on top of team win recovery. It handles paths and scripts internally. Curious if that functionality could ever be ported over to S4. It also allows you to install Roms even to SD card or usb-otg.

In any case, reflashing second and third rom is easy. Like you said no data loss.

Thank you.

Sent from my SGH-I337
[Galaxy S 4 i9505 Original Android Development] Shanks:
I always use x-plore file manager to extract the update script from the zip, then modify it with es file explorer and then copy the modified updater script into the original file zip where you extracted it from and then flash it in recovery,i think you also need to delete the"delete recursive"lines, but I'm not sure about that
[Galaxy S 4 i9505 Original Android Development] Bejda:
Bad zip error most probably means that zip got somehow corrupted in the process,on windows I'd say you better use 7zip and just open (not extract) the zip,externally open updater-script to edit it with notepad+ (or other known working text editor of your choice of course) and push it back into opened zip.

I've seen cases where rom zip was download on pc,.md5 matched and all but where file was corrupted when copied to phone also..
[Galaxy S 4 i9505 Original Android Development] Mussels84:
i was using winrar, so maybe it was corrupting it.
[Galaxy S 4 i9505 Original Android Development] dan0412:
What did you rename it too? Pa-gapps.zip gives the same error.

Thanks
[Galaxy S 4 i9505 Original Android Development] Bejda:
I guess it exists on i9505:

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

Wipe cache is really not mandatory imho,you could keep your multi-slot rom quiet when updating primary one ;)

On some occasions (don't remember which exactly) you may involuntary wipe one of your rom dalvik-cache by flashing another one but it's just about having "android is updating" process at boot.

So i'd say that "secondary system wiped" when updating primary is the only "annoying" situation.

I don't know much about others dual and multiboot solutions but i guess the way it works here has a lot of advantages (its versatility i'd say..can be installed on top of an existing config without modifying it,desinstalled the same way etc..) ,the main point that could be discussed is probably the fact that app's and data's can't (except using init.d script method) shared between rom's but even this could be discussed (except for the place "distincts" /data partitions takes on.. /data then sdcard i'd tend to prefer things that way personally [but won't be against a solution that would allows us to choose which app's and data's we want to be shared of course lol]).

I say this just to discuss about it huh,not to argue :)

---------- Post added at 12:39 AM ---------- Previous post was at 12:35 AM ----------

Check DualBootPatcher/patchinfo/.../ .py files for some of these cases.

You'll see that patcher expect something like:

pa_gapps-full-4.

There's a new pa_gapps-stock-4.4.2-20131215-signed.zip pack btw,i just noticed.
[Galaxy S 4 i9505 Original Android Development] davidep85:
How can I clean a multi-rom?

Dual boot utility only wipes primary and secondary..
[Galaxy S 4 i9505 Original Android Development] Bejda:
Manually, remove the corresponding folders:

If you're on primary rom,

/system/dual (secondary rom system).

/system/dual-kernels (all rom's boot.img).

/system/multi-slot-* (multislot rom's cache)

/data/dual (secondary rom data).

/data/multi-slot-* (multislot rom's data's).

/cache/dual (secondary rom cache).

/cache/multi-slot-* (multislot rom's systems)

If you're on another rom (and another one than the one you want to wipe of course) same paths but through:

/raw-system/..

/raw-data/..

/raw-cache/..
[Galaxy S 4 i9505 Original Android Development] davidep85:
Done from primary rom, thanks!
[Galaxy S 4 i9505 Original Android Development] Lao Mayer:
This should be in the first post too for those who want to do it.
[Galaxy S 4 i9505 Original Android Development] chavdar:
I tried today another TWGE edition - Jamals, and i also cant install the dual boot switcher. Got the same parse error as in the Echoe v1.2...

Anyone else tried these two ROMs in multi slot?

Sent from the GT-I9505 Galaxy
[Galaxy S 4 i9505 Original Android Development] HeavyA:
I can't get the IOKP Apps to patch. Has anyone managed to get this file patched, or is there an alternate gapps that would work?

Also, I am currently running IOKP. I plan to dual boot with Infamous S4 (TW) by wiping and then installing infamous as the primary ROM and IOKP as the secondary. Has anyone tried that combination? Did it work out well?
[Galaxy S 4 i9505 Original Android Development] Houndcatcher:
See post 1454 above ;)

Basically the patcher is looking for a file name with a specific start. I have just renamed various Gapps files to the one that works and it just patches them :) Once they are patched just change the name back :)
[Galaxy S 4 i9505 Original Android Development] HeavyA:
Thanks for the tip.

I got a little bit further, but it still fails. I'm not sure if it's the file or the file name.

Has anyone patched the IOKP apps successfully? If so what did you do different, or is there a link to a pre-patched copy somewhere?
[Galaxy S 4 i9505 Original Android Development] Bejda:
IOKP Gapps aren't supported cause i guess no one asked for it for now.

Here you renamed your gapps zip as the rom zip, it's supported but patcher expects a boot.img now..

You could push any boot.img in the zip, patch it and then remove the boot.img from the patched zip but simplier trick that told you Houndcatcher was to rename the zip like another supported gapps pack.

Could you give link for IOKP Gapps just to check there's nothing special in it and will works without issue that way? (should be ok though)
[Galaxy S 4 i9505 Original Android Development] HeavyA:
Didn't realize that.

I had tried renaming it like the PA gapps, but that didn't work for me.

The link to the IOKP gapps is:

http://www.androidfilehost.com/?w=files&flid=8977
[Galaxy S 4 i9505 Original Android Development] Bejda:
Any other 4.3 gapps should be ok also, these ones are probably recommended for iokp rom but it's usually not really mandatory to use recommended gapps (except for support if you report an issue on rom's thread maybe..).

I'll check and let you know if it's ok and how it goes on my side ;)
[Galaxy S 4 i9505 Original Android Development] HeavyA:
Cool, thanks!
[Galaxy S 4 i9505 Original Android Development] Bejda:
So there's a little specificity as the zip installs some stuffs to /data/app but it's ok with the renaming trick.

I renamed it like BaNkS core gapps "12-14_GApps_Core_4.4.2_signed.zip" which are supported (for instance, others supported gapps zip name's should be ok as well), patched it on phone and it's fine, didn't flash it but seems fine.
[Galaxy S 4 i9505 Original Android Development] HeavyA:
It worked with that name.

Got it patched, will work on flashing both roms tonight.

Thanks for the help!
[Galaxy S 4 i9505 Original Android Development] TRusselo:
delete_recursive("/system"); is the line you remove.
[Galaxy S 4 i9505 Original Android Development] jpbranco:
hi guys

can i use omega rom 17 as primary rom and Official 4.4.2 - S4 Google Edition - v10 as secondary?

best regards
[Galaxy S 4 i9505 Original Android Development] XxmentxX:
Yes

Inviato dal mio GT-I9505 utilizzando Tapatalk
[Galaxy S 4 i9505 Original Android Development] jpbranco:
thanks :)

but i have to use any especial kernel to do that? maybe a kernel compatible with this roms at same time?
[Galaxy S 4 i9505 Original Android Development] XxmentxX:
You can use The stock kernel of the roms But if You wanna change kernel of the second rom chose a compatibile kernel and patch it before flashing. ... sorry for bad english:D

Inviato dal mio GT-I9505 utilizzando Tapatalk
[Galaxy S 4 i9505 Original Android Development] gaww:
You can use any ROM as primary, BUT - TW ROM's run on the large size, and Omega might be the largest.

You only have about 2.7 - 2.9gb (forgot which one) of space in the /system folder, and Omega with all the bloat is almost that size, so you will have to skinny it down on the install. Also, if you are up to it, you might search for a guide to take out the unused languages - they take up almost a GB.

Check the OP to see if GE v10 is supported. Or just try to patch it (with the parcher app) - takes only a minute or two to find out.
[Galaxy S 4 i9505 Original Android Development] jpbranco:
thanks guys, i dont install the most bloat, so i think i have no problem :) i will try this patch :P and this idea about languages is good, thanks :)
[Galaxy S 4 i9505 Original Android Development] Bejda:
Every time I don't see [MENTION=4277844]chenxiaolong[/MENTION] around here for some times I'm afraid that he owns a new device.. :o

Sorry ;)
[Galaxy S 4 i9505 Original Android Development] jpbranco:
guys how i can delete language files to have more space to a second rom?
[Galaxy S 4 i9505 Original Android Development] Bejda:
You did the math and haven't enough place for a secondary rom?

Several ways to remove stuffs from your primary rom,i can't say exactly where lies language files on a TW rom right now but you could do this directly your phone with a root file manager.

A better choice could be to do this in the rom zip and reflash it so next time if it happens you have to reflash that same primary rom (can't see real reasons why you'll have to at first sight but well..) you'll already have a debloated version at hand.

Another thing could be if your GE rom (was it?) is supported to patch it as multislot rom.

Multislot rom get their /system installed under our /cache partition so the only place you'll need under your /system partition would be for its cache (dalvik-cache at most 200mb) and its secondary kernel (two boot.img dump under system/dual=20Mb).

I never tested personally to have primary + multislot rom installed without any secondary one but I think it should be ok.
[Galaxy S 4 i9505 Original Android Development] XxLordxX:
Hi,

I believe [MENTION=3648432]Bejda[/MENTION] already covered the most important, buf if you still want to have some more space I'd recommend you deleting the stuff in /system/media/, open it and then delete what you don't use, I for myself, got plenty more storage after deleting some videos that were there and almost all notifications, alarms and ringtones (other than notification I set them all custom :P). This can help a lot :).

Hope this helps,

~Lord

"Time is too short to cry, long enough to try." - March of Time (Helloween)

Sent from my KitKat Nexus 10
[Galaxy S 4 i9505 Original Android Development] gaww:
In the Omega thread there was a post on removing the language files, which were is several locations. I never tried it, but it was supposed to eliminate about 1 gb (there are a lot of languages).
[Galaxy S 4 i9505 Original Android Development] chavdar:
If have seen it, could you provide a link? I am willing to try

Sent from the GT-I9505 Galaxy
[Galaxy S 4 i9505 Original Android Development] gaww:
You can find it as easy as me - search.

You might try "languages" - it most likely will be pulled up.
[Galaxy S 4 i9505 Original Android Development] bibymon:
How to wipe cache & dalvik cache of multislot1??
[Galaxy S 4 i9505 Original Android Development] Houndcatcher:
Dualboot utilities Page 1 :)

Hmmm sorry maybe not :( Just looked at it myself and only does Primary and secondary. Guess it means doing it manually then?
[Galaxy S 4 i9505 Original Android Development] mega00:
New dandroid rom has some change and patcher can no longer patch it, could you help?
[Galaxy S 4 i9505 Original Android Development] chenxiaolong:
My internet is finally somewhat working again :) I'll reply to the posts in the past 10 pages when I get up in the morning.
[Galaxy S 4 i9505 Original Android Development] Shanks:
I'm glad to see you again boss
[Galaxy S 4 i9505 Original Android Development] jpbranco:
http://xdaforums.com/showthread.php?p=45070989&highlight=languages#post45070989

hi you can see here, i havent patched my phone yet, last thing... i have already a omega rom as first rom, i ha ve to wipe everything before? or i can just patch the phone and flash the second rom?
[Galaxy S 4 i9505 Original Android Development] Yamba:
im currently using probam kitkat 1.0.1 and after installing the dual boot switcher program and trying to set primary kernel it just says "root access denied" but other program seems to have no problem getting root, i dont even see a root request from dual boot switcher program, anyone else have had this problem and maybe know a fix for it.
[Galaxy S 4 i9505 Original Android Development] Aldideos:
Hey!

Is there a way to switch to multi-rom-1 in recovery?
[Galaxy S 4 i9505 Original Android Development] chenxiaolong:
Absolutely :) Assuming you extracted the boot image using

unpackbootimg -i boot.img

you can repack it with:

mkbootimg --kernel boot.img-zImage --ramdisk boot.img-ramdisk.gz --cmdline "$(cat boot.img-cmdline)" --base "$(cat boot.img-base)" --pagesize "$(cat boot.img-pagesize)" --ramdisk_offset "0x02000000" --output new.img

Note that the command only applies to the Galaxy S4.

PS: Since the command is so long, I prefer to use a script:

#!/bin/bash

BOOTIMG=$1
TARGET=$2

mkbootimg \
--kernel $BOOTIMG-zImage \
--ramdisk $BOOTIMG-ramdisk.gz \
--cmdline "$(cat $BOOTIMG-cmdline)" \
--base "$(cat $BOOTIMG-base)" \
--pagesize "$(cat $BOOTIMG-pagesize)" \
--ramdisk_offset "0x02000000" \
--output $TARGET

./bootimage.sh boot.img output.img
[Galaxy S 4 i9505 Original Android Development] chenxiaolong:
That would make it much easier :)

Ever since they started building a new house in the neighborhood, my internet has gone to crap. It's really difficult for me to download huge >1GB ROMs.
[Galaxy S 4 i9505 Original Android Development] chenxiaolong:
I won't lie, I do have a new device (Nexus 5) :) I'm not going to any development for it though and I'm not going to sell my Galaxy S4. So this project and my ROM are here to stay :D
[Galaxy S 4 i9505 Original Android Development] Shanks:
That's got to be fate because i just got my nexus 5 yesterday and makes me happy to know you gonna be there. Those are great news for me,i can't wait to see what projects you come up with, can't wait
[Galaxy S 4 i9505 Original Android Development] chenxiaolong:
Yes, it will be supported in the beta I will release later today :)
[Galaxy S 4 i9505 Original Android Development] chenxiaolong:
I previously had support for the full gapps. I will add support for the rest of the PA gapps :)
[Galaxy S 4 i9505 Original Android Development] chenxiaolong:
Sure :D Could you send me the META-INF folder from the zip? With my current internet connection, there's no way I can download such a huge ROM.
[Galaxy S 4 i9505 Original Android Development] chenxiaolong:
Sure :D Can you send the META-INF folder from the zip?
[Galaxy S 4 i9505 Original Android Development] chenxiaolong:
Can you send me the META-INF folder from the zip?
[Galaxy S 4 i9505 Original Android Development] chenxiaolong:
Yes, it will be supported in the 4.0 beta I will release later today :)
[Galaxy S 4 i9505 Original Android Development] alvin551:
Hi mate while your there could you add these too. Thanks again for your work..and nice neighbourhood/ house u live in
[Galaxy S 4 i9505 Original Android Development] Shanks:
Yeah guys, if you make request please send him the META-INF folder. So he doesn't have to download the whole rom, go easy on the boss and cooperate unless a little bit.
[Galaxy S 4 i9505 Original Android Development] Brandroid28:
I'd like to request support for CyanFox. https://www.copy.com/s/kEkEWDv8JiRV/META-INF.zip

US Cellular SGS4; Hyperdrive RLS11; KT Kernel Hydra Profile
[Galaxy S 4 i9505 Original Android Development] monkteo:
THX Man , I was out !
[Galaxy S 4 i9505 Original Android Development] Kifel Jatt:
Are there any video tutorials on how to do this?
[Galaxy S 4 i9505 Original Android Development] Aldideos:
It is easy to use!, what's your problem?
[Galaxy S 4 i9505 Original Android Development] Kifel Jatt:
I've already done it but my mate who doesn't know English wanted to do it and I couldn't explain it to him.
[Galaxy S 4 i9505 Original Android Development] chenxiaolong:
New beta release!

The Android version of the patcher was completely rewritten for this release. It has a pretty awesome feature that I record a video of later (you can dig through the code if you want :p). I didn't get a chance to add support for some of the ROMs mentioned in the past few posts. I'll finish doing that as soon as I can.

Note: Please let me know if something that used to work doesn't anymore. Also, let me know if there are any issues with the output (like if it says "Successfully patched: failed to patch zip").

Changes:

Rewrote Android GUI

Refactored all of the patcher's code

Add support for Xposed disabler

Add support for the rest of the PA gapps

Main commits:

https://github.com/chenxiaolong/DualBootPatcher/commit/b7fb768d10016aec4f5db5bb38a71b28969170a6

https://github.com/chenxiaolong/DualBootPatcher/commit/ca53ac6fdbb662bd40f56d6a12f9d38be59cfcbe
[Galaxy S 4 i9505 Original Android Development] gravedigger76:
Is this the one you mentioned you brewing up that would automatically allow to delta update you're cm11 ROM even if its in multislot 1?

Sent from my SGH-I337
[Galaxy S 4 i9505 Original Android Development] Bejda:
wow...
[Galaxy S 4 i9505 Original Android Development] Bejda:
Let them know there's a DEV AT WORK

;)
[Galaxy S 4 i9505 Original Android Development] Bejda:
On windows latest Probam zip works with 3.2.2 version but not with beta1_4.0.0 (ok on android)

Detected ProBAM ROM zip

[<multiboot.partitionconfig.PartitionConfig object at 0x019B9090>, <multiboot.pa

rtitionconfig.PartitionConfig object at 0x01F64D90>, <multiboot.partitionconfig.

PartitionConfig object at 0x01F64670>, <multiboot.partitionconfig.PartitionConfi

g object at 0x01F646D0>]

Choose a partition configuration to use:

1: Dual Boot

- Second ROM installed to /system/dual

2: Multi Boot Slot 1

- ROM installed to /cache/multi-slot-1/system

3: Multi Boot Slot 2

- ROM installed to /cache/multi-slot-2/system

4: Multi Boot Slot 3

- ROM installed to /cache/multi-slot-3/system

Choice: 4

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

Creating gzip compressed ramdisk with cpio ...Traceback (most recent call last):

File "C:\Users\G3\Downloads\DualBootPatcher-4.0.0beta1\DualBootPatcher-4.0.0be

ta1\useful\\..\scripts\multislot.py", line 85, in <module>

new_file = patcher.patch_zip(filename, file_info, partition_config)

File "C:\Users\G3\Downloads\DualBootPatcher-4.0.0beta1\DualBootPatcher-4.0.0be

ta1\scripts\multiboot\patcher.py", line 269, in patch_zip

partition_config)

File "C:\Users\G3\Downloads\DualBootPatcher-4.0.0beta1\DualBootPatcher-4.0.0be

ta1\scripts\multiboot\patcher.py", line 173, in patch_boot_image

data = cpio.create(extracted, ramdisk_files)

File "C:\Users\G3\Downloads\DualBootPatcher-4.0.0beta1\DualBootPatcher-4.0.0be

ta1\scripts\multiboot\cpio.py", line 45, in create

[OS.bash],

AttributeError: 'module' object has no attribute 'bash'
[Galaxy S 4 i9505 Original Android Development] Shanks:
If he speaks Spanish i can help
[Galaxy S 4 i9505 Original Android Development] chenxiaolong:
LOL :D :highfive:
[Galaxy S 4 i9505 Original Android Development] chenxiaolong:
Oops, stupid mistake on my part. Does it work if you replace scripts/multiboot/operatingsystem.py with this version (rename txt to py)?
[Galaxy S 4 i9505 Original Android Development] Bejda:
Pc is turned off just as me very soon lol,i'll let you know asap if no one tries in the meantime,Thks for all.
[Galaxy S 4 i9505 Original Android Development] chenxiaolong:
.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

:laugh:
[Galaxy S 4 i9505 Original Android Development] gravedigger76:
Please tell us how that works? :)

Sent from my SGH-I337