oneplus6T How to create Swap?
-
when use command free -h show the memory , it show Swap value is 0, how I can create the Swap and use it? anyone have the detail step? thanks!
-
@liam What is your end goal? Why are you trying to create a swap?
-
@Moem increate the memory for run the script, is that possible? or some limit in ubuntu touch?
-
@liam Sorry, I wouldn't know. I just use my phone as a phone and I've never experienced the need to create a swap.
-
Check this post out. Altering partitions in UT has a high chance of bricking the device after an update.
-
@MrT10001 thanks your response, I know how to reset the partitions, but what I want that create the swap and increase the memory, I am not sure if can work in UT.
-
@liam Our question is more: what are you hoping you can do with the 'increased' memory ( swap does not actually increase the memory available either, but that is another topic)
-
@liam wouldn't a swapfile in the userdate partition work?
-
@ikoz It would, but it is still not clear what the OP thinks they will be able to accomplish with it.
-
@ikoz I search in internet and find below solution, but not work, even memory fully used, but swap used still is 0, I don't know why.
sudo fallocate -l 8G /userdata/swapfile
sudo chmod 600 /userdata/swapfile
sudo mkswap /userdata/swapfile
sudo swapon /userdata/swapfile
sudo sysctl vm.swappiness=80