How to use my android phone's storage as Swap memory?

I have an old laptop which has just 4 gigs of RAM, recently i started using IntelliJ on my laptop. The free -m command revealed that my memory is almost full and the SWAP space was around 70%. I don't have a SD Card with me that I can use as a swap memory.

So, my question is can i use my Android phone's free memory(almost 30 Gb) as a swap space? If so, how do i do that?

Edit: I have an Ubuntu 16.04.2 installed and my phone is Android 9.

1

1 Answer

No, it's not possible. PC accesses android phone's storage via MTP, and MTP is not a block device driver. It's impossible for kernel to put a swap on it.

Your Answer

Sign up or log in

Sign up using Google Sign up using Facebook Sign up using Email and Password

Post as a guest

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

You Might Also Like