@ECHO OFF

color 79
echo #################################################
echo #     EternityProject's easyROOTICS		#
echo #         for Motorola RAZR          	    	#
echo #                                    	    	#
echo #                                    	    	#
echo #   By pedrotorresfilho and kholk    	    	#
echo #      Exploit binary by miloj       	    	#
echo #                                    	    	#
echo # If you wanna support us donate to: 	    	#
echo #     kholk -- kholk00@alice.it      	    	#
echo #  pedrotorresfilho -- pedrofilho@msn.com       #   
echo #                                    	    	#
echo #      or come on our Website!                 	#
echo #    http://www.eternityproject.eu   	    	#
echo #                                    	    	#
echo #          Happy Rooting!            	    	#
echo #################################################
@pause

@echo ----------------------------------------------
@echo ---   Please, connect your Motorola RAZR   ---
@echo --- and make sure that ADB mode is enabled ---
@echo ---           prior continuing.            ---
@echo ----------------------------------------------
@pause
@echo .
@echo [Step 1] Rooting...

adb wait-for-device
adb push su /data/local/12m/
adb push debugfs /data/local/12m/
adb push cmds /data/local/12m/
adb shell chmod 777 /data/local/12m/debugfs
adb shell chmod 777 /data/local/12m/su
adb shell chmod 777 /data/local/12m/cmds
adb shell "mv /data/local/12m/batch /data/local/12m/batch.bak"
adb shell ln -s /dev/block/mmcblk1p20 /data/local/12m/batch
adb reboot

@echo Rebooting [1/3]...
@echo .
@echo .
@echo .

adb wait-for-device

@cls
@echo [Step 2] Knocking at the door... 
adb shell rm /data/local/12m/batch
adb shell mv /data/local/12m/batch.bak /data/local/12m/batch
adb shell /data/local/12m/debugfs -w /dev/block/mmcblk1p20 -f /data/local/12m/cmds
adb reboot

@cls
@echo Rebooting [2/3]...
@echo .
@echo .
@echo .

adb wait-for-device

@cls
@echo [step 3] Hello, system!
adb shell sync
adb shell rm /data/local/12m/su
adb shell rm /data/local/12m/debugfs
adb reboot

@cls
@echo Rebooting [3/3]...
@echo .
@echo .
@echo .

adb wait-for-device

@cls
@echo [Step 4] Finishing!
adb shell "su --command 'mount -o remount,rw /dev/block/system /system'"
adb shell "su --command 'ln -s /system/bin/su /system/xbin/su'"
adb push busybox /data/local/tmp/
adb shell "su --command 'cp /data/local/tmp/busybox /system/xbin/'"
adb shell "su --command 'chown root.shell /system/xbin/busybox'"
adb shell "su --command 'chmod 04755 /system/xbin/busybox'"
adb shell "su --command '/system/xbin/busybox --install -s /system/xbin'"
adb install Superuser.apk
adb install Adobe_Flash_Player.apk


@cls
echo #################################################
echo #     EternityProject's easyROOTICS		#
echo #         for Motorola RAZR          	    	#
echo #                                    	    	#
echo #                                    	    	#
echo #   By pedrotorresfilho and kholk    	    	#
echo #      Exploit binary by miloj       	    	#
echo #                                    	    	#
echo # If you wanna support us donate to: 	    	#
echo #     kholk -- kholk00@alice.it      	    	#
echo #  pedrotorresfilho -- pedrofilho@msn.com       #   
echo #                                    	    	#
echo #      or come on our Website!                 	#
echo #    http://www.eternityproject.eu   	    	#
echo #                                    	    	#
echo #          Happy Rooting!            	    	#
echo #################################################
@echo Your phone is now rooted.
@echo Enjoy!
@pause
echo on