yashsingh1/xdaforums huggingface dataset:
[Galaxy S 4 i9505 Original Android Development] 911-Future_Maker:
Yeah, my dualboot setup definitely needs work. Using the test 2842 build on Oukitel K6000 Pro that was compiled for a 32bit rom on the new 64bit rom I found out that switching roms doesn't work before and after updating the ramdisk of the primary. To be specific both roms (2 roms on extsd-slot) didn't boot, the patcher indicates that it switched the rom, but on reboot the primary roms boots or a part of it as I see it's bootanimation , but it's in bootloop I think because the wait is more than usual. The worst part is that after updating the ramdisk of the primary I get a false "sdcard corrupted" notification. When I reversed to the original boot.img the message was gone. Interesting... that's clearly showing how updating the ramdisk affects that nasty sdcard corrupted message on Android 6.0 on MTK devices. [MENTION=4277844]chenxiaolong[/MENTION] I attached the whole set of logs including the boot.img after updating the ramdisk to help you find out what's causing the problems. I already attached the original boot.img in a previous post so you can compare the code. I flashed the Getlogs zip right after trying to boot on the roms on the extsd-slot.
[Galaxy S 4 i9505 Original Android Development] celoxocis:
thanks for the info. my guess is that the actual Boot image is patched by the dual boot patcher itself?
[Galaxy S 4 i9505 Original Android Development] nicesoni_ash:
Yes, while flashing the secondary rom or later I guess.

Sent from my "1+2" powered by Unofficial RR

Compiled by myself.
[Galaxy S 4 i9505 Original Android Development] Eagle:
Could you please add hlteskt to codenames?
[Galaxy S 4 i9505 Original Android Development] Pcsx2006:
Nevermind I found the problem.

I dirty flashed the stock 3.2.7 through which encrypted the phone.
[Galaxy S 4 i9505 Original Android Development] chenxiaolong:
Version 9.0.0 is finally released! https://snapshots.noobdev.io/ (Old releases have been moved here: https://snapshots.noobdev.io/old_files/)

Changes:

ROM backup/restore support in the app

Android 7.0 support

Worked around buggy disk space detection logic in some Gapps packages

Initial support for Sony combined-ramdisks

Switches to target ROM before flashing (fixes issues with zips that modify the existing boot image)

Fixed FC when selecting files with some file managers

Ignore external SD mount failure if ROM is not installed to an extsd-slot

Fixed Boot UI not showing up after switching ROMs once

Added support for numerous devices

Technical changes:

New YAML-based device definition files: https://github.com/chenxiaolong/DualBootPatcher/tree/master/data/devices

Dropped migration paths from earlier releases

Dropped requirement for setting MBTOOL_NO_MULTICALL=true when running "mbtool_recovery"

Added simple kernel audit message logging tool to help with debugging SELinux denials (esp. useful when dealing with TW 6.0)

Fixed overly restrictive backup name validation

Nougat support

Switched to Nougat-style /dev/__properties__ directory

Added SELinux labels to mbtool services

Convert binary /file_contexts.bin file to text-based /file_contexts file to avoid libpcre dependency

Installer improvements

Fixed updater result when the process is killed by a signal

Create temporary installation environment in a tmpfs mountpoint

Enable private mount propagation and unmount all unneeded filesystems before running the installer. This works around a bug in the AOSP updater where having 32 or more mountpoints causes a buffer overflow

Defer mounting bind mounts until they are needed. This results in "proper" mount/unmount behavior within the chroot

Switch to target ROM before flashing

Boot process improvements

Fixed incorrect UID/GID of files patched by mbtool at runtime

Ignore external SD mount failures if mountpoint source paths are not from the external SD

Fixed deletion of Boot UI skip file which prevented the Boot UI from launching after a successful ROM switch

Don't treat fstab entries with the "noemulatedsd" vold option as an external SD

App improvements

Fixed crash when loading a file from a file:// URI

Fixed calculating real paths from a neuteredsaf URI

Added ACTION_OPEN_DOCUMENT_TREE support to neuteredsaf

Refactored in-app flasher to also handle restoring backups

Switched to com.github.clans:fab library for the FAB

Build system improvements

Validate device definition files during build

Requires CMake 3.6

Requires Android NDK r13

Disable Android SDK component auto-download feature in gradle ("-Pandroid.builder.sdkDownload=false")
[Galaxy S 4 i9505 Original Android Development] chenxiaolong:
That's enough feature adding for now. I'm going to work on the past 50-ish posts about issues I haven't gotten around to fixing yet. :)
[Galaxy S 4 i9505 Original Android Development] Pcsx2006:
Awesome work [MENTION=4277844]chenxiaolong[/MENTION] thnx for the update

Downloaded already gonna check it.
[Galaxy S 4 i9505 Original Android Development] minhas729:
sorry for about a totally noob question.. but does this update gives a green signal to lgg3 as well?

developer option not reachable issue is fixed?
[Galaxy S 4 i9505 Original Android Development] chenxiaolong:
Added in 9.0.0.r7.gae0ed2e. I had to create a new device because the hlteskt partition table is slightly different from the other hlte devices. (/data partition being the 25th partition instead of the 26th.)
[Galaxy S 4 i9505 Original Android Development] chenxiaolong:
Yes it is. It's always easiest to copy an existing device definition and adapt it for your device. However, a complete description of all available options is available here https://github.com/chenxiaolong/DualBootPatcher/blob/master/data/devices/SAMPLE.yml
[Galaxy S 4 i9505 Original Android Development] chenxiaolong:
Yep, I have a S7 Edge now! Definitely not getting a Note 7 anymore. (Though it would serve as a nice heater for the upcoming Winter if I put it in a metal box.)
[Galaxy S 4 i9505 Original Android Development] chenxiaolong:
I am no longer making Windows builds until a compiler bug is fixed.
[Galaxy S 4 i9505 Original Android Development] chenxiaolong:
Thanks for the logs! Added in 9.0.0.r9.g3a82ef1.
[Galaxy S 4 i9505 Original Android Development] JoshDaWhite:
Hey don't forget to search the logs I posted a couple of pages ago to make dual boot work on encrypted Oneplus 3.Thanks!
[Galaxy S 4 i9505 Original Android Development] physwizz:
I have tw 4.4.2 as a primary and slim 5.1.1 as a secondarý.

My system has not been supported since 8.0.0 r2616.

I tried to flash a patched rom on extSD using 9.0.0 r7 and i got an error.

Perhaps I should change my primary to LP
[Galaxy S 4 i9505 Original Android Development] corsicanu:
[MENTION=4277844]chenxiaolong[/MENTION] no Samsung A5 support in latest snapshot? :(
[Galaxy S 4 i9505 Original Android Development] KaMyKaSii:
[MENTION=4277844]chenxiaolong[/MENTION]

if you lost in the previous pages, you can take a look at my previous post?

http://xdaforums.com/showthread.php?t=2447534&p=69033267

By changelog can deduce that you fixed the bug of false notification sdcard corrupted, right? This is very good, thank you. But you forgot to add my device, so when you can do, thanks. And I could make a request? I do not think you should remove all the functionality to share apps between roms. If this function can cause instabilities or bootloops a simple message to activate saying that this function is unstable and any related report to it will be ignored is enough.
[Galaxy S 4 i9505 Original Android Development] Muffycheeks:
Read carefully:

http://xdaforums.com/showthread.php?t=2447534
[Galaxy S 4 i9505 Original Android Development] 911-Future_Maker:
[MENTION=4277844]chenxiaolong[/MENTION] Thanks for the new v9 release! What an awesome update given all the changes and improvements you made. Unfortunately I noticed you dropped the support for Oukitel K6000 Pro or you just added support in the test 2842 build. Now I'm not able to test the new patcher. Please check the issues I described in posts #9806 and #9820. In short I need you to push a new build with support for Oukitel 64bit roms. I hope the sdcard corrupted problem was fixed in v9, but currently can't test it.
[Galaxy S 4 i9505 Original Android Development] 911-Future_Maker:
I'm also looking into that lol. :D [MENTION=7651201]LitDesign[/MENTION] Please, next time when posting such a long code sessions use the HIDE bb code, thanks.
[Galaxy S 4 i9505 Original Android Development] eilex17:
Thanks for update and incluided backup/restore!!

But my i9505 frezze and not finalize backup...

Please fix :fingers-crossed:
[Galaxy S 4 i9505 Original Android Development] 911-Future_Maker:
I guess you're trying to backup the currently running rom right? May be that's the case.
[Galaxy S 4 i9505 Original Android Development] monkteo:
Guys something it's not right.

When I try to patch a rom for dual after choose model-location and name, presing continue he take me to something weird (look in the screenshot)
[Galaxy S 4 i9505 Original Android Development] Russiamen:
[MENTION=4277844]chenxiaolong[/MENTION] add support Asus Zenfone 2(Z00D)

Logs attachment
[Galaxy S 4 i9505 Original Android Development] eilex17:
No, im on multislot1 rom and backup for my primary backup rom...
[Galaxy S 4 i9505 Original Android Development] Muffycheeks:
Explain how to go about restoring the back-up with new Patcher
[Galaxy S 4 i9505 Original Android Development] vitaly51370:
chenxiaolong - Version 9.0.0 is finally released! https://snapshots.noobdev.io/

I made a backup, but as it is now to restore? In the menu you do not see "Restore a backup".
[Galaxy S 4 i9505 Original Android Development] physwizz:
Just tried r9.

It flashed but got recovery on reboot.

View attachment MultiBoot.log
[Galaxy S 4 i9505 Original Android Development] nutpants:
Tab pro 12.2 Wi-Fi

Don't know what happened but failed to boot into secondary rom

Both are 4.4

Got a bunch of vibrations at boot, then it went into recovery so I got logs

(One a samsung 4.4.2 and the other omni Rom 4.4.4 http://xdaforums.com/galaxy-tab-pro-12-10-8/development/t900-omnirom-t2929172)

Both worked fine individuality.

Logs attached

And could you add the variant v2awifi for flashing compatibility?
[Galaxy S 4 i9505 Original Android Development] Eagle:
Yeah yeah I know, was on mobile so do understand.
[Galaxy S 4 i9505 Original Android Development] kingknuts:
So not boot ui feature con LG G3 D855??

If so is sad to hear that, but why is for validation? Is due the need of bumped bootloaders?

Please [MENTION=4277844]chenxiaolong[/MENTION] at least reply to one of my comments please :'(
[Galaxy S 4 i9505 Original Android Development] chenxiaolong:
Nothing related with the LG G3 has been changed (yet).
[Galaxy S 4 i9505 Original Android Development] chenxiaolong:
Just merged the pull request. It will be in 9.0.0.r12.g499d389 :)
[Galaxy S 4 i9505 Original Android Development] chenxiaolong:
It looks like you chose the wrong device when you patched the file. The correct option should be "Samsung Galaxy Note 3 LTE-A" (I hope I didn't mess up the name of the device).
[Galaxy S 4 i9505 Original Android Development] chenxiaolong:
That's supposed to be a joke :) It happens if you select a device with a locked bootloader in the app. Did you accidentally choose the Snapdragon S7/Edge option by chance?
[Galaxy S 4 i9505 Original Android Development] chenxiaolong:
You restore a backup exactly like how you'd flash a zip (because backups can also be restored to any slot):
[Galaxy S 4 i9505 Original Android Development] chenxiaolong:
Can you upload the boot.img for your current ROM (the one that fails to boot)? Your device seems to have a non-standard filename for the fstab file.

Sure. Can you confirm that v2awifi has the same partition table? Notably, does it also have:

system: /dev/block/mmcblk0p23
cache: /dev/block/mmcblk0p24
data: /dev/block/mmcblk0p25
boot: /dev/block/mmcblk0p14
recovery: /dev/block/mmcblk0p15
[Galaxy S 4 i9505 Original Android Development] chenxiaolong:
When it reboots to recovery, can you flash GetLogs (from https://snapshots.noobdev.io) and send me the file it creates in /sdcard/logs/? MultiBoot.log only contains the installation log, but not the kernel log.
[Galaxy S 4 i9505 Original Android Development] chenxiaolong:
Thanks for the logs! How does this device boot? I don't see a boot or recovery partition.
[Galaxy S 4 i9505 Original Android Development] Eagle:
Oh lol. I didnt realized you added lte-a , thank you once again. Hope its working!
[Galaxy S 4 i9505 Original Android Development] whitewolf69:
I've downloaded the latest version of the app..

I wanted to patch some zip files.. But I'm not able to select the zip file.. Once I click on zip file.. It opens and shows what's into it. TugaPower Rom CM14
[Galaxy S 4 i9505 Original Android Development] MisiekDP:
Hi, [MENTION=4277844]chenxiaolong[/MENTION],

I have DualBootPatcher with version 9.0.0.r12 and I have problem with patching ramdisk. When I patch ramdisk via DBP app and I reboot my phone, it doesn't boot. I see only "Galaxy Note 3" logo. To start Android I need to flash boot.img.before-ramdisk-update.img.

Btw I want to test backup tool and TW 6.0 but I have a problem with updating ramdisk so I can't do nothing :p

If you want I can attach boot images too.

Thanks for help! :)

EDIT: Oops... XDA Labs doesn't support Android emoticons :/

EDIT2: Now I noticed that, during booting before kernel update I have http://attach.bbs.miui.com/forum/201510/23/191428joyz3a8o4uexpaos.jpg and after update I have only "Set Warranty Bit : kernel" without "KERNEL IS NOT SEANDROID ENFORCING".
[Galaxy S 4 i9505 Original Android Development] chenxiaolong:
EDIT3: Test build link below has been updated.

EDIT2: I did mistake which device you have :( One sec, I'll make a test build with your device definition file.

EDIT: Sorry, did I mistake which device you have?

---

Thanks for the file!

You'll definitely want to include every possible path (even the Marshmallow-only ones). Any paths that do not exist within the current ROM will simply be ignored.

Having "/" as a base_dir is not ideal, but it'll work!

Ahh, I see. Sorry for the misunderstanding. The cache partition is being mounted at /raw/extsd because of this line in the fstab file:

15,1616,9070987,-; (5)[1:init]mblog: fstab: /devices/mtk-msdc.0/11230000.msdc0* auto vfat defaults voldmanaged=sdcard0:auto
15,1617,9071015,-; (5)[1:init]mblog: -> External SD entry

The cache partition happened to be the last one matching /sys/devices/mtk-msdc.0/11230000.msdc0* that the kernel detected. I am extremely confused at how the ROM detects what to mount at /storage/sdcard0 since /devices/mtk-msdc.0/11230000.msdc0* matches every single internal partition on your device. I've added a flag to skip sdcard0 on your device. Could you try out the new test build here? https://github.com/chenxiaolong/DualBootPatcher/pull/237

Unfortunately, it's not as standard as you might think. I've seen multiple devices where the internal storage presents itself as 3 disks to the kernel, so the SD card ends up being /dev/block/mmcblk4p1. It can also change depending on if you have a USB-OTG flash drive plugged in during boot.
[Galaxy S 4 i9505 Original Android Development] chenxiaolong:
Hmm, I don't see anything in the logs related to the mbtool issue. Any chance you could grab a logcat when it happens again?

As for the boot issue. Could you try flashing any ROM to an internal storage slot and see if it boots? If it does, could you try the new test build at https://github.com/chenxiaolong/DualBootPatcher/pull/224 and see if extsd-slots work? Your device has the same weird fstab file as [MENTION=6450691]KaMyKaSii[/MENTION]'s device, where would certainly affect booting from an SD card.

EDIT: Whoops, didn't see this. Ignore the first part of my response.
[Galaxy S 4 i9505 Original Android Development] chenxiaolong:
This has to be manually implemented for every single device. All I need is a link to the TWRP source code for the device (because the Boot UI is based on the TWRP graphics code.)

If someone already provided a link, I apologize, but please do post it again.
[Galaxy S 4 i9505 Original Android Development] chenxiaolong:
That happens when an error occurs in the multiboot part of the boot process. Can you download GetLogs from https://snapshots.noobdev.io, flash it immediately after it auto-reboots to recovery, and send me the file it creates in /sdcard/logs/?
[Galaxy S 4 i9505 Original Android Development] chenxiaolong:
Imperium ROM has historically not worked, at least on the Galaxy S4, because the kernel is too large. Once the multiboot components are added, it's too big to fit on the partition.

I don't know if the same thing happens with the G4 version of the ROM.
[Galaxy S 4 i9505 Original Android Development] KaMyKaSii:
My device is a Quantum GO 4G, a national version of Infinix Zero 2 LTE. Besides my device added two more of my manufacturer but this information you can find on quantum.yml file I sent, no?

This means i can add more than one path in the value of the encryption as well as other partitions? If yes, after you add to your repository, I will do a pull request with the changes

Thanks for the workaround for my device. When you do a new build, I will test and report the results
[Galaxy S 4 i9505 Original Android Development] agueijo:
Yes, the same. I tried and never boot...

Thank you very match.
[Galaxy S 4 i9505 Original Android Development] chenxiaolong:
You may have better luck flashing from recovery. For some reason, it wants to read /etc/recovery.fstab.bak.

Also, as far as I can tell at a quick glance, the suhide zip only touches the boot image and not /system, /cache, or /data. You could get away with not patching the file and simply switching to the desired ROM before flashing.

Ahh, I see. Now we know the true reason for having the isUserAMonkey() function in the Android API.

Now, we just need to figure out who the goat is :)
[Galaxy S 4 i9505 Original Android Development] chenxiaolong:
Unfortunately, with all the changes that the patcher has to make in order to boot, it is very unlikely that a dualbooted ROM could ever pass SafetyNet without hacks like sudohide/suhide.
[Galaxy S 4 i9505 Original Android Development] chenxiaolong:
Unfortunately, there's nothing I can do to change that. However, you should be able to tap and hold the file and click the open button at the top.
[Galaxy S 4 i9505 Original Android Development] chenxiaolong:
Yep, I was blind and dumb :)

Yes to everything, except the encryption. The encryption header path just needs the /dev/block/mmcblk* path (or whichever path is available in every ROM).

https://github.com/chenxiaolong/DualBootPatcher/pull/237
[Galaxy S 4 i9505 Original Android Development] whitewolf69:
Thanks worked perfectly :)
[Galaxy S 4 i9505 Original Android Development] chenxiaolong:
Ahh, this is the problem:

[ 1.727009]@3 mblog: Failed to mount data, it might be encrypted
[ 1.727776]@3 <d>mblog: Boot UI is missing. Skipping...
[ 1.727789]@3 mblog: Failed to decrypt device

I forgot to add Boot UI support. The Boot UI is required for encryption support in case you need to enter the encryption password. A new test build is available here: https://github.com/chenxiaolong/DualBootPatcher/pull/221

You'll need to go to the DualBootPatcher settings and install the Boot UI before you flash anything or else you'll run into the same issue.
[Galaxy S 4 i9505 Original Android Development] Pcsx2006:
[MENTION=4277844]chenxiaolong[/MENTION] I tried latest version 9.0.0 on CB 3.5.4 and doesn't seem to booting to secondary rom, also 9.0.0 utilities not switching to primary so I tried 8.0.0 utilities and they worked. BTW I'm using OnePlus 3, can u make it compatible with oneplus 3 Community Build 3.5.4?
[Galaxy S 4 i9505 Original Android Development] chenxiaolong:
I noticed you're running an old version of TWRP. That may be the cause of the issue you're seeing.
[Galaxy S 4 i9505 Original Android Development] KaMyKaSii:
If you were dumb you would not be the developer of this amazing app :)

Thanks for the test version, but unfortunately the sdcard corrupted notification continues. In the previous version when browsing to /raw/extsd / I could see the contents of the cache partition, now only appears as an empty folder. Looking at the log could find this:

15,1646,9109345,-; (5)[1:init]mblog: 1 fstab entries for the external SD
11,1647,9109656,-; (5)[1:init]mblog: Failed to find block device corresponding to /devices/mtk-msdc.0/11240000.msdc1*
14,1648,9109967,-; (5)[1:init]mblog: Successfully mounted partitions
[Galaxy S 4 i9505 Original Android Development] chenxiaolong:
Thanks for the logs! The step you're missing is installing the Boot UI:

[ 6.009217] mblog: Failed to mount data, it might be encrypted
[ 6.016267] mblog: Boot UI is missing. Skipping...
[ 6.020112] mblog: Failed to decrypt device

The Boot UI must be manually installed from the Settings part of the app. It is based on the TWRP graphics rendering code and will display the encryption prompt at boot. Note that this does not have to be done for every ROM. It just needs to be done once.
[Galaxy S 4 i9505 Original Android Development] chenxiaolong:
Well, thanks :)

This is good! At least it's not doing the wrong thing now. This simply means the device is slow in detecting that an SD card is inserted. The patcher does not wait for the SD card, which causes that error. This is not a problem unless you try to boot from the external SD.

The real issue is this:

E/logwrapper( 2608): executing /system/bin/fsck_msdos failed: Permission denied
W/auditd ( 255): type=1401 audit(0.0:84): op=security_bounded_transition seresult=denied oldcontext=u:r:vold:s0 newcontext=u:r:fsck_untrusted:s0

When the SD card is mounted by the patcher, it will try to disable the fsck filesystem checks by bind mounting a dummy script on top of /system/bin/fsck_msdos. However, it seems that your ROM's SELinux policy does not allow the dummy script to be executed.

Could you run the following in a root shell after the corrupted SD card notification appears and post the output here?

ls -lZ /system/bin/fsck_msdos
umount /system/bin/fsck_msdos
ls -lZ /system/bin/fsck_msdos /wrapped/

Also, could you upload the boot.img so I can take a look at the SELinux policy?

EDIT: Btw, I really appreciate the liveboot logs. It contains both the kmsg and logcat logs, which is fantastic.
[Galaxy S 4 i9505 Original Android Development] MisiekDP:
I use TWRP 2.8.7.0 because new TWRP 3 has problems with aroma.

I tried to flash via DBP app (results in attachment).

Thanks :)
[Galaxy S 4 i9505 Original Android Development] KaMyKaSii:
Unfortunately, the "Z" parameter is not supported, what can I do? And after sending all commands, how can I save whole terminal output to a file?

https://drive.google.com/file/d/0B1uvONk-jlRib096UkUyRS1fUWc/view?usp=drivesdk
[Galaxy S 4 i9505 Original Android Development] corsicanu:
Same error here with cm14 on a500f, with all existent recoveries. In app flash as data slot fails at creating chroot. Probably due restrictive enforcing MM TW SELinux...

[MENTION=4277844]chenxiaolong[/MENTION] i posted here multiboot.log from Carliv Recovery (resurrected philz cwm :D)

So i downloaded latest version (thanks for merging A5 into 9.0.0). Tested with BlissPop (5.1.1) and it works. But with any TW rom (5.0.1 or 6.0.1) doesn`t boot. It reboots to recovery. Needs further testing with old bootloader, but i wanted to ask, what changes to make in kernel source to work? Meaning i`ll compile a permissive kernel for further testings mods and things, but beside that, is there anything needed to be implemented for MM TW to work on data slot? On your s7 works? I saw some commits but didn`t understand much, if TW MM patching is fixed. Thanks! Cheers!