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

Root Proposal/Theory for External SD storage solution on F6

@Frogggy
OK, right now my educated guess is the problem is with your SD card. You might have a counterfeit card. I had that suspicion a while ago, so I made the wipe_test script create a ~1GB fat32 partition, followed by ~2GB ext4 one, and another ~2GB ext4 one at the end of the card. From your result, I see that the first two partitions were mounted without errors. The third one at the end, however, caused the "no csi" error. Since you said yesterday that e2fsck complained about the 2nd partition, my guess is the actual capacity about 2GB (because the error occurred somewhere in the 2nd partition). To verify, you can download a Windows program called h2testw. It should tell you more info about the actual capacity of the card. You can google the program name to get more info about it.

Assuming I'm right and your card has about 2GB of actual, error-free space, you can then partition the card so that the 2nd ext4 partition resides entirely in that 2GB. With too little space, Android won't be able to use the 1st fat32 partition probably, but you should be able to proceed with installation to check this hack works.

As for your system files, I see some changes. Something installed on 11/25 changed e2fsck and sh. It might be nothing, if whatever was installed needs that modification. Also, I see you have both app_process and app_process-original. If you've installed my old implementation, you can uninstall that. It shouldn't cause problems though.
 
OK, can you give me a script which would do exactly what you said and clean up/uninstall anything which which isn't necessary?

Thanks

Btw, currently testing card with h2testw
 
The media is likely to be defective.
7.1 GByte OK (14922311 sectors)
5.2 GByte DATA LOST (11019705 sectors)
Details:0 KByte overwritten (0 sectors)
0 KByte slightly changed (< 8 bit/sector, 0 sectors)
5.2 GByte corrupted (11019705 sectors)
0 KByte aliased memory (0 sectors)
First error at offset: 0x00000001c7648e00
Expected: 0x00000001c7648e00
Found: 0x6ac132acb32e8688
H2testw version 1.3


Thats only the fat32 partition (15GB), Damn this program takes very long. as its still verifying.
 
OK, can you give me a script which would do exactly what you said and clean up/uninstall anything which which isn't necessary?
Once you know the card is bad, you can probably stop. Keeping it going won't make it better. The speed of the card could have made the process longer. I think Best Buy has some good deals on SD cards right now. You can get a 32GB Samsung EVO or SanDisk Ultra Plus for $13. And if you're willing to spend for a faster card, the SanDisk Extreme Plus at only $17 is a great deal.

In the zip there are two scripts, one to partition your SD card into 100MiB fat32 + 1800MiB ext4. If there are no bad blocks in those areas on the card, then you should be able to apply the hack to see if there are other issues. The other script should uninstall the old app_process version. I didn't bother with the e2fsck and/or sh change because I don't know what did it or what consequences changing the files would have. That's not relevant to this thread anyway. If you are concerned, PM me separately.

I did not test these scripts. So if you can show me the output, it would help verify that they run correctly.
Code:
adb push .\partition.sh /data/local/tmp
adb push .\uninstall.sh /data/local/tmp
adb push .\parted /data/local/tmp
adb shell
su
cd /data/local/tmp
sh partition.sh
rm partition.sh
sh uninstall.sh
rm uninstall.sh
rm parted
exit
exit
del partition.sh
del uninstall.sh
del parted

Edit: File removed.
 
Last edited:
Hey guys, I'm having an issue with AParted. The install gets stuck on "Copying mke2fs", I have the most recent version of BusyBox...It doesn't seem to detect it.

And you might be interested in this: Testdisk -> http://www.cgsecurity.org/wiki/TestDisk_Download

Data recovery for deleted partitions too! Partition table and backup boot sector recovery too. Also, you can convert GPT drives for use on a PC, get the GParted ISO -> http://gparted.org, use a thumb drive with YUMI -> http://www.pendrivelinux.com/yumi-multiboot-usb-creator/ It's Multiboot Linux! Can't go wrong.

Hope this helps you guys!

UEFI motherboards are tricky with GParted, and it needs proper processor support. You'll want to boot with legacy USB support and load CSW (?) ROM. Works on every damn PC I have every used, and will help you immensely with this project, because you'll see what is going on with your SD cards.

All hail the penguins! Hope this helps..
 
Last edited:
ok i got a sony 32gb i am gonna use minitool partition wizard to split it to 14gb fat and 14gb Ext4. What i found with this card is that minitool sees 2Tb unallocated along with 29.8Gb Fat32. should i be concerned about this?
 
Thanks so much to everyone, i now have a 14GB internal with a 14GB "sd card". the card was the problem from the start. I used guidance from post #403 to determine my partition size and all went well. Thanks again, hope this was a learning experience for everyone as much as it was for me.

Still puzzles me why a 32GB card would show 2017MB of unallocated space?
 
Hey guys, I'm having an issue with AParted. The install gets stuck on "Copying mke2fs", I have the most recent version of BusyBox...It doesn't seem to detect it.
If you're familiar with Linux command line, you can partition and format without AParted. And BusyBox issues can be tricky. They depend on whether the developer porting it to Android did it correctly and what options were enabled. And for accessing files on ext4 partitions using Linux on USB, there's also LinuxLive USB Creator: http://www.linuxliveusb.com/ .

What i found with this card is that minitool sees 2Tb unallocated along with 29.8Gb Fat32. should i be concerned about this?
Still puzzles me why a 32GB card would show 2017MB of unallocated space?
Without more technical info, I can't comment on your card, but 2TB or 2GB of unallocated space does seem excessive. In general, though, SD cards will have some unallocated space due to partition alignment and reserved space. As far as I know, most of the time alignment on 4MiB boundary like I showed in #403 is fine. In the past few days, while researching your issues, I've learned some newer flash devices using TLC memory might prefer alignment on 3MiB (or its multiple) boundary. Anyway, a complex topic but not a lot of info. Glad you got this to work and hope this storage solution will work smoothly for everyone else who tries it.
 
Another question, if i upgrade to a kitkat rom, would this bother the hack or would i have to apply the hack again?
You'd have to reapply the hack after flashing a new rom or restoring a backup which was made before application of this hack. Basically, doing those things "restore" the system files to default, thus removing the hack.

Anyone having auto rotation issues ?
Sensor (accelerometer, compass, and magnetic field) issues were brought up in post #205. I'll make a quick summary of the issue here. The sensors access files in the /data folder. If mounting of the /data partition occurs after the sensor service's file accesses, the sensors won't work without being reset. There was a discussion of workarounds in this thread. I didn't choose to use those workarounds because I wasn't certain they would be universally applicable. I find that most of the time, the sensors work fine. One situation when the sensors don't work is when the boot-up process gets delayed. For example, the first time booting up after flashing a rom or wiping caches. Some cached files get recreated and that delay causes mounting of the external partition to be later than the sensors' file access. If that's not your situation and you still get this problem, let me know what rom you're using.

In short, reboot again to see if it works now. If that doesn't work but your rom supports init.d, you can try the -initd.zip solution (note: remember to remove the binary solution) because on two roms I've looked at, the init.d script gets executed quite early in the boot-up process.
 
I want to thank you for coming up with this solution. I nearly had the same exact idea, but with my inexperience with coding and Android architecture, I couldn't create something like this. My phone had tons of issues with storage, but with this its absolutely amazing.
 
I shut down completely and could not remount the SD-Ext. Is there a way I can back up all the apps I had without being in Android? I had a ton of apps and I don't want to try to remember everything I had. Or is there a way to remount SD-Ext?
 
@TrevorX5J9
If you're on a Linux PC, you can use a card reader and try to mount the ext4 partition. If you just need to backup the partition, it should be possible to make an image with a partition imaging software.

If you have a problem mounting the ext4 partition, you need to figure out why mounting fails. Don't repartition or overwrite your SD card before you know what's going on. If your card is not corrupt, data on the card should still be fine. If I understand you correctly, you had the hack working, but it's not working now after turning off the phone. Was that the first time you turned off the phone since installing the hack? Have you rebooted since getting it to work? What rom were you using? What did you use to install the hack? TWRP? Which version? How did you partition your card? Without more information, I can't say what the cause is. My guess right now is you're using a KK rom and your SELinux contexts aren't set correctly.
 
@WarrantyVoider

I don't think my card is corrupt. I copied all the data off using ext2explore. It wasn't the first time because once I went to sleep and my phone died overnight once. It worked since until yesterday. I used TWRP. I got it from here. http://androidforums.com/threads/recovery-twrp-lokied-new-apk-version-08-27-14.861281/ I used Minitool Partition Wizard. I set the first partition to FAT32 as primary and the second as EXT4 as primary as well. Both aligned to MB. I am on CarbonROM by DM47021.
 
And while on this subject what would a KK rom do that would affect this? And how could I set my SELinux contexts to be correct if they are indeed incorrect?
 
@TrevorX5J9 OK, I can take a look when I have some time. If it's an incompatibility problem, I'll try to provide an updated version. A KK rom could restore security contexts (basically some labels) at every boot. Without the proper contexts, the kernel won't allow the hack to work. I'm not sure yet what the problem is at the moment. I have no experience with CarbonROM. Maybe it does something the other KK roms I've tried don't. If the problem is not with my implementation, then you might need to spend some time troubleshooting. I'll check for incompatibility issues first.
 
@TrevorX5J9 OK, I can take a look when I have some time. If it's an incompatibility problem, I'll try to provide an updated version. A KK rom could restore security contexts (basically some labels) at every boot. Without the proper contexts, the kernel won't allow the hack to work. I'm not sure yet what the problem is at the moment. I have no experience with CarbonROM. Maybe it does something the other KK roms I've tried don't. If the problem is not with my implementation, then you might need to spend some time troubleshooting. I'll check for incompatibility issues first.
Ok, thanks man, I appreciate your help! Take your time, I know that you have a life outside of these forums.
 
Back
Top Bottom