chenxiaolong / DualBootPatcher

Patches Android ROMs for dual boot support
https://dbp.noobdev.io
Other
529 stars 467 forks source link

Extsd slot issues (Imperium rom 15.0, Aroma installer) #165

Open webmaster33 opened 8 years ago

webmaster33 commented 8 years ago

I also have problems installing to extsd slot. Installation of Imperium ROM 15.0 within Aroma installer was successful (it says it was successful). However, when returned back from Aroma installer to recovery mbtool terminal, I got an error, that Aroma installer returned 1, so must happen some error, and the further install process was cancelled.

Also the copy of files within the Aroma installer were extremely slow (several minutes per file). Strange.

Will submit new logs as flashing is finished.

webmaster33 commented 8 years ago

Log attached. 20160901.080229.tar.gz

webmaster33 commented 8 years ago

multiboot.zip

chenxiaolong commented 8 years ago

It might not be possible to fix the install issue. It's failing because when the multiboot components are inserted into the ramdisk/kernel, the boot image becomes 200KB larger than the boot partition.

As for the slow flashing, I can't seem to reproduce that on my jfltetmo (T-Mobile Galaxy S4) with an exfat-formatted Samsung EVO 64GB SD card. I had a script autoflash the ROM 20 times to benchmark the speed and the average flashing time was 6 minutes 11 seconds.

webmaster33 commented 8 years ago

The boot image becomes 200KB larger than the boot partition?

But others were able to flash the rom successfully, when they don't use Dual Boot Patcher. How can they do that successfully?

chenxiaolong commented 8 years ago

It's 200KB larger because of the multiboot components that get added to the boot image. Namely, mbtool (~880KB) and fuse-exfat (~272KB). The code already re-compresses the boot image with the highest compression, but it seems that it can't be shrunk enough to fit on the boot partition.

hankching commented 8 years ago

Remove fuse-exfat and mount.exfat manually if you don't need exFAT format.

webmaster33 commented 8 years ago

Do I need exFAT if my external sdcard uses FAT32?

webmaster33 commented 8 years ago

How about using Bzip compression? It has better compression, but likely will be still not enough.

Another idea: could be possible to move some codes of the boot partition out of here (for example /system or /sdcard, so could save some space this way? Just a lame question.

hankching commented 8 years ago

No need those file.

Good idea.

webmaster33 commented 8 years ago

Until maximum file size is lower than 4Gb, I will be fine with FAT32.

The question is, what will I do, if I will need more than 4Gb file sizes (for example video files)?

hankching commented 8 years ago

FAT32 limitation.

Change to other format, for example, exFAT, EXT4, etc. Pls check specifications.

webmaster33 commented 8 years ago

I know limits. Just discussed, that I have to remove exFAT support to be able to install Imperium rom, to fit into boot partition. EXT4 would be an alternative, but in this case I would not be able to copy from/to external sdcard under Windows (which doesn't support EXT4 natively).

hankching commented 8 years ago

It's not difficult to get Windows support EXT4, isn't it? You should try! Don't ask questions that is unknown by others, I don't know what you do to your phone. You show me you happy to produce issues. You understand the limitation which no one can solve.

webmaster33 commented 8 years ago

@hankching: I'm not happy to report issues. The issues just happens. I would like to install CM13 rom, MIUI V5, Imperium rom, opengapps or banks Gapps without problems. Why is it problem if one fails for one reason and I report the problem to be fixed?

As for EXT4 in Windows, not sure if I attach my phone through USB cable, the filesystem will be readed correctly. And when I report, that EXT4 filesystem is not accessed correctly through USB cable, you will ask again if I like to produce issues...

wazeeahmed commented 8 years ago

Use ext2fsd in windows . You'll be able to access all ext4 partitions and also you sd card .

hankching commented 8 years ago

You don't fully understand what I said. You understand/know FAT32 limitation is what, but you still said it. Only answer that changes format.

You faced any issues I encourage you report.

Source code is open, you can do any change you like (ie custom app).

If you don't do above, you can try to flash with EXT4 first. If you face that issue again, you should not use it because of the limitation.

At least, you should try any suggestions first, every suggestion is a test and solution. No try no solution.

Again report any issues isn't a problem.

hankching commented 8 years ago

Boot.img (ie ramdisk) of Imperium ROM doesn't use compression or unknown format, the file is 3043328 bytes. Therefore, only this ROM can't flash. Others are around 2MB. Try to ask producer uses compression for ramdisk.

EDIT Your sd card maybe has corrupted because primary got ramdisk size is 2380636 bytes. Try use new sd card and download it again to ensure no problem.

webmaster33 commented 8 years ago

First, which sdcard do you think is corrupted? Internal or external?

chenxiaolong commented 8 years ago

How about using Bzip compression? It has better compression, but likely will be still not enough.

Not a bad idea, but your assumptions is correct. Recompressing the ramdisk with maximum bzip2 compression results in only a 10KB drop in file size.

Another idea: could be possible to move some codes of the boot partition out of here (for example /system or /sdcard, so could save some space this way? Just a lame question.

I've actually been doing this already. For example, the Boot UI and encryption support files are all stored in /cache. There are a few other things that I could move out, but the spaces savings would be negligible (likely less than 10KB).

EDIT: The reason the ramdisk is so big is because Imperium bundles busybox (1.9MB) and all of the hack/optimization scripts in the boot image instead of /system.

webmaster33 commented 8 years ago

@chenxiaolong: what should I suggest to the developer of Imperium rom? Exact text please, so I can quote to him.

chenxiaolong commented 8 years ago

@webmaster33 I think something along the lines of this:

Would it be possible to move the busybox binary and scripts that depend on it from the ramdisk to the /system partition? The current setup doesn't leave enough space in the ramdisk for other modifications, such as dual booting.

webmaster33 commented 8 years ago

@chenxiaolong: posted the suggestion to the developer. Waiting his answer.

hankching commented 8 years ago

Internal or external?

From your log files shows system and data partitions without any files inside. Therefore you don't need me to answer your question, do you?

webmaster33 commented 8 years ago

@hankching: these partitions are on internal. But they have files and directories.