Giter Club home page Giter Club logo

root_avd's Introduction

Rooting the Android Studio AVDs

A quick guide on how to root Android Studio's Android AVDs (and required files!)

Required files can be found in this repository: https://github.com/0xFireball/root_avd

You need the Android SDK and fresh new AVD. For this guide we will call it RootAVD.

This was written and tested on a Nexus 5X AVD running Android 7.1 Nougat on an Ubuntu Linux host. This method should work with a similar setup (Android Nougat) for the forseeable future, though future Android versions may complicate this process further.

  1. Start emulator $SDK_PATH/emulator/emulator with args -avd RootAVD -writable-system -selinux disabled -qemu -enable-kvm
  2. Wait for boot.
  3. Restart adbd as root and remount system as writable: adb root && adb remount
  4. Install Superuser.apk: adb install SuperSU/common/Superuser.apk
  5. Push su and update permissions: you will have to pick the corresponding architecture $ARCH. adb push SuperSU/$ARCH/su /system/xbin/su, then update permissions: adb shell chmod 0755 /system/xbin/su
  6. Set SELinux Permissive: adb shell setenforce 0
  7. Install SuperSU's su to system: adb shell su --install
  8. Run SuperSU's su as daemon. adb shell su --daemon&
  9. Finally, open the SuperSU app on the device, and it will tell you the su binary needs to be updated. Accept and use normal installation.
  10. Installation will fail. Don't reboot, just move on. It will still work.
  11. Congratulations! You now have a rooted AVD with SuperSU.

TIP: Superuser may not always persist after reboot, to fix:

  1. From a root shell, start su --daemon&
  2. Root should now work.
  3. Optional: Look for the temporary emulator system image; you can back this up and use it as a patched system.

root_avd's People

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.