By Avineshwar


2016-06-20 19:11:51 8 Comments

I have referred to various posts but I don't think they seem to work, at all, whatsoever, when it comes to AVDs with Android 4.4 or 5.1.

I felt a need to post this.

So before posting this question, I have understood a basic need for rooting AVDs or even any device.

  • Mount /system in rw mode.
  • Push su binary; optionally busybox binary.
  • do chmod to them, say, 6755. That should be it.

I followed posts and successfully rooted AVD with Android 2.2, however, I tried to repeat the same thing for Android 4.4 or 5.1 (both with SELinux disabled), but it seems that there is some kind of fallback mechanism.

For Android 4.4 and 5.1, /system will be mounted in rw mode, but, as soon as I try to push binaries, it gets reverted back to ro mode. Furthermore, it won't get back to rw mode as well, at least until I do a reboot. I keep getting a permission denied error.

Since these worked for Android 2.2 (with a modification in filesystem type and mountpoint), I intend to execute following commands (for Android 4.4 and 5.1):

adb root
adb shell /system/bin/mount -o rw,remount -t ext4 /dev/block/vda /system
adb push su /system/xbin/su
adb shell chmod 06755 /system
adb shell chmod 06755 /system/xbin/su

Anyone who has managed to root AVDs running these versions of Android are requested to help me in this.

I have experience with Android Studio & Windows.

1 comments

@Avineshwar 2016-06-21 03:54:33

I have tested and found that irrespective of the version of Android, if the ABI is arm, armeabi or maybe even mips (not sure), the process of rooting is going to work. They didn't worked for me, as of now, if the ABI is x86 or x86_x64 for Android 4 and 4+.

Below, anything after "#" is supposed to be a helpful comment.

Testing working on - Android 1.x, 2.x, 3.x, 4.0, 4.1, 4.2 (add additional space in subsequent boot):

adb shell mount
# Preferred command: adb shell mount -o rw,remount -t yaffs2 /dev/block/mtdblock0 /system
adb shell mount -o rw,remount /system
adb push su /system/xbin/su
# Appropriate su binary from Chainfire's SuperSu.zip package.
adb shell chmod 06755 /system
adb shell chmod 06755 /system/xbin/su
adb install "Super user.apk"
# Update the su binary for sure.
#adb install "Rootchecker app OR Terminal Emulator app to test."

Testing working on - Android 4.3-4.4 (add additional space in subsequent boot), 5.1, 6.0:

adb shell df
# See the available space in /system
adb shell mount -o remount,rw /system
adb push su /system/bin/su
adb shell chmod 0755 /system/bin/su
adb push su /system/xbin/su
adb shell chmod 0755 /system/xbin/su
adb shell su --install
adb shell "su --daemon&"
adb shell setenforce 0
# optional and recommended; adb shell mount -o remount,ro /system
adb install "Super user app"
# Update the su binary.
#adb install "Rootchecker app OR Terminal Emulator app to test."

@Dan Hulme 2018-02-08 12:51:34

You know that x86 and ARM require different binaries, right? There's no way a binary compiled for ARM would work on android-x86.

Related Questions

Sponsored Content

1 Answered Questions

Manually Rooting - What Else Is Needed?

4 Answered Questions

[SOLVED] Cannot start emulated Android device/AVD device in Windows 7

1 Answered Questions

How to full root a stock-root only Android device?

3 Answered Questions

[SOLVED] How to solve: "Failed to push selection: Out of memory"

1 Answered Questions

[SOLVED] Can't use chmod to alter permissions on emulated phone

1 Answered Questions

Edit the root directory android 4.4

  • 2015-05-20 10:57:23
  • Andrea993
  • 137 View
  • 0 Score
  • 1 Answer
  • Tags:   root-access

1 Answered Questions

Rooting Unknown Device

Sponsored Content