Permalink
Browse files

SGS2 support (issue #5)

  • Loading branch information...
1 parent d8bf099 commit 8b0b49b41efee7e2e50a44fd5e46d424b147f032 @jwise committed Dec 25, 2012
Showing with 41 additions and 2 deletions.
  1. +30 −0 HoRNDIS-Info.plist
  2. +11 −2 HoRNDIS.cpp
View
@@ -26,6 +26,36 @@
<string>1.0.0d1</string>
<key>IOKitPersonalities</key>
<dict>
+ <key>HoRNDISComposite_SGS2</key>
+ <dict>
+ <key>CFBundleIdentifier</key>
+ <string>com.joshuawise.kexts.HoRNDIS</string>
+ <key>IOClass</key>
+ <string>HoRNDISUSBInterface</string>
+ <key>IOProviderClass</key>
+ <string>IOUSBInterface</string>
+ <key>bInterfaceClass</key>
+ <integer>2</integer>
+ <key>bInterfaceProtocol</key>
+ <integer>2</integer>
+ <key>bInterfaceSubClass</key>
+ <integer>255</integer>
+ </dict>
+ <key>HoRNDISDevice3</key>
+ <dict>
+ <key>CFBundleIdentifier</key>
+ <string>com.joshuawise.kexts.HoRNDIS</string>
+ <key>IOClass</key>
+ <string>AppleUSBComposite</string>
+ <key>IOProviderClass</key>
+ <string>IOUSBDevice</string>
+ <key>bDeviceClass</key>
+ <integer>2</integer>
+ <key>bDeviceSubClass</key>
+ <integer>0</integer>
+ <key>bDeviceProtocol</key>
+ <integer>0</integer>
+ </dict>
<key>HoRNDISDevice2</key>
<dict>
<key>CFBundleIdentifier</key>
View
@@ -155,8 +155,17 @@ bool HoRNDIS::openInterfaces() {
req.bAlternateSetting = kIOUSBFindInterfaceDontCare;
fCommInterface = fpDevice->FindNextInterface(NULL, &req);
- if (!fCommInterface)
- return false;
+ if (!fCommInterface) {
+ /* Maybe it's one of those stupid Galaxy S IIs? (issue #5) */
+ req.bInterfaceClass = 0x02;
+ req.bInterfaceSubClass = 0x02;
+ req.bInterfaceProtocol = 0xFF;
+ req.bAlternateSetting = kIOUSBFindInterfaceDontCare;
+
+ fCommInterface = fpDevice->FindNextInterface(NULL, &req);
+ if (!fCommInterface) /* Okay, I really have no clue. Oh well. */
+ return false;
+ }
rc = fCommInterface->open(this);
if (!rc)

0 comments on commit 8b0b49b

Please sign in to comment.