Root Sony S tablet and Setup OptWare

The xda-developers forum contains the script for rooting the Sony S tablet (version 4.0.3 release1a). I use Root_with_Restore_by_Bin4ry_v14_2.7z on my Linux and the script has some issues. Eventually, I was able to root successfully via the manual steps. I have no idea what's the difference.

To setup OptWare on the Android, you can follow the instruction at Coping with Android - Setup Alternatives - including OPTWARE, X11 Hacks.

As I am not installing the full OptWare, I use a simplified setup. Basically, we need /opt

There exists a /cache in my device which uses ext4 file system and is writable by default, and has about 500M of space, and most of the disk space are available for use. I create a symlink /opt to point to /cache .

su
mount -o remount,rw /
ln -s /cache /opt

In the instruction at Coping with Android - Setup Alternatives, there is a step to download the dependencies libc.

CHROOT.run wget https://sourcery.mentor.com/sgpp/lite/arm/portal/package2549/public/+++
  +++arm-none-linux-gnueabi/arm-2008q1-126-arm-none-linux-gnueabi-i686-pc-linux-gnu.tar.bz2

You can download from http://sourcery.mentor.com/public/gnu_toolchain/arm-none-linux-gnueabi/arm-2008q1-126-arm-none-linux-gnueabi-i686-pc-linux-gnu.tar.bz2 instead. It contains the required libc libraries in the lib folder.

As any changes made to the / dir will be gone after the device reboots, it will be easier to put all such changes into a script.
In my case, I have /system/bin/opt_mount

#!/system/bin/sh

mount -o remount,rw /

ln -s /cache/libc /lib
ln -s /cache /opt
ln -s /cache/var /var

chmod 0771 /cache

mount -o remount,ro /

# set hostname
setprop net.hostname skyss

In my device /init.rc , the system defines and runs a flash_recovery service on startup, but the file itself does not exist in my device.

service flash_recovery /system/etc/install-recovery.sh

I can create /system/etc/install-recovery.sh to run my opt_mount script.

#!/system/bin/sh
opt_mount

From now on, all the root dir changes are restored automatically when the device boots up.

To set the LD_LIBRARY_PATH variable,

export LD_LIBRARY_PATH=/opt/lib:/lib:$LD_LIBRARY_PATH

I have compiled Vim editor binary for Kindle 3. It is compiled with Python 2.6 support and all the normal features. This binary is compatible with the Android OptWare environment.

Related: For manually installing OptWare packages, refer to Linux Apps for Kindle.

Android terminal-ide and Bluetooth Keyboard

Comments

blog comments powered by Disqus