FORUMS

Analysis & Opinion

[Swap][Beta][Port] Swap Sd Card In GT-S7500 CM11

381 posts
Thanks Meter: 470
 
By omarilzz, Senior Member on 21st March 2014, 10:40 PM
Post Reply Subscribe to Thread Email Thread
28th November 2014, 07:16 AM |#31  
Iceman's Avatar
Senior Member
Flag Georgetown
Thanks Meter: 139
 
More
Quote:
Originally Posted by AKSHAY8043

will this work in speedmod 2.5.1?

Yes is working but noticed that after init.d tweak if a app is moved to sd card then they are not in the .android_secure folder!!! They are just placed in the external card root.
 
 
21st January 2015, 09:04 AM |#32  
Member
Thanks Meter: 8
 
More
Sorry guys, just to better understand.... This tweak swaps the internal memory and the sd card, so that the primary memory used to install apps will be the microSD?
If so, at the end of the day the result is the same of using LinkToSD with a multi-partitioned microsd... True that?

Just to understand if the result is exactly the same ( =override the limitation of a little internal memory). If the solution are equivalent, then this init.d tweak seems to be less "dirty" than the LinkToSD method.
@bbivan: if you swap internal and sd memory, then "move to SD" functionality should bring the app on the real, internal memory of the GAP. What should be the reason for that, assuming a Class 10 microSD should be fast as hell?
The Following User Says Thank You to KaylordTheuZ For This Useful Post: [ View ]
27th February 2015, 06:25 PM |#33  
Junior Member
Thanks Meter: 2
 
More
This didn't work for me. It appears my S7500 isn't executing the script in /etc/init.d.

So I'll just leave the method I cooked up (obviously based on OP's script) here, which did work for me:

/etc/init.d/00remountextsd
Code:
#!/system/bin/sh

###########################################################
# Remount external SD as internal storage                 #
###########################################################
# Place in /etc/init.d and reboot                         #
# If that doesn't work, use SManager App                  #
# - Open app, find this script file                       #
# - Enable by clicking 'Su' and 'Boot' icons and hit Save #
# - Reboot your phone again.. and enjoy.                  #
###########################################################

#  ..\Generic\adb push 00remountextsd /storage/sdcard0/
#  mount -o rw,remount /system;cp /storage/sdcard0/00remountextsd /etc/init.d/&&rm /storage/sdcard0/00remountextsd
#  mount -o rw,remount /system;cp /data/log/00remountextsd /etc/init.d/&&rm /data/log/00remountextsd

      LOG=/data/log/remountextsd.log
MOUNTOPTS=rw,dirsync,nosuid,nodev,noexec,uid=1023,gid=1023,umask=0007
 INTERNAL=/dev/block/vold/179:23
    EXTSD=/dev/block/vold/179:97

echo -n "Starting $0, " | tee $LOG
date | tee -a $LOG
#echo "---------------------------------" | tee -a $LOG
#echo Waiting for /mnt/media_rw/sdcard1 to come online... | tee -a $LOG
#for i in $(seq 1 1 3000)
#do
#    if ( grep -c "/mnt/media_rw/sdcard1" /proc/mounts ); then
#        break;
#    fi
#    usleep 100000
#done
#date | tee -a $LOG
#echo "---------------------------------" | tee -a $LOG
#echo Waiting for /mnt/media_rw/sdcard0 to come online... | tee -a $LOG
#for i in $(seq 1 1 3000)
#do
#    if ( grep -c "/mnt/media_rw/sdcard0" /proc/mounts ); then
#        break;
#    fi
#    usleep 100000
#done
#date | tee -a $LOG
echo "---------------------------------" | tee -a $LOG
echo "Current mounts:" | tee -a $LOG
cat /proc/mounts | tee -a $LOG
echo "---------------------------------" | tee -a $LOG
echo "Current disk utilisation:" | tee -a $LOG
df | tee -a $LOG
echo "---------------------------------" | tee -a $LOG
echo "Kernel information:" | tee -a $LOG
cat /proc/version | tee -a $LOG
echo "---------------------------------" | tee -a $LOG
echo "Umounting.." | tee -a $LOG
if mountpoint -q "/mnt/media_rw/sdcard1/.android_secure"; then umount /mnt/media_rw/sdcard1/.android_secure 2>&1 | tee -a $LOG; fi
if mountpoint -q "/mnt/secure/asec"; then umount /mnt/secure/asec 2>&1 | tee -a $LOG; fi
if mountpoint -q "/mnt/secure/asec"; then umount /mnt/secure/asec 2>&1 | tee -a $LOG; fi
if mountpoint -q "/mnt/media_rw/sdcard0"; then umount /mnt/media_rw/sdcard0 2>&1 | tee -a $LOG; fi
if mountpoint -q "/mnt/media_rw/sdcard1"; then umount /mnt/media_rw/sdcard1 2>&1 | tee -a $LOG; fi
echo "Mounting sdcard0 (extSD)" | tee -a $LOG
mount -t vfat -o $MOUNTOPTS    $EXTSD /mnt/media_rw/sdcard0 2>&1 | tee -a $LOG
sdcard /mnt/media_rw/sdcard0 /storage/sdcard0 1023 1023 &
echo "Mounting sdcard1 (internal storage)" | tee -a $LOG
mount -t vfat -o $MOUNTOPTS $INTERNAL /mnt/media_rw/sdcard1 2>&1 | tee -a $LOG
sdcard /mnt/media_rw/sdcard1 /storage/sdcard1 1023 1023 &
echo "Mounting .android_secure" | tee -a $LOG
mount -t vfat -o $MOUNTOPTS    $EXTSD      /mnt/media_rw/sdcard1/.android_secure 2>&1 | tee -a $LOG
echo "Mounting asec" | tee -a $LOG
# Delay for half a second for device to become available
usleep 500000
mount -t vfat -o $MOUNTOPTS    $EXTSD      /mnt/secure/asec 2>&1 | tee -a $LOG
echo "---------------------------------" | tee -a $LOG
echo "Final mounts:" | tee -a $LOG
cat /proc/mounts | tee -a $LOG
echo "---------------------------------" | tee -a $LOG
echo -n "Finished running $0, " | tee -a $LOG
date | tee -a $LOG
Thanks and enjoy!

[EDIT]: An alternative to using the SManager app would be most welcome!
[EDIT2]: Running this mod as-is, "FIFA15" crashes after start. If I use "Use external SD as primary" from Settings->Storage (not available on all ROMs), it does work, but then the external SD is not available over MTP...

---------- Post added at 19:25 ---------- Previous post was at 19:22 ----------

Quote:
Originally Posted by KaylordTheuZ

Sorry guys, just to better understand.... This tweak swaps the internal memory and the sd card, so that the primary memory used to install apps will be the microSD?
If so, at the end of the day the result is the same of using LinkToSD with a multi-partitioned microsd... True that?

Just to understand if the result is exactly the same ( =override the limitation of a little internal memory). If the solution are equivalent, then this init.d tweak seems to be less "dirty" than the LinkToSD method.
@bbivan: if you swap internal and sd memory, then "move to SD" functionality should bring the app on the real, internal memory of the GAP. What should be the reason for that, assuming a Class 10 microSD should be fast as hell?

@KaylordTheuZ
You understand correctly.
Last edited by Inny; 1st March 2015 at 05:39 PM.
Post Reply Subscribe to Thread
Previous Thread Next Thread
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes