yashsingh1/xdaforums huggingface dataset:
[ZenFone 2 General] ycavan:
Okay, I put up another build for 2015-07-17 in the main kernel thread.

The project I'm currently working on is trying to get a directx 10/11 displaylink usb adapter to load in Windows.

The one I got is: http://www.hisdigital.com/us/product2-674.shtml

Right now, the drivers that come with the unit don't like the qxl vga we use with Spice. I've tried to install the latest version of the displaylink drivers, but they caused Windoze 8 to crash. I read that other people had the same problem, so I'll try older drivers ( but newer than the ones that came w/ the unit ).

IF this works out, then we will have a DX 10/11 HDMI video card to play with under Windoze.

Now, someone will ask why I'm not working on the Linux end of things... well, this is a USB 3.0 device and Linux currently only supports up to USB 2.0. It doesn't sound like DisplayLink is interested in working w/ the Linux community here... otherwise, this could make full speed linux w/o virtualization a reality & people that just want to play games would be able to run them at full speed w/ Wine. So... if this is something you'd like to see, then please please get with DisplayLink to work w/ the Linux community so we can get full access to this device.
[ZenFone 2 General] sorg:
Several years ago i've tried USB2.0 external video card. Performance was awful even for office apps.

ZF2 has only USB2.0 port. Did you try this card on PC with USB2.0 mode? Is it enough performance to play games?
[ZenFone 2 General] ycavan:
tbh, I haven't, but my wife did use a Pluggable 3000 ( usb 3.0 dock w/ DVI, gigabit ethernet, 2x usb 3.0 & 4x usb 2.0 ) with her Dell windows 8 tablet & it worked well for her. Of course, she's not a gamer, more Youtube and stuff like that.

Actually, I should test that device out. lol

Oh yeah, if anyone wants to try passing USB devices to their guest os here's the process:

The easiest thing to do is to have 2 windows up: 1 for $lsusb and 1 for qemu

The addition you will want for your qemu script is:

-usb -device usb-ehci,id=ehci

These 2 switches create a USB 2.0 hub called ehci ( the id is the name of the interface you will use later )

In the window for lsusb, type $lsusb to get a list of usb devices after you plug one in, something like:

[android@localhost ~]$ lsusb

Bus 003 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub

Bus 002 Device 002: ID 17e9:4301 DisplayLink

Bus 002 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub

Bus 001 Device 002: ID 1519:0452 Comneon

Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub

Make note of the ID, it's actually 2 values: vendorid & productid

If you want the usb device loaded at boot ( startup of qemu ), then you can do the following ( for the Displaylink device earlier ):

$start_win7.sh -device usb-host,bus=ehci.0,vendorid=0x17e9,productid=0x4301

inside the (qemu) you can also add/remove usb devices as they show up.

(qemu) info usb <-- lists the usb devices that the guest is using

(qemu) info usbhost <-- lists the usb devices that Qemu currently "sees"

To remove a usb device from the guest:

(qemu) usb_del < Guest USB ID in the format x.y > you will get x & y values from: info usb

To add a usb device to the guest: ( with our ehci interface and the DisplayLink device from earlier )

(qemu) device_add usb-host,bus=ehci.0,,vendorid=0x17e9,productid=0x4301

Sometimes, Windows acts up and refuses to see anything, so I end up shutting down the virtual machine and restart it tying in the usb device at boot.
[ZenFone 2 General] qkall:
Um correct me if I'm wrong but Ubuntu has both support for display link and USB 3.0 for a couple years (any kernel over 3.9)
[ZenFone 2 General] ycavan:
Please see this thread:

http://displaylink.org/forum/showthread.php?t=1748&page=19
[ZenFone 2 General] neptvne:
i found this too

http://support.displaylink.com/forums/287786-displaylink-feature-suggestions/suggestions/7988955-support-linux-on-all-your-devices
[ZenFone 2 General] ycavan:
The beta Android app only supports Arm devices, looked into that too.
[ZenFone 2 General] neptvne:
found this

http://libdlo.freedesktop.org/wiki/
[ZenFone 2 General] Techronico:
One day this will be easy for us dumb people...er, I mean... for us who aren't F'ING GENIUSES!!!

Great work with all of this. I keep reading all of this and will be trying it out when I know that I won't screw it all up irreparably. I'm not a noob, just an advanced user looking at way more advanced users. My friends that I've told this to aren't even able to comprehend when I tell them about this, and they are IT nerds like me.
[ZenFone 2 General] aziz07:
Not putting any pressure on but if we can natively boot any recent linux distribution, e.g. Arch x64 , we can then create a clean mobile friendly interface or use a lightweight mobile friendly window manager e.g. Enlightment (E17 in graph) and LXDE (Debian+LXDE=82Mb RAM [MENTION=434273]boot[/MENTION]) both use very little RAM yet still have beautiful interface:
[ZenFone 2 General] sorg:
On 4GB version, you don't have to think about it ;) Can use KDE (although, recently i like XFCE more) without problem.

I think, even on 2GB version should be no problem. Since, we don't have 3D drivers, we cannot play games anyway.

Did you successfully boot any of standard linux distro already? Where you read about SFI and moorefield compatibility?
[ZenFone 2 General] aziz07:
I said ''if'' its possible :D Its good to speculate sometimes. Aren't android drivers linux based? Ubuntu Touch is already preinstalled on ARM devices.

I am sure that linux@82Mb RAM will use much less battery too ;)
[ZenFone 2 General] sorg:
oh, i've missed "if" part.

They are. But 3D drivers aren't open sourced, so you cannot port them to other version of kernel. Also, Android uses OpenGL ES, while full featured Linux uses full featured OpenGL. I don't know how big difference between these OpenGL standards, but they are not 100% the same.
[ZenFone 2 General] aziz07:
Someone posted here native linux on moto x tablet but did not test 3D.
[ZenFone 2 General] janglang:
I have follow the steps and successfully run windows 7 on my ZE551. It is amazing except that I can't mount my external sd card. I have try to flash back to stock boot.img, the sd card appear again. I found the selinux has been change to permissive, is it the reason of problem ? It runs perfect for every thing else.
[ZenFone 2 General] ycavan:
that's weird, it almost sounds like your microsd card is formatted in a way that the kernel doesn't recognize; but the stock kernel recognizes. What format is your sd card?

Also, other than changing out the kernel, did you make any other changes to the phone?
[ZenFone 2 General] KnightmareZ3R0:
If someone could help me out, I am new to using linux. I have made it all the way to step 8/9 but I don't know how to find the location of my phone's storage or the sdcard in the /mnt/ directory.
[ZenFone 2 General] janglang:
it's a 64g microsd with one exfat partition. I have changed platform.xml for app to access sdcard and install universal init.d to run script to swapoff zram. Thanks for your help.
[ZenFone 2 General] sorg:
There is no exFAT driver in source code released by ASUS. So, if custom kernel developer didn't add exFAT driver source (from Samsung, for example) then kernel won't support exFAT SD cards.
[ZenFone 2 General] janglang:
Thank you, I have change to custom ROM from TheSSJ, it include exfat and kvm driver (Thanks to all your fine work)
[ZenFone 2 General] ycavan:
[MENTION=710468]knightmare[/MENTION] Please look at post 72 on how to mount directories in Linux deploy. :)
[ZenFone 2 General] KnightmareZ3R0:
Thanks for the assistance on that problem, but now when I try to do step 9 I get:

Spice-Warnng **: reds.c:2364:reds_init_socket: binding socket to 127.0.0.1:5900 failed

qemu-system-x86_64: failed to initialize spice server.

I also installed ebtables to see if that would fix it, but it didnt help.
[ZenFone 2 General] ycavan:
do you have a vnc server running? 5900 is the default vnc port. ie, when you start Linux Deploy, it's enabled by default. I highly recommend only starting ssh from Linux Deploy.

tldr; easiest thing would be to try to change the port number from 5900 to 5901. ( or whatever port you feel comfortable with )

In aSPICE, use the same port number to connect to your virtual machine. :)
[ZenFone 2 General] KnightmareZ3R0:
Thank you sooo much I now have Windows 10 installed. Hopefully these will be my last questions how do I get the virtio drivers with Arch Linux and how do I get an internet connection?
[ZenFone 2 General] ansebovi:
windows 10? with same procedure and windows 10 iso?
[ZenFone 2 General] KnightmareZ3R0:
Yep :D
[ZenFone 2 General] ycavan:
Have you tried the virtio drivers cd in the OP? Those are the same drivers I use on my Arch x86_64 distro for both Windows 7 & Windows 8. You're pioneering the Windows 10 install here :D

What I did was open up device manager and have it search for the drivers on the cd. ( qemu-kvm startup line --cdrom <location of the driver cd> or from the qemu-kvm command line: change ide1-cd0 <location of the driver cd> to mount the cd )

Other than missing the virtio drivers, how does Windows 10 feel? :)
[ZenFone 2 General] aziz07:
Can you post a youtube video and use some apps xD Can't wait too see a cellphone running Desktop Win 10 :fingers-crossed:
[ZenFone 2 General] KnightmareZ3R0:
I am completely new to messing around on my phone like this. It is also the first time I have had an phone with an unlocked bootloader. I have the Asus Zenfone 2 64gb 2.4ghz 4gbram

Ok so I am gonna be honest an tell you that I have no idea what you are saying to do. Windows 10 is running nice and smooth especially since I am letting it use 2gb of ram (2046mb since it wont let me do anything over 2047mb.) the only problem I am running into atm is no internet connection.

---------- Post added at 04:38 PM ---------- Previous post was at 04:24 PM ----------

What program do I use to screen capture and post to youtube?
[ZenFone 2 General] ycavan:
You will want to download the Redhat Virtio drivers cd image from the link in the very first post :)

Save the image on your phone somewhere you can see it from your distro.

ie, let's say you have a folder on your SD card called /Vcd and you saved the drivers cd as virtio.img

The first thing you want to do with Linux Deploy is to create shared mount points from Android to your distro. I recommend the following:

/storage/emulated/0

/mnt/media_rw/MicroSD

Here's the process in Linux Deploy:

1. Click the properties icon ( looks like a download icon to the right of Start )

2. go down to the bottom and click the checkbox on "Custom Mounts"

3. Click the "Mount Points" section

4. Click on the 3 dots and click "New"

5. in the line, type in the mount point you want, ie: /storage/emulated/0

6. Repeat with the SD card: /mnt/media_rw/MicroSD

7. Repeat with other directories you want access to :)

Now you can start Linux Deploy and you will see the mounts under /mnt

If you used the 2 mount points earlier, you would see: /mnt/0 and /mnt/MicroSD if you did $ls /mnt

So now, when you start your qemu script, you would pass -cdrom /mnt/Vcd/virtio.img ( if you placed the cd image in your Vcd folder on your sd card ):

./start_win7.sh -cdrom /mnt/Vcd/virtio.img

would be how the line would look. :)

re: recording

If you plug your phone into a windows pc, you can install the Asus PC Link software and connect to your phone. Some of the cool options are taking screenshots & recording videos.
[ZenFone 2 General] KnightmareZ3R0:
Here is a video of me using windows 10 and playing some solitaire(which I am crap at).

Windows will seem a bit laggy, and that is because of the screen recorder program I was using.

[YOUTUBE]watch?v=ltq34AifQZM&feature=youtu.be[/YOUTUBE]
[ZenFone 2 General] ycavan:
This looks really really good even without hardware acceleration :D
[ZenFone 2 General] KnightmareZ3R0:
Yea, but the internet still wont work :crying:
[ZenFone 2 General] ycavan:
Like I posted earlier, you probably just need to install the network card drivers under Windows 10 w/ the Redhat virtio drivers cd.

After you get the network card driver sorted out, as long as you're connected to wifi, your Windows 10 will have internet access as well.
[ZenFone 2 General] KnightmareZ3R0:
I did what you said, but I don't know if the drivers installed. How can I check if it worked? Do I need to get the Spice Guest Drivers too?

How can I get hardware acceleration working?
[ZenFone 2 General] aziz07:
Awesome, Win 10 has a much better mobile & touch friendly interface.

Hes using an onscreen recorder which really slowdown everything. Its better to record with another cellphone, laptop cam or a camera for better comparaison.
[ZenFone 2 General] KnightmareZ3R0:
I will put up a better vid later today for now I must play Darksouls 2 with a friend. (Not on ZF2)
[ZenFone 2 General] ycavan:
Could you post your qemu-kvm start script? also, are you connected to wifi on your phone? I've noticed that we can't use cell service for internet on our guest environments.

re: hardware accelerated video: I'm looking into options. Right now, there isn't an Android qemu-kvm build and we don't have video drivers for linux so we're kinda sol for now. Once we have access to hardware accelerated video drivers, we can look into the 3d virtio video driver that's being discussed right now.
[ZenFone 2 General] KnightmareZ3R0:
Yea I am on wifi.

#!/bin/bash

qemu-system-x86_64 -full-screen -m 2040M -enable-kvm -cpu host -drive file=/mnt/0/machine1.img,format=raw -boot menu=on --usbdevice tablet -smp 4 -vga qxl -monitor stdio -balloon virtio -soundhw hda -net nic,model=virtio -net user,smb=/mnt/MicroSD -spice port=5900,addr=127.0.0.1,disable-ticketing $@

Is that what you wanted?

---------- Post added at 08:35 PM ---------- Previous post was at 08:21 PM ----------

Ok, I solved the internet problem. I am a stupid man. lol
[ZenFone 2 General] KnightmareZ3R0:
Internet for me is working on wifi and on my data connection.
[ZenFone 2 General] aziz07:
Thats great, we can use data internet in windows on Zenfone 2.
[ZenFone 2 General] base_band5:
I wonder if someone could put me in the right direction please. I've installed Ubuntu Wily and everytime I run the startup_win7.sh, it fails at virtually every line in the script! Could someone tell me what specific version of Linux they are using via Linux Deploy which has successfully ran Windows 7, 8 or 10?
[ZenFone 2 General] ycavan:
Could you post your startup_win7.sh file as well as a quick:

$ ls /usr/bin | grep qemu
[ZenFone 2 General] base_band5:
Here it is:

android@localhost:~$ cat *.sh

#!/bin/bash

qemu-system-x86_64 -full-screen -m 1G -enable-kvm -cpu host \

-drive file=/mnt/0/Shared/machine1.img,format=raw -boot menu=on \

--usbdevice tablet -smp 4 -vga qxl -monitor stdio -balloon virtio \

-soundhw hda -net nic,model=virtio \

-net user,smb=/mnt/MicroSD/Shared/ \

-spice port=5900,addr=127.0.0.1,disable-ticketing S@

android@localhost:~$ ls -lrt /usr/bin | grep qemu

lrwxrwxrwx. 1 root root 18 Jun 11 20:24 qemu-system-x86_64-spice -> qem -system-x86_64

-rwsr-sr-x. 1 root root 6469968 Jun 11 20:24 qemu-system-x86_64

-rwxr-xr-x. 1 root root 6379024 Jun 11 20:24 qemu-system-i386

-rwxr-xr-x. 1 root root 1109848 Jun 11 20:24 qemu-nbd

-rwxr-xr-x. 1 root root 1170192 Jun 11 20:24 qemu-io

-rwxr-xr-x. 1 root root 1142232 Jun 11 20:24 qemu-img

android@localhost:~$
[ZenFone 2 General] ycavan:
Try changing the last part of your script from S@ to $@
[ZenFone 2 General] base_band5:
Thanks for your advise, but I was still getting another error. So, I decided to start again only this time I used Arch Linux. I read thru the previous pages here and found creating the 10 gig machine.img file. So after creating this I ran the script and now I get some some smb is'nt installed. I've uploaded the error image, any help would be appreciated.

[
[ZenFone 2 General] ycavan:
smbd is the samba daemon. Samba is the filesharing protocol ( under Windoze, it's called CIFS ) for Windows.

Arch linux's package manager is called pacman :)

to install samba, I'd recommend:

$ sudo pacman -S samba
[ZenFone 2 General] base_band5:
Many thanks ycavan that kicked off the Windoze10 install [emoji1] but 3 hours later it was still spinning the dots with the waiting message. I ended up switching the fone off. Could I ask you how long it took you to install Win7/8? May be I was being too ambitious installing Win10!
[ZenFone 2 General] ycavan:
I think 20 minutes or so
[ZenFone 2 General] PwnCloud:
Is native installation impossible?
[ZenFone 2 General] ycavan:
Personally, I don't think anything is impossible. Am I willing to wipe my daily driver to try to install Windows on it? That's the real question. For me? Nope. I believe that the virtualization we have is pretty darn close to running natively.

The primary things that still need to be addressed are:

1. Access to the Android drivers for hardware acceleration of video.

2. 3d support in the new virtio video card in qemu

3. Windows drivers for the new virtio video card

Also, if someone were to get Windows installed natively, they would need to get drivers from Intel and imagination studios. At the moment, there are none.
[ZenFone 2 General] ycavan:
I know this is kind of a necro, but if you want to use RDP here's the process:

1. add this switch to your qemu-kvm startup file: -net user,hostfwd=tcp::<port numer>-:3389, ie: -net user,hostfwd=tcp::5555-:3389

This will forward port 5555 to 3389 on your VM so you could RDP in from your laptop or use an RDP client on your phone.

*OPTIONAL*

If you like using blank passwords, you won't be able to log into your Windows VM via RDP because Microsoft disables blank passwords over a network by default. You will need to disable that security policy.

1. Open Administrative Tools from the Control Panel

2. Open Local Security Policy

3. Open Local Policies -> Security Options

4. Change Accounts: Limit local account use of blank passwords to console from Enabled to Disabled

Now, you can use an RDP client to connect to your phone on port 5555
[ZenFone 2 General] sorg:
Since Windows uses DirextX, i'm afraid we will never get 3D acceleration on ZF2 due to big difference from OpenGL.

For Linux - may be. Because it also based on OpenGL, it should be possible to make some wrapper/virtual driver.
[ZenFone 2 General] ycavan:
Actually, gallium already supports d3d, as seen in this paper: http://www.google.com/url?q=https:/...SA2CDs&usg=AFQjCNEpP3njFc93oWHr3Y-MxSamqRz3Ug

The gallium nine library exists already with mesa, work needs to be done to link it to a qemu-kvm vga card. After that vga drivers need to be written to pass requests to the gallium nine library.
[ZenFone 2 General] sorg:
May be Regal library can be useful as well. https://github.com/p3/regal

It emulates OpenGL on top of OpenGL ES, if i understood right.
[ZenFone 2 General] Kokumotsu:
PC gaming

Since the zenfone can run windows would it possibly be able to run something like darksouls in the go or too demanding for the phone. I know there are screen stream apps so that would probably be the next best thing huh
[ZenFone 2 General] ycavan:
We have virtualization and that's pretty close to native ( guest os request -> straight to cpu in the phone ), but we don't have access to the video card drivers in our phone nor 3d accelerated drivers, so gaming is probably not in our future for a bit.

I have been working on getting libhybris compiled ( it compiles ) for our phones, but for some reason I can't get system built for our phones. Once I figure out what's going on ( will probably have to re-download 40 gigs of files from Google ) and get the real System built, we can then modify Bionic ( the executable loader for Android ) to be more linux-y and rebuild System. If that all works, then we have a good shot of having full Linux access to our Android hardware.
[ZenFone 2 General] DrGit:
I've been trying this as well, albeit not via the compiling AOSP/CM route - I just used prebuilt libhybris from Ubuntu and bind-mounted /system in the chroot. I think the biggest issue with either approach, aside from patching bionic, which I haven't anded, is that the binary PowerVR drivers supplied by Intel/ASUS for Android are 32-bit, which means they can't be linked from 64-bit hybris, limiting the entire graphics stack and anything running on top of it to 32-bit. So libhybris, Mir/Wayland/X11, any window manager or desktop/phone environment, and any apps using OpenGL have to be 32-bit as well. I also got Regal compiled, but without a working libhybris setup (all tests segfault) and no X11 support, that doesn't do us much good.

I wish ImgTec would just release the documentation for the PVR Rogue architecture, and or their driver development kit, NDA-free, so someone could write a Gallium driver. But no, they're trying to hire someone to do it, and I doubt they'll find someone in the UK for it. I found a NDA-free programmer's guide for their Meta processor architecture, which I suspect Rogue is heavily based on, but I don't know enough about any of that to reverse-engineer or write a compiler for it. Given the time, I might look into that (basically llvmpipe for Meta) but ImgTec becoming more open would be vastly preferable.
[ZenFone 2 General] ycavan:
The core problem is that Google decided to go w/ BSD's c library ( bionic ) while Linux uses GNU's c library ( libc ). Libhybris works by making changes to bionic to it has corresponding libc entry points; so it's necessary to recompile System so the generic libraries all use the new bionic bindings. The libhybris library then allows us to link executables so they can communicate w/ the Android drivers and software.

32 vs 64 bit, we should be able to figure something out; otherwise, I'd be willing to use a 32-bit chroot if we had access to all of the hardware. :) Qemu-kvm can still run 64-bit os's since we have Intel's vt-x extension, we'd just be limited to 2 gigs of ram for it per instance. ;)
[ZenFone 2 General] ycavan:
Windows 8.1 Pro upgraded to Windows 10 Pro on the phone. Windows 8 Virtio & QXL drivers working fine so far.
[ZenFone 2 General] MrPokination:
But what if...

So this is absolutely awesome and I cant wait for this to grow even more, BUT, Windows 10 has been shown to run on arm processes like the raspberry pi 2. so (and I think you know where I am going with this) could Windows 10 on pi = Windows 10 on android?

Honestly I don't expect you to say this could work but the thought just came to mind. but if it is possible then could THAT mean NVIDIA Shield + Windows 10 = gaming pc xD

I really don't expect this to work but it is nice to think it could... what do you think?
[ZenFone 2 General] AkiroX:
That's Windows for ARM. It's not the same as full Windows which is what we're trying to achieve. A full Windows install would allow us to run all software made for Windows.

Technically we already can. It's just there's no hardware acceleration so 3D applications will suck.
[ZenFone 2 General] berkay2578:
Hmm, so I've been following this for a while and actually sold my S3 to buy a Zenfone2 32GB. I plugged in a 64GB Class 10 SD card and was thinking of actually installing Win10Pro. I have 2-3 questions, if it's not too much can you answer/try to answer them?

1. Can you use a x64 Windows without a problem? Since CPU architecture is x64 as well I think I'm asking an unnecessary question though.

2. Can you install IDEs like VS2012 or Eclipse to develop & compile applications? I mean you guys are installing the full-blown Windows yes, but can the installed Windows manage to link IDEs to SDKs and compile?

3. If these can be done, how do I donate? :D

Seriously great job though, you guys are the reason I bought a Zenfone 2.
[ZenFone 2 General] ycavan:
Short answer: it should :)

Kvm stands for kernel-mode virtual machine, meaning the same cpu architecture is passed to the guest.

I think the main thing we're missing is hardware video acceleration, but that shouldn't matter too much if you're mainly going to use it as a build platform.

And yes, Windows 10 installed ( upgraded ) just fine.
[ZenFone 2 General] berkay2578:
Thank you very much for the info, I'll be following the 2D/3D acceleration topic closely as well. If you add any sort of donation thingy, let me know :)