Attend XDA's Second Annual Developer Conference, XDA:DevCon 2014!
5,810,846 Members 37,550 Now Online
XDA Developers Android and Mobile Development Forum

[Swap][CM11 4.4.2][Go, Sola, ...] Swap Memory Internal to SD Card

Tip us?
 
Elixia
Old
(Last edited by Elixia; 8th April 2014 at 07:40 AM.) Reason: More
#1  
Elixia's Avatar
Junior Member - OP
Thanks Meter 9
Posts: 13
Join Date: Dec 2013
Default [Swap][CM11 4.4.2][Go, Sola, ...] Swap Memory Internal to SD Card

Dear All,
Last night. I try to swap memory internal to SD Card.
First, I try to make same file like basic swap memory and paste to system/etc.
and It Doesn't work.
So I make another ways.
After try and error. The mods i have installed work perfectly.

This is the CODE script to make Internal memory changed to SD Card.

Code:
#!/system/bin/sh

LOG=/data/extsd2.log
echo 'mark 1' > $LOG
umount /storage/sdcard0
umount /storage/sdcard1
umount /mnt/secure/asec
umount /mnt/media_rw/sdcard0
umount /mnt/media_rw/sdcard1
mount -t vfat -o umask=0000,uid=1000,gid=1015 /dev/block/vold/179:97 /mnt/media_rw/sdcard0 1>>$LOG 2>>$LOG
mount -t vfat -o umask=0000,uid=1000,gid=1015 /dev/block/vold/179:97 /storage/sdcard0 1>>$LOG 2>>$LOG
echo 'mark 2' >> $LOG
mount -t vfat -o umask=0000,uid=1000,gid=1015 /dev/block/vold/179:14 /mnt/media_rw/sdcard1 1>>$LOG 2>>$LOG
mount -t vfat -o umask=0000,uid=1000,gid=1015 /dev/block/vold/179:14 /storage/sdcard1 1>>$LOG 2>>$LOG
echo 'mark 3' >> $LOG
mount -t vfat -o umask=0000,uid=1000,gid=1015 /dev/block/vold/179:97 /mnt/secure/asec 1>>$LOG 2>>$LOG
What to do with it?
Hire the step make it work on your Device.
1. Make 1 file *.fstab or Copy from Other device with same extension.
2. Give the file a name vold.fstab
3. Copy and paste the above code to file. and save it.
4. Copy it (vold.fstab) to SD Card.
5. Use your Androind File Manager, Copy file vold.fstab to Directory system/etc/init.d and paste.
6a. Set Permission to rw-r--r-- (0644). or
6b. Set Permission to rwxr-xr-x
7. Reboot your Device.


This another solution for swap memory.
Please Check this page
http://goo.gl/EwKH1x

Now after reboot finish. Your memory device is already swap.
If it helps you. Please click the thanks Botton

Credit:
@nunu_Nugraha
The Following 7 Users Say Thank You to Elixia For This Useful Post: [ Click to Expand ]
 
ivaneris
Old
#2  
ivaneris's Avatar
Senior Member
Thanks Meter 253
Posts: 1,080
Join Date: Apr 2012
Location: Todanan - Blora
Should it work on another device?

Sent from my LG-P990
LG OPTIMUS 2X
ROM : TONYP's THE ROM build27 but currently use Tonyp's CM11 as testing but wow...
Kernel : Kowalski exp127 alpha31
 
Elixia
Old
#3  
Elixia's Avatar
Junior Member - OP
Thanks Meter 9
Posts: 13
Join Date: Dec 2013
Default I hope so...

Quote:
Originally Posted by ivaneris View Post
Should it work on another device?

Sent from my LG-P990
I think, it should be work to with another device.
but I'm not sure. Backup before you start.

Do with your own risk.
 
ivaneris
Old
#4  
ivaneris's Avatar
Senior Member
Thanks Meter 253
Posts: 1,080
Join Date: Apr 2012
Location: Todanan - Blora
Thnx..it works with some modification ....use it now..:thumbup:

Sent from my LG-P990
LG OPTIMUS 2X
ROM : TONYP's THE ROM build27 but currently use Tonyp's CM11 as testing but wow...
Kernel : Kowalski exp127 alpha31
 
Elixia
Old
#5  
Elixia's Avatar
Junior Member - OP
Thanks Meter 9
Posts: 13
Join Date: Dec 2013
Quote:
Originally Posted by ivaneris View Post
Thnx..it works with some modification ....use it now..:thumbup:

Sent from my LG-P990
Did you change with another permission?
anyway, glad to hear it worked on your device to.
 
ivaneris
Old
#6  
ivaneris's Avatar
Senior Member
Thanks Meter 253
Posts: 1,080
Join Date: Apr 2012
Location: Todanan - Blora
Quote:
Originally Posted by Elixia View Post
Did you change with another permission?
anyway, glad to hear it worked on your device to.
No just edit the mount point...

Sent from my LG-P990
LG OPTIMUS 2X
ROM : TONYP's THE ROM build27 but currently use Tonyp's CM11 as testing but wow...
Kernel : Kowalski exp127 alpha31
 
Elixia
Old
#7  
Elixia's Avatar
Junior Member - OP
Thanks Meter 9
Posts: 13
Join Date: Dec 2013
Default Request

Quote:
Originally Posted by ivaneris View Post
No just edit the mount point...

Sent from my LG-P990
If you don't mine.
can you please, show me and other friends.
The code work on your device?
 
ivaneris
Old
#8  
ivaneris's Avatar
Senior Member
Thanks Meter 253
Posts: 1,080
Join Date: Apr 2012
Location: Todanan - Blora
Quote:
Originally Posted by Elixia View Post
If you don't mine.
can you please, show me and other friends.
The code work on your device?
Sure..here it is
#!/system/bin/sh

LOG=/data/extsd2.log
echo 'mark 1' > $LOG
umount /storage/sdcard0
umount /storage/sdcard1
umount /mnt/secure/asec
umount /mnt/media_rw/sdcard0
umount /mnt/media_rw/sdcard1
mount -t vfat -o umask=0000,uid=1000,gid=1015 /dev/block/vold/179:49 /mnt/media_rw/sdcard0 1>>$LOG 2>>$LOG
mount -t vfat -o umask=0000,uid=1000,gid=1015 /dev/block/vold/179:49 /storage/sdcard0 1>>$LOG 2>>$LOG
echo 'mark 2' >> $LOG
mount -t vfat -o umask=0000,uid=1000,gid=1015 /dev/block/vold/179:11 /mnt/media_rw/sdcard1 1>>$LOG 2>>$LOG
mount -t vfat -o umask=0000,uid=1000,gid=1015 /dev/block/vold/179:11 /storage/sdcard1 1>>$LOG 2>>$LOG
echo 'mark 3' >> $LOG
mount -t vfat -o umask=0000,uid=1000,gid=1015 /dev/block/vold/179:49 /mnt/secure/asec 1>>$LOG 2>>$LOG

Well..if there any other way to swap please tell me my friend..as this work said not as 4.4 standard actually
We just got cm11 almost fully working recently on lg p990...

Sent from my LG-P990
LG OPTIMUS 2X
ROM : TONYP's THE ROM build27 but currently use Tonyp's CM11 as testing but wow...
Kernel : Kowalski exp127 alpha31
The Following User Says Thank You to ivaneris For This Useful Post: [ Click to Expand ]
 
Elixia
Old
#9  
Elixia's Avatar
Junior Member - OP
Thanks Meter 9
Posts: 13
Join Date: Dec 2013
Quote:
Originally Posted by ivaneris View Post
Sure..here it is
Code:
#!/system/bin/sh

LOG=/data/extsd2.log
echo 'mark 1' > $LOG
umount /storage/sdcard0
umount /storage/sdcard1
umount /mnt/secure/asec
umount /mnt/media_rw/sdcard0
umount /mnt/media_rw/sdcard1
mount -t vfat -o umask=0000,uid=1000,gid=1015 /dev/block/vold/179:49 /mnt/media_rw/sdcard0 1>>$LOG 2>>$LOG
mount -t vfat -o umask=0000,uid=1000,gid=1015 /dev/block/vold/179:49 /storage/sdcard0 1>>$LOG 2>>$LOG
echo 'mark 2' >> $LOG
mount -t vfat -o umask=0000,uid=1000,gid=1015 /dev/block/vold/179:11 /mnt/media_rw/sdcard1 1>>$LOG 2>>$LOG
mount -t vfat -o umask=0000,uid=1000,gid=1015 /dev/block/vold/179:11 /storage/sdcard1 1>>$LOG 2>>$LOG
echo 'mark 3' >> $LOG
mount -t vfat -o umask=0000,uid=1000,gid=1015 /dev/block/vold/179:49 /mnt/secure/asec 1>>$LOG 2>>$LOG
Well..if there any other way to swap please tell me my friend..as this work said not as 4.4 standard actually
We just got cm11 almost fully working recently on lg p990...

Sent from my LG-P990
Of course mate. I will let you know if i find another way to swap metode.
since my little brother have similar device like you have.
so it's easy to test new swap metode if any.
and thanks for share your swap code. Hope it help anybody in xda.
The Following User Says Thank You to Elixia For This Useful Post: [ Click to Expand ]
 
Elixia
Old
(Last edited by Elixia; 8th January 2014 at 10:05 PM.) Reason: Sorry for same color
#10  
Elixia's Avatar
Junior Member - OP
Thanks Meter 9
Posts: 13
Join Date: Dec 2013
Default Tips

Quote:
Originally Posted by Dritza View Post
i tried but no effect on Xperia Sola
Sorry mate, did you follow it with correct permission?
If it yes and keeped not work on your device. I sugest you to try this.
Change the red and purple text code with "memory read on your own device".

Code:
#!/system/bin/sh

LOG=/data/extsd2.log
echo 'mark 1' > $LOG
umount /storage/sdcard0
umount /storage/sdcard1
umount /mnt/secure/asec
umount /mnt/media_rw/sdcard0
umount /mnt/media_rw/sdcard1
mount -t vfat -o umask=0000,uid=1000,gid=1015 /dev/block/vold/179:97 /mnt/media_rw/sdcard0 1>>$LOG 2>>$LOG
mount -t vfat -o umask=0000,uid=1000,gid=1015 /dev/block/vold/179:97 /storage/sdcard0 1>>$LOG 2>>$LOG
echo 'mark 2' >> $LOG
mount -t vfat -o umask=0000,uid=1000,gid=1015 /dev/block/vold/179:14 /mnt/media_rw/sdcard1 1>>$LOG 2>>$LOG
mount -t vfat -o umask=0000,uid=1000,gid=1015 /dev/block/vold/179:14 /storage/sdcard1 1>>$LOG 2>>$LOG
echo 'mark 3' >> $LOG
mount -t vfat -o umask=0000,uid=1000,gid=1015 /dev/block/vold/179:97 /mnt/secure/asec 1>>$LOG 2>>$LOG
How to get your own code number?
Just, run terminals app
tap this text

mount | grep sdcard0
mount | grep sdcard1

Description:
179:97 = Number code for sdcard0 ,and
179:14 = Number code for sdcard1

Hope that work.

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes