I can run pdos (pdos.org) under bochs on an Android phone.
Bochs accept a fat32 disk image as a drive.
I would like to make that same file as a defacto external hard disk when I connect the Android to a normal PC via USB cable.
If I have a PC with a bios it will then think that this is an external hard drive and mount it and even boot from it.
This will enable me to transfer data between pdos running on the PC and pdos running on the Android.
I would shut down bochs before using the file as a hard disk.
Does anyone else run their x86 os on an Android?
Can the Android do this? Perhaps with an app from the Google Play store?
Bochs, Android, hard disk
-
- Member
- Posts: 5563
- Joined: Mon Mar 25, 2013 7:01 pm
Re: Bochs, Android, hard disk
I found an app that claims to do this, but it requires root, and it hasn't been updated in a while and may not work on recent Android versions. You might find a newer app that's compatible with newer Android versions if you look around.kerravon wrote:Can the Android do this? Perhaps with an app from the Google Play store?
These are instructions for enabling MTP to access the contents of an SD card. It doesn't use disk images, and you definitely can't boot from it.nexos wrote:I think so: https://www.wikihow.com/Use-Your-Androi ... Hard-Drive
Re: Bochs, Android, hard disk
Thanks for that! It looks like the principle is sound. I'm surprised root is required.
Another option would be an app that extracts a single or all files from a disk image. Then the problem would be transformed - assuming my Android is, or can be made fat32, would my file be visible to the PC bios? So that I can boot from a USB stick and the Android is a data drive to pdos.
Thanks
Another option would be an app that extracts a single or all files from a disk image. Then the problem would be transformed - assuming my Android is, or can be made fat32, would my file be visible to the PC bios? So that I can boot from a USB stick and the Android is a data drive to pdos.
Thanks
-
- Member
- Posts: 5563
- Joined: Mon Mar 25, 2013 7:01 pm
Re: Bochs, Android, hard disk
I found an app to make your SD card available as a mass storage device, but it also requires root and hasn't been updated in a while.kerravon wrote:assuming my Android is, or can be made fat32, would my file be visible to the PC bios?
Old Android versions would expose their storage as a FAT-formatted mass storage device, but modern Android devices only support MTP and PTP. BIOS (and probably UEFI as well) only supports mass storage. You'll need a whole USB stack to access MTP or PTP.
Re: Bochs, Android, hard disk
Thanks for all that.
I thought of one more thing that could help me.
Bochs reads my vhd (basically IMG) fine.
But can I mount it under Android the same as I can mount it under windows?
This would allow me to get files on and off, although different from my original question.
A Google search was inconclusive.
I thought of one more thing that could help me.
Bochs reads my vhd (basically IMG) fine.
But can I mount it under Android the same as I can mount it under windows?
This would allow me to get files on and off, although different from my original question.
A Google search was inconclusive.
Re: Bochs, Android, hard disk
Sounds like the sort of questions I'd find complicated too. Going back to the original question...
As for the 2nd question, I'm sure you could use mtools under Termux or under any of the many Linux chroot environments you can get for Android.
Honestly, for the first question, you could use mtools on the MTP-served disk image instead of running a PDOS VM.
EDIT: Today I tried to edit a text file shared over MTP, but it wouldn't save to the phone. I guess you may not be able to write to the disk image served from the phone. So many useful things in Android require root access, and I can often understand why. What I don't understand is why I myself haven't rooted every Android phone I've ever owned.
You could use the same image for an emulated or virtual PC on the real PC. Perhaps the guest could have access to a partition in addition to the Android-hosted disk image. Make the PC dual-boot, with the other OS being PDOS accessing the partition. I made a plain-text diagram of this; just felt like it.kerravon wrote:If I have a PC with a bios it will then think that this is an external hard drive and mount it and even boot from it.
This will enable me to transfer data between pdos running on the PC and pdos running on the Android.
Code: Select all
+--Android--+ +--PC--------------------+
| | | WinLinWhatever |
| | | +--VM-----+ |
| | | |PDOS | |
| | | | | |
| DiskImage-+---MTP---+-+ ↔files↔ +-PartitionN |
| | | | | |
| | | +---------+ |
| | | |
+-----------+ +------------------------+
Reboot PC...
+--PC----------------+
| PDOS on PartitionN |
| |
+--------------------+
As for the 2nd question, I'm sure you could use mtools under Termux or under any of the many Linux chroot environments you can get for Android.
Honestly, for the first question, you could use mtools on the MTP-served disk image instead of running a PDOS VM.
EDIT: Today I tried to edit a text file shared over MTP, but it wouldn't save to the phone. I guess you may not be able to write to the disk image served from the phone. So many useful things in Android require root access, and I can often understand why. What I don't understand is why I myself haven't rooted every Android phone I've ever owned.
Kaph — a modular OS intended to be easy and fun to administer and code for.
"May wisdom, fun, and the greater good shine forth in all your work." — Leo Brodie
"May wisdom, fun, and the greater good shine forth in all your work." — Leo Brodie