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

Re-Enable USB tethering? #140

Open
satmandu opened this issue Mar 11, 2025 · 6 comments
Open

Re-Enable USB tethering? #140

satmandu opened this issue Mar 11, 2025 · 6 comments
Assignees

Comments

@satmandu
Copy link

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?

@m0veax
Copy link

m0veax commented Mar 11, 2025

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

@cooperq cooperq self-assigned this Mar 11, 2025
@satmandu
Copy link
Author

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.

@m0veax
Copy link

m0veax commented Mar 12, 2025

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.

@satmandu
Copy link
Author

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
Copy link
Author

satmandu commented Mar 14, 2025

@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?

/// Send a command to switch the device into generic mode, exposing serial
///
/// If the device reboots while the command is still executing you may get a pipe error here, not sure what to do about this race condition.
fn enable_command_mode<T: UsbContext>(context: &mut T) {
if open_orbic(context).is_some() {
println!("Device already in command mode. Doing nothing...");
return;
}
let timeout = Duration::from_secs(1);
if let Some(handle) = open_device(context, 0x05c6, 0xf626) {
if let Err(e) = handle.write_control(0x40, 0xa0, 0, 0, &[], timeout) {
// If the device reboots while the command is still executing we
// may get a pipe error here
if e == rusb::Error::Pipe {
return;
}
panic!("Failed to send device switch control request: {0}", e)
}
return;
}

@cooperq
Copy link
Collaborator

cooperq commented Mar 17, 2025

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants