yashsingh1/xdaforums huggingface dataset:
[ZenFone 2 General] ycavan:
Actually, the reason this works as well as it does is because of chroot'ing a linux distro to run qemu-kvm. :)

But if all you want is linux, then you would just need root + linux deploy ( or any other chroot method ) with XServer-XSDL ( best XServer app in the Play Store ) if you use X.

As far as hardware acceleration? I haven't been able to get hardware accelerated glx, gles or audio to work.
[ZenFone 2 General] HopelesRomantc91:
I attached some screenshots below. I'm just a little lost.
[ZenFone 2 General] ycavan:
Could you try not starting up VNC?

Also, do you have another SSH server already running?

Another thing to try, SSH into your phone's IP address.
[ZenFone 2 General] HopelesRomantc91:
How do I "Not start up VNC"? It seems to start automatically when I just hit the "Start" button on Linux Deploy.

Not that I know of. ES File Explorer is the only other thing I can think of, but I don't think that allows for SSH.

Same thing, "Connection refused." Also, I can't figure anywhere to actually input the password. In PuTTY, I just type in the IP and port, and there's no opportunity to even type in a username. I tried "android@[IP]" and "android/changeme@[IP]" and same thing, "Connection Refused." I've never used SSH before.
[ZenFone 2 General] ycavan:
Click on the button to the right of [Stop], it looks like a download icon...

Could you get screenshots of the stuff in that Properties list?

If you scroll down, you'll see Startup ( SSH, SSH settings & GUI )

uncheck GUI and make sure SSH is checked.
[ZenFone 2 General] HopelesRomantc91:
Tried disabling GUI, no change. Attached screenshots.

Thanks so much for your help, too.
[ZenFone 2 General] ycavan:
Please don't take this the wrong way, but did you already install your Ubuntu Precise distro? ( clicking the Install button )

It just seems like sshd is not starting up for you.

Also, are you rooted and have busybox installed?
[ZenFone 2 General] HopelesRomantc91:
Hey, no worries, ask any questions. I'm aware I'm a total n00b, so any and all questions (besides did I root and unlock my bootloader, those were done within 24 hours of receiving the phone, since I got it right after the bootloader unlock was available) are valid. I did click the install button. Should I just backup all my important stuff, and factory wipe and try again?

EDIT: I downloaded the APK for BusyBox but totally forgot to actually install it. I'm gonna try that real quick.

EDIT 2: No luck. And after I hit "Start" it says, "SSH :22 . . . done" so unless it's supposed to say more, it seems that SSH is loading. I'm gonna try a different Distro, I think.

EDIT 3: Changed to Fedora, SSH is wokring, will update if I get any further. Also, are we supposed to be running 32-bit or 64-bit Windows with this method?

EDIT 4: Never mind this edit. I think I'm getting the hang of this...
[ZenFone 2 General] adorable:
http://www.fujitsu.com/global/about/resources/news/press-releases/2011/0721-01.html

4 years ago....
[ZenFone 2 General] HopelesRomantc91:
OK, so I basically just copied your shell script, and I got this error:

Could not access KVM kernel module: No such file or directory
failed to initialize KVM: No such file or directory

So I just reinstalled the Kernel to see if that fixes it, but then somehow I guess I mistyped my password, so now I'm trying a straight Debian distro on Linux Deploy, and I'm gonna see if that makes everything work.

I should've been in bed 3 hours ago.
[ZenFone 2 General] ycavan:
You will need to use terminal emulator to load up the kvm.ko and kvm-Intel.ko modules. ( as a minimum )

Modules are in /lib/modules and you have to be root. Command to load modules is insmod. So...

$su ( grant root )

#cd /lib/modules

#insmod kvm.ko

#insmod kvm-Intel.ko

There are other modules you can load up as well, but I just woke up and can't remember them all. Haha
[ZenFone 2 General] sorg:
It doesn't matter. As long as it x86, it will be the same windows as desktop. Only interface will be different because of phone edition. So, either out of the box or through some hacks you will be able to run Desktop applications and Desktop games.
[ZenFone 2 General] robotbrain:
I forgot about Continuum, but especially with that in mind, it makes sense! If that's the case, I'll be tempted to switch from Android and emulate Android in Windows instead. It's going to be very interesting to see how well Microsoft pulls it off.

I'll probably stick with Android and Ubuntu through Linux Deploy for desktop apps when necessary though.

Also, hello from Xindian!
[ZenFone 2 General] sorg:
so, basically whole KVM and QEMU kernel support code is in these modules?

So, if someone will try to compile these modules for stock kernel, then we can get VM support on stock kernel?

(Yes, i know, there is module version/signature check, but i don't talk about this right now.)
[ZenFone 2 General] ycavan:
Yes. :)

Here's my current modules list:

bridge 92187 0

vringh 13896 0

virtio_pci 7625 0

virtio_net 21140 0

virtio_balloon 6114 0

vhost_net 30108 0

stp 2168 1 bridge

psnap 2335 0

p8022 1433 0

ntfs 196225 0

mac80211 456329 0

mtd 50451 0

llc 5572 4 stp,p8022,psnap,bridge

kvm_intel 131841 6

kvm 411712 1 kvm_intel

chipreg 2349 0

arizona_i2c 1812 0

8021q 18258 0

dfrgx 13837 0

bcmdhd 635204 0

cfg80211 442555 2 mac80211,bcmdhd

atomisp_css2401a0_v21 740579 0

sky81296 13517 1

ov5670 35725 1

m10mo_isp 111180 1 atomisp_css2401a0_v21

t4k37 43100 1

libmsrlisthelper 2426 1 t4k37

rmi4 36431 0

bcm_bt_lpm 7998 0

videobuf_vmalloc 5149 1 atomisp_css2401a0_v21

videobuf_core 19918 2 videobuf_vmalloc,atomisp_css2401a0_v21

fps_throttle 3088 0

tngdisp 1282040 167 dfrgx

The load order is in reverse and it's important that bridge is loaded last ( it requires other network modules to load first ).

[MENTION=438582]Tuanies[/MENTION], if Asus could compile in these modules in a future build, we could eliminate needing to unlock the bootloader... just saying. ;)
[ZenFone 2 General] HopelesRomantc91:
So if I try to run the shell script, it says permission denied, but if I type sudo first then it says it can't be found. I even chmod'd the file to 777 just to be safe. How do I fix this?

Also, here is my list of modules; if I'm missing any, please advise:

kvm_intel 131841 0 - Live 0x0000000000000000
kvm 411712 1 kvm_intel, Live 0x0000000000000000
dfrgx 13837 0 - Live 0x0000000000000000
bcmdhd 635204 0 - Live 0x0000000000000000
cfg80211 442555 1 bcmdhd, Live 0x0000000000000000
atomisp_css2401a0_v21 740579 0 - Live 0x0000000000000000
sky81296 13517 1 - Live 0x0000000000000000
ov5670 35725 1 - Live 0x0000000000000000
m10mo_isp 111180 1 atomisp_css2401a0_v21, Live 0x0000000000000000
t4k37 43100 1 - Live 0x0000000000000000
libmsrlisthelper 2426 1 t4k37, Live 0x0000000000000000
rmi4 36431 0 - Live 0x0000000000000000
bcm_bt_lpm 7998 0 - Live 0x0000000000000000
videobuf_vmalloc 5149 1 atomisp_css2401a0_v21, Live 0x0000000000000000
videobuf_core 19918 2 atomisp_css2401a0_v21,videobuf_vmalloc, Live 0x0000000000000000
fps_throttle 3088 0 - Live 0x0000000000000000
tngdisp 1282040 138 dfrgx, Live 0x0000000000000000
[ZenFone 2 General] ycavan:
If you are using my script, you'll want to change the location of the machine1.img line. /mnt/0 and /mnt/MicroSD are Custom Mounts in Linux Deploy.

Hit the properties button and scroll down to where it says Custom Mounts. Check that box.

Click on Mount Points and add:

/storage/emulated/0

/storage/MicroSD

this will use FUSE to mount them in your chroot, but the android user doesn't have write access. You will need to use sudo ( super user elevation ) to cp, rm, mv ( pretty much anything but ls ) files on those mounts.

now, try :

$sudo chmod a+s /usr/bin/qemu-system-x86_64

$sudo chmod a+s /usr/bin/qemu-img

If you are using my bash script, did you already create a hard drive file called machine1.img? the one I have for windows 7 was 10 gigs & that's barely enough space. :)

$qemu-img create -f raw /mnt/0/machine1.img 10G

you could also $sudo dd if=/dev/zero of=/mnt/0/machine1.img bs=1024 count=10240000

this will create a raw image, hence the line ",format=raw" on that drive line.

then you would start up the script using: $./start_win7.sh <-- remember the ./ saying the script is in this directory
[ZenFone 2 General] DrGit:
You are running the script from *inside* the chroot, right? It doesn't have to be world-writable, by the way. chmod 755 is the more secure option.
[ZenFone 2 General] shanx_verma:
Other Phone

Can you guys collaborate with some other devs over at the armani forums. I would love <3 to see this for my device Redmi 1s.. :)

Or will this version work for it, too?? :)
[ZenFone 2 General] DrGit:
Since your phone has an ARM CPU, it will be several times slower and it won't be able to take advantage of KVM. In other words, you could compile QEMU as a static binary for your phone, either targeting system emulation to run Windows or user emulation to run Intel/x86 Linux binaries, but it will use QEMU's TCG (tiny code generator), which is only recently getting work on multi-threading support, and last I checked was about 1/5 native speed at best. I'm finishing up a guide (for posterity, not necessarily useful) targeting my previous phone, Sony Z Ultra (also Snapdragon), and you may be able to use that. Keep an eye on the development forums for that phone.
[ZenFone 2 General] shanx_verma:
Thanks buddy! :)

Greatly Appreciated, Dr.! :)

Great Work!! :)

Thanks for all this information.

And yup, dont forget to notify me as soon as you tame the draggon' for this harness!! :P :)
[ZenFone 2 General] aziz07:
Perfect, I already had high expectations toward Intel CPUs as they have more instruction sets and raw power. How is GPU acceleration with KVM and how much would you rate it /10 versus native windows on tablets?

My real question is since its x86-64 Architecture, is there a way to natively run Linux given that the bootloader has already been unlocked and that Android is based on Linux so it makes sense. Does MultiRom manager work natively on Zenfone 2? It seems the Zenfone 2 is not yet supported.

I played with MutiROM manager and Ubuntu on a Nexus 7 v1 tablet back in the time but didn't manage booting into Linux due to errors and the fact that its not worth it with 1Gb RAM.

Thanks for your inputs!
[ZenFone 2 General] HopelesRomantc91:
LATEST EDIT: Hey, [MENTION=684728]ycavan[/MENTION], is it possible for you to just upload the data file from your Linux Deploy or something? It would be significantly easier to just use yours, and then I can just use my Windows ISO. Also, should I use 32-bit or 64-bit Windows?

EDIT: it seems that my main issue right now is with pulseaudio. I keep getting this message

(qemu) W: [pulseaudio] core-util.c: Failed to open configuration file '/home/android/.config/pulse//daemon.conf': Permission denied
W: [pulseaudio] daemon-conf.c: Failed to open configuration file: Permission denied
pulseaudio: pa_context_connect() failed
pulseaudio: Reason: Connection refused
pulseaudio: Failed to initialize PA contextaudio: Could not init `pa' audio driver
W: [pulseaudio] core-util.c: Failed to open configuration file '/home/android/.config/pulse//daemon.conf': Permission denied
W: [pulseaudio] daemon-conf.c: Failed to open configuration file: Permission denied
sdl: SDL_OpenAudio failed
sdl: Reason: Couldn't set hardware audio parameters: Success
sdl: SDL_OpenAudio failed
sdl: Reason: Couldn't set hardware audio parameters: Success
audio: Failed to create voice `dac'
audio: Failed to create voice `adc'

EDIT: Also getting this error I don't understand at all:

(process:17371): Gtk-WARNING **: This process is currently running setuid or setgid.
This is not a supported use of GTK+. You must create a helper
program instead. For further details, see:

http://www.gtk.org/setuid.html

Refusing to initialize GTK+.

And these two:

rm: cannot remove '/tmp/qemu-smb.17371-0': Operation not permitted
qemu-system-x86_64: 'rm -rf /tmp/qemu-smb.17371-0' failed. Error code: 1
./win7.sh: line 8: -spice: command not found

I installed SPICE via "sudo yum install spice-xpi" so I don't know why it's saying "spice" isn't found.

Yes, I'm running the script inside the chroot. I changed my custom mounts and the entries in the .sh file. Here is my current .sh file:

#!/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/0/Shared
-spice port=5900,addr=127.0.0.1,disable-ticketing $@
[ZenFone 2 General] ycavan:
the /tmp/qemu lockfile thing is normal, to remove it $sudo rm -rf /tmp/qemu*

the -spice error looks like the previous line -net user,smb=/mnt/0/Shared is missing the \ so linux thinks that's the last part of the qemu-system-x86_64 line :) Fix for that is to put a \ ( no spaces after the \ ) on the -net user,smb=/mnt/0/shared line.

I wouldn't worry too much about the pulse error for now, are you trying to -display sdl after you start up the script?
[ZenFone 2 General] AkiroX:
But it's basically emulating Linux on top of Android, no? Or is it like full Linux, Android disabled (As in, no Android back end eating resources.)

Because that's what I meant, I don't think it'd be a smart idea to try and cram Steam onto this and play a game with Android running on the background.
[ZenFone 2 General] ycavan:
When you run a chroot, you aren't emulating anything. Android is just linux and a chroot allows you to run a distro using the current kernel, but it is full speed. Unfortunately, the Zenfone 2 doesn't make glx or audio easy.

So the answer to your real question is... sorry, I don't know about running games using linux chroot on our phones. If you've seen my video about running a d3d game on Windows 8, it's pretty painful ~ about 1.3 fps. I think [MENTION=2353480]itechnoguy[/MENTION] is looking to cross-compile qemu for Android, so I'm hoping that build will allow us to leverage the ZF2's opengl drivers for better video support.
[ZenFone 2 General] AkiroX:
That's so bad... xD But that's because Windows on top of Linux with 1gb ram dedicated == no.

Basically Linux has steam now.. Sooo, we should be able to game just fine on just Linux... That's kinda what I want...

But I'm gonna need a big SD card. and a good, fast one at that too.. =w=
[ZenFone 2 General] HopelesRomantc91:
Now its saying it can't load KVM kernel module:

[android@localhost ~]$ ./win7.sh -cdrom /mnt/0/Shared/en_win7x86.iso
Could not access KVM kernel module: No such file or directory
failed to initialize KVM: No such file or directory
[ZenFone 2 General] ycavan:
have you restarted your phone? you may need to reload your kvm,ko & kvm-intel.ko modules.

quick way to check:

$lsmod

I also uploaded a script in the main kernel thread that you can save to /data and execute to load up all of the kvm related modules.
[ZenFone 2 General] HopelesRomantc91:
I have no folder "modules" inside "lib." It just doesn't exist. Should I start fresh one more time in Linux Deploy?
[ZenFone 2 General] ycavan:
You would run the script from Terminal Emulator as root
[ZenFone 2 General] itechnoguy:
I am still working on cross-compiling, but at this point, it'll take further work to see if it's possible. I've run into problems with Android and the NDK's implementation of libc (Bionic, which is missing core functions of GNU's libc) as well as basically no support for libraries like GNU gettext, which is used for glib, which is a main requirement for qemu.
[ZenFone 2 General] HopelesRomantc91:
YAY! Last thing, is there a way (well, an easy way) to make the kvm modules auto-load on start up?
[ZenFone 2 General] ycavan:
congrats!

re: auto load modules, that's why I wrote that sh script. Anyone more familiar with Android able to help?
[ZenFone 2 General] oaklandraiderfan21:
So would it be possible to use a otg host cable and use the zen 2 to root other phones
[ZenFone 2 General] HopelesRomantc91:
EDIT: This is pretty sweet, dude. I just can't wait until someone comes up with a practical use for this. It'd also be super cool if someone figured out how to do native Windows on this guy. That'd be so sweet.
[ZenFone 2 General] ycavan:
I don't see why you wouldn't be able to, qemu-kvm supports usb redirection.

[MENTION=1387256]HopelesRomantc91[/MENTION] : did you get your network adapter working?
[ZenFone 2 General] neptvne:
windows native on zenfone 2

hi guys so exciting windows desktop os on smartphone...

do you think the multirom app is a viable option for running windows natively on zenfone 2 since it can boot ubuntu desktop too thru kexec?
[ZenFone 2 General] itechnoguy:
I actually did find a native qemu (with KVM support) in the form of a project called Limbo-Android. It seems like it might work, but since the project ended, compilation is a bit hard with the existing documentation. There is a precompiled copy over at Sourceforge (http://sourceforge.net/projects/limbopcemulator) that has an option for KVM, but is limited to 1 GB of RAM and I'm not sure if the qemu binaries themselves are compiled for x86 Android.
[ZenFone 2 General] ycavan:
I did try it once, but all I got was a black screen. I'll re-dl it.

I've attached a screenshot of the libs, can't figure out when they were compiled.
[ZenFone 2 General] itechnoguy:
It seems that the precompiled one from Sourceforge is compiled for ARM and not x86, as I thought (haven't actually confirmed it yet). I just now tried building it in Android Studio but am getting a weird error when compiling the included freetype library.
[ZenFone 2 General] DrGit:
Kexec will not boot a Windows kernel, so no. Not to mention there wouldn't be any drivers for anything, even if it did boot. MultiROM for booting Linux natively is doable though, and I may have a go at it once CyanogenMod is in a usable state.

Somewhat off topic again, but speaking of drivers:

https://twitter.com/joedavisdev/status/620586610271236096

This means someone with the knowledge could in theory start writing a Mesa/Gallium3D driver for the PowerVR graphics chip in the Zenfone today. Of course, I have no idea what the terms of the non-disclosure agreement are, and NDAs generally make releasing open source drivers impossible :mad:
[ZenFone 2 General] aziz07:
I believe MultiROM manager is not compatible with Zenfone 2 last time I tried. It would be awesome if we can natively run Linux as it will require much less resources, my linux desktop boots at ~150mb RAM versus ~1Gb in Android. Linux would open a whole and direct new way of customizing the phone as Android was built on top of Linux ; its core. Linux has advanced a lot and can pretty much do what windows can, even fully run it with virtual box pretty decently if wine fails for a specific application. From past experience, Linux can run games with OpenGL faster and more efficiently than DirectX and even when both systems are using OpenGL ; e.g. Unreal Tournament 2004 was faster on linux ; I so much miss this game and wouldn't mind playing it on the Zenfone 2 :D
[ZenFone 2 General] neptvne:
but can you take a look of this though i'm not sure

http://reboot.pro/topic/7223-how-to-boot-directly-into-windows-from-kexecgrub4dos/
[ZenFone 2 General] DrGit:
That assumes you're running on BIOS/

EFI-based firmware, which the ZenFone does not have. Even if you could get GRUB running (which would already be difficult due to said firmware limitations), Windows relies heavily on the underlying firmware. Porting Coreboot and chainloading it from the ASUS bootloader and then running SeaBIOS or a UEFI as a payload from there is possible, but it'd be a lot of unnecessary work for no gain, since that still doesn't solve the driver problem.

I've seen some Atom based Chinese Android-only tablets get flashable UEFI firmware for booting Windows, but I don't think ASUS would go through the trouble of developing all that without significant monetary incentive. They may eventually do this, but it'll probably be for a different device.
[ZenFone 2 General] sorg:
Intel doesn't target Z35xx SoC for Windows. You won't find drivers for Windows. Long story short... there won't be full featured Windows for Zenfone 2.
[ZenFone 2 General] JEHAAAD:
:(

we need video for all steps :( i cant complete this >>
[ZenFone 2 General] HopelesRomantc91:
Getting full Linux to dual-boot on this with Android would be cool, because, like someone said, we could use WINE or even VirtualBox then.

EDIT: Yes, I did get the networking drivers working, btw, I just was thinking too hard. I was like, "wait, if this was just a new box I had just built, what would I do?" Thanks for your effort into this, [MENTION=684728]ycavan[/MENTION]. This is pretty awesome.
[ZenFone 2 General] Jhdoubleoseven:
I'm 100% with you! Once we figure out how to get a native Linux distro (hoping Arch) I will begin work on the interface! I'm thinking of building a new DE on top of a WM, bspwm seems really powerful and customizeable although DWM (since it's all compiled via C) may be a better solution. Also, Touchegg supports multi-finger touch gestures so we could get something really awesome working!

I'm just going to be glad to get rid of Android's Java interface.... Java is wayyyy too heavy imo
[ZenFone 2 General] neptvne:
how about this

http://xdaforums.com/showthread.php?t=1138661
[ZenFone 2 General] ycavan:
sounds pretty interesting, actually. I'll have to see if my wife is willing to let me buy another zf2 to try that on... Which I'm doubting, but who knows? ;)
[ZenFone 2 General] HopelesRomantc91:
[MENTION=684728]ycavan[/MENTION] contact [MENTION=438582]Tuanies[/MENTION], he's a verified Asus rep, may be able to help with getting a second ZF2.
[ZenFone 2 General] DrGit:
Check out the threads in my signature. It's usually pretty simple to get native Linux running, it just needs an unlocked bootloader, custom boot.img with an initramfs from whatever distro, and some way to point it to the root filesystem, which can be put on a microSD, or via some coercing, your internal storage. One big problem with that approach, though - what if I still want Android? That's where MultiROM would be great (I'm still a bit too busy to start porting it myself), but most people still need to make phone calls. If I find time - and that's a pretty big "if", sadly - I'll look into getting the LTE radio working outside of Android. I'm sure oFono, which Ubuntu Touch uses, can help here. Again, I wish I had time to do all this stuff... My day job already overlaps with my evening job and I'm pretty swamped with both of them as it is.
[ZenFone 2 General] ycavan:
[MENTION=1387256]HopelesRomantc91[/MENTION] Just an fyi, but I put up a new boot image that should auto load the kvm modules, so you don't need that script anymore. :)
[ZenFone 2 General] koushik sunny:
Installation of Windows8 supports on zf2 z00ad?
[ZenFone 2 General] HopelesRomantc91:
I don't know why but the updated kernel seems to make my device run slower.
[ZenFone 2 General] ycavan:
That's odd. I'll look into it soon, but I'm in the middle of trying to figure something out that could lead to hdmi out and possibly some 3d acceleration. :)

If it works it could mean someone could use their zf2 as a phone and personal computer with very little additional cost.
[ZenFone 2 General] dutch45612:
That would be awesome! Well it's already is, but would be more with a bit of gpu acceleration support... Thanks [MENTION=684728]ycavan[/MENTION] and the rest for all the efforts you put in those development... Windows in your pocket all the time, opens endless doors.