[Cuestion] Swap Partition on CyanogenMod 7.2 - HTC Wildfire S

I tried every way, but I can not use the swap partition on my WFS.
I installed the latest version of the ROM and the Kernel, but I can't make it work.
Does anyone know what should I do to run the "Swap Partition" on my phone?

Go through this.
http://wiki.cyanogenmod.com/wiki/Swap_and_Compcache
The cyanogenmod team feels that swap doesn't serve it's purpose on an Android device. To quote them
"This question is hotly debated, but you almost definitely do not need swap or compcache. The only exception to this may be if the device is a first generation device (i.e. HTC Dream or HTC Magic). If you think swap or compcache may make the device faster, feel free to follow the directions below."
Click to expand...
Click to collapse
And the WFS is not a first generation device
If you still want to go ahead with it, that link provides a how-to.

But the problem is that with this ROM my phone does not recognize the swap partition. I would like to post on its own thread, but I can not because I am a new user.

DanHidalgo said:
I tried every way, but I can not use the swap partition on my WFS.
I installed the latest version of the ROM and the Kernel, but I can't make it work.
Does anyone know what should I do to run the "Swap Partition" on my phone?
Click to expand...
Click to collapse
You have to create a mount script and copy it to /system/etc/init.d and give it the same permissions all the other files in init.d
Attached is the code to use if you have swap as the third partition on your SD card. Remove the .txt extension and place it in /system/etc/init.d and give it the appropriate permissions then reboot
Use the command "free" in a terminal session to verify swap is active and working.
It should be pretty straightforward to modify it to be the second if you aren't using an SD Ext partition for programs.
The code is:
Code:
#!/system/bin/sh
#Checks for a swap partition on mount 3 of the SD card and use it for swap partition.
if [ -b /dev/block/mmcblk0p3 ];
then
#Uncomment the line below to adjust swappiness. Default is 60 I believe
# echo 20 > /proc/sys/vm/swappiness;
swapon /dev/block/mmcblk0p3;
fi;
Change the line:
if [ -b /dev/block/mmcblk0p3 ];
to
if [ -b /dev/block/mmcblk0p2 ];
If you only have your FAT32 Primary and your Swap partition and no SDExt

I will try it this evening. Some people told me that oboe is that I created the Swap Partition with the recovery and I have to create it with the PC.
If I get it working I'll post my results. If not you will see me here again.
Enviado desde mi HTC Wildfire S usando Tapatalk

d33ps1x said:
You have to create a mount script and copy it to /system/etc/init.d and give it the same permissions all the other files in init.d
Attached is the code to use if you have swap as the third partition on your SD card. Remove the .txt extension and place it in /system/etc/init.d and give it the appropriate permissions then reboot
Use the command "free" in a terminal session to verify swap is active and working.
It should be pretty straightforward to modify it to be the second if you aren't using an SD Ext partition for programs.
The code is:
Code:
#!/system/bin/sh
#Checks for a swap partition on mount 3 of the SD card and use it for swap partition.
if [ -b /dev/block/mmcblk0p3 ];
then
#Uncomment the line below to adjust swappiness. Default is 60 I believe
# echo 20 > /proc/sys/vm/swappiness;
swapon /dev/block/mmcblk0p3;
fi;
Change the line:
if [ -b /dev/block/mmcblk0p3 ];
to
if [ -b /dev/block/mmcblk0p2 ];
If you only have your FAT32 Primary and your Swap partition and no SDExt
Click to expand...
Click to collapse
When I try to move the script to the specific file I get: failed to copy, or failed to move. How could I copy or move the script in /system/etc/init.d and give all permissions? I am using ES File Explorer and ASTRO. Should I move the zipped file or only the script? I couldn't move none of them

Portugah said:
When I try to move the script to the specific file I get: failed to copy, or failed to move. How could I copy or move the script in /system/etc/init.d and give all permissions? I am using ES File Explorer and ASTRO. Should I move the zipped file or only the script? I couldn't move none of them
Click to expand...
Click to collapse
You have to mount system partition as RW to be able to manipulate with files there, big white button "Mounr R/W" in the upper part of the Root explorer app while you are in /system/etc/init.d folder. Then you put there swap.txt file that d33ps1x provided up in the post, rename it just to swap and reboot phone.
I did that with almost every version of cm7 from the begining (in which kernel allowed that) and every time it worked, tnx to d33ps1x

kobredabre said:
You have to mount system partition as RW to be able to manipulate with files there, big white button "Mounr R/W" in the upper part of the Root explorer app while you are in /system/etc/init.d folder. Then you put there swap.txt file that d33ps1x provided up in the post, rename it just to swap and reboot phone.
I did that with almost every version of cm7 from the begining (in which kernel allowed that) and every time it worked, tnx to d33ps1x
Click to expand...
Click to collapse
Root explorer is a paid app. Is there any other app I could do that?

Portugah said:
Root explorer is a paid app. Is there any other app I could do that?
Click to expand...
Click to collapse
Total commander for android can do same:
http://forum.xda-developers.com/showthread.php?t=1619734
and it's free

kobredabre said:
Total commander for android can do same:
http://forum.xda-developers.com/showthread.php?t=1619734
and it's free
Click to expand...
Click to collapse
Once installed the app, how do I grant permissions to the file? the link shows images from the older version.

Portugah said:
Once installed the app, how do I grant permissions to the file? the link shows images from the older version.
Click to expand...
Click to collapse
Push and hold the file, choose properties and then hit first button right from the file name and current permissions to expand the menu

kobredabre said:
Push and hold the file, choose properties and then hit first button right from the file name and current permissions to expand the menu
Click to expand...
Click to collapse
I moved the file to the specific folder and I restarted my phone. Opening a2sd the swap button was turned off. I opened the terminal and I typed free, the results are 0-0-0. I didn't work.

Portugah said:
Once installed the app, how do I grant permissions to the file? the link shows images from the older version.
Click to expand...
Click to collapse
I granted permissions to the file using Total Commander app. Thank you. But it looks like it is not working yet.

Portugah said:
I granted permissions to the file using Total Commander app. Thank you. But it looks like it is not working yet.
Click to expand...
Click to collapse
Then the problem can be with kernel on ROM you are using, basic thing is that kernel needs to be abble to support swap for swap to even work... Can't help you much there since you are probably on marvelc version according to you'r country flag, i'm on diferent version. Some1 with same model as yours could help you tough

Is there any way to install another ROM that support swap? which ROM should I use? is there any tutorial?

Portugah said:
Is there any way to install another ROM that support swap? which ROM should I use? is there any tutorial?
Click to expand...
Click to collapse
The [2nd] above post is correct. Swap support is enabled in some custom kernels. If you're looking for another ROM, you're going to primarily ask about the kernel included with that ROM. Stock kernels do NOT support swap. You can enable swap [if you have a supporting kernel] via A2SDGUI or terminal... read up and familiarize yourself with linux swap.. since Android is a branch of Linux; same principles apply
Rob
Sent from my HTC_A510c using Tapatalk 2

This says it's possible to enable swap and compcache on CM7.2, but the howto wiki link is dead
To answer you question directly, by default the swap and Compcache schemes are disabled, but if you still feel the need to use them, above link provides you with a how-to.
So, yes, the CyanogenMod 7.2 supports swap and its usage needs to be activated.
Click to expand...
Click to collapse
Any idea how to do this?

For me the same question. I'm investigating since 1 week, tried scripts etc. no chance
Nexus One,
4EXT recovery (needed for correct sd-ext formatting)
CM 7.2
swap partition is there but not used.
What could i do to enable the swap partition?
Regards,
Marc

Hello,
I have the stable release cyanogenmod 7.2.0.
Swap is not working and gives following message:
swapon: /dev/block/mmcblk0p3: Function not implement
I found some notes saying that the problem is the kernel not supporting
swap. Which kernel can I use with cyanogenmod 7.2.0 with swap support?.
Thanks for your help.

Related

[TUT][20110115][Expert Users & ROM Makers]To add userdata everywhere to your HD2 ROM

[TUT][20110115][Expert Users & ROM Makers]To add userdata everywhere to your HD2 ROM
*FOR EXPERT USERS OR ROM MAKERS ONLY*
*I AM NOT RESPONSIBLE FOR ANY DAMAGE CAUSED TO YOUR DEVICE BY USING THIS*
Features:
- Able to have userdata on NAND or in ext sdcard partition or in /sdcard/.data/data.img
- Check if NAND partition exist
- Check if ext sdcard partition exist
- Resizable data.img (bigger or smaller)
- Able to prioritize data.img, ext or NAND
- Able to copy data from NAND to data.img, or ext to data.img (in this order)
- Write data.log in /sdcard/.data/
- Automatic update data.config if it haven't all options
Click to expand...
Click to collapse
Requirements
Kernel with:
# -File systems: yaffs2, ext2, ext3 (, ext4)
# -MTD partition in /proc/mtd
# -MTD block in /dev/block/mtdblock*
# -SD Card in /sys/block/mmcblk0
InitRD with:
# -/system
# -/proc
# -/sys
# -/data
# -/mfbin
SD Card with first partition as FAT32 or EXT*: mmcblk0p1
SD Card with second partition as EXT*: mmcblk0p2
Click to expand...
Click to collapse
How to use it
In your initrd root
Rename your android init (binary) to init.android
Comment "mount yaffs2 [email protected] /data nosuid nodev noatime nodiratime" in your init.rc
Past mfbin folder
Modify mfbin/.data/data.config with your default setup and "Some variables" in init script
Use new init script and chmod it with 755
Click to expand...
Click to collapse
Download : http://www.multiupload.com/F86WGU6H70
Zip content:
- my initrd.gz example (normally for ManusFreedom or tytung ROM)
- init (extracted from initrd.gz)
- .data folder sample
Click to expand...
Click to collapse
Logical description
To prioritize use data.img over userdata on NAND or ext sdcard partition:
Change data_force_mount to y
To prioritize use ext sdcard partition over userdata on NAND:
Change data_force_mount to n
Change data_ext_priority to y
To prioritize use NAND:
Change data_force_mount to n
Change data_ext_priority to n
Click to expand...
Click to collapse
Use data_copy_to_img=y to copy data from NAND to data.img. If no data on NAND, it try to mount ext partition to copy it to data.img. Works only during creation of data.img (not after).
Click to expand...
Click to collapse
To resize to a bigger data.img (backup your data.img before):
1. If you don't have on sd a directory .data copy .data from install to the root of your sd
2. Open .data/data.config of root of SD Card
3. Change data_size to the size you want in megabytes (recommand not less than 128MB and not over 2GB)
4. Change data_resize to y
5. Boot your phone
6. Wait (time depend)
7. You will be normally under Android
8. You can change data_resize to n for security
To resize to a smaller data.img [CHECK THE FREE SPACE BEFORE SHRINK] (backup your data.img before):
1. If you don't have on sd a directory .data copy .data from install to the root of your sd
2. Open .data/data.config of root of SD Card
3. Change data_size to the size you want in megabytes (recommand not less than 128MB and not over 2GB)
4. Change data_resize to y
5. Change data_force_shrink to y
6. Boot your phone
7. Wait (time depend)
8. You will be normally under Android
8. You can change data_resize and data_force_shrink to n for security
Click to expand...
Click to collapse
Please test it and give feedback.
Thanks meter click .
And if you appreciate my work and want to buy me a drink, please consider making a donation too, thanks.
Added ext sdcard partition support.
manusfreedom said:
Added ext sdcard partition support.
Click to expand...
Click to collapse
Great stuff! I will test it out...
Quick question... how do I create the boot.img using this initrd.gz and the kernel of my choice?
pongster said:
Quick question... how do I create the boot.img using this initrd.gz and the kernel of my choice?
Click to expand...
Click to collapse
the easy way for me is using android itself, put initrd.gz and zimage in /sdcard/boot/
adb shell
mkyaffs2image /sdcard/boot/ /sdcard/boot.img
edit..
this is great, make me so easy creating a rom.. thanks manus
lesjaw said:
the easy way for me is using android itself, put initrd.gz and zimage in /sdcard/boot/
adb shell
mkyaffs2image /sdcard/boot/ /sdcard/boot.img
Click to expand...
Click to collapse
Thanks. I actually created one using mkfs.yaffs2 in linux... but it gave me a kernel error after successfully installing via clockwork... Possible reason as well is the update-script I use... what update-script do you use for your ROM-ZIPs?
pongster said:
Thanks. I actually created one using mkfs.yaffs2 in linux... but it gave me a kernel error after successfully installing via clockwork... Possible reason as well is the update-script I use... what update-script do you use for your ROM-ZIPs?
Click to expand...
Click to collapse
i don't know this for sure, i don't make boot.img for a zip rom, i just put initrd.gz and zimage in boot folder, for update script i use just like raider zip build then compare it with original update script from my original build so i know what i should change in my update script..
lesjaw said:
the easy way for me is using android itself, put initrd.gz and zimage in /sdcard/boot/
adb shell
mkyaffs2image /sdcard/boot/ /sdcard/boot.img
edit..
this is great, make me so easy creating a rom.. thanks manus
Click to expand...
Click to collapse
I actually got the 'NAND kernel open failed' error using another boot.img works though... any ideas to what I'm goofing up?
lesjaw said:
i don't know this for sure, i don't make boot.img for a zip rom, i just put initrd.gz and zimage in boot folder, for update script i use just like raider zip build then compare it with original update script from my original build so i know what i should change in my update script..
Click to expand...
Click to collapse
is your boot folder inside the /system folder? so initrd.gz and zImage inside /system/boot
then you take the META from RaiderX and compare update scripts
before finally creating an update.zip using 1. /system folder and 2. META folder ?
pongster said:
is your boot folder inside the /system folder? so initrd.gz and zImage inside /system/boot
Click to expand...
Click to collapse
No, boot folder is on itself, together with system folder and Meta folder, so we have three folder inside zip
pongster said:
then you take the META from RaiderX and compare update scripts
before finally creating an update.zip using 1. /system folder and 2. META folder ?
Click to expand...
Click to collapse
yes, i need to do that to see if any spesific file permission need to be added
lesjaw said:
No, boot folder is on itself, together with system folder and Meta folder, so we have three folder inside zip
yes, i need to do that to see if any spesific file permission need to be added
Click to expand...
Click to collapse
Thanks.. tried the 3 folders before reading your post... got past the error but its stuck at gogogo...
could you attach the meta folder you use so i can test it out... ?
lesjaw said:
No, boot folder is on itself, together with system folder and Meta folder, so we have three folder inside zip
yes, i need to do that to see if any spesific file permission need to be added
Click to expand...
Click to collapse
so for this manus initrd.gz you just put this in your /boot folder in the romzip and flash away? it must be my update-script then... installing via daf works so i know my system works...
pongster said:
so for this manus initrd.gz you just put this in your /boot folder in the romzip and flash away? it must be my update-script then... installing via daf works so i know my system works...
Click to expand...
Click to collapse
uploading..btw, you can hit me up at gtalk [email protected] rather then we talk about it here..i'm afraid our conversation is getting out of topic from OP thread..
lesjaw said:
uploading..btw, you can hit me up at gtalk [email protected] rather then we talk about it here..i'm afraid our conversation is getting out of topic from OP thread..
Click to expand...
Click to collapse
i know... sorry mods...
back on topic...
did this initrdgz detect your ext partition on sd properly?
New version available (v3)
Added:
- Able to prioritize data.img, ext or NAND
- Able to copy data from NAND to data.img, or ext to data.img (in this order)
- Write data.log in /sdcard/.data/
- Automatic update data.config if it haven't all options
The download file is removed from all servers!!
zooz11 said:
The download file is removed from all servers!!
Click to expand...
Click to collapse
No more direct support for this thread.
You can extract my init script from my updated zip:
http://forum.xda-developers.com/showthread.php?p=11986922#post11986922

swap internal and external SD cards

I made this post over in the HellyBean thread as one user was asking about it, and I decided I would post it in an easier to find place.
Basically it is a shell script that you can toss into /data/loca/userinit.d (if your ROM supports userinit.d, otherwise throw it in /system/etc/init.d) that will swap your internal and external SD cards.
Using this script is at your own risk. Any bricks, fires, alien invasions, etc are not my fault... well, unless they are. I have run this script on my phone and it seems to do as I claim it does.
This script has ONLY been tested on a SGH-T989D phone running the ROM Hellybean on Android 4.3. Based on my memory, I believe this should work on 4.2.2 ROMs as well and should not be dependant on one specific ROM. If you wish to make sure it will work with your ROM, run the following command from the shell/terminal:
mount | grep sdcard
if you see /dev/block/vold/179:97 and /dev/block/vold/179:28 and tempfs as your 3 SD cards, you are good to go. If you get any different values, this script will NOT work for you unless you modify it to match your values. I STRONGLY recommend you check your mount points before running the script as mounting an incorrect partition to your SD card (internal or external) can do unexpected things. If you unintentionally mount your recovery or boot, you could easily corrupt these. I accept no responsibility if anything goes wrong. Make sure you do all of this as root as well where applicable.
STEPS:
1) backup your internal and external SD cards
2) take a nandroid (never hurts to do a nandroid before making a startup script)
3) download the zip file and extract the swapsd.sh file (NOTE: this is NOT a flashable zip. do NOT attempt to flash this from recovery. If you do, you do so at your own risk)
4) copy the script to your phone (however you wish to do that is up to you)
OPTIONAL STEPS
5) copy the script to /data/local
6) run the script
7) verify that your internal and external SD cards are swapped
END OF OPTIONAL STEPS
8) do one of the following:
8A) copy the script to /data/loca/userinit.d
8B) copy the script to /system/etc/init.d (NOTE: you will need to mount /system as RW)
9) change the permissions on the file to 755 (or rwxr-xr-x)
10) reboot and your SD cards will be swapped.
I strongly recommend doing the optional steps as if they fail for any reason, then you do NOT want to run this as a boot script.
Below is the script if you are curious what it is actually doing:
#/sys/xbin/bash
while [ `mount | grep -c sdcard` -lt 3]
do
sleep 10
done
umount /storage/sdcard0/.android_secure
umount /storage/sdcard0
umount /storage/sdcard1
mount /dev/block/vold/179:97 /storage/sdcard0
mount /dev/block/vold/179:28 /storage/sdcard1
mount -t tmpfs -o ro,seclabel,size=0k,mode=000 tmpfs /storage/sdcard0/.android_secure
man how do this does it work really want it kinda lost on how to do it
astonmartin214 said:
man how do this does it work really want it kinda lost on how to do it
Click to expand...
Click to collapse
Pretty easy... copy the files in the attached zip to /data/local/userinit.d if your kernel supports it...otherwise out it at /system/etc/init.d
I would first try running it from anywhere to verify works for though
Sent from my SM-T310 using xda app-developers app
bmg002 said:
Pretty easy... copy the files in the attached zip to /data/local/userinit.d if your kernel supports it...otherwise out it at /system/etc/init.d
I would first try running it from anywhere to verify works for though
Sent from my SM-T310 using xda app-developers app
Click to expand...
Click to collapse
don't get it still lost wish U could make a video of it
astonmartin214 said:
don't get it still lost wish U could make a video of it
Click to expand...
Click to collapse
I'll see what I can do... won't be very exciting as it is all command prompt crap...
Want me to write a pc app for it?
I'll need to look up the rules for distributing adb...
Sent from my SAMSUNG-SGH-T989 using xda app-developers app
astonmartin214 said:
don't get it still lost wish U could make a video of it
Click to expand...
Click to collapse
What part are you stuck at?
can't find the data/local or the file
astonmartin214 said:
can't find the data/local or the file
Click to expand...
Click to collapse
es file explorer then hit the second button on top to get to device, the folder is under there....might have to hit it twice
Your probably overthinking it, I looked it over and the longest process is making a backup...
what rom r u using?
ill walk u step by step if need be....
minlo said:
es file explorer then hit the second button on top to get to device, the folder is under there....might have to hit it twice
Your probably overthinking it, I looked it over and the longest process is making a backup...
what rom r u using?
ill walk u step by step if need be....
Click to expand...
Click to collapse
I'm running carbon ROM & I use es file
astonmartin214 said:
I'm running carbon ROM & I use es file
Click to expand...
Click to collapse
Did you find device with steps given?
keep in mind the carbon i bleave you running it kkat n mod steps are 4.3 based, not sure if it matters but wanted to that out....
minlo said:
Did you find device with steps given?
Click to expand...
Click to collapse
yes I did
go to data then local
reply back
---------- Post added at 08:52 PM ---------- Previous post was at 08:50 PM ----------
place unzipped scrpt file there
Run script file
I hope you already made ur backups as stated by op
---------- Post added at 09:04 PM ---------- Previous post was at 08:52 PM ----------
astonmartin214 said:
yes I did
Click to expand...
Click to collapse
still with me?
the optional steps are to verify compatibility i bleave
minlo said:
go to data then local
reply back
---------- Post added at 08:52 PM ---------- Previous post was at 08:50 PM ----------
place unzipped scrpt file there
Run script file
I hope you already made ur backups as stated by op
---------- Post added at 09:04 PM ---------- Previous post was at 08:52 PM ----------
still with me?
the optional steps are to verify compatibility i bleave
Click to expand...
Click to collapse
don't really care about backups
astonmartin214 said:
don't really care about backups
Click to expand...
Click to collapse
yeah i keep my first backup and ddriver backup
but if something happens LOL u were warned!
Did u run the script?
what's next
astonmartin214 said:
what's next
Click to expand...
Click to collapse
did they swap? i cant see the screenies good on my phone
one way to tell i bleave is settings, storage
if so we are on step 8 to make it permanant....
I dont have 8a but i have 8b on jedi rom....
hit settings in es file exp, go to root explorer, pick mount system rw
place script in location stated on 8b....
reply back
astonmartin214 said:
what's next
Click to expand...
Click to collapse
The screenshots you attached do not really show much. The root folder contents should not change, but /storage/sdcard0 and /storage/sdcard1 should change contents.
What should happen after running the script (if it was successful, I found with later builds of HellyBean I needed to do a lazy unmount and to use busybox to unmount it) is /storage/sdcard0 and /storage/sdcard1 should swap contents. So sdcard0 is normally your INTERNAL memory and sdcard1 is normally your EXTERNAL memory, so running the command should swap them.
I have not tested it on kitkat, but I believe it should work. I know that later jellybean builds used vold devices instead of mmcblk devices, but I don't think that kitkat would have removed the mmcblk device.
If you like, I can update the script to use busybox and a lazy unmount? I know to remount /data you need to use a lazy unmount as it is in use.
bmg002 said:
The screenshots you attached do not really show much. The root folder contents should not change, but /storage/sdcard0 and /storage/sdcard1 should change contents.
What should happen after running the script (if it was successful, I found with later builds of HellyBean I needed to do a lazy unmount and to use busybox to unmount it) is /storage/sdcard0 and /storage/sdcard1 should swap contents. So sdcard0 is normally your INTERNAL memory and sdcard1 is normally your EXTERNAL memory, so running the command should swap them.
I have not tested it on kitkat, but I believe it should work. I know that later jellybean builds used vold devices instead of mmcblk devices, but I don't think that kitkat would have removed the mmcblk device.
If you like, I can update the script to use busybox and a lazy unmount? I know to remount /data you need to use a lazy unmount as it is in use.
Click to expand...
Click to collapse
I think we lost him LOL
2nd time this week tried helping some noobs and they dissappear...
minlo said:
I think we lost him LOL
2nd time this week tried helping some noobs and they dissappear...
Click to expand...
Click to collapse
Lol or he figured it out... I hope that is the case
Sent from my SM-T310 using xda app-developers app

[GUIDE][HOW-TO]Use SWAP As Virtual RAM Without Partitioning SD Card

Firstly what is swap, you should know about it before
you go further
What is Swap:-
Swap space in Linux is used when the amount of
physical memory (RAM) is full. If the system needs
more memory resources and the RAM is full, inactive
pages in memory are moved to the swap space. While
swap space can help machines with a small amount of
RAM, it should not be considered a replacement for
more RAM. Swap space is located on hard drives, which
have a slower access time than physical memory.
Swap space can be a dedicated swap partition, a swap
file, or a combination of swap partitions and swap files.
Normally the swap space should be equal to the Actual
physical Ram
Click to expand...
Click to collapse
.
LEGAL WARNING-Read This before you proceed
I and XDA is not responsible for any damage done to your device..........
Click to expand...
Click to collapse
Requirements for this process:-
* Kernel which supports swap(Deviant,Hells,GNU,Merruk)etc
* Rooted galaxy y
* Busybox (atleast v1.18)
* Terminal Emulator
Click to expand...
Click to collapse
Steps to enable swap:-
1. Open any file explorer(I prefer root explorer) and create a folder and name
it swap
2. Browse to that folder and create a file named swap
3. Open terminal Emulator and type the code busybox
mkswap /sdcard/swap/swap xxxxxx
(xxxxxx is the amount in KB, eg:- 383456 = 378MB),
and this process will take time.)
4. Now we will activate the swap and to activate it type
in terminal busybox swapon /sdcard/swap/swap
5. The last step is to turn on swappiness and to do it
we write echo 100 > /proc/sys/vm/swappiness in
terminal
And now you are done to check the working of swap
type busybox free in terminal emulator.
NOTE-Last two steps are needed to be done after every boot
so it is better to make a script which can be started
from script manager......... and here is a script ready for this Swap.sh
REGARDS
You Can Rate This Thread 5 Stars......I won't ask for thank......if I deserve it..go ahead.....please do not copy the work to any other forum
Click to expand...
Click to collapse
Reserved
Feedback and WARNING by users
thewarlord said:
No confusion dude!!
Watch ur ram in task manager !! Its always in motion (increase & decrease) I think u understand that life of sd card depend on writeing amount !! Ok
If u create a swap in sd card or swap partition !! Its always write on sd card I think u r understanding my feelings!! so, It decrease the sd card life!!
Click to expand...
Click to collapse
New Method Using SWAPPER2.apk
Here the step :
go to settings -> swap place (put correct directory for
example: /sdcard/swap 128 ) bold text depend on your
swap name!
Tick "Safe Unmount" and "Safe Remount", u dont need
to turn off or turn on again before and after sharing sd
IMPORTANT!! :
go to Advanced preferences -> untick "Recreate
swap file" and "Reformat swap" MUST!!
D4rkSh4dow said:
Firstly what is swap, you should know about it before
you go further
.
LEGAL WARNING-Read This before you proceed
Steps to enable swap:-
1. Open any file explorer(I prefer root explorer) and create a folder and name
it swap
2. Browse to that folder and create a file named swap
3. Open terminal Emulator and type the code busybox
mkswap /sdcard/swap/swap xxxxxx
(xxxxxx is the amount in KB, eg:- 383456 = 378MB),
and this process will take time.)
4. Now we will activate the swap and to activate it type
in terminal busybox swapon /sdcard/swap/swap
5. The last step is to turn on swappiness and to do it
we write echo 100 > /proc/sys/vm/swappiness in
terminal
And now you are done to check the working of swap
type busybox free in terminal emulator.
NOTE-Last two steps are needed to be done after every boot
so it is better to make a script which can be started
from script manager......... and here is a script ready for this Swap.sh
REGARDS
Click to expand...
Click to collapse
you can simply use the app swapper for doing this
ok the info is good,but i hope you know about sdcard lifedecrease by using swap.it kills sdcards.
-CALIBAN666- said:
ok the info is good,but i hope you know about sdcard lifedecrease by using swap.it kills sdcards.
Click to expand...
Click to collapse
Sir,hav a look at OP,it says without SD Card paritition.....no use of sd card in this.....
oops my fail,anyway,have you fell a better performance?you didnt need so complex settings,just use System Control from Juwe11.
D4rkSh4dow said:
Sir,hav a look at OP,it says without SD Card paritition.....no use of sd card in this.....
Click to expand...
Click to collapse
no use of sd card ??? then where the file swap is created
internal system patition
-CALIBAN666- said:
internal system patition
Click to expand...
Click to collapse
3. Open terminal Emulator and type the code busybox
mkswap /sdcard/swap/swap xxxxxx
I don't think so
and it is galaxy y section sir we don't have internal memory to install enough apps so where to create a swap folder
apps???????its about ram,dude
sangalaxy said:
no use of sd card ??? then where the file swap is created
Click to expand...
Click to collapse
I meant no need of sd partition........why don't you read the whole post again before posting smthng
-CALIBAN666- said:
apps???????its about ram,dude
Click to expand...
Click to collapse
yes I know sir but you said the swap folder is in internel memory so iwas just pointing out that we only have 190mb data folder and no internel sd partotion
---------- Post added at 01:03 PM ---------- Previous post was at 01:01 PM ----------
D4rkSh4dow said:
I meant no need of sd partition........why don't you read the whole post again before posting smthng
Click to expand...
Click to collapse
yes I know friend but partition or not you have to create a swap folder in sd card which serves as a virtual partition
bro apps are not the same like ram,google for more infos.
Or do a xda search
-CALIBAN666- said:
bro apps are not the same like ram,google for more infos.
Click to expand...
Click to collapse
yes I know sir but iam not saying about the apps ok lets make it clear by using your method we create a folder named swap in the sdcard and it serves as a virtual rom right??
and I was only saying that as caliban666 said continuos read and write in sdcard will decrease its life whether it is a partion or a folder
sangalaxy said:
yes I know sir but iam not saying about the apps ok lets stop this its going outoff topic
Click to expand...
Click to collapse
Yes,u r rite.....btw if u tried it u can post some ss here
I'll add to the OP
D4rkSh4dow said:
Yes,u r rite.....btw if u tried it u can post some ss here
I'll add to the OP
Click to expand...
Click to collapse
sorry about ss friend anyway thanks for the post
i dont know but has anyone read this"tweak"?it creates a swap part on sd,otherwise its not fully working.
-CALIBAN666- said:
i dont know but has anyone read this"tweak"?it creates a swap part on sd,otherwise its not fully working.
Click to expand...
Click to collapse
Did you tried it sir?
no i didnt need to use it,all what i need to know i see,the other thing is swap is buggy for some roms and kernel(my expierence and opinion).

[method] change play store download location

Hi guys, today i am here to tell you a method only tested on a galaxy y, but i hope it will work for all. this is a method to change the download location for play store.
WARNING!!!
1. WARRANTY IS NOW VOID.
2. NOT MY PROBLEM IF SOME APP FAIL.
3. PLEASE, PLEASE, PLEASE DO A NANDROID BACKUP BEFORE THIS.
This is a simple code but it needs root for sure. now the necessities are as follows:
1. A complete nandroid backup
2. Root Permissions
3. Any terminal emulator. e.g https://play.google.com/store/apps/details?id=hecticman.jsterm
4. You need to know the default download location and the mount point of sd card( if that is where you want the new download location )
Now let's start.
Just know this that mnt/sdcard will have to be replaced by your sdcard mount point and data/app will have to be replaced by the default download location. i underlined them for easy understanding.
NOT MY PROBLEM IF THIS FAILS AND YOUR PLAY STORE CRASHES. JUST DO A NANDROID RESTORE.
THERE WILL ALREADY BE A $ AT START SO U DON'T HAVE TO PUT IT.
$ su
# mkdir /mnt/sdcard/playstore
# cp -r /data/app/* /mnt/sdcard/playstore
# rm -rf /data/app
# ln -s /mnt/sdcard/playstore /data/app
Click to expand...
Click to collapse
what the code does:
1. Grant super user permissions
2. Make a directory in sdcard named playstore.
3. Copy all items (recursively) from data/app to sdcard/playstore
4.Symlink the new location to fake the original.
Hitting Thanks can help.
and once again PLEASE BACKUP BEFORE THIS AND RESTORE IF NOT SUCCESSFUL.
This is based on the code used by link2sd.
Could you please double check your code fragments?
For me it looks, like you create a directory "playstore", but then copy to a directory "playstore-temp", which will most like not exist at that moment.
The ln you're using can't realy work as long as the /data/app directory is still in place... so you would first need to delete /rename it.
Just my 2¢
thanks dude
DThought said:
Could you please double check your code fragments?
For me it looks, like you create a directory "playstore", but then copy to a directory "playstore-temp", which will most like not exist at that moment.
The ln you're using can't realy work as long as the /data/app directory is still in place... so you would first need to delete /rename it.
Just my 2¢
Click to expand...
Click to collapse
looks like i was drunk making so much mistakes . corrected it.
It's not so simple if you use Link2SD. If you link some apps to sdext partition, some files in /data/app are symlinks which cannont be copied to /mnt/sdcard/playstore as it's FAT32. You have to try to symlink /app/data to folder on sdext partition. Create a folder /data/sdext2/playstore, copy /data/app/* there, delete /data/app and symlink /data/sdext2/playstore as /data/app. Sdext partition uses linux filesystem and all symlinks should work properly. I haven't tested it yet, but will do in a minute.
EDIT:
It doesn't work with Link2SD. Phone hangs on boot. It's probably cause Link2SD app must be directly in internal memory (so in real /data/app, not symlinked). I'll try to symlink /data/data or /data/dalvik-cache to save some internal memory but I doubt it'll work.

Finding /system in /proc/mounts

hello, I need to mount to the system as R/W in order to delete a file in my root directory, but I can't find the right location I order to mount it with my terminal. I'm rooted with Magisk and Busybox
thx
shaitan240 said:
hello, I need to mount to the system as R/W in order to delete a file in my root directory, but I can't find the right location I order to mount it with my terminal. I'm rooted with Magisk and Busybox
thx
Click to expand...
Click to collapse
I got full control I use totale comandet give it root in settings of the app then u can delete any thing u want
roadkill42 said:
I got full control I use totale comandet give it root in settings of the app then u can delete any thing u want
Click to expand...
Click to collapse
I found "total commander" in the play store, if it's that one, thank you it really worked
shaitan240 said:
I found "total commander" in the play store, if it's that one, thank you it really worked
Click to expand...
Click to collapse
Yep that's it kinda dos looking I think easier then any others u can even drag and drop wifi file transfer to
shaitan240 said:
hello, I need to mount to the system as R/W in order to delete a file in my root directory, but I can't find the right location I order to mount it with my terminal. I'm rooted with Magisk and Busybox
thx
Click to expand...
Click to collapse
For future issues:
Magisk mirrors all relevant partitions under /sbin.
The path to the block device /system is (only for system_as_root devices!!)
Code:
/sbin/.magisk/block/system_root
and it's mounted under
Code:
/sbin/.magisk/mirror/system_root
If you want to mount /system as r/w, you need this command
Code:
mount -o rw,remount -t ext4 /sbin/.magisk/block/system_root /sbin/.magisk/mirror/system_root
WoKoschekk said:
For future issues:
Magisk mirrors all relevant partitions under /sbin.
The path to the block device /system is (only for system_as_root devices!!)
and it's mounted under
If you want to mount /system as r/w, you need this command
Click to expand...
Click to collapse
Thank you this is exactly what I was looking for, but the other method worked for me too
But it is appreciated

Categories

Resources