USB Host Mode & OTG Cable

jajones82

Senior Member
Dec 17, 2012
20
4
I am reposting this from the Lenovo Thread

I have purchased a functioning OTG cable and it reads\writes without issue. The issue comes when I unplug the OTG cable. I properly\successfully unmount the USB device before removal, and upon removal, multiple apps crash, especially the live wallpaper, HD widgets, swiftkey, and multiple other apps and services that are running. The only fix I have found is to reboot the tablet, but this is a pain. I am using the legit JB OS with a FAT32 formatted 32gb USB drive. Anybody else having this issue?
 

vampirefo.

Senior Member
Developer
Nov 8, 2011
3,836
1,394
I am not seeing any problems, why are you unmounting the usb to begin with? I always treat them as hot swap, never unmount them just unplug them. If using file manger close the file manager before unplugging.
 

anika200

Member
Dec 2, 2012
54
30
I am reposting this from the Lenovo Thread

I have purchased a functioning OTG cable and it reads\writes without issue. The issue comes when I unplug the OTG cable. I properly\successfully unmount the USB device before removal, and upon removal, multiple apps crash, especially the live wallpaper, HD widgets, swiftkey, and multiple other apps and services that are running. The only fix I have found is to reboot the tablet, but this is a pain. I am using the legit JB OS with a FAT32 formatted 32gb USB drive. Anybody else having this issue?

I just tested this out for the first time on JB and Yes I am having problems with usb drive as well.
I plug it in and use ES explorer and then demount the drive and have a calendar app crash and burn.
This happens to the same app if I just treat it as a hot swap drive as well.
It only appears to affect my one calendar app though, unlike the op's problem which involves several apps. Then again I have just started testing this out.
Seems a software problem of some sort.
 

vampirefo.

Senior Member
Developer
Nov 8, 2011
3,836
1,394
I just unmounted instead of hot swap no problems that I can see, no crashes here, I am not using official JB, I am using mcl630 JB on a dual boot.
 

anika200

Member
Dec 2, 2012
54
30
Well this is totally flakey on my tablet, it just outright crashed for the first time. Really, first time ever and I have put it through some abuse. So I was tracking down the usb crash thing to apps that are waiting in the play store update que.

OP, can you check to see if your apps that crashed are waiting to be updated by the google play store?

I will do a proper logcat shortly, when I get time.
 

vampirefo.

Senior Member
Developer
Nov 8, 2011
3,836
1,394
Well this is totally flakey on my tablet, it just outright crashed for the first time. Really, first time ever and I have put it through some abuse. So I was tracking down the usb crash thing to apps that are waiting in the play store update que.

OP, can you check to see if your apps that crashed are waiting to be updated by the google play store?

I will do a proper logcat shortly, when I get time.


Ok so if you update your apps you don't have any crashes?
 

anika200

Member
Dec 2, 2012
54
30
Ok so if you update your apps you don't have any crashes?

Yea, good point and no I am not buying you a coffee :p No that did not solve anything, still getting crashes from my business calendar widget. Funny enough when you go to settings >> storage >> usb storage and select the unmount option the warning that pops up tells you that programs may start to crash..... This seems like an android JB thing but again I have just started looking at the situation.

Ha, you cant even do a logcat via adb with the thumb drive plugged in, duhhh.
 
Last edited:

vampirefo.

Senior Member
Developer
Nov 8, 2011
3,836
1,394
That pop up is talking about if you are using apps from the USB drive, then unmount it, they will crash. So are you guys using apps or files that are on the USB drive?
 

anika200

Member
Dec 2, 2012
54
30
That pop up is talking about if you are using apps from the USB drive, then unmount it, they will crash. So are you guys using apps or files that are on the USB drive?

No, we guy is not doing that. I plug in the thumb drive with pictures on it and check them out with one of three different file managers.

I like your interpretation of the warning but it really is ambiguous.
Here is a quote
If you unmount the USB storage, some apps you are using will stop and may be unavailable until you remount the USB storage.

If you have the time intsall this app and put the widget on the desktop and then test out your usb thumb drive.

https://play.google.com/store/apps/...=W251bGwsMSwxLDEsIm5ldGdlbml1cy5iaXpjYWwiXQ..
 
Last edited:

vampirefo.

Senior Member
Developer
Nov 8, 2011
3,836
1,394
We each read the same things yet our interpretation are different. To me it says if you are using an app or file from the usb drive and unmount the drive while using an app or file it will crash and continue to crash until you mount the usb drive.
 

vampirefo.

Senior Member
Developer
Nov 8, 2011
3,836
1,394
Either way I don't have the problem, so that rules out the os being at fault. Something that you two have in common causing this, could be the cable you are using. Will be interesting finding out the cause.
 

anika200

Member
Dec 2, 2012
54
30
We each read the same things yet our interpretation are different. To me it says if you are using an app or file from the usb drive and unmount the drive while using an app or file it will crash and continue to crash until you mount the usb drive.

Yes, I understand what you are saying and how you interpret the warning. The problem still remains and I have already stated that I am not using any app from the drive. There must be some other problems going on, I used this exact same drive with the exact same pictures two weeks ago before the tablet was upgraded and there were no problems. So I know it can work, its a matter of finding what has changed or what ever else me and the OP have in common. Believe me I am the last person to expect an error after reading the OP problem.
 

vampirefo.

Senior Member
Developer
Nov 8, 2011
3,836
1,394
I wish you luck, I don't know reproduce what you guys see, but at the same time, I am able to make the entire tablet reboot by denying internet to an app I am using while unmounting USB.
 

anika200

Member
Dec 2, 2012
54
30
I wish you luck, I don't know reproduce what you guys see, but at the same time, I am able to make the entire tablet reboot by denying internet to an app I am using while unmounting USB.

Wait, are you saying the tablet just rebooted while you were unmounting a usb drive. Well that seems like a similar problem, I am guessing the app with the internet was not on the usb drive.
 

jajones82

Senior Member
Dec 17, 2012
20
4
Wait, are you saying the tablet just rebooted while you were unmounting a usb drive. Well that seems like a similar problem, I am guessing the app with the internet was not on the usb drive.

ok, so we filmed the process last night, and of course it would not error out while I was filming! The only change I made yesterday was installing Nova Prime launcher. I only have video files on the USB, no Apps, and I am running legit JB OS. I will edit the film and post asap. Here are my processes and findings.

BEFORE installing Nova Prime Launcher
process: with or without USB Dismount, tablet is on at home screen, plug in OTG with USB already attached, load\play video through Astro file browser\MX player, exit to home screen, pull out OTG cable
result: multiple app crashes\errors (swiftkey, hd widget, audio manager pro, live wallpaper)
solution: reboot tablet


AFTER installing Nova Prime Launcher:
process: with USB Dismount, tablet is on at home screen, plug in OTG with USB already attached, load\play video through Astro file browser\MX player, exit to home screen, pull out OTG cable
result: multiple app crashes\errors (swiftkey, hd widget, audio manager pro, live wallpaper)
solution: reboot tablet


process: without USB dismount, tablet is on at home screen, plug in OTG with USB already attached, load\play video through Astro file browser\MX player, exit to home screen, pull out OTG cable (did NOT dismount USB)
result: first time it rebooted immediately after I unplugged it, strange....every other time after that the screen blinks 3 times after unplugging it, no errors
solution: I will not dismount the USB before unplugging the OTG anymore with Nova Prime!


Conclusion: After installing Nova Launcher Prime, the tablet rebooted once immediately after unplugging the OTG USB without dismount, but each time after that the screen blinked 3 times after unplugging the OTG and no errors occurred. I will continue to test this theory today and I will update with any new findings\video if I can capture any errors.
 
Top