janithcooray / lin_os_swap_mod Goto Github PK
View Code? Open in Web Editor NEWincreases the SWAP memory by an additional 4GB or 8GB for Android 7.0 or above
License: GNU General Public License v3.0
increases the SWAP memory by an additional 4GB or 8GB for Android 7.0 or above
License: GNU General Public License v3.0
Hi, actually I liked your module and wanted to know if there will be update for it? thx
module working fine on my redmi 10c with cherish os, i use the swapped ram to boot some games on skyline emulator (the app crash without it). the rom already come with 2gb on the swap partition, and the total of 6gb is too much for me.
2 additional gb is probably enough, i prefer to have a bit more of storage tbh.
id=lin_os_swap_mod
name=Lineage OS SWAP mod
version=v1.2 <---------- here
versionCode=3
author=janithcooray
description=Enable / Change Swap config for Android 7+
template=3
Unzip error
This is not an issue, i have only some questions.
Why you prefer to use swap and not zram? Why we should use swap and not zram? Is better zram or swap? For battery is better zram or swap?
There is not a clear answer in the net.
Thanks
Hi,
Thanks for the great work.
I'm rather new to all this so please be patient with my following question.
Where can i find the zip file to install the module?
On https://xdaforums.com/t/mod-swapfile-mod-7-0-magisk-module.4607727/ page the download links deliver a "not found" message.
Thanks,
Take care,
Robert
Samsung A51 device with rom lineage os uses a very small amount of swap, in the amount of several megabytes, while there is 10 gigs (2 gigs system + 8 gigs swap magisk) of memory!
I have installed the module of 4GB swap file and have selected yes(volume up) when I was asked for setting swpa priority over ZRAM.
But when I run the command "cat /proc/swaps" in terminal after installing module, there it is shown that it's priority is zero and is 0 is being used from it rather only ZRAM is being used, I am attaching the screenshot of terminal.
But in the module, in customize.sh file it is written that when selecting Yes in choosing priority, it must be set to priority 1 rather than 0 which is showing in my case. This is my understanding and pardon me if I don't know if it is like that.
And one more question it says 'Setting swappiness to 99' but in next line it says vm.swappiness=75. Does this mean that swappiness is actually setting to 75 or it just shows 75 when swappiness is 99?
I downloaded https://github.com/janithcooray/lin_os_swap_mod/archive/refs/tags/v1.3.1-2.zip
Also tried 1.3.1 and 1.3
I have 8G of free space
The readme and script both have language that seems to indicate that the script will increase (add to) the current swapfile size by the selected size.
In the readme, it says "...enables or increases the SWAP memory..."
Line 8 in 4c73bd5
Vol Up += 8GB
and Vol Down += 4GB
, as if it's adding to and setting the swapfile size with common C programming operators.lin_os_swap_mod/module/customize.sh
Lines 25 to 26 in 4c73bd5
However, this is not true. Reading into the source, volume up and down changes SWAP_BIN_SIZE
to specific values, which are not changed, and are instead directly used to set the size of the new swapfile.
lin_os_swap_mod/module/customize.sh
Lines 27 to 33 in 4c73bd5
lin_os_swap_mod/module/customize.sh
Lines 57 to 62 in 4c73bd5
It's possible this language is used in other places too (like descriptions in module repos). In all cases it should be rephrased to more clearly state that the module creates a swapfile with a size of either 4GB or 8GB.
If I'm wrong and the module is actually supposed to add more swap, then language should still be clarified in the module.prop, which conflicts with the aforementioned descriptions, implying that it allows you to change the swap size (as in replace the current value), which is a narrower meaning than is currently presented.
lin_os_swap_mod/module/module.prop
Line 6 in d3de2b4
In the line ui_print "- Crating a swpafile of $SWAP_BIN_SIZE MB", "Crating" should be corrected to "Creating", and "swpafile" to "swapfile".
In the line ui_print "- Please keep the screen on during installtion", "installtion" should be corrected to "installation".
Hey, I have some questions regarding how to use it. Question 1: Would this also work on Pixel Experience?
Question 2: What do I need to flash, the lin_os_swapmod or the swapfile_mod?
Question 3: If I disable and remove the module would everything return to the way it was configured before or would it permanently change things on my Phone? I want to see if it works on my Phone, but I don't want to risk breaking my current ROM Installation, as I could disable the Magisk Module incase it boot loops, but I want to be sure that this would actually work.
Is there a way to manually set the value of priority of the the swap, because whatever value I choose the swap always get more priority than the zram
"Set Swap Priority above Zram?"
I chose "yes" and the priority of zram will be at -3 and swap at -2
I chose "no" and it zram say -2 with swap on 0
No matter what I choose, the swap is still prioritized over zram
Hi,
You still did not fix the typo error "Crating" in customize.sh. It must be "Creating".
ui_print "- Crating a swapfile of $SWAP_BIN_SIZE MB"
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.