rayhunter icon indicating copy to clipboard operation
rayhunter copied to clipboard

Re-Enable USB tethering?

Open satmandu opened this issue 9 months ago • 6 comments

The installation process appears to disable USB tethering. Is this intentional? Can adb and tethering not be simultaneously enabled?

Can we enable USB tethering alongside ADB access to maintain the device's full functionality?

satmandu avatar Mar 11 '25 18:03 satmandu

Is there a usb_composition binary on your device?

I don't have access to an orbic device, but many devices are configurable using this command.

"902B -> n, y, y" is the mode i use incl. tethering and adb

m0veax avatar Mar 11 '25 21:03 m0veax

adb shell
* daemon not running; starting now at tcp:5037
* daemon started successfully
/ $ usb_composition
BusyBox v1.23.2 (2021-04-17 13:53:01 CST) multi-call binary.

Usage: basename FILE [SUFFIX]

Strip directory path and .SUFFIX from FILE


BusyBox v1.23.2 (2021-04-17 13:53:01 CST) multi-call binary.

Usage: basename FILE [SUFFIX]

Strip directory path and .SUFFIX from FILE


boot hsusb composition: 
boot hsic composition: 
Choose Composition by Pid:
   901D -	DIAG + ADB
   9021 -	DIAG + QMI_RMNET (Android)
   9022 -	DIAG + ADB + QMI_RMNET (Android)
   9024 -	RNDIS + ADB [Android]
   9025 -	DIAG + ADB + MODEM + NMEA + QMI_RMNET + Mass Storage (Android)
   902B -	RNDIS + ADB + Mass Storage
   902D -	RNDIS + DIAG + ADB [Android]
   9039 -	MTP + ADB(Android)
   9049 -	DIAG + ADB + DUN + RMNET + Mass Storage + QDSS [Android]
   904A -	DIAG + QDSS [Android]
   9056 -	DIAG + ADB + SERIAL + RMNET + Mass Storage + Audio [Android]
   9057 -	RNDIS : ECM
   9059 -	DIAG+ADB+RNDIS : ECM
   905B -	MBIM
   9060 -	DIAG + QDSS + ADB
   9063 -	RNDIS : ECM : MBIM
   9064 -	DIAG + ADB + MODEM + QMI_RMNET : ECM : MBIM
   9067 -	Mass storage + QMI_RMNET : Mass Storage + MBIM
   9084 -	DIAG + QDSS + ADB + RMNET
   9085 -	DIAG+ADB+MBIM+GNSS
   9091 -	DIAG + MODEM + QMI_RMNET + ADB
   90A1 -	DIAG + ADB + (multiplexed) QMI_RMNET (Android)
   90A9 -	DIAG + ADB + MODEM + NMEA + QDSS (bulk in) + RMNET : ECM : MBIM
   90AD -	DIAG + ADB + MODEM + NMEA + QMI_RMNET + Mass Storage + DPL
   90B1 -	ECM
   90CA -	DIAG + ADB + UAC2
   90CD -	DIAG + ADB + GNSS
   90D5 -	DIAG + ADB + MBIM + GNSS + DUN
   90D6 -	DIAG + MBIM + GNSS + DUN
   90F3 -	DIAG + RmNet + IPC_ROUTER
   F000 -	Mass Storage
   PRJ_DEBUG_SLT779_9025 -	DIAG + ADB + MODEM + NMEA + QMI_RMNET + Mass Storage (Android)
   PRJ_FACTORY_SLT779_9025 -	DIAG + ADB + MODEM + NMEA + QMI_RMNET + Mass Storage (Android)
   PRJ_RELEASE_SLT779_9025 -	DIAG + ADB + MODEM + NMEA + QMI_RMNET + Mass Storage (Android)
   PRJ_SLM730_9025 -	DIAG + ADB + MODEM + NMEA + QMI_RMNET + Mass Storage (Android)
   PRJ_SLM750T_9025 -	DIAG + ADB + MODEM + NMEA + QMI_RMNET + Mass Storage (Android)
   PRJ_SLM750V_OBD_9025 -	DIAG + ADB + MODEM + NMEA + QMI_RMNET + Mass Storage (Android)
   PRJ_SLT779_9025 -	DIAG + ADB + MODEM + NMEA + QMI_RMNET + Mass Storage (Android)
   empty -	it is used to allow either hsic or hsusb to have no composition at all(must reboot to take effect).
   hsic_next -	
   hsusb_next -	
   switch_usb -	RNDIS + ADB [Android]

It looks like the binary is there. Is 9024 what it is set to, or is it ostensibly set to switch_usb? I recall switch_usb showing up during the install.

satmandu avatar Mar 12 '25 00:03 satmandu

902B, n, y, y is what works for me. Important is to choose an option with RNDIS and adb. But as said, I don't know if that matters on an orbic.

My guess is, if you choose an option which provides adb, you will not lock yourself out.

Be aware that a change will close your adb shell session, this is normal behaviour and not a bad sign at all.

m0veax avatar Mar 12 '25 05:03 m0veax

I suspect the cleanest way to handle this would be to change the mode the device is being set to via https://github.com/EFForg/rayhunter/blob/main/serial/src/main.rs since otherwise, the mode will just be switched back.

If @cooperq is on this, I'm perfectly happy to wait until they submit a PR!

Thanks!

satmandu avatar Mar 12 '25 13:03 satmandu

@cooperq do you know what mode this is setting the device to? I can't figure out the translation of the mode being set in this to the ones the CLI tool allow. I assume we need adb + rndis + modem at a minimum?

https://github.com/EFForg/rayhunter/blob/332a7ffbd0303e9c968a982a62688cf6f9eeb496/serial/src/main.rs#L91-L111

satmandu avatar Mar 14 '25 15:03 satmandu

I'm not on this honestly. @mjg59 might be the person who can tell you which mode the serial code is setting rayhunter to.

cooperq avatar Mar 17 '25 23:03 cooperq

closing as a duplicate of https://github.com/EFForg/rayhunter/issues/294

untitaker avatar Jun 04 '25 20:06 untitaker

@satmandu You can take a look at /data/usb/boot_hsusb_composition for a mapping of /usrdata/mode.cfg values to usb gadget modes.

oopsbagel avatar Jun 04 '25 23:06 oopsbagel