User Tag List

  1. koekje00's Avatar
    Libusb is an open-source C library for creating drivers for USB devices across different OS's and devices. It also works on iOS, although, I have never seen any tweaks/apps using it. You could, for example, tweak some dj app to work with your USB turntable or you could make your game controller work for games.

    Requirements:
    - You have a jailbroken iDevice(with openSSH) and the iPad Camera Kit (I have only tested with iPad 2, but it should work on iPhone 4 too)
    - You have Xcode with the iOS 5 SDK installed.
    - You are able to make a tweak/program for a jailbroken iDevice
    - You know how to use libusb

    1. Make a symlink to IOKit.
    In Terminal: (Change this according to your OSX and iOS version)
    Code:
    sudo ln -s /Developer/SDKs/MacOSX10.7.sdk/System/Library/Frameworks/IOKit.framework/Headers /Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS5.0.sdk/System/Library/Frameworks/IOKit.framework
    2. Download the newest libusb. (1.0.9b3 at the time of writing; 1.0.8 doesn't work as far as I know)
    In Terminal:
    Code:
    $ git clone git://git.libusb.org/libusb.git
    3. Download build-ios.sh and put it in the libusb folder.
    build-ios.sh.zip

    4. Build libusb.
    In Terminal:
    Code:
    $ ./autogen.sh
    $ chmod 775 build-ios.sh
    $ sudo ./build-ios.sh
    5. Copy the content of libout to /usr/lib/ onto your iDevice.

    6. Also copy the content of libout to /Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS5.0.sdk/usr/lib/ on your mac. (change this for your iOS version)

    7. Copy libusb.h from the libusb folder(so libusb/libusb) to /Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS5.0.sdk/usr/include/ on your mac.

    8. Build your libusb app/tweak with this SDK and put it onto your iDevice. (don't forget to add -lusb-1.0 to the compiler flags)

    9. Copy your app(or the app you tweaked) from /private/var/mobile/Applications/***/ to /private/var/stash/Applications/ to circumvent sandboxing restrictions.

    10. Respring and connect the device to your iDevice with the Camera Kit. Your app should be able to access an USB device.

    Important: I don't take responibility for any malfunctioning related to this howto.
    Last edited by koekje00; 2012-01-30 at 10:49 PM.
    2012-01-30 10:45 PM
  2. rakeshrawat123's Avatar
    Hi,

    I was wondering if you can post the steps for iOS7 or iOS8.

    Thanks for your help.

    Hi,

    I was wondering if you can post the steps for iOS7 or iOS8.

    Thanks for your help.
    2014-11-05 11:38 PM
LINK TO POST COPIED TO CLIPBOARD