• 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

I'm fairly good with technical stuff, but I haven't begun going through files like that. I'll start with logcat and see if I can figure it out. I even did a full wipe, reinstall the rom, and then the hack. Still same issue. I might try starting over 100% from scratch again, but will give logcat a try first. I'm hoping it's some weird thing I managed to do.
So with a full wipe, the only thing that could persist is likely the fat32 partition Android uses as secondary storage. So check the /Android folder and if you've moved apps to SD, the /.android_secure folder also. There might be other folders if the app has permissions to read from/write to the SD and you've used the sd fix for KK to remove the KK's SD restrictions.
 
So with a full wipe, the only thing that could persist is likely the fat32 partition Android uses as secondary storage. So check the /Android folder and if you've moved apps to SD, the /.android_secure folder also. There might be other folders if the app has permissions to read from/write to the SD and you've used the sd fix for KK to remove the KK's SD restrictions.

Sent you a message!
 
So if you have some background process like music playing, does it stop? If you wait a while without doing anything to it, does the system come back? Does your phone lag often or even occasionally? What SD card do you use?

As a matter of fact, I've noticed it most often with Music running in the background while the phone is locked. Since your reply, when I've gotten the lockup issue, I've waited instead of forcing the power off. The phone will eventually reboot on its own (even if it had been playing music). One time it eventually unlocked the screen.

I was certain it wasn't my SD card because the one I bought claimed to have 75 MB/s read and 20 MB/s write. However, upon revisiting the product page and reading reviews, I found several users complaining of slow cards, one going as far as accusing the seller (Komputerbay, not Amazon) of passing on counterfeits. I benchmarked the card myself (from the phone and from my laptop) and got the same results each time: 18 MB/s read and 6 MB/s write.

So, I think you might be right. I'll get another microSD and try to return this one. Unfortunately, I bought it from a third-party seller, so I won't get to take advantage of Amazon's easy returns. :(

When it comes time to switch cards, can I just do a dd image dump? I think I tried that before (when I got my current microSD card) and when I booted up I got a bunch of crash errors followed by a message declaring "system UIDs inconsistent," followed by a crash and boot loop. What's the best way to move from one SD to another in this scenario (that prevents me from having to reinstall everything and enter all my user and account information)?

Thanks again!
 
When it comes time to switch cards, can I just do a dd image dump? I think I tried that before (when I got my current microSD card) and when I booted up I got a bunch of crash errors followed by a message declaring "system UIDs inconsistent," followed by a crash and boot loop. What's the best way to move from one SD to another in this scenario (that prevents me from having to reinstall everything and enter all my user and account information)?
Pay attention to the random access characteristics of an SD card. Even if your card turns out to be a class-6, if it has fast random r/w performance, it'd still be usable. And even a class-10 can have mediocre random access times. That's why in my earlier posts I've recommended Samsung and SanDisk. I've never seen a genuine card from either manufacturer that doesn't have great random r/w performance. This was the case even going back to the class-2 or class-4 days. (For SanDisk at least. Samsung wasn't as prevalent back then.) The problem with buying them is the possibility of getting counterfeits.

On Windows, you can use CrystalDiskMark to check the 4k r/w performance. Some customers on Amazon post numbers or screenshots that can be used to get a general idea about a particular brand/model. If you want, you can read about some Samsung/SanDisk benchmark data for comparison:
http://androidforums.com/threads/sandisk-32gb-extreme-plus-uhs-1-u3-sd-card-review-test.893742/
http://androidforums.com/threads/samsung-evo-micro-sd-feel-as-fast-as-internal.890591/

You should be able to use dd to do backup/transfer. I'm not sure what happened in your case. Maybe the card wasn't reliable and caused some file system errors. dd would copy the free space too, and with flash media, doing that would probably waste one erase cycle for some of the memory cells. No big deal if you prefer one-to-one copies. Basically, any method to safely copy partitions should be okay. If you have and know Linux, you can also do a tar backup (the version of tar needs to support SELinux if you're using a KK rom). You can take a look inside my -backup/-restore.zip to see what parameters I use. And if your current SD card is reliable enough to store a big file and if your fat32 partition has enough free space to store a backup of the ext4 partition, you can just use my -backup/-restore.zip. Let me know if you need help. Good luck.
 
KitKat SD permissions issue

A quick recap. When I was making my hack run on KK, crm701 mentioned needing to use the KK SDfix to make the hack work. Since it worked, I didn't bother looking further. Then a while ago, RelZeshi and orion2323 mentioned problems with some of their apps after applying the hack. Basically, apps that had been installed before the hack worked, but new apps installed after the hack didn't always work. I guess not enough people have reported this problem, so I finally took a look at this problem only recently. Sorry about not dealing with this sooner.

So here's the technical lowdown as I understand it. Android emulates a virtual SD card from a portion of "internal" storage (using /data/media, which the hack puts on the external SD). Since KK, apps can no longer have free access to all of the (real or emulated) SD like before. This restriction shouldn't affect most typical apps, but with the hack applied, something prevents those apps from accessing the files on the SD. It turns out that the service responsible for managing the permissions and rights to the SD, "sdcard", reads a list containing the access rights from /data/system/packages.list to determine which apps can access the SD. In a way, this problem is similar to the sensor issue. If "sdcard" ("sensord" in the sensor issue) accesses /data/system/packages.list (/data/misc/sensor/* for sensors) before the external partition is mounted at /data, the file it reads would be the one in the internal /data, which would obviously not contain info about apps installed after the hack.

When I tested on the Carbon rom (no KK SDfix or other hacks), sometimes an app would exhibit this problem after booting into the rom. I could reboot without doing anything else, and then sometimes the problem would go away. Like the sensor issue, it seems to be a race condition. So in theory, once "sdcard" is forced to restart after the external partition is mounted, it should read the correct packages.list and grant access accordingly. In other words, KK SDfix should no longer be necessary unless you actually want to let certain apps access the whole SD.

I'm posting three files. One for the sdcard workaround (for KK, not needed for JB) only. One for the sensord workaround only. And one for both. Each changes the same script, so choose one. Flashing one after another means to replace, not to add to the old one. The sensord one is almost the same as the one previously posted at #476. The only difference is in this version, I added a 1-second delay between stopping and starting sensord to give the sensors some time to reinitialize. The uninstaller in #476 (for the hack plus the workaround) should still be applicable.

If anyone needs this workaround, please let me know if it works. Thanks.
 

Attachments

It works :)
Awesome, you did it, again :)

I flashed the new fix and now those apps that refused to start, well, start. Tried Fifa 15 and it worked, also minecraft and it was able to create a new world

Thank you so much, always appreciate your hard work and dedication
 
First time poster here. This thread is the reason why I joined the forum. I just wanted to thank everyone involved in this project. I have a D500 running the stock T-Mobile rom with a Samsung 32GB EVO UHS-1 card. It's working beautifully. Excellent work guys.

I have a quick question. I just picked up an Optimus L90 and was wondering........what would happen if I copied the stock KitKat rom from the L90 and ran it on an external sd card on the F6? It would have JellyBean on the internal drive, but would be running KitKat on the external. If this isn't a totally ridiculous idea, which version of the install file should I use on the F6?
 
I have a quick question. I just picked up an Optimus L90 and was wondering........what would happen if I copied the stock KitKat rom from the L90 and ran it on an external sd card on the F6? It would have JellyBean on the internal drive, but would be running KitKat on the external. If this isn't a totally ridiculous idea, which version of the install file should I use on the F6?
Not sure what you're trying to achieve or what you mean by running the L90 rom on the F6, but what you described doesn't work. You can't normally use a rom made for a different device. The devices could have similar hardware components that make a rom for one device partially functioning on another. but the differences in the devices could also cause major problems.

Now, if you're talking about using my -copy.zip script to copy data files from one device to another, that would not give you KK. A "rom" usually means a boot image (kernel+some initialization files), system files (in the /system partition), and optionally user and system data (in the /data partition). What my hack does is to make the system use the data on the SD card instead. It doesn't change how the boot image and system files function. So if you did this, you would still be running JB on the F6 but using data from the L90. This is also not recommended because differences in system settings. If you're trying to transfer the setup from one phone to the other, it's best to reinstall apps and copy settings and/or other user data from the other phone.

If you want to use KK, you should get a rom that's made for the device. You can try a KK rom for the F6. As far as I know, KK roms for the F6 are mostly still work in progress, but perhaps they work well for you.

If what you're asking is whether you can run JB in internal storage but run KK with the external SD, well, you can't do that. . . yet. ;)

I hope that answers your question. Otherwise, explain what you're thinking to do so we can see whether it's possible and how to go about it.
 
Thanks. That answers it perfectly. It was a little late, I had one too many, and my imagination started running wild. I just picked up the L90 for $50 and kitkat, in addition to the memory hack, would make the F6 a stud. LTE capability would've made the L90 a stud. Oh well......can't have everything, I guess. Unless you pay over $500. Now I just have to figure out which phone I like better. This memory fix changes everything.
 
I need your help guys. As soon as I create the ext4 and FAT32 partitions, my F6 cannot see the SD card. I cannot mount it using the _Shell Emulator and it says permission denied.
 
@nanoinusa I don't know if you've resolved your problem yet. The 1st partition needs to be fat32 and the 2nd needs to be ext4. If the method you used didn't work, try another way to partition. I'm not sure what went wrong in your case. If you still need help, provide more info like what you did and what you're using (which roms, tools, etc.) so that I can see how to help you troubleshoot.
 
OK, I'm ready to join the party.
I've had the F6 for about 2-3 months now, the METRO PCS version, running XPERION ROM & plan on keeping it as the daily driver ROM.

I just got around to getting a decent SD Card & looking for the best memory swap mod for this set up.
I have a Sandisk 64GB ExtremePlus SDXC Card & also have the Pro version of LINK2SD, if needed/an option.

Any recommendations for partitioning & files/zips to flash would be greatly appreciated.

THX!
 
OK, I'm ready to join the party.
I've had the F6 for about 2-3 months now, the METRO PCS version, running XPERION ROM & plan on keeping it as the daily driver ROM.

I just got around to getting a decent SD Card & looking for the best memory swap mod for this set up.
I have a Sandisk 64GB ExtremePlus SDXC Card & also have the Pro version of LINK2SD, if needed/an option.

Any recommendations for partitioning & files/zips to flash would be greatly appreciated.

THX!

I just found THIS post that may help you set all this up. Seems to have all the instructions needed and flashable zips are in post #9 of that thread.

Worth checking out till WarrantyVoider responds to your post.
 
I just found THIS post that may help you set all this up. Seems to have all the instructions needed and flashable zips are in post #9 of that thread.

Worth checking out till WarrantyVoider responds to your post.

THX,I'm all over it,gonna check it out as we speak.
 
OK, I'm ready to join the party.
I've had the F6 for about 2-3 months now, the METRO PCS version, running XPERION ROM & plan on keeping it as the daily driver ROM.

I just got around to getting a decent SD Card & looking for the best memory swap mod for this set up.
I have a Sandisk 64GB ExtremePlus SDXC Card & also have the Pro version of LINK2SD, if needed/an option.

Any recommendations for partitioning & files/zips to flash would be greatly appreciated.

THX!
I can't comment fairly on the "best memory swap mod." I am obviously biased. ;) Having said that, I think the best one is a new mod I've been using but haven't released yet.

For the mods/hacks that are currently available, I can only help you with my hack because I have no experience with other mods/hacks. Since you have a very capable SD card, you shouldn't experience too many issues using my hack as is. Xperion has init.d support. So the simplest way is probably to use the -initd.zip (see post #319). The zip installs the init.d script and copies data files. To uninstall, just delete the init.d script in the init.d folder.

I'm guessing most people use my binary version (-copy.zip and -install.zip). Either no one uses the init.d version or no one encounters problems with it. So if you encounter an issue with the init.d version, let me know and I'll investigate.

As for partitioning, I don't know what level of help you're looking for. To simply get the hack working, you just need fat32 as the first partition and ext4 as the second. The next level is to make sure the partitions aren't misaligned. Then the next level is to make the partitions optimally aligned. And the level after that is to try different file systems to get additional benefits not supported by fat32 and ext4. The last level is not supported by the current release, but it's possible to implement with some additional work.

Anyway, most of the info and files you need should be in this thread (posts #251, 301, 309, 319, 476, etc.). If the info seems overwhelming, I can perhaps make a summary when I have a chuck of free time. If you have specific questions, I can answer them more directly. Good luck.
 
I just finished partitioning (1st FAT32 @18GB/2nd EXT4 @30GB/LINUX SWAP of 1.5GB )
Using LINK2SD Pro.
I have another phone, so, I'm open to trying out your mod & future mods, especially if you need testers.
I'm running XPERION ROM (JELLY BEAN), & not looking to switch to another ROM, this one works for me.
I'll visit the posts listed above & will be back tomorrow w/results,etc.....
THX for taking the time to keep up w/this thread/topic & your contributions to the community!
 
@WarrantyVoider

May I suggest starting a new thread with everything found in the first post with some simple instructions. I often get asked about sd hacks and I send users to this thread, but this thread can be daunting for anyone especially a noobie since everything is scattered about in a rather large thread.

This is clearly a valuable solution to the small internal storage and deserves a thread and op of its own. ;)
 
Last edited:
May I suggest starting a new thread with everything found in the first post with some simple instructions. I often get asked about sd hacks and I send users to this thread, but this thread can be daunting for anyone especially a noobie since everything is scattered about in a rather large thread.

This is clearly a valuable solution to the small internal storage and deserves a thread and op of its own. ;)

Will do, sometime tomorrow (3/5/15).
Just posted in another (existing) thread & will get w/the developer, as he's working on fine-tuning his mod.
Again, THX for your contributions w/the XPERION ROM, much appreciated!
 
May I suggest starting a new thread with everything found in the first post with some simple instructions. I often get asked about sd hacks and I send users to this thread, but this thread can be daunting for anyone especially a noobie since everything is scattered about in a rather large thread.

This is clearly a valuable solution to the small internal storage and deserves a thread and op of its own. ;)
Yeah, I should have done it a long time ago. I should have more free time soon, so I will do what you suggest and have the various files in one place. A thread with 500+ posts is a bit much to sift through.

I also want to take this opportunity to thank you for helping others who were looking for a solution to the storage problem. This solution would have been less confusing had I made things easier to find.
 
"So with a full wipe, the only thing that could persist is likely the fat32 partition Android uses as secondary storage. So check the /Android folder and if you've moved apps to SD, the /.android_secure folder also. There might be other folders if the app has permissions to read from/write to the SD and you've used the sd fix for KK to remove the KK's SD restrictions.

Hello again! as always, thank you for your hard work and support

So I decided to wipe my OLD samsung galaxy tab 2 10.1, wifi model and thought, why not try your SDHack ?
Installed slimKat 4.4.4, ran the rom once, went into recovery and installed your hack, SDCopy, SDInstall and then the KK Fix
It worked, my tablet shows 51.1 GB of storage + a 5GB FAT32 partition I created (don't know what happend with about 4GB of storage; 55GB > 51.1GB)

Here's an issue I noticed, on the FAT32 partion, a folder .android_secure was created and 110 app files (out of 400+) were dumped there taking almost all the space.

This is not an issue with the LG F6 which I have with the same configuration ?

Why did it do it ?

Thanks :)
 
Last edited:
@orion2323
If I remember right, Android uses that .android_secure folder to store apps that are "moved to SD." With 51.1GB of ext4 acting as primary storage space, Android shouldn't be choosing the SD card (meaning the fat32 partition with the hack) as the preferred installation destination. Are you able to run a command at a command prompt (inside the rom, not recovery)? With a terminal emulator app, run "pm get-install-location" or with ADB, run "adb shell pm get-install-location". Perhaps the slimKat rom doesn't use the default value? Or maybe the rom fuses the SD card in a way that confuses the installer? Not entirely sure without studying it.
 
Hello, I've got a bit of a problem.

I did the method outlined in post #251. After doing it, the method seemed to have 'worked'. The Ext4 partition and the Internal SD card seemed to have swapped places and I now had 1.7GB instead of 1.27. However, 1.7GB wasn't much of an improvement so I decided to uninstall it and do another repartition and reinstall it. After uninstalling it, the SD card refuses to mount. One discrepancy:

Code:
adb shell
su
cd /storage/external_SD/DataOnSD
sh installer.sh uninstall
exit
exit

There was nothing in the external_SD folder. I assumed this was normal because my understanding was the external and internal had swapped. So, I copied DataOnSD onto the external via USB again, and this time it showed up in /storage/sdcard0/DataOnSD and just did the uninstall there. Now it just sits in "Preparing SD card - Checking for errors" and won't mount. Did a hard reset and the same thing occurs.

Did I brick something?

Another discrepancy is that the FAT32 partition seemed to be having problems. I had "AParted" installed to monitor the partitions and the whole 1st FAT32 partition changed to unrecognized some way through. Could that be the source of the problem?
 
Last edited:
@Brood_Star
By now the easier way to install is probably to use TWRP and flashable zips, but if you prefer command line with ADB, we can certainly do that. By the way, if your phone can boot or you can access a command prompt via ADB, the phone is certainly not bricked.

It looks to me that the two discrepancies you point out are actually the same issue. Namely, the fat32 partition is not accessible. The "external_SD" folder on the stock rom normally points to the fat32 partition on the SD card. The hack or the installer shouldn't make the partition blank. If you've repartitioned the SD card in a way that has modified the fat32 partition, then it's probably been wiped. The "sdcard0" folder would normally point to an emulated SD that's actually in internal storage (at /data/media). So it sounds as if the phone couldn't recognize the fat32 partition and references to SD go to the emulated SD instead of the physical card. This is just my guess based on the info you've provided.

If the problem is indeed the SD card, try repartitioning and reformatting. It doesn't sound right for the fat32 partition to become "unrecognized some way through" as you said. Check whether your card has an error and make sure it's not a counterfeit card. Let me know if you further help. Good luck.
 
Hello again!
2nd time something weird happens with my LG F6
A long time ago, when I 1st tried this hack, one day, out of the blue, after restarting, the hack went away, my phone booted into the original partition and neglected the new partition

I wiped my phone maybe 2 months ago, and things were OK until today, when the same thing happened, phone rebooted after many play store updates and it went back to the original state, ignoring the SDHack once again

Is there a way to re-apply the hack ?

....to start from scratch :(
 
Back
Top Bottom