orbic doesn't handle being out of space very intuitively
Prerequisites
- [x] I have read CONTRIBUTING.md
- [x] No generative AI (including LLMs) tools were used to write this issue.
Bug Report Details
I'm running v0.13.0 on an orbic. I noticed the screen looked different today and saw there was no green line, but also no wifi/hotspot icon. I also couldn't find the hotspot using a laptop and navigating through the settings on the orbic (physically) showed they were all blank for some reason.
I had to connect the orbic via usb and use adb shell to get onto the device to poke around. Nothing in the logs, but there was no rayhunter processes running, and nothing listening on port 8080. I noticed the /data partition was 100% full, so I figured that was preventing it from running for some reason.
I saw the qmdl directory was over 200MB, so I tried rming some of the files, but wasn't root so I didn't have permission. Sudo doesn't exist, and su - prompted for a password that I didn't know (the hotspot password wasn't it). I thought maybe reinstalling rayhunter would wipe the partition, but it ended up just partially reinstalling rayhunter (it failed because it didn't come back up after restarting), so I had to look for another option.
I eventually found a different issue in github with a description that pointed me at /bin/rootshell, which gave me root, so I could free up space on /data, reinstall rayhunter, and then use the webui to finish cleaning up the qmdl files.
I'm saying all of this because I'm a software developer, but it was still somewhat difficult for me to figure out what was going wrong with rayhunter, and how to fix it. If rayhunter is expected to be easy to use for non-technical people, then it needs to manage the storage partition space better, and provide an easier recovery method.
I'd suggest:
- When the partition reaches a threshold (could be configurable, but maybe something like 95% would be fine) have the daemon start deleting the oldest recordings until it goes below the threshold.
- Consider having the rayhunter installer clear out any existing recordings, either by default or behind a command line parameter.
- Perhaps provide a sudo binary, or set the root password, to make it more intuitive to elevate to root if needed.
There are edge cases to consider, for example if a rayhunter is never rebooted and a single recording is taking up all the storage.
When the partition reaches a threshold (could be configurable, but maybe something like 95% would be fine) have the daemon start deleting the oldest recordings until it goes below the threshold.
This functionality already exists, rayhunter stops recording when <1 MB of space is free.
Not sure how/why it didn't fire in this case. It's possible that logs were growing too quickly?
Consider having the rayhunter installer clear out any existing recordings, either by default or behind a command line parameter.
Yes I think this would be good to add. We already have a cli flag for resetting config, we can do the same for recordings.
Perhaps provide a sudo binary, or set the root password, to make it more intuitive to elevate to root if needed.
/bin/rootshell technically is "the sudo binary" for orbic, installed by rayhunter. Other devices have root by default and don't need it. Also installer util orbic-shell would've given you a root shell over wifi (without adb)