# Getting started

Set up a fresh Android environment with stash, zsh and essential development tools.

### References

<ReferenceLinks references={frontmatter.references} />

---

1.  ## Terminal

    

   1. ### Update and upgrade

            Fetch the latest package lists and apply security patches.

            ```sh
            sudo apt update && sudo apt upgrade -y
            ```

   2. ### Install stash

            Download and run the stash installer.

            ```sh
            curl -sSL https://raw.githubusercontent.com/huffmanks/stash/main/install.sh | bash
            ```

   3. ### Run stash

            Run stash to create `.zshrc`, `.zprofile`, `.gitconfig` and `.gitignore` files and help install the necessary packages.

            ```sh
            stash
            ```

   4. ### Update .bashrc (optional)

            If stash is not working as expected, or zsh is not starting as your current shell, add this to `.bashrc`. This ensures the stash path is available and Bash automatically starts zsh as a login shell.

            ```sh
            nano ~/.bashrc
            ```

            ```sh title=".bashrc"
            export PATH="$PATH:/home/droid/.local/bin

            if [ -x "$(command -v zsh)" ]; then
              export SHELL=$(command -v zsh)
              exec $(command -v zsh) -l
            fi
            ```

   5. ### Change default shell (optional)

            If zsh is still not being used as your default shell, set it as the default login shell.

            ```sh
            chsh -s $(which zsh)
            ```

   6. ### Compile .zprofile and .zshrc

            Compile `.zprofile`, `.zshrc` and restart zsh to apply the changes.

            ```sh
            zcompile ~/.zprofile && zcompile ~/.zshrc && exec zsh
            ```

2.  ## Apps (restore backups)

    

        

   1. ### AntennaPod

            - <a href="https://play.google.com/store/apps/details?id=de.danoeh.antennapod">Install AntennaPod </a>
            - Settings > Backup & restore
            - Database import
            - Select file `AntennaPodBackup-*.db`

   2. ### Metrolist

            - <a href="https://github.com/MetrolistGroup/Metrolist/releases">Install Metrolist </a>
            - Profile > Settings > Backup and restore
            - Restore
            - Select file `Metrolist_*.backup`

   3. ### Rethink DNS

            - <a href="https://play.google.com/store/apps/details?id=com.celzero.bravedns">Install Rethink DNS </a>
            - Settings > Backup & Restore
            - Restore
            - Select file `Rethink_*.rbk`

   4. ### Retro Music

            - <a href="https://play.google.com/store/apps/details?id=code.name.monkey.retromusic">Install Retro Music</a>
            - Settings > Backup & Restore
            - Restore
            - Select file `*_Retro Music_*.rmbak`

   5. ### RiPlay

            - <a href="https://github.com/fast4x/RiPlay/releases">Install RiPlay </a>
            - Settings > Backup & Restore
            - Restore
            - Select file `riplay_*.db`
