FORUMS
Remove All Ads from XDA

How to do Virtualization on Android

42 posts
Thanks Meter: 48
 
Post Reply Email Thread
Disclaimer: This is an open discussion thread for How to do virtualization on Android! It's not a reference or guide! But hope this thread can lead us towards making a way to do it!


Intro: Once phones was a tiny piece of electronic device which was mainly used to talk and sending text messages! (I am talking about mobile phones off course! )

Then here comes smartphones like the symbian one and then iphones and Android!

They opened a lot more way to do on a device rather than only talking or texting!

But still we needed to rely on laptops or desktops to do extensive tasks which we couldn't do (yet) on smartphones!
The main reason was the lack of technology or the memory and processing power limitations on these device!
I remember I bought my first Redmi 2 at a cost of 200$ back in April 2015 which featured quadcore Qualcomm processor, 1GB of RAM and 8 GB of internal storage space!

But now the time has changed! Technology advanced exponentially! After 3 years of my first Xiaomi device, I bought another one (Mi A1) with almost the same price! Whuch features double (on the basis of cores) processors and 4X RAM and 8X internal spaces!

In the mean time on the mainstream computing counterpart, virtualization technology becomes so popular that if not all but most of the servers runs based on it! We have also docker now!

We can now use or test any software/OS on any device (mainstream computers off course) by the grace of virtualization!
On the other hand, Android devs still needs to do the hard work to port ROMs let the OS itself! And yet we can't run Windows on a Android device!

But wait! Android is also a Linux! Isn't it?

So, if Linux can run QUEMU/KVM, why not Android?
And most of the Android SOCs now are 64bit!

So, can't we just make it happen? Can't we just find a way to do virtualization and run any OS on a virtual environment right in our hand?

May be!

I don't know if any guys working on this or not!

But here's how to:

1) Enable virtualization support on kernel
2) Make an apps for Android for manging the virtual machines (like VirtualBox, VMWare etc.)

I think the Android kernels (most of them) supports virtualization already!

The hardest part is to make it compatible with the frontend Android! Which brings the apps and interfaces!

I know there's wine exist for Android! But that's just a complete different thing what I am talking about!
And I wasnt able to run wine on my tissot (Xiaomi Mi A1)!

Thanks everyone who is reading!

Give your valuable opinion and ideas!
Hope someone like @CosmicDan can make it!
14th July 2018, 10:26 PM |#2  
CosmicDan's Avatar
Senior Member
Flag Sydney
Thanks Meter: 7,699
 
Donate to Me
More
ARMv8 (every phone) doesn't have hardware virtualisation extensions, so it would be as slow as emulation.

For that, we already have QEMU and KVM. But it's too slow to be of any practical use.

If you want proper virtualisation, you need ARMv8.1, which no phone has.
The Following User Says Thank You to CosmicDan For This Useful Post: [ View ] Gift CosmicDan Ad-Free
14th July 2018, 10:55 PM |#3  
ProttoyX's Avatar
OP Member
Flag Dhaka
Thanks Meter: 48
 
More
Quote:
Originally Posted by CosmicDan

ARMv8 (every phone) doesn't have hardware virtualisation extensions, so it would be as slow as emulation.

For that, we already have QEMU and KVM. But it's too slow to be of any practical use.

If you want proper virtualisation, you need ARMv8.1, which no phone has.

Hmm! I just realised the hardest part: it's ARM and not x86_64!
14th July 2018, 11:12 PM |#4  
CosmicDan's Avatar
Senior Member
Flag Sydney
Thanks Meter: 7,699
 
Donate to Me
More
Quote:
Originally Posted by ProttoyX

Hmm! I just realised the hardest part: it's ARM and not x86_64!

That's emulation, not virtualisation.

You can use QEMU, Bochs or DOSBox to emulate x86 (x86_64 is probably impossible, idk but it's pointless to try). But it's dog slow and always will be.
The Following User Says Thank You to CosmicDan For This Useful Post: [ View ] Gift CosmicDan Ad-Free
15th July 2018, 07:41 AM |#5  
ProttoyX's Avatar
OP Member
Flag Dhaka
Thanks Meter: 48
 
More
Quote:
Originally Posted by CosmicDan

That's emulation, not virtualisation.

You can use QEMU, Bochs or DOSBox to emulate x86 (x86_64 is probably impossible, idk but it's pointless to try). But it's dog slow and always will be.

Hmm! Got it! This thing came into my mind when I was reading about servers based on ARM! Wondered if they provides virtualization/container service or not! And ARM provides more cores than x86_64! I guess it's it's related to RISC/CISC thing! Not sure though!
ARM servers uses ARMv8.1?

AND PLEASE DON'T MIND ABOUT ENDING EVERY SENTENCE WITH (!)! PLEASE!
No one can always be rude! 😶
I am surely not!

Again thanks for what you’ve done for the tissot and other staffs! You are genius! 👍
15th July 2018, 10:24 PM |#6  
CosmicDan's Avatar
Senior Member
Flag Sydney
Thanks Meter: 7,699
 
Donate to Me
More
Quote:
Originally Posted by ProttoyX

Hmm! Got it! This thing came into my mind when I was reading about servers based on ARM! Wondered if they provides virtualization/container service or not! And ARM provides more cores than x86_64! I guess it's it's related to RISC/CISC thing! Not sure though!
ARM servers uses ARMv8.1?

AND PLEASE DON'T MIND ABOUT ENDING EVERY SENTENCE WITH (!)! PLEASE!
No one can always be rude! 😶
I am surely not!

Again thanks for what you’ve done for the tissot and other staffs! You are genius! 👍

Yes those ARM servers would be 8.1. It's not so much a RISC vs CISC thing but more an SoC vs CPU thing. Our devices are SoC's - sure they have many GHz and cores but they're still a lot slower that a proper CPU which has countless of extensions designed for accelerating tasks, and have more IPC capability and other such things (in short GHz/core count is comparable across different platforms or architectures, it's more relative than that). Our SoC's simply don't have those extensions that would make this feasible.
The Following User Says Thank You to CosmicDan For This Useful Post: [ View ] Gift CosmicDan Ad-Free
12th August 2019, 04:18 AM |#7  
fxsheep's Avatar
Senior Member
Thanks Meter: 518
 
More
Quote:
Originally Posted by CosmicDan

ARMv8 (every phone) doesn't have hardware virtualisation extensions, so it would be as slow as emulation.

For that, we already have QEMU and KVM. But it's too slow to be of any practical use.

If you want proper virtualisation, you need ARMv8.1, which no phone has.

Every ARMv8,and even ARMv7 has.On v8 it's called EL2 while on v7 it's HYP mode.However the biggest headache is that most SoC vendors do not allow users to enter it even with bootloader unlock.
On Qualcomm there are no way except a low level powerful exploit. On Exynos it is possible,needs a specific SMC to trustzone,and can be done only with an unlocked bootloader with custom kernel.
29th October 2019, 03:37 AM |#8  
Junior Member
Thanks Meter: 0
 
More
Quote:
Originally Posted by fxsheep

Every ARMv8,and even ARMv7 has.On v8 it's called EL2 while on v7 it's HYP mode.However the biggest headache is that most SoC vendors do not allow users to enter it even with bootloader unlock.
On Qualcomm there are no way except a low level powerful exploit. On Exynos it is possible,needs a specific SMC to trustzone,and can be done only with an unlocked bootloader with custom kernel.

do you have any references links on this? maybe a cve for the qualcomm exploit?
Post Reply Subscribe to Thread

Tags
android, virtualization

Guest Quick Reply (no urls or BBcode)
Message:
Previous Thread Next Thread
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes