Coinsdo Documentation
English
English
  • 👋Getting started
  • General
    • 📚CoinsDo Open API
      • 📗General
        • API URL
        • Supported networks
        • Supported Tokens
        • How to make API request
      • 📘CoinSend
        • Get device info
        • Adding a new approval device
        • Dispatch/Withdrawal
      • 📙CoinGet
        • Get deposit address
        • Callback notification
        • Convert BCH address
        • Manual Collection
        • Get address balance
    • 🖥️(Deprecated) Run on Windows Subsystem for Android
    • 🖥️Run on Ubuntu Desktop Environment
    • 🖥️Run on Google Cloud Platform (GCP) using QEMU
  • CoinWallet
    • Introduction
    • Setup
      • Creating a wallet
      • How to setup custom TEE
      • Import wallet
      • Exporting private keys
      • Add wallet addresses
    • How to
      • Recovering assets sent wrongly to another EVM-compatible network
      • Address Book
      • Add new token
      • Sending and receiving crypto currencies
      • Activity
      • How to activate EOS account
      • How to manually set gas fee?
      • What is Advanced Mode and how to turn on?
      • Reset wallet password
      • Add NFT
      • Send NFT
      • Delete Private Key
      • How to convert Ethereum's MATIC to POL?
    • FAQ
      • What is cold wallet?
      • What are gas fee?
      • What is inactive address/account on TRX?
      • What if I send crypto to a wrong address?
      • What is 'The address TRX balance is less than the gas fee required'?
      • How to recover assets wrongly transferred to the same address on different blockchain?
      • Why do I need to approve token?
  • CoinGet
    • About CoinGet
    • Setup
      • Add CoinGet Client
      • Configure Collection Address
      • Currency control
      • Receiving address
    • How to
      • Manual collection
      • Add receiving record
      • Add NFT project
      • Open EOS account
      • Activate Link for EVM-Compatible Networks
    • FAQ
  • CoinSend
    • About CoinSend
    • Setup
      • Add CoinSend Client
      • Setup Sub-Account and CoinSign
      • Authorize Sub-Account to approve transactions
      • Currency control
      • Add dispatch record
      • Approving dispatch record
    • How to
      • Dispatching record
      • Receiving record
      • Robot account
      • Reset password
      • Change sub-account password
      • Open EOS account
    • FAQ
Powered by GitBook
On this page
  • Intro
  • A. Setting up VM instance
  • B. Setting up QEMU and Android operating system
  • C. Optimising the App
  1. General

Run on Google Cloud Platform (GCP) using QEMU

PreviousRun on Ubuntu Desktop EnvironmentNextIntroduction

Last updated 1 month ago

Intro

This guide provides an alternative for running CoinGet/CoinSend on Google Cloud Platform (GCP) using QEMU. It needs a two-level nested virtual machine (VM) environment and install the Android operating system in the L2 VM to run CoinGet/CoinSend. Ultimately, you will still be able to connect directly to the Android operating system via any VNC viewer. Source:

As this approach involves the use of open-source software, certain risks may still exist. Therefore, please use it with caution and always download software from reliable sources.

A. Setting up VM instance

  1. Run the following command in Google Cloud CLI to create an instance with the following minimum specification. You may adjust higher. We are using n1-standard-4 instance in this tutorial with the following specifications.

    • Ubuntu 20.04 or above

    • 2 GHz dual-core processor or above

    • Min 4GB memory or above (8GB recommended)

    • Min 256GB storage space

gcloud compute instances create <your-server-name-here> --enable-nested-virtualization --min-cpu-platform="Intel Haswell" --image-family=ubuntu-2204-lts --image-project=ubuntu-os-cloud --machine-type=n1-standard-4 --boot-disk-size=256
  1. Log into your newly created instance and install QEMU by running the following command.

sudo apt update && sudo apt upgrade -y
sudo apt install -y qemu qemu-kvm
sudo adduser `id -un` kvm
sudo reboot
  1. Download Android x86 iso file.

wget https://sourceforge.net/projects/android-x86/files/Release%209.0/android-x86_64-9.0-r2.iso/download -O android-x86_64-9.0-r2.iso
  1. Create an virtual drive. You may replace androidx86 with a custom name and remember to amend your shell script accordingly in step 5 ( -drive file=<your-custom-name>.img,if=virtio \ ). You may also set the disk space higher as long as it is lower than your instance's disk space (as defined in step 1).

qemu-img create -f qcow2 androidx86.img 80G
qemu-system-x86_64 \
-enable-kvm \
-M q35 \
-m 10240 \
-smp 4 \
-cpu host \
-device usb-tablet \
-device usb-kbd \
-monitor stdio \
-boot menu\=on \
-net nic \
-net user \
-display vnc=:0,password=on \
-drive file=androidx86.img,if=virtio \
-cdrom android-x86_64-9.0-r2.iso

B. Setting up QEMU and Android operating system

For MacOS users, you may use the built-in VNC feature by right click on Finder > Conenct to Server.

From this step onward, please ensure you see the correct screen as per shown and follow the instructions.

  1. Select Installation - Install Android-x86 to hard disk and press Enter.

In case you see the screen below instead of the screen above, please terminate QEMU emulator in your VM instance and restart from step A.5.

  1. Select OK

  2. Select Yes

  3. Press any key to continue

  4. Select New.

  5. Leave blank and press Enter.

  6. Leave blank and press Enter.

  7. Insert Yes and press Enter.

  8. Select OK.

  9. Select ext4 then OK

  10. Select Yes

  11. Select Yes

  12. Select Yes

  13. Select No

  14. Select Run Android-x86 then OK

  15. Android system should be able to boot up and run in QEMU emulator now, and click START

  16. Click See all WiFi networks and select VirtWifi

  17. Follow the steps as per instructed in Android system to complete the setup, until you see the following screen, select Quickstep for better experience, or you may choose Taskbar if you prefer.

  18. The Android operating system is now ready to use. Please note that the UI color might look different, however it will not affect the overall operation.

You may turn on Screen Lock for added security.

C. Optimising the App

We recommend you to lower down the system resolution so it will consume less computing resources and run faster, also for better UIUX experience.

  1. Pull up the app menu and open Terminal Emulator as circled.

  2. Insert the following command. Please note that copy paste is not available in Terminal Emulator.

su

You will see the following prompt after inserting su. Select Remember choice for 10 minutes here.

mkdir /mnt/tmp
mount -t ext4 /dev/block/vda1 /mnt/tmp
vi /mnt/tmp/grub/menu.lst
  1. Press i to enter Insert Mode, and look for the underlined line and add video=360x640 within line as circled below.

  2. Press Esc to quit Insert Mode, then insert :wq and press Enter to save.

  3. Use command reboot to restart Android system.

reboot
  1. You should now see your Android in 360x640 portrait mode, and you may proceed to download CoinGet/CoinSend from Play Store and complete the setup as usual.

  2. Upon installing CoinSend/ CoinGet, please ensure the app's Storage permission is turned on.

You can always find the latest version of the Android x86 ISO image in the official website: . However, please be aware that there may be risks, such as the ISO or download link being compromised. Always verify the authenticity of both the download link and the ISO image, and avoid downloading from unknown or untrusted sources. Alternatively, you may compile your own ISO image for added security.

Execute the following script to provision QEMU virtual machine. Alternatively, you may also run this script by saving it to a shell script file and execute it, or use the command virt-install in virt-manager to do so. Virtual Machine Manager:

You will see the following prompt, insert change vnc password to set a VNC password, which will be used when connecting to Android system via VNC viewer later (Step B.3). We strongly recommend enabling TLS encryption in your QEMU VNC for enhanced security. Please refer to the guide below for instructions on how to enable it. Source:

Connect to QEMU via any VNC Viewer on Desktop or Mobile Phone, such as TigerVNC, TightVNC and etc. We are using RealVNC in our example below and you may download from here RealVNC:

Open RealVNC, on the top bar, insert your VM instance IP in the following format < instance ip>:5900 and connect.

Insert the password you set in step A.6.

🖥️
https://cloud.google.com/compute/docs/instances/nested-virtualization/creating-nested-vms
https://www.android-x86.org/download
https://virt-manager.org/
https://www.realvnc.com/en/connect/download/
https://qemu-project.gitlab.io/qemu/system/vnc-security.html