# Setting up the Memu Player for ZebraTester Recording

If you have a Windows 10 PC and want to record an Android session with ZebraTester, this article describes how to set up Memu Player so ZebraTester can record an emulated mobile session using Memu.

#### [Requirements for the Memu Player](https://www.memuplay.com/blog/system-requirements.html) <a href="#settingupthememuplayerforzebratesterrecording-requirementsforthememuplayer" id="settingupthememuplayerforzebratesterrecording-requirementsforthememuplayer"></a>

Our Performance Engineer, Christian, recorded a quick, 5-minute, video that these steps below summarize.

#### [From xda-developers: How to Install ADB on Windows, macOS, and Linux](https://www.xda-developers.com/install-adb-windows-macos-linux/) <a href="#settingupthememuplayerforzebratesterrecording-fromxda-developers-howtoinstalladbonwindows-macos-andl" id="settingupthememuplayerforzebratesterrecording-fromxda-developers-howtoinstalladbonwindows-macos-andl"></a>

Referred to below, ADB is also known as the "Android debug bridge". It is used by android developers or android enthusiasts to perform tasks related to the Android ecosystem such as development, installing custom ROM, and Fastboot.

| **Step**                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       | **Screenshot**                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        |                                                                                                                                                                                                     |                                                                                                                            |                                                    |   |
| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------- | - |
| <h4 id="settingupthememuplayerforzebratesterrecording-locateztrootcertificate">Locate ZT Root Certificate</h4><p>Copy the root.cer file, located in the ZebraTester’s RunTime Data folder (macOS) or the ZebraTester main folder (Windows).</p>                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                | <p><strong>macOS</strong></p><p></p><p><strong>Windows 10</strong></p><p></p>                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                         |                                                                                                                                                                                                     |                                                                                                                            |                                                    |   |
| <h4 id="settingupthememuplayerforzebratesterrecording-createanewfolder">Create a New Folder</h4><ul><li>Paste the root.cer file into this folder for further processing</li><li>In this example (macOS) the new folder was called 'rootcertfolder'</li></ul>                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   |                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       |                                                                                                                                                                                                     |                                                                                                                            |                                                    |   |
| <h4 id="settingupthememuplayerforzebratesterrecording-convertroot.certopemformat">Convert root.cer to PEM Format</h4><ul><li>CD (Change Directory) to your new folder</li><li>Rename the file by entering a new name</li></ul><p><code>openssl x509 -in root.cer -out \[rootcertnewname.pem]</code></p><p>Example: <code>openssl x509 -in root.cer -out rootcertzt55z.pem</code></p>                                                                                                                                                                                                                                                                                                                                                                                                                                           | <p></p><p>In your new folder you will see the new PEM formatted file after running the command.</p>                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   |                                                                                                                                                                                                     |                                                                                                                            |                                                    |   |
| <h4 id="settingupthememuplayerforzebratesterrecording-extractoriginalhash">Extract original hash</h4><p>We need to get the hash value from the original root certificate. Execute the following command that extracts this value to a new line.</p><p>If you are using <strong>Linux</strong> or <strong>Mac</strong>, execute the following command:</p><p><code>openssl x509 -inform PEM -subject\_hash\_old -in rootcertnewname.pem                                                                                                                                                                                                                                                                                                                                                                                         | head -1</code></p><p>==> hashvalue</p><p>Example: <code>openssl x509 -inform PEM -subject\_hash\_old -in rootcertzt55z.pem                                                                                                                                                                                                                                                                                                                                                                                                                                                                            | head -1</code></p><p>==><code>9e8079bd</code></p><p>If you are using <strong>Windows</strong>, execute the following command:</p><p><code>openssl x509 -inform PEM -subject\_hash\_old -in cert.pem | more +0</code></p><p>==> hashvalue</p><p>Example: <code>openssl x509 -inform PEM -subject\_hash\_old -in rootcertzt55z.pem | more +0</code></p><p>==> <code>5h543h5a</code></p> |   |
| <h4 id="settingupthememuplayerforzebratesterrecording-temporarilyrenamethepemfile">Temporarily rename the PEM file</h4><p>Send the output of the PEM to the named file \[hash value+extension of Zero '0'] with this concatinating command.</p><p><code>cat rootcertnewname.pem > \[hashvalue.0]</code></p><p>Example: <code>cat rootcertzt55z.pem > 9e8079bd.0</code></p><p>If you are using <strong>Windows</strong>, run the above command in Powershell instead of a normal command prompt.</p>                                                                                                                                                                                                                                                                                                                            |                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       |                                                                                                                                                                                                     |                                                                                                                            |                                                    |   |
| <h4 id="settingupthememuplayerforzebratesterrecording-appendtheoutputofinformationofthepemfiletocontentsofth">Append the output of Information of the PEM file to contents of the just-named file above</h4><p>If you are using <strong>Linux</strong> or <strong>Mac</strong>, execute the following command:</p><p><code>openssl x509 -inform PEM -text -in rootcertnewname.pem -out /dev/null >> hashvalue.0</code></p><p>Example:</p><p><code>openssl x509 -inform PEM -text -in rootcertzt55z.pem -out /dev/null >> 9e8079bd.0</code></p><p>If you are using <strong>Windows</strong>, execute the following command:</p><p><code>openssl x509 -inform PEM -text -in cert.pem -out $null >> hashvalue.0</code></p><p>Example:</p><p><code>openssl x509 -inform PEM -text -in cert.pem -out $null >> 5h543h5a.0</code></p> | <p></p><p>You should see the original hashvalue.0 file increase in size when you add the output of the PEM file.</p>                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  |                                                                                                                                                                                                     |                                                                                                                            |                                                    |   |
| <h2 id="settingupthememuplayerforzebratesterrecording-memuplayersteps-memuisawindowsapplicationonly">Memu Player Steps (Memu is a Windows Application ONLY)</h2>                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               |                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       |                                                                                                                                                                                                     |                                                                                                                            |                                                    |   |
| <h3 id="settingupthememuplayerforzebratesterrecording-dothefollowingstepsinmemuinwindows10">Do the following steps in Memu in Windows 10</h3><h4 id="settingupthememuplayerforzebratesterrecording-enablerootmode">Enable Root Mode</h4><ul><li>Toggle the Root mode to ON</li><li>Finish by restarting the Memu Play to enable the Root Mode</li></ul>                                                                                                                                                                                                                                                                                                                                                                                                                                                                        |                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       |                                                                                                                                                                                                     |                                                                                                                            |                                                    |   |
| <h4 id="settingupthememuplayerforzebratesterrecording-setdevelopermode">Set Developer Mode</h4><p>After restarting, you need to use Android’s Developer Mode to be able to use the Root Certificate that you created earlier.</p><p>From Android (Tablet or Phone) <strong>Settings, scroll to the About Tablet/Phone and click in. Then scroll to the very bottom to Build Number and click that section 7 or 8 times until you see that you are now a developer.</strong></p>                                                                                                                                                                                                                                                                                                                                                |                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       |                                                                                                                                                                                                     |                                                                                                                            |                                                    |   |
| <h4 id="settingupthememuplayerforzebratesterrecording-enableusbdebugging">Enable USB Debugging</h4><p>Under Settings, now that you are a developer, there will be a <strong>{} Developer Options</strong> that will include a <strong>USB debugging</strong> Mode</p><ul><li>Turn On the USB debugging mode and confirm that you want to allow this mode</li><li>This will then allow the next step, with the Android Debug Bridge, to import the root certificate to the Android system.</li></ul>                                                                                                                                                                                                                                                                                                                            |                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       |                                                                                                                                                                                                     |                                                                                                                            |                                                    |   |
| <h4 id="settingupthememuplayerforzebratesterrecording-importthecertificatefiletotheandroidsystem">Import the Certificate File to the Android System</h4><ul><li>Copy the <code>hashvalue.0</code> file (the example file <code>9e8079bd.0</code>) to the <strong>\adb</strong> subdirectory and Change Directory to <strong>\adb</strong>.</li></ul>                                                                                                                                                                                                                                                                                                                                                                                                                                                                           |                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       |                                                                                                                                                                                                     |                                                                                                                            |                                                    |   |
| <h4 id="settingupthememuplayerforzebratesterrecording-connectadbservertothememuplayer">Connect ADB Server to the Memu Player</h4><p>To start the server running at port 21503, enter:</p><p><code>C:\adb>adb connect localhost:21503</code></p><p>Proper response:</p><p><code>connected to localhost:21503</code></p>                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                         |                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       |                                                                                                                                                                                                     |                                                                                                                            |                                                    |   |
| <h4 id="settingupthememuplayerforzebratesterrecording-pushthenewcertificateintotheandroidsystemviaadb">Push the new certificate into the Android System via ADB</h4><p>Enter</p><p><code>adb push hashvalue.0 /system/etc/security/cacerts</code></p><p>Example</p><p><code>adb push 9e8079bd.0 /system/etc/security/cacerts</code></p>                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        | <p></p><p>If you get the message:</p><p><code>failed to copy ‘9e8079bd.0’ to ,/system/etc/security/cacerts/9e8079bd.0’: couldn't create file: Read-only file system</code></p><p>this is because ADB is not running as root so do an ADP REMOUNT:</p><p><code>C:\adb>adb remount</code></p><p>And you should get<br><code>remount succeeded</code></p><p>And then re-enter that command</p><p><code>C:\adb>adb push 9e8079bd.0 /system/etc/security/cacerts</code></p><p>If this is run correctly, you will see how fast the push went:<br>Example: <code>1195 KB/S (5074 bytes in 0.025s)</code></p> |                                                                                                                                                                                                     |                                                                                                                            |                                                    |   |
| <h4 id="settingupthememuplayerforzebratesterrecording-changereadpermissionsofthenewrootcertificatefileforthe">Change Read Permissions of the new Root Certificate File for the Android system</h4><p>Using the shell feature of ADB, change to the cacerts subdirectory to change the Root Certificate file permissions to read.</p><ul><li>Without this step the Android system won’t be able to ‘see’ the new Root Certificate File.</li></ul><p>Change directory /etc/security/cacerts</p><p>Example</p><p><code>G011A:/etc/securitv/cacerts # chmod 644 ./9e8079bd.0</code></p>                                                                                                                                                                                                                                            |                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       |                                                                                                                                                                                                     |                                                                                                                            |                                                    |   |
| <h4 id="settingupthememuplayerforzebratesterrecording-verifytrustedcredentialsintheandroidsysteminthememupla">Verify Trusted Credentials in the Android System In the Memu Player</h4><p>Follow Android <strong>Settings</strong> <strong>→</strong> <strong>Security → Trusted Credentials.</strong> Scroll down to find the Apica Certificate.</p>                                                                                                                                                                                                                                                                                                                                                                                                                                                                           |                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       |                                                                                                                                                                                                     |                                                                                                                            |                                                    |   |
|                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                |                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       |                                                                                                                                                                                                     |                                                                                                                            |                                                    |   |
