`

由安装Busybox到Android过程中想到的

 
阅读更多

Android 的文件系统以ramdisk.img 形式压缩,在系统启动时每次都启动解压挂载之;

Android 文件系统中/data 目录主要存放用户数据,以userdata.img 形式压缩,在系统挂载完总文件系统后解压该镜象文件并复制其中的内容至文件系统中的/data 目录下。

Android 文件系统中/system 目录主要存放系统数据,以system.img 形式压缩,在系统挂载完文件系统后解压该镜象文件并复制其中的内容至文件系统中的/data 目录下。

系统运行过程用户可以对用户数据/data 目录,进行读写操作(adb shell mount 可证明),并且操作在关机后被保存下来。如何实现(--猜每次关机前会把/data 重新压缩更新成一个新userdata.img 。)

系统运行过程中用户不可以对系统数据/system 目录,进行写操作,只能读。所以system.img 是不会被更新的。

同理系统运行过程文件系统框架也不会被改变,所以ramdisk.img 也是不会被更新的。

(不可理解的是既然都在运行时不能不修改为什么要把/system 单独做成一个镜象,而不是直接做在ramdisk,img 中,这样在启动时还可以省去解压挂载/system 这个步骤对应init.rc 中如下步骤:

# Mount /system rw first to give the filesystem a chance to save a checkpoint

mount yaffs2 mtd@system /system

mount yaffs2 mtd@system /system ro remou

要把busybox 安装到Android 文件系统中,可以把busybox 命令adb push/data 下,这样也能实现在开机busybox 仍然存在;

但是为了保证环境变量开机恢复必须使修改的init.rc 文件也开机保证修改,但该文件在根目录下,每次开机系统都会导入ramdisk.img 中原来的init.rc 文件,所以要实现可保存的修改只能修改ramdisk.img 中的init.rc 文件。具体方法略。

实现上面两点就可以实现busyboxAndroid 的永久安装。

分享到:
评论

相关推荐

    Busybox,Android工具

    Busybox.apk 可以应用于Android开发的工具

    Busybox for Android v1.20.2

    Busybox for Android v1.20.2 Stable built by Linus Yang [Aug 12, 2012 Update] - Update to 1.20.2 stable [Features] - Tested on Android 2.1, 2.3, 4.0 and 4.1. Should be capable with all Android ...

    busybox_android

    busybox busybox_android 编译好的

    busybox for android

    android中的busybox工具集。

    busybox 1.20.2 for android

    busybox 1.20.2 for android. steps: adb remount adb push ./busybox-1.20.2-android2 /system/bin/ adb shell busybox ifconfig......

    busybox for android(passed in android 2.3)

    busybox for android,编译器要用arm-eabi-4.4.0.tgz。 海天雄的android系统是没有busybox的。 Android并没有采用glibc作为C库,而是采用了Google自己开发的Bionic Libc,它的官方Toolchain也是基于Bionic Libc而并非...

    busybox 1.20.2 for Android 4.0.4

    busybox v1.20.2 for Android v4.0.4

    Android代码-BusyBox

    This application is an BusyBox installer for Android. BusyBox combines tiny versions of many common UNIX utilities into a single small executable. It provides replacements for most of the utilities ...

    为Android加入busybox工具

    为Android加入busybox工具 为Android加入busybox工具

    Busybox的安装和使用

    二:安装busybox 在ubuntu上安装busybox和其他软件一样,有两种方法: 1):在shell环境下执行命令:sudo apt-get install busybox,该命令将busybox的可执行文件安装在/bin文件夹下, 安装完成之后可以直接在...

    Android busybox

    android可用的交叉编译后的busybox。支持70多个linux命令,可以极大扩展android命令集

    android中用的busybox

    adb push busybox /system/

    android busybox

    busybox tool for android

    busybox工具,在android里面使用的

    在android端使用busybox工具,可将附件的busybox复制到手机的system/xbin/目录下,修改权限之后就可以使用busybox,这样可以使用在android上很多linux命令

    busybox android

    busybox busybox busybox busybox busybox busybox busybox

    BUSYBOX中文版安装

    安卓BUSYBOX中文版直接安装。文件名字BusyBox.Pro.CN

    Android Busybox工具

    Android系统编译好的可用Busybox工具。 BusyBox 是一个集成了三百多个最常用Linux命令和工具的软件。BusyBox 包含了一些简单的工具,例如ls、cat和echo等等,还包含了一些更大、更复杂的工具,例grep、find、mount...

    ANDROID交叉编译后的BUSYBOX-1.19.4

    交叉编译后的busybox,版本1.19.4,可以在android linux shell环境下使用

    Android busybox V1.31.1

    目前最新版本的Android可用busybox; 25 October 2019 -- BusyBox 1.31.1 (stable) Bug fix release. 1.30.1 has fixes for dc, ash (PS1 expansion fix), hush, dpkg-deb, telnet and wget.

Global site tag (gtag.js) - Google Analytics