-
Notifications
You must be signed in to change notification settings - Fork 332
Onboarding:Linux:LLM
The easiest way to setup your Android environment is to install Android Studio
- Download Android Studio : https://developer.android.com/studio
- Unzip and launch the executable located in bin/studio.sh
- Tip: In the welcome window of Android Studio, in the bottom left corner, you can click on the "Add entry" little button to add a desktop entry to your Linux so you can easily open it again after.
- Open the ledger-mobile repository folder.
We will install all the Android necessary dependencies to build Ledger Live Mobile as well as additional tools.
In the top navigation bar, open the Tools->SDK Manager. In the SDK Platforms tab, be sure that at least one SDK is installed (Android 10 ? 11 ? As you wish). In the SDK Tools tab, be sure sure that these components are installed :
- Android SDK Build-Tools
- NDK
- CMake
- Android Emulator
- Android SDK Platform-Tools
In this part, we will focus on the installation of the Android emulator, necessary for Android development without the use of a dedicated device.
In the top navigation bar, open the Tools->Device Manager
In the "Device Manager" section that just opened, click on the "Create device" button.
I recommend that you take a phone that does not have a large screen or the latest version of Android, to be in line with most Ledger Live users.
You need to modify your $PATH, like you have done with Yarn, so that your setup detects the SDK and the emulator :
- Open your .bashrc with your favorite editor, ex:
nano ~/.bashrc
- Add theses lines to the end of it :
export ANDROID_HOME=$HOME/Android/Sdk
export PATH=$PATH:$ANDROID_HOME/tools
export PATH=$PATH:$ANDROID_HOME/platform-tools
- Reload your environment using this command:
source ~/.bashrc
If you prefer to use your Android phone rather than the emulator, you need to enable USB debugging. To begin with, close any instance of the emulator you may have open.
Please follow this guide to enable it : https://www.embarcadero.com/starthere/xe5/mobdevsetup/android/en/enabling_usb_debugging_on_an_android_device.html
To verify that your phone is connected and recognized, you can launch this command :
adb devices -l
You should see a line at the bottom of "List of devices attached" containing the name of your phone.
If you don't see anything, try to launch again the command or check again the guide above.
If the command adb is not recognized, please verify that you have done every steps in the Android Studio SDK Manager (adb is contained in the Android SDK Platform-Tools module) and the Linking it all together chapters.
Launch these commands inside the ledger-live-mobile repository :
-
yarn
to download the latest node packages -
yarn start
to start Metro, the bundler for React-native (More Info)
Since Metro is a watcher, open a new terminal and yarn android
to build and install the development application to your device. It will launch the emulator if it's not started yet or if there is no physical device connected.
After a few minutes, you should see Ledger Live Mobile start screen. Congrats ! 🎉
- Ledger Live Desktop
- Ledger Live Mobile
-
Ledger Live Common
- Introduction
- Currency Models
- Currency Bridge
- Account
- Account Bridge
- apps
- appsCheckAllAppVersions
- ledger-live bot
- Canonical Ways to Investigate Bugs
- Coin Integration Introduction
- Countervalues
- Packages Duplicates
- Derivation
- Developing with CLI
- Developing
- Gist Firmware Update
- Gist Transaction
- Hardware Wallet Logic
- Socket
- Assorted tips
- Integration Tests
- Process
- Monorepository Migration Guide
- Issues, Workaround and Tricks
- Common CI Troubleshooting
- Create staging builds using the CI
- Deprecated