Is it possible to install Linux on an SD card, AND use it as external storage for Android?
4
votes
1
answer
3714
views
I'd like to install a bootable Linux system on a micro SD card, **AND** be able to use it as external storage for other devices, such as my Android phone.
The plan: Linux ARM on a Raspberry Pi 4.
If I insert an SD card (with Arch Linux ARM installed) into my phone, Android only detects the first partition of the SD card (the boot partition). The desired outcome is to mount my home partition with my music, and not the boot partition.
I have thought of 2 possible solutions:
1. Find an Android file manager app that can access the 3rd partition (home)
2. Make the first partition my home partition, and then the boot partition as the second, root as 3rd.
No luck with the first solution, and I really don't know how to approach the 2nd solution with a successful boot, and I can't install the system via USB, as Raspberry Pi doesn't support it.
## Working solution, adding to Philip Couling's insight ##
I could not get Android to read a 2nd partition, no matter the filesystem (at least unrooted), so I deduced that the only choice I had based on my tests were to expand my boot partition, my first partition.
Android was able to read vFAT, but was not able to boot Linux (Raspberry Pi 4), but your mileage may vary. It was able to boot from FAT32.
I think the best possible file system available to be both read by Android, and to be bootable with a Raspberry Pi 4 is FAT32. Unfortunate, but it will get the job done.
My OSes of choice were either Manjaro or Arch, but their default installations make the boot partition FAT16. I was able to change it to FAT32 with the help of GParted, and remained bootable. It was crucial to make sure making sure the labels were identical for Manjaro to be able to boot (BOOT_MNJRO and ROOT_MNJRO) as it was instructed in "/boot/cmdline.txt"
**The MicroSD card can now be used as a bootable system, AND used for extra storage for my Android phone. The goal was to use a 2nd MicroSD card as a backup drive, and still be able to use it as portable storage on my phone!**
Appreciate Philip Couling's great insight, and using syslinks has made my home directory feel natural.
Asked by TuxForLife
(3139 rep)
Jan 4, 2021, 03:35 AM
Last activity: Jan 26, 2021, 11:33 PM
Last activity: Jan 26, 2021, 11:33 PM