[Bug]: Debian Orbic upgrade from 0.2.8 using 0.3.0 Ubuntu installer [and source] fails
Rayhunter Version
v0.3.0
Capture Date
n/a
Capture Location
n/a
Device and Model
Orbic RC400L
What happened?
I know that the installer has only been tested on macOS and Ubuntu 24.04 (according to the online book), but I thought it would be useful to provide some testing and the "naive/busy user" UX feedback.
Unable to upgrade from 0.2.8 release on Debian. Device does not actually reboot when the ADB reboot feedback is shown by the installer.
$ sudo ./installer orbic
Forcing a switch into the debug mode to enable ADB
Device already in command mode. Doing nothing...
ADB enabled, waiting for reboot...
Failed to install rayhunter on the Orbic RC400L
Caused by:
No such file or directory (os error 2)
Also, it would be user friendly if the installer warned if running as root is needed but the user is not root, rather than concluding that the Orbic is in use by another program.
On one system, I get this when not running as root:
./installer orbic
Forcing a switch into the debug mode to enable ADB
Failed to install rayhunter on the Orbic RC400L
Caused by:
device found but failed to open: Permission denied (os error 13)
On another system, I get this (though it doesn't appear that another program is actually using the device)
$ ./installer orbic
Forcing a switch into the debug mode to enable ADB
Device already in command mode. Doing nothing...
ADB enabled, waiting for reboot...
Failed to install rayhunter on the Orbic RC400L
Caused by:
The Orbic is plugged in but is being used by another program.
Please close any program that might be using your USB devices.
If you have adb installed you may need to kill the adb daemon
Expected behavior
Catching some of the naive-user use cases and providing direct feedback in the installer output (running uname, branching on non-supported platforms, and saying "If you are not using one of these supported platforms [list], you will need to install from source -- see [link]", etc.
Relevant log output
n/a
Also note that when building from source, installing rust as a non-root user and then trying to run cargo (as the online book describes) produces a "dead end" where cargo is not in root's path, but the installer requires root access. If there is a udev config that can be used, mentioning this a few places in the docs would be user-friendly. (In other words, there is a use case between the naive user and a developer -- the "relatively tech-enabled user who wants to compile, but may need some pointers to make that easier.")
$ cat /etc/udev/rules.d/70-orbic.rules
# Orbic RT400L
SUBSYSTEM=="usb", ATTR{idVendor}=="05c6", ATTR{idProduct}=="f601", GROUP="plugdev", MODE="0660"
Edit: also note that after a successful (error-free) compile and installer run, with the right udev rules in place ... I still get the same no-dir error ("os error 2") on my test Debian system.
Also, it would be user friendly if the installer warned if running as root is needed but the user is not root, rather than concluding that the Orbic is in use by another program.
interesting, I must have set some udev rules a long time ago that don't require sudo. maybe the system adb installation did something.
On another system, I get this (though it doesn't appear that another program is actually using the device)
do you know what the difference between the two systems is?
Also note that when building from source, installing rust as a non-root user and then trying to run cargo (as the online book describes) produces a "dead end" where cargo is not in root's path, but the installer requires root access
We should update the docs to use cargo build instead of cargo run, and have a separate step for sudo ./target/release/.... Or if you are sure that the udev rules are universally applicable (or can be made so) then we can go with those.
Thanks for the reply! As you may be able to tell, I'm jonesing to be wowed by the new interface! 🤩
do you know what the difference between the two systems is?
"Root cause" difference not yet clear. The "another program" system is a complex and long-standing Debian 12 workstation. The simple "permission denied" system is a very vanilla system, a recent fresh Debian 12 rebuild. I tested on this second very fresh system to minimize possibility of an unknown program actually competing (though I suspect the error is not the real error, since the message doesn't happen when running as root).
We should update the docs to use
cargo buildinstead ofcargo run, and have a separate step forsudo ./target/release/...
I'll have to defer to your judgment there. That's probably the most universally applicable, but I'm not Rust-fluent enough to know whether it's the canonical / idiomatic method.
Or if you are sure that the udev rules are universally applicable (or can be made so) then we can go with those.
They should work fine on most Linuxes, as far as I know. The plugdev group used may be specific to Debian-and-descendants, but seems to be mentioned in a lot of howtos.
IMO, the most robust approach would be both the cargo approach and a mention of the udev both in the book, and ideally, as direct command feedback when the "permission denied" error is encountered and the system is Linux-like.
Thanks for the reply and the work -- really appreciate the project!
I'm getting the same error using the 0.3.0 binary installer.
❯ pwd
/home/user/tmp/rayhunter-v0.3.0/installer-ubuntu-24
tmp/rayhunter-v0.3.0/installer-ubuntu-24
❯ ./installer orbic
Forcing a switch into the debug mode to enable ADB
Failed to install rayhunter on the Orbic RC400L
Caused by:
device found but failed to open: Permission denied (os error 13)
tmp/rayhunter-v0.3.0/installer-ubuntu-24
❯ sudo ./installer orbic
Forcing a switch into the debug mode to enable ADB
Device already in command mode. Doing nothing...
ADB enabled, waiting for reboot...
Failed to install rayhunter on the Orbic RC400L
Caused by:
No such file or directory (os error 2)
(I left the non-sudo version in there just to demo)
These errors are slightly different then the first time, where it was switching it to debug mode to enable adb.
I can attempt to install from source, but since that also appears to be failing giving this bug, i thought maybe I'd just give you more info.
lsusb:
Bus 001 Device 096: ID 05c6:f601 Qualcomm, Inc. MDM9207-MTP _SN:BCA962D9
Device Info: Model:RC400L Version: ORB400L_v1.2.0_BVZRT
Connected via usb (I don't actually know if that's correct as it's not actually in the instructions; I can add if we get this sorted)
+1 - beat me to it! I set up an Ubuntu 24.04 system, and got exactly the same results.
can y'all try sudo strace ./installer? maybe that'll help figuring out what "No such file" is referring to
I was getting the same errors but fixed it with; sudo adb kill-server . Here was my process:
(kali㉿kali)-[~/Downloads/rayhunter-v0.3.0/installer-ubuntu-24] └─$ ./installer orbic Forcing a switch into the debug mode to enable ADB Device already in command mode. Doing nothing... ADB enabled, waiting for reboot... Failed to install rayhunter on the Orbic RC400L
Caused by: The Orbic is plugged in but is being used by another program.
Please close any program that might be using your USB devices.
If you have adb installed you may need to kill the adb daemon
┌──(root㉿kali)-[/home/kali/Downloads/rayhunter-v0.3.0/installer-ubuntu-24]
└─# ./installer orbic
Forcing a switch into the debug mode to enable ADB
Device already in command mode. Doing nothing...
ADB enabled, waiting for reboot...
Failed to install rayhunter on the Orbic RC400L
Caused by: No such file or directory (os error 2)
┌──(kali㉿kali)-[~/Downloads/rayhunter-v0.3.0/installer-ubuntu-24] └─$ sudo adb kill-server
┌──(kali㉿kali)-[~/Downloads/rayhunter-v0.3.0/installer-ubuntu-24]
└─$ ./installer orbic
Forcing a switch into the debug mode to enable ADB
Device already in command mode. Doing nothing...
ADB enabled, waiting for reboot... it's alive!
Waiting for atfwd_daemon to startup... done
Installing rootshell... done
Installing rayhunter... done
Waiting for reboot... done
Testing rayhunter... done
@roycewilliams is it possible that you also have an ADB server running? @gaykitty maybe this is an issue with our existing ADB server detection?
That error happens if we fail to open the USB device with the "device busy" error. We don't currently have a way to detect why it's busy. If adb is running, kill it. Also maybe try rebooting.
I had the same system error 2 when running the installer for orbic on Tuxedo OS 24.04 (Ubuntu fork), installer version 0.3.0 from release. This happened with a brand new Verizon -branded orbic 400L. ADB/Fastboot was NOT installed when this was occurring (come back to this later). When plugging in the device I got the following messages in the journal:
May 19 22:40:14 compy kernel: usb 1-5.4: new high-speed USB device number 110 using xhci_hcd
May 19 22:40:14 compy kernel: usb 1-5.4: New USB device found, idVendor=05c6, idProduct=f601, bcdDevice= 3.18
May 19 22:40:14 compy kernel: usb 1-5.4: New USB device strings: Mfr=1, Product=2, SerialNumber=3
May 19 22:40:14 compy kernel: usb 1-5.4: Product: MDM9207-MTP _SN:------
May 19 22:40:14 compy kernel: usb 1-5.4: Manufacturer: Android
May 19 22:40:14 compy kernel: usb 1-5.4: SerialNumber: ---------
May 19 22:40:14 compy mtp-probe[1727079]: checking bus 1, device 110: "/sys/devices/pci0000:00/0000:00:14.0/usb1/1-5/1-5.4"
May 19 22:40:14 compy mtp-probe[1727079]: bus: 1, device: 110 was not an MTP device
May 19 22:40:14 compy mtp-probe[1727098]: checking bus 1, device 110: "/sys/devices/pci0000:00/0000:00:14.0/usb1/1-5/1-5.4"
May 19 22:40:14 compy mtp-probe[1727098]: bus: 1, device: 110 was not an MTP device
I was thinking that the 'not an MTP device' messages were of note as it could mean that the device file system was not mounted natively or recognized. But that's just a guess.
Using the following procedure I was able to get the installer to run successfully and it installed rayhunter without further issue.
Workaround:
- Installed ADB and fastboot via apt
sudo apt install adb fastboot - Unplug orbic device if plugged in
- Plug in orbic
- Run adb start-server
- Run adb kill-server
- Run installer again
sudo ./installer orbic
I didn't get any complaints about mtp. I tried Blorfus' workaround but with the same results I got at first. (I then removed adb and fastboot before proceeding)
for the strace, here are all the file opens that resulted in ENOENT
/root/.android/adbkey
/sys/bus/usb/devices/1-10:1.0/busnum
/sys/bus/usb/devices/1-10/1-10:1.0/interface
/sys/bus/usb/devices/1-10.2/1-10.2:1.0/interface
/sys/bus/usb/devices/1-10.2.1.1:1.0/busnum
/sys/bus/usb/devices/1-10.2.1.1:1.2/busnum
/sys/bus/usb/devices/1-10.2.1.3/1-10.2.1.3:1.0/interface
/sys/bus/usb/devices/1-10.2.1.3/1-10.2.1.3:1.1/interface
/sys/bus/usb/devices/1-10.2.1.3:1.1/busnum
/sys/bus/usb/devices/1-10.2.1.3/serial
/sys/bus/usb/devices/1-10.2.2:1.1/busnum
/sys/bus/usb/devices/1-10.2.2/serial
/sys/bus/usb/devices/1-10.2/manufacturer
/sys/bus/usb/devices/1-10.2/serial
/sys/bus/usb/devices/1-10/manufacturer
/sys/bus/usb/devices/1-10/serial
/sys/bus/usb/devices/1-4.1:1.0/busnum
/sys/bus/usb/devices/1-4.1:1.2/busnum
/sys/bus/usb/devices/1-4.1/1-4.1:1.0/interface
/sys/bus/usb/devices/1-4.1/1-4.1:1.1/interface
/sys/bus/usb/devices/1-4.1/1-4.1:1.2/interface
/sys/bus/usb/devices/1-4.1/1-4.1:1.3/interface
/sys/bus/usb/devices/1-4.1/1-4.1:1.5/interface
/sys/bus/usb/devices/1-4.1:1.4/busnum
/sys/bus/usb/devices/1-4.2:1.2/busnum
/sys/bus/usb/devices/1-4.3.1:1.0/busnum
/sys/bus/usb/devices/1-4.3/1-4.3:1.0/interface
/sys/bus/usb/devices/1-4.3/manufacturer
/sys/bus/usb/devices/1-4.3/serial
/sys/bus/usb/devices/1-4.4:1.0/busnum
/sys/bus/usb/devices/2-4:1.0/busnum
/sys/bus/usb/devices/usb1/1-0:1.0/interface
Note there were plenty of /sys/bus/usb/devices calls that succeeded.
@cooperq @gaykitty After reboot and an adb kill-server, running the installer as root, I still had the same symptom -- "waiting for reboot" isn't with the Orbic actually rebooting, and the "waiting" seems to end too quickly for it to actually be waiting, and then the OS error 2. I don't have a clear understanding of the process, so I tried install with adb server both running and killed -- same effect.
Running the installer as my ordinary user (but with the udev rules in place, I get further, but the installer errors out in a variety of ways (not in chronological order):
rootshell is not giving us root.
Received unexpected response: AT+SYSCMD=chmod 755 /etc/init.d/rayhunter_daemon
Received unexpected response: AT+SYSCMD=chmod 4755 /bin/rootshell
Received unexpected response: AT+SYSCMD=mv /tmp/rootshell /bin/rootshell
Received unexpected response: AT+SYSCMD=chown root /bin/rootshell
Received unexpected response:
+SIGNALIND:1
I've tried various combinations of rebooting, or not rebooting, between attempts to run the installer.. After about eight attempts that produced the errors, I was eventually able to do a full install (at least to the point that Testing rayhunter... done was reached.
Naively, the erroring seems to be in a variety of places, such that it gives an overall impression of instability. I don't think the stability is my system; I've done some read and write tests across the USB cable and things seem fine (but this may be a naive test).
I got this error because i was missing ~/.android/adbkey
This was generated when i ran adb devices -l
this is a shot in the dark but could you try running the installer without any desktop environment launched? i.e. disabling gdm/wahtever on startup and running the installer from the tty. i wonder if something in the gnome desktop is trying to automount something or otherwise probe the device's capabilities.
@roycewilliams Could you try again with the latest release? If the error is still happening could you please run the installer with RUST_BACKTRACE=1 and RUST_LOG=debug (aka RUST_LOG=debug RUST_BACKTRACE=1 ./installer orbic) set and post the output.
Confirmed no longer happening, thank you!
Can we close this now?
Apologies, I thought it had already been closed - thanks for the cleanup.