yashsingh1/xdaforums huggingface dataset:
[Galaxy S 4 i9505 Original Android Development] ktetreault14:
alright will do

https://mega.co.nz/#F!Vgt3BTwY!LgH5WPaxQ5tbo9POQ5yMig

Didnt get the cmdline.txt could be cause i installed to multi slot 1
[Galaxy S 4 i9505 Original Android Development] todivefor:
[MENTION=4277844]chenxiaolong[/MENTION], I have a question and an observation. I got all FUBARed and couldn't figure out where I went wrong. I was using the backup/restore utility for dual and updating ramdisk. Something went wrong and I couldn't determine where, so I decided to start over. My primary (and at this only) is SACS-V4 4.4.2. It's old, but reliable. This is not one of the supported roms. I have patched it successfully with windows (custom). Is it likely to work if If I flash it? Will I have to patch it and flash it to get app sharing to work? In the past, I never patched, maybe no need to?

Observation: I was wiping cache and dalvik cache on my secondary roms trying to get things working. In wiping slot-1, it never worked. I think you have the names incorrect in DualBootUtilities-4.0-snapshot2.zip. I think DC should be /data/multiboot/multi-slot-*/data/dalvik-cache. I am not sure about cache. I was/am pretty brain dead.
[Galaxy S 4 i9505 Original Android Development] chenxiaolong:
Thanks! No problem about the cmdline.txt. I had it also print what I need in the kernel log. This basically confirms my suspicions. The Exynos devices are completely ignoring the cmdline field in the boot images. I took a look at quite a few stock recoveries and stock ROMs for the Exynos S6 (Edge) and Note 4 and found that Samsung left the cmdline field blank in each and every kernel. For example,

- magic: ANDROID!
- kernel_size: 21687168
- kernel_addr: 0x10008000
- ramdisk_size: 4631552
- ramdisk_addr: 0x11000000
- second_size: 0
- second_addr: 0x10f00000
- tags_addr: 0x10000100
- page_size: 2048
- dt_size: 1421312
- unused: 0x000000
- name:
- cmdline:
- id: 35dd7bbb9e305a2c9bed5334a93143230aaed80a000000000000000000000000

I'll come up with a different way of storing the installation location for Exynos devices. Most likely a property entry in /default.prop
[Galaxy S 4 i9505 Original Android Development] ktetreault14:
Sweet let me know and ill throw it on here :D cant wait to be able to run 5.0.2 and 5.1.1
[Galaxy S 4 i9505 Original Android Development] chenxiaolong:
For the primary SACS-V4 4.4.2 ROM, it doesn't make too much of a difference if you patch or not. If you want to use app sharing when it's ready, you can use the Update Ramdisk option in the app. Patching the primary ROM is usually meant for upgrades to prevent other ROMs from being inadvertently wiped.

As for the DualBootUtilities, are you sure you were flashing 4.0-snapshot2? Just wondering because you told me that typo was in 4.0-snapshot1 before and I thought I had fixed that. Anyway, I've uploaded 4.0-snapshot3 which fixes a couple more typos. This is how dalvik-cache is being wiped now: https://github.com/chenxiaolong/Dua...m/google/android/aroma/multibootutils.sh#L269
[Galaxy S 4 i9505 Original Android Development] haoyangw:
Oh I'm using latest official CM11 nightly and Alucard kernel 1.4qs for AOSP4.4 V2
[Galaxy S 4 i9505 Original Android Development] todivefor:
I thought I was using snapshot2, but I just unzipped what I was using and it looks like what you are showing. As I start over, I will watcher closer to what I am doing. Thank you.
[Galaxy S 4 i9505 Original Android Development] Ubimo:
I'm running a TW ROM now and I have a backup of an ASOP ROM in CWM

How do I restore/install the ASOP ROM as the secondary ROM?
[Galaxy S 4 i9505 Original Android Development] sronweb:
You should install as fresh rom, you cannot restore as secondary if originally it was installed as main rom. Use the patcher and install it as secondary rom selecting properly from the aroma installer. Please make a back up always before.
[Galaxy S 4 i9505 Original Android Development] Ranomez:
Oops, I did actually know that the kernel is ignoring the cmdline (because our AOSP developer had problems because of that too) but I didn't figure out that this is actually using the cmdline, do you still need my logs?
[Galaxy S 4 i9505 Original Android Development] chenxiaolong:
No worries! I'm good regarding the logs. I'll probably have a new build out tonight that doesn't use the cmdline.
[Galaxy S 4 i9505 Original Android Development] ktetreault14:
Great to know :D
[Galaxy S 4 i9505 Original Android Development] chenxiaolong:
[MENTION=4491606]ktetreault14[/MENTION], [MENTION=2621033]Ranomez[/MENTION]

A workaround for devices that ignore cmdline is implemented in 8.0.0.r1188.gb7f5f8d :)

EDIT: What the heck... hang on... my server is either shut down or it crashed.

EDIT2: Server is back. Must have been a power outage.
[Galaxy S 4 i9505 Original Android Development] chenxiaolong:
I am planning on moving the installation location selection from AROMA back to the app (similar to how we had it a while back). If anyone is strongly opposed to me doing this, let me know why :)

I'm doing this in preparation for the ability to install to the data partition (unlimited number of ROMs, unlike the 3 multi-slots) and possibly the ability to install to the external SD.

The practical difference in the change would be that if you want to install the same ROM to 2 locations, you'll have to patch it twice (eg. once for secondary, once for multi-slot-1).
[Galaxy S 4 i9505 Original Android Development] flexxoo:
That will be awesome,now the another app call multisystem is doing something similar but multiboot is better and easier to understand, thanks
[Galaxy S 4 i9505 Original Android Development] peppe130:
Hi Chen.. I've updated Italian translation :)
[Galaxy S 4 i9505 Original Android Development] nds850:
Is app sharing working? :)
[Galaxy S 4 i9505 Original Android Development] Spike97:
obb folder

First thing, i want to thanks to the developer for this awesome app.

My problem: obb folder is locked, i tryed everything, all was ok before i patched the ram disk, after that, you can no more use this folder even if you try to download something from play store. I used my nandroid backup and i fixed it, reboot to second(cm12.1), download something, all ok---after second reboot from primary to secondary, the problem occured again, it only lock the folder for 2th ROM, i tryed to replace the obb/clean patch again the rom but nothing seems to work.

In cm12 folder browser, when you are in root mode, it say that you need to be in the current mode to move/copy something there

ES file.explorer: task failed...
[Galaxy S 4 i9505 Original Android Development] HampTheToker:
I really doubt you'll get much help trying to play pirated games.
[Galaxy S 4 i9505 Original Android Development] ktetreault14:
Freaking sweet. Testing now
[Galaxy S 4 i9505 Original Android Development] Spike97:
You're not understand, don.t you? :)

If i try to download an app that have 200mb or something like that, it only load the animation in google play store, there is no download because these apps are stored in obb folder .
[Galaxy S 4 i9505 Original Android Development] chenxiaolong:
This is an SELinux issue. For example, one ROM might be expecting /data/media/obb to be labelled as u:object_r:obb_apk_file:s0, while the other ROM expects something different. Thus, SELinux will prevent you from accessing it even if you're root. Could you send me the two boot.img files in /sdcard/MultiBoot for your two ROMs? I'll see if I can come up with something to get this working again. Thanks!
[Galaxy S 4 i9505 Original Android Development] chenxiaolong:
Thank you! :D Merged.
[Galaxy S 4 i9505 Original Android Development] ktetreault14:
Logs for [MENTION=4277844]chenxiaolong[/MENTION] https://mega.co.nz/#F!F10FSaDR!78Vorg9hUCQ5h0HESX9v3Q
[Galaxy S 4 i9505 Original Android Development] chenxiaolong:
Thanks! Did you try booting the ROM? It looks like you flashed the ROM and immediately flashed GetLogs.zip :)
[Galaxy S 4 i9505 Original Android Development] ktetreault14:
No i was only flashing the rom zip with /system deleted. When i did it this last time instead of rebooting into recovery it flashed like i flashed the 5.1.1 kernel on my 5.0.2 rom and it didnt boot.
[Galaxy S 4 i9505 Original Android Development] Ranomez:
Working awesome, thank you very much.

EDIT: Don't want to bother you but I am looking into your sources because I would want to see how hard it would be to add support for a new device (I am no developer but I do hope it is stored in some kind of format that I can understand) but can't actually seem to locate where the configurations for each device is held, could you give me a hint please?
[Galaxy S 4 i9505 Original Android Development] ktetreault14:
https://mega.co.nz/#F!8hd0gTBJ!lbczuGfaXZNi1-xuMh11yA [MENTION=4277844]chenxiaolong[/MENTION] How are we now?
[Galaxy S 4 i9505 Original Android Development] chenxiaolong:
It looks like it should be working :) The partitions were successfully mounted and it looks like Android started to boot up.
[Galaxy S 4 i9505 Original Android Development] ktetreault14:
It hung at samsung s6 edge screen
[Galaxy S 4 i9505 Original Android Development] pikachukaki:
I have a problem..i d/w a miui rom for my device D855 and i patch it...i reboot to recovery and flash it cause it uses aroma after the flashing the phone keeps rebooting to recovery...how i can reboot to primary now that i can't boot to my primary?
[Galaxy S 4 i9505 Original Android Development] chenxiaolong:
Assuming you're using TWRP, reboot into recovery, tap Install, tap images (bottom right corner), and flash /sdcard/MultiBoot/primary/boot.img. That should get you back into your primary ROM.
[Galaxy S 4 i9505 Original Android Development] pikachukaki:
I flash my primary but this is good to know thanks
[Galaxy S 4 i9505 Original Android Development] chenxiaolong:
This may be a stupid question, but /system wasn't removed this time right? In the last_kmsg log, I'm seeing things like:

init: cannot find '/system/bin/dmm_v2', disabling 'DMM-deamon'

But I'm not sure if that's normal on the S6 Edge or not.
[Galaxy S 4 i9505 Original Android Development] ktetreault14:
its using the 5.1.1 rom with system. i also got the g2 working again
[Galaxy S 4 i9505 Original Android Development] haoyangw:
[MENTION=4277844]chenxiaolong[/MENTION]

Can you give me a hint on how to do app sharing with mtbtool manually? I'm really curious and interested. Thanks a lot! Sorry if I disturbed you
[Galaxy S 4 i9505 Original Android Development] todivefor:
DB utilities snapshot3 prob

[MENTION=4277844]chenxiaolong[/MENTION], I am doing some testing. Since I confuse easily, I am trying to take this one step at a time. I have dual and slot-1. I am playing with slot-1, it is test. I wiped cache and dalvik cache on slot-1. It worked fine and rebooted as expected. I went to recovery and booted DB utilities snapshot3. From there, I could switch to all roms, but dual. I switched to primary, and from patcher 1185, I could switch to any rom including dual. All boot.img are as they should be, see attached, Booted back to dual, set kernel. Still can't switch in DB utilities. Maybe unrelated to wiping slot-1 as I cannot remember if I tried switching before.
[Galaxy S 4 i9505 Original Android Development] chenxiaolong:
I'm aiming for tomorrow, but you know how well I meet my ETAs :D
[Galaxy S 4 i9505 Original Android Development] sronweb:
wooow!! :) Nice job!!!
[Galaxy S 4 i9505 Original Android Development] TheDarkKnight:
WOW!!

That's the great dev..

BTW, can somebody please tell me if complete /data sharing (not individual apps) works at present?
[Galaxy S 4 i9505 Original Android Development] sronweb:
Today I have installed last CM nightly using last patcher version (old style, without aroma) with no issue
[Galaxy S 4 i9505 Original Android Development] ktetreault14:
Just went and checked tha patcher :D latest version looks amazing

Edit trying on S6 Edge to install to /data
[Galaxy S 4 i9505 Original Android Development] ktetreault14:
Wow cant seem to thabk you enough [MENTION=4277844]chenxiaolong[/MENTION] you can finally change the S6 Edge from Untested to Fully Working. Oh and by the way im dualbooting 5.0.2 and 5.1.1 Touchwiz if yiu guys didnt already know ;)
[Galaxy S 4 i9505 Original Android Development] ktetreault14:
Installed to /data since my /system is hella small
[Galaxy S 4 i9505 Original Android Development] ktetreault14:
Going to be trying on the g2 shortly.
[Galaxy S 4 i9505 Original Android Development] chenxiaolong:
Woooooot! :D :good:

[/me Runs off to remove the untested label] ;)
[Galaxy S 4 i9505 Original Android Development] 54NJ41:
Thanks a lot dev for your valuable time and dedication for this.

Is there any way to get support for note 3 n900 Exynos version.

And some rom can't be patched.

Again thanks in advance.
[Galaxy S 4 i9505 Original Android Development] Technical:
Chenxiaolong, if we use Link2SD to move apps/data to the 2nd partition on sdcard, will we still be able to share app?

I mean, if an app is on the 2nd partition of the sdcard and I have Link2SD installed on both ROMs, will the app be shared?
[Galaxy S 4 i9505 Original Android Development] Ranomez:
Isn't it already shared if you install link2sd on the 2nd ROM? I'm asking cause I remember when I was using link2sd on my old HTC Touch Pro 2 I used to change ROM's quite regularly so would format system and data almost weekly but installing link2sd and linking I always got all the apps back from my 2nd partition without needing to install them.
[Galaxy S 4 i9505 Original Android Development] Technical:
Yes, it could be except for the encryption. When moved to the sdcard, Android (not Link2sd) encrypts the app to avoid piracy. Will be the cryptography key the same in both ROMs?
[Galaxy S 4 i9505 Original Android Development] Ranomez:
If you move the app to the sd card using link2sd it is not encrypted, or at least it was not at that time, if I remember right the second partition had some folders in it and in one of the folder there were the apk's exactly as they are.
[Galaxy S 4 i9505 Original Android Development] Technical:
Thanks. Will try again. The "problem" then will be only the non movable apps :p
[Galaxy S 4 i9505 Original Android Development] Ranomez:
What do you mean by non movable apps, link2sd allows you to move all apps to the second partition?
[Galaxy S 4 i9505 Original Android Development] Technical:
Are you sure? Not in all devices as far I know.

That's the reason for the option "movable" side by side with "all" apps in the Link2SD menu.
[Galaxy S 4 i9505 Original Android Development] Ranomez:
Are you talking about moving apps to sd from within link2sd (which doesn't use the 2nd partition on the sd card) or about linking to the sd card (which uses the second partition on the sd card) because linking can be done to any apps including launchers and they still work?
[Galaxy S 4 i9505 Original Android Development] Technical:
I'm talking about linking and I'm sure not all apps can be linked to 2nd partition. Not in my S4 I9505.
[Galaxy S 4 i9505 Original Android Development] Quote100:
Ohhhhh app sharing is almost done i can taste it now......
[Galaxy S 4 i9505 Original Android Development] ktetreault14:
Making nice work of the cores [MENTION=4277844]chenxiaolong[/MENTION]
[Galaxy S 4 i9505 Original Android Development] gaww:
Looks great - my question is will there also be option to just share all the apps like in previous version, or will it have to be done individually ?
[Galaxy S 4 i9505 Original Android Development] pbarakhsan:
note 4 dual boot

Master chen

this is more like a clarification question.

so if i install cm as my secondary rom and set the primary kernel before i reboot, what usually happens is , that i get to the second rom just fine, but cant switch to my primary rom.

now do i have to flash the image in recovey for my primary rom, in my note 4?

also would i have to do it every time i wana switch back and fourth or just once?

thank you master chen for all your hard works
[Galaxy S 4 i9505 Original Android Development] chenxiaolong:
Yes, global app sharing will also be supported :) The same restrictions as before still apply though: the ROMs have to be similar enough that /data/app can be the same for both of them.
[Galaxy S 4 i9505 Original Android Development] peppe130:
[MENTION=4277844]chenxiaolong[/MENTION] Hi Chen.. After updating the ramdisk, I'm trying to share my apps but the Patcher is stuck here (see the screenshot) I don't understand if this is a bug or if it's loading apps. If it is loading apps, why don't you add a progress bar? :)
[Galaxy S 4 i9505 Original Android Development] Ranomez:
As far as I understand you flash the 2nd ROM and set the primary kernel after (as I understand you are installing from within the app)? If you do that the kernel for the second ROM will be set for your primary ROM and if the 1st ROM is TW-based it will not be able to boot, what you have to do is set the kernel first and only then flash the 2nd ROM.

Well I did just test it on my old Touch Pro 2 and it allows me to link all apps except system apps, launchers, widgets, everything works great, can you specify some apps that you can't link?
[Galaxy S 4 i9505 Original Android Development] sronweb:
As I understood it should not work yet. I have the same result as you. I guess we should wait for next release.
[Galaxy S 4 i9505 Original Android Development] peppe130:
Ok thank you [MENTION=2778919]sronweb[/MENTION] :)
[Galaxy S 4 i9505 Original Android Development] gaww:
I will initially be using a TMo based TW (4.4.4) and a 5.0.2 TW - should that be similar enough ? If not, may try only doing the user apps that have not caused any issues in the past. Right now , with practically nothing movable left on my 16 gb internal, I have only 500-700 mb free - REALLY looking forward to sharing again - lol.

Thanks again - some really great work going on here.
[Galaxy S 4 i9505 Original Android Development] todivefor:
[MENTION=4277844]chenxiaolong[/MENTION], patched cm-12.1-20150506-NIGHTLY-jfltespr.zip with latest patcher r1212. Recognized as CM and successfully patched to slot-1. It looped in boot animarion, last_kmsg attached. Flashed kernel and it booted fine.
[Galaxy S 4 i9505 Original Android Development] ktetreault14:
TMOBILE S6 EDGE THREAD
[Galaxy S 4 i9505 Original Android Development] v00d007:
[MENTION=3145598]rlorange[/MENTION]

No more updates? Is v1.1c the latest build? It still doesn't do what i want... (i.e. it can't restore the system folder of a backup)
[Galaxy S 4 i9505 Original Android Development] rlorange:
Update coming soon just busy with real life
[Galaxy S 4 i9505 Original Android Development] chenxiaolong:
A quick update on app sharing: I'm debugging odd TouchWiz issues (yet again). The current app sharing design works by proxying the connection between the Android PackageManager (java side) and the installd daemon (native side) and hooking various commands (kinda like Xposed). The mbtool proxy does not run under the u:r:installd:s0 SELinux context, so I have it add a few SELinux rules to the policy. That's all fine and done; no problems on AOSP. Then Touchwiz comes along and decides to reload the policy at a random point during the boot process, which kills the connection between mbtool and installd, leading to the system hanging at the boot animation. Beautiful.

I'm still working on a fix for this. God I hate debugging proprietary stuff...

EDIT: Repatching the policy every time the installd connection is lost works, but man, that's some ugly code.

EDIT2: Okay, TouchWiz's /init will reload the policy from one of the following 3 locations whenever the selinux.reload_policy property is set to "1".

/selinux

/data/security/sepolicy

/data/security/spota/sepolicy

I coded in a workaround to write the patched policy to /sepolicy so a reload won't undo the changes. So far, it seems to be working so far for 5 reboots in a row. I might just be getting lucky with the race condition though. I'll reboot 20 more times to make sure. If it works, I'll commit the changes.

EDIT3: Dang it, broke on the 8th reboot.

EDIT4: 5 workaround attempts later, we have success! If you'll excuse my language, when it doubt, brute force this ****! Instead of patching the policy at the beginning, it'll patch it when the client (ie. PackageManager) connects. And it will try and retry and retry... until the connection is successful. The downside is that the boot time is increased by about 5 seconds. Without being able to modify the TouchWiz source code, this is probably the best I can do.

Time to put my smoking-hot-after-40-reboots Note 4 in the freezer haha. This is 10 hours of my life I'll never get back... https://github.com/chenxiaolong/DualBootPatcher/commit/766e4de43d46d22c9c059df59c79772992626a49
[Galaxy S 4 i9505 Original Android Development] AmyClaraRose:
[MENTION=4277844]chenxiaolong[/MENTION] hi went to try out your patcher app but it doesn't support in the patching zip file area danvdh/Krysten GPE ROM could you please add support
[Galaxy S 4 i9505 Original Android Development] monkteo:
Hi , I want to ask something

I have S4-I9505 dualboot (work OK) v1115

primary - Lollipop TW

multislot1 - MIUI

So if I want to make a clean install on primary (full wipe) it is possibile ? without losing MIUI from multislot1 ?

If yes, how ?

THX
[Galaxy S 4 i9505 Original Android Development] sronweb:
I guess (but not sure) that you should use the multiboot utilities to clean the primary rom (all clean, data etc) of flash the new rom without patching.

But I recommend to perform a nandroid backup before so you can restore original condition in case of problems.

As I understood rlolange utility which you can find on this thread should also allow to backup the multislot rom but I have never tested it.

In the worst case you might need to flash the miui again which using titanium backup to restore apps, calls, sms, whatsup (except gapps) is not a big issue.
[Galaxy S 4 i9505 Original Android Development] Technical:
Yes, it's possible.

I suggest you use the backup tool first.

Then use the multiboot tool to wipe and flash the primary again.
[Galaxy S 4 i9505 Original Android Development] todivefor:
You will have to patch your primary so when it does it's wipes on install it won't wipe your slot-1 rom.
[Galaxy S 4 i9505 Original Android Development] Technical:
What is data slot? What are the paths of the installed ROM? Thanks.
[Galaxy S 4 i9505 Original Android Development] ktetreault14:
[MENTION=4277844]chenxiaolong[/MENTION] i remeber using the freezer trick on the note 4 when flashing thenfirst international lollipop roms
[Galaxy S 4 i9505 Original Android Development] Quote100:
Yo did you actually put it in the freezer? does it get that hot?
[Galaxy S 4 i9505 Original Android Development] ktetreault14:
Yeah
[Galaxy S 4 i9505 Original Android Development] chenxiaolong:
Data: /data/multiboot/data-slot-[the id]/data

Cache: /cache/multiboot/data-slot-[the id]/cache

System: /data/multiboot/data-slot-[the id]/system

This is for devices, like the Note 4 and S 6 (Edge), where the system partition is almost full and the cache partition is tiny (~200MB).
[Galaxy S 4 i9505 Original Android Development] chenxiaolong:
Haha, yeah! I remember that. Optimizing 200+ system apps with ART sure wasn't least CPU intensive thing in the world...
[Galaxy S 4 i9505 Original Android Development] Technical:
Thanks. I was completely wrong. Now I've "learned" the difference between "movable" (to sdcard) limited to the apps which allow that to "link" (which allow everything).
[Galaxy S 4 i9505 Original Android Development] Technical:
I've flashed CM 12.1 as secondary. Installed Link2SD, create the link for the 2nd partition.

Not a single app get recognized by Link2SD. What did I do wrong?
[Galaxy S 4 i9505 Original Android Development] noobiedev83:
How can I get the new patcher so I can patch touchwiz ROMs because when I try to patch them it bootloops in the Samsung logo thanks in advance.

I have a note 4 just in case.
[Galaxy S 4 i9505 Original Android Development] AmyClaraRose:
Its simple you make touchwiz your primary ROM

Primary ROM = no patching = no bootloop
[Galaxy S 4 i9505 Original Android Development] noobiedev83:
I want to have a second touchwiz in data slot, I already have my primary touchwiz