Root Access¶
Rooting allows Android mobile operating system users to reach privileged control (known as root access) over various Android subsystems.
As Android uses the Linux kernel, rooting an Android device gives similar access to administrative (superuser) permissions as on Linux or any other Unix-like operating systems such as FreeBSD or macOS.
Non-rooted Android Images¶
From Genymotion Desktop 3.7.0 onward, some Android images are not rooted by default and can be rooted dynamically:
Android version | Initial state | Dynamic rooting Paying |
---|---|---|
5.0 | 🔓 Rooted | 🔴 |
5.1 | 🔓 Rooted | 🔴 |
6.0 | 🔓 Rooted | 🔴 |
7.0 | 🔓 Rooted | 🔴 |
8.0 | 🔓 Rooted | 🔴 |
8.1 | 🔓 Rooted | 🔴 |
9.0 | 🔓 Rooted | 🔴 |
10.0 | 🔓 Rooted | 🔴 |
11.0 | 🔓 Rooted | 🔴 |
12.0 | 🔐 Unrooted | 🟢 🔓/🔐 |
12.1 | 🔐 Unrooted | 🟢 🔓/🔐 |
13.0 | 🔐 Unrooted | 🟢 🔓/🔐 |
14.0 | 🔐 Unrooted | 🟢 🔓/🔐 |
Root and Un-root a device¶
3.7.0 Paying
This feature is only available with non-rooted Android Images.
Rooting and unrooting the device is controlled via the device property persist.sys.root_access
which can be changed from the Advanced Developer Tools or when creating or editing a device from the launchpad:
When creating a device, check the "Root Access" option in the new device creation window:
Then proceed to create the device. Root access will then be enabled by default.
Edit a virtual device and go to the GENERAL tab. There, you can toggle Root access by checking the "Root Access" option:
Open the Advanced Developer Tools Widget and toggle "Root Access":
Once the device is rooted, root access is available and can be granted to applications or obtained via the command line interfaces, as explained in the sections below.
Root access for applications¶
If you are using a non-rooted image, Superuser will only be available once the device has been manually rooted.
If you are using a rooted image, Superuser is already installed and, when an application requests root access, it will prompt a pop-up asking whether root access should be authorized or denied.
The default policy can be changed using the Superuser application.
Root access by command line (adb)¶
Connecting as a root user may damage your instance or jeopardize your data. USE AT YOUR OWN RISK!
Root access is only accessible after the device has been manually rooted if you use a non-rooted Android image.
With rooted images, you will already be logged as root when logging with adb shell
.
Run the command adb shell
to login to the instance console as shell user and use the su
command to switch to root user:
adb shell
vbox86p:/ $ su
:/ #
adb root
command to switch directly to root user:
# Switch to root user
adb root
# Access the device shell
adb shell
vbox86p:/ #
Then, use adb unroot
to switch back to standard user.
How to sign your system app¶
Non-rooted Android images are user build type, whereas rooted Android versions are userdebug build types.
Non-rooted Android images are signed with release keys: you can use the keys provided in this public repository to sign your system apps.
The other rooted Android images are signed with the default AOSP test keys.