Cài đặt

CH Play

Cách dễ nhất để cài ví Dash cho Android là từ Cửa hàng ứng dụng Google Play.

../../_images/google-play-badge.png

Từ file APK

Một số điện thoại Android không có quyền truy cập vào cửa hàng ứng dụng Google Play bởi vì phần mềm của điện thoại, nhà mạng cung câp hoặc quốc gia không cho phép nó. Bạn có thể cài ứng dụng bằng tay trước hết bằng việc bật chức năng cho phép cài đặt ứng dụng từ nguồn bên ngoài (nếu bạn chưa làm việc đó) và sau đó tải và cài từ file APK. Hãy làm theo hướng dẫn sau:

  1. Hãy đảm bảo rằng Android của bạn có phiên bản ít nhất là 4.0.3 bằng việc vào Settings → About phone và kiểm tra số phiên bản.
  2. Cho phép nguồn không xác định bằng việc vào Settings → Security → Unknown sources. Sau đó đọc và chấp nhận cảnh báo.
  3. Sử dụng điện thoại của bạn, tải phiên bản mới nhất của APK từ đường link này.
  4. Nếu bạn không thể dùng điện thoại để truy cập mạng Internet, thì tải file APK bằng cách dùng máy tính và sau đó copy nó vào điện thoại bằng cáp hoặc bluetooth. Bạn cũng có thể cần chương trình duyệt file để tìm và copy file. Chúng tôi gợi ý với bạn phần mềm này ES File Explorer để dùng cho việc đó.

Bạn cũng có thể cài một file APK trực tiếp từ máy tính của bạn bằng cách dùng Android Debug Bridge (ADB). Hãy làm theo những hướng dẫn sau:

  1. Hãy đảm bảo rằng Android của bạn có phiên bản ít nhất là 4.0.3 bằng việc vào Settings → About phone và kiểm tra số phiên bản.

  2. Hãy chắc rằng bạn đã có một bản của ADB trên máy tính của mình. Nó được bao gồm trong Android SDK Platform Tools cho Mac, Windows hoặc Linux.

  3. Cho phép nguồn không xác định bằng việc vào Settings → Security → Unknown sources. Sau đó đọc và chấp nhận cảnh báo.

  4. Bật chế độ USB debugging bằng việc vào Settings → Developer options → USB debugging. Nếu không có tuỳ chọn Developer options, thì vào About phone, cuốn xuống, và bấm vào Build number bảy lần.

  5. Sử dụng máy tính của bạn, tải phiên bản APK mới nhất từ đường link này.

  6. Kết nối điện thoại của bạn vào máy tính, mở cửa sổ dòng lệnh terminal/command và gõ:

    adb install <<path to .apk file>>
    

Từ mã nguồn

The source code for the Dash Android wallet is available on GitHub. The following instructions describe how to compile an APK from source under an up-to- date installation of Ubuntu 18.04 LTS with a single non-root user. Note that NDK version 12b is required, instead of installing the latest version using sdkmanager. Begin by installing dependencies and downloading the latest Android SDK Tools:

sudo apt install openjdk-8-jdk-headless unzip make
mkdir android-sdk-linux
cd android-sdk-linux
wget https://dl.google.com/android/repository/sdk-tools-linux-3859397.zip
wget https://dl.google.com/android/repository/android-ndk-r12b-linux-x86_64.zip
unzip sdk-tools-linux-3859397.zip
unzip android-ndk-r12b-linux-x86_64.zip

Next, update the SDK Tools and download the necessary SDK platform bundles and dependencies, then add and load the appropriate environment variables:

./tools/bin/sdkmanager --update
./tools/bin/sdkmanager "platforms;android-15" "platforms;android-25" "build-tools;25.0.2"
echo 'export ANDROID_HOME=$HOME/android-sdk-linux' >> ~/.bashrc
echo 'export ANDROID_NDK_HOME=$ANDROID_HOME/android-ndk-r12b' >> ~/.bashrc
source ~/.bashrc
cd ~

Now that the build environment is ready, download and build the Dash Android Wallet source:

git clone https://github.com/HashEngineering/dash-wallet.git
cd dash-wallet
./gradlew clean build -x test

The built APK files are now available in the ~/dash-wallet/wallet/build/outputs/apk folder.