Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Port to android, build succeed with android-ndk-r8e on mac osx 10.9. #2

Open
wants to merge 70 commits into
base: master
Choose a base branch
from

Conversation

olunx
Copy link

@olunx olunx commented Oct 8, 2013

Port to android, build succeed with android-ndk-r8e on mac osx 10.9.

@FunkyM
Copy link
Member

FunkyM commented Oct 24, 2013

Thanks but please make this a single commit. It's just not appropriate to have all those commits just to fix a typo.

nikias and others added 27 commits April 4, 2014 17:28
libusbmuxd has been split off and is now managed in a separate repository.
By the time of this commit, the repository is:
git clone http://git.sukimashita.com/libusbmuxd.git
This allows any client to react and handle pairing errors which includes
password protected devices and alike.
This changes allows to replug a device to trigger a new trust dialog if the
user did deny the pairing before.
To prevent the trust dialog from appearing on iOS7 devices we need to make
sure that no PTP access is happening before usbmuxd starts. So we start as
early as possible so the device will be in trusted host state.
With the introduction of iOS 7, devices should start of in the "deactivated"
USB configuration "0" by default to not trigger a trust dialog.
Once the devices are identified, usbmuxd will set the correct USB configuration
itself and immediately run the preflight worker code to ensure a trust
relationship with the host is established. This change fixes the trust dialog
from appearing during hotplug of paired devices. The last remaining issue is
that current kernel code still sets the USB configuration to "1" by default
before the udev rules and thus causes multiple connection beeps.
… unplug

The usbmuxd implementation on Win/OS X does allow enumerating and accessing the
device during the "trust dialog" pairing process. We now also exit the waiting
loop during unplugging of a device while waiting for the trust dialog to be
dismissed.
nikias and others added 30 commits April 4, 2014 17:31
When a large number of devices are used, the number of open file descriptors
can reach the default system limit. Upon startup we now raise it to
a much higher value to give more 'space'.
idevice_event_subscribe() calls usbmuxd_subscribe() which will
start a thread waiting for device add/remove events. But this
implementation is not able to handle more than one "subscription".
However the preflight worker will start a thread for _each_ device
resulting in a really messed up situation if more than one device
is attached at the same time. This fix will use usbmuxd's internal
device_remove function calling a preflight callback to make this
implementation thread safe.
Using device_get_count() and device_get_list() separately can return different
device counts in case there are devices added to the list inbetween these two
function calls. To prevent this, device_get_list() will allocate the buffer by
itself.
Before this it seemed that we only ever sent ACK when
timing out... Looks like a perf double when reading.
By maintaining 3 parallel usb trasfers when reading we get 2-3x more
throughput when reading. Without this the usb port is mostly just idling.
I get 23mb/s on my system compared to a clean Apple stack that gives me
17mb/s.

3 was chosen because it is simple to hard code, gives very good performance,
and have very little impact on out resource consumption.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants