I've been messing a fair amount with android recently and have been able to get Windows ME running on my Galaxy S2.
Now before you start getting excited, it is not perfect. It is frustratingly slow and buggy, although I have not had much trouble actually running the OS itself.
I would just like to point out that I am still a novice and there are most likely various easier/faster ways of doing this process, but this guide does require a moderate to large amount of experience of using Linux's Terminal.
This guide is written for Windows ME because it was more usuable than XP and was the only other version I had, but I was successful in XP booting up. Will try to add videos!
I know the image looks like a monitor, so I will take another picture when I get chance.
Note: I take no responsibility for any damage caused by my walkthrough as you are doing it at your own free will.
Now for the walkthrough. These are the steps I took in order to get this working:
Follow this guide to installing Backtrack 5 on your Galaxy S2 (Thanks to DooMLoRD & anantshri for the work they put into porting Backtrack from the X10 version)
You will need to re-size the Backtrack image by going into linux on your Desktop or Laptop, creating a new image and copying the Backtrack files over to the new image.
Navigate to the directory of bt.img (Backtrack image) in linux using the Terminal then use the commands below (anantshri provided them in another post):
Note: This requires 4GB of space (cannot create a larger image as the FAT file system only allows a maximum filesize of 4GB)
Note 2: I used a Backtrack 4 to do the below, so if you use Ubuntu or similar, you may need to add "sudo" to the start of each line just to make sure it works.
dd if=/dev/zero of=bt1.img bs=1M count=4000 losetup /dev/loop2 bt1.img mkfs -t ext2 /dev/loop2 mkdir BT mount -o loop bt.img BT mkdir BT1 mount -o loop bt1.img BT1 cp -f -R BT/* BT1/ umount BT1
Now load up Backtrack on your phone and from within it, download Glib-2.0 (or 2.24.2 here) and extract the files.
Open Terminal and navigate to the new Glib then type the following commands:
./configure make make install
In Terminal, navigate to the Qemu directory and, like above, type the following commands (This can take a while and your phone can get quite warm so you could continue to the next step):
./configure make make install
In a Linux OS of some sort on your Desktop or Laptop (I used Ubuntu), run the command "sudo apt-get install qemu". This will download and install Qemu onto your linux system.
With Qemu installed, run the following commands (ref. here) to create an image:
qemu-img create -f qcow2 winme.img 3G if you have a cd image on your system: qemu -m 256 -hda winme.img -cdrom winme.iso -boot d or if you have the cd in the drive: qemu -m 256 -hda winme.img -cdrom /dev/cdrom -boot d
Like earlier, we will be creating an image to store the files. Do the following commands in linux terminal and to copy the files over:
Note: You will need another 2GB of space free to create the below image (this goes for the phone you are copying it to as well)
dd if=/dev/zero of=btextras.img bs=1M count=2000 losetup /dev/loop3 btextras.img mkfs -t ext2 /dev/loop3 mkdir BTExtras mount -o loop btextras.img BTExtras cp btextras.img BTExtras/ umount BTExtras
You will now need to edit the startbt and stopbt scripts in that same folder.
Add the following lines to startbt:
Directly after line 15: "$bboxpath mknod /dev/block/loop253 b 7 253" Directly after line 18: "$bboxpath losetup /dev/block/loop253 $kit/btextras.img" Directly after line 21: "$bboxpath mkdir $mnt/extras" Directly after line 22: "$bboxpath chmod a+rwx $mnt/extras -R" Directly after line 23: "$bboxpath mount -t ext2 /dev/block/loop253 $mnt/extras"
Directly after line 18: "$bboxpath umount -l $mnt/extras" Directly after line 19: "$bboxpath rm -r $mnt/extras" Directly after line 23: "$bboxpath losetup -d /dev/block/loop253"
Once the phone has restarted, you can now reload Backtrack.
Within Backtrack, open Terminal and cd to /extras. Once here, run the following command:
/usr/local/bin/qemu -m 256 -hda winme.img -vnc :2
The command will appear to "hang" the system, but if you open up a vnc client on your phone, you can connect to Windows ME with the address of 127.0.0.1 and port 5902.
Hopefully everything runs smoothly, but if you have any problems setting this up then let me know.
- When VNC'ing into Windows (or any other OS emulated with Qemu), the host and local mouse are out of sync.
- Emulation is very slow.
- Currently no network connection (Working on this)
- Also looking at running Qemu from within Android, removing the need for Backtrack.