[Galaxy Tab  Android Development] daniel.weck:
Mac OS X / Linux run.sh script

Thank you ! :)

The menu flickering is disturbing, but I am learning to use it ;)

Unfortunately I couldn't use the lovely Windows BAT script to install this custom recovery mode, so I created my own basic shell script for Mac OS X, which should also work on Linux.

Assumption: I downloaded the ZIP archive in post #1 of this discussion thread, and I unzipped its contents into a folder named "recoverymod", which I then moved inside my Android SDK directory. The "adb" executable is therefore located in the "./../tools/" folder relative to the location of the run.sh script.

run.sh:

#!/bin/sh

#ALTHOUGH THIS SCRIPT SHOULD RUN FINE AS A WHOLE,
#IT IS RECOMMENDED TO EXECUTE LINES ONE BY ONE
#IN ORDER TO GET FAMILIARIZED WITH THE PROCESS
#AND TO TRACK POTENTIAL ERRORS !

#PLUG DEVICE USB IN DEBUG MODE !

#BASIC SETUP AND CHECKS
./../tools/adb kill-server
./../tools/adb start-server

./../tools/adb get-state #SHOULD SAY "device"

./../tools/adb devices #SHOULD SHOW CURRENT DEVICE ID

./../tools/adb shell getprop ro.build.id #SHOULD BE "FROYO"

./../tools/adb shell id # already root ? "uid=0" ==> GO STRAIGHT TO RECOVERY INSTALL (SKIP ROOTING)

#ROOTING
./../tools/adb push rageagainstthecage-arm5.bin /data/local/tmp/rageagainstthecage-arm5.bin
./../tools/adb push root.sh /data/local/tmp/root.sh

./../tools/adb shell chmod 755 /data/local/tmp/rageagainstthecage-arm5.bin
./../tools/adb shell chmod 755 /data/local/tmp/root.sh

./../tools/adb shell /data/local/tmp/root.sh

./../tools/adb kill-server
./../tools/adb start-server

./../tools/adb shell id # should now be ROOT ! "uid=0"

./../tools/adb shell rm /data/local/tmp/root.sh > nul
./../tools/adb shell rm /data/local/tmp/rageagainstthecage-arm5.bin > nul

#RECOVERY INSTALL
./../tools/adb shell mount -t rfs -o remount,rw /dev/block/stl9 /system

./../tools/adb push rclean /data/local/tmp/rclean
./../tools/adb shell chmod 755 /data/local/tmp/rclean
./../tools/adb shell /data/local/tmp/rclean
./../tools/adb shell rm /data/local/tmp/rclean

./../tools/adb shell rm /system/bin/remount > /dev/null 2>&1
./../tools/adb shell rm /system/xbin/remount > /dev/null 2>&1

./../tools/adb push rsetup /data/local/tmp/rsetup
./../tools/adb shell chmod 755 /data/local/tmp/rsetup
./../tools/adb shell /data/local/tmp/rsetup
./../tools/adb shell rm /data/local/tmp/rsetup

./../tools/adb push su /system/xbin/su
./../tools/adb push Superuser.apk /system/app/Superuser.apk
./../tools/adb push busybox /system/xbin/busybox
./../tools/adb push remount /system/xbin/remount

./../tools/adb shell chmod 755 /system/xbin/busybox
./../tools/adb shell chmod 755 /system/xbin/remount
./../tools/adb shell chown root.shell /system/xbin/su
./../tools/adb shell chmod 4755 /system/xbin/su
./../tools/adb shell ln -s /system/xbin/su /system/bin/su

./../tools/adb shell /system/xbin/busybox --install -s /system/xbin

./../tools/adb push bin /system/bin/

./../tools/adb shell chmod 755 /system/bin/recovery
./../tools/adb shell chmod 755 /system/bin/recoveryfiles
./../tools/adb shell chmod 755 /system/bin/recoveryfiles/*
./../tools/adb shell chmod 755 /system/bin/recoveryres
./../tools/adb shell chmod 755 /system/bin/recoveryres/*

./../tools/adb reboot recovery