It seems that I haven’t updated my article for a few weeks. I’m not lazy, but I’m just brushing the questions in my book recently. I have nothing to write about. A few days ago, the excavation value went up, so check your level immediately:

I:

However, see stationmaster is also Lv3, relieved, ha ha:

Back to the point, this section was asked by a small fire in the group:

Pig this kind of music (jian in (qian) help (yan) people (Kai) certainly will not sit idly by, feel that some children’s shoes may also need, so there is this article ~


1. Material preparation


① Download something

  • 1, the Android developer essential “Android Studio”, if not yourself to website next: developer.android.com/studio?hl=z…
  • 2, SuperSU (www.supersu.com/) : Root permission management tool, two parts: zip package Root device, apK management Root permission.
  • 3, XposedInstaller (Xposed for Lollipop/Marshmallow/Nougat/Oreo) : Xposed installer.

② and ③ Readers can download it from the official website, or pack it with readers and take it by themselves:

Pan.baidu.com/s/1hRrPZhRx…, extraction code: CG08


② Create a new AVD

Open Android Studio and click on the top menu bar: Tools -> AVD Manager -> + Create Virtual Device… For example, HERE I chose Nexus 5X. Click Next to go to the image selection page:

When choosing a mirror, be sure to pay attention to the following points!!

  • 1, Android 8.0(including 8.0) below system image!!
  • 2, Target does not include images of Google APIs, and users with Google APIs cannot Root them.
  • ABI is a mirror of x86!!

For example, I chose the 7.0 mirror:

If you don’t have an image, click Download and press Next to go to the Next step. Here you can change the name of the simple AVD.

Click Finish and wait for the AVD emulator to be generated:

You don’t have to start it, you just drop X’s.

③ Check installation

Android Studio click on the top menu bar: File -> Settings -> System Settings -> Android SDK. Click on the SDK Tools TAB to install the two things circled:

Once installed, click OK and everything is ready.


2. Start to toss

① Start AVD in command-line writable mode

Next, open the command line terminal and CD to the Tools directory of the Android SDK:

Then type the following command to start AVD (change the name of the simulator you defined earlier at Test) :

emulator -avd Test -writable-system
Copy the code

If you forget, type emulator-list-avds to see the list of AVDs. After successful execution, we can see that our AVD is up and running, and the terminal output is as follows:

Just shrink the terminal, don’t turn it off, AVD will turn it off too!!

(2) install the APK

Create a terminal, CD it to the Android SDK platform-tools directory, and run adb to install the two APKs:

Do not open it after installation!!


3 Run su to obtain the root permission

Decompress the downloaded ZIP package and enter the following command:

adb root
adb remount
adb shell 
setenforce 0
Copy the code

The process is shown in the figure:

Then push the su.pie file from x86 to system/bin and system/xbin respectively:

adb push xxx/x86/su.pie /system/bin/su
adb push xxx/x86/su.pie /system/xbin/su
Copy the code

The process is shown in the figure:

Then go to adb shell, change the permissions of these two files, and install su etc:

chmod 0755 /system/bin/su
chmod 0755 /system/xbin/su
su --install
su --daemon&
Copy the code

The process is shown in the figure:

Once installed, you can open SuperSu, which will display the following page:

Click on New User and the following popup will appear. Be careful!!

Click CANCEL, otherwise you will only get Google boot page after reboot!! Will not enter the system, you have to start again, must choose CANCEL!!

SuperSu is now installed and configured:

It is just a Root permission management APP, then open the Xposed Installer, click the arrow pointing to xiao Yun:

Click Install to Install the Xposed Framework zip package

Waiting for the download to complete:

The authorization popover will pop up as shown below:

Click Grant, run the Grant, then install automatically, then restart automatically:

The restart process may be a little longer, 2-3 minutes or so, restart open Xposed Installer can see the successful installation of Xposed page:

The above is the simulator AVDRoot and Xposed installation process, then say a few points for attention!


3. Precautions


(2) Close the AVD correctly

You can click on the X in the upper right corner, or just shut down the terminal where the emulator is running

!!!!!!!!! No, go long press the Power button and select Power Off!!

If you do, open Super Su again:

Congratulations, you need to root again, execute these commands again:

adb root
adb remount
adb shell 
setenforce 0
quit
adb push xxx/x86/su.pie /system/bin/su
adb push xxx/x86/su.pie /system/xbin/su
chmod 0755 /system/bin/su
chmod 0755 /system/xbin/su
su --install
su --daemon&
quit
Copy the code

(2) Start/restart AVD correctly

AVD Manager can not be used to start AVD after ROOT.

emulator -avd Test -writable-system
Copy the code

If you start using AVD Manager, you will also lose root permission and need to restart root. In addition, if you need to restart the device, it is recommended to use the: adb reboot command to restart the device!


A little chatter

This section is the author’s pro test, effective, complete process, you may have a better and simpler way, welcome to leave a message in the comment area. In addition, this set of root solution is only suitable for Android 9.0 or higher, you can try Magisk instead of SuperSu. Xposed Installer is stuck at 8.x and is not compatible with 9.0 or more. Want to mobile phone use Xposed above 9.0 can see: tai chi Xposed, more can go: xposed.appkg.com/2902.html, to look at it.


References:

  • Bypassing Android Cert Pinning Using a Rooted Emulator (AVD)