Combining internal and external sdcards as one storage unit? Android LVM? - Sprint Samsung Galaxy Note II

Basically what im getting at is would it be possible to combine both storage units to where the os can mount them as one? In traditional Linux I would use LVM2.

Anybody? You think something like this would've been done already but I haven't found any directions on Google just a project page.

dude, desktop computers require an entire card in order to do this kind of stuff, it's called raid, and android isn't programmed to support it
Sent from my SPH-L900 using xda app-developers app

That is incorrect. Try looking into what an LVM actually is before attempting to answer. RAID is something completely different.
Edit: not trying to be a **** but your post had a condescending tone to it.

schnowdapowda is correct, LVM would be able to do this just fine if Android supported it, but as far as I can tell the Android system doesn't have the kernel modules or systems in place sadly. Otherwise it'd be no problem making a physical volume from the two SD partitions, then a volume group and logical volumes.
One down side is you would run into system overhead while the slower SD card is keeping LVM from writing to faster on-board "SD card" partition space.
I just run the following at boot time, and it swaps the internal and external cards... Note this is with the Perseus kernel.
Code:
busybox mount -o remount,rw /
busybox mount -t exfat -o umask=0000 /dev/block/vold/179:49 /mnt/sdcard
if busybox mount | busybox grep vold/179:49; then
busybox mount -o bind /data/media /mnt/extSdCard
fi
I saw this on a website and it works perfectly, just need to verify your dev/block/vold/NNN:NN mount point and make this change after the SDCard is initialized.

aramova said:
schnowdapowda is correct, LVM would be able to do this just fine if Android supported it, but as far as I can tell the Android system doesn't have the kernel modules or systems in place sadly. Otherwise it'd be no problem making a physical volume from the two SD partitions, then a volume group and logical volumes.
One down side is you would run into system overhead while the slower SD card is keeping LVM from writing to faster on-board "SD card" partition space.
I just run the following at boot time, and it swaps the internal and external cards... Note this is with the Perseus kernel.
Code:
busybox mount -o remount,rw /
busybox mount -t exfat -o umask=0000 /dev/block/vold/179:49 /mnt/sdcard
if busybox mount | busybox grep vold/179:49; then
busybox mount -o bind /data/media /mnt/extSdCard
fi
I saw this on a website and it works perfectly, just need to verify your dev/block/vold/NNN:NN mount point and make this change after the SDCard is initialized.
Click to expand...
Click to collapse
How well does this work for you? And do you do this at every boot or only when you want to swap? Also when running apps after you swap the two and all of your other apps are already installed on internal then you swap the two, can you still just open the app drawer click and run? Or do they no longer run after the switch.
Also after the switch how does that all work when going into recovery and wiping directory's/folders etc and flashing ROM's what will it wipe since the directories are switched?

What is the benefit of swapping?
Sent from my SPH-L900 using xda app-developers app

Tw1sted247 said:
How well does this work for you? And do you do this at every boot or only when you want to swap? Also when running apps after you swap the two and all of your other apps are already installed on internal then you swap the two, can you still just open the app drawer click and run? Or do they no longer run after the switch.
Also after the switch how does that all work when going into recovery and wiping directory's/folders etc and flashing ROM's what will it wipe since the directories are switched?
Click to expand...
Click to collapse
Sorry i had forgotten about this thread. This shouldn't effect app storage. Only SD storage and the mock SD storage partition on your internal memory. I believe it might screw up any apps you have installed on your external unless there is some mechanism that changes where the system thinks they're installed. And this wouldn't effect recovery as you cant run that script till startup.
Devi0124 said:
What is the benefit of swapping?
Sent from my SPH-L900 using xda app-developers app
Click to expand...
Click to collapse
Being able to save stuff automatically to your external without in app configuration.
Anyway.. this isn't what I'm really looking for. As far as I'd be concerned.. the system overhead wouldn't be an issue as I would gladly take a slowdown in read and writes to my storage for the convenience of having it accesible like that. I guess its just a matter of some genius dev compiling LVM into their kernel.

Devi0124 said:
What is the benefit of swapping?
Sent from my SPH-L900 using xda app-developers app
Click to expand...
Click to collapse
More space
Sent from my SPH-L900 using xda app-developers app

Related

I screwed up, now every ROM is effected!

I hated the 128MB partition that mounts with the internal 8GB and my sdcard, so I used gparted via ubuntu to remove it and expand the linux-swap partition to fill the 128MB of unallocated space. Now no ROMs I use can mount the internal or external storage, nor can I mount it via USB- unless I'm in recovery. From recovery I can read the sdcard and mount it to browse via USB. Anyone have a solultion for this? I've wiped data and system and tried other ROMs, but each one is affected with the same issue.
Try a hard reset
Sent from my ADR6300 using XDA App
jdkoreclipse said:
Try a hard reset
Sent from my ADR6300 using XDA App
Click to expand...
Click to collapse
Meaning to remove root, nand unlock, etc and start fresh?
No...its the clear storage option in the bootloadwr
Sent from my ADR6300 using XDA App
jdkoreclipse said:
No...its the clear storage option in the bootloadwr
Sent from my ADR6300 using XDA App
Click to expand...
Click to collapse
My mistake. I just did that, waiting for results now.
xvenom89 said:
My mistake. I just did that, waiting for results now.
Click to expand...
Click to collapse
Nope, that did not work. My sdcard and internal storage are not mounting. Anyone else have an idea?
try a method posted in the cm6 thread
Sent from my ADR6300 using XDA App
jdkoreclipse said:
try a method posted in the cm6 thread
Sent from my ADR6300 using XDA App
Click to expand...
Click to collapse
This?
http://forum.xda-developers.com/showpost.php?p=7319333&postcount=753
I don't see that as a solution. I need it to detect my storage like it does out of the box, as it did before I deleted one of the partitions. There has to be a way to restore it to factory defaults; I don't mind having to start from scratch at this point.
My only idea that might work is to flash a PB31IMG.zip from the bootloader... Anyone else have an insight?
Just an update, this fixed it:
http://androidforums.com/all-things...ideo-howto-unroot-incredible-downgrading.html
Update2:
I can get my phone running the original 2.2 leaked ota, but trying to upgrade to skyraider 2.5.2 from there brings me back to square one...
I can only access them while booted using the original 2.1 ROM or the first 2.1 OTA. When I upgrade to ANY Froyo ROM, the internal storage and sdcard disappear. I wish someone here would help me out so I can move on with my life; it's been this way for 24 hours now and I can't take it anymore.
Have you tried to just remake the partitions as they were?
lamerto said:
Have you tried to just remake the partitions as they were?
Click to expand...
Click to collapse
I cannot figure out how. Clue me in? I've used clockworkmod recovery to format each partition manually, but that didn't help.
I restored completely to stock as described here, followed by using unrevoked to root. From the stock 2.1 OS, I can read from the SD Card and Internal storage just fine. I then upgrade the radio to 2.15.00.07.28, as described here; everything still works at this point. Then I choose any 2.2-based ROM (skyraider, pmf, stock, cyanogenmod, etc) to upgrade to and install it via clockworkmod recovery. At that point, the booted system no longer reads from the SD Card or Internal Storage (BOTH are declaired "Unavailable" under Menu -> Settings -> SD & Phone Storage). From recovery I can still mount the SD Card via USB.
Before this mess I was running Skyraider 2.2 almost flawlessly, then I was picky and chose to use gparted via Ubuntu to delete the smaller ~128MB partition that mounted along side the SD Card and Internal Storage because it annoyed me. After deleting it, I expanded the linux-swap partition to fill the unallocated space. I did all this while the system was booted (after applying unrevoked-forever, so it would actually take effect). I then downloaded and installed the Skyraider 2.5.2 upgrade and that is when I first discovered this problem.
I think it MIGHT be fixable if I could figure out how to manually edit configurations to mount both partitions at boot.
I hope what happened is now clear to you all, because I'm dying here without my Incredible. I can't use it properly without the SD Card mounted, so I'm using a Palm Pre Plus for the time being. I could use a 2.1 ROM, but I became too in love with Froyo to part so soon. Please, if anyone has suggestions I would love to hear them. Thanks..
Since it seems nobody else has a clue how to work with this, I'm trying more things. I don't know why I didn't think of it before, but I'm editing the phone's fstab.
What was included:
/dev/block/mtdblock5 /cache auto rw
/dev/block/mmcblk0p1 /data auto rw
/dev/block/mtdblock6 /datadata yaffs2 rw
/dev/block/mtdblock3 /system yaffs2 rw
/dev/block/mmcblk1 /sdcard vfat rw
/dev/block/mmcblk1p2 /sd-ext auto rw
I added "/dev/block/mmcblk0p3 /emmc auto rw" for the internal storage and it worked once after I rebooted, but the sd card issue hasn't changed at all. It's already defined in the fstab, so why isn't it mounting?
So now sometimes the internal storage mounts and sometimes it doesn't. Anyway, with the sd card, now I found another interesting detail: the phone recognizes a different 2GB micro sd card while booted, but not the 16GB one I've been using for ages, the one that mounts fine in clockworkmod recovery and in 2.1 ROMs. It used to mount fine in Froyo, now it is "Unavailable". Why is this?
Xvenom89,
Wished I could help. But being a noob.....
If nothing else, at least I've bumped the thread for you. (-:
Just in case it helps, if the file you're referring to is vold.fstabs, the only entries in mine are;
dev_mount sdcard /mnt/sdcard auto /devices/platform/goldfish_mmc.0 /devices/platform/msm_sdcc.2/mmc_host/mmc1
dev_mount emmc /mnt/emmc 3 /
devices/platform/msm_sdcc.3/mmc_host/mmc2
Maybe you could PM one of the more friendly devs and ask if they'd mind making a suggestion.
________________________________
Unrevoked forever
SkyRaider 2.5.2 Sense
Hrdra kernel ocuv_ov_v10 (#2)
I'm having the same issue with the OTA Froyo update. So I was wondering, did you figure out a way to fix this issue?
xvenom89 said:
I cannot figure out how. Clue me in? I've used clockworkmod recovery to format each partition manually, but that didn't help.
Click to expand...
Click to collapse
Uh, if you can't figure out how, how did you manage to delete one?
Methinks you should have at least written down the details from the removed partitions before you removed them
It just seems sane.
I'm sorry to sound harsh, but, what were you thinking? It's a few megabytes that you risked the usability of your phone for.
That said, I think only recreating them yourself would fix it properly - possibly given the partition map of another Incredible (heck, maybe just dumping the first 512 bytes of the emmc device, assuming it's MBR, from a working incredible and having you patch that in would fix it.).
Yea what were you thinking, you don't just delete partitions randomly >.

[Howto] mount any directories from extSdCard to under /sdcard/

So I found a million threads asking about why they can't ln -s or mount the /mnt/extSdCard to /mnt/sdcard or various forms of that. The motivation here is to allow certain apps that can't get about /sdcard/ to be able to see the additional 64GB of SDHC.
What helped was this realization that the android mount command supports bind and one of a few dozen other threads, mostly this one:
http://forum.xda-developers.com/showthread.php?t=1825494
So it appears there are a half dozen ways to make mounts, from using /dev/block/vold/179:97 to using the vold.fstab which mentions a serial or parallel sdcard scheme, which they chose parallel, to all these init.rc monitoring scripts that have to unmount on USB mode, and crazy stuff and a million Directory Bind apps, and int2SD binder / linker apps. It appears this app might do what I am suggesting but I don't think /emmc/ works anymore and I haven't looked into the .apk.
Ok....
1) ODIN over a root injected stock ROM, or otherwise get root.
2) (A) Get yourself any Terminal program like Terminal Emulator and if you are smart you will also get Hacker's Keyboard.
or
2) (B) From any of the programs that will run scripts, you can just make a script.
3)
Code:
$ su -
# mkdir /mnt/sdcard/external
# mount -o bind /mnt/extSdCard /mnt/sdcard/external
Now you can name it whatever you want but since the home is /sdcard/ it has to be under that.
Or, instead of mounting the whole thing, just mount Movies and Music directory
Code:
# mkdir /mnt/sdcard/Music/extMusic
# mount -o bind /mnt/extSdCard/Music /mnt/sdcard/Music/extMusic
Etc.
Now for those wanting to make a script or app to sell for $1.99... There may be real problems depending on where a backup program chooses to backup and it could be recursive.
And just FYI, this ends up inheriting all the same properties from the extSdCard mount params,
ie. /dev/block/vold/179:97 /mnt/sdcard/Music/extMusic vfat rw,dirsync,nosuid,nodev,noexec,relatime,uid=1000,gid=1023,fmask=0002,dmask=0002,allow_utime=0020,codepage=cp437,iocharset=iso8859-1,shortname=mixed,utf8,errors=remount-ro 0 0
Any mounted directory all look identical in mount and the vold must map them out.
Anyways you can write a simple script and hopefully you are mindful of any backups you do if you save backups to the external sdcard and you mount the entire thing. The safest way would be to mount one directory to transfer files or only mount the large media.
It also means you could copy everything from /sdcard/Music to the external and then mount /sdcard/Music to be a directory on the external card. You could remove the ext SDHC and copy files that way and have everything in one place and not worry about wiping it out.
However, I have benchmarked the internal SD appears to be faster on bandwidth benchmarks versus an external Class 10/UHS. On the stock rom the internal is also fuse versus fat32 for the external SDHC (or exFAT for a SDXC card). There is also something in the SD2.0 spec about the 2nd SD only one can have a higher clock bandwidth.
Types in step 3 exactly. But nothing happened
Sent from my SGH-T999 using xda app-developers app
fateownzyou3 said:
Types in step 3 exactly. But nothing happened
Click to expand...
Click to collapse
Did you get an error? There is no output of mount unless there is an error.. Did you look in a file browser to see if that folder is now mounted? This only works until reboot, until someone makes an app or script.
Hi,
@joederp thank you very much ! Your tip in so usefull to me with my galaxy note on CM10 ParanoidAndroid ROM.
The only thing I try now to get work is : automaticaly run the script at phone boot. I'm pretty sure I can get it with Tasker, but did not find the trick.
Just use the directory bind app... It works fine on my galaxy tab 2 7.0
Sent from my SGH-T999 using xda premium
Directory bind is a whole different thing that uses CPU and monitors the system and does who knows what.
You can just use any scripting program or I think edit init.rc and add the extra mount commands. copy init.rc to a .bak and edit it.
Thank to all of you !
I found something more appropriate to my needs in this thread : http://forum.xda-developers.com/showthread.php?t=1593615
Anyway thanks

[How-to] Using an ext4 formated SD card.

Update: I've since made a flashable zip that automatically creates a modified sdcard1 binary and extracts an init.d script to handle it all. Will make a thread in a more general location as this could be used on many TouchWiz devices. Link.
Hello everyone,
The mailman brought me a new 64GB microSD card this morning, and I wanted to try formatting it in ext4 instead of exFAT. Both for the heck of it and in case I wanted to give AOSP ROMs a try down the road.
The usual caveats apply.
Required:
init.d support
a mounting script
a mounting updater-script for custom recoveries.
You can get init.d support with the stock kernel on many devices by having the run-parts command launch from a custom install-recovery.sh script. See the following thread for files and a how-to:
[MOD]Term-init & Zip-init: Enable Init.d for Any Phones w/o Need of Custom Kernels!!!
SD card removal:
Should you need to remove the card it can be unmounted and safely removed from the storage settings as usual. Mounting it again requires either a reboot or manually executing the mount command and then activating the card in the storage settings.
Mounting script:
Make sure you have proper line endings, file name (e.g. 95mountsdext4) and permissions set.
Code:
#!/system/bin/sh
# Mount SD Card Ext4 Script
mount -rw -t ext4 /dev/block/mmcblk1p1 /storage/extSdCard
Mounting in CWM/TWRP:
The other piece in this is the attached zip file, which simply runs the appropriate mount command for Clockworkmod Recovery. Unmount as usual. This way you can also store nandroid backups and other update zips on the external as well.
Technical considerations:
The mounting occurs early enough during the boot process that the media scanner and MTP services have no issues with this.
There may be are some permissions related glitches to look out for, but it hasn't been an issue for me so far. (One possible fix would be a recursive chmod/chown added to the mounting script.)
Update: The camera app saves the photos properly to the SD card, but leaves them with improper permissions which prevent subsequent viewing or editing again until you chmod the files. To be continued...
If your init.d support comes from the install-recovery.sh trick, CWM will prompt to delete the script before reboot. Don't.
If the mounting script doesn't run for some reason, or you try to activate the card before having mounted it manually, the phone will give an error and ask if you want to format the card. Don't.
Enjoy,
Darkshado
I have been looking for a way to do this for a long time for numerous reasons (symlinks, >4GB file size, linux-only environment, etc.). I'll be giving this a try very soon.
Thanks for sharing!
EDIT: Just wanted to add that I think it's ridiculous Android doesn't support this natively.
The permissions issues are frustrating. I can take photos and store them on the card, but the umask for JB has been set as 077, in other words, rwx------ permissions, and ownership by the application's user.
I tried different arguments for the mount command to try and force permissions and ownership one way or another with no luck so far. Ironically, an NTFS formatted card might work better in this respect.
A similar mod had been made on the Nexus S and one of the posters resorted to an apk that regularly ran chmod -R 0777 on new files, I tried using it but it just hung there and did nothing on the Note II.
Another possibility would be using FUSE, although I'm not sure how to go about doing this yet.
Also, I pondered the possibility of using UDF instead of ext4, it is a standardized format and just about every major OS out there supports it too...
Any updates? Is it working already or...?
Despite all the good of Android, Google/carriers, whoever, not including ext2/3/4 support natively is just a slap in the face. Good to see someone working to right a wrong that subjugating software has done.
You should NOT be doing this. The Android hardware requirements clearly state that all shared storage directories must be case insensitive and must not have permissions. FAT32 is the only supported filesystem which meets these requirements. Mounting an EXT filesystem directly will break applications.
The newer versions of Android come with an "sdcard" utility which uses a FUSE driver to wrap a native EXT filesystem and exposes a pseudo filesystem which is case insensitive and is without permissions. You should mount the EXT SD card at a different location (/dev/fuse) and use the "sdcard" utility to emulate it at /storage/whatever. You can see the command line syntax of the "sdcard" utility in the source code.
CM10.1 does this automatically. https://github.com/CyanogenMod/android_system_core/tree/cm-10.1/sdcard
KurianOfBorg said:
You should NOT be doing this. The Android hardware requirements clearly state that all shared storage directories must be case insensitive and must not have permissions. FAT32 is the only supported filesystem which meets these requirements. Mounting an EXT filesystem directly will break applications.
The newer versions of Android come with an "sdcard" utility which uses a FUSE driver to wrap a native EXT filesystem and exposes a pseudo filesystem which is case insensitive and is without permissions. You should mount the EXT SD card at a different location (/dev/fuse) and use the "sdcard" utility to emulate it at /storage/whatever. You can see the command line syntax of the "sdcard" utility in the source code.
CM10.1 does this automatically. https://github.com/CyanogenMod/android_system_core/tree/cm-10.1/sdcard
Click to expand...
Click to collapse
Again, Android not natively supporting ext4 is a slap in the face. Usability over technical merit disgusts me.
muqali said:
Again, Android not natively supporting ext4 is a slap in the face. Usability over technical merit disgusts me.
Click to expand...
Click to collapse
It does support EXT4! Officially. All Google ROMs and AOSP can mount EXT4 partitions as /storage/*. The correct way to mount it is to use the command "sdcard" not "mount". I'm pretty sure any AOSP ROM will automatically mount an EXT4 SD card using the "sdcard" command just like Cyanogenmod does.
Thanks for the info. I'll look into this soon-ish, once my exams are over.
Sent from my SGH-T889V using xda app-developers app
KurianOfBorg said:
It does support EXT4! Officially. All Google ROMs and AOSP can mount EXT4 partitions as /storage/*. The correct way to mount it is to use the command "sdcard" not "mount". I'm pretty sure any AOSP ROM will automatically mount an EXT4 SD card using the "sdcard" command just like Cyanogenmod does.
Click to expand...
Click to collapse
It's still a second class citizen to a xFATx filesystem.
muqali said:
It's still a second class citizen to a xFATx filesystem.
Click to expand...
Click to collapse
No it's fully supported by AOSP exactly the same as FAT on AOSP and exFAT/NTFS on Samsung ROMs. It's the manufacturer's fault for REMOVING support from their ROM. When you insert an EXT SD card on AOSP, it gets mounted at /storage/* just like any other SD card.
In my N7100 with CM 10.1, ext4 has stopped working for my 32gb SDCard on 05-01-2013 nightly, even after reformatting, going back to stock, then reinstalling CM 10.1. I also noticed that my ext4 formatted 8GB SdCard still works, however, so I am not sure if it's a storage size issue in my case (32gb vs 8gb). I am trying a hybrid of 8mb fat32 / 28.*gb ext4 to see if that will work.
KurianOfBorg said:
No it's fully supported by AOSP exactly the same as FAT on AOSP and exFAT/NTFS on Samsung ROMs. It's the manufacturer's fault for REMOVING support from their ROM. When you insert an EXT SD card on AOSP, it gets mounted at /storage/* just like any other SD card.
Click to expand...
Click to collapse
clearday said:
In my N7100 with CM 10.1, ext4 has stopped working for my 32gb SDCard on 05-01-2013 nightly, even after reformatting, going back to stock, then reinstalling CM 10.1. I also noticed that my ext4 formatted 8GB SdCard still works, however, so I am not sure if it's a storage size issue in my case (32gb vs 8gb). I am trying a hybrid of 8mb fat32 / 28.*gb ext4 to see if that will work.
Click to expand...
Click to collapse
Is it formatted properly as ext4? Using mke2fs or (tune2fs to convert to ext4). All ROMs only mount the first partition on the SD card regardless of the file system. Sometime after mounting USB Mass Storage an the SD card doesn't remount properly so you need to reboot the device. You'll most probably want to use MTP with ext4 anyway.
KurianOfBorg said:
Is it formatted properly as ext4? Using mke2fs or (tune2fs to convert to ext4). All ROMs only mount the first partition on the SD card regardless of the file system. Sometime after mounting USB Mass Storage an the SD card doesn't remount properly so you need to reboot the device. You'll most probably want to use MTP with ext4 anyway.
Click to expand...
Click to collapse
Finally fixed the problem by running this command in ROM Toolbox Lite:
"find /storage/sdcard1/ -print0 | xargs -0 chown root:media_rw"
http://forum.xda-developers.com/showthread.php?p=38182488#post38182488
clearday said:
Finally fixed the problem by running this command in ROM Toolbox Lite:
"find /storage/sdcard1/ -print0 | xargs -0 chown root:media_rw"
http://forum.xda-developers.com/showthread.php?p=38182488#post38182488
Click to expand...
Click to collapse
Then it's not mounted properly! Your ext4 SD card has directly been mounted at /storage/* instead of through the FUSE driver. You should NOT be able to see permissions when it's mounted at /storage/*. The physical partition should be mounted at /dev/fuse. Reboot the device and check again whether permissions are visible at /storage/*.
KurianOfBorg said:
Then it's not mounted properly! Your ext4 SD card has directly been mounted at /storage/* instead of through the FUSE driver. You should NOT be able to see permissions when it's mounted at /storage/*. The physical partition should be mounted at /dev/fuse. Reboot the device and check again whether permissions are visible at /storage/*.
Click to expand...
Click to collapse
It's still visible at storage
How do I fix it?
clearday said:
It's still visible at storage
How do I fix it?
Click to expand...
Click to collapse
It should show up at /storege/* but that should be the FUSE driver's mount point with permissions stripped away. The real ext4 partition will be at /dev/fuse.
Any further progress?
I want to use symlinks and ext4 on my note 2 also.
On aosp roms just use the sdcard binary with an initd script.
Gesendet von meinem GT-N7105 mit Tapatalk 2
DerTeufel1980 said:
On aosp roms just use the sdcard binary with an initd script.
Click to expand...
Click to collapse
I'm trying to do this on Tweaked. There is an sdcard binary, however, it appears to be modified by Samsung as it's hardcoded to mount to /storage/sdcard0 and overrides the internal sdcard mount when I use it. It doesn't take a destination parameter like the AOSP/CM version does.
If anyone has an AOSP/CM build environment, could I trouble you for a statically linked version of the sdcard binary? I downloaded CM10.2-nightly, but it's dynamically linked and, of course, doesn't work on the stock based ROMs.
EDIT
It might still be nice, but I figured out a way around it. I hex edited the sdcard binary from the Note2 to use /storage/sdcard1. Then in the mount script, bind mounted it over to /storage/extSdCard. I've rebooted a few times and it seems to be working fine. I am copying data to it over MTP right now. I've attached a zip of the files I'm using.
NOTE: THIS IS NOT A FLASHABLE ZIP.
I might make one later, but this kind of needs to be a manual process anyway.
put the sdcard1 file in /system/xbin
chmod 755 /system/xbin/sdcard1
put the script file in /etc/init.d
set permissions/ownership on it
Now, if you have an ext4 formatted SD, and it's not mounted, you should be able to run the script and have it mount it, run the sdcard1 binary on it, and bind mount it over to the normal extSdCard spot. It will happen at boot if you got it all right.
There are probably improvements that can be made, my shell scripting is a bit rusty. Hopefully this will get people interested in it again, now that the permissions issues are resolved.

apps to sd card(galaxy S3 mini)

Hi,
How can i put in my Samsung Galaxy S3 mini(android 4.1.2) my apps, to sd card. Step by step pls, if you Know.
Thanks.
kdidie said:
Hi,
How can i put in my Samsung Galaxy S3 mini(android 4.1.2) my apps, to sd card. Step by step pls, if you Know.
Thanks.
Click to expand...
Click to collapse
Also, I need to know how to put my apps to SD Card.
If you found a method please tell me
Link2sd
Sent from the dark side on my GT-I8190
I installed link2sd but when I try to move the app to sd card show me this error.
Sent from my GT-I8190 using xda premium
Follow this guide here http://forum.xda-developers.com/showthread.php?t=2087497
Don't move the apps to sd, just create a 'link'.
You need init.d support and a properly partitioned sd card. This guide will show you how.
Sent from the dark side on my GT-I8190
iKlutz said:
Follow this guide here http://forum.xda-developers.com/showthread.php?t=2087497
Don't move the apps to sd, just create a 'link'.
You need init.d support and a properly partitioned sd card. This guide will show you how.
Sent from the dark side on my GT-I8190
Click to expand...
Click to collapse
Thanks very much for the guide.
Here is an easy method to enable init.d support with an app [http://forum.xda-developers.com/showthread.php?t=1933849]
eduardd- said:
I installed link2sd but when I try to move the app to sd card show me this error.
Sent from my GT-I8190 using xda premium
Click to expand...
Click to collapse
I had the same problem with my S3 Mini, what i did is 1.Install Link2SD. wich created a mount script for the second partition to be mounted to /data/sdext2 at boottime
and then i also got the INSUFFICIENT SPACE error when i tried to move. so i looked for the init.d script at /etc/init.d/ its called link2sd or someting like that and then 2. i manually changed that script to include "mount -o bind" commands so i could link manually my copied data maps on the second partition to the 'local' /sdcard/Android/data or ../obb
it worked but you have to remount the /etc directory to get write acces to be able to change the init scripts and also you are depending on a kernel wich supports init.d scripts.
took me a few days to figure it out but i just got my first android since 2 weeks and only have some linux/unix experience so i get the commands.
dhscholtus said:
I had the same problem with my S3 Mini, what i did is 1.Install Link2SD. wich created a mount script for the second partition to be mounted to /data/sdext2 at boottime
and then i also got the INSUFFICIENT SPACE error when i tried to move. so i looked for the init.d script at /etc/init.d/ its called link2sd or someting like that and then 2. i manually changed that script to include "mount -o bind" commands so i could link manually my copied data maps on the second partition to the 'local' /sdcard/Android/data or ../obb
it worked but you have to remount the /etc directory to get write acces to be able to change the init scripts and also you are depending on a kernel wich supports init.d scripts.
took me a few days to figure it out but i just got my first android since 2 weeks and only have some linux/unix experience so i get the commands.
Click to expand...
Click to collapse
Can you explain better wnat you changed in that file, please?
I menage to find it after all... now i don't know what to change...
THX
#!/system/bin/sh
#added by link2sd
LOG=/data/link2sd-11link2sd.log
echo "$(date) mounting..." > $LOG
mount -t vfat -o rw /dev/block/vold/179:98 /data/sdext2 1>>$LOG 2>>$LOG
mount -t vfat -o rw /dev/block/mmcblk1p2 /data/sdext2 1>>$LOG 2>>$LOG
mount >> $LOG
echo "$(date) mount finished" >> $LOG
i found one thing...
after root the phone, use "GL to SD"
it will move the games data to sd card, but apps not able...
use directory bind to move data games
maulana98 said:
use directory bind to move data games
Click to expand...
Click to collapse
How , can you explain please
I got a Samsung S3 Mini from AT&T the other day and I can install apps to sd card with the stock rom! here are my phone specs:
Model number: Sumsung-SM-G730A
Android version:
4.2.2
Baseband version:
G730AUCUAMH4
Kernel Version:
3.4.0-1299773
[email protected] #1
Wed Aug 21 13:15:42 KST 2013
Build version:
JDQ39.G730AUCUAMH4
Hi
I use this program and it works very good https://play.google.com/store/apps/details?id=com.slf.ListglApp
1. Install
2. options/move data
3. Select apps to move
4. start, it will work,
5. each time you wanna play or run any app only select mount (the chain in the right side), if you wanna move more apps select unmount and move data again, and that's all.
gafer said:
How , can you explain please
Click to expand...
Click to collapse
Go to: [TOOL] DirectoryBind - move data to external_sd (GameLoft, Shadowgun etc.) ROOT req.
Hey guys,
I think I've tried everything but it doesn't look like this is possible to do.
I tried to do it on an un-rooted I9300 4.1.2 with TouchWiz and had no success.
Now I'm using CM 10.2 and I still I'm trying to find something useful. And again with no success.
iKlutz said:
Follow this guide here http://forum.xda-developers.com/showthread.php?t=2087497
Don't move the apps to sd, just create a 'link'.
You need init.d support and a properly partitioned sd card. This guide will show you how.
Sent from the dark side on my GT-I8190
Click to expand...
Click to collapse
Thanks, it helped me a lot

[Q] Moving apps to SD card android 4.3->

So what I have gathered is that this phone even with root/cmod/titanium backup doesn't allow me to move apps to my _real_ sdcard. So is it really phone related or is there a way to do it with custom rom/kernel or some other way?
leripe said:
So what I have gathered is that this phone even with root/cmod/titanium backup doesn't allow me to move apps to my _real_ sdcard. So is it really phone related or is there a way to do it with custom rom/kernel or some other way?
Click to expand...
Click to collapse
on stock android 4.2 u could actually use app2sd to move some apps to external storage
using Cyanogenmode 4.3 based Carbon MOD i found that i no longer can do that, tried app2sd and link2sd
i read somewhere that external storage is defined in system PATH variables, dont know how relevant that is but seems connected
but i honestly dont know yet much about the android platform to fix this issue myself, so i might be wrong
we need some pro tip help
Would be very interesting to habe feature. Especially for phones with only 8 GB internal flash. Hope this will come for my s4 Mini. Samsung has this implemented in their stock Rom.
Gesendet von meinem GT-I9195 mit Tapatalk
tesme33 said:
Would be very interesting to habe feature. Especially for phones with only 8 GB internal flash. Hope this will come for my s4 Mini. Samsung has this implemented in their stock Rom.
Gesendet von meinem GT-I9195 mit Tapatalk
Click to expand...
Click to collapse
Yes this would be awesome, but seems that cmod has gone moneymaking company and tries to make cmod to google standards which means they have been starting to remove/hiding features. Their goal now is to make installing cmod without cwm and to remove root or have it as optional feature. Or all this is what I gathered over the net, but I still hope some other custom rom could have this feature.
Edit:
All of the above may not be like that nowadays, and this is somewhat speculation since there hasn't(?) been an official statement from cm about app2sd support. Though emulated sdcard may require something different.
(edited 19.2.2014)
Moving apps to external card.
leripe said:
Yes this would be awesome, but seems that cmod has gone moneymaking company and tries to make cmod to google standards which means they have been starting to remove/hiding features. Their goal now is to make installing cmod without cmw and to remove root or have it as optional feature. Or all this is what I gathered over the net, but I still hope some other custom rom could have this feature. This feature may only need one to repartition the sdcard, but I can't get it to mount as mass storage nor with sdcard reader(it shows "empty" card) in windows(maybe i should try it in linux).
Click to expand...
Click to collapse
About two months ago I upgraded my Xoom to JB 4.2.2, and because space was limited, I hadn't noticed whether I could move operating programs to the external card or not. This was a custom rom. Well, I was using a 32 Gig card that was nearly full of data.
This last week, I invested in a 64 Gig sdhc card and upgraded my rom to Kit-Kat 4.4.2. Thus its also a custom rom, but now I find that though, for the most part, I can designate the external card to store and access data from, I can't run programs from it. Hmm!
Here I am with all this memory. Sure wish I had better management options.
Kingsman1 said:
About two months ago I upgraded my Xoom to JB 4.2.2, and because space was limited, I hadn't noticed whether I could move operating programs to the external card or not. This was a custom rom. Well, I was using a 32 Gig card that was nearly full of data.
This last week, I invested in a 64 Gig sdhc card and upgraded my rom to Kit-Kat 4.4.2. Thus its also a custom rom, but now I find that though, for the most part, I can designate the external card to store and access data from, I can't run programs from it. Hmm!
Here I am with all this memory. Sure wish I had better management options.
Click to expand...
Click to collapse
Well check my thread on my signature and the requests section in the 1st post for more info on about app2sd.
Resolve the issue
Hi all,,,
This is my first time in XDA. Someone fixed this bug for me. You need to be rooted to fix this issue. Install from market Terminal Emulator and type the following commands
su
/system/bin/restorecon -R -v /data/media/
dlightx said:
Hi all,,,
This is my first time in XDA. Someone fixed this bug for me. You need to be rooted to fix this issue. Install from market Terminal Emulator and type the following commands
su
/system/bin/restorecon -R -v /data/media/
Click to expand...
Click to collapse
Can I check with you what bug this fixes?
Ability to use app2sd?
I use FolderMount and works real well. No need to partitioning sd card.
I've gotten to getting Link2SD working on the GT-I9195 with nightly 20140402 KitKat.
Based loosely on [Tutorial/HOWTO] Convert Your External SD Card from FAT/exFAT to EXT4! (3 ways!)
1. Clear everything out of your external SD card. We're gonna be formatting it so you'll have to backup your data.
2. Boot up into recovery and have a working ADB environment setup on your computer
3. adb shell (Do NOT mount your /storage/sdcard1)
5. Check that you have fdisk and mke2fs installed (Type fdisk --help and mke2fs --help ensure they don't throw up errors)
6. fdisk /dev/block/mmcblk1
7. Type o and Enter to destroy the partition table
8. Type n to create a new partition. Make sure its Primary (p). Select first partition and choose how many cylinders you want to allocate to it.
9. Type n to create your second partition. Again, make sure its Primary (p). Leave cylinder allocation blank to use remainder of space by default.
10. Verify partition layout by typing p to show partition layout.
11. Exit fdisk and save changes by typing w
12. mke2fs -t ext4 /dev/block/mmcblk1p1
13. mke2fs -t ext4 /dev/block/mmcblk1p2
14. reboot
15. Once CM has booted up, check if your external storage partition 1 has been mounted. It should be mounted at /mnt/media_rw/sdcard1
16. Try creating a folder in /mnt/media_rw/sdcard1 and /storage/sdcard1 to test if your read/write permissions are correct.
17. Install DiskInfo from playstore to check if your second partition is visible
18. Once done, install Link2SD and select ext4 when prompted to ask what kind of filesystem your 2nd partition is.
19. Reboot after Link2SD installs scripts.
20. Voila!
Let me know if there are any issues. I modified several files while doing this so not sure if any of them affected.
Should #16 not work, try:
1. Going to /system/etc/permissions/platform.xml and adding media_rw group to the element that only has sdcard_r group in it.
2. Typing mount in Terminal Emulator (su) or adb shell and see whether your partitions are mounted. If you're not sure, post the output out here.
Final mount output (filtered with mmcblk1 or sdcard stuff):
Code:
/dev/block/mmcblk1p2 /data/sdext2 ext4 rw,seclabel,relatime,data=ordered 0 0
/dev/fuse /mnt/shell/emulated fuse rw,nosuid,nodev,relatime,user_id=1023,group_i
d=1023,default_permissions,allow_other 0 0
/dev/block/vold/179:33 /mnt/media_rw/sdcard1 ext4 rw,dirsync,context=u:object_r:
sdcard_external:s0,nosuid,nodev,noexec,noatime,data=ordered 0 0
/dev/fuse /storage/sdcard1 fuse rw,nosuid,nodev,relatime,user_id=1023,group_id=1
023,default_permissions,allow_other 0 0
EDIT 2: *** IMPORTANT!! Do NOT select External in the App2SD option in Link2SD. Otherwise you will not be able to install any apps from the Play Store (Insufficient Storage error)
I use GL to SD on my Slimrom: https://play.google.com/store/apps/details?id=com.slf.ListglApp
It may not have fancy UI like FolderMount or Link2SD, and it slight complex to use. But it works on per app basis, without re-partition too.
Hi leripe !
I have got the same device and ROM like you and i would like to know if you have found a solution to move apps to the sdcard ?
Thank you in advance, regards.
Oijkn said:
Hi leripe !
I have got the same device and ROM like you and i would like to know if you have found a solution to move apps to the sdcard ?
Thank you in advance, regards.
Click to expand...
Click to collapse
If it non system apps, you can use GL to SD as I provide the link already above. It works.
TNCS said:
If it non system apps, you can use GL to SD as I provide the link already above. It works.
Click to expand...
Click to collapse
Hi, i tried your link but this tool don't show all my user app so i can't move them... Have you another tool that can do the job please?
Oijkn said:
Hi, i tried your link but this tool don't show all my user app so i can't move them... Have you another tool that can do the job please?
Click to expand...
Click to collapse
Nope, sorry. I tried this tool and it work so never bother to look for another one.
If GL to SD doesn't have the app you want to move, you can manually link the app and the relevant folder at GL to SD settings. After you linked them, at the main page of apps you can tell it to start to move.
This thread shows up on google for me when trying to figure out why minitool partition wizard doesn't detect my phone at all. The guide I'm following says USB-SDcard reader is required but is that really true?? Surely there is a way to mount the SDcard at a low enough level to partition it without addition hardware?? Even if I have to mount it using TWRP recovery or something I would think it's possible. Anyone know?

Categories

Resources