I have created a swap partition via GNOME Disks in my SD Card and I found that my Android system doesn't detect it until I used Aparted to activate it but still It is not persistent after a reboot and I don't know how to recognize the path of my swap partition according to Android But I knew the path of my SD card via Aparted: /dev/block/mmcblk1
so I don't know how to modify fstab.qcom
for permanently using the swap partition in my SD card.
Asked
Active
Viewed 405 times
1

Mohammed Mehdi TBER
- 71
- 8
mkswap
once and then you just need to runswapon
on every boot: How to run an executable on boot? // Similar question: https://android.stackexchange.com/q/78177/218526. // Why using SD card as SWAP partition is a bad idea: https://android.stackexchange.com/a/220042/218526 – Irfan Latif Aug 21 '21 at 06:21swapon
command. You can simply hard-code the path:/dev/block/mmcblk1p[N]
in the boot script. Or to be on safe side, provide the UUID of the partition toswapon
: https://www.man7.org/linux/man-pages/man8/swapon.8.html. Build a fullswapon
binary fromutil-linux
package. Or do some scripting to get the block device path from UUID and provide that to the Android's minimalswapon
. – Irfan Latif Aug 21 '21 at 16:11/dev/block/mmcblk1p1
and swapon is working now but not persistent upon reboot. What aboutfstab.qcom
I have added/dev/block/mmcblk1p1 none swap sw 0 0
to it and it didn't work. – Mohammed Mehdi TBER Aug 21 '21 at 17:31