UBports Robot Logo UBports Forum
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Register
    • Login

    SD Card Redmi Note 9S not detected

    Scheduled Pinned Locked Moved Unsolved Support
    3 Posts 2 Posters 352 Views 1 Watching
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
      Reply
      • Reply as topic
      Log in to reply
      This topic has been deleted. Only users with topic management privileges can see it.
      • J Offline
        j.mackay93
        last edited by

        G'day,

        I'm new here, and I recently got UT up on the Redmi Note 9S (thanks all you legends!) but can't seem to access my inserted SD card.

        I can ssh in, manually mount the card to some directory, and see the contents in the file manager. But playing music or accessing the card through external drives doesn't work.

        Am I missing something or is this a known limitation?

        Cheers!

        LakotaubpL 1 Reply Last reply Reply Quote 0
        • LakotaubpL Offline
          Lakotaubp @j.mackay93
          last edited by

          @j-mackay93 What size is the sd card? Keeping in mind it's new years day IIRC there was a size limit on UT but not having your phone not sure if it still applies.

          J 1 Reply Last reply Reply Quote 0
          • J Offline
            j.mackay93 @Lakotaubp
            last edited by j.mackay93

            @lakotaubp its 128 GB, formatted as fat32 (vfat).

            I haven't gotten the external drives manager to detect the card yet which is a shame.

            I made two little scripts and placed them in the home directory to mount and unmount the card under /media/phablet/<sdcardlabel>, then run them as needed in terminal (I don't know how to execute bash scripts by touch from file explorer). I also am unsure how to automatically run scripts as root at startup, but oh well.

            The sd card now shows up under file explorer (once the program is closed and opened again).

            The first: mount_sd.sh

            #!/bin/bash
            
            # run as superuser
            
            # Create mount location variable
            mntloc=/media/${SUDO_USER:-$(whoami)}/$(lsblk -I 179 -o LABEL | tail -n 1)
            
            # Make a mount folder, hopefully MAJOR id stays 179
            mkdir -p $mntloc
            
            # Mount the sdcard!
            mount /dev/mmcblk0p1 $mntloc -o uid=32011
            

            And the second: umount_sd.sh

            #!/bin/bash
            
            # run as superuser
            
            # Create mount location variable
            mntloc=/media/${SUDO_USER:-$(whoami)}/$(lsblk -I 179 -o LABEL | tail -n 1)
            
            # Unmount the sdcard!
            umount $mntloc
            

            Note that I'm assuming there is only one inserted sd card which is why I can use tail to get the label. Also, I assumed the MAJOR id is 179...I don't know if this will be static across other phones or even over time, but I found it with lsblk | grep mmc and copied the MAJ column.

            1 Reply Last reply Reply Quote 0
            • First post
              Last post