Attend XDA's Second Annual Developer Conference, XDA:DevCon 2014!
5,810,194 Members 52,378 Now Online
XDA Developers Android and Mobile Development Forum

Toolbox df crops decimal places, usb-detect is delayed

Tip us?
 
hunderteins
Old
(Last edited by hunderteins; 22nd April 2012 at 05:40 PM.) Reason: got it in the source
#1  
Senior Member - OP
Thanks Meter 328
Posts: 173
Join Date: Sep 2009
Post Toolbox df crops decimal places, usb-detect is delayed

Got it by myself.
  • df command crops the numerals behind the decimal point in the routine printsize (https://github.com/android/platform_...r/toolbox/df.c) busybox df shows the complete value. So this is just optically and I can use the whole capacity of the filesystem on that memstick.
  • It takes this time for the kernel to detect a new usb-device, when I pull out an other usb-device before. That has nothing to do with the model or the manufactorer of that device.

sorry to bother.
Hello,
DSC is supporting USB-OTG with memory-sticks, mouse and even my old keyboard works on the streak over a powered usb-hub. Thank you for that.

I put in different usb-memory sticks with very different results:
* a 4 GB generic mem stick 3538:0054 took very long until vold mounted it. It showed 4.04 GB/3.76 GiB in dmesg but df showed only 3 GB under /mnt/usbdisk
* a 2 GB cnmemory mem stick 090c:1000 was mounted very fast and showed 2.07 GB / 1.93 GiB in dmesg but df showed only 1 GB under /mnt/usbdisk
* a 8 GB spaceloop mem stick 090c:1000 was mounted very fast and showed 7.98 GB/7.42 GiB in dmesg but df showed only 7 GB under /mnt/usbdisk

I had never problems with these sticks on my laptop, only android shows their space rounded down this extreme. Can someone confirm this? Is this just optically or will I get into trouble when I use the stick to full capacity?
Why do some sticks took > 30 secs until vold mounts them and others are mounted instantly?

Got the same effect with a generic usb-otg-cable on the mini-usb-port of the av-media-dock and a custom PDMI/usb-otg-cable I soldered myself.
 
_n0p_
Old
#2  
_n0p_'s Avatar
Senior Member
Thanks Meter 1,827
Posts: 2,557
Join Date: Apr 2009
Location: Kiev
Hi!
You mean consequent usb memory device detection connected to Streak is delayed?
I think it's conpletely managed by vold, give me some time to check.
 
hunderteins
Old
#3  
Senior Member - OP
Thanks Meter 328
Posts: 173
Join Date: Sep 2009
Hi nop,
I can't reconstruct this situation again. Sorry for the false report.
Reg. hunderteins
Tags
dsc, memory stick, usb-otg
Thread Tools
Display Modes