• 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

Got it working thanks a lot man I missed a step but all's good I have a 32 gb class 10 card and my phone flys now
 
WarrantyVoider, thank you so much for the assistance.

I followed the steps in your post using ADB. The main deviation I noticed is that when I entered "ls -l /system/bin/vold*" it only listed the 87580 entry, not the 13660 or 1220 ones. Please see attached screen capture for all the results (you'll see I made a typo on one command and corrected it a couple lines later). The rest, to my eyes, responded as expected.

Again, thanks for your help.


I'll assume you got no errors after each step. So that means files are installed but the script won't copy your files. My guess is the script can't mount the partition. By the way, the three "exit"s thing: The 1st exits the superuser mode, the 2nd exits adb, and the 3rd (if you typed it) exits Windows' command window.

There's an init_debug.sh script you can try, post #256. Check the post to see if it helps you solve the problem. If you need further assistance, let me know where you get stuck.

You can also debug it manually, since you have adb. Start with "su" to get a "#" prompt. In the following, text following the "#" prompt is command and expected output follows that.
Check the absence of the temporary directory:
Code:
shell@android:/ # ls -ld /cache/DataOnSD
/cache/DataOnSD: No such file or directory
If the script has aborted, you might get this instead:
Code:
shell@android:/ # ls -ld /cache/DataOnSD
drwxrwxrwx root     root              2014-11-07 17:20 DataOnSD
If so, clean up:
Code:
shell@android:/ # rmdir /cache/DataOnSD/vfat
shell@android:/ # rmdir /cache/DataOnSD/ext4
shell@android:/ # rmdir /cache/DataOnSD
If you get any "No such file or directory" message, don't worry about it. If a command returns some other message you can't figure out, let me know.

Check installed files:
Code:
shell@android:/ # ls -l /system/bin/vold*
-rwxr-xr-x root     shell       13660 2014-09-07 04:07 vold
-rwxr-xr-x root     shell       87580 2014-03-24 05:21 vold-original
shell@android:/ # ls -l /system/etc/DataOnSD
-rwx------ root     root         1220 2014-09-11 15:42 vold
Check partitions exist:
Code:
shell@android:/ # ls -l /dev/block/mmcblk1p*
brw------- root     root     179,  33 2014-11-07 16:45 mmcblk1p1
brw------- root     root     179,  34 2014-11-07 16:45 mmcblk1p2
Make temporary directories:
Code:
shell@android:/ # mkdir /mnt/asec/temp1
shell@android:/ # mkdir /mnt/asec/temp2
Try to mount partitions:
Code:
shell@android:/ # mount -t vfat /dev/block/mmcblk1p1 /mnt/asec/temp1
shell@android:/ # mount -t ext4 -o nosuid,nodev /dev/block/mmcblk1p2 /mnt/asec/temp2
If the commands return any error message, something's not right. Otherwise, check partition contents:
Code:
shell@android:/ # ls -la /mnt/asec/temp1
<... DIRECTORY LISTING OF YOUR FAT32 PARTITION ...>
shell@android:/ # ls -la /mnt/asec/temp2
<... DIRECTORY LISTING OF YOUR EXT4 PARTITION ...>
Directory listing of the fat32 partition should show an empty file "LGF6DataOnSD_INIT" if the script never got to deleting it.

If everything looks okay, reboot and see if it works. If something doesn't look right, let me know what you get.
Good luck.
 

Attachments

  • ScreenHunter_09 Nov. 13 13.33.jpg
    ScreenHunter_09 Nov. 13 13.33.jpg
    98.5 KB · Views: 120
The main deviation I noticed is that when I entered "ls -l /system/bin/vold*" it only listed the 87580 entry, not the 13660 or 1220 ones.
So that means the binary file was not installed. I notice you did "ls -l /dev/block/mmcblk1p*" twice. The first time it didn't work but the second was fine. Weird. Anyway, since it looks like your partitions can be mounted, they are okay. So let's figure out why your installation has failed.

As before, go into "adb shell" and get a superuser prompt with "su". In your case, your prompt shows "root@android:/ # " whereas mine is "shell@android:/ # ". That doesn't matter, as long as you get a "#". The commands to install:
Code:
cd /storage/external_SD/
touch LGF6DataOnSD_INIT
cd DataOnSD
sh installer.sh both
The corresponding output:
Code:
shell@android:/ # cd /storage/external_SD/
shell@android:/storage/external_SD # touch LGF6DataOnSD_INIT
shell@android:/storage/external_SD # cd DataOnSD
shell@android:/storage/external_SD/DataOnSD # sh installer.sh both
Making /system writable ...
Installing executable to /system/bin ...
Installing script to /system/etc/DataOnSD ...
Making /system read-only ...
Reboot to apply changes.
Notice when a command fails, you get a number in front of the next prompt like "1|root@android:/ # ". After these steps are done correctly, normally you exit and reboot. But let's check the installation again:
Code:
ls -l /system/bin/vold*
ls -l /system/etc/DataOnSD
ls -l /storage/external_SD/LGF6DataOnSD*
Expected output:
Code:
shell@android:/storage/external_SD/DataOnSD # ls -l /system/bin/vold*
-rwxr-xr-x root     shell       13660 2014-11-13 12:17 vold
-rwxr-xr-x root     shell       87580 2014-03-24 05:21 vold-original
shell@android:/ # ls -l /system/etc/DataOnSD
-rwx------ root     root         1220 2014-11-13 12:17 vold
shell@android:/ # ls -l /storage/external_SD/LGF6DataOnSD*
-rwxrwxr-x system   sdcard_rw        0 2014-11-13 12:17 LGF6DataOnSD_INIT
Type "exit" twice to exit the adb shell. If everything looks right, reboot to apply changes and hope it works this time. Let me know what happens. Good luck.
 
So that means the binary file was not installed. I notice you did "ls -l /dev/block/mmcblk1p*" twice. The first time it didn't work but the second was fine. Weird. Anyway, since it looks like your partitions can be mounted, they are okay. So let's figure out why your installation has failed.
Good news! I followed your instructions and it worked exactly as you said. Played around with it a bit last night, and gave it to my daughter to use today. It did sporadically crash on me last night, not sure why, I couldn't find a pattern to it. The initial boot after following your instructions was very lengthy and it started to boot loop so I had to shut it down after about 15-20 minutes of waiting to see if it was going to resolve itself. After that it booted up properly and appeared to work correctly. I'll keep my eye on it.

BTW, the command that I entered twice above, where it didn't work the first time but did the second time was because I mistook the "1" for a lower-case "l" the first time. I realized it after a bit and re-entered it correctly.

Again, I really appreciate the help.
 
Hey warranty I noticed that u said delete lgf6dataonsd_do_not_remove if it exists but when I did that it went back to normal internal of 1.27 gb meaning that your copydata.zip put it there? So how can I delete it if it needs it?
 
Is there a version that a noobie could use. I have a class 10, 32 GB sd card, Rooted with towelroot.
The easiest way is probably to use TWRP plus the -copy.zip and -install.zip in post #319 (and the -uninstall.zip if you need it). Start by reading post #251, though.

If you're the type who wants to know how the sausage is made, most of that information is in the thread. In #251 I discussed several different ways to install the binary + script. The various files I've provided before #319 don't work with KitKat-based roms. For KK, using zips in #319 via TWRP is the only way for now. The stock rom is 4.1.2 Jelly Bean, so the other methods are okay. Choose what you like.

If you are confused about something or have a question not covered by the other posts, it'd be easier for me to answer a specific question. Otherwise, good luck.
 
It did sporadically crash on me last night, not sure why, I couldn't find a pattern to it. The initial boot after following your instructions was very lengthy and it started to boot loop so I had to shut it down after about 15-20 minutes of waiting to see if it was going to resolve itself. After that it booted up properly and appeared to work correctly. I'll keep my eye on it.
It's possible your files weren't fully copied. Normally, when you reboot the first time after installation, it goes like this. The contents of your internal /data partition get copied to the SD card by my script. During this time, the screen stays on the metropcs graphics (or whatever equivalent on your phone). After files are copied, the script will reboot the phone automatically. This is normal. The external partition should be mounted as /data at this point, after this second boot-up. As I've said before, file copying will take a while. If you have a lot of apps and data already in the internal storage, the time it takes will obviously be long. You can get an estimate of the time it might take if you know the amount of data to copy and the writing speed of the SD card. I keep my internal storage relatively empty, and with a class 6 Samsung, it takes maybe about 2-5 minutes. If your phone truly boot loops (rebooting over and over without intervention), let me know because something isn't right.

If you want to redo the file copying part to see if your phone is more stable, create an empty "LGF6DataOnSD_INIT" under /storage/external_SD and delete the ".LGF6DataOnSD_DO_NOT_REMOVE" under /data . Remember to save whatever data you've added since, as doing the file copying again is like restoring your phone to that previous state (i.e. state of your internal storage). To do so under the "#" prompt in adb:
Code:
touch /storage/external_SD/LGF6DataOnSD_INIT
rm /data/.LGF6DataOnSD_DO_NOT_REMOVE
Then exit then reboot. Good luck.
 
Hey warranty I noticed that u said delete lgf6dataonsd_do_not_remove if it exists but when I did that it went back to normal internal of 1.27 gb meaning that your copydata.zip put it there? So how can I delete it if it needs it?
Like the file name says, DO NOT REMOVE the file under normal usage. That file is like a tag. It's there to tell my mounter binary that the partition is a copy of /data partition so it's okay to use it as /data . You only delete that file when you no longer want the external ext4 partition to act as your /data .

You know when you flash a new rom, normally you need to factory reset/wipe data? That applies to your internal storage. But with my hack the /data directory you've been using is actually on the SD card. So how do you wipe data when you want to apply the hack to the new rom? You need to delete the files in that ext4 partition, of course. So in this case, you delete the tag so my binary and/or script no longer recognizes the partition as containing valid /data files. If you read my previous post again, this is what I meant.

Without the tag file, the -copy.zip actually will remove all files before copying begins. So there are two ways in TWRP to trigger file copying with -copy.zip again. You can 1) mount the "sd-ext" partition and delete the file using the file manager, or 2) remove all files in the external ext4 partition using TWRP's advanced wipe. I (and crm701) have mentioned this in the other posts.

If you accidentally deleted the file but you haven't run the -copy.zip to overwrite your external partition, you can just put the tag file back. In TWRP, mount "sd-ext" and go to /sd-ext and create that file. I don't remember if TWRP's file manager lets you create a file, but it's possible with the terminal emulator using "touch .LGF6DataOnSD_DO_NOT_REMOVE". Or you can create the file somewhere using the rom's file manager and then move the file using TWRP.
 
I got two apps that won't connect to the internet to download the additional files they need. They worked before this mod, but not since I got this mod working. I'm on the Carbon Rom, KK 4.4.4.
 
The same issue that alot have been posting when you explain to use the files in post 319.we get a demigod kernal error.and before you say im doing it wrong.im on xperion now using same method for carbon and it works on xperion fine with the freedom kernal overclock.why the supposed kitkat files work on xperion and not carbon idk.perhaps it works on yours but maybe you forgot to tell us an extra step besides letcarbon setup data then flash copy and install while making sure sdext is erased.di. those steps for carbon and xperion.xperions the only one that works
 
Hmm I dunno I haven't gotten an errors , I format the card using twrp , check the RM rf format back to main menu wipe the SD ext go back to settings uncheck RM rf then flash both files thats it
 
After using the new setup for while, I am encountering slow down and freezes. Maybe my Class 10, 32GB Kingston microSDHC card is not fast enough. Had to uninstall and went back to original memory setup.

Original firmware. It was installed using TWRP.
 
Apology is in order. Apparently I had to format in twrp. weird because it's worked for other stuff fine but I guess twrp didn't recognize. Now I'm up and running 17 gigs fine lol. as for last poster the swap should make phone faster not slower especially with a class ten. you sure you didn't flash something else? Try uping your minimum performance and see if that solves it. Also you using original firmware. 10i and 12b stock will suck. most stock firmware does due to all the bloatware. the most stable with this mod is xperion if you want jellybean or carbon and the carbon kernal for kitkat.details help but don't blame the hack. this may also work well with pacman but pacman ATM has more bugs than carbon.I like how they are put together though
 
My thanks to WarrantyVoider for this mod.

I followed the newbie instructions in post 301 and while I got it working, I did have one issue.

I used a brand new SanDisk Extreme PLUS 32 gig microSD card bought at retail (not ebay). I took it right out of the factory packaging, put it in the SD adapter and plugged it into the SD slot of my desktop.

I then ran the MiniTool Partition program as instructed with a FAT32 partition first followed by a EXT4 partition.

Maybe this is where I messed up as I then put the DataOnSD files on the card.

I then ejected the card and put it in my F6, which didn't recognize the card. I took it out of the F6 and put it back in the adapter and into my pc, which did recognize the card and the files were still there. Ok, back into the phone but no joy.

Next I ran SDFormatter on my pc, which put the card back to one big FAT32 partition. Now the card worked in the phone. I then used Aparted to partition the card while in the phone. Aparted worked and the card was still recognized but with the resized FAT32 partition.

The rest of the instructions went without a hitch.

One question I have is how can I tell when the copying of all the files is finished?

I know that the phone will reboot at the end but I wasn't staring at the phone the entire time so it must have rebooted without me noticing it.
 
Back
Top Bottom