• Introducing XDA Computing: Discussion zones for Hardware, Software, and more!    Check it out!

Android running x86 wine and solitaire!

Search This thread

jshafer817

Senior Member
Jul 11, 2010
381
480
NRH, TX.
www.onsitedentalsystems.com
http://forum.xda-developers.com/showthread.php?t=1258506&page=5 UPDATED GUIDE PAGE 5
hp.jpg


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\x00\x00\x00\x00\x02\x00\x03\x00:\xff\xff\xff\xff\xff\xfe\xfe\xff\xff\xff\xff\xff\xff\xff\xff\xff\xfb\xff\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:

jshafer817

Senior Member
Jul 11, 2010
381
480
NRH, TX.
www.onsitedentalsystems.com
'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.
 

jshafer817

Senior Member
Jul 11, 2010
381
480
NRH, TX.
www.onsitedentalsystems.com
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\x00\x00\x00\x00\x02\x00\x03\x00:\xff\xff\xff\xff\xff\xfe\xfe\xff\xff\xff\xff\xff\xff\xff\xff\xff\xfb\xff\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:

yareally

Senior Member
Feb 19, 2011
1,446
229
codingcreation.com
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?
 

jshafer817

Senior Member
Jul 11, 2010
381
480
NRH, TX.
www.onsitedentalsystems.com
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.
 
  • Like
Reactions: yareally

yareally

Senior Member
Feb 19, 2011
1,446
229
codingcreation.com
Thanks for your reply. I've thought about doing it before, but I ruled it out because I thought it would be too slow, but your results seem like it's promising enough to try out at least for fun :)


Thanks!


I think it will let you fake post links if you exclude the "http://" part of it if you need to do so.
 
Last edited:

jshafer817

Senior Member
Jul 11, 2010
381
480
NRH, TX.
www.onsitedentalsystems.com
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:

Top Liked Posts

  • There are no posts matching your filters.
  • 9
    http://forum.xda-developers.com/showthread.php?t=1258506&page=5 UPDATED GUIDE PAGE 5
    hp.jpg


    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\x00\x00\x00\x00\x02\x00\x03\x00:\xff\xff\xff\xff\xff\xfe\xfe\xff\xff\xff\xff\xff\xff\xff\xff\xff\xfb\xff\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
    3
    Wow so confused anyone can make a noob guide :p

    Works on my droid 4. Just ran notepad... Droid 4 has binfmt compiled into the kernel... unlike cyanogenmod 7 and the droid1... I had to compile that in...

    The HP Touchpad did not have binfmt_support..

    If you do not have binfmt support and binfmt in the kernel, you will have to run wineserver first, then wine-pthread, every time you run an app.

    If you do have binfmt, then you can do the directions on page5 and and echo and registry qemu and then you can run wine-pthread every time you run an app without having to run wineserver first.

    I used my http://www.onsitedentalsystems.com/wine.tar.gz

    ************************************************** *****************
    Directions I used for wine.tar.gz if you do not have binfmt
    what to do with wine.tar.gz

    Move everything from bin into your /usr/bin
    Move gnemul to your /usr
    Move wine folder to your /usr/lib so you have /usr/lib/wine

    mkdir /user/.wine
    unzip wine.zip /user/.wine
    fix dosdevices.
    cd /user/.wine/dosdevices
    ln -s ../c_drive c:

    *when I say fix dosdevices make it to where this is a valid path
    /home/user/.wine/dosdevices/c:/windows get it?


    then run
    /usr/bin/qemu-i386 /usr/bin/wineserver
    /usr/bin/qemu-i386 /usr/bin/wine-pthread notepad.exe

    See what happens.. what errors you get.

    Dont forget the files you copy into /usr/bin must be executable
    chmod 755 wine*

    Dont forget you may need to export display
    =============================================
    If you do have binfmt
    mount -t binfmt_misc none /proc/sys/fs/binfmt_misc
    echo ':i386:M::\x7fELF\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02\x00\x03:\xff\xff\xff\xff\xff\xfe\xfe\xff\xff\xff\xff\xff\xff\xff\xff\xff\xfb\xff\xff:/usr/bin/qemu-i386:' >/proc/sys/fs/binfmt_misc/register

    then you can just do
    /usr/bin/qemu-i386 /usr/bin/wine-pthread notepad.exe
    everytime.
    ==============================================
    HOW TO COMPILE ON ARM AND UBUNTU 12.04


    This will run wine if you compile with 0.13 or 0.14

    sudo apt-get install zlib1g-dev
    sudo apt-get install libsdl1.2-dev
    ./configure --target-list=i386-linux-user --enable-sdl --prefix=/usr --extra-cflags=-marm
    make
    sudo make install

    I ONLY need to use the --extra-cflag when compiling with Ubuntu and Chroot droid 4, and Ubuntu and the Touchpad. Not needed for OLPC and Fedora 17.

    Works great on Droid4 with Ubuntu 12.04 Chroot AND my HP TouchPad Running Native Ubuntu, AND OLPC 12.1.0 and 11.1.0

    These are my notes. In case nokia takes down the maemo forums..
    2
    See.. Pinball and Native

    Yeah.. its slow... but not as slow as you may think.. Hoping to run some binaries that are not games.. Much faster running Ubuntu Native on the TouchPad.

    Seems to run better with windows native dll's... quartz.dll for sure.

    MS TrueType fonts help. (This pic is without quartz.dll and truetype fonts)
    hp.jpg
    1
    This sounds awesome, I gotta try it out.
    1
    It's so easy to install Wine_armel

    http://kapper1224.sblo.jp/article/56333300.html

    t's so easy to install Wine_armel

    wget http://kapper1224.sakura.ne.jp/wine_1.4-1_armel.deb
    sudo dpkg -i wine_1.4-1_armel.deb