DroidDrive emulation/porting possible?
-
SUMMARY: Could DroidDrive be ported/emulated in the future?
DriveDroid is an Android application that allows you to boot your PC from ISO/IMG files stored on your phone. This is ideal for trying Linux distributions or always having a rescue-system on the go...
i believe it uses USB host mode emulation to trick devices into thinking thats the phones is a cd drive or flash drive. Would this be possible to emulate with anbox (Once/If added) where its emulated? i would think that emulated android would have issues taking over the micro usb port.
-
It should only need a GUI (which is what DriveDroid is, DriveDroid does nothing that isn't already available in some form through the system.)
If your stock kernel supports USB Host Mode through DriveDroid on Android, it should support it under Ubuntu Touch. I would recommend looking at DriveDroid's source (if it's open source, I never checked) to see what sysfs entries it manages for the OS.
As for Anbox, it's not needed for this, and I'm not sure what LXC exposes to Anbox's system image, but I don't think it would be an issue and for this reason only:
- Anbox isn't emulation, it is using LXC based containers which themselves are not limited to emulation, but can preform it. As Android runs on ARM, and thus would run on the platform in question, I don't think LXC would need to emulate the platform. (I could be wrong about this though.)
Like I said, all the functionality exposed via DriveDroid is already baked into the Linux Kernel. DriveDroid does absolutely nothing except give a fancy GUI for it. So an application that provides the same functionality would ideally be trivial to implement, but isn't required, you could likely do the same thing via a shell script.
For some reference: It's not DriveDroid's source, but does the exact same thing: https://github.com/Streetwalrus/android_usb_msd/blob/master/app/src/main/java/streetwalrus/usbmountr/MainActivity.kt this file here has the code that enables MSD mode with a file.
-
Thank you for clearing a few things up for me. I think i have a better understanding of were to go from here. ill post my findings once I'm able to do some testing.
-
@darthearon Not a problem, I'd create one myself (Love DriveDroid, very useful application), but I need to learn QML first and I don't have the time to do so right now.