Android server edition - Servers Administration, Networking, & Virtualization
Users browsing this thread: 2 Guest(s)
|
|||
Here are some updates on the topic, even though no one seemed interrested:
I gave up on OpenBSD. Getting the emulator running on Debian was painful enough, that I didn't want to fight it on OpenBSD. I found a thread stating that someone managed to get the emulator running on OpenBSD, and that has the linux compatibility mode as a hard requirement (to run ELF binaries), and that was removed from base in 6.0 (I'm running 6.7 everywhere). At this point I was about to spin up a linux VM on my OpenBSD, in order to run Android VM on it… So I decided to rent a cheap bare metal server (500Gb HDD, 4Gb Ram, Intel Avoton with VT-x support). You must take the following into account:
I slapped a Debian 10 on that VPS and installed "android-sdk" from the repo. It pulled a JDK 11 as a dependency, which seems to work correctly (despite the warning on the mautrix link). I also needed the following packages for the emulator to start (libs shipped with the emulator didn't work):
The sdk is installed to /usr/lib/android-sdk. I grabbed the CLI tools for android (not in the debian repo) from here: https://developer.android.com/studio/command-line. I unpacked it in my $HOME directory, and used the tool "sdkmanager" to install all the needed stuff to my SDK root: Code: # First bootstrap the cmdline tools properly Now that the SDK is ready, you must create and android VM, and install/configure Whatsapp on it. This MUST be done on a system with graphical interface, as you need to use the touchscreen of the device. The above steps can be used to install the Android SDK on your local machine. Create and launch the VM: Code: avdmanager create avd -n whatsapp -k 'system-images;android-30;google_apis_playstore;x86_64' To connect successfully using "adb", you need to have accepted the fingerprint key on your local computer, and use the same ~/.android/adbkey file on your server. As "adb" is required to push a new key, you need to have it configured BEFORE you need to use it on the server. It is possible that your device doesn't have internet access after boot. That was my case, and it is due to the wlan0 interface being down. You can enable it with: Code: adb shell "svc wifi enable" You need to wait for the device to finish booting before doing that, or it will complain that the "wifi" service doesn't exist. It took so freaking long on the qemu-based VPS I used first that I though it was an issue with the emulator-within-virtualmachine, and switched to a baremetal server. Turns out after a loooong time (few hours?), I tried to enable it on the qemu-based one, and it worked. Just took really long because there was no hardware acceleration. I now have a fully running android VM on my server ! I can use the adb shell to start applications, and do whatever is possible from the adb shell. Happy hacking ! |
|||
Messages In This Thread |
Android server edition - by z3bra - 30-06-2020, 10:55 AM
RE: Android server edition - by z3bra - 06-07-2020, 07:18 AM
RE: Android server edition - by octahedral - 06-07-2020, 07:14 PM
RE: Android server edition - by z3bra - 07-07-2020, 04:29 AM
RE: Android server edition - by jkl - 07-07-2020, 01:31 PM
RE: Android server edition - by wolf - 07-07-2020, 10:14 PM
RE: Android server edition - by z3bra - 08-07-2020, 04:46 AM
RE: Android server edition - by jkl - 08-07-2020, 05:02 AM
RE: Android server edition - by z3bra - 09-07-2020, 05:32 AM
|