yashsingh1/xdaforums huggingface dataset:
[Galaxy S 4 i9505 Original Android Development] ktetreault14:
Thanks [MENTION=4277844]chenxiaolong[/MENTION] with your lovely app we can now run touch wiz 5.1.1 and Super alpha marshmallow cm on our S6's. Thanks for you work.
[Galaxy S 4 i9505 Original Android Development] `SBR`:
gr8 man...you're doing lot of tasks :cowboy:
[Galaxy S 4 i9505 Original Android Development] chenxiaolong:
You only need to patch the secondary ROM (and anything that should be installed for the secondary ROM). You don't need to change anything for the primary ROM :)
[Galaxy S 4 i9505 Original Android Development] chenxiaolong:
Oh noes, gotta clear out some stuff. After working with so many ROMs and not deleting them, my SSD has 2 MB of space left and my second hard drive has 51 MB left. Crap! :D
[Galaxy S 4 i9505 Original Android Development] Bejda:
Lol,no way we could get you the job easier by uploading just some files of the desired rom?
[Galaxy S 4 i9505 Original Android Development] mgbotoe:
haha it think he is testing out the roms?

Thx for everything! been bragging to my iphone buddies all day LMAO
[Galaxy S 4 i9505 Original Android Development] chenxiaolong:
Haha, yep, I've tested every single one :p
[Galaxy S 4 i9505 Original Android Development] marcoxx626:
Isn't this guy awesome?? Never seen a more attentive dev thats so eager to get everybody up and running, especially with something like dual booting. Great job man! :)

---------- Post added at 11:07 PM ---------- Previous post was at 10:28 PM ----------

So just to make sure...do we no longer have to flash the "enable dual boot" zip before flashing the patched rom?? Didn't see it in the instructions so I'm not sure if it was left out or if you made it a one zip flash :)

Oh and could you add support for Beanstalk rom? :) I tried to do it manually until I remembered that the one I usually flash has an aroma installer so that makes things a little more complicated =/ here's the link http://xdaforums.com/showthread.php?t=2403755 If it's too much trouble then don't worry about it, you've done enough great work as is :)
[Galaxy S 4 i9505 Original Android Development] XS_31:
Thanks for this great job !

I installed CM 10.2 last nightly ROM as secondary with my usual TW ROM as primary with success.

A single question however : are the OTA updates for the CM 10.2 ROM possible from within the ROM or do I have to download, patch and zip each nightly update zip file I want to test ?

A tip for the application : set kernel only for the ROM we are currently running (primary or secondary). Beacuse I've selected "set kernel as primary" by mistake while running the secondary ROM and it was then impossible to reboot into primary ROM. Is it useful to be able to set the secondary kernel as primary ?
[Galaxy S 4 i9505 Original Android Development] marcoxx626:
The CM update within the rom will NOT work because I believe those are official CM nightlies that don't have the dual boot patch. You're better off just downloading the already patched CM nightlies through the Dev's thread if you haven't been in that thread yet. Here's the link http://xdaforums.com/showthread.php?t=2383143

As for the problem you had with the app, did you try using the "change to primary" zip? I believe that should let you reboot back into the primary rom and then reset the kernel within the dual boot app.
[Galaxy S 4 i9505 Original Android Development] chenxiaolong:
Just a quick reply so you can get your phone back up and running (I'm doing a physics report right now :().

Setting the kernel as secondary really is only useful if you have a locked bootloader. On the AT&T and Verizon devices, the loki tool alters the kernel during the flashing process. The dual boot app needs a copy of that modified kernel or else the locked bootloader will reject it when switching between ROMs.

To get back to your primary ROM, just grab the boot.img from the zip of your TouchWiz ROM and copy it to /raw-system/dual-kernels/primary.img :good:

I'll answer your other questions when I'm done with my homework ;)
[Galaxy S 4 i9505 Original Android Development] XS_31:
Thanks for your asnwer.

I tried to "change to primary" from the app, then from recovery by zipping the "change to primary" zip file. I even reinstalled the primary kernel (usual method in recovery, with cache and dalvik cache wipe after installation) without success, it always rebooted on the secondary ROM.

So I've restored a fresh nandroid backup from my primary ROM and restarted secondary ROM installation from scratch.
[Galaxy S 4 i9505 Original Android Development] zhuchella:
Can I use it with new version of MIUI ?

And what about http://xdaforums.com/showthread.php?t=2303239 and http://xdaforums.com/showthread.php?t=2281738 ?
[Galaxy S 4 i9505 Original Android Development] WuchuHurD:
Could you do FoxHound?
[Galaxy S 4 i9505 Original Android Development] kendragon:
you can set to share only data apps and not system apps, it would be great to share call logs and sms :) thanks for your work!
[Galaxy S 4 i9505 Original Android Development] chenxiaolong:
Yes, any version of MIUI should work. I'm still working on the other two. I've updated the OP with the ROMs and kernels I'm working on :)
[Galaxy S 4 i9505 Original Android Development] OreBoySwaggin:
help?

i have a problem, i flashed the MaKTail GPE rom, aand i don't have root...
[Galaxy S 4 i9505 Original Android Development] chenxiaolong:
Just patch SuperSU and flash it: http://download.chainfire.eu/supersu :good:
[Galaxy S 4 i9505 Original Android Development] OreBoySwaggin:
haha thanks, i realized that right after i posted that, and i just obtained root, BUT i had to patch the file first, not just flash it!
[Galaxy S 4 i9505 Original Android Development] blood_talon:
Ok, then I need to ask you to officially support the Unwizz v2 ROM pls! :cyclops:
[Galaxy S 4 i9505 Original Android Development] CPA Poke:
[MENTION=4277844]chenxiaolong[/MENTION] , is it feasible that those executables in your patcher zip could be converted to an apk or even just a terminal script that would allow users to patch zips directly on their devices?

I'm rarely ever on my personal computer, and I do all of my ROM/kernel/mod downloading directly on my phone ;)

Literally just curious if that's even feasible.

Edit: After thinking through it a little more, maybe the easiest thing at first would be to create an executable shell script (using the sed command maybe?) to automate the manual updater-script modifications...so the only thing users would have to do is extract the updater-script from the zip they're wanting to patch, run the script to modify it, then drop it and the dualboot.sh script into the zip file using Zarchiver (or any other app that can perform that function).
[Galaxy S 4 i9505 Original Android Development] hemmie:
Here you go, Just tried two PAC Roms on 2.4.3 in windows. Also wanted to emphasize that they do not work on OSX (snow leopard mbp) as well. I think something to do with illegal instruction was the error.
[Galaxy S 4 i9505 Original Android Development] hemmie:
This time Another error on latest version 2.5.

Is the culprit python portable to blame, are you compiling this portable in your windows 8 64 machine or getting it from http://portablepython.com/

I just don't get it how most of the build are NOT working for me and they all work for the Dev. I'm just talking about creating the dualboot script not not actually dual booting.
[Galaxy S 4 i9505 Original Android Development] jova33:
So if I want to patch a ROM that's not currently supported, manually patch it?

And patch the boot.img.

Then flash ROM_dualboot.zip, gapps_dualboot.zip, and loki-doki.zip in recovery. Correct?

Sent from my SCH-I545
[Galaxy S 4 i9505 Original Android Development] marcoxx626:
Correct. Take a look at the example patches he has he linked in the OP. What ROM are you patching?
[Galaxy S 4 i9505 Original Android Development] chenxiaolong:
Thanks! Have you changed the environment variables on your system? It's weird how the temporary files are being stored on the r: drive. The other thing I can't think of is if the ROM itself, the patcher, or any temporary files are on a network share. As a test, could you try creating two folders, r:\a and r:\b and then from python, run:

import os
os.path.samefile("r:\\a", "r:\\b")

Unless I'm reading that output wrong, that should fail with the same "Incorrect Function" error.

For OS X, I can't really test because I don't have a Mac, but what error shows up there?
[Galaxy S 4 i9505 Original Android Development] chenxiaolong:
Darn it, that's another bug caused by trying to support Python 2 and 3 at the same time. I'll work around that.

EDIT: Yes, I'm using http://portablepython.com/

EDIT2: Nope, just a typo. I did "if version less that 3.3" instead of 3.0. Oops

EDIT3: Could you try this release? It's identical to 2.5 except this bug is fixed.
[Galaxy S 4 i9505 Original Android Development] chenxiaolong:
That's exactly right :)
[Galaxy S 4 i9505 Original Android Development] hemmie:
That's right it fails with the same error, It can create temp files, I seen it s get created but for some reason that python code fails, thus in turn making the whole patcher unusable.

Yes my temp folders are actually mapped to a ramdisk , It should be transparent to apps and programs. But your script 18.1 works with the same setup, could be an earlier python version. I would think it is a python bug could not access the temp files here.
[Galaxy S 4 i9505 Original Android Development] chenxiaolong:
Okay, that would definitely explain why it's not working. Version 1.18.1 is the last version to use the ramdisk replacement method. In version 2.0+ ramdisk is extracted, modified, and recompressed. During the creation of the ramdisk's cpio archive, I need to check that two folders are the same. The os.path.samefile function in python uses filesystem features, like inodes in Linux filesystems and the MFT on NTFS, to do that. The filesystem for the ramdisk might not have something similar to that.

I think I'll modify the patcher to try os.path.samefile and if that fails, just do a file path string comparison.
[Galaxy S 4 i9505 Original Android Development] shremi:
It works

After many tries and with your update of today i finally got kangabean to work on my device along with goldeneye.

Thank you so much chen :good:

Confirmation number: 4RG44498RL887403U

I want to know if you could help me out and tell me if there is a way to add the Ktweaker kernels for the google edition rom .... I used on my touchwizz along with the app in order to get better battery life and now i would love to try it on kangabean but i cant seem to get it to work.

Again than you for all of your hard work

Shremi
[Galaxy S 4 i9505 Original Android Development] jova33:
An unofficial AOKP build for VZW S4.

So, with the boot.img that's in the ROM zip, patch it, and just replace it with the patched kernel?

Edit: or just the official 10/18 AOKP nightly.

Sent from my SCH-I545
[Galaxy S 4 i9505 Original Android Development] allan1313:
This looks pretty awesome but is a bit over my head. So I want to make sure I have it right. So I downloaded the patcher and dual boot switcher apks. (I am on vzw if that makes any difference) I am running hyperdrive TW as my main rom. I set my current kernel as the kernel for rom 1.

I download slim and slim gapps and patched them with the patcher. So now I just boot into twrp and flash the patched files and then put the dual boot apks on the 2nd rom? Is that correct ? Am I missing anything?
[Galaxy S 4 i9505 Original Android Development] marcoxx626:
Yup, you got it man! i think the only slim gapps that work are the Slim AIO gapps by the way. Also, don't forget to download the utilites zip, you'll need that somtimes as well!
[Galaxy S 4 i9505 Original Android Development] allan1313:
One last question, do I wipe anything or use the utility zip to wipe before I flash the 2nd rom? TIA
[Galaxy S 4 i9505 Original Android Development] HearMeWhisper:
Nope, flash away dude lol
[Galaxy S 4 i9505 Original Android Development] ahoslc:
For a noob what's the easiest way to share apps can someone give me some easy instructions.
[Galaxy S 4 i9505 Original Android Development] allan1313:
Go to the play store and download an app called my app sharer. You can send apks in email or to dropbox.
[Galaxy S 4 i9505 Original Android Development] ahoslc:
I am sorry I was not very clear. I was told you can run a script or something with this app to share some apps between both Roms.
[Galaxy S 4 i9505 Original Android Development] RK:
I successfully shared apps using the init.d script method. However, paid apps don't get shared.

I tried the following:

#!/system/bin/sh

mount -o bind /raw-data/app /data/app

mount -o bind /raw-data/app-lib /data/app-lib

mount -o bind /raw-data/app-asec /data/app-asec

mount -o bind /raw-data/app-private /data/app-private

This just shared the free apps, not the paid ones.
[Galaxy S 4 i9505 Original Android Development] corncobman:
Wooooo!

Downloading now.
[Galaxy S 4 i9505 Original Android Development] Eliminater:
i hope now the patcher support ks01lte with cm13 aosp roms
[Galaxy S 4 i9505 Original Android Development] chenxiaolong:
This bit caught my eye. I started developing DualBootPatcher for the Galaxy S4 first and my T-Mobile variant (Samsung SGH-M919) had a 2GB cache partition. I'm really glad they shrunk it in later phones though. :p
[Galaxy S 4 i9505 Original Android Development] chenxiaolong:
I have made no changes at all to device and ROM support yet in this release. It is the same as the previous release. This was purely a feature/bug fix release.

EDIT: I'm just now going over the past 20 pages in this thread to look at logs, etc.
[Galaxy S 4 i9505 Original Android Development] Ashwin Prabhunerurkar:
tabs s 10.5 wifi

log files just incase my post got lost

https://drive.google.com/file/d/0B6dHVx2zEkoXV1A1WkNyMXpNTWc/view?usp=sharing

hope you add this device too
[Galaxy S 4 i9505 Original Android Development] chenxiaolong:
Sharing SMS and call logs is not possible. Blame Android :) Every version stores them in the database differently and TouchWiz/Sense/etc. make even more changes on top of that. Developers of apps, like Titanium Backup, do a tremendous amount of awesome work to convert the database to a universal format.
[Galaxy S 4 i9505 Original Android Development] chenxiaolong:
I saw your previous posts. Will add either tomorrow or Tuesday :)
[Galaxy S 4 i9505 Original Android Development] chenxiaolong:
You're going to love (or hate) this :)

SudaMod uses the open-source CM update-binary, but it's not the same one Lenovo uses. I actually downloaded a bunch of ROMs for your device and it seems like they all copy the same closed-source update-binary file (maybe from an official ROM?). Screw Mediatek lol. Anyway... 8.0.0.r2007.gfa298ab has a change that *might* fix the Mediatek issues, but I don't know for sure. I'm being optimistic though :)
[Galaxy S 4 i9505 Original Android Development] remowrx:
[MENTION=4277844]chenxiaolong[/MENTION]

I'm afraid that the missing dll issue persists with the r2007 windows package.
[Galaxy S 4 i9505 Original Android Development] pc boy:
[MENTION=4277844]chenxiaolong[/MENTION]

I can't help saying it!!

You're so loooooooovely:);)

Many thanks for the awesome work;)
[Galaxy S 4 i9505 Original Android Development] todivefor:
[MENTION=4277844]chenxiaolong[/MENTION], while you are in there adding devices, could you please add Galaxy Tab S2 8" (wifi). Haven't rooted yet, but about to.

Thank you.
[Galaxy S 4 i9505 Original Android Development] karkasss:
[MENTION=4277844]chenxiaolong[/MENTION]

Would you add jalte, galaxy s4 korean model (SHV-E300)? This is also exynos same as i9500 model but lte version.

Getlog is

https://mega.nz/#!Q0VziAKQ!TGNy9cHUjfxB9LYZWGVodU7bogHGNFz2tF9eMqGvJJQ

+ // Samsung Galaxy S 4 (SHV-E300)+ device = new Device();+ device->setId("jalte");+ device->setCodenames({ "jalte" });+ device->setName("Samsung Galaxy S 4 (SHV-E300)");+ device->setBlockDevBaseDirs({ DWMMC0_BASE_DIR });+ device->setSystemBlockDevs({ DWMMC0_SYSTEM, "/dev/block/mmcblk0p20" });+ device->setCacheBlockDevs({ DWMMC0_CACHE, "/dev/block/mmcblk0p19" });+ device->setDataBlockDevs({ DWMMC0_USERDATA, "/dev/block/mmcblk0p21" });+ device->setBootBlockDevs({ DWMMC0_BOOT, "/dev/block/mmcblk0p9" });+ device->setRecoveryBlockDevs({ DWMMC0_RECOVERY, "/dev/block/mmcblk0p10" });+ device->setExtraBlockDevs({ DWMMC0_RADIO, DWMMC0_CDMA_RADIO });+ devices.push_back(device);
[Galaxy S 4 i9505 Original Android Development] chenxiaolong:
Thanks! This will be fixed in the next build. Eventually, I'm going to have to build these myself. The ones included with my Linux distro have way too many dependencies.
[Galaxy S 4 i9505 Original Android Development] chenxiaolong:
Welcome to the Tab S2 club! I also got Tab S2 (though it's the 9.7" wifi version) recently for my birthday and haven't rooted it yet. Now may finally be the time to do so (especially with the recent efforts in porting CM to this device) :)
[Galaxy S 4 i9505 Original Android Development] todivefor:
Thanks. I really like it. I have read up on root, just haven't had the time to do it yet. Spare time spent learning java, after entire career programming IBM assembler. Have you rooted your S6 edge plus yet? Remember Samsung Pay (and android pay for me, although works for others) will not work after root until someone like you figures it out. :laugh:
[Galaxy S 4 i9505 Original Android Development] TheDarkKnight:
First of all, thank you so much for all your work.. I really wish I could give you something like a donation but I can't... I wish I would get older fast..

Anyway, back to the point, it's the same all the time, I guess, it still doesn't work :(:(...

But on a brighter note, there's seems to be some progress :D:fingers-crossed:

The error message now is: set_metadata: Error on lstat of "/system/vendor/operator/app/Baidu_Location/arm64/Baidu_Location.odex": No such file or directory

Will it work if remove this line from the updater-script??

I am attaching the multiboot.log.

I must tell you I've managed to get a ROM (Androium v5) running in the extsd-slot 1 by editing its updater-script as per the instructions given by [MENTION=5048731]911-Future_Maker[/MENTION] - by removing these lines: set_metadata(“/system/bin/istd8303″, “uid”, 0, “gid”, 2000, “mode”, 0755, “capabilities”, 0×0, “selabel”, “ubject_r:istd8303_exec:s0″);

set_metadata(“/system/xbin/procrank”, “uid”, 0, “gid”, 0, “mode”, 06755, “capabilities”, 0×0, “selabel”, “ubject_r:system_file:s0″);

- from the updater-script and replacing these lines: package_extract_file(“boot.img”, “/tmp/boot.img”);

write_raw_image(“/tmp/boot.img”, “bootimg”);

delete(“/tmp/boot.img”);

package_extract_file(“logo.img”, “/tmp/logo.img”);

write_raw_image(“/tmp/logo.img”, “logo”);

delete(“/tmp/logo.img”);

With these: package_extract_file(“boot.img”, “/dev/block/platform/mtk-msdc.0/by-name/boot”); assert(run_program(“/system/bin/dd”, “if=/dev/zero”, “of=/proc/driver/mtd_writeable”, “bs=3″, “count=1″));

No, I didn't edit it as he gave the updater-script he edited.. Here's the link to it in case it is of any help: https://cloud.mail.ru/public/7KCT/QrY2YSarr

Replacing it in the ROM made it to install without any problems... I am telling you all this because maybe it'll help you..

Thanks again for all your hard work.. I keep saying this because it's all I can do :o
[Galaxy S 4 i9505 Original Android Development] gc_geforce:
Is it possible to create a larger size "slot" when I use the external SD card for the ROMs?
[Galaxy S 4 i9505 Original Android Development] vineeth314:
Will this work with yureka plus for cos12.1 and cm 13 ?
[Galaxy S 4 i9505 Original Android Development] noobiedev83:
I was so happy when I saw the backup button but when I pressed it Wip damnn lol thanks for the update!!
[Galaxy S 4 i9505 Original Android Development] chenxiaolong:
That was my mistake. I made the change, but forgot to push it a couple weeks ago. It is supported in the latest build 8.0.0.r2007.gfa298ab.
[Galaxy S 4 i9505 Original Android Development] chenxiaolong:
Done: 8.0.0.r2011.g7095f13.

I believe those were all the device support requests. Now to look at the bugs and other issues.
[Galaxy S 4 i9505 Original Android Development] chenxiaolong:
Is your /system partition formatted as F2FS? If so, the ROM doesn't support that (it only supports F2FS for /data and /cache).
[Galaxy S 4 i9505 Original Android Development] chenxiaolong:
Should be fixed in 8.0.0.r2012.g8d540c7
[Galaxy S 4 i9505 Original Android Development] chenxiaolong:
Some ROMs are very "rude" and change the SELinux type on the obb folder, which makes it unreadable in your primary ROM. You'll want to update the ramdisk from your primary ROM, which adds the multiboot components, including code to fix the obb folder issues. Since your signature says you have a OnePlus 2, you'll want to use 8.0.0.r2012.g8d540c7 or later for the ramdisk update or else you might run into the same issues as [MENTION=5503616]karanpats[/MENTION].
[Galaxy S 4 i9505 Original Android Development] karanpats:
Thanks a lot...

Keep up the good work man.. Appreciate it..!!!
[Galaxy S 4 i9505 Original Android Development] chenxiaolong:
I think you are just unlucky with the ROMs you're trying to use :D

chenxiaolong@cxl-4270cto todivefor/Post7871 » unzip cm-11-20151107-UNOFFICIAL-grouper.zip boot.img
Archive: cm-11-20151107-UNOFFICIAL-grouper.zip
signed by SignApk
inflating: boot.img
chenxiaolong@cxl-4270cto todivefor/Post7871 » extractbootimg boot.img
Boot image is a plain boot image
Found Android boot image header at: 0
- magic: ANDROID!
- kernel_size: 5068748
- kernel_addr: 0x10008000
- ramdisk_size: 372491
- ramdisk_addr: 0x11000000
- second_size: 0
- second_addr: 0x10f00000
- tags_addr: 0x10000100
- page_size: 2048
- dt_size: 0
- unused: 0x00000000
- name:
- cmdline:
- id: 8a6f6e9515fdd7a2cf1283dec217936ff8faccb1000000000000000000000000

Output files:
- cmdline: ./boot.img-cmdline
- board: ./boot.img-board
- base: ./boot.img-base
- kernel_offset: ./boot.img-kernel_offset
- ramdisk_offset: ./boot.img-ramdisk_offset
- second_offset: ./boot.img-second_offset
- tags_offset: ./boot.img-tags_offset
- page_size: ./boot.img-page_size
- kernel: ./boot.img-kernel
- ramdisk: ./boot.img-ramdisk
- second: ./boot.img-second
- dt: ./boot.img-dt

Done
chenxiaolong@cxl-4270cto todivefor/Post7871 » cat temp/fstab.grouper
# Android fstab file.
#<src> <mnt_point> <type> <mnt_flags> <fs_mgr_flags>
# The filesystem that contains the filesystem checker binary (typically /system) cannot
# specify MF_CHECK, and must come before any filesystems that do specify MF_CHECK

/dev/block/platform/sdhci-tegra.3/by-name/APP /system [B][COLOR="Red"]ext4[/COLOR][/B] ro wait
/dev/block/platform/sdhci-tegra.3/by-name/CAC /cache [B][COLOR="red"]ext4[/COLOR][/B] noatime,nosuid,nodev,nomblk_io_submit,errors=panic wait
/dev/block/platform/sdhci-tegra.3/by-name/UDA /data [B][COLOR="red"]ext4[/COLOR][/B] noatime,nosuid,nodev,nomblk_io_submit,errors=panic wait,encryptable=/dev/block/platform/sdhci-tegra.3/by-name/MDA
/dev/block/platform/sdhci-tegra.3/by-name/MSC /misc emmc defaults defaults
/dev/block/platform/sdhci-tegra.3/by-name/LNX /boot emmc defaults defaults
/dev/block/platform/sdhci-tegra.3/by-name/SOS /recovery emmc defaults defaults
/dev/block/platform/sdhci-tegra.3/by-name/USP /staging emmc defaults defaults

/devices/platform/tegra-ehci auto vfat defaults voldmanaged=usbdisk:auto
chenxiaolong@cxl-4270cto todivefor/Post7871 »

As seen in the fstab file (towards the bottom) of the CM ROM you linked, it only tries to mount /system, /cache, and /data as ext4. It doesn't even attempt f2fs, so there is no way this would boot in your setup.
[Galaxy S 4 i9505 Original Android Development] chenxiaolong:
Ahh, yeah, this is a pretty common issue on the Note 4. Setting "ro.patcher.device=trltexx" made no difference because your phone already passed all of the checks made by DualBootPatcher. However, when you flash the ROM, its updater-script file manually checked to see if "ro.product.device=trltexx" is true. In other words, it's the ROM that's printing the error message. In this case, editing "ro.product.device", like you did, is the correct way to fix the issue.