Skip to content

Commit

Permalink
Issue #88: Support Noika 7 Plus (239/4/1)
Browse files Browse the repository at this point in the history
  • Loading branch information
mikhailai committed Jul 27, 2018
1 parent c5f4f27 commit f4ac3df
Show file tree
Hide file tree
Showing 3 changed files with 37 additions and 3 deletions.
15 changes: 15 additions & 0 deletions HoRNDIS-Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,21 @@
<key>bInterfaceProtocol</key>
<integer>3</integer>
</dict>
<key>RNDISControlMiscDeviceRoE</key>
<dict>
<key>CFBundleIdentifier</key>
<string>com.joshuawise.kexts.HoRNDIS</string>
<key>IOClass</key>
<string>HoRNDIS</string>
<key>IOProviderClass</key>
<string>IOUSBHostInterface</string>
<key>bInterfaceClass</key>
<integer>239</integer>
<key>bInterfaceSubClass</key>
<integer>4</integer>
<key>bInterfaceProtocol</key>
<integer>1</integer>
</dict>
<key>RNDISControlLinuxGadget</key>
<dict>
<key>CFBundleIdentifier</key>
Expand Down
21 changes: 20 additions & 1 deletion HoRNDIS.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -131,6 +131,16 @@ code or "Info.plist". Notation:
Note, the other Samsung phones (e.g. S8) behave like other Android devices.
* Device: 224 / 0 / 0
- (same as "Stock" Android)
[*] Composite Device, using 0xEF/4/1 for RNDIS control: Nokia 7 Plus (issue #88)
Also may apply to Sony Xperia XZ.
This matches "RNDIS over Ethernet" specification given here:
http://www.usb.org/developers/defined_class/#BaseClassEFh
* USBCompositeDevice: 0 / 0 / 0
- InterfaceAssociation[2]: 239 / 4 / 1
- ControlInterface: 239 / 4 / 1
- DataInterface: 10 / 0 / 0
* Info.plist entry: RNDISControlMiscDeviceRoE(interface)
*/

// Detects the 224/1/3 - stock Android RNDIS control interface.
Expand All @@ -140,6 +150,13 @@ static inline bool isRNDISControlStockAndroid(const InterfaceDescriptor *idesc)
&& idesc->bInterfaceProtocol == 3; // RNDIS protocol
}

// Miscellaneous Device (0xEF), RNDIS over Ethernet: some phones, see above.
static inline bool isRNDISControlMiscDeviceRoE(const InterfaceDescriptor *idesc) {
return idesc->bInterfaceClass == 239 // Miscellaneous Device
&& idesc->bInterfaceSubClass == 4 // RNDIS?
&& idesc->bInterfaceProtocol == 1; // RNDIS over Ethernet
}

// Detects RNDIS control on BeagleBoard and possibly other embedded Linux devices.
static inline bool isRNDISControlLinuxGadget(const InterfaceDescriptor *idesc) {
return idesc->bInterfaceClass == 2 // Communications / CDC Control
Expand All @@ -149,7 +166,9 @@ static inline bool isRNDISControlLinuxGadget(const InterfaceDescriptor *idesc) {

// Any of the above RNDIS control interface.
static inline bool isRNDISControlInterface(const InterfaceDescriptor *idesc) {
return isRNDISControlStockAndroid(idesc) || isRNDISControlLinuxGadget(idesc);
return isRNDISControlStockAndroid(idesc)
|| isRNDISControlLinuxGadget(idesc)
|| isRNDISControlMiscDeviceRoE(idesc);
}

// Detects the class 10 - CDC data interface.
Expand Down
4 changes: 2 additions & 2 deletions HoRNDIS.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -316,7 +316,7 @@
GCC_VERSION = "";
INFOPLIST_FILE = "HoRNDIS-Info.plist";
MODULE_NAME = "$(PRODUCT_BUNDLE_IDENTIFIER)";
MODULE_VERSION = 9.1;
MODULE_VERSION = 9.2;
PRODUCT_BUNDLE_IDENTIFIER = com.joshuawise.kexts.HoRNDIS;
PRODUCT_NAME = "$(TARGET_NAME)";
WRAPPER_EXTENSION = kext;
Expand All @@ -335,7 +335,7 @@
GCC_VERSION = "";
INFOPLIST_FILE = "HoRNDIS-Info.plist";
MODULE_NAME = "$(PRODUCT_BUNDLE_IDENTIFIER)";
MODULE_VERSION = 9.1;
MODULE_VERSION = 9.2;
PRODUCT_BUNDLE_IDENTIFIER = com.joshuawise.kexts.HoRNDIS;
PRODUCT_NAME = "$(TARGET_NAME)";
WRAPPER_EXTENSION = kext;
Expand Down

0 comments on commit f4ac3df

Please sign in to comment.