Skip to content

Instantly share code, notes, and snippets.

@Ruzzz
Last active November 25, 2021 01:01
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Ruzzz/8228b00509ab16512896 to your computer and use it in GitHub Desktop.
Save Ruzzz/8228b00509ab16512896 to your computer and use it in GitHub Desktop.
Root for Android SDK Emulator
:: Contact: ruzzzua@gmail.com
:: Version: 2015.08.17
:: Dependencies: Android Debug Bridge (adb)
@echo off
set path="c:\Program Files\Android\android-sdk\platform-tools\";%path%
set abi=arm
:: adb remount
:: adb shell mount -o rw,remount -t yaffs2 /dev/block/mtdblock03 /system
adb shell mount -o rw,remount -t yaffs2 /dev/block/mtdblock0 /system
:: adb pull /system/build.prop
:: echo Edit 'build.prop' - #ro.config.nocheckin=yes
:: pause
:: adb push build.prop /system/build.prop
:: del build.prop
:: adb shell rm /system/app/SdkSetup.apk
adb push %abi%\su /system/xbin/su
adb push %abi%\busybox /system/xbin/busybox
adb shell chmod 06755 /system/xbin/su
adb shell chmod 06755 /system/xbin/busybox
adb install -r superuser.apk
:: adb push mkfs.yaffs2 /data/misc/
:: adb shell chmod 777 /data/misc/mkfs.yaffs2
:: adb shell ./data/misc/mkfs.yaffs2 /system /sdcard/system.img
:: adb pull /sdcard/system.img system.img
:: set AND_IMAGE_PATH="c:\Program Files\Android\android-sdk\system-images\android-16\default\armeabi-v7a\"
:: copy system.img %AND_IMAGE_PATH%
:: del "cache.img", "userdata-qemu.img", "snapshot.img", "userdata.img" in C:/Users/USER/.android/avd/DEVICE.avd/
@echo OK
pause
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment