This is a patch to the stock 4.2.2 kernel that allows the phone to become a virtual CD drive.
Often, due to being the resident 'expert' around here I carry around an iOdd so I can install things like Windows from CD without having a bag full of windows CDs around. I thought it would be great if my phone could do this.. this is the result.
This functionality already exists in part the in kernel, but wasn't enabled and a bit buggy.
This patch only affects a single file (that doesn't look like it's changed for years) so should apply to just about any kernel, in theory.
1. Bring the cdrom flag into userspace via sysfs.
2. Implement the raw READ CD command
3. Implement raw READ TOC commands & respond to the old sff8020i request format.
I've built a boot.img from the stock 4.2.2 - there are no other changes to the kernel (I'm not really planning on maintaining another kernel - there's better people than me doing that already).
Also I've provided a GUI app to handle the mount/unmount. That will also support hard drive images (those work on unpatched kernels, so an image of a USB thumb drive should work).
Known bugs:
1. Sometimes Windows loses track of MTP after you unmount the disk (I disable it during emulation as the Win drivers really hate them being enabled at the same time). Toggling between PTP/MTP again resets it.
2. The currently mounted image doesn't always show in the app. This appears to be a kernel bug (it loses the name randomly) but is harmless.
boot-cdrom-4.2.2.img -- Compiled boot.img
cdrom.diff -- Diff file
VirtualDrive.apk -- GUI app
Often, due to being the resident 'expert' around here I carry around an iOdd so I can install things like Windows from CD without having a bag full of windows CDs around. I thought it would be great if my phone could do this.. this is the result.
This functionality already exists in part the in kernel, but wasn't enabled and a bit buggy.
This patch only affects a single file (that doesn't look like it's changed for years) so should apply to just about any kernel, in theory.
1. Bring the cdrom flag into userspace via sysfs.
2. Implement the raw READ CD command
3. Implement raw READ TOC commands & respond to the old sff8020i request format.
I've built a boot.img from the stock 4.2.2 - there are no other changes to the kernel (I'm not really planning on maintaining another kernel - there's better people than me doing that already).
Also I've provided a GUI app to handle the mount/unmount. That will also support hard drive images (those work on unpatched kernels, so an image of a USB thumb drive should work).
Known bugs:
1. Sometimes Windows loses track of MTP after you unmount the disk (I disable it during emulation as the Win drivers really hate them being enabled at the same time). Toggling between PTP/MTP again resets it.
2. The currently mounted image doesn't always show in the app. This appears to be a kernel bug (it loses the name randomly) but is harmless.
boot-cdrom-4.2.2.img -- Compiled boot.img
cdrom.diff -- Diff file
VirtualDrive.apk -- GUI app