Skip to content

Instantly share code, notes, and snippets.

@resolritter
Forked from SalahAdDin/Steps.md
Last active December 5, 2024 14:40
Show Gist options
  • Save resolritter/8b8a8b7ccbd119eb4921d8331294a19f to your computer and use it in GitHub Desktop.
Save resolritter/8b8a8b7ccbd119eb4921d8331294a19f to your computer and use it in GitHub Desktop.

Revisions

  1. resolritter revised this gist Apr 28, 2022. 1 changed file with 3 additions and 1 deletion.
    4 changes: 3 additions & 1 deletion android.md
    Original file line number Diff line number Diff line change
    @@ -16,6 +16,8 @@ Example: Install the SDK for Android 8.1 (v28)

    - `exec yes | sdkmanager --licenses && sdkmanager "platforms;android-28" "build-tools;28.0.3" "platform-tools" "emulator" "system-images;android-28;default;x86"`

    To create a device with a Google Play Store, change "default" to "google_apis_playstore".

    # Setting up the system for emulators

    - `sudoedit /etc/modules-load.d/virtualbox.conf` and paste in
    @@ -30,7 +32,7 @@ vboxpci

    # Creating custom emulators

    `avdmanager --verbose create avd --force --name and28 --package "system-images;android-28;google_apis;x86" --abi "x86" -c 128m`
    `avdmanager --verbose create avd --force --name and28 --package "system-images;android-28;google_apis;x86" --abi "x86" --sdcard 64M`

    After that run the emulator with `emulator @name` (matches the `--name` used in the command above)

  2. resolritter revised this gist Jan 30, 2022. 1 changed file with 3 additions and 5 deletions.
    8 changes: 3 additions & 5 deletions android.md
    Original file line number Diff line number Diff line change
    @@ -12,9 +12,7 @@

    # Installing specific SDK versions

    **Note:** this is probably not needed to do manually, as react-native packages will probably require (and install automatically) some specific SDK version for their minimum supported SDK version anyways.

    The following example demonstrates installing the SDK for Android 8.1 (v28)
    Example: Install the SDK for Android 8.1 (v28)

    - `exec yes | sdkmanager --licenses && sdkmanager "platforms;android-28" "build-tools;28.0.3" "platform-tools" "emulator" "system-images;android-28;default;x86"`

    @@ -32,9 +30,9 @@ vboxpci

    # Creating custom emulators

    If you used "emulator" in sdk-manager's arguments, one should already have been created at /opt/android-sdk/emulator
    `avdmanager --verbose create avd --force --name and28 --package "system-images;android-28;google_apis;x86" --abi "x86" -c 128m`

    Otherwise, create one manually: `avdmanager --verbose create avd --force --name and28 --package "system-images;android-28;google_apis;x86" --abi "x86" -c 128m`
    After that run the emulator with `emulator @name` (matches the `--name` used in the command above)

    # Run the JS server and development server separately

  3. resolritter renamed this gist Jan 30, 2022. 1 changed file with 10 additions and 5 deletions.
    15 changes: 10 additions & 5 deletions Install React-Native Android.md → android.md
    Original file line number Diff line number Diff line change
    @@ -1,11 +1,11 @@
    # Install Android SDK

    - `yay -Sy android-sdk android-sdk-platform-tools android-sdk-build-tools`
    - `yay -Sy android-sdk android-sdk-cmdline-tools-latest android-sdk-platform-tools`
    - The SDK will be installed to `/opt/android-sdk`; given `ANDROID_HOME='/opt/android-sdk'`, the following should be added to $PATH:
    ```
    "$ANDROID_HOME/tools/bin/"
    "$ANDROID_HOME/platform-tools/"
    "$ANDROID_HOME/tools/"
    "$ANDROID_HOME/cmdline-tools/latest/bin"
    "$ANDROID_HOME/emulator"
    ```
    - `sudo chmod -R 777 /opt/android-sdk` works around permission issues due to the package being installed on `/opt`
    @@ -18,7 +18,7 @@ The following example demonstrates installing the SDK for Android 8.1 (v28)

    - `exec yes | sdkmanager --licenses && sdkmanager "platforms;android-28" "build-tools;28.0.3" "platform-tools" "emulator" "system-images;android-28;default;x86"`

    # Set up environment for the emulator
    # Setting up the system for emulators

    - `sudoedit /etc/modules-load.d/virtualbox.conf` and paste in
    ```
    @@ -28,8 +28,13 @@ vboxnetadp
    vboxpci
    ```
    - `sudo modprobe vboxdrv vboxnetadp vboxnetflt`
    - Restart the computer for those modules to be picked up
    - `avdmanager create avd -n test -k "system-images;android-28;google_apis;x86" -b "x86" -c 512M`
    - Restart the computer for those modules to be picked up

    # Creating custom emulators

    If you used "emulator" in sdk-manager's arguments, one should already have been created at /opt/android-sdk/emulator

    Otherwise, create one manually: `avdmanager --verbose create avd --force --name and28 --package "system-images;android-28;google_apis;x86" --abi "x86" -c 128m`

    # Run the JS server and development server separately

  4. resolritter revised this gist Oct 5, 2020. 1 changed file with 7 additions and 0 deletions.
    7 changes: 7 additions & 0 deletions Install React-Native Android.md
    Original file line number Diff line number Diff line change
    @@ -9,6 +9,13 @@
    "$ANDROID_HOME/emulator"
    ```
    - `sudo chmod -R 777 /opt/android-sdk` works around permission issues due to the package being installed on `/opt`

    # Installing specific SDK versions

    **Note:** this is probably not needed to do manually, as react-native packages will probably require (and install automatically) some specific SDK version for their minimum supported SDK version anyways.

    The following example demonstrates installing the SDK for Android 8.1 (v28)

    - `exec yes | sdkmanager --licenses && sdkmanager "platforms;android-28" "build-tools;28.0.3" "platform-tools" "emulator" "system-images;android-28;default;x86"`

    # Set up environment for the emulator
  5. resolritter revised this gist Oct 5, 2020. 1 changed file with 13 additions and 3 deletions.
    16 changes: 13 additions & 3 deletions Install React-Native Android.md
    Original file line number Diff line number Diff line change
    @@ -1,5 +1,18 @@
    # Install Android SDK

    - `yay -Sy android-sdk android-sdk-platform-tools android-sdk-build-tools`
    - The SDK will be installed to `/opt/android-sdk`; given `ANDROID_HOME='/opt/android-sdk'`, the following should be added to $PATH:
    ```
    "$ANDROID_HOME/tools/bin/"
    "$ANDROID_HOME/platform-tools/"
    "$ANDROID_HOME/tools/"
    "$ANDROID_HOME/emulator"
    ```
    - `sudo chmod -R 777 /opt/android-sdk` works around permission issues due to the package being installed on `/opt`
    - `exec yes | sdkmanager --licenses && sdkmanager "platforms;android-28" "build-tools;28.0.3" "platform-tools" "emulator" "system-images;android-28;default;x86"`

    # Set up environment for the emulator

    - `sudoedit /etc/modules-load.d/virtualbox.conf` and paste in
    ```
    vboxdrv
    @@ -9,9 +22,6 @@ vboxpci
    ```
    - `sudo modprobe vboxdrv vboxnetadp vboxnetflt`
    - Restart the computer for those modules to be picked up
    - `sudo chmod -R 777 /opt/android-sdk`
    - `exec yes | sdkmanager --licenses && sdkmanager "platforms;android-28" "build-tools;28.0.3" "platform-tools" "emulator" "system-images;android-28;default;x86"`
    - Put the executables from the SDK in $PATH
    - `avdmanager create avd -n test -k "system-images;android-28;google_apis;x86" -b "x86" -c 512M`

    # Run the JS server and development server separately
  6. resolritter revised this gist Dec 26, 2019. 1 changed file with 31 additions and 11 deletions.
    42 changes: 31 additions & 11 deletions Install React-Native Android.md
    Original file line number Diff line number Diff line change
    @@ -1,11 +1,31 @@
    **First step:** Install Android SDK
    1. `yay -Sy android-sdk android-sdk-platform-tools android-sdk-build-tools`
    3. `sudoedit /etc/modules-load.d/virtualbox.conf` and paste in
    ```
    vboxdrv
    vboxnetflt
    vboxnetadp
    vboxpci
    ```
    4. `sudo modprobe vboxdrv vboxnetadp vboxnetflt`
    5. `sudo chmod -R 777 /opt/android-sdk`
    # Install Android SDK
    - `yay -Sy android-sdk android-sdk-platform-tools android-sdk-build-tools`
    - `sudoedit /etc/modules-load.d/virtualbox.conf` and paste in
    ```
    vboxdrv
    vboxnetflt
    vboxnetadp
    vboxpci
    ```
    - `sudo modprobe vboxdrv vboxnetadp vboxnetflt`
    - Restart the computer for those modules to be picked up
    - `sudo chmod -R 777 /opt/android-sdk`
    - `exec yes | sdkmanager --licenses && sdkmanager "platforms;android-28" "build-tools;28.0.3" "platform-tools" "emulator" "system-images;android-28;default;x86"`
    - Put the executables from the SDK in $PATH
    - `avdmanager create avd -n test -k "system-images;android-28;google_apis;x86" -b "x86" -c 512M`

    # Run the JS server and development server separately

    Related to bug https://stackoverflow.com/questions/57313661/stuck-on-info-starting-js-server

    ## In a separate terminal

    `npx react-native start`

    ## In a separate terminal

    `npm run-script android`

    # Useful links
    - https://mariusreimer.com/2019/06/android-emulator-for-react-native-developers/
    - https://stackoverflow.com/questions/52323403/react-native-run-android-sdk-location-no-found-but-it-exists-in-the-path
  7. resolritter revised this gist Dec 26, 2019. 2 changed files with 11 additions and 28 deletions.
    11 changes: 11 additions & 0 deletions Install React-Native Android.md
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,11 @@
    **First step:** Install Android SDK
    1. `yay -Sy android-sdk android-sdk-platform-tools android-sdk-build-tools`
    3. `sudoedit /etc/modules-load.d/virtualbox.conf` and paste in
    ```
    vboxdrv
    vboxnetflt
    vboxnetadp
    vboxpci
    ```
    4. `sudo modprobe vboxdrv vboxnetadp vboxnetflt`
    5. `sudo chmod -R 777 /opt/android-sdk`
    28 changes: 0 additions & 28 deletions Steps.md
    Original file line number Diff line number Diff line change
    @@ -1,28 +0,0 @@
    **First step:** Install Android SDK
    1. `yaourt -S android-sdk android-sdk-platform-tools android-sdk-build-tools`
    **Note:** Maybe you'll have problems with the lasta package: ` ncurses5-compat-libs`. In order to avoid this problem you have to use this command: `gpg --recv-keys F7E48EDB`. You can find clarification [here](https://aur.archlinux.org/packages/ncurses5-compat-libs/?comments=all).
    2. `yaourt -S genymotion`
    **Note:** You'll need install `virtual-box` and his modules, `yaourt` will make for you but you need choos between ArchLinux host modules or DKMS host modules.
    3. `echo -e "vboxdrv\nvboxnetflt\nvboxnetadp\nvboxpci" > /etc/modules-load.d/virtualbox.conf`
    **Note:** You need do this with super user because need super user permissions and with `sudo`, for us at least, doesn't work.
    4. `sudo modprobe vboxdrv vboxnetadp vboxnetflt`
    Activate for current session.
    5. `sudo chmod -R 777 /opt/android-sdk`
    Give permisions over Android SDK folders.
    6. Restart
    Is needed by `Genymotion` for detect `VirtualBox` modules.
    **NOTE:** You need install Java JDK for user Android SDK.
    7. `/opt/android-sdk/tools/android`
    This command launch `Android SDK`. You can make fixed in your dock application (for example `Plank`), or create a `desktop-launcher`.

    **Second step:** React-Native
    1. `npm install -g react-native-cli`
    _Note:_ You need have installed node and npm for use `React Native`.

    **Optional Step:** Upgrade watchers limit
    1. `echo "fs.inotify.max_user_watches=524288" >> /etc/sysctl.conf`
    **Note:** Use this command in super user session.
    2. `sudo sysctl -p /etc/sysctl.conf`
    Make this active without reboot session.
    3.

  8. @SalahAdDin SalahAdDin revised this gist Aug 1, 2018. 1 changed file with 3 additions and 6 deletions.
    9 changes: 3 additions & 6 deletions Steps.md
    Original file line number Diff line number Diff line change
    @@ -1,6 +1,6 @@
    **First step:** Install Android SDK
    1. `yaourt -S android-sdk android-sdk-platform-tools android-sdk-build-tools`
    **Note:** Maybe you'll have problems with the lasta package: ` ncurses5-compat-libs`. In order to avoid this problem you have to use this command: `gpg --recv-keys F7E48EDB`. You can find clarification (here)[https://aur.archlinux.org/packages/ncurses5-compat-libs/?comments=all].
    **Note:** Maybe you'll have problems with the lasta package: ` ncurses5-compat-libs`. In order to avoid this problem you have to use this command: `gpg --recv-keys F7E48EDB`. You can find clarification [here](https://aur.archlinux.org/packages/ncurses5-compat-libs/?comments=all).
    2. `yaourt -S genymotion`
    **Note:** You'll need install `virtual-box` and his modules, `yaourt` will make for you but you need choos between ArchLinux host modules or DKMS host modules.
    3. `echo -e "vboxdrv\nvboxnetflt\nvboxnetadp\nvboxpci" > /etc/modules-load.d/virtualbox.conf`
    @@ -14,13 +14,10 @@
    **NOTE:** You need install Java JDK for user Android SDK.
    7. `/opt/android-sdk/tools/android`
    This command launch `Android SDK`. You can make fixed in your dock application (for example `Plank`), or create a `desktop-launcher`.
    8.

    8.

    **Second step:** React-Native
    1. npm install -g react-native-cli
    *Note:* You need have installed node and npm for use `React Native`.
    1. `npm install -g react-native-cli`
    _Note:_ You need have installed node and npm for use `React Native`.

    **Optional Step:** Upgrade watchers limit
    1. `echo "fs.inotify.max_user_watches=524288" >> /etc/sysctl.conf`
  9. @SalahAdDin SalahAdDin revised this gist Aug 1, 2018. 1 changed file with 8 additions and 8 deletions.
    16 changes: 8 additions & 8 deletions Steps.md
    Original file line number Diff line number Diff line change
    @@ -1,18 +1,18 @@
    **First step:** Install Android SDK
    1. yaourt -S android-sdk android-sdk-platform-tools android-sdk-build-tools
    1. `yaourt -S android-sdk android-sdk-platform-tools android-sdk-build-tools`
    **Note:** Maybe you'll have problems with the lasta package: ` ncurses5-compat-libs`. In order to avoid this problem you have to use this command: `gpg --recv-keys F7E48EDB`. You can find clarification (here)[https://aur.archlinux.org/packages/ncurses5-compat-libs/?comments=all].
    2. yaourt -S genymotion
    2. `yaourt -S genymotion`
    **Note:** You'll need install `virtual-box` and his modules, `yaourt` will make for you but you need choos between ArchLinux host modules or DKMS host modules.
    3. echo -e "vboxdrv\nvboxnetflt\nvboxnetadp\nvboxpci" > /etc/modules-load.d/virtualbox.conf
    3. `echo -e "vboxdrv\nvboxnetflt\nvboxnetadp\nvboxpci" > /etc/modules-load.d/virtualbox.conf`
    **Note:** You need do this with super user because need super user permissions and with `sudo`, for us at least, doesn't work.
    4. sudo modprobe vboxdrv vboxnetadp vboxnetflt
    4. `sudo modprobe vboxdrv vboxnetadp vboxnetflt`
    Activate for current session.
    5. sudo chmod -R 777 /opt/android-sdk
    5. `sudo chmod -R 777 /opt/android-sdk`
    Give permisions over Android SDK folders.
    6. Restart
    Is needed by `Genymotion` for detect `VirtualBox` modules.
    **NOTE:** You need install Java JDK for user Android SDK.
    7. /opt/android-sdk/tools/android
    7. `/opt/android-sdk/tools/android`
    This command launch `Android SDK`. You can make fixed in your dock application (for example `Plank`), or create a `desktop-launcher`.
    8.

    @@ -23,9 +23,9 @@
    *Note:* You need have installed node and npm for use `React Native`.

    **Optional Step:** Upgrade watchers limit
    1. echo "fs.inotify.max_user_watches=524288" >> /etc/sysctl.conf
    1. `echo "fs.inotify.max_user_watches=524288" >> /etc/sysctl.conf`
    **Note:** Use this command in super user session.
    2. sudo sysctl -p /etc/sysctl.conf
    2. `sudo sysctl -p /etc/sysctl.conf`
    Make this active without reboot session.
    3.

  10. @SalahAdDin SalahAdDin revised this gist Jul 18, 2016. 1 changed file with 10 additions and 2 deletions.
    12 changes: 10 additions & 2 deletions Steps.md
    Original file line number Diff line number Diff line change
    @@ -18,6 +18,14 @@

    8.

    **Second step:**
    **Second step:** React-Native
    1. npm install -g react-native-cli
    *Note:* You need have installed node and npm for use `React Native`.
    *Note:* You need have installed node and npm for use `React Native`.

    **Optional Step:** Upgrade watchers limit
    1. echo "fs.inotify.max_user_watches=524288" >> /etc/sysctl.conf
    **Note:** Use this command in super user session.
    2. sudo sysctl -p /etc/sysctl.conf
    Make this active without reboot session.
    3.

  11. @SalahAdDin SalahAdDin revised this gist Jul 14, 2016. 1 changed file with 5 additions and 0 deletions.
    5 changes: 5 additions & 0 deletions Steps.md
    Original file line number Diff line number Diff line change
    @@ -12,6 +12,11 @@
    6. Restart
    Is needed by `Genymotion` for detect `VirtualBox` modules.
    **NOTE:** You need install Java JDK for user Android SDK.
    7. /opt/android-sdk/tools/android
    This command launch `Android SDK`. You can make fixed in your dock application (for example `Plank`), or create a `desktop-launcher`.
    8.

    8.

    **Second step:**
    1. npm install -g react-native-cli
  12. @SalahAdDin SalahAdDin revised this gist Jul 14, 2016. 1 changed file with 7 additions and 7 deletions.
    14 changes: 7 additions & 7 deletions Steps.md
    Original file line number Diff line number Diff line change
    @@ -1,17 +1,17 @@
    **First step:** Install Android SDK
    1. yaourt -S android-sdk android-sdk-platform-tools android-sdk-build-tools
    1. yaourt -S android-sdk android-sdk-platform-tools android-sdk-build-tools
    **Note:** Maybe you'll have problems with the lasta package: ` ncurses5-compat-libs`. In order to avoid this problem you have to use this command: `gpg --recv-keys F7E48EDB`. You can find clarification (here)[https://aur.archlinux.org/packages/ncurses5-compat-libs/?comments=all].
    2. yaourt -S genymotion
    2. yaourt -S genymotion
    **Note:** You'll need install `virtual-box` and his modules, `yaourt` will make for you but you need choos between ArchLinux host modules or DKMS host modules.
    3. echo -e "vboxdrv\nvboxnetflt\nvboxnetadp\nvboxpci" > /etc/modules-load.d/virtualbox.conf
    3. echo -e "vboxdrv\nvboxnetflt\nvboxnetadp\nvboxpci" > /etc/modules-load.d/virtualbox.conf
    **Note:** You need do this with super user because need super user permissions and with `sudo`, for us at least, doesn't work.
    4. sudo modprobe vboxdrv vboxnetadp vboxnetflt
    4. sudo modprobe vboxdrv vboxnetadp vboxnetflt
    Activate for current session.
    5. sudo chmod -R 777 /opt/android-sdk
    5. sudo chmod -R 777 /opt/android-sdk
    Give permisions over Android SDK folders.
    6. Restart
    6. Restart
    Is needed by `Genymotion` for detect `VirtualBox` modules.
    *NOTE:* You need install Java JDK for user Android SDK.
    **NOTE:** You need install Java JDK for user Android SDK.

    **Second step:**
    1. npm install -g react-native-cli
  13. @SalahAdDin SalahAdDin revised this gist Jul 14, 2016. 1 changed file with 2 additions and 3 deletions.
    5 changes: 2 additions & 3 deletions Steps.md
    Original file line number Diff line number Diff line change
    @@ -11,9 +11,8 @@
    Give permisions over Android SDK folders.
    6. Restart
    Is needed by `Genymotion` for detect `VirtualBox` modules.
    *NOTE:* You need install Java JDK for user Android SDK.
    *NOTE:* You need install Java JDK for user Android SDK.

    **Second step:**
    1. npm install -g react-native-cli
    2.
    *Note:* You need have installed node and npm for use `React Native`.
    *Note:* You need have installed node and npm for use `React Native`.
  14. @SalahAdDin SalahAdDin revised this gist Jul 14, 2016. 1 changed file with 9 additions and 3 deletions.
    12 changes: 9 additions & 3 deletions Steps.md
    Original file line number Diff line number Diff line change
    @@ -1,4 +1,4 @@
    *First step:* Install Android SDK
    **First step:** Install Android SDK
    1. yaourt -S android-sdk android-sdk-platform-tools android-sdk-build-tools
    **Note:** Maybe you'll have problems with the lasta package: ` ncurses5-compat-libs`. In order to avoid this problem you have to use this command: `gpg --recv-keys F7E48EDB`. You can find clarification (here)[https://aur.archlinux.org/packages/ncurses5-compat-libs/?comments=all].
    2. yaourt -S genymotion
    @@ -9,5 +9,11 @@
    Activate for current session.
    5. sudo chmod -R 777 /opt/android-sdk
    Give permisions over Android SDK folders.
    6.
    *NOTE:* You need install Java JDK for user Android SDK.
    6. Restart
    Is needed by `Genymotion` for detect `VirtualBox` modules.
    *NOTE:* You need install Java JDK for user Android SDK.

    **Second step:**
    1. npm install -g react-native-cli
    2.
    *Note:* You need have installed node and npm for use `React Native`.
  15. @SalahAdDin SalahAdDin created this gist Jul 13, 2016.
    13 changes: 13 additions & 0 deletions Steps.md
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,13 @@
    *First step:* Install Android SDK
    1. yaourt -S android-sdk android-sdk-platform-tools android-sdk-build-tools
    **Note:** Maybe you'll have problems with the lasta package: ` ncurses5-compat-libs`. In order to avoid this problem you have to use this command: `gpg --recv-keys F7E48EDB`. You can find clarification (here)[https://aur.archlinux.org/packages/ncurses5-compat-libs/?comments=all].
    2. yaourt -S genymotion
    **Note:** You'll need install `virtual-box` and his modules, `yaourt` will make for you but you need choos between ArchLinux host modules or DKMS host modules.
    3. echo -e "vboxdrv\nvboxnetflt\nvboxnetadp\nvboxpci" > /etc/modules-load.d/virtualbox.conf
    **Note:** You need do this with super user because need super user permissions and with `sudo`, for us at least, doesn't work.
    4. sudo modprobe vboxdrv vboxnetadp vboxnetflt
    Activate for current session.
    5. sudo chmod -R 777 /opt/android-sdk
    Give permisions over Android SDK folders.
    6.
    *NOTE:* You need install Java JDK for user Android SDK.