1

So I'm running out of space and I'd like to use link2sd to move my apps to sd card. But before that I need to create a partition on my SD card, and to do that I would have to move my files from it and keep them somewhere else temporarily, format/create a partion on the SD card, and then move the files back. I'm using a lot of apps with a lot of data that would obviously no longer be there if something happens to the files during the move.

I'm also using XinternalSD (though xposed) to automatically store some of the apps data directly on the SD card.

So basically alot of the files on the SD card aren't put there directly by me but rather through apps. I'm not sure what their write protection is and I don't want to risk losing some in the move.

I want to be able to move everything as is and move them back in a way that it would be exactly how it was before the move and nothing changes or apps not being able to detect some of the files or anything like that.

What's the best way to achieve this?

Android 7 | Rooted | Moto C Plus

Note: OS available: Ubuntu | Windows | Android

1
  • Comments are not for extended discussion; this conversation has been moved to chat.
    – Andrew T.
    Jul 30, 2022 at 7:16

1 Answer 1

2

For regular fuse/FAT file system type, there is no need to preserve file permissions, just copy all files as usual. You can check file system type by typing in mount in the terminal emulator. You will see somthing like this example:

/mnt/media_rw/149B-8301 type vfat
/storage/149B-8301 type fuse

149B-8301 is the UUID of the SD card and it shows that the file system is vfat.

To copy files regularly, run the following:

adb pull -a /storage/149B-8301 ~

advanced copy (tarball archive)

adb exec-out "tar -c storage/149B-8301 | gzip" > ~/sdcard_backup.tar.gz

copy from PC MicroSD Card Reader

cd /media/xubuntu
tar -czf ~/sdcard_backup.tar.gz 149B-8301

Note: replace ~ with path to target disk drive providing enough free disk space on PC

3
  • three different methods. first two methods are for MicroSD Card inserted in phone (will take several hours)
    – alecxs
    Mar 27, 2021 at 15:41
  • Thank you very much. Obviously for the first 2 methods (on the phone) it means I need 20 GB free space in internal memory, correct?
    – JJrussel
    Mar 27, 2021 at 16:23
  • no, it is streamed directly to PC
    – alecxs
    Mar 27, 2021 at 17:50

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .