[Android Head-Units] wacko37:
Was hoping to try and unmount Usb Storage via Tasker after screen goes off so I can get the hdd off the otg usb port and extend the standby time. (On otg because of the "unexpected storage removal" error after ever boot)

Is this possible with the correct shell command?

I can load up some Logcat details if it helps?

09-14 11:07:49.040 I/blue (6587): storage path "/mnt/usb_storage" unmounting
09-14 11:07:49.040 D/zzz (5707): ---receive ACTION_MEDIA_EJECT,path=/mnt/usb_storage
09-14 11:07:49.040 D/Vold (115): Volume usb_storage state changing 4 (Mounted) -> 5 (Unmounting)
09-14 11:07:49.040 I/MountService(488): onEvent:: raw= 605 Volume usb_storage /mnt/usb_storage state changed from 4 (Mounted) to 5 (Unmounting) cooked = 605 Volume usb_storage /mnt/usb_storage state changed from 4 (Mounted) to 5 (Unmounting)
09-14 11:07:49.040 D/MountService(488): sendStorageIntent Intent { act=android.intent.action.MEDIA_EJECT dat=file:///mnt/usb_storage (has extras) } to UserHandle{-1}
09-14 11:07:49.050 D/MediaProvider(5707): mStorageId=196609 mPath=/mnt/usb_storage mDescriptionId=17040667
09-14 11:07:54.150 W/Vold (115): Failed to unmount /mnt/usb_storage (Device or resource busy, retries 140, action 0)
09-14 11:07:57.300 W/Vold (115): Failed to unmount /mnt/usb_storage (Device or resource busy, retries 130, action 1)
09-14 11:08:00.510 W/Vold (115): Failed to unmount /mnt/usb_storage (Device or resource busy, retries 120, action 2)
09-14 11:08:03.650 W/Vold (115): Failed to unmount /mnt/usb_storage (Device or resource busy, retries 110, action 2)
09-14 11:08:07.020 W/Vold (115): Failed to unmount /mnt/usb_storage (Device or resource busy, retries 100, action 2)
09-14 11:08:10.140 W/Vold (115): Failed to unmount /mnt/usb_storage (Device or resource busy, retries 90, action 2)
09-14 11:08:13.380 W/Vold (115): Failed to unmount /mnt/usb_storage (Device or resource busy, retries 80, action 2)
09-14 11:08:16.660 W/Vold (115): Failed to unmount /mnt/usb_storage (Device or resource busy, retries 70, action 2)
09-14 11:08:20.030 W/Vold (115): Failed to unmount /mnt/usb_storage (Device or resource busy, retries 60, action 2)
09-14 11:08:23.310 W/Vold (115): Failed to unmount /mnt/usb_storage (Device or resource busy, retries 50, action 2)
09-14 11:08:26.520 W/Vold (115): Failed to unmount /mnt/usb_storage (Device or resource busy, retries 40, action 2)
09-14 11:08:29.680 W/Vold (115): Failed to unmount /mnt/usb_storage (Device or resource busy, retries 30, action 2)
09-14 11:08:32.900 W/Vold (115): Failed to unmount /mnt/usb_storage (Device or resource busy, retries 20, action 2)
09-14 11:08:36.130 W/Vold (115): Failed to unmount /mnt/usb_storage (Device or resource busy, retries 10, action 2)
09-14 11:08:39.380 W/Vold (115): Failed to unmount /mnt/usb_storage (Device or resource busy, retries 0, action 2)
09-14 11:08:39.680 E/Vold (115): Giving up on unmount /mnt/usb_storage (Device or resource busy)
09-14 11:08:39.680 E/Vold (115): Failed to unmount /mnt/usb_storage (Device or resource busy)
09-14 11:08:42.650 W/Vold (115): Failed to unmount /mnt/usb_storage (Device or resource busy, retries 140, action 0)
09-14 11:08:45.770 W/Vold (115): Failed to unmount /mnt/usb_storage (Device or resource busy, retries 130, action 1)
09-14 11:08:48.920 W/Vold (115): Failed to unmount /mnt/usb_storage (Device or resource busy, retries 120, action 2)
09-14 11:08:49.040 E/VoldConnector(488): timed-out waiting for response to 22 volume unmount /mnt/usb_storage force
09-14 11:08:51.960 W/Vold (115): Failed to unmount /mnt/usb_storage (Device or resource busy, retries 110, action 2)
09-14 11:08:52.740 W/RestStorages(1038): Using folders=/mnt/usb_storage/A(CAR-MUSIC)/Music/
09-14 11:08:52.870 W/RestStorages(1038): Detected mount point=/mnt/usb_storage/A(CAR-MUSIC)
09-14 11:08:52.870 W/RestStorages(1038): Available mounts=[/mnt/internal_sd, /metadata, /mnt/external_sd, /mnt/usb_storage/A(CAR-MUSIC)]
09-14 11:08:53.250 W/FolderScanner2(1038): Starting scan=/mnt/usb_storage/A(CAR-MUSIC)/Music/ fastScan=true
09-14 11:08:53.660 E/ProcessKiller(115): Process com.maxmpz.audioplayer (1038) has open file /mnt/usb_storage/A(CAR-MUSIC)/Music
09-14 11:08:55.680 W/Vold (115): Failed to unmount /mnt/usb_storage (Device or resource busy, retries 100, action 2)
09-14 11:08:58.960 W/Vold (115): Failed to unmount /mnt/usb_storage (Device or resource busy, retries 90, action 2)
09-14 11:09:02.200 W/Vold (115): Failed to unmount /mnt/usb_storage (Device or resource busy, retries 80, action 2)
09-14 11:09:05.420 W/Vold (115): Failed to unmount /mnt/usb_storage (Device or resource busy, retries 70, action 2)
09-14 11:09:08.690 W/Vold (115): Failed to unmount /mnt/usb_storage (Device or resource busy, retries 60, action 2)
09-14 11:09:11.870 W/Vold (115): Failed to unmount /mnt/usb_storage (Device or resource busy, retries 50, action 2)
09-14 11:09:14.880 W/Vold (115): Failed to unmount /mnt/usb_storage (Device or resource busy, retries 40, action 2)
09-14 11:09:18.060 W/Vold (115): Failed to unmount /mnt/usb_storage (Device or resource busy, retries 30, action 2)
09-14 11:09:21.100 W/Vold (115): Failed to unmount /mnt/usb_storage (Device or resource busy, retries 20, action 2)
09-14 11:09:24.430 W/Vold (115): Failed to unmount /mnt/usb_storage (Device or resource busy, retries 10, action 2)
09-14 11:09:27.660 W/Vold (115): Failed to unmount /mnt/usb_storage (Device or resource busy, retries 0, action 2)
09-14 11:09:27.970 E/Vold (115): Giving up on unmount /mnt/usb_storage (Device or resource busy)
09-14 11:09:27.970 E/Vold (115): Failed to unmount /mnt/usb_storage (Device or resource busy)
09-14 11:09:27.970 D/Vold (115): Volume usb_storage state changing 5 (Unmounting) -> 4 (Mounted)
09-14 11:09:28.010 I/MountService(488): onEvent:: raw= 605 Volume usb_storage /mnt/usb_storage state changed from 5 (Unmounting) to 4 (Mounted) cooked = 605 Volume usb_storage /mnt/usb_storage state changed from 5 (Unmounting) to 4 (Mounted)
09-14 11:09:28.010 W/MountService(488): Duplicate state transition (mounted -> mounted) for /mnt/usb_storage
09-14 11:09:28.010 D/MountService(488): sendStorageIntent Intent { act=android.intent.action.MEDIA_MOUNTED dat=file:///mnt/usb_storage (has extras) } to UserHandle{-1}
09-14 11:09:28.210 I/WindowState(488): WIN DEATH: Window{424845c0 u0 StatusBar}
09-14 11:09:28.210 V/NotificationService(488): notification listener connection lost: ComponentInfo{com.android.systemui/com.android.systemui.StatusbarMediaService}
09-14 11:09:28.230 W/ActivityManager(488): Scheduling restart of crashed service com.android.systemui/.StatusbarMediaService in 0ms
09-14 11:09:29.200 D/MediaScannerReceiver(5707): action: android.intent.action.MEDIA_MOUNTED path: /mnt/usb_storage
09-14 11:09:29.210 D/RKUpdateReceiver(1636): media is mounted to '/mnt/usb_storage'. To check local update.
09-14 11:09:29.310 D/MediaScannerService(5707): start scanning volume external: [/mnt/usb_storage]
09-14 11:09:31.080 I/blue (6587): storage path "/mnt/usb_storage" mounted readOnly=true
09-14 11:09:33.280 E/ActivityManager(488): 0% 89/usb-storage: 0% user + 0% kernel
09-14 11:09:33.280 E/ActivityManager(488): 3.8% 89/usb-storage: 0% user + 3.8% kernel
09-14 11:09:33.490 D/SystemUIService(6750): loading: class com.android.systemui.statusbar.SystemBars
09-14 11:09:33.490 D/SystemUIService(6750): running: com.android.systemui.statusbar.SystemBars@41ccdd30
09-14 11:09:33.500 D/SystemUIService(6750): loading: class com.android.systemui.usb.StorageNotification
09-14 11:09:33.500 D/SystemUIService(6750): running: com.android.systemui.usb.StorageNotification@41cd0320
09-14 11:09:33.670 D/StatusBarMedia(6750): onBind
09-14 11:09:33.730 I/StatusBarManagerService(488): registerStatusBar bar=com.android.internal.statusbar.IStatusBar$Stub$Proxy@42463cf8
09-14 11:09:33.750 D/PhoneStatusBar(6750): mSettingsPanelGravity = 8388661
09-14 11:09:34.210 V/PhoneStatusBar/NavigationBarView(6750): touchEnabled:false
09-14 11:09:34.220 D/RKUpdateService(1636): getValidFirmwareImageFile() : Target image file path : /mnt/usb_storage/update.zip
09-14 11:09:34.220 D/RKUpdateService(1636): scan usb files: /mnt/usb_storage/A(CAR-MUSIC)/LOST.DIR
09-14 11:09:34.220 D/RKUpdateService(1636): scan usb files: /mnt/usb_storage/A(CAR-MUSIC)/System Volume Information
09-14 11:09:34.220 D/RKUpdateService(1636): scan usb files: /mnt/usb_storage/A(CAR-MUSIC)/Music
09-14 11:09:34.220 D/RKUpdateService(1636): scan usb files: /mnt/usb_storage/A(CAR-MUSIC)/$RECYCLE.BIN