[Q] Samsung Galaxy S4 memory swap internal with SD card - Galaxy S 4 Q&A, Help & Troubleshooting

Hey there have been many videos and tutorials about swapping internal memory of S3, I wanted to ask if anyone could come up with a similar procedure for S4 as its internal memory is lower than what we got on S3 16gb version.

Ahmed1234568 said:
Hey there have been many videos and tutorials about swapping internal memory of S3, I wanted to ask if anyone could come up with a similar procedure for S4 as its internal memory is lower than what we got on S3 16gb version.
Click to expand...
Click to collapse
im after the same problem. i tried to create a script for it, but it only works if i run it from adb. running from Scriptmanager or similar does not work. script executes as normal, but no changes.
Code:
cd /
mount / -o remount,rw
umount /storage/extSdCard/
mount -t vfat -o umask=0000 /dev/block/vold/179\:9 /storage/sdcard0/
mount / -o remount,ro
also, i tried to use the external 2 internal sd card app from the market that is used for the s3, but after customisation (/dev/block/vold/179:9) it does not work.

Any update about working of scripts?

monalac said:
Any update about working of scripts?
Click to expand...
Click to collapse
Anyone tried this yet? http://forum.xda-developers.com/showthread.php?t=1857391&page=1

Does anyone konw if you can use this line in CM10.1 Galaxy W Build.prop
# Change to 0 to use internal SD memory 1.7 GB,default is 1 for external SD Card.
persist.sys.vold.switchexternal=1

please help , I need it urgently to change my s4 memory to external Sd

Anyone figured it out yet?
Have you tried running the script from init.d ?

I am also looking for my S4 to swap internal memory with sd card. Hope you continue your exploration on this w/ your phone. thx.

raw235 said:
im after the same problem. i tried to create a script for it, but it only works if i run it from adb. running from Scriptmanager or similar does not work. script executes as normal, but no changes.
Code:
cd /
mount / -o remount,rw
umount /storage/extSdCard/
mount -t vfat -o umask=0000 /dev/block/vold/179\:9 /storage/sdcard0/
mount / -o remount,ro
also, i tried to use the external 2 internal sd card app from the market that is used for the s3, but after customisation (/dev/block/vold/179:9) it does not work.
Click to expand...
Click to collapse
Hi!
What kernel do you use?
It only works with init.d support.
I am still trying...
Greetings,
Medizinmann
Gesendet von meinem GT-I9505 mit Tapatalk 2

i am curious so wait i have a SanDisk Ultra 64GB in front of me bought for the purpose to be the internal SD and i would like to know EXACTLY how to switch them and make it permanent if possible, so that i at every boot i wont have to do anything

Hi!
I tried this one...
(MOD)swap sdcard for Samsung s4
...it seems to work, but only with help of these to apps:
Init.d Toggler
Universal Init.d
I know it doesn't make much sense to run both, but this works for me...
Using Omega ROM V9.0 and KT-kernel
It should also work also with a kernel with init.d support, but I like KT.
Downside - you have to deactivate init.d support or the script to gain access to the internal SD-card again and you cannot realy use the internal card anymore.
So its not perfect - I am still looking for the real change - but all other scripts I found didn't work.
Greetings,
Medizinmann

Hello Medizinmann,
Do you know if the (MOD)swap sdcard for Samsung s4 also works with the samsung s4 active?

Please help
Please help sir i swapped my internal memory to external memory using swapsd application when i restart my phone it does not show internal nor external memory please help me i also reset it from setting.
i m using galaxy S4 clone

Working Swap Mod for S4
For all of you that want a working Memory Swap for S4 TW here you go: Link

Related

[Q] possible swap on internal memory?

hi i was looking for this script because the swap on sd will kill the sd with the pass of the time, then i ask to me, maybe on internal memory?
then i found this thread
http://madteam.co/forum/tutorials/updated-v2-swap-in-internal-memory/
is a script to create a swap file on internal memory to run from init.d
su
mount -o remount,rw /dev/block/stl12 /system
cp /sdcard/internal_swap.txt /system/etc/init.d/internal_swap
chmod 750 /system/etc/init.d/internal_swap
Click to expand...
Click to collapse
i don't try it yet , i want to know if this works on defy and if this script damage internal memory like does on sd
thanks!
Questions go in the Q&A section
Sorry to bump this thread, but just wanted to tell everyone reading this that NO, IT IS NOT POSSIBLE TO USE A SWAP PARTITION IN OUR DEFY'S. You can check the original thread here: http://forum.xda-developers.com/showthread.php?t=1505138. It is not supported by the kernel.
BTW, the script will also not work because you have to change /stl12 for /mmnblk1p21.
Plus, if swapping damages the sdcard, it also damages internal memory, which would be worse, right?
Anyway... Why do you want to swap? Too less RAM? It won't make your phone faster.

[Q] About custom roms and storage

Hey GT540 users!
I tryed many roms so far, for example utopia, aokp 4.0.4, project icecreamswift, some 2.3.7 roms which i dont remember the developers and etc. On every single custom rom i realise that i have space probs. I install around 15 apps and my device runs out of storage (or space) really really fast.
Please can you suggest some ideas about this problem? I allready made an ext3 partition on my sd card and really really care to use it smarter and wiser. I tryed link2sd but seems it crash a lot and all my apps are really messed up. If again ext3 is not needed, thats fine. i really need some suggestions.
Is anything i can do without an application? If not, do u mind suggest me some application please that works 100%?
Anything you want to ask im here.
Thanx in advance!!!
For 2.2 and 2.3 roms just use this, http://forum.xda-developers.com/showthread.php?t=1171531
i really really dont think thats a good idea... i really prefer i simple way than this...
manthos1978 said:
Hey GT540 users!
I tryed many roms so far, for example utopia, aokp 4.0.4, project icecreamswift, some 2.3.7 roms which i dont remember the developers and etc. On every single custom rom i realise that i have space probs. I install around 15 apps and my device runs out of storage (or space) really really fast.
Please can you suggest some ideas about this problem? I allready made an ext3 partition on my sd card and really really care to use it smarter and wiser. I tryed link2sd but seems it crash a lot and all my apps are really messed up. If again ext3 is not needed, thats fine. i really need some suggestions.
Is anything i can do without an application? If not, do u mind suggest me some application please that works 100%?
Anything you want to ask im here.
Thanx in advance!!!
Click to expand...
Click to collapse
I use link2sd without any issues - try an ext2 partition
Also, try the link -Grift- posted. That is actually quite easy, all you do is boot into fastboot, connect to PC, run a program, click some buttons DONE!
If you don't want to do any of these, then you are a bit stuck, sorry to say!
ok thanx for your info!
will try make an ext2 1st and retry link2sd, if not changing partiotion is my last hope
ok i installed link2sd and this time seems it works fine... well.. so far
the only problem i got, when i reboot the phone, the application link2sd requires a 2nd restart (soft one) because cant mount the apps. Is this ok or done again something wrong?
Cheers
manthos1978 said:
ok i installed link2sd and this time seems it works fine... well.. so far
the only problem i got, when i reboot the phone, the application link2sd requires a 2nd restart (soft one) because cant mount the apps. Is this ok or done again something wrong?
Cheers
Click to expand...
Click to collapse
I have the same problem too. link2sd cannot automount the 2nd partition at boot so each time I have to reboot the phone I must reboot it 2 more times to get link2sd mount the 2nd partition correctly. How can I solve this problem
no1 intrested to help us?
In Link2SD, Press the menu button, then select 'More'. Select Recreate mount script. Choose your ext partition type, then ok. Reboot your phone. If it still asks you to remount, try these command on Terminal:
Code:
mount -rw -t ext2 -o remount /dev/block/vold/179:2 /data/sdext2
then
Code:
mount -rw -t ext2 -o remount /dev/block/mmmcblk0p2 /sd-ext
If it's not an ext2 partition, change the 'ext2' in the command with what your ext partition is.
Did you use the Android "Move to USB storage" or "Move to SD card" idk function? on android 2.2 and above?
You don't need to repartition your SD card for it
I would suggest to use Apps2ROM app. This is an application that has the ability to move normal (user) application into the ROM and use them as system apps. Th application can also uninstall system apps.
So, first you can get rid of system applications that you do not use and you utilize also the available system memory. Be careful not to go under 20 MB of the system mem.
You need root access to do so and some care not to uninstall essential system apps for the stability of the Operating system.
Sent from my LG GT540 using XDA
jhonnyx1000 said:
In Link2SD, Press the menu button, then select 'More'. Select Recreate mount script. Choose your ext partition type, then ok. Reboot your phone. If it still asks you to remount, try these command on Terminal:
Code:
mount -rw -t ext2 -o remount /dev/block/vold/179:2 /data/sdext2
then
Code:
mount -rw -t ext2 -o remount /dev/block/mmmcblk0p2 /sd-ext
If it's not an ext2 partition, change the 'ext2' in the command with what your ext partition is.
Click to expand...
Click to collapse
When i type the 1st code, the terminal is keep question me if im root....
To be exact it says:
Code:
mount: permission denied (are you root?)
Any solutions?
ahh type
su
first
the start of the line should change from
$
to a
#
jhonnyx1000 said:
In Link2SD, Press the menu button, then select 'More'. Select Recreate mount script. Choose your ext partition type, then ok. Reboot your phone. If it still asks you to remount, try these command on Terminal:
Code:
mount -rw -t ext2 -o remount /dev/block/vold/179:2 /data/sdext2
then
Code:
mount -rw -t ext2 -o remount /dev/block/mmmcblk0p2 /sd-ext
If it's not an ext2 partition, change the 'ext2' in the command with what your ext partition is.
Click to expand...
Click to collapse
I guess the 1st code is fine, no errors on my phone, but when i type the 2nd code, i get this message:
Code:
mount: mounting /dev/block/mmmcblk0p2 on /sd-ext failed: Invalid argument
So... what have i done wrong now?

Format & Use MicroSD W/ ext4?

Hey guys, for a couple reasons I'd like to be able to format my micro SD card with the ext4 file system.
I can format my card using a computer running Ubuntu, but the card will not mount.
I'm running CM10 on my P3113.
Is there any simple way to do this?
It seems like it'd be best to use vold to mount the sdcard, but that doesn't support ext4 I guess?
Just wondering...
Ext4 support has to come from kernel.
???
Literally every other mounted filesystem on the CM10 ROM I use is ext4...
I'm gonna try mounting via an init.d script.
We'll see if that works...
Solved this one, it was easier than I expected.
You need to format the card, and then mount it at boot via a script.
CM9 and 10 support init.d scripts, so I have a script file at /system/etc/init.d/95sdcardext4
with this contents:
Code:
#!/system/xbin/sh
# Mount SD Card Ext4 Script
mount -rw -t ext4 /dev/block/mmcblk1p1 /storage/sdcard1
This runs very early in the boot up process, and ext4 partitions mount basically instantly, so everything is working as expected so far.
More tests need to be done, but I'm fairly certain I can package this up in a flashable ZIP package.
Brilliant !
ext4 is anyways far better than fat32 except Windows/Mac compatibility.
Awaiting your stable work
It will work on a s5670 running cm10 jb4.1.1?
I just have to create a file with that lines and put it in /system/etc/init.d/95sdcardext4 ?????????
I cannot get link2sd to mount the ext4 partition.
Thx
DivinityCycle said:
Solved this one, it was easier than I expected.
You need to format the card, and then mount it at boot via a script.
CM9 and 10 support init.d scripts, so I have a script file at /system/etc/init.d/95sdcardext4
with this contents:
Code:
#!/system/xbin/sh
# Mount SD Card Ext4 Script
mount -rw -t ext4 /dev/block/mmcblk1p1 /storage/sdcard1
This runs very early in the boot up process, and ext4 partitions mount basically instantly, so everything is working as expected so far.
More tests need to be done, but I'm fairly certain I can package this up in a flashable ZIP package.
Click to expand...
Click to collapse
Sorry about that, I don't have one of these anymore. I had a P3113, but switched to a T869, which is a very similar device but has 4G and some different stuff going on under the hood.
My brief ext4 experiment was honestly not that big of a deal. I ended up going back to FAT32 because the benefits didn't outweigh the annoyances.
The biggest issue I had was I couldn't figure out how to make the file system permissions behave in the same highly permissive way that FAT32 does. I ran into several force closes and other things that resulted from apps not being to read / write stuff on the card that they should have been able to. I know you can CHMOD stuff, and a boot script could chmod everything on the card, but that seems like a bandaid.
Maybe there's a way to make the permissions behave a specific way via the mount parameters? I didn't investigate deeply enough because my life got busy, and during the changeover to the new tab it was just easier to go back to FAT32. Also my new tab has 16GB of internal storage, so I've been much less stressed about storage.
Ok folks.. ...reviving an ancient thread....from good ol days when it 'KISS' was common for Android.
What about android 7+ onward . All this stuff is deprecated. My 128gb is cut into 3 Ext4's.
(I need a journaled FS - that story a lil later )
I can mount easily but problem is apps cant see it and its all got to do with mount space concept.
I am Su'ed via Magisk
Can someone post a step by step guide to mount ext4 on 7+

howto: mount external sdcard as sdcard0

So, the Note 8.0 is a nice, fast, expensive device that had a big shortcoming for me: as shipped, the SD card is not useful as a place where application data easily lands - it's only intended for storing music and video files, or those chunks of data you manually target to it.
I fixed it, after a fashion, by mounting the card at boot time as sdcard0, which Samsung normally assigns to the (very limited) internal storage. The internal /data/media pool is treated as the external sdcard and very little installation data defaults to it. Apps2SD is still broken, but quite a lot of things simply default to using /sdcard0 as their preferred storage, which I find helpful.
You have to mount it at start time (init.d), and you have to mount it correctly (bind)
I figured out and set my device up this way by setting init.d scripts I learned about from threads by Ryuinferno (init.d) and mattiadj (rebinding in the Note 2) for this. Translation: none of this is my work, I just sounded out how others had done it and am assembling it here, since I know it will help other Note 8 folks.
I think that the init.d script support is very interesting - there are a lot of ROM tweaks that rely on init.d. You do not need a custom kernel for init.d to work the note 8 - which is nice, since we have no custom kernel
The outcome of this mod is that with an sdcard inserted, I get:
/storage/sdcard0 29.7G 3.68G 26.0G 32768
and
/storage/extSdCard 9.87G 1.78G 8.09G 4096
If I remove the card at boot, I still have apps (installed at /data/data) and the media
pool reverts to normal:
/storage/sdcard0 9.78G 1.78G 7.99G 4096
I wrote none of the scripts I'm using and will be the first to admit that I may have set them up stupidly.
Doing this voids your warranty and gives you pimples and a moon tan. But it does mean your sd card expands your storage and I hope that if there are better ways to do any of this, folks will chime in.
tools needed:
- knowledge of ADB and working ADB
- helps if you know how Unix and windows terminate lines differently, and can get your copy of Notepad++ to help you with the script, if you're trying this from Windows
- a note 8 running the 4.1.2 software - this approach is only tested there
- Kies
- Possibly Odin as a replacement for Kies (untested)
- understanding of how to put your device into recovery mode and trigger the Samsung recovery
- the US stock firmware for your device, for use with Odin (unless waiting on 1+ gig downloads if you screw something up is ok by you - the Kies method works, slooooowly.)
- Framaroot, to root your Note 8 (see the thread by tweebee)
- Busybox installed
Steps:
Install Framaroot
Root your device
Install busybox
Easy part done.
Next, you need to be able to run init.d scripts. At first I thought this might require a custom kernel, until I ran into Ryuinferno's excellent tool for enabling init.d without a custom kernel.
the thread I learned this from is by Ryuinferno at http://forum.xda-developers.com/showthread.php?t=1933849
I used term-init.sh from an ADB command line, but the thread has an APK in it called Uni-Init.apk that I would expect to work.
What you're doing is creating an install-recovery.sh script and telling it to go read /etc/init.d and run scripts there at boot.
Next, you want to create a simple script and drop it into /etc/init.d You can do this with an adb push; if you create the file in windows, though, you need to deal with the line endings correctly. You need the script to be executable and to be owned by root.
The one I'm using is this, from Mattiadj of the Note 2 community
in this thread: http://forum.xda-developers.com/showthread.php?t=2036796:
I call the script 07mount on my device, and a copy is attached to this post.
-----------------------script starts next line
#!/system/bin/sh
#extsd2internalsd is a modification that allows to switch internal sd to external sd
#and viceversa. With this you can use default internal sd only for app storage
#and the external sd to store all apps resource and all others stuff. The resut is a very
#big increase of installable apps on gnote2 and note8
#All credits to Mattiadj of xda forum for the idea and script and to mike1986 for
#the cmw zip. xda thread url
# at http://forum.xda-developers.com/showthread.php?t=2036796:
sleep 10
mount -o remount,rw /
mount -t vfat -o umask=0000 /dev/block/vold/179:17 /storage/sdcard0
sleep 30
mount -o bind /data/media /storage/extSdCard
chmod 777 /mnt/extSdCard
sleep 10
chown 1023:1023 /storage/extSdCard
chown 1000:1000 /storage/sdcard0
------------- end script on blank line above
You need /system remounted read/write, either in your favorite file explorer or via adb shell:
#mount -o rw,remount /system
to put the file in and
#chown root:root
the script itself
Now, put a fat32 formatted card into your sdcard, and reboot. When done, you should be able to see that your data storage has been remapped.
If you ever wanted to install a Samsung update, by the way, you'd need to completely unroot the device. I think the following would probably work:
- remove the su binary
- remove superuser from /system
- remove the busybox binaries
- remove install-recovery.sh from /etc and the /etc/init.d folder
If there was someting in an update you really wanted, you might do better to start by using the Samsung firmware downloaded from samfirmware.com, set your device all the way back to a clean install, then check for the OTA - Samsung does look at modifications and blocks updates to devices with changes to /system. My device is ineligible for OTA at this time.
That said, it appears that using Kies in emergency recovery mode can be used to reset your device to an as-shipped condition (I learned this when an early experiment resulted in my device being weirdly screwed up - bootable, but the network was down for the browser, etc. DNS and ping worked from an ADB prompt, though...)
You can download a copy of the script at http://www.mediafire.com/?2wbm439vlapb6om
I'm gonna try this when I have a full afternoon off as I tend to mess things up the first time I do them. But this will be super useful if I get it working. Hopefully when people start developing custom roms they can build this script in and save us all the trouble :highfive:
Haven't tried it yet, but it sounds like a custom recovery is very, very close. Once that happens, making this into a flashable modification will be trivial.
The very active Note II development is incredibly helpful, because our hardware and software are so similar to theirs.
I know this was something that users on the other Galaxy Note 2 threads were doing, and was wondering if at some point this will be an issue with say JB 4.2.2. I recall that Apps2SD would be an issue later on and wouldn't work, but I never got to that point. For me I am really in need of a 32GB tablet and just can't compromise even with a 64GB microSD card. I don't know why this tablet isn't supporting a 128GB microSD card, that would be awesome.
Upgrading internal storage by blending in sdcard
Just to be clear - this mod does not allow app2sd style migration of apps (in /data/app) to the sdcard.
Rather, it puts /data/media on the sdcard. A lot of apps use /data/media as their default for storage, though, so it's a helpful middle ground. Also, your apps are installed whether or not the sdcard is inserted, which is helpful.
I notice that the update includes a script called
install-recovery.sh - the same script that this method is using.
I have tested replacing a backed up copy of install-recovery and also
appending the command
run-parts /system/etc/init.d/ to the new file.
Using just a script to call run-parts or the stock install-recovery.sh works just fine.
I found a much easier way of doing this.
http://forum.xda-developers.com/showthread.php?t=2276193
hi friends & master
please help me
Is there any way to transfer games and apps to the internal storage with app2sd (moving apps & games in from system Rom to SD card(internal) no memory card)?
my system rom There is almost full
1.44 GB (148 MB free)
internal 12.6 GB (5.8 GB free)
SD card 12.5 GB (5.6 GB free)
I do not need to memory card

[Q] Why not a "11extsd2internalsd" mod for the M?

The "11extsd2internalsd" mod is flying on other phones.
The script works on "Avstralia Deodex Mod by ZaYAC for XT907" w/initd support but not on CM.
Search "11extsd2internalsd" "emulated":
http://forum.xda-developers.com/showthread.php?p=39530248
Hit on emulated http://forum.xda-developers.com/showthread.php?p=39530248
Can someone write a flash able zip for this script?
I will upload the one from ZaYAC's "ROM" (in zip format only for the upload to take) NOT A FLASH ABLE ZIP http://forum.xda-developers.com/showthread.php?p=43220186#post43220186
Why can't someone do this for other roms on the M?
Code from the upload:
#!/system/bin/sh
#extsd2internalsd is a modification that allows to switch internal sd to external sd and viceversa. With this you can use default internal sd only for app storage #and the external sd to store all apps resource and all others stuff. The resut is a very big increase of installable apps on gs3
#All credits to Mattiadj of xda forum for the idea and script and to mike1986 for the cmw zip.
#xda thread url at
#Script Modified for U.S. Galaxy S3s by Zedomax at GalaxyS3Root.com to be compatible when sdcard is not inserted.
busybox mount -o remount,rw /
busybox mount -t vfat -o umask=0000 /dev/block/vold/179:97 /mnt/sdcard
busybox mount -t exfat -o umask=0000 /dev/block/vold/179:97 /mnt/sdcard
if busybox mount | busybox grep vold/179:97; then
busybox mount -o bind /data/media /mnt/external1
fi
End code
OK. I got the swap working for these stock base roms w/ initd : Rage and Flying Jelly (Rzr forums). Though it is not really a swap, the emulated portion of internal memory is rendered useless and you delete everything there. Then all storage is on your external now seen as storage0.
The Settings/Storage will judge things incorrectly now.
Also for the Flying J I had to # (COMMENT) out If statment so the then would execute.
Edit: works w/ o edits now (??).
Just be sure all media is backed up before you reboot.
Now you have all internal memory for apps.
THIS IS GREAT!!!
Thanks for that, I've been trying to mod the file for use on an Galaxy Grand Duos. It was driving me nuts. Now all I had to change was:
/mnt/external1 to /mnt/extSdCard and
/dev/block/vold/179:97 to /dev/block/vold/179:9
After rebooting, it was all fixed.
Notes
TK: more on the SD swap. Tip: wipe Dalvik and Cache from TWRP (with the Sd back in place) to fix problems if you have previously booted w/o the extSD. Just get a BIG SDcard. Basically internal SD memory is disabled (rather now used by your apps) . And Storage info is skewed.
Rosbif said:
...
Click to expand...
Click to collapse
See above
aviwdoowks said:
And Storage info is skewed.
Click to expand...
Click to collapse
I've noticed that. On the Galaxy Grand Duos, there's only 4Gb available for apps and even though I appear to be installing to the SD card, it shows up as the internal storage, so it looks like I'm going to hit the 4Gb limit with come of my larger apps still.
Sigh. Back to the drawing board...
Rosbif said:
I've noticed that. On the Galaxy Grand Duos, there's only 4Gb available for apps and even though I appear to be installing to the SD card, it shows up as the internal storage, so it looks like I'm going to hit the 4Gb limit with come of my larger apps still.
Sigh. Back to the drawing board...
Click to expand...
Click to collapse
No no. All is good. Or as good as it's going to get. Ignore the storage info rely on rootexplorer.
aviwdoowks said:
No no. All is good. Or as good as it's going to get. Ignore the storage info rely on rootexplorer.
Click to expand...
Click to collapse
I'll hold you to that!
Rosbif said:
I'll hold you to that!
Click to expand...
Click to collapse
I tried FolderMount & this is better, no maintenance.
I DO NOT KNOW WHY THIS IS NOT CATCHING ON MORE.
Stock based roms only w/initd.

Categories

Resources