您当前的位置:首页 > 电脑百科 > 软件技术 > 操作系统 > linux百科

手机上手动安装功能强大的Linux工具Busybox

时间:2022-04-26 09:40:31  来源:  作者:中微中科技

BusyBox 是一个集成了三百多个最常用linux命令和工具的软件。功能便捷、强大。

安装需要有root权限

查询并下载自己手机的CPU型号及对应busybox二进制文件

c:tmpfastboot>adb shell
shell@GiONEE_GBL7319:/ $ cat /proc/cpuinfo
Processor       : AArch64 Processor rev 3 (aarch64)
processor       : 0
BogoMIPS        : 26.00

Features        : fp asimd aes pmull sha1 sha2 crc32
CPU implementer : 0x41
CPU architecture: AArch64
CPU variant     : 0x0
CPU part        : 0xd03
CPU revision    : 3

Hardware        : MT6735

AArch64:对应的是ARMv8-A架构,引入的64位指令集,向后兼容基于32位指令集。

下载ARMV8相关的busybox二进制文件:busybox-armv8l

下载地址:
https://busybox.NET/downloads/binaries/

手机上手动安装功能强大的Linux工具Busybox

 


手机上手动安装功能强大的Linux工具Busybox

对应文件:busybox-armv8l

安装方法

adb root              以root来运行
adb remount       重新以读写方式挂载系统
adb push c:tmpbusybox-armv8l   /system/xbin
adb shell
cd /system/xbin
chmod  755  busybox-armv8l           改权限
./busybox-armv8l    --install             安装

有些版本低,前2个命令没有,出现以下问题:error: device not found

c:tmpfastboot>adb shell
shell@GiONEE_GBL7319:/ $ adb root
* daemon not running. starting it now on port 5038 *
* daemon started successfully *
error: device not found
1|shell@GiONEE_GBL7319:/ $ adb remount
error: device not found

c:tmpfastboot>adb push c:/tmp/busybox-armv8l  /system/xbin
adb: error: fAIled to copy 'c:/tmp/busybox-armv8l' to '/system/xbin/busybox-armv8l': remote Permission denied
c:/tmp/busybox-armv8l: 0 files pushed. 0.4 MB/s (131056 bytes in 0.342s)

此时可先将文件传到临时目录: /data/local/tmp ,在用移动mv命令

c:tmpfastboot>adb push c:/tmp/busybox-armv8l  /data/local/tmp
c:/tmp/busybox-armv8l: 1 file pushed. 0.4 MB/s (1148524 bytes in 3.113s)

1|shell@GiONEE_GBL7319:/ $ su
root@GiONEE_GBL7319:/ # mv  /data/local/tmp/busybox-armv8l   /system/xbin

将/system重新挂载为可读写:(可选)

先查/system挂载对应的文件目录(device):可用如下命令

  • cat /proc/mounts
  • mount
root@GiONEE_GBL7319:/system/xbin # cat /proc/mounts
rootfs / rootfs rw,seclabel 0 0
tmpfs /dev tmpfs rw,seclabel,nosuid,relatime,mode=755 0 0
devpts /dev/pts devpts rw,seclabel,relatime,mode=600 0 0
proc /proc proc rw,relatime 0 0
sysfs /sys sysfs rw,seclabel,relatime 0 0
selinuxfs /sys/fs/selinux selinuxfs rw,relatime 0 0
none /acct cgroup rw,relatime,cpuacct 0 0
none /sys/fs/cgroup tmpfs rw,seclabel,relatime,mode=750,gid=1000 0 0
tmpfs /mnt/asec tmpfs rw,seclabel,relatime,mode=755,gid=1000 0 0
tmpfs /mnt/obb tmpfs rw,seclabel,relatime,mode=755,gid=1000 0 0
none /dev/cpuctl cgroup rw,relatime,cpu 0 0
tmpfs /mnt/media_rw tmpfs rw,seclabel,relatime,mode=755,uid=1000,gid=1000 0 0
tmpfs /storage/usbotg tmpfs rw,seclabel,relatime,mode=755,uid=1000,gid=1000 0 0
tmpfs /storage/emulated tmpfs rw,seclabel,relatime,mode=755,uid=1023,gid=1023 0 0
/dev/block/platform/mtk-msdc.0/by-name/system /system ext4 rw,seclabel,noatime,data=ordered 0 0

对应目录(device)是:
/dev/block/platform/mtk-msdc.0/by-name/system

重新挂载成可读写:rw是读写,ro是只读(默认)

root@GiONEE_GBL7319:/ # mount -o remount -rw  /dev/block/platform/mtk-msdc.0/by-name/system  /system

或用:root@GiONEE_GBL7319:/ # mount -o remount, rw /system

修改属性:为可执行,chmod 755
/system/xbin/busybox-armv8l

126|root@GiONEE_GBL7319:/ # ls -l /system/xbin/busybox-armv8l
-rw-rw-rw- shell    shell     1148524 2022-01-27 22:12 busybox-armv8l
root@GiONEE_GBL7319:/ # chmod 755  /system/xbin/busybox-armv8l

安 装:./busybox-armv8l --install

127|root@GiONEE_GBL7319:/ # cd /system/xbin
1|root@GiONEE_GBL7319:/system/xbin # ./busybox-armv8l --install
busybox-armv8l: /usr/bin/[: No such file or directory
busybox-armv8l: /usr/bin/[[: No such file or directory
busybox-armv8l: /sbin/acpid: Cross-device link
busybox-armv8l: /usr/sbin/add-shell: No such file or directory
busybox-armv8l: /usr/sbin/addgroup: No such file or directory
busybox-armv8l: /usr/sbin/adduser: No such file or directory
busybox-armv8l: /sbin/adjtimex: Cross-device link
busybox-armv8l: /bin/arch: No such file or directory
                          ......

查看有哪些命令:直接输入busybox-armv8l

127|root@GiONEE_GBL7319:/system/xbin # busybox-armv8l
BusyBox v1.31.0 (2019-06-10 15:54:51 CEST) multi-call binary.
BusyBox is copyrighted by many authors between 1998-2015.
Licensed under GPLv2. See source distribution for detailed
copyright notices.

Usage: busybox [function [arguments]...]
   or: busybox --list[-full]
   or: busybox --show SCRIPT
   or: busybox --install [-s] [DIR]
   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:
        [, [[, acpid, add-shell, addgroup, adduser, adjtimex, arch, arp,
        arping, ash, awk, base64, basename, bc, beep, blkdiscard, blkid,
        blockdev, bootchartd, brctl, bunzip2, bzcat, bzip2, cal, cat, chat,
        chattr, chgrp, chmod, chown, chpasswd, chpst, chroot, chrt, chvt,
        cksum, clear, cmp, comm, conspy, cp, cpio, crond, crontab, cryptpw,
        cttyhack, cut, date, dc, dd, deallocvt, delgroup, deluser, depmod,
        devmem, df, dhcprelay, diff, dirname, dmesg, DNSd, dnsdomainname,
         ......

用法对比:busybox + 命令

手机上手动安装功能强大的Linux工具Busybox

 

改个易记的名:

127|root@GiONEE_GBL7319:/system/xbin # cp busybox-armv8l busybox
root@GiONEE_GBL7319:/system/xbin # ls -l
-rwxr-xr-x root     shell       22128 2016-08-11 21:00 BGW
-rwxr-xr-x root     shell       51144 2016-08-11 21:00 amigosu
-rwxr-xr-x root     root      1148524 2015-01-01 13:07 busybox
-rwxr-xr-x shell    shell     1148524 2022-01-27 22:12 busybox-armv8l

root@GiONEE_GBL7319:/system/xbin # busybox ls -l
total 3724
-rwxr-xr-x    1 0        2000         22128 Aug 11  2016 BGW
-rwxr-xr-x    1 0        2000         51144 Aug 11  2016 amigosu
-rwxr-xr-x    1 0        0          1148524 Jan  1 05:07 busybox
-rwxr-xr-x    1 2000     2000       1148524 Jan 27  2022 busybox-armv8l


Tags:Busybox   点击:()  评论:()
声明:本站部分内容及图片来自互联网,转载是出于传递更多信息之目的,内容观点仅代表作者本人,不构成投资建议。投资者据此操作,风险自担。如有任何标注错误或版权侵犯请与我们联系,我们将及时更正、删除。
▌相关推荐
Linux 中的 BusyBox 是什么?如何使用它?
BusyBox 现在越来越流行,特别是在 docker 用户中,许多 Docker 镜像使用 BusyBox 为您提供最小镜像。如果您认为 Linux 命令是理所当然的,这可能会让许多用户感到特别困惑,您认为...【详细内容】
2022-11-18  Search: Busybox  点击:(490)  评论:(0)  加入收藏
手机上手动安装功能强大的Linux工具Busybox
BusyBox 是一个集成了三百多个最常用Linux命令和工具的软件。功能便捷、强大。安装需要有root权限查询并下载自己手机的CPU型号及对应busybox二进制文件:c:\tmp\fastboot>adb...【详细内容】
2022-04-26  Search: Busybox  点击:(859)  评论:(0)  加入收藏
如何在 Linux 上使用 BusyBox
BusyBox 是一个开源(GPL)项目,提供了近 400 个常用命令的简单实现。我们很容易认为 Linux 的命令是理所当然的。当你安装 Linux 时,它们与系统捆绑在一起,而我们常常不问为什么它...【详细内容】
2021-10-11  Search: Busybox  点击:(81)  评论:(0)  加入收藏
▌简易百科推荐
微软 Win11 Linux 子系统(WSL)发布 2.2.2 版本
IT之家 4 月 8 日消息,微软近日更新 Windows Subsystem for Linux(WSL),最新 2.2.2 版本中带来了诸多改进,重点更新了 nft 规则,可以让 IPv6 流量通过 Linux 容器。图源: dev.to,AI...【详细内容】
2024-04-08    IT之家  Tags:Linux   点击:(10)  评论:(0)  加入收藏
从原理到实践:深入探索Linux安全机制
Linux 是一种开源的类Unix操作系统内核,由Linus Torvalds在1991年首次发布,其后又衍生出许多不同的发行版(如Ubuntu、Debian、CentOS等)。前言本文将从用户和权限管理、文件系统...【详细内容】
2024-03-27  凡夫编程  微信公众号  Tags:Linux安全   点击:(24)  评论:(0)  加入收藏
在Linux系统中,如何处理内存管理和优化的问题?
本文对 Linux 内存管理和优化的一些高级技巧的详细介绍,通过高级的内存管理技巧,可以帮助系统管理员和开发人员更好地优化 Linux 系统的内存使用情况,提高系统性能和稳定性。在...【详细内容】
2024-03-26  编程技术汇  微信公众号  Tags:Linux   点击:(18)  评论:(0)  加入收藏
Linux 6.9-rc1 内核发布:AMD P-State 首选核心、BH 工作队列
IT之家 3 月 25 日消息,Linus Torvalds 宣布,Linux 6.9 内核的首个 RC(候选发布)版 Linux 6.9-rc1 发布。▲ Linux 6.9-rc1Linus 表示,Linux 内核 6.9 看起来是一个“相当正常”...【详细内容】
2024-03-25    IT之家  Tags:Linux   点击:(16)  评论:(0)  加入收藏
轻松实现Centos系统的软件包安装管理:yum指令实战详解
yum 是一种用于在 CentOS、Red Hat Enterprise Linux (RHEL) 等基于 RPM 的 Linux 发行版上安装、更新和管理软件包的命令行工具。它可以自动解决软件包依赖关系,自动下载并...【详细内容】
2024-02-27  凡夫贬夫  微信公众号  Tags:Centos   点击:(59)  评论:(0)  加入收藏
Win + Ubuntu 缝合怪:第三方开发者推出“Wubuntu”Linux 发行版
IT之家 2 月 26 日消息,一位第三方开发者推出了一款名为“Wubuntu”的缝合怪 Linux 发行版,系统本身基于 Ubuntu,但界面为微软 Windows 11 风格,甚至存在微软 Windows 徽标。据...【详细内容】
2024-02-27    IT之家  Tags:Ubuntu   点击:(54)  评论:(0)  加入收藏
Linux中磁盘和文件系统工作原理解析
在Linux系统中,一切皆文件的概念意味着所有的资源,包括普通文件、目录以及设备文件等,都以文件的形式存在。这种统一的文件系统管理方式使得Linux系统具有高度的灵活性和可扩展...【详细内容】
2024-02-20  王建立    Tags:Linux   点击:(60)  评论:(0)  加入收藏
Linux子系统概览
inux操作系统是一个模块化的系统,由多个子系统组成。这些子系统协同工作,使Linux能够执行各种任务。了解Linux的子系统有助于更好地理解整个操作系统的运作机制。以下是Linux...【详细内容】
2024-02-01    简易百科  Tags:Linux   点击:(85)  评论:(0)  加入收藏
Linux内核:系统之魂与交互之源
内核,作为任何基于Linux的操作系统的心脏,扮演着至关重要的角色。它不仅是计算机系统软件与硬件之间的桥梁,更是确保系统稳定、高效运行的关键。内核提供了一系列核心功能,为上...【详细内容】
2024-02-01  松鼠宝贝    Tags:Linux内核   点击:(73)  评论:(0)  加入收藏
如何确保Linux进程稳定与持久
在Linux系统中,进程的稳定性与持久性对于维持系统的持续运行至关重要。然而,由于各种原因,进程可能会面临崩溃或系统重启的情况。为了确保关键进程能够持续运行,我们必须采取一...【详细内容】
2024-01-19  松鼠宝贝    Tags:Linux进程   点击:(93)  评论:(0)  加入收藏
相关文章
    无相关信息
站内最新
站内热门
站内头条