yashsingh1/xdaforums huggingface dataset:
[Galaxy S 4 i9505 Original Android Development] MisiekDP:
This is weird so I attach my logs too.
[Galaxy S 4 i9505 Original Android Development] Eagle:
Has anyone tried the backup/restore option? It freeze after backing up my system hence it does not work for me. Has anyone manage to use it successfully ?
[Galaxy S 4 i9505 Original Android Development] 911-Future_Maker:
Ok, I'll get the logcat for both roms and will post them in short.

I think extsd slot booting to primary is due to that the ramdisk of the extsd slot was not updated. Now only have installed the roms to data slot, but will try to flash to extsd slot again, but now will try to boot the rom with and without ramdisk updated. [MENTION=4277844]chenxiaolong[/MENTION] Meanwhile while in-app flashing and in twrp also I'm facing a strange new message

[Multiboot] Failed to switch to target ROM. Continuing anyway...

EDIT: [MENTION=4277844]chenxiaolong[/MENTION] Here are the logs. Corrupted sdcard on primary.

After typing the logcat -d /sdcard/logcat.txt a text file was not created, but the information was printed on the screen instead and I copied that to the logcat-d.txt file. What that actually created the logcat.txt was the command

logcat > /sdcard/logcat.txt

I don't know if the two files are the same, I looked into them and some info is different.

EDIT #1:

The extsd to primary dmesg and mount outputs added.

EDIT #2:

Added log for extsd slot roms not booting (reboot to recovery)

According to the kernel.log it can't mount/symlink the extsd.

<11>[ 10.520821] .(1)[1:init]mblog: Failed to find block device corresponding to /devices/mtk-msdc.0/11240000.msdc1*

6>[ 10.559559] .(0)[120:kworker/u16:2]mmcblk1: mmc1:0001 00000 59.6 GiB
<6>[ 10.562501] .(0)[120:kworker/u16:2] mmcblk1: p1 p2
<7>[ 10.563585] .(0)[120:kworker/u16:2][sd][name:sd&]Card insert<1> Block bad card<0>
<7>[ 10.563613] .(0)[120:kworker/u16:2][sd][name:sd&]Card insert<1> Block bad card<0>
<11>[ 10.564087] .(2)[210:init]mblog: Failed to symlink /dev/block/mmcblk1p1 to /dev/block/platform/mtk-msdc.0/by-num/p1: File exists
<11>[ 10.565935] .(2)[210:init]mblog: Failed to symlink /dev/block/mmcblk1p2 to /dev/block/platform/mtk-msdc.0/by-num/p2: File exists

<11>[ 10.721763] .(2)[1:init]mblog: Failed to mount ROM directories and images
<5>[ 10.722789] .(2)[1:init]audit: type=1400 audit(1476961978.940:3): avc: denied { write } for pid=1 comm="init" name="enable" dev="sysfs" ino=9363 scontext=u:r:kernel:s0 tcontext=u:object_r:sysfs:s0 tclass=file permissive=1
[Galaxy S 4 i9505 Original Android Development] LordHelmchen89:
It works great, thanks.
[Galaxy S 4 i9505 Original Android Development] eilex17:
Dont work... :crying:
[Galaxy S 4 i9505 Original Android Development] 911-Future_Maker:
I tried the Backup option and it indeed freezes, BUT it was because I was running out of space and it was before I discovered the setting to change the Backup location. :p
[Galaxy S 4 i9505 Original Android Development] PerfectHD:
Add please xiaomi redmi 3 Support
[Galaxy S 4 i9505 Original Android Development] 911-Future_Maker:
UPDATE: The backup option works beautifully! I'm yet to try to restore a backup.

I advice all of you who're having problems with backup freezes to DO NOT TOUCH the phone while the backup is creating, also do not backup the currently running rom. This is common also for flashing ROMs, when you switch to some other app and then return the patcher freezes or crashes. Afaik Chen said it's due to the background service.

The shot is showing successfully completed backup of primary while in extsd-slot rom on Lenovo K3 Note. Not freezes or hiccups at all. Build 9.0.0.r17

Important: One thing I noticed in the past while using the adb method to backup roms is if you're using some app for linking other apps to extsd like Link2sd or Apps2sd DO NOT backup the linked dalvik cache because in my experience it was problematic and caused error. Backuping the linked apps on /sd-ext2 works, but the backup of the dalvik cache for the very same apps (if it's linked) fails.

Easy solution: just uncheck cache before backup.
[Galaxy S 4 i9505 Original Android Development] KaMyKaSii:
[MENTION=4277844]chenxiaolong[/MENTION] still waiting for their instructions on what I can do. And my Liveboots previous logs were made on Marshmallow stock, now installed RR 5.7.4 on data slot and it is the same corrupted sdcard error. The strange and interesting is that in one boot the external card is properly mounted on /raw/extsd/ (but Android continues accusing sdcard corrupted and no one app recognizes) and on next boot /raw/extsd/ is empty. This happened in 4 boots that I made and below their logs.

Edit:

And one question: have a problem add all device partitions in quantum.yml? Because it was basically what I did. Add partitions as nvram or preloader not cause problem?

Edit2: I want to share WhatsApp data with a rom saved in data slot, but do not want to update primary rom ramdisk and have the sdcard error, could you help me?

I tried the following command:

mount -o bind /raw/data/data/com.whatsapp /data/data/com.whatsapp;

And the folder was mounted, but the app always forced close. I saw that "/data/data/com.whatsapp/lib" pointing to "/data/app/com.whatsapp-1/lib/arm/" was not present, so I made the symlink manually with FX File Explorer. But still force closes. Do you have any tips or best method to tell me?

Assuming this to be possible, you would add to your app with a friendly gui?

Edit3: You could also help with some commands that dismount any trace of external sdcard and then remount with Android recognizing him?

Edit4: Sorry for the various edits

Edit5: The last, i promise. It is supposed to FlashFire work even in a secondary rom with "fake" partitions? I know it can be dangerous, but I want to know if the changes (such as flash system.img) will be made on the real system partition/primary rom
[Galaxy S 4 i9505 Original Android Development] JoshDaWhite:
Cannot Install boot ui.
[Galaxy S 4 i9505 Original Android Development] TheDarkKnight:
[MENTION=4277844]chenxiaolong[/MENTION] Can you please add K50-t5 and K3 Note to K50's codenames? It's annoying to change the line in build.prop every now and then.

Thanks for your hard work.
[Galaxy S 4 i9505 Original Android Development] yfriday14:
Is Samsung Galaxy Note 3 N9005 supported?

Can I use with Dual Boot Patcher?
[Galaxy S 4 i9505 Original Android Development] KaMyKaSii:
It is the snapdragon model, right? If yes, is on support list
[Galaxy S 4 i9505 Original Android Development] 911-Future_Maker:
[MENTION=4277844]chenxiaolong[/MENTION] Can you please push a test build with forced use of the fuse_exfat driver to test if this will affect the "corrupted sdcard" message. Currently in default.prop I see

ro.patcher.use_fuse_exfat=false

while in rom where the card is recognized just fine the value is true

Looking at the kernel log I can see the extsd mount is failing right after denying to use the built-in fuse_exfat:

<15>[ 10.691291] .(4)[1:init]mblog: Using fuse-exfat: 0
<11>[ 10.691378] .(4)[1:init]mblog: Failed to mount /dev/block/mmcblk0p23 (exfat) at /raw/extsd: No such device
<3>[ 10.692946] .(4)[1:init]FAT-fs (mmcblk0p23): bogus number of reserved sectors
<6>[ 10.693908] .(4)[1:init]FAT-fs (mmcblk0p23): Can't find a valid FAT filesystem
<11>[ 10.694918] .(4)[1:init]mblog: Failed to mount /dev/block/mmcblk0p23 (vfat) at /raw/extsd: Invalid argument
<3>[ 10.696398] .(4)[1:init]EXT4-fs (mmcblk0p23): VFS: Can't find ext4 filesystem
<11>[ 10.697384] .(4)[1:init]mblog: Failed to mount /dev/block/mmcblk0p23 (ext4) at /raw/extsd: Invalid argument
<15>[ 10.710060] .(4)[1:init]mblog: /default.prop contains fuse-exfat override: false
<15>[ 10.710083] .(4)[1:init]mblog: Using fuse-exfat: 0
<11>[ 10.710173] .(4)[1:init]mblog: Failed to mount /dev/block/mmcblk0p21 (exfat) at /raw/extsd: No such device
<11>[ 10.711496] .(4)[1:init]mblog: Failed to mount /dev/block/mmcblk0p21 (vfat) at /raw/extsd: Device or resource busy
<11>[ 10.712889] .(4)[1:init]mblog: Successfully mounted /dev/block/mmcblk0p21 (ext4) at /raw/extsd
<14>[ 10.714383] .(4)[1:init]mblog: Successfully mounted partitions

Currently the /raw/extsd in an empty path.
[Galaxy S 4 i9505 Original Android Development] chenxiaolong:
NOTE: https://snapshots.noobdev.io/ and https://jenkins.noobdev.io/ are going down temporarily to patch CVE-2016-5195 (a.k.a. Dirty Copy-on-Write vulnerability).

I will edit this post when they are back up.

EDIT: Server has been fully patched and is back up.
[Galaxy S 4 i9505 Original Android Development] chenxiaolong:
Ah, you need to set the kernel after you manually bump the boot.img. Otherwise, the boot image saved in /sdcard/MultiBoot/primary/boot.img is always the unbumped version. When you switch ROMs, that is the file that gets flashed and thus, you can't boot again.

As for the ramdisk update, can you reproduce the issue (by running the ramdisk update again) and then send me the /sdcard/MultiBoot/ramdisk-update.log?
[Galaxy S 4 i9505 Original Android Development] Eagle:
[MENTION=4277844]chenxiaolong[/MENTION] could you take a look on why backup/restore freeze after up the system partition? Would try to send a log later if possible. Thanks!
[Galaxy S 4 i9505 Original Android Development] chenxiaolong:
The Oukitel K6000 Pro changes have been merged. :)
[Galaxy S 4 i9505 Original Android Development] Pcsx2006:
[MENTION=4277844]chenxiaolong[/MENTION] install boot ui is not supported on OnePlus 3 also ramdisk patching.
[Galaxy S 4 i9505 Original Android Development] chenxiaolong:
The changes have been merged and will be available in the next snapshot version.
[Galaxy S 4 i9505 Original Android Development] chenxiaolong:
Can you use the repair filesystem option in TWRP for your system, cache, and data partitions? I'm seeing a lot of warnings from the kernel about filesystem corruption.
[Galaxy S 4 i9505 Original Android Development] chenxiaolong:
Sure. Can you check here and make sure I've capitalized the codenames properly? https://github.com/chenxiaolong/DualBootPatcher/pull/253/files
[Galaxy S 4 i9505 Original Android Development] chenxiaolong:
Yep, I already know why this happens. It's due to my bad handling of background processes in the app. It can happen with any background process, like switching ROMs, flashing ROMs, and backing up, but longer tasks make it much more likely to run into the issue. This may take me a bit of time to fix as it requires parts of the app to be rewritten.

Logs are always helpful though and I would appreciate it if you sent them my way!
[Galaxy S 4 i9505 Original Android Development] chenxiaolong:
I wrote my own program to display the same information as "ls -lZ". It is attached to this post (source code here, if you're interested). You'll need to copy the "ls_z" binary to /data/local/tmp/ and then run the following in a root shell.

/data/local/tmp/ls_z /system/bin/fsck_msdos > /sdcard/extsd_fsck_context_before.txt
umount /system/bin/fsck_msdos
/data/local/tmp/ls_z /system/bin/fsck_msdos > /sdcard/extsd_fsck_context_after.txt
/data/local/tmp/ls_z /wrapped/ > /sdcard/extsd_wrapped_contexts.txt

It's best practice to list the minimum partitions necessary to flash and boot a ROM (so: system, cache, data, boot, and recovery). Any other partition listed in the "extra:" field can be directly accessed by the ROM's installers.

This cannot be done without updating the ramdisk. There's a lot more that needs to happen than just bind mounting the data directory. Each app is assigned a UID when it is first installed and it's very likely that it is different between ROMs so you'll have to "chown" the files to the correct UID. Then, you'll also have to make sure the SELinux label on the data directory matches what the ROM is expecting. This must be done at every boot or else the other ROM will no longer be able to read the data directory.

Keep in mind the patcher's app sharing feature can be very buggy and will eventually be removed.

Assuming the ROM is not installed to the external SD, all you need to do is run:

umount /raw/extsd

Unfortunately, I don't know the answer to this. FlashFire doesn't support any of my devices so I don't have a way of testing it.
[Galaxy S 4 i9505 Original Android Development] chenxiaolong:
My fault. Here's a fixed build: https://jenkins.noobdev.io/job/Dual...r-builder && fast,target=android-all-gcc/285/
[Galaxy S 4 i9505 Original Android Development] chenxiaolong:
Sure. Here you go: https://jenkins.noobdev.io/job/Dual...tcher-builder && fast,target=android-all-gcc/

Just do a ramdisk update and it'll change the value to "true". (It won't do it for a clean flash.)
[Galaxy S 4 i9505 Original Android Development] Eagle:
[MENTION=4277844]chenxiaolong[/MENTION] another question is, is there like an alternative way to backup/restore a ROM in dualboot patcher? I mean is there like a way to use TWRP backup (I know it's different) but is it possible? because I would like to backup one of my ROM in dualboot patcher but it freeze in the middle of backing up, so I had to just do a backup from TWRP itself.
[Galaxy S 4 i9505 Original Android Development] chenxiaolong:
Hmm, that's not good. Starting with 9.0.0, the patcher switches to the target ROM before flashing. This is needed for zips like SuperSU that modify the existing boot.img instead of flashing a new one. Can you post the /sdcard/MultiBoot.log when that happens.

Thanks for the logs! This is the problem:

10-20 12:37:37.850 249 270 E Vold : Filesystem check failed (unknown exit code 255)
10-20 12:37:37.850 249 270 E vold : public:179,129 failed filesystem check

This may be the same issue as [MENTION=6450691]KaMyKaSii[/MENTION]'s. When the patcher mounts the SD card, it will override the filesystem check (fsck) tools. That way, later when Android tries to check the SD card's filesystem, it won't fail (can't check filesystem when mounted). Obviously, this is failing for some reason.

If you could run the commands I posted here, that would be great. http://xdaforums.com/showpost.php?p=69246354&postcount=9975

Wow, I've never seen anything like that. The boot.img must not be getting patched. There is no trace of mbtool at all.

This one is a known issue. mbtool currently does not wait for the SD card, so it fails to mount if the kernel takes too long to detect it. From your log, the kernel detected the card at 10.559559 seconds, but mbtool was looking for it at 10.520821 seconds. The card was detected ~0.04 seconds too late.

This is a work in progress, but at the moment, it hasn't been fixed yet.
[Galaxy S 4 i9505 Original Android Development] TheDarkKnight:
Yes, they are all right. Thanks.

Can you please also check the issue where my extsd-slot ROM 6.0 stock rom won't boot and gives the 3 vibrations? I am attaching the logs. Is it because I am having 5.0 LP ROM as primary?
[Galaxy S 4 i9505 Original Android Development] chenxiaolong:
Can you post the boot.img for the non-working ROM? I'm almost 100% certain I know the issue. It's treating one of the internal partitions as the SD card due to non-standard fstab file (like several other new MTK devices).
[Galaxy S 4 i9505 Original Android Development] Eagle:
So I doubt there's no other way?
[Galaxy S 4 i9505 Original Android Development] chenxiaolong:
Wow, I've never seen an installer fail due to lseek issues. I have no idea what would cause that. Does this happen with every recovery?

EDIT: Btw, I noticed that CM14 for your device (https://github.com/DeadSquirrel01/a...-common/blob/cm-14.0/BoardConfigCommon.mk#L60) specifies that the system partition size is 2516582400 bytes, but in reality, it's 2411724800 bytes. This could potentially cause the issues you're seeing (even if it might flash normally in a non-multiboot setup).
[Galaxy S 4 i9505 Original Android Development] Pcsx2006:
This happened to me later I boot primary rom and found phone was encrypted.

So I decrypted the phone (wipes internal storage) and then install everything again after that secondary rom started booting.
[Galaxy S 4 i9505 Original Android Development] TheDarkKnight:
Thanks! I'm uploading the boot.img. Sorry for the delay. Had some network issues.

Here's the link: https://drive.google.com/file/d/0B20JfVIKCreWNGVFYmgwMjZ4TFk/view?usp=drivesdk

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

I haven't encrypted any of my ROMs
[Galaxy S 4 i9505 Original Android Development] chenxiaolong:
Please try the test build here: https://github.com/chenxiaolong/DualBootPatcher/pull/254

I think it should fix the issue, but if it doesn't, please grab the logs again. Thanks!
[Galaxy S 4 i9505 Original Android Development] Pcsx2006:
Never mind I got it I restored boot partition and it booted fine
[Galaxy S 4 i9505 Original Android Development] TheDarkKnight:
Thank you so much. It's working now.

:good: :svetius:
[Galaxy S 4 i9505 Original Android Development] 911-Future_Maker:
[MENTION=4277844]chenxiaolong[/MENTION]: Are you looking at the dmesg/mount commands from my latest post? I did run the commands from the extsd-slot (but the primary was running in fact) and the ramdisk if the extsd-slot was updated, but not in the primary. I get "sdcard corrupted" in this state, may be the primary ramdisk not being patched is the reason why no trace of mbtool in the log. Anyway not a big deal, just a ramdisk issue here.

Yes I think our issues are very similar. MTK devices problem it seems. Not surprise here. :p I'll run the commands in short and will post back.

The main issue is the kernel is not loading the card fast enough. 0.04 seconds are ruining my setup lol. :D What if I change my primary rom, will it make any difference? May be because you also said that the boot image of the primary is big causing 'no space left on device' while updating the ramdisk. So this is basically the reason for the extsd being recognized as corrupted, the delayed mount at boot? Can you make the patcher to use the kernel mount method, I think the mbtool is handling the mount of the sdcard and arguments used during that operation are different.

The stock unpatched kernel mounts the card like that:

dev/block/vold/public:179,129 /mnt/media_rw/59B6-FF60 vfat rw,dirsync,nosuid,nodev,noexec,relatime,uid=1023,gid=1023,fmask=0007,dmask=0007,allow_utime=0020,codepage=437,iocharset=iso8859-1,shortname=mixed,utf8,errors=remount-ro 0 0

I hope you'll merge these changes in future builds. :)

Really hope you'll find a workaround for this problem. BootUI is in no help here? I though launching the code of the BootUI and the time needed for selecting a rom will give the kernel a precious seconds to mount the card or I'm wrong and nothing happens till the user don't select the desired rom to boot?

[MENTION=4277844]chenxiaolong[/MENTION] I see the Oukitel K6000 Pro is marked as armeabi-v7a in devices.json, the cpu and the roms are 64bit is it a problem to change the value to arm64-v8a?
[Galaxy S 4 i9505 Original Android Development] santajulia.ego:
Hi, for the k3 note the codename for the aio_oftp is aio_oftp_m

Could you give support to that codename plz, and realy its an awersome app tnx for share

Enviado desde mi Lenovochu!!! K50-X mediante Tapatalk

---------- Post added at 09:12 AM ---------- Previous post was at 09:01 AM ----------

And other thing, i follow the steps, the kernel set correct, the ramdisk ok too, i mke many changes un the build.prop to work, i mke the patch ROM, and when i install, this happend

And the secondary ROM dont change and nothing happend

Enviado desde mi Lenovochu!!! K50-X mediante Tapatalk
[Galaxy S 4 i9505 Original Android Development] kingzain900:
Hi,

Can you kindly add support for FoxHound? Thank you.

Another thing, how much min memory does it take in the system/partition (or is it exactly the size of the secondary ROM), and any effects on the RAM?

EDIT: Also, if we want to completely go back to original state, is there a way? Thanks
[Galaxy S 4 i9505 Original Android Development] bulgareli:
Help

I flashed PAC Man ROM as secondary and everthing works fine. But when I tried to boot in primary ROM it says "File not found". Then I tried to flash "SwithToPrimary.zip" and it says that I didnt set the kernel to primary ROM, but I did set the Kernel.

What I have to do now to boot in primary ROM? My primary ROM is this: http://xdaforums.com/showthread.php?t=2250824 - (XXUBMH1)
[Galaxy S 4 i9505 Original Android Development] RK:
Works perfect Thank you! Just a suggestion though, Is it possible to use the massive and unused /cache partition to install the entire secondary ROM instead of /system?
[Galaxy S 4 i9505 Original Android Development] chenxiaolong:
You should be able to flash the kernel listed on your ROM page using odin. Afterwards, I would try setting the kernel for primary ROM again. I'm not sure why that would fail :confused:
[Galaxy S 4 i9505 Original Android Development] bulgareli:
Great, It works! I flashed the kernel in Odin and it boot on primary ROM. I think the problem was my root permissions on the TW ROM, but now the DualBootSwitcher set the kernel correctly.

But, there is something new: When I reboot into secondary ROM again it show up this message:

"System UIDs Inconsistent

UIDs on the system are inconsistent, you need to wipe your data partition or your device will be unstable"

What to do now? Just wipe secondary data?

Thanks!!
[Galaxy S 4 i9505 Original Android Development] mgbotoe:
I think you just need to do everything from the start lol I set up everything in less than 7 minute including flashing time..done it about 5 times already since I had to do testing for my rom for its release. Did it each time just to make sure no bugs...no issue either times. Did it with pacman too
[Galaxy S 4 i9505 Original Android Development] bulgareli:
I think I found the problem. I tried to restore data of some apps with titanium backup, and it says operation completed but it didn't restore any data. After that every app that i tried to restore crashes... Will start again and don't use Titanium Backup.

Enviado de meu GT-I9505 usando Tapatalk 4
[Galaxy S 4 i9505 Original Android Development] mgbotoe:
Titanium backwork worked perfectly for me but maybe its just your phone
[Galaxy S 4 i9505 Original Android Development] bulgareli:
Did you restore app and data or just data? The backup was made in the TW ROM?

Enviado de meu GT-I9505 usando Tapatalk 4
[Galaxy S 4 i9505 Original Android Development] mgbotoe:
Ya they were. I think you just had a bad start with the setup. Did you backuo before starting
[Galaxy S 4 i9505 Original Android Development] bulgareli:
Yes, I did a backup before. Now is everythimg working properly, but I didnt restore any data.

Thanks!

Enviado de meu Nexus 4 usando Tapatalk 4
[Galaxy S 4 i9505 Original Android Development] mgbotoe:
Hope you had made a backup before doing anything lol
[Galaxy S 4 i9505 Original Android Development] kingzain900:
I always make a backup :)

But I haven't tried this yet. Just want to make sure I can restore phone back to before dual switch (meaning get rid of dual files and folders in system partitions).
[Galaxy S 4 i9505 Original Android Development] csec:
Your work is that helpful that some people feel like that one thank is not enough. That's usually the philosophy behind thanking second (and third) post of the OP, even if it is just a 'reserved' text.

That's not really funny, I suppose.

Sorry for OT.

Keep up the good work.
[Galaxy S 4 i9505 Original Android Development] mgbotoe:
Great,

Well i "lost" the dual boot ability everytime i wiped and restore a backup. Only way i found away to get rid of it.

Though I am sure running the script to clear out second rom will be good too.
[Galaxy S 4 i9505 Original Android Development] chenxiaolong:
When a system app is updated from Google Play (such as Samsung ChatON), the system app doesn't change and the update is installed as the user app. That's the only thing that could potentially cause issues.

Anyway, I'll try it out and see how it goes :)
[Galaxy S 4 i9505 Original Android Development] chenxiaolong:
Will do :D