Post Reply

Android running x86 wine and solitaire!

OP jshafer817

12th September 2011, 12:49 AM   |  #1  
OP Senior Member
NRH, TX.
Thanks Meter: 393
 
305 posts
Join Date:Joined: Jul 2010
More
http://forum.xda-developers.com/show...1258506&page=5 UPDATED GUIDE PAGE 5


I got Android to run with wine and solitaire on CM7 and my droid. It was a total pain. But YAY.

Its hard to write a guide without being able to post links.

You need to first be able to chroot into ubuntu and create a vnc server. Then recompile the kernel for binfmt support.

Then create slackware 10.2 on vmware and install wine and qemu.. run wine and qemu. like wine notepad.exe so it creates /root/.wine. Create an image file out of that and copy that to your phones sdcard.

mount both of the ubuntu and slackware images.

mount -t binfmt_misc none /proc/sys/fs/binfmt_misc

echo ":qemu-i386:M::\x7fELF\x01\x01\x01\x00\x00\x00\x00\x00\x0 0\x00\x00\x00\x02\x00\x03\x00:\xff\xff\xff\xff\xff \xfe\xfe\xff\xff\xff\xff\xff\xff\xff\xff\xff\xfb\x ff\xff\xff:/usr/bin/qemu-i386:" > /proc/sys/fs/binfmt_misc/register

then run vncserver
export DISPLAY=0:1
my ubuntu is / in a chrooted enviroment from /data/local/ubuntu
my slackware.img is mounted /chroot (if inside chroot) or /data/local/ubuntu/chroot (if not inside chroot)
I copied /chroot/usr/gnemul/qemu-i386/* to /usr/gnemul/qemu-i386
COPY THE X86 stuff inthe the /usr/gnemul/qemu-i386/lib and usr folders. qemu will look for these x86 libraries when the x86 binaries ask for them. IMPORTANT.
copy /chroot/usr/lib/wine to /usr/lib/wine
copy the /chroot/root/.wine to /root/.wine the best you can and setup dosdevices with ln -s
put sol.exe in /root/.wine/dosdevices/c:/windows
then it should work =)

/chroot/usr/bin/wine-pthread sol.exe

I can put all this in a torrent if anyone is interested. I need to add I got qemu-i386 that was already compiled and stuck it in /usr/bin and /chroot/usr/bin though I decided not to try to chroot into my x86 image.
which would be like chroot /chroot

I might be able to not use /chroot and just copy install the x86 version of wine.deb on arm and force the architecture and let binfmt take care of the ELF.

Here is a torrent that has the ubuntu.img and all the other files.
------------------------

http://thepiratebay.org/torrent/6670616

terminal
cd /sdcard/ubuntu
sh ubuntu.sh
bootubuntu

that will get you into ubuntu.. if your kernel does not support binfmt then:

startui (starts vncserver)
/usr/bin/qemu-i386 /usr/bin/wineserver
/usr/bin/qemu-i386 /usr/bin/wine-pthread sol.exe

If it does then
startui
wine-pthread sol.exe
Last edited by jshafer817; 2nd November 2012 at 02:58 PM.
The Following 8 Users Say Thank You to jshafer817 For This Useful Post: [ View ]
12th September 2011, 01:01 AM   |  #2  
GazaIan's Avatar
Senior Member
Flag Your basement
Thanks Meter: 414
 
1,534 posts
Join Date:Joined: Dec 2010
Donate to Me
More
This sounds awesome, I gotta try it out.
12th September 2011, 01:03 AM   |  #3  
OP Senior Member
NRH, TX.
Thanks Meter: 393
 
305 posts
Join Date:Joined: Jul 2010
More
I will help as much as I can. I cant post links. Soon as I can I will be a much bigger help. But I am SOOOO HAPPPY! I think we might be able to get this working without recompiling the kernel too. I will try that.
The Following User Says Thank You to jshafer817 For This Useful Post: [ View ]
12th September 2011, 01:08 AM   |  #4  
OP Senior Member
NRH, TX.
Thanks Meter: 393
 
305 posts
Join Date:Joined: Jul 2010
More
'Running native i386 linux binaries' is one thread in a forum I have been following. First you need ubuntu on android so google 'how to install ubuntu on android' which you will need a kernel that supports loop.

You can check how your kernel's .config by doing.
zcat /proc/config.gz > /sdcard/.config
I had to recompile for loop and binfmt for my droid 1 and cyanogenmod7.
12th September 2011, 01:47 AM   |  #5  
yareally's Avatar
Senior Member
Thanks Meter: 220
 
1,425 posts
Join Date:Joined: Feb 2011
Donate to Me
I imagine this runs applications that depend on wine slower than an old vw diesel beetle trying to get on the freeway?
12th September 2011, 01:51 AM   |  #6  
con247's Avatar
Retired Recognized Developer
Flag Ann Arbor
Thanks Meter: 3,117
 
3,070 posts
Join Date:Joined: Sep 2010
More
Quote:
Originally Posted by yareally

I imagine this runs applications that depend on wine slower than an old vw diesel beetle trying to get on the freeway?

No kidding. I bet an Overclocked dual core wouldn't be horrible though if you were running something minor.
12th September 2011, 04:51 AM   |  #7  
OP Senior Member
NRH, TX.
Thanks Meter: 393
 
305 posts
Join Date:Joined: Jul 2010
More
I am going to do it on my touchpad next.. as soon as it gets android.

h&&p://img714.imageshack.us/img714/5307/yaye.jpg
12th September 2011, 04:57 AM   |  #8  
OP Senior Member
NRH, TX.
Thanks Meter: 393
 
305 posts
Join Date:Joined: Jul 2010
More
Here is my bootubuntu

#modprobe ext2
mount -o remount,rw -t yaffs2 /dev/block/mtdblock3 /system
export kit=/sdcard/ubuntu
export bin=/system/bin
if [ ! -d /data/local/ubuntu ]
then
mkdir /data/local/ubuntu
mkdir /data/local/ubuntu/sdcard
fi
export mnt=/data/local/ubuntu
export PATH=$bin:/usr/bin:/usr/sbin:/bin:$PATH
export TERM=linux
export HOME=/root
mknod /dev/loop1 b 7 0
losetup /dev/block/loop1 /sdcard/ubuntu/ubuntu.img
mount -t ext2 /dev/block/loop1 /data/local/ubuntu
#mount -o loop,noatime -t ext2 $kit/ubuntu.img $mnt
mount -t devpts devpts $mnt/dev/pts
mount -t proc proc $mnt/proc
mount -t sysfs sysfs $mnt/sys
mount /mnt/sdcard /data/local/ubuntu/sdcard
sysctl -w net.ipv4.ip_forward=1
echo "Setting /etc/resolv.conf to Google Open DNS 8.8.8.8 and 8.8.4.4"
echo "nameserver 8.8.8.8" > $mnt/etc/resolv.conf
echo "nameserver 8.8.4.4" >> $mnt/etc/resolv.conf
echo "Setting localhost on /etc/hosts "
echo "127.0.0.1 localhost" > $mnt/etc/hosts
echo "READY TO ROCK AND ROLL BABY! "
echo "Brought to you by NexusOneHacks.net and the open source community! "
echo " "
mount -t binfmt_misc none /proc/sys/fs/binfmt_misc
echo ":qemu-i386:M::\x7fELF\x01\x01\x01\x00\x00\x00\x00\x00\x0 0\x00\x00\x00\x02\x00\x03\x00:\xff\xff\xff\xff\xff \xfe\xfe\xff\xff\xff\xff\xff\xff\xff\xff\xff\xfb\x ff\xff\xff:/usr/bin/qemu-i386:" > /proc/sys/fs/binfmt_misc/register (WATCH OUT FOR THIS, WHEN POSTING TO FORUMS IT CREATES SPACES.. REMOVE THE SPACES!)
export DISPLAY=0:1
chroot $mnt /bin/bash

#After exit command is executed clear it all up
echo " "

echo "Shutting down Ubuntu"
umount $mnt/dev/pts
umount $mnt/proc
umount $mnt/sys
umount $mnt
losetup -d /dev/block/loop2
losetup -d /dev/block/loop1
Last edited by jshafer817; 12th September 2011 at 06:16 AM.
12th September 2011, 05:08 AM   |  #9  
yareally's Avatar
Senior Member
Thanks Meter: 220
 
1,425 posts
Join Date:Joined: Feb 2011
Donate to Me
I understand doing all this for the sake of doing it as a fellow hacker (and I congratulate you on making it work), but I still would like to know (from the OP that posted this), how well is it running on your device. It's one thing to show it's possible, but I personally wouldn't go through and do it without knowing how slow it's going to (predictably) run.


Could you please shed some light on the performance (or lack thereof) you have experienced so far?
12th September 2011, 06:11 AM   |  #10  
OP Senior Member
NRH, TX.
Thanks Meter: 393
 
305 posts
Join Date:Joined: Jul 2010
More
Quote:
Originally Posted by yareally

I understand doing all this for the sake of doing it as a fellow hacker (and I congratulate you on making it work), but I still would like to know (from the OP that posted this), how well is it running on your device. It's one thing to show it's possible, but I personally wouldn't go through and do it without knowing how slow it's going to (predictably) run.


Could you please shed some light on the performance (or lack thereof) you have experienced so far?

Its okay.. I have my phone at 500Mhz (not overclocked). all I have ran so far is solitaire.. and I am about to turn on swap. But it takes a bit to load. Its slow too load, once its loaded its fast.

Its for fun.

The Following User Says Thank You to jshafer817 For This Useful Post: [ View ]
Post Reply Subscribe to Thread
Previous Thread Next Thread
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes


Top Threads in Android Software and Hacking General [Developers Only] by ThreadRank