Reprinted from: http://www.cnblogs.com/xiaowenji/archive/2011/03/12/1982309.html
Have you ever had this experience? input ADB shell in the command line and then use the command to operate your mobile phone or simulator. However, these commands are common Linux commands, which are not easy to use. Have you ever thought about using a complete shell on Android? Use busybox. You can use terminal emulator either by connecting to the device using the ADB c
This is the first time I heard about this stuff. After investigation, I found that this stuff is very good. It is especially applicable to Linux-based embedded systems with strict restrictions on disk space. in addition, this product has been used in many products, such as Nokia 770 and Motorola a780.
What is busybox? Directly reference the author: "busybox combines tiny versions of Common Unix utilities
You can enter the android console in two ways:
1. Run the emulator-shell command directly;
2. After starting emulator, run the ADB shell command.
Then we can use some common Linux commands, such as LS and cat. However, the toolbox provided by Android (located in/system/bin) is too simple. Some commands such as find do not support Android or are not well supported. The following describes how to add the busybox tool to Android and compile a
Busybox Script Function, busybox Script Function
Busybox is run on openwrt, which is similar to the bash shell provided by the general linux release.
However, the syntax for the embedded system is a little different from that for the bash shell.
This document describes how to declare and call functions in a script.
(1) declare a function
Test () {echo
ls
# Ln-s busybox RM
# Ln-s busybox mkdir
Then run the three links respectively:
#./Ls
#./RM
#./Mkdir
The functions of the ls rm and mkdir commands can be completed separately, although they all point to the same executable program busybox
However, as long as the link names are different, the functions are different and busy
[arguments...] # Or
For example, run the echo command:
$./Busybox echo "This is busybox"
This is busybox
2. [arguments...] # If symlinked
The premise of this usage is to establish a symbolic connection. For example:
$ Ln-s busybox ls
$./Ls/
Bin CDROM etc lib media opt root SELinux sys VaR
Boot Dev home lost + found MN
Have you ever had this experience? input ADB shell in the command line and then use the command to operate your mobile phone or simulator. However, these commands are common Linux commands, which are not easy to use. Have you ever thought about using a complete shell on Android? Use busybox. You can use terminal emulator either by connecting to the device using the ADB command line or on your mobile phone.
1. What is
directory to the kernel root directory. If init. RC is updated and the kernel is updated, the init. RCIt automatically updates, and there is no need to manually copy Android. IMG. cpio. In addition, when compiling the Android system and kernel, you must first compile the Android system,In order to ensure that the modified init. RC is valid, the modified MK section is as follows:Build_system (){......CP-AV $ {target_dir}/installed-files.txt $ {release_dir}/| return 1;CP-AV $ {target_dir}/install
force-splitting electronic components, while busybox is like an integrated circuit, which compresses the integration of common tools and commands into an executable file, functions remain unchanged, but the size is many times smaller. In Embedded linux applications, busybox has a wide range of applications. In addition, busybox appears in most installation progr
Have you ever had this experience? input ADB shell in the command line and then use the command to operate your mobile phone or simulator. However, these commands are common Linux commands, which are not easy to use. Have you ever thought about using a complete shell on Android? Use busybox. You can use terminal emulator either by connecting to the device using the ADB command line or on your mobile phone.
1. What is
Http://www.cnblogs.com/xiaowenji/archive/2011/03/12/1982309.htmlHave you ever had this experience, enter the ADB shell at the command line, and then use the command to manipulate your phone or simulator, but those commands are a shrinking version of the common Linux commands, which is very uncomfortable to use. Ever thought about using a more complete shell on Android? Use BusyBox. Whether using the ADB connection device using the command line or dire
busybox mkdir
Then run the three links respectively:#./Ls#./RM#./Mkdir
The functions of the ls rm and mkdir commands can be completed separately, although they all point to the same executable program busyboxHowever, as long as the link names are different, the functions are different and busybox is so amazing.Many Linux websites provide download of
Have you ever had this experience, enter the ADB shell at the command line, and then use the command to manipulate your phone or simulator, but those commands are a shrinking version of the common Linux commands, which is very uncomfortable to use. Ever thought about using a more complete shell on Android? Use BusyBox. Whether using the ADB connection device using the command line or directly on the phone with terminal emulator is OK.First, what is
are only about 1 MB in the partition area. The linux commands we usually use are like force-splitting electronic components, while busybox is like an integrated circuit, which compresses the integration of common tools and commands into an executable file, functions remain unchanged, but the size is many times smaller. In Embedded linux applications, busybox has a wide range of applications. In addition,
This paper is suitable for fs4412 Development Board, the kernel used is linux4.9.9.1. SOURCE DownloadBusyBox's official source download path is:http://busybox.net/downloads/Can download the latest busybox-1.28.12. Extract Source
Tar xvf busybox-1.28.1.tar.bz2
3. Access to the source directory
CD
Busybox is a software toolbox that integrates hundreds of commonly used linux commands and tools in linux. In many cases, we may need to install some virtual systems, including some environment configurations, so we need to download some operating system images, such as ubuntu and centos.1. busybox image.First query the image:Docker search
Port busybox to the host
What we need to do today is not to port busybox to the Development Board, but to port it to our host:
Any Linux instance that can be started is composed of three parts:Boot Program, kernel image and File System.
1. Bootstrap program:
In order not to be too complex, today's experiment assumes that grub has been installed on our host (like me, grub is automatically installed after
BusyBoxA binary program that simulates the implementation of many programs./bin/busyboxTo view native hardware device information:#cat/proc/cpuinfo#cat/proc/meminfo#lsusb Displays the USB interface information.#lspci displays all devices on the PCI bus.#hal-device displays detailed information for all hardware.Hardware abstract layer hardware abstraction.Compile BusyBox:#tar XF busybox.tar.bz2#cd BusyBox#ma
Reproduced in:http://blog.sina.com.cn/wyw1976What is BusyBox?(1) BusyBox is an application on Linux (application), that is, there is only one elf file header.(2) It integrates many tools and commands commonly used on Linux (utilities) such as RM, LS, gzip, TFTP, etc. For these tools and commands, the implementation in BusyBox may not be the most complete, but is
BusyBox preparation before building the system
First installation:
To resolve BusyBox compilation error: Fatal error:curse.h error is due to missing suite ncurses devel
Apt-get Install Libncurses5-dev
problems can be solved;
Step two: Download ARM-LINUX-GCC installation, this is based on the arm architecture of the Linux Platform Cross-compilation tool,
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.