# \[1.1] Upload frida-server to the emulator or device and run using nohup

#### Upload frida-server

First, let's test to make sure that we have working connectivity over ADB (Android Debug Bridge).

{% hint style="info" %}
This lab is also covered off in the [Environment Setup video walkthrough](https://summit-labs.frida.ninja/setting-up/before-you-start-prerequisites#video-walkthrough-environment-setup).
{% endhint %}

Open a commandline and type `adb devices`

![If you see any other devices listed, disconnect or power them off.](https://488119401-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-Lzm4AJhr7K-rQNi6wbH%2F-M-CYQh7eIH5vnxoBrpn%2F-M-Eq39k1jGjnpCMbA3s%2Fimage.png?alt=media\&token=84a5c30d-f3d6-4f26-9980-ab126c3ac88c)

In order for frida to work, we need it's companion `frida-server`, to be running on the device. You can download it from the frida [releases page on Github](https://github.com/frida/frida/releases) - make sure you get the one ending in "android-x86".

Push it to `/data/local/tmp` with `adb push frida-server-12.8.20-android-x86 /data/local/tmp`

![](https://488119401-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-Lzm4AJhr7K-rQNi6wbH%2F-M4V0jBvuHQkuQwpYbPL%2F-M4V1Nz7HdlxaSTbglgc%2Fimage.png?alt=media\&token=f9a0da87-344d-49a1-ab3b-4708135d7a04)

Obtain root with `adb root`, then connect to your device with `adb shell`. Navigate to the /data/local/tmp directory with `cd /data/local/tmp` .&#x20;

At this point I prefer to rename frida-server to something a little less annoying to type: `mv frida-server-12.8.20-android-x86 frida-server`

Make the server executable with `chmod 777 frida-server`

#### Run frida-server persistently using nohup

Start the server with `nohup ./frida-server &`

{% hint style="warning" %}
The reason we are using nohup is to keep the process running even if we close our ADB terminal. You can absolutely just run ./frida-server but then you must be mindful not to close the window.
{% endhint %}

To recap:

![](https://488119401-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-Lzm4AJhr7K-rQNi6wbH%2F-M4V0jBvuHQkuQwpYbPL%2F-M4V8R2zDKSoEc4lcWhX%2Fimage.png?alt=media\&token=650467fd-f04e-4927-ac3f-228e98303bb0)
