How does one use an nvme drive on Android?

Hello,

I’m able to get my nvme drive detected when running android, and I’m able to mount it manually from the terminal emulator using su. However, the rest of the android operating system can’t seem to see the drive. I would like to be able to access the nvme drive like a secondary sd card on android.

I’m able to edit any files on emmc by going into tuner settings and enabling writable system (and also remounting root in the command line)

What files should I change to make the nvme drive mount on boot, and also be seen by android apps?

Thanks!

(edit: I have one of the early Rock960 boards, either A or B, definitely not C)

progress so far:

format the NVME with a gpt partition table, and make sure the first partition’s type guid is “EBD0A0A2-B9E5-4433-87C0-68B6B72699C7”

then add to /vendor/etc/fstab.rk30board.emmc (or .sd if you’re booting from an sd card)

/devices/platform/f8000000.pcie/pci0000:00/0000:00:00.0/0000:01:00.0/nvme/nvme*      auto       auto    defaults    voldmanaged=nvmedisk:auto

this makes the drive show up in the android UI, however I’m still having trouble with permissions. the files are listed as being owned by root, with the group “everybody” (which applies to the files on the internal storage too) except the group permissions are read only.

the journey continues…

Another update: I tried using adoptable storage for this, however when I try to format using “sm partition disk:254,0 private” then the process hangs and the OOM killer eventually runs. Probably this partitioning algorithm was not expecting to be run on 250gb. anyway, I decided that I would mount the nvme drive to /nvme as well as getting vold to pick it up, so I can still rsync items to it, which will then be visible for reading by other android apps. Not great, but good enough for my purposes.