Questions on possible changes to be performed
See original GitHub issueHi, I’m opening this issue because, while libaums fulfills most of my needs for EtchDroid, there are currently a few issues which are forcing me to keep my incompatible fork, and I’d reeeeally like to avoid that.
So these are a few changes I’d like to merge here, let me know what you think about them and what kind of changes you would like.
First of all, and we already talked about this, I’d need to access the block device directly.
In my fork I made blockDevice
public:
I remember you rejected my PR for this because I didn’t have any tests written. Before you ask: no, I’m not planning to write unit tests for the SCSI protocol 😂
It should probably be better to write instrumented tests for that instead of unit tests. And by the way I’m planning to do that! I’m working on a Qemu setup with Android-x86 that emulates a USB 3.0 stick, it works-ish but I need to get some issues fixed.
Other than that it’s just a matter of running qemu with:
-device nec-usb-xhci,id=xhci \
-drive if=none,id=usbstick,file=usb.img,format=raw \
-device usb-storage,bus=xhci.0,drive=usbstick
(Pretty easy to merge if above also gets merged)
I wrote InputStream
and OutputStream
implementations on top of BlockDeviceDrivers
:
With tests:
The use case is simply to be able to copy data in a dd
kinf of fashion, which is what EtchDroid does. Having a wrapper that implements a standard Java interface makes it easy for me to reuse code and provide the same kind of functionality on top of other implementations.
(Breaks API)
I don’t necessarily need to access the filesystem inside of the USB drive, the fact that by default it reads the partition table kind of gets in my way, so I had to incompatibly split that away:
While this is a deal-breaker for me, I could probably be able to keep a soft-fork if you’d prefer not to break the API. Or if you have a better solution that doesn’t break the API I’ll be happy to adopt it.
Let me know 😃
Issue Analytics
- State:
- Created 4 years ago
- Comments:10 (5 by maintainers)
Top GitHub Comments
Alright, I will send you a pull request soon™️ 😉
This would change the API but it would be perfectly backwards compatible, so that would be fine for me 😃