android on linux, virtualbox, step by step.

Joined
May 12, 2022
Messages
51
Reaction score
16
Credits
750
Greetings fellow nerds, a few years back I used to play around with virtualbox, and to be honest the first time I tried android, it was some android-x86 and I used it as live CD, to use instagram, as it was very limited back then in web version. it was 2014 I guess and back then android and android-x86 were under heavy development. I purchased my first smartphone 2 years later.
When I learned V-box, I understood that android-x86 is meant to run V-box.
The .rpm packages on android-x86.org reference WILL mess up your linux installation. STAY AWAY. or test on a fresh installation of OS with no data on it. For those who want to help, I'm posting the procedure to make the perfect android virtual machine.
There will be some uses for this application. Many apps do not let you login using linux version, or in my case, 1 android device less and virtualized the better. So there is some use for this application.
From various versions of the distro, android-9.0r2-x86 did not run well and ended up in an android shell page.
From android 6.0 it's very slow and the mouse pointer becomes laggy. The OS will become very sluggish with Google Play Store malfunctioning and not loading. The best option for me in android-4.4-r5-x86 and 5.0 was also nice. I stick to 4.4.
Do not expect much from this application. Many apps will not run.

The procedure:
V-box is easy to work with lots of options.
set mouse to PS/2
add a virtual CD to your image file
increase RAM , cpu, graphic memory , ...
Launch (start) your VM, it will boot in virtual live CD
Some installation wizard appears. You need to partition your virtual hard disk.
The wizard prompts you if you want to use GPT. Tell him: HELL NO !
So select modify partitions.
Using keyboards, move to New tab to create a new partition and select 'Write' tab. then 'Quit'. do not flag bootable.
Continue the wizard. It asks you if you want to format it. Format it to "ext3" , ext4 is available in later version of the distro. Then continue to the installation.
Install Grub? Yes.
EFI Grub2 ? No.
install /system as read/write? if yes, installation takes longer, it's easier to DEBUG (which may be important in our project)
Wait for the installation to complete. Power off, set boot priority in favor of v-disk. Note that due to the use of resources on installation, you might want to give extra resources to the machine. 2G RAM + 2 core CPU is enough for such a lightweight OS and it will more depend on your drive speed. Please select the v-disk path to a drive with lots of space or it will fill the valuable /home partition.



(to be continued)
(dear forum admins, please move this post to "linux networking" as most of the problems of this project are network-related)
 
Last edited:


Chapter II

Here the problems begin. First if you want to backup, clone the OS and select the proper path for the v-disk.
I also activated shared clibboard but does not work.
Now I want to hold the installation as de-googled as possible, but F-droid does not install. "There was an error parsing the package." There's no way around it. I set the time and the date and it did not work.
So I moved on to the googled and started Google Play Store. First update playstore, gmail and drive, which are the very native tools on your machine, and also accessible from a browser on your host OS, may be your only 'multiplatform tool' that works.
Then I installed some apps necessary for my experiment.
Not time to change some settings.
The OS is rooted and root privilege can be granted to the apps. I disabled / kept disable as much as I could.
I enabled "developer options" then I checked "Screen always stay awake". This is step is mandatory.
Then I enabled ADB. My next goal is communicate with ADB.
SSH would be nice but I'm afraid there's no option for setting up SSH while any "advanced app" for android-4.4 is unavailable.
and I really want to puke when I use android shell. ping ? ifconfig ? WTF ! HELP !
back to ADB. power off, go to the network settings/NAT/port forwarding / host port:4037 guest port:5555 or 5037.

Code:
List of devices attached

127.0.0.1:4037    offline

then on the host device, I ran adb connect 127.0.0.1:5555 , no success.
I run ifconfig on host and run adb connect 10.0.3.1:5555 (10.0.*.* is the return of ifconfig in host, which is host's IP, a nmap test in range of IPs 10.0.3.1-255 didn't give me any results.
returns : connection refused
The bridge mode is activated. but it seems that I can't find it's IP
I found no topics on the subject, so help/exp apreciated.
 
Last edited:

Members online


Top