Got Android console

yesterday, i got android console, boot it form SDCARD. well, the steps are fully covered in : http://androidzaurus.seesaa.net/article/80102284.html
and android image from : http://androidzaurus.up.seesaa.net/image/android-sdboot-image.tar.gz

# init: HOW ARE YOU GENTLEMEN

init: reading config file
init: device init
init: mtd partition -1,
init: mtd partition 0, "U-Boot"
init: mtd partition 1, "Env"
init: mtd partition 2, "Kernel"
init: mtd partition 3, "Rootfs"
init: mtd partition 4, "Kernel
sh: can't access tty; job control turned off
#
# binder_open(c6561a40 c06e8bc0) (pid 1905) got c5855000
binder_open(c6561a40 c5f4c540) (pid 2717) got c2662000
binder_open(c6561a40 c05558e0) (pid 2754) got c14cb000
binder_open(c6561a40 c05554e0) (pid 2752) got c1535000
binder_open(c6561a40 c6630160) (pid 2764) got c110c000
binder_open(c6561a40 c6615a40) (pid 2310) got c11e1000
#

to see what processes run ?

$ ps -ef
root         1     0  0 02:26 ?        00:00:01 init
root         2     1  0 02:26 ?        00:00:00 [ksoftirqd/0]
root         3     1  0 02:26 ?        00:00:00 [events/0]
root         4     1  0 02:26 ?        00:00:00 [khelper]
root         5     1  0 02:26 ?        00:00:00 [kthread]
root        54     5  0 02:26 ?        00:00:00 [kblockd/0]
root        55     5  0 02:26 ?        00:00:00 [cqueue/0]
root        57     5  0 02:26 ?        00:00:00 [mxc_spi.1]
root        60     5  0 02:26 ?        00:00:00 [ksuspend_usbd]
root        63     5  0 02:26 ?        00:00:00 [khubd]
root        98     5  0 02:26 ?        00:00:00 [pdflush]
root        99     5  0 02:26 ?        00:00:00 [pdflush]
root       100     5  0 02:26 ?        00:00:00 [kswapd0]
root       101     5  0 02:26 ?        00:00:00 [aio/0]
root       727     1  0 02:26 ?        00:00:00 [mtdblockd]
root       752     5  0 02:26 ?        00:00:00 [w1_control]
root       779     5  0 02:26 ?        00:00:00 [kmmcd]
root       784     1  0 02:26 ?        00:00:00 [mmcqd]
root       802     1  0 02:26 ?        00:00:00 [mxc_ts]
root       803     1  0 02:26 ?        00:00:00 [jffs2_gcd_mtd3]
root       831     1  0 02:26 ?        00:00:03 /sbin/udevd --daemon
root      1710     5  0 02:26 ?        00:00:00 [pccardd]
root      1715     1  0 02:26 ?        00:00:00 /sbin/syslogd
root      1719     1  0 02:26 ?        00:00:00 /sbin/klogd
root      1764     1  0 02:26 ?        00:00:00 /usr/sbin/telnetd
root      1772     1  0 02:26 ?        00:00:00 pure-ftpd
(SERVER)
www       1784     1  0 02:26 ?        00:00:00 /usr/sbin/thttpd -d /
var/www -u www -nor -nos -p 80 -c **.cgi -i /var/run/tht
root      1807     1  0 02:26 ?        00:00:00 /usr/sbin/sshd
root      1814     1  0 02:26 ttymxc0  00:00:00 -sh
root      1826  1814  0 02:27 ttymxc0  00:00:00 /bin/sh ./android-.sh
root      1828     5  0 02:27 ?        00:00:00 [loop0]
root      1832  1826  0 02:27 ttymxc0  00:00:00 /system/bin/sh /a.sh
root      1836  1832  0 02:27 ?        00:00:00 /init
root      1837  1832  0 02:27 ttymxc0  00:00:00 /system/bin/sh
root      1874  1836  0 02:27 ?        00:00:00 /system/bin/sh
root      1881  1836  0 02:27 ?        00:00:00 /system/bin/adbd
root      1882  1836  0 02:27 ?        00:00:00 /system/bin/usbd -r
root      1883  1836  0 02:27 ?        00:00:00 /system/bin/debuggerd
root      1884  1836  0 02:27 ?        00:00:00 /system/bin/rild -l /
system/lib/libreference-ril.so -- -d /dev/smd0
root      1904  1836  0 02:27 ?        00:00:00
zygote                  -Xzygote /system/bin --zygote
root      1905  1836  0 02:27 ?        00:00:00 /system/bin/runtime
2000      1907  1836  0 02:27 ?        00:00:00 /system/bin/dbus-
daemon --system --nofork
root      2717  1904  0 02:27 ?        00:00:01
system_server
10004     2752  1904  0 02:27 ?        00:00:00
com.google.android.home
1001      2754  1904  0 02:27 ?        00:00:00
com.google.android.phone
10000     2764  1904  0 02:27 ?        00:00:00
com.google.process.content
root      2908  1807  1 02:37 ?        00:00:00 sshd: root@pts/0
root      2913  2908  0 02:37 pts/0    00:00:00 -sh
root      2927  2913  0 02:37 pts/0    00:00:00 ps -ef

i got it from OSELAS console through ssh.

well, today is time to strace android runtime. see http://benno.id.au/blog/
i got these lines:

08:16:48.920208 execve("/system/bin/runtime", ["runtime"], [/* 8 vars */]) = 0
08:16:48.921608 getpid()                = 2824
08:16:48.921874 syscall_983045(0xb0016b48, 0xb0013760, 0x3e4, 0, 0xbee37e58, 0x1, 0, 0xf0005, 0xb0013760, 0, 0, 0xbee37e54, 0, 0xbee37e08, 0xb0000d89, 0xb00016ec, 0x10, 0xb0016b48, 0, 0, 0xc764, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0) = 0
08:16:48.922188 gettid()                = 2824
08:16:48.922420 sigaction(SIGILL, {0xb0001469, [], SA_RESTART}, {SIG_DFL}, 0) = 0
08:16:48.922765 sigaction(SIGABRT, {0xb0001469, [], SA_RESTART}, {SIG_DFL}, 0) = 0
08:16:48.923050 sigaction(SIGBUS, {0xb0001469, [], SA_RESTART}, {SIG_DFL}, 0) = 0
08:16:48.923328 sigaction(SIGFPE, {0xb0001469, [], SA_RESTART}, {SIG_DFL}, 0) = 0
08:16:48.923601 sigaction(SIGSEGV, {0xb0001469, [], SA_RESTART}, {SIG_DFL}, 0) = 0
08:16:48.923872 sigaction(SIGSTKFLT, {0xb0001469, [], SA_RESTART}, {SIG_DFL}, 0) = 0
08:16:48.924187 open("libandroid_runtime.so", O_RDONLY|O_LARGEFILE) = -1 ENOENT (No such file or directory)
08:16:48.924570 open("/system/lib/libandroid_runtime.so", O_RDONLY|O_LARGEFILE) = 5
08:16:48.924887 lseek(5, -8, SEEK_END)  = 313648
08:16:48.925115 read(5, "000\255PRE ", 8) = 8
08:16:48.925390 mmap2(0xad300000, 315392, PROT_READ|PROT_WRITE|PROT_EXEC, MAP_PRIVATE, 5, 0) = 0xad300000
08:16:48.925667 close(5)                = 0
08:16:48.925943 mmap2(0xad34d000, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, 0, 0) = 0xad34d000
08:16:48.926275 open("libexpat.so", O_RDONLY|O_LARGEFILE) = -1 ENOENT (No such file or directory)
08:16:48.926583 open("/system/lib/libexpat.so", O_RDONLY|O_LARGEFILE) = 5
08:16:48.926871 lseek(5, -8, SEEK_END)  = 122452
08:16:48.927084 read(5, "\200\252PRE ", 8) = 8
08:16:48.927339 mmap2(0xaa800000, 122880, PROT_READ|PROT_WRITE|PROT_EXEC, MAP_PRIVATE, 5, 0) = 0xaa800000
08:16:48.927588 close(5)                = 0
08:16:48.927859 open("libc.so", O_RDONLY|O_LARGEFILE) = -1 ENOENT (No such file or directory)
08:16:48.928146 open("/system/lib/libc.so", O_RDONLY|O_LARGEFILE) = 5
08:16:48.928419 lseek(5, -8, SEEK_END)  = 231908
08:16:48.928637 read(5, "\340\257PRE ", 8) = 8
08:16:48.928889 mmap2(0xafe00000, 233472, PROT_READ|PROT_WRITE|PROT_EXEC, MAP_PRIVATE, 5, 0) = 0xafe00000
08:16:48.929135 close(5)                = 0
08:16:48.929399 mmap2(0xafe39000, 45056, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, 0, 0) = 0xafe39000
08:16:48.929969 mprotect(0xafe00000, 221184, PROT_READ|PROT_EXEC) = 0
08:16:48.930284 open("libstdc++.so", O_RDONLY|O_LARGEFILE) = -1 ENOENT (No such file or directory)
08:16:48.930593 open("/system/lib/libstdc++.so", O_RDONLY|O_LARGEFILE) = 5
08:16:48.930884 lseek(5, -8, SEEK_END)  = 3812
08:16:48.931096 read(5, "\320\257PRE ", 8) = 8
08:16:48.931356 mmap2(0xafd00000, 4096, PROT_READ|PROT_WRITE|PROT_EXEC, MAP_PRIVATE, 5, 0) = 0xafd00000
08:16:48.931611 close(5)                = 0
08:16:48.931956 open("libm.so", O_RDONLY|O_LARGEFILE) = -1 ENOENT (No such file or directory)
08:16:48.932252 open("/system/lib/libm.so", O_RDONLY|O_LARGEFILE) = 5
08:16:48.932532 lseek(5, -8, SEEK_END)  = 131596
08:16:48.932742 read(5, "\300\257PRE ", 8) = 8
08:16:48.933001 mmap2(0xafc00000, 135168, PROT_READ|PROT_WRITE|PROT_EXEC, MAP_PRIVATE, 5, 0) = 0xafc00000
08:16:48.933252 close(5)                = 0
08:16:48.933631 mprotect(0xafc00000, 126976, PROT_READ|PROT_EXEC) = 0
08:16:48.934004 open("libnativehelper.so", O_RDONLY|O_LARGEFILE) = -1 ENOENT (No such file or directory)
08:16:48.934338 open("/system/lib/libnativehelper.so", O_RDONLY|O_LARGEFILE) = 5
08:16:48.934638 lseek(5, -8, SEEK_END)  = 168700
08:16:48.934851 read(5, " \255PRE ", 8) = 8
08:16:48.935107 mmap2(0xad200000, 172032, PROT_READ|PROT_WRITE|PROT_EXEC, MAP_PRIVATE, 5, 0) = 0xad200000
08:16:48.935362 close(5)                = 0
08:16:48.935736 open("libcutils.so", O_RDONLY|O_LARGEFILE) = -1 ENOENT (No such file or directory)
08:16:48.936059 open("/system/lib/libcutils.so", O_RDONLY|O_LARGEFILE) = 5
08:16:48.936351 lseek(5, -8, SEEK_END)  = 54548
08:16:48.936565 read(5, "\260\257PRE ", 8) = 8
08:16:48.936818 mmap2(0xafb00000, 57344, PROT_READ|PROT_WRITE|PROT_EXEC, MAP_PRIVATE, 5, 0) = 0xafb00000
08:16:48.937108 close(5)                = 0
08:16:48.937375 mmap2(0xafb0e000, 61440, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, 0, 0) = 0xafb0e000
08:16:48.938404 mprotect(0xafb00000, 53248, PROT_READ|PROT_EXEC) = 0
08:16:48.938727 open("libssl.so", O_RDONLY|O_LARGEFILE) = -1 ENOENT (No such file or directory)
08:16:48.939039 open("/system/lib/libssl.so", O_RDONLY|O_LARGEFILE) = 5
08:16:48.939331 lseek(5, -8, SEEK_END)  = 153464
08:16:48.939595 read(5, "p\257PRE ", 8) = 8
08:16:48.939880 mmap2(0xaf700000, 155648, PROT_READ|PROT_WRITE|PROT_EXEC, MAP_PRIVATE, 5, 0) = 0xaf700000
08:16:48.940142 close(5)                = 0
08:16:48.940481 open("libcrypto.so", O_RDONLY|O_LARGEFILE) = -1 ENOENT (No such file or directory)
08:16:48.940799 open("/system/lib/libcrypto.so", O_RDONLY|O_LARGEFILE) = 5
08:16:48.941097 lseek(5, -8, SEEK_END)  = 853020
08:16:48.941310 read(5, "P\257PRE ", 8) = 8
08:16:48.941563 mmap2(0xaf500000, 856064, PROT_READ|PROT_WRITE|PROT_EXEC, MAP_PRIVATE, 5, 0) = 0xaf500000
08:16:48.941815 close(5)                = 0

…and more. seems to be a problem in mmap. as told in nemustech.blogspot.com that JFFS2 doesn’t support memory mapping. the next plan is to hack mmap and also JFFS2’s stuff. well.

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s