Type ls command then the terminal hangs on

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

Type ls command then the terminal hangs on

880 Views
lisztkao
Contributor II

I have a customed 6Q board with USB otg port(USBOTG_ID connteced with ground), if I pluged a usb disk to this port, system mounted the device at /storage/udisk(see log described as below).

However, it hangs on while type ls command in terminal. If type "strace ls /mnt/media_rw/udisk", it stop at system call: lstat64("/mnt/media_rw/udisk",.

Any idea?

Log :

D/Vold    ( 2279): Volume udisk state changing 3 (Checking) -> 4 (Mounted)

D/MountService( 2658): volume state changed for /storage/udisk (checking -> mounted)

D/MountService( 2658): sendStorageIntent Intent { act=android.intent.action.MEDIA_MOUNTED dat=file:///storage/udisk (has extras) } to UserHandle{-1}

Labels (3)
0 Kudos
Reply
2 Replies

765 Views
jamesbone
NXP TechSupport
NXP TechSupport

What version of Android are you using?  This behavior happens also if you try the LS command on the file system where the system it is install?,

How big is the USB device that you are mounting?  do you think we can reproduced it in a FSL board? what steps to follow? do you have any USB log, to see if the device was correctly enumerated?


Have a great day,
Jaime

-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------

0 Kudos
Reply

765 Views
lisztkao
Contributor II

Hi Jamesbone, Thank you for your reply.

I found this probably be symlink setting problem in init.rc.

The setting in ~imx6/etc/init.rc is

    mkdir /mnt/media_rw/udisk 0755 system system

    symlink /mnt/media_rw/udisk /storage/udisk

And, In ~/device/fsl/PROJECT/init.rc the setting is

    mkdir /storage/udisk 0000 system system

    mkdir /mnt/media_rw/udisk 0666 system system

    symlink /mnt/media_rw/udisk /udisk

If I comment both line in ~imx6/etc/init.rc, this error will not happen again

Any idea?

0 Kudos
Reply