Assign a static USB port on Android 9

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Assign a static USB port on Android 9

Jump to solution
2,309 Views
vinothkumars
Senior Contributor IV

Dear NXP,

 

I am working on IMX8QM with Android 9. I needs to configure usb stick on static mount point.

Currently,

      /dev/block/vold/public:8,1   3918844 2993196    925648  77% /mnt/media_rw/2A61-DD07

Needs to configure,

   /dev/block/vold/public:8,1   3918844 2993196    925648  77% /mnt/media_rw/USB

 

Thanks & Regards,

VinothS

Regards,
Vinothkumar Sekar
0 Kudos
Reply
1 Solution
2,011 Views
vinothkumars
Senior Contributor IV

Hi,

Done Static point in the following source code,

system/vold/model/PublicVolume.cpp

Current configuration,

// Use UUID as stable name, if available     std::string stableName = getId();     if (!mFsUuid.empty()) {         stableName = mFsUuid;     }     mRawPath = StringPrintf("/mnt/media_rw/%s", stableName.c_str());

New Configuration,

// Use UUID as stable name, if available     std::string stableName = getId();     if (!mFsUuid.empty()) {         stableName = mFsUuid;     }     mRawPath = StringPrintf("/mnt/media_rw/USB");

Thanks & Regards,

VinothS

Regards,
Vinothkumar Sekar

View solution in original post

0 Kudos
Reply
4 Replies
2,012 Views
vinothkumars
Senior Contributor IV

Hi,

Done Static point in the following source code,

system/vold/model/PublicVolume.cpp

Current configuration,

// Use UUID as stable name, if available     std::string stableName = getId();     if (!mFsUuid.empty()) {         stableName = mFsUuid;     }     mRawPath = StringPrintf("/mnt/media_rw/%s", stableName.c_str());

New Configuration,

// Use UUID as stable name, if available     std::string stableName = getId();     if (!mFsUuid.empty()) {         stableName = mFsUuid;     }     mRawPath = StringPrintf("/mnt/media_rw/USB");

Thanks & Regards,

VinothS

Regards,
Vinothkumar Sekar
0 Kudos
Reply
2,010 Views
vinothkumars
Senior Contributor IV

Once usb stick detected,

create sda1 ,

after check I got,

mek_8q:/sdcard # df
Filesystem                                           1K-blocks                Used             Available       Use%          Mounted on
/dev/root                                              1777588                  1189664         587924         67%             /
tmpfs                                                    2918920                  488                2918432       1%             /dev
tmpfs                                                    2918920                  0                    2918920       0%             /mnt
/dev/block/mmcblk0p12                       249828                    58936            190892         24%            /vendor
/dev/block/mmcblk0p14                      9086336                   967628          8118708       11%           /data
/data/media                                         9086336                   967628          8118708       11% /mnt/runtime/default/emulated
/dev/block/vold/public:8,1                3918844                  1311400        2607444       34%    /mnt/media_rw/2A61-DD07

I needs to configure static point instead of some random number (/mnt/media_rw/2A61-DD07).

If it possible, Please provide the configuration and files with respect to Android 9 with IMX8QM

Thanks & Regards,

VinothS

Regards,
Vinothkumar Sekar
0 Kudos
Reply
2,011 Views
b36401
NXP Employee
NXP Employee

You can assign the mountpoint in fstab.

0 Kudos
Reply
2,011 Views
vinothkumars
Senior Contributor IV

Thank you Victor,

Will you please give example. I tried but, I am unable to do it. Maybe I miss something. 

Thanks & Regards,

VinothS,

Regards,
Vinothkumar Sekar
0 Kudos
Reply