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. Using your phone, download the latest version of the APK from this link.

  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.

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. Using your PC, download the latest version of the APK from this link.

  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 20.04 LTS with a single non-root user. Begin by installing dependencies and downloading the latest Android SDK Tools:

sudo apt install openjdk-8-jdk-headless unzip make

mkdir android-sdk-linux/cmdline-tools -p
cd android-sdk-linux/cmdline-tools
wget https://dl.google.com/android/repository/commandlinetools-linux-6609375_latest.zip
unzip commandlinetools-linux-6609375_latest.zip

echo 'export ANDROID_SDK_ROOT=$HOME/android-sdk-linux' >> ~/.bashrc
echo 'export PATH=$ANDROID_SDK_ROOT/cmdline-tools/tools/bin:$PATH' >> ~/.bashrc
source ~/.bashrc
cd ~

Next, download the necessary SDK platform bundles and dependencies and agree to the licenses:

sdkmanager "tools" "platform-tools" "platforms;android-15" "platforms;android-28" "build-tools;28.0.3" "ndk;20.0.5594570" "cmake;3.10.2.4988404"
yes | sdkmanager --licenses

Bây giờ khi môi trường biên dịch đã sẵn sàng, thì tải và biên dịch mã nguồn Ví Dash cho Android:

git clone https://github.com/dashpay/dash-wallet.git
cd dash-wallet
git submodule update --init --recursive
./gradlew assembleProdRelease

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