Uploaded by atmosphrericks

Android on SteamDeck

advertisement
Genymotion on SteamDeck
Install
Before you start
Some quick house cleaning before you get started trying to get Genymotion installed. First, do a
backup. The best practice is to always backup before you mess with the OS and file system in a
way you are not familiar with. I’d recommend using a live USB like Clonezilla, and backing up a
full copy of your main storage device to another drive, so you can restore everything if needed.
Or not. Its your Deck, you do you, :D I’ll let you explore the plethora of videos on how to do that
on YouTube.
Second, remember that the guide and installation testing were done by a person who was
excessively bored and wanted to find another way to say screw Windows. This is a PoC with
some pleasant surprises and I hope you can find some enjoyment in it as well, and if you have
an inside guy with one of the big android emulation tools, tell them to stop being lazy and make
something proper for the Deck.
Third, if you brick it, YOU are the one who bricked it. For those new to Linux/file systems, don’t
be afraid beyond all reason. To avoid being afraid, do some research. The arch Linux man
pages (manual pages) are very helpful in explaining what the commands are and what they do.
Be sure you are comfortable with the instructions before doing so. With that said, if you like to
live dangerously and just run random code and script from the internet, then skip to page 4,
copy and paste it to your terminal and let it rip. :D again, you do you.
Now, to the fun stuff.
Set your user password
If you have never made a password for your user, then you will need to do so by running the
below command
# set the password for the current user
passwd
Follow the prompts, which pretty much is just entering the password you want to use for your
user when you request sudo (superuser do) level access with different commands. This is a
need.
Unlock the OS File system
After that, you will want to unlock your file system. Sounds scarier than it really is, but be sure to
lock it after you are done. Run the following command first to disable the lock on your steamos
file system. If you don’t do this, then Genymotion and other dependencies will fail to install due
to being denied access to write the files to the directories that it needs to, such as opt and usr.
# unlock the file system
sudo steamos-readonly disable
Oh, and that password you set earlier? Yeah, it will ask you for that here, since only a superuser
has permission to do it and your password is proof that you are who you say you are and that
you are willing to commit that command. This is a need.
Fix pacman and the keys
This is the one step that you MAY be able to skip, but I’d recommend doing it anyway to avoid
issues later on. After you unlock your file system you will want to fix up your PGP(GPG, same
thing) keyring by re-initializing and populating it with valid keys. If you get a lot of messages
historically about packages being corrupt or not able to identify the security/PGP key during an
installation of some application, then it is likely your keyring needs to be cleaned up. I
recommend just cleaning it at this point, just in case you have a bunch of
out-of-date/corrupted/missing key associations.
# sync the keyring
sudo pacman -S archlinux-keyring
# initialize pacmans keys with entropy
sudo pacman-key --init
# setup and populate/load the keys
sudo pacman-key --populate archlinux
This could take a little bit of time, but shouldn’t be too bad. Be sure to move your mouse around
or finger across the trackpad during the second command to ensure that enough “randomness”
is being generated for the key’s entropy. If you don’t know what that is, that is fine, but feel free
to look up PGP encryption sometime if you are bored, and it should give you a good rundown on
encryption and entropy in general.
All your developer packages are belong to us*
Now you can start to install some of the needed packages. If you try to skip this step and install
Genymotion, you will likely get errors due to fakeroot not being available on your system yet.
Run the below command to install any missing dev packages that are used for
building/compiling.
# installs all missing developer packages by default, just hit enter
sudo pacman -S --needed base-devel
Fair warning that this could take a little bit of time depending on what you are missing. If you get
any errors at this stage that results in it failing to install the needed packages, then you likely did
not run all of the commands before this one. I’d recommend going back to the three commands
before base-devel failed and ensuring that all three ran without an issue. Once you do that, you
can then re-run the base-devel command, BUT you may need to change it slightly as below.
This version will reinstall ALL of the base-devel packages, which may not be a bad idea in case
any of them were corrupted or affected by the failed command earlier, but shouldn’t be needed if
you fixed the keys earlier.
# installs all developer packages by default. not just missing. hit enter
sudo pacman -S base-devel
Install Genymotion
Once you have base-devel installed, you can install genymotion, which fortunately is pretty
easy! Run the following command and follow any prompts you are given.
# almost there! Installs genymotion and its dependencies
yay -Sy --noconfirm genymotion
Once that is complete you can start up genymotion by either typing genymotion into the
terminal, or by going to the taskbar and searching for it in your main menu and running it from
there.
For the lazy and trusting among you
An all-in-one script that should take care of this stuff for you right here. Nothing complicated in it,
just save it as a script file (test.sh, something.sh, cool_script_with_a_name_you_decide_on.sh,
etc), and then run it. If you already have your password set for your user, then comment out the
first command naturally. Save it somewhere else too if you want to quickly rerun it ever for
whatever reason.
#!/bin/bash
# set the password for the current user
passwd &&
# unlock the filesystem
sudo steamos-readonly disable &&
# sync the keyring
sudo pacman -S --noconfirm archlinux-keyring &&
# initialize pacmans keys with entropy
sudo pacman-key --init &&
# setup and populate/load the keys
sudo pacman-key --populate archlinux &&
# installs all developer packages by default. not just missing. hit enter
sudo pacman -S --noconfirm --needed base-devel &&
# almost there! Installs genymotion and its dependencies
yay -Sy --noconfirm genymotion &&
# lock that filesystem down again
sudo steamos-readonly enabled
Genymotion and Android Configuration
Things you need
At this stage you should now have a functional Genymotion desktop client. Pat yourself on the
pack, pop open a beer (or whiskey, joint, whatever floats your boat), and relax knowing that you
didn’t fubar your Deck. See? Wasn’t so scary.
Now the fun part is seeing what it can do for you. Below are links to a few items that I highly
recommend you leverage, and install in the order they are presented here as well.
ARM Translation Packages: https://github.com/m9rco/Genymotion_ARM_Translation
If you want to do anything, you pretty much need this. Installs the translation packages needed
to execute programs that rely on the ARM architecture, specifically armv7 32-bit instruction
which many (not all unfortunately) android apps require.
Aurora Store: https://files.auroraoss.com/AuroraStore/Stable/AuroraStore_4.1.1.apk
An alternative Play Store with Device and API spoofing features. Connects to Googles API to
download the packages. 95% of apps will work with no issue, though google specific apps tend
to misbehave…who would have guessed?
OpenGapps: Built into Genymotion, just click the magic button that shows up in the instructions
below!
The setup
Watch the video or follow the instructions below.
The Videos
Had to split it because it was too long to upload
😑
Genymotion setup: https://streamable.com/svhf3h
Emulator setup: https://streamable.com/krovj8
The Written Word
First things first, click the big pink button in the top right to begin creating an AVD (Android
Virtual Device, essentially the VM) which you will be using to play all the games. I would
recommend, but you do not have to do it naturally, that you select the Amazon Fire HD 8 as the
device that the initial specs are based on. It has the correct resolution for the SD, an acceptable
DPI, and you can up the core/memory, etc on it as well still. The main reason why I recommend
this device though is because out of the 10 or so I have tested, this device seems to still have a
fairly well-supported amount of applications in the play store by default, and a custom device
would not work with the play store at all without some black magic. Before you ask, sorry but no,
I won’t show you how to make a custom device work. It gets into the weeds if you want to have
all play services supported and I can’t support the masses of people that would likely have
issues. So follow the KISS method, and just start with the Amazon Fire HD 8. Or not. ¯\_(ツ)_/¯
My settings are as follows in the screenshots, feel free to duplicate for now so you have a
baseline, and then make a second AVD later with tweaks if you want to see how different
settings affect your performance. BE SURE TO SELECT ANDROID 9 DURING THE SETUP!
YOU CAN NOT CHANGE THE ANDROID VERSION OF THE DEVICE AFTER IT IS
CREATED! Instead, you will have to start over and waste another minute of your life setting it up
again.
😀
General
System
Display
Android Options
Android Configuration
Immediately after following the steps above it will start the machine for you. The first boot could
take a bit longer than usual, don’t worry about it. If it takes more than 5 minutes, kill it and start it
again. Eventually, you will see this screen.
Translation Package
Once you do you will want to ensure that you downloaded both the translation package and the
Aurora store package from the links on page 5. See below for what the files should look like
when you have downloaded them.
Got them? Good! Now have both your downloads folder up on one side of the screen, and the
android emulator running on the other side. Then drag-and-drop the translation package ONLY
onto the emulator's window. Doing so will begin the process of installing it. Accept the prompts,
and have it restart when completed.
Aurora Store
So is the Aurora Store needed? No, but yes. No, because you can use the play store app that
can be installed via the Open GAPPS installation to download a plethora of games and titles.
HOWEVER! The play store doesn’t like it when you want to play a game or use an app that
wasn’t made for your device, so it won’t show all of the titles that you could play. Also, if you
don’t want to associate your Gmail account with the emulator as much, or flat-out don’t have a
google account, then the Play store probably isn’t for you. So here enters the Aurora Store. It
connects to Google's API and source to download the applications from the play store for you,
and it allows you to spoof your device type/API level as needed to get those games that the play
store won’t let you see. I recommend giving it a go. Some applications, like browsers or
anything that is Google based, should be downloaded from the Play store or direct from the
provider on the internet because they have some extra hidden dependencies (typical) that you
can only really get from them directly or the play store, so there is that. But for all of your gaming
needs, both stores should give you access to everything you are after! To install, drag and drop
the file onto the emulator window and follow the prompts.
GAPPS
If you need to install GAPPS, then click on the button on the right-hand side called Open
GAPPS. This will install the Open GAPPS package which is a collection of Google services that
make the android VM serviceable. See the screenshot if you can’t find it.
After you have done that, it will again ask you to confirm, and then select restart when the
installation finishes so it will restart your VM for the final time. When it finishes restarting, drag
and drop the Aurora store package onto the emulator, and follow its install prompts. Grant it
access to all the things, sign in anonymously, and voila! You now have the emulator ready to go!
Emulator in Action
ARKNIGHTS: https://streamable.com/bgiiwq
Pokemon Unite: https://streamable.com/zbyl1y
Sonic 2: https://streamable.com/xigzel
Fate of the Grand Order: https://streamable.com/fnr7vr
Tales of the Rays: https://streamable.com/2ihiro
Plants V Zombies 2 (Sorry accidentally muted audio): https://streamable.com/y8ypzi
Starwars Galaxy of Heros: https://streamable.com/mzcp7m
Download