[Android Pro] Android下toolbox简介
toolbox是Android 自带的提供shell命令的软件。有点类似于busybox,但功能上好像弱很多。
其源码可以从Android source code 中system/core/toolbox目录下找到。
Android source code编译完成后,toolbox被添加入rootfs中类似:/system/bin目录下,用来提供必要的shell命令。但使用下来,觉得toolbox实在是功能非常有限。tools.h中通常只有以下一些命令:
(ls)(mount)(cat)(ps)(kill)(ln)(insmod)(rmmod)(lsmod)(ifconfig)(setconsole)(rm)(mkdir)(rmdir)(reboot)(getevent)(sendevent)(date)(wipe)(sync)(umount)(start)(stop)(notify)(cmp)(dmesg)(route)(hd)(dd)(df)(getprop)(setprop)(watchprops)(log)(sleep)(renice)(printenv)(smd)(chmod)(chown)(newfs_msdos)(netstat)(ioctl)(mv)(schedtop)(top)(iftop)(id)(vmstat)(nandread)(ionice)
且Android自带的shell 也没有tab补齐,按上键找之前的命令的功能。用起来实在不爽。
但我们可以添加busybox于其中。解决以上所有问题。
shell@hammerhead:/ $ ls -al /system/bin | grep toolbox lrwxr-xr-x root shell 2014-06-13 07:38 cat -> toolbox lrwxr-xr-x root shell 2014-06-13 07:38 chcon -> toolbox lrwxr-xr-x root shell 2014-06-13 07:38 chmod -> toolbox lrwxr-xr-x root shell 2014-06-13 07:38 chown -> toolbox lrwxr-xr-x root shell 2014-06-13 07:38 clear -> toolbox lrwxr-xr-x root shell 2014-06-13 07:38 cmp -> toolbox lrwxr-xr-x root shell 2014-06-13 07:38 cp -> toolbox lrwxr-xr-x root shell 2014-06-13 07:38 date -> toolbox lrwxr-xr-x root shell 2014-06-13 07:38 dd -> toolbox lrwxr-xr-x root shell 2014-06-13 07:38 df -> toolbox lrwxr-xr-x root shell 2014-06-13 07:38 dmesg -> toolbox lrwxr-xr-x root shell 2014-06-13 07:38 du -> toolbox lrwxr-xr-x root shell 2014-06-13 07:38 getenforce -> toolbox lrwxr-xr-x root shell 2014-06-13 07:38 getevent -> toolbox lrwxr-xr-x root shell 2014-06-13 07:38 getprop -> toolbox lrwxr-xr-x root shell 2014-06-13 07:38 getsebool -> toolbox lrwxr-xr-x root shell 2014-06-13 07:38 grep -> toolbox lrwxr-xr-x root shell 2014-06-13 07:38 hd -> toolbox lrwxr-xr-x root shell 2014-06-13 07:38 id -> toolbox lrwxr-xr-x root shell 2014-06-13 07:38 ifconfig -> toolbox lrwxr-xr-x root shell 2014-06-13 07:38 iftop -> toolbox lrwxr-xr-x root shell 2014-06-13 07:38 insmod -> toolbox lrwxr-xr-x root shell 2014-06-13 07:38 ioctl -> toolbox lrwxr-xr-x root shell 2014-06-13 07:38 ionice -> toolbox lrwxr-xr-x root shell 2014-06-13 07:38 kill -> toolbox lrwxr-xr-x root shell 2014-06-13 07:38 ln -> toolbox lrwxr-xr-x root shell 2014-06-13 07:38 load_policy -> toolbox lrwxr-xr-x root shell 2014-06-13 07:38 log -> toolbox lrwxr-xr-x root shell 2014-06-13 07:38 ls -> toolbox lrwxr-xr-x root shell 2014-06-13 07:38 lsmod -> toolbox lrwxr-xr-x root shell 2014-06-13 07:38 lsof -> toolbox lrwxr-xr-x root shell 2014-06-13 07:38 md5 -> toolbox lrwxr-xr-x root shell 2014-06-13 07:38 mkdir -> toolbox lrwxr-xr-x root shell 2014-06-13 07:38 mkswap -> toolbox lrwxr-xr-x root shell 2014-06-13 07:38 mount -> toolbox lrwxr-xr-x root shell 2014-06-13 07:38 mv -> toolbox lrwxr-xr-x root shell 2014-06-13 07:38 nandread -> toolbox lrwxr-xr-x root shell 2014-06-13 07:38 netstat -> toolbox lrwxr-xr-x root shell 2014-06-13 07:38 newfs_msdos -> toolbox lrwxr-xr-x root shell 2014-06-13 07:38 notify -> toolbox lrwxr-xr-x root shell 2014-06-13 07:38 printenv -> toolbox lrwxr-xr-x root shell 2014-06-13 07:38 ps -> toolbox lrwxr-xr-x root shell 2014-06-13 07:38 readlink -> toolbox lrwxr-xr-x root shell 2014-06-13 07:38 renice -> toolbox lrwxr-xr-x root shell 2014-06-13 07:38 restorecon -> toolbox lrwxr-xr-x root shell 2014-06-13 07:38 rm -> toolbox lrwxr-xr-x root shell 2014-06-13 07:38 rmdir -> toolbox lrwxr-xr-x root shell 2014-06-13 07:38 rmmod -> toolbox lrwxr-xr-x root shell 2014-06-13 07:38 route -> toolbox lrwxr-xr-x root shell 2014-06-13 07:38 runcon -> toolbox lrwxr-xr-x root shell 2014-06-13 07:38 schedtop -> toolbox lrwxr-xr-x root shell 2014-06-13 07:38 sendevent -> toolbox lrwxr-xr-x root shell 2014-06-13 07:38 setconsole -> toolbox lrwxr-xr-x root shell 2014-06-13 07:38 setenforce -> toolbox lrwxr-xr-x root shell 2014-06-13 07:38 setprop -> toolbox lrwxr-xr-x root shell 2014-06-13 07:38 setsebool -> toolbox lrwxr-xr-x root shell 2014-06-13 07:38 sleep -> toolbox lrwxr-xr-x root shell 2014-06-13 07:38 smd -> toolbox lrwxr-xr-x root shell 2014-06-13 07:38 start -> toolbox lrwxr-xr-x root shell 2014-06-13 07:38 stop -> toolbox lrwxr-xr-x root shell 2014-06-13 07:38 swapoff -> toolbox lrwxr-xr-x root shell 2014-06-13 07:38 swapon -> toolbox lrwxr-xr-x root shell 2014-06-13 07:38 sync -> toolbox -rwxr-xr-x root shell 139040 2014-06-13 07:06 toolbox lrwxr-xr-x root shell 2014-06-13 07:38 top -> toolbox lrwxr-xr-x root shell 2014-06-13 07:38 touch -> toolbox lrwxr-xr-x root shell 2014-06-13 07:38 umount -> toolbox lrwxr-xr-x root shell 2014-06-13 07:38 uptime -> toolbox lrwxr-xr-x root shell 2014-06-13 07:38 vmstat -> toolbox lrwxr-xr-x root shell 2014-06-13 07:38 watchprops -> toolbox lrwxr-xr-x root shell 2014-06-13 07:38 wipe -> toolbox
分类:
Android Pro
【推荐】国内首个AI IDE,深度理解中文开发场景,立即下载体验Trae
【推荐】编程新体验,更懂你的AI,立即体验豆包MarsCode编程助手
【推荐】抖音旗下AI助手豆包,你的智能百科全书,全免费不限次数
【推荐】轻量又高性能的 SSH 工具 IShell:AI 加持,快人一步
· 从 HTTP 原因短语缺失研究 HTTP/2 和 HTTP/3 的设计差异
· AI与.NET技术实操系列:向量存储与相似性搜索在 .NET 中的实现
· 基于Microsoft.Extensions.AI核心库实现RAG应用
· Linux系列:如何用heaptrack跟踪.NET程序的非托管内存泄露
· 开发者必知的日志记录最佳实践
· winform 绘制太阳,地球,月球 运作规律
· 超详细:普通电脑也行Windows部署deepseek R1训练数据并当服务器共享给他人
· TypeScript + Deepseek 打造卜卦网站:技术与玄学的结合
· AI 智能体引爆开源社区「GitHub 热点速览」
· 写一个简单的SQL生成工具
2014-04-04 免费阿里云服务器超爽体验(为阿里做个广告吧)
2014-04-04 Git版本恢复命令reset(转载)