01/18/2008

Boot Android up on Zaurus without chroot

I compared android-root/ file structure and Angstrom's /. It looks like not so much conflicted. So, I tried to boot Android up without chroot.

android-root/system and android-root/data have no problem as symbolic links from / to android-root. In /etc, only hosts file could be an issue, so keep Angstrom's hosts file. Other than it just spill them over.
$ ssh root@zaurus
# cd /
# ln -s /home/root/android-root/system system
# ln -s /home/root/android-root/data data
# cd /home/root/android-root/etc
# cp /etc/hosts .
# tar cvf /tmp/etc.tar .
# cd /etc
# tar xvf /tmp/etc.tar
Now I might be able to boot Android up with just two commands.
# chmod 666 /dev/binder
# android-root/init
Gee. I ended up looking at famous red cylon forever. From PC's another shell, I logged in to Zaurus to see the binder's permission.
$ ssh root@zaurus
# ls -l /dev/binder
crw-rw---- 1 root root 252, 0 Jan 18 02:58 /dev/binder
It seems to me that android-root/init re-constructs /dev with udev stuff.

After I rebooted my Zaurus, I brought two ssh consoles connected to my Zaurus, so that I could check the binder's permission while booting Android up.
# chmod 666 /dev/binder
# android-root/init

--- from the second console ---

# ls -l /dev/binder
crw-rw---- 1 root root 252, 0 Jan 18 02:58 /dev/binder
The permission had changed.

After a couple of try-and-errors, I found Android can be booted up by chmod the binder before Android switches to grapfical mode.

I revised start-android.sh.
#!/system/bin/sh
chmod 666 /dev/binder
android-root/init &
sleep 1
chmod 666 /dev/binder
/system/bin/sh
OK. I get Android up without chroot.

By the way, Angstrom mounts 30MB tmpfs on /media/ram. Now I can move /tmp from HDD to RAM.

Reboot again, then symlink /var/tmp to /media/ram.
$ ssh root@zaurus
# cd /var
# rm tmp
# ln -s /media/ram tmp
After I boot Android up, I see less HDD LED brinking than /tmp on HDD.

I expected more performance improvement by moving /tmp out to RAM, but it doesn't change much.

I'll play with this Android Zaurus for a while.

Cheers,
posted by 安藤恐竜 at 19:37 | Comment(1) | TrackBack(0) | 日記
Comments for this entry
というわけで。日本語の解説を忘れちまったので、コメで。

android-root/systemとandroid/dataをルートに持っていって、chrootなしでブートできますた。initしてから1秒寝て再度chmod 666 binderするのがキモ。

ついでに/tmpをRAMに追い出しました。HDDのLED点滅は減ったけど、あまりパフォーマンスは変わらないかも。
Posted by 安藤恐竜 at 01/18/2008 19:48
Leave your comment
Name: [Must]

EMail: [Must]

URL: [Must]

Comment: [Must]

Confirmation Code: [Must]


Type in alphabets what you see in this image.
Trackback URI:  http://blog.seesaa.jp/tb/79313160
Trackback entries must contain URL of this entry.

Trackbacks to this entry
×

この広告は1年以上新しい記事の投稿がないブログに表示されております。