Hatena::Groupandroid-dev

Android Dev Phone1 であそぶメモ

 | 

2008-12-19

なにはなくともBusybox

02:27 | なにはなくともBusybox - Android Dev Phone1 であそぶメモ を含むブックマーク はてなブックマーク - なにはなくともBusybox - Android Dev Phone1 であそぶメモ

toolboxがなんか微妙だったので、おなじみな感じのbusyboxで。

busyboxの導入 - kinneko@転職先募集中の日記を元に。現行stableの最新をやってみる。

$ wget http://busybox.net/downloads/busybox-1.13.1.tar.bz2
$ tar xvjf busybox-1.13.1.tar.bz2 
$ cd busybox-1.13.1/
$ make oldconfig
$ make CROSS_COMPILE=arm-linux-gnueabi- ARCH=arm CFLAGS=--static LDFLAGS=--static

2.3MBのbusyboxができあがった。早速実機で。

普通に動いた。

$ ./busybox 
BusyBox v1.13.1 (2008-12-20 11:23:46 JST) multi-call binary
Copyright (C) 1998-2008 Erik Andersen, Rob Landley, Denys Vlasenko
and others. Licensed under GPLv2.
See source distribution for full notice.

Usage: busybox [function] [arguments]...
   or: function [arguments]...

        BusyBox is a multi-call binary that combines many common Unix
        utilities into a single executable.  Most people will create a
        link to busybox for each function they wish to use and BusyBox
        will act like whatever it was invoked as!

Currently defined functions:
        [, [[, addgroup, adduser, adjtimex, ar, arp, arping, ash,
        awk, basename, blkid, brctl, bunzip2, bzcat, bzip2, cal,
        cat, catv, chat, chattr, chgrp, chmod, chown, chpasswd,
        chpst, chroot, chrt, chvt, cksum, clear, cmp, comm, cp,
        cpio, crond, crontab, cryptpw, cttyhack, cut, date, dc,
        dd, deallocvt, delgroup, deluser, depmod, devmem, df, dhcprelay,
        diff, dirname, dmesg, dnsd, dos2unix, du, dumpkmap, dumpleases,
        echo, ed, egrep, eject, env, envdir, envuidgid, ether-wake,
        expand, expr, fakeidentd, false, fbset, fbsplash, fdflush,
        fdformat, fdisk, fgrep, find, findfs, fold, free, freeramdisk,
        fsck, fsck.minix, ftpget, ftpput, fuser, getopt, getty,
        grep, gunzip, gzip, halt, hd, hdparm, head, hexdump, hostid,
        hostname, httpd, hush, hwclock, id, ifconfig, ifdown, ifenslave,
        ifup, inetd, init, insmod, install, ip, ipaddr, ipcalc,
        ipcrm, ipcs, iplink, iproute, iprule, iptunnel, kbd_mode,
        kill, killall, killall5, klogd, last, length, less, linux32,
        linux64, linuxrc, ln, loadfont, loadkmap, logger, login,
        logname, logread, losetup, lpd, lpq, lpr, ls, lsattr, lsmod,
        lzmacat, makedevs, makemime, man, md5sum, mdev, mesg, microcom,
        mkdir, mkfifo, mkfs.minix, mknod, mkswap, mktemp, modprobe,
        more, mount, mountpoint, msh, mt, mv, nameif, nc, netstat,
        nice, nmeter, nohup, nslookup, od, openvt, passwd, patch,
        pgrep, pidof, ping, ping6, pipe_progress, pivot_root, pkill,
        popmaildir, poweroff, printenv, printf, ps, pscan, pwd,
        raidautorun, rdate, rdev, readahead, readlink, readprofile,
        realpath, reboot, reformime, renice, reset, resize, rm,
        rmdir, rmmod, route, rtcwake, run-parts, runlevel, runsv,
        runsvdir, rx, script, sed, sendmail, seq, setarch, setconsole,
        setfont, setkeycodes, setlogcons, setsid, setuidgid, sh,
        sha1sum, showkey, slattach, sleep, softlimit, sort, split,
        start-stop-daemon, stat, strings, stty, su, sulogin, sum,
        sv, svlogd, swapoff, swapon, switch_root, sync, sysctl,
        syslogd, tac, tail, tar, tcpsvd, tee, telnet, telnetd, test,
        tftp, tftpd, time, top, touch, tr, traceroute, true, tty,
        ttysize, udhcpc, udhcpd, udpsvd, umount, uname, uncompress,
        unexpand, uniq, unix2dos, unlzma, unzip, uptime, usleep,
        uudecode, uuencode, vconfig, vi, vlock, watch, watchdog,
        wc, wget, which, who, whoami, xargs, yes, zcat, zcip
$ ./busybox ps
  PID USER       VSZ STAT COMMAND
    1 0          264 S    /init 
    2 0            0 SW<  [kthreadd]
    3 0            0 SW<  [ksoftirqd/0]
    4 0            0 SW<  [watchdog/0]
    5 0            0 SW<  [events/0]
    6 0            0 SW<  [khelper]
    7 0            0 SW<  [suspend/0]
    8 0            0 SW<  [kblockd/0]
    9 0            0 SW<  [kmmcd]
   10 0            0 SW<  [btaddconn]
   11 0            0 SW<  [btdelconn]
   12 0            0 SW<  [qmi]
   13 0            0 DW<  [rpcrouter]
   14 0            0 SW<  [detection/0]
   15 0            0 SW<  [krpcserversd]
   16 0            0 SW   [pdflush]
   17 0            0 SW   [pdflush]
   18 0            0 SW<  [kswapd0]
   19 0            0 SW<  [aio/0]
   20 0            0 SW<  [kadspd]
   21 0            0 SW<  [panel_on/0]
   22 0            0 SW<  [mtdblockd]
   23 0            0 SW<  [USB mass_storag]
   24 0            0 SW<  [synaptics_wq]
   25 0            0 SW<  [krfcommd]
   26 1000       796 S    /system/bin/servicemanager 
   27 0         1828 S    /system/bin/mountd 
   28 0          652 S    /system/bin/debuggerd 
   29 1001      7720 S    /system/bin/rild 
   30 0        69604 S    zygote /bin/app_process -Xzygote /system/bin --zygote
   31 1013     17332 S    /system/bin/mediaserver 
   33 1002      1164 S    /system/bin/dbus-daemon --system --nofork 
   34 0          788 S    /system/bin/installd 
   36 1008      1304 S    /system/bin/akmd 
   37 2000      3332 S    /sbin/adbd 
   44 0            0 SW<  [mmcqd]
   56 1000      168m S    system_server                                        
   82 0            0 DW<  [ksdiorqd]
   83 0            0 SW<  [tiwlan_wifi_wq]
   86 1010      2964 S    /system/bin/wpa_supplicant -Dtiwlan0 -itiwlan0 -c/dat
   97 1001     96640 S    com.android.phone                                    
  101 10004     110m S    android.process.acore                                
  119 10009    91932 S    com.android.mms                                      
  132 10007     113m S    com.google.process.gapps                             
  134 10003    91872 S    android.process.media                                
  174 0            0 DW<  [audmgr_rpc]
  177 10020    92208 S    com.google.android.talk                              
  190 10018    95076 S    com.android.calendar                                 
  210 10000    91700 S    com.android.alarmclock                               
  222 10006    91212 S    com.google.android.gm                                
  451 0          644 S    /system/bin/logwrapper dhcpcd -d -X tiwlan0 
  452 1014       692 S    dhcpcd -d -X tiwlan0 
  472 2000       724 S    /system/bin/sh - 
  488 2000      2584 R    ./busybox ps 

$ ./busybox df -a
Filesystem           1K-blocks      Used Available Use% Mounted on
tmpfs                    49564         0     49564   0% /dev
devpts                       0         0         0   0% /dev/pts
proc                         0         0         0   0% /proc
sysfs                        0         0         0   0% /sys
tmpfs                     4096         0      4096   0% /sqlite_stmt_journals
/dev/block/mtdblock3     69120     51304     17816  74% /system
/dev/block/mtdblock5     76544     50124     26420  65% /data
/dev/block/mtdblock4     69120      1308     67812   2% /cache
/dev/block/mmcblk0p1    991488      1232    990256   0% /sdcard

おおー。ところで

$ ./busybox free   
              total         used         free       shared      buffers
  Mem:        99128        97220         1908            0          200
 Swap:            0            0            0
Total:        99128        97220         1908

メモリが99MBぐらいしかないのはなんでだぜ。

mytownmytown2009/02/24 19:50まいたうんです。dmesgで出力されるandroidboot.serialnoの値は念のため伏せた方がセキュリティ的に良いのではないでしょうか?少なくとも手持ちのT-Mobile G1のdmesgで出力される値とは違っているようです。
http://typex2.wordpress.com/2009/02/24/android%EF%BC%88htc-dreamtmobile-g1%EF%BC%89%E7%AB%AF%E6%9C%AB%E3%81%A7%E7%84%A1%E9%80%A0%E4%BD%9C%E3%81%ABdmesg%E3%81%AE%E5%87%BA%E5%8A%9B%E7%B5%90%E6%9E%9C%E3%82%92%E3%83%96%E3%83%AD%E3%82%B0/

GracelinGracelin2012/02/14 22:08These pieces really set a staandrd in the industry.

nwjmdyyxnwjmdyyx2012/02/15 18:17LOO0hn <a href="http://cikhznaydprv.com/">cikhznaydprv</a>

irknzhirknzh2012/02/15 22:24doZiL2 , [url=http://vgspxkvzhqch.com/]vgspxkvzhqch[/url], [link=http://vudsrqypylnb.com/]vudsrqypylnb[/link], http://qbjupqeisbro.com/

dtbjfblhydtbjfblhy2012/02/17 21:27hm0unj <a href="http://barqqbldyvcm.com/">barqqbldyvcm</a>

vieziyzyxcvieziyzyxc2013/07/28 12:56wfhcjboespje.efw, <a href="http://www.pjfdafnbwq.com/">ilnvsqbzwb</a> , [url=http://www.kjmdwodput.com/]dqnkntjptp[/url], http://www.ymxavvqtqv.com/ ilnvsqbzwb

dwqrfvxbrodwqrfvxbro2013/07/30 17:48lnmbkboespje.efw, <a href="http://www.ztjtwfuujf.com/">dzsvkkhtzb</a> , [url=http://www.epltlaanzu.com/]nlqluprmuq[/url], http://www.dhhyrmncgc.com/ dzsvkkhtzb

uaacjxlucauaacjxluca2014/03/19 03:01ppxwkboespje.efw, <a href="http://www.vgacrsicrs.com/">abyahrvpgn</a> , [url=http://www.ylfgxjyfuk.com/]dvmhavbqtf[/url], http://www.ivzftqslht.com/ abyahrvpgn

swkowyoltrswkowyoltr2014/06/25 09:07pkielboespje.efw, <a href="http://www.hfxobzkcsr.com/">prueapuafx</a> , [url=http://www.mvlhwbcrpd.com/]yxxrjpvgqq[/url], http://www.gtgxwydqed.com/ prueapuafx

FrancOneryFrancOnery2017/05/12 00:44Cialis Web Canadian Cialis Prices <a href=http://byuvaigranonile.com>viagra</a> Vente Kamagra Europe Propecia Buy Adelaide

 |