[Q] how can i enable/disable zram on nightelf - Sony Ericsson Xperia Neo, Pro

How can i enable or disable zram on nightelf kernel??????
And how do i know if it is enabled or not now??

ALI 9 said:
How can i enable or disable zram on nightelf kernel??????
And how do i know if it is enabled or not now??
Click to expand...
Click to collapse
Search first or use google !!!!
Sent from my Neo V with Supercharged ICS 4.0.4

How to make simple ZRAM init.d script
1. Using Root Explorer, got to /sytem/etc/
init.d/
2. press Menu then create new file
3. paste these in it
#!/system/bin/sh
sysctl -w vm.swappiness=40
echo "1" > /sys/block/zram0/reset
echo $((50*1024*1024)) > /sys/block/zram0/disksize
mkswap /dev/block/zram0
swapon /dev/block/zram0
4. close and save it as 60ZRAM
5. set permission to 777 or "rwxrwxrwx" (tick
all)
6. take note: 50 *1024*1024 = 50MB zram
disksize. if you want to set 30MB, change 50
to 30.
To check download terminal emulator and type
su
free
if you see swap memory, that means thats activated
Source:
http://forum.xda-developers.com/showthread.php?t=1630532

F.A.I.S.A.L said:
How to make simple ZRAM init.d script
1. Using Root Explorer, got to /sytem/etc/
init.d/
2. press Menu then create new file
3. paste these in it
#!/system/bin/sh
sysctl -w vm.swappiness=40
echo "1" > /sys/block/zram0/reset
echo $((50*1024*1024)) > /sys/block/zram0/disksize
mkswap /dev/block/zram0
swapon /dev/block/zram0
4. close and save it as 60ZRAM
5. set permission to 777 or "rwxrwxrwx" (tick
all)
6. take note: 50 *1024*1024 = 50MB zram
disksize. if you want to set 30MB, change 50
to 30.
To check download terminal emulator and type
su
free
if you see swap memory, that means thats activated
Source:
http://forum.xda-developers.com/showthread.php?t=1630532
Click to expand...
Click to collapse
i did all but when i enter
su
free
on terminal it says nt found.. using nightelf 1.5 . any suggestion ?

Then try SetXperia.
No need for scripting.
Just choose "Make swap on boot", set your method in "Edit", e.g. ZRAM, set your size (e.g. 64MB, all above is not recommended), set swappiness (40), reboot, done! :good:

c1ph4 said:
Then try SetXperia.
No need for scripting.
Just choose "Make swap on boot", set your method in "Edit", e.g. ZRAM, set your size (e.g. 64MB, all above is not recommended), set swappiness (40), reboot, done! :good:
Click to expand...
Click to collapse
i hv got a 50 mb swapfile on system ... How to use it? Will it give me more free ram?

@Suranjan16049:
No, RAM is from the manufacturer of the phone. Should be 512MB in Xperia Neo V. Not upgradeable.
Swap will be used if RAM is full. It's Linux-specific. Not needed with modern kernels though.

Related

[MOD] Increase RAM memory size(without swapper!) (good for gaming)

Hi, here is a good mod specially for gaming and ICS roms which consumes big memory amount!!!
It is basically an .sh script that enables swapping. This makes device use part of sdcard to use it as RAM memory, so it can be increased a lot...
The only requirement is have root, use relatively fast sdcard and have enabled init.d scripts..
WI always have used this mod on my phone so i think it no needs testing
To it follow these steps:
1.- Root your device
2.- Make a swap partition in your sdcard (this step will format your sdcard!)
http://forum.xda-developers.com/wiki/SD_card_partitioning
2.1-In step 3 select "swap partition"
2.2-I recommend to make ~512MB partition because the SO will be going to fill it during you use the phone, but i always had 1GB partition, and no problems You can select 100MB or 50MB, but this is too little
3.- Check if there is a folder called init.d inside /system/etc/
3.1-If its there, follow next steps
3.2-If it is not there, you must activate init.d support, follow this tutorial: http://forum.xda-developers.com/showthread.php?t=1422061
3.- Copy 00userinit file to your device (must remove the .txt extension of the file, because i needed to put it to attatch the file)
4.- With root explorer, xplore, or similar copy it to /system/etc/init.d
5.- Set all permissions: rwxr-xr-x
6.- Reboot device
7.- For checking if it works, download Terminal emulator and type "free". See attatchment.
8.- If "swap" line has no "0" value, it works, congratulations
Click to expand...
Click to collapse
With this, you will:
Have swapping activated in your phone permanently, or until you remove that script or change of ROM.
Have bigger RAM memory amount, depending on your swap partition size
If you use supercharger or any RAM manager program, i should recomend you to activate hard gaming option, because:
-As you have bigger RAM memory, the useless aplications, instead of be closed, they will be stored in your sdcard partition so, you re able to have multitasking and hard gaming option at the same time
Click to expand...
Click to collapse
But this is not all!! You can open and edit this file to adapt it to your requirements:
You can edit this line to set swapiness cuantity, this defines the OS tendency to use swap partition, I not recommend to set it to 100, but 60 is good. Also, if you have slower sdcard, you should set it to 30~40:
-Change 60 value by something you want from 1 to 100 "then echo 60 > /proc/sys/vm/swappiness;"
If you have another sdcard partition like EXT4 or something to APP2SD, you should change the last number of "mmcblk0p2" by the number of the partition, i mean:
-If you have 3 partitions with this order: Fat32(that you use everyday), EXT4, and SWAP you should change it by mmcblk0p3
-If 3 partitions with this order: Fat32, SWAP,and EXT4, you should set it mmcblk0p2
Click to expand...
Click to collapse
I forgot it! To use this, remember that you should:
INSTALL THE LATEST BUSYBOX VERSION!!!
Click to expand...
Click to collapse
-----------------------------------------------------------------------------------------------------------------------------------------------------------------
FOR THOSE WHO HAVE NOT WORKING, DELETE 00userinit and follow the steps with 01userinit attatched file
Isnt this much like swapfipe/partition?
Sent from my R800i using xda app-developers app
Does it works on locked bootloaders, obviously on gingerbread??????
i already have linux swap partition and use "swapper 2 " with doom kernel
after using swap we should disable ( turn off ) the swapper2 and then mount the SD card to computer ... so , my question is , is your script the same ? or it can disable - enable itself automatically ?
romeo_charly said:
Does it works on locked bootloaders, obviously on gingerbread??????
Click to expand...
Click to collapse
Locked or Unlocked shouldn't make a difference as long as you have Init.d support
Sent from my R800i using XDA APP and NXT2JB
bamsbamx said:
Hi, here is a good mod specially for gaming and ICS roms which consumes big memory amount!!!
It is basically an .sh script that enables swapping. This makes device use part of sdcard to use it as RAM memory, so it can be increased a lot...
The only requirement is have root, use relatively fast sdcard and have enabled init.d scripts..
WI always have used this mod on my phone so i think it no needs testing
To it follow these steps:
With this, you will:
But this is not all!! You can open and edit this file to adapt it to your requirements:
I forgot it! To use this, remember that you should:
Click to expand...
Click to collapse
Will this reck your phone in the long run
extremetempz said:
Will this reck your phone in the long run
Click to expand...
Click to collapse
This can't 'wreck a phone' but it can make the life of the SDCARD shorter.
sewer56lol said:
This can't 'wreck a phone' but it can make the life of the SDCARD shorter.
Click to expand...
Click to collapse
That is what says some people, but i always have used it and no problems...
In addition, sdcard life is sure longer than 10 years, if you use swap constantly it could be reduced to7 or 8...
Then, it makes no sense to say that, because you probably will buy another sdcard in less than 5 years
I tried this without success. I had to change the script that you provided. First I added #!/system/bin/sh to line 1 so it would run as a shell script and then the partition on my device was /dev/block/mmcblk0p3. I had to do the following to figure out which partition on my sdcard was actually set as swap. Once I edited the script with the addition to line 1 and the correct partition everything worked as expected.
Code:
~ # su
[email protected]:/ # fdisk -l /dev/block/mmcblk0
Disk /dev/block/mmcblk0: 31.9 GB, 31914983424 bytes
255 heads, 63 sectors/track, 3880 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Device Boot Start End Blocks Id System
/dev/block/mmcblk0p1 1 3818 30666992 c Win95 FAT32 (LBA)
/dev/block/mmcblk0p2 3818 3849 250000 83 Linux
/dev/block/mmcblk0p3 3850 3880 249007+ 82 Linux swap
And my 00userinit script looks like:
Code:
#!/system/bin/sh
if [ -n /dev/block/mmcblk0p3 ];
then mkswap /dev/block/mmcblk0p3;
fi;
if [ -e /dev/block/mmcblk0p3 ];
then echo 60 > /proc/sys/vm/swappiness;
swapon /dev/block/mmcblk0p3;
fi;
I'm running FXP 142 CM9.1.
jimmyvau said:
I tried this without success. I had to change the script that you provided. First I added #!/system/bin/sh to line 1 so it would run as a shell script and then the partition on my device was /dev/block/mmcblk0p3. I had to do the following to figure out which partition on my sdcard was actually set as swap. Once I edited the script with the addition to line 1 and the correct partition everything worked as expected.
Code:
~ # su
[email protected]:/ # fdisk -l /dev/block/mmcblk0
Disk /dev/block/mmcblk0: 31.9 GB, 31914983424 bytes
255 heads, 63 sectors/track, 3880 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Device Boot Start End Blocks Id System
/dev/block/mmcblk0p1 1 3818 30666992 c Win95 FAT32 (LBA)
/dev/block/mmcblk0p2 3818 3849 250000 83 Linux
/dev/block/mmcblk0p3 3850 3880 249007+ 82 Linux swap
And my 00userinit script looks like:
Code:
#!/system/bin/sh
if [ -n /dev/block/mmcblk0p3 ];
then mkswap /dev/block/mmcblk0p3;
fi;
if [ -e /dev/block/mmcblk0p3 ];
then echo 60 > /proc/sys/vm/swappiness;
swapon /dev/block/mmcblk0p3;
fi;
I'm running FXP 142 CM9.1.
Click to expand...
Click to collapse
Dont know what happened, the script I provided works for me, maybe you had to add that because you are running CM...
And what you say about partition number, I already stated that in original post.... thanks for reporting
Which is better
Is this MOD better than the ROEHSOFT ram expander
af230 said:
Is this MOD better than the ROEHSOFT ram expander
Click to expand...
Click to collapse
i think its different, i dont know how does it work, but reading its description I think that this app creates a swap file, instead of using swap partition.. I think this is worse method than i have posted, because system compresses all swapped memory into a file,so it could be slower... In addition, you must install an app to make it work, which means a service running in background, less space for other apps, etc,etc...
I dont know, but i think my method is better
in theory should this work on any phone?
evol4g said:
in theory should this work on any phone?
Click to expand...
Click to collapse
Yes, because android is based in linux
Is there a way u could do this without wiping the sd card?
Hello, can you tell us how this interferes with z-ram? I have z ram init.d script activated also. What is your recomandation? Turn it off or keep them both? Thx
CyberScopes said:
Is there a way u could do this without wiping the sd card?
Click to expand...
Click to collapse
Yes. I never partition from my phone. Insert ur card into ur laptop and partition with paragon partition manager (or your choice). If you have some free space on it you could easily resize ur fat32 partition to make it smaller and then use the unpartitioned space to make a linux swap partition or en ext2/3 for link2sd, if u want (I have both).. Did it lots of times. No problem
---------- Post added at 11:11 AM ---------- Previous post was at 11:06 AM ----------
jimmyvau said:
I tried this without success. I had to change the script that you provided. First I added #!/system/bin/sh to line 1 so it would run as a shell script and then the partition on my device was /dev/block/mmcblk0p3. I had to do the following to figure out which partition on my sdcard was actually set as swap. Once I edited the script with the addition to line 1 and the correct partition everything worked as expected.
Code:
~ # su
[email protected]:/ # fdisk -l /dev/block/mmcblk0
Disk /dev/block/mmcblk0: 31.9 GB, 31914983424 bytes
255 heads, 63 sectors/track, 3880 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Device Boot Start End Blocks Id System
/dev/block/mmcblk0p1 1 3818 30666992 c Win95 FAT32 (LBA)
/dev/block/mmcblk0p2 3818 3849 250000 83 Linux
/dev/block/mmcblk0p3 3850 3880 249007+ 82 Linux swap
And my 00userinit script looks like:
Code:
#!/system/bin/sh
if [ -n /dev/block/mmcblk0p3 ];
then mkswap /dev/block/mmcblk0p3;
fi;
if [ -e /dev/block/mmcblk0p3 ];
then echo 60 > /proc/sys/vm/swappiness;
swapon /dev/block/mmcblk0p3;
fi;
I'm running FXP 142 CM9.1.
Click to expand...
Click to collapse
I had to add the first line too. Thx for the tip. I'm on stock (NXT 1.3 flavour )
Works
+1 For you good sir
Will this be any good on GB for daily use, I'm always short on RAM on my SGS+
Whether Thise need what memory class 2 best performance?and thise damage on sd or not?
Sent from my R800i using Tapatalk 2

Basic L9 Overclocking instruction

This is the instruction originally posted by kevev in the other thread. I am reposting it here for others to find it easier.
--------------------------------------------------------------
1.) Root your device.
2.) Download to your device "overclock.zip" from this thread:
http://forum.xda-developers.com/showthread.php?t=1961989
3.) Install "AndroZip File Manager" from the Play store.
4.) Run AndroZip and browse to overclock.zip. (Probably /mnt/sdcard/Download .)
5.) tap on the file "overclock.zip" and select "Extract file here".
(A new directory named "overclock" is created)
6.) Install "ES File Explorer File Manager" from the Play store.
7.) Run ES File Explorer and press your "menu" button then select "settings".
8.) Change these settings:
Home Directory = /
Root settings --> Check all boxes
9.) Press the "back" button until the app exits.
10.) Run ES File Explorer again.
(Now your root partition "/" should be mounted with read/write permissions.
11.) Browse to the overclock directory. (Probably /mnt/sdcard/Download/overclock/ .)
12.) Long press on the cpu_control.ko file and a menu should open. Select "copy".
13.) Browse to the /system/lib/modules/ directory .
14.) Press "menu" button and select "Operations" then select "Paste" .
15.) Long press on the cpu_control.ko file and a menu should open. Select "Properties".
16.) Press "Change" and check the boxes like this:
User: read write
Group: read
Other: read
17.) Perform steps 12-17 on the symsearch.ko file which is also in the overclock directory.
18.) Install "Rom Toolbox Lite" from the Play store.
19.) Run ROM Toolbox Lite and select "Scripter".
20.) Press the "+" symbol in the top right corner and select "Create" to add the overclock script.
21.) Name it "overclock" or whaterver you wish.
22.) In the "Commands:" field enter this:
insmod /system/lib/modules/symsearch.ko
insmod /system/lib/modules/cpu_control.ko
echo 0 300 980 > /proc/cpu_control/tweak_cpu
echo 1 600 1200 > /proc/cpu_control/tweak_cpu
echo 2 800 1300 > /proc/cpu_control/tweak_cpu
echo 3 1200 1370 > /proc/cpu_control/tweak_cpu
23.) Your phone will overclock to 1.2Ghz.
If you wish to overclock higer you can try changing 1200 in the last line to 1300 for 1.3Ghz.
24.) Press the floppy disk in the top right corner to save the script.
25.) Press the overclock script and a menu will open. Select "Run Script".
If everything worked you should see an "exit valut:0" message.
If you run the script again you will see the same value but with a warning message.
This is normal since the modules are already loaded.
26.) You can load a cpu monitoring app to see if the overclocking works or just create another script that displays cpu clock info.
Here is the command for that script:
cat /proc/cpu_control/opp_table_current
27.) After making sure your device is stable you can have the overclock script run automatically at boot.
Press the "overclock" script and a menu will open.
Press "Set at boot"
Reboot the device and you will see a notification that the script ran in the notification area of the device at top.
All credits go to iodak and the thread created here: http://forum.xda-developers.com/show....php?t=1961989
I have been using slightly different apps to make the phone set to overclock automatically after a boot, I use 'SManager' app to edit and save the script (there is a free version) to run the script after a boot up.
Then I also use "CPU Master"(free version) to control the upper frequency set and the scaling method. I have been using 'interactive'.
With those two apps, the phone will boot up after a reset to the proper frequency and be ready to go automatically.
Try the following script if you want to try to push it to 1300MHz.
Code:
#! /system/bin/sh
insmod /system/lib/modules/symsearch.ko
insmod /system/lib/modules/cpu_control.ko
echo 0 333 830 > /proc/cpu_control/tweak_cpu
echo 1 666 1050 > /proc/cpu_control/tweak_cpu
echo 2 999 1150 > /proc/cpu_control/tweak_cpu
echo 3 1300 1340 > /proc/cpu_control/tweak_cpu
You can try 1220Mhz on 1270mV. For me it is more stable then on 1200Mhz and 1360mV.
luq529 said:
You can try 1220Mhz on 1270mV. For me it is more stable then on 1200Mhz and 1360mV.
Click to expand...
Click to collapse
Were you having problems at 1200MHz and 1360mV? I'm just curious how one determines one set up is more stable than the others.
I have tried running SetCPU stress tests before but that test either runs fine or ends with a lock up.
Thank You csrow for mentioning me.
My P769 would not run stable @ 1200Mhz so I removed the overclock. I may have bad hardware because it has been rebooting randomly at stock clock speeds. This is my 3rd L9. My wife is on her 3rd also.
csrow said:
Were you having problems at 1200MHz and 1360mV? I'm just curious how one determines one set up is more stable than the others.
I have tried running SetCPU stress tests before but that test either runs fine or ends with a lock up.
Click to expand...
Click to collapse
I don't know why. On this settings I have 8200 points in Antutu. Maybe 1220 Mhz is better for our processor.
my current stable voltages
Code:
echo 0 300 830 > /proc/cpu_control/tweak_cpu
echo 1 600 860 > /proc/cpu_control/tweak_cpu
echo 2 800 890 > /proc/cpu_control/tweak_cpu
echo 3 1000 950 > /proc/cpu_control/tweak_cpu
csrow said:
http://forum.xda-developers.com/show....php?t=1961989
Click to expand...
Click to collapse
Link is dead :'[
adixtra said:
my current stable voltages
Code:
echo 0 300 830 > /proc/cpu_control/tweak_cpu
echo 1 600 860 > /proc/cpu_control/tweak_cpu
echo 2 800 890 > /proc/cpu_control/tweak_cpu
echo 3 1000 950 > /proc/cpu_control/tweak_cpu
Click to expand...
Click to collapse
How do you do that ?! That's amazing from 1388 to 950. I will try it soon.
Jrkoffjonson said:
Link is dead :'[
Click to expand...
Click to collapse
Fixed the link. Try again.
Now we have full working CWM 6 for L9, is it by any chance possible to make flashable zip for overclocking and a zip for reverting back to default clock settings?
Which are the best settings to save more battery life??
Any way to overclock also gpu?
Does anyone know the default voltage for L9?
klhk said:
Does anyone know the default voltage for L9?
Click to expand...
Click to collapse
Here the default voltages.
echo 0 300 1025 > /proc/cpu_control/tweak_cpu
echo 1 600 1200 > /proc/cpu_control/tweak_cpu
echo 2 800 1325 > /proc/cpu_control/tweak_cpu
echo 3 1000 1388 > /proc/cpu_control/tweak_cpu
These are my voltages:
Code:
echo 0 300 830 > /proc/cpu_control/tweak_cpu
echo 1 600 830 > /proc/cpu_control/tweak_cpu
echo 2 800 840 > /proc/cpu_control/tweak_cpu
echo 3 1000 860 > /proc/cpu_control/tweak_cpu
They seems crazy low compared to stock but I tested them one by one (set governor to fixed frequency) and they were all stable for 20 minutes of stability test (classic test).
I verified they were successfully applied running "cat /proc/cpu_control/opp_table_current"
I played also fifa 12 for 15 minutes with interactive governor min 300 max 1000 and system was stable.
How can it be?
This is my setting, i will try lower voltage later.
echo 0 300 850 > /proc/cpu_control/tweak_cpu
echo 1 600 880 > /proc/cpu_control/tweak_cpu
echo 2 800 920 > /proc/cpu_control/tweak_cpu
echo 3 1000 1000 > /proc/cpu_control/tweak_cpu
Sent from my LG-P765 using xda app-developers app
I have V10H firmware and now overclock script don't work...It says:
Finished executing script file
exit value: 1
stdout:
null
stderr:
insmod: init_module '/system/lib/modules/symsearch.ko' failed (Exec format error)
insmod: init_module '/system/lib/modules/cpu_control.ko' failed (Exec format error)
/data/data/com.jrummy.liberty.toolboxpro/files/tmp.sh[4]: cannot create /proc/cpu_control/tweak_cpu: No such file or directory
/data/data/com.jrummy.liberty.toolboxpro/files/tmp.sh[5]: cannot create /proc/cpu_control/tweak_cpu: No such file or directory
/data/data/com.jrummy.liberty.toolboxpro/files/tmp.sh[6]: cannot create /proc/cpu_control/tweak_cpu: No such file or directory
/data/data/com.jrummy.liberty.toolboxpro/files/tmp.sh[7]: cannot create /proc/cpu_control/tweak_cpu: No such file or directory
what to do ?
wlado93 said:
I have V10H firmware and now overclock script don't work...It says:
Finished executing script file
exit value: 1
stdout:
null
stderr:
insmod: init_module '/system/lib/modules/symsearch.ko' failed (Exec format error)
insmod: init_module '/system/lib/modules/cpu_control.ko' failed (Exec format error)
/data/data/com.jrummy.liberty.toolboxpro/files/tmp.sh[4]: cannot create /proc/cpu_control/tweak_cpu: No such file or directory
/data/data/com.jrummy.liberty.toolboxpro/files/tmp.sh[5]: cannot create /proc/cpu_control/tweak_cpu: No such file or directory
/data/data/com.jrummy.liberty.toolboxpro/files/tmp.sh[6]: cannot create /proc/cpu_control/tweak_cpu: No such file or directory
/data/data/com.jrummy.liberty.toolboxpro/files/tmp.sh[7]: cannot create /proc/cpu_control/tweak_cpu: No such file or directory
what to do ?
Click to expand...
Click to collapse
Try running the insmod commands from the terminal and let us know what you see. Also, try replacing the modules. Maybe they are corrupt.
well, I downloaded new modules from link in 1st post modules L9 10h 1398mV 3.0.21-00001-gd335ca33.zip
now it works

[Q] How to configure zRam

hello..
I'm using xperia active and I want to configure the zRam..
I currently on stock ICS rom. I use Diskinfo apps to check ram swap and it shows i have 60mb ram swap for default. but i didn't apply any zRam or swap script yet. So use this script to configure the zRam
#!/system/bin/sh
sysctl -w vm.swappiness=60
echo '1' > /sys/block/zram0/reset
echo $((30*1024*1024)) > /sys/block/zram0/disksize
mkswap /dev/block/zram0
swapon /dev/block/zram0
and set it in init.d (i have activate the init.d). I try to set lower value than 60mb which is 30mb but I can't see any changes when I check back at Diskinfo apps..I also check it using terminal emulator by typing "free" but it still same as shown Diskinfo.. Is there any other method can I use to configure the zRam?
p/s : sorry for bad english
pojhe said:
hello..
I'm using xperia active and I want to configure the zRam..
I currently on stock ICS rom. I use Diskinfo apps to check ram swap and it shows i have 60mb ram swap for default. but i didn't apply any zRam or swap script yet. So use this script to configure the zRam
#!/system/bin/sh
sysctl -w vm.swappiness=60
echo '1' > /sys/block/zram0/reset
echo $((30*1024*1024)) > /sys/block/zram0/disksize
mkswap /dev/block/zram0
swapon /dev/block/zram0
and set it in init.d (i have activate the init.d). I try to set lower value than 60mb which is 30mb but I can't see any changes when I check back at Diskinfo apps..I also check it using terminal emulator by typing "free" but it still same as shown Diskinfo.. Is there any other method can I use to configure the zRam?
p/s : sorry for bad english
Click to expand...
Click to collapse
Try running the script in ScriptManager or in Terminal (will need to be run as su). Any errors you see will also be occurring when the init.d script runs. If there aren't any errors and you reset your swap space then maybe your init.d isn't set up correctly. If you lose your new settings during a reboot, then something in the kernel or ROM is setting these values after init.d runs.
This is really weird, i got the same problem with stock kernel. Before, i thought swap wasn't even supported, but it's set in stock kernel, i can't modify it either, but i'm glad i have it on my locked bl, i thought it was impossible.
justmpm said:
Try running the script in ScriptManager or in Terminal (will need to be run as su). Any errors you see will also be occurring when the init.d script runs. If there aren't any errors and you reset your swap space then maybe your init.d isn't set up correctly. If you lose your new settings during a reboot, then something in the kernel or ROM is setting these values after init.d runs.
Click to expand...
Click to collapse
I found it.. the default zRam script actually located at /system/bin/zram_start.sh. So I just edit this script to adjust the desired value of zRam.. Thanks mate!
pojhe said:
I found it.. the default zRam script actually located at /system/bin/zram_start.sh. So I just edit this script to adjust the desired value of zRam.. Thanks mate!
Click to expand...
Click to collapse
Nice, what did you edit? I want to set it to 128

ZRAM? How to edit disksize?

I have a Kata Box 2 with s905 SoC with 1GB of ram
My current ZRAM value is set at 500MB with a swappiness of 60%
I can disable zram or change the swappiness of my ZRAM but I cant seem to change the disk size.
I tried this in the terminal with su
swapoff /dev/block/zram0
echo 1 > /sys/block/zram0/reset
busybox echo 157286400 > /sys/block/zram0/disksize <- I want to lower it from 500mb to 150mb
mkswap /dev/block/zram0
swapon /dev/block/zram0
I checked the value of /sys/block/zram0/disksize and its still set at 500mb or nothing has changed.
I tried to edit the manually but its not saving at all.

Enable swap

Dear developers,
When porting roms, I see that some roms enable swap by an init.d script (below is an example) or directly from boot.img. When I searched swap, I found that it is usefull for phones which have less than 700mb ram. But what about a phone with 1Gb ram, is it still usefull or will it use much more battery? What do you suggest for 1Gb ram, enable swap or disable it?
Thanks for your help.
#!/system/bin/sh
echo 536870912 > /sys/block/zram0/disksize
echo 100 > /proc/sys/vm/swappiness
/system/bin/tiny_mkswap /dev/block/zram0
/system/bin/tiny_swapon /dev/block/zram0

Categories

Resources