• After 15+ years, we've made a big change: Android Forums is now Early Bird Club. Learn more here.

SD hack for storage expansion

If you make a backup of all the relevant partitions (or files, if backing up by files) and restore all of the pieces, you should in theory get back the same configuration. In particular, the backup should contain boot, system, data/userdata, and sd-ext (SD's 2nd volume in recovery's term).
OK, I bought an even faster SD card (U3 with good benchmark numbers) and started getting ready to do a trial run of switching to a different f6. Right away I couldn't find "boot" (the rest was where I thought they should be). I thought that was maybe a folder but searching the entire device came up with lots of things with "boot" in the title but no folder.

Help out a dummy - where is "boot"?
 
Upvote 0
where is "boot"?
"Boot" is a partition. You can see it (and make backup) in recovery. It's a critical part of a rom, so developers don't typically expose it by mounting it as some folder. Actually, each of the parts I mentioned is a partition (boot, system, userdata, sd-ext). If you want to be able to fully restore, you'd probably use TWRP/CWM to do so. In that case, there's no need to worry about folders and files since TWRP/CWM creates images or packages for you.
 
Upvote 0
Hi WarrantyVoider,

I have read this entire thread. At some point in 2015, you said that you could share instructions for enabling f2fs support in stock kernel (or Freedom Kernel). This seems to involve loading kernel modules, which I am somewhat familiar with. I am interested in implementing your SD hack with 2nd partition on SD card as F2FS while /system would continue as default ext3/ext4. Can you please post instructions on enabling F2FS in kernel?

Many thanks!
 
Upvote 0
Can you please post instructions on enabling F2FS in kernel?
I did plan to release some files to support f2fs at one point, but didn't end up doing it due to a couple of challenges:

1) kernel support. This requires compiling a new kernel with the f2fs code added, or building a external kernel module to be loaded at boot time. The thing about kernel module is that it needs to match the existing kernel exactly. I can support the F6 stock kernel (MS50012b) based on LG's released source. I am not sure about kernels for custom roms though. If you're using the stock kernel (the exact version), I can supply a kernel module. Actually, it'd be a good idea for me to update the f2fs code since there have been many updates since I first built one.

2) lack of f2fs utilities. A way to create a new file system is necessary before files can be copied to it. Newer Android and newer TWRP versions both support f2fs. Unfortunately, the F6 has neither. Actually, I think hroark13's TWRP v2.8 is supposed to include f2fs support, but the kernel used in that port does not support f2fs. If a user has another way to create the file system, it's possible to do so and copy files (by restoring a backup directly to the SD) outside of the F6. Unfortunately (again), when I looked into it last time, there was no easy way to do this on a Windows PC. So if you can use Linux or use another device (with a TWRP version that supports f2fs) to do this step, I can give instructions to see whether that would work. Otherwise, I would need to come up with a more convenient and user-friendly way to deal with this issue.

I think it's a good idea to transition to f2fs, or at least use fstrim regularly on ext4 file systems. In the past, people use f2fs or fstrim for performance reasons, but with today's cheap flash memory (both in price and in quality), I think it makes even more sense to do it for the sake of longevity. Anyway, let me spend some time to investigate these two challenges again.
 
Upvote 0
I did plan to release some files to support f2fs at one point, but didn't end up doing it due to a couple of challenges:

1) kernel support. This requires compiling a new kernel with the f2fs code added, or building a external kernel module to be loaded at boot time. The thing about kernel module is that it needs to match the existing kernel exactly. I can support the F6 stock kernel (MS50012b) based on LG's released source. I am not sure about kernels for custom roms though. If you're using the stock kernel (the exact version), I can supply a kernel module. Actually, it'd be a good idea for me to update the f2fs code since there have been many updates since I first built one.

2) lack of f2fs utilities. A way to create a new file system is necessary before files can be copied to it. Newer Android and newer TWRP versions both support f2fs. Unfortunately, the F6 has neither. Actually, I think hroark13's TWRP v2.8 is supposed to include f2fs support, but the kernel used in that port does not support f2fs. If a user has another way to create the file system, it's possible to do so and copy files (by restoring a backup directly to the SD) outside of the F6. Unfortunately (again), when I looked into it last time, there was no easy way to do this on a Windows PC. So if you can use Linux or use another device (with a TWRP version that supports f2fs) to do this step, I can give instructions to see whether that would work. Otherwise, I would need to come up with a more convenient and user-friendly way to deal with this issue.

I think it's a good idea to transition to f2fs, or at least use fstrim regularly on ext4 file systems. In the past, people use f2fs or fstrim for performance reasons, but with today's cheap flash memory (both in price and in quality), I think it makes even more sense to do it for the sake of longevity. Anyway, let me spend some time to investigate these two challenges again.
PLEASE do this. I've been really curious about this too. I run f2fs on my oneplus one and its a night and day difference in speed and boot time. My storage performance hasn't gone down at all since I switched either. My grandpa has my old f6, and is having problems with the sd card hack with xperion ROM. Google play services repeatedly crashes for no reason, even though I formatted it on my fedora Linux PC using gparted with ext4. Meaning no misaligned partitions. In the process of installing the sdcardhack for him, I tried formatting the sdcard with f2fs using gparted, crossing my fingers that it would mount. Of course it didn't, but I think you're our answer to this long lasting problem. I think you should try talking to dm47201 (or something like that I can't remember) he's the developer of carbon ROM here. I believe if you were to implement f2fs that would be the kernel to do it with. It runs KitKat, and its stable. I'm able to install micro g instead of gapps because the ROM isn't bundled with gapps pre-installed. It generally performs better because its KitKat and still has support for new stuff, and is also overclocked. Just my two cents but I really think this phone could be revived with f2fs.
 
Upvote 0
Is there some special step to get this working?

I partitioned a 16GBSD using A parted app, splitting using ext4 and fat32. Used the AParted app, it made the partitions fine.

Flashed the zips in order stated. It boots up, takes a while to scan both partitions and all looks good. On stock rooted, phone freezes up solid within 10 minutes and requires a battery pull.

Running Xperion ROM, it freezes up after scanning the two partitions.

Also tried creating partitions within TWRP, does the same thing but freezes up even quicker...

Using a brand new 16Gb SanDisk Ultra. Tried erasing and re-partitioning several times and same thing happens? Am I missing something?

Also get a random error message about SD card being removed (while mounted only as ext-sd), but the contacts are all clean, and has no problems while in a different phone. Was thinking firmware, but between Xperion and stock it had same errors. I dunno....

Anybody?

EDIT *** Tried again using a 16GB SD from a Polaroid Cube... Don't know of it's ideal for the purpose but it works, just..... S...L.....o.......ww. Even changing a ring tone lags. Has an underscored (1) and a circled (10). Partitioned using TWRP and allocated 4096 to EXT4. No freezing yet?
 
Last edited:
  • Like
Reactions: viperdink
Upvote 0
OK I don't know what I'm doing wrong here but my relative's f6 with xperion and the binary sdcardhack continuously crashes and can't detect the sim card, only with the sdhack enabled. I partitioned the sdcard using gparted on Ubuntu 16.04. Keep in mind this is a genuine transcend sdcard, I verified the speeds using Linux. After rebooting a few times the sdcard hack was completely removed and sd-ext won't mount in twrp. All I did was flash xperion, install the sdhack, and install xposed and apps. Any help would be greatly appreciated, my relative is considering getting a new phone because of this.

Edit: fixed myself by restoring to stock lg ROM and re-rooting. Phone works perfectly again.
 
Last edited:
Upvote 0

BEST TECH IN 2023

We've been tracking upcoming products and ranking the best tech since 2007. Thanks for trusting our opinion: we get rewarded through affiliate links that earn us a commission and we invite you to learn more about us.

Smartphones