手工打包system.img
来源:互联网 发布:淘宝防盗图怎么设置 编辑:程序博客网 时间:2024/04/30 01:06
out/host/linux-x86/bin下有一些有用的host工具,可以添加它到环境变量:export PATH=$PATH:~/Project/android/out/host/linux-x86/bin , L' ~9 p# @9 a, r o
其中就有我们打包要用到的mkyaffs2img
mkyaffs2img可以用来手工打包emulator用到的img镜像。比如我们需要额外在system中添加一些组件的时候,直接将组件拷贝到system目录中,再执行
mkyaffs2img system system.img
就会生成带你需要组件的system.img文件。
先在android目录下执行
$ . build/envsetup.sh
然后你就会多出几个可用的命令。在改了Contacts联系人项目后,可以简单的执行一下命令来单独编译这个部分:
$mmm packages/apps/Contacts/
为了可以直接测试改动,需要生成新的system.img,在android目录下执行:
$ make snod
当然,如果你改动的是emulator或者其它外围相关的,而非系统内部的东西,就不只是要重新生成system.img了
1.执行#make showcommands snod
2.得出android制作system.img命令为: - Q& x1 B( N7 v! /
#!/bin/bash
export PATH="/home/tony/tmp/e2fsprogs-1.41.3/prefix/sbin/:$PATH" ; {, L7 x' X/ s( g
) p! i- i& p7 G+ s& k' N4 q
num_blocks=`du -sk out/target/product/eeepc/system | tail -n1 | awk '{print $1;}'`
if [ $num_blocks -lt 20480 ]; then
extra_blocks=3072;
else
extra_blocks=20480;
fi # z3 q7 N/ t$ e; h0 g. ~
num_blocks=`expr $num_blocks + $extra_blocks`
num_inodes=`find out/target/product/eeepc/system | wc -l`
num_inodes=`expr $num_inodes + 500` 6 f% v( K- L- A* h# R
out/host/linux-x86/bin/genext2fs -a -d out/target/product/eeepc/system -b $num_blocks -N $num_inodes -m 0 out/target/product/eeepc/system.img
3 L2 V3 u/ y7 /9 ^: C
tune2fs -L system out/target/product/eeepc/system.img
tune2fs -C 1 out/target/product/eeepc/system.img
e2fsck -fy out/target/product/eeepc/system.img
我这里的打印信息
$ make showcommands snod
============================================
PLATFORM_VERSION_CODENAME=REL
PLATFORM_VERSION=2.1
TARGET_PRODUCT=imx51_BBG
TARGET_BUILD_VARIANT=eng
TARGET_SIMULATOR=false
TARGET_BUILD_TYPE=release
TARGET_ARCH=arm
HOST_ARCH=x86
HOST_OS=linux
HOST_BUILD_TYPE=release
BUILD_ID=ERD79
============================================
build/core/copy_headers.mk:15: 警告:覆盖关于目标“out/target/product/imx51_BBG/obj/include/libpv/getactualaacconfig.h”的命令
build/core/copy_headers.mk:15: 警告:忽略关于目标“out/target/product/imx51_BBG/obj/include/libpv/getactualaacconfig.h”的旧命令
/bin/bash: line 0: cd: sdk/layoutopt/app/src/resources: 没有那个文件或目录
No private recovery resources for TARGET_DEVICE imx51_BBG
Install: out/host/linux-x86/bin/genext2fs
out/host/linux-x86/bin/acp -fpt out/host/linux-x86/obj/EXECUTABLES/genext2fs_intermediates/genext2fs out/host/linux-x86/bin/genext2fs
make snod: ignoring dependencies
Target system fs image: out/target/product/imx51_BBG/system.img
num_blocks=`du -sk out/target/product/imx51_BBG/system | tail -n1 | awk '{print $1;}'`; if [ $num_blocks -lt 20480 ]; then extra_blocks=3072; else extra_blocks=20480; fi ; if [ "" != "" ]; then num_blocks=; num_inodes=4096; else num_blocks=`expr $num_blocks + $extra_blocks` ; num_inodes=`find out/target/product/imx51_BBG/system | wc -l` ; num_inodes=`expr $num_inodes + 500`; fi; out/host/linux-x86/bin/genext2fs -a -d out/target/product/imx51_BBG/system -b $num_blocks -N $num_inodes -m 0 out/target/product/imx51_BBG/system.img;
tune2fs -L system out/target/product/imx51_BBG/system.img
tune2fs 1.41.11 (14-Mar-2010)
tune2fs -j out/target/product/imx51_BBG/system.img
tune2fs 1.41.11 (14-Mar-2010)
Creating journal inode: 完成
This filesystem will be automatically checked every 20 mounts or
0 days, whichever comes first. Use tune2fs -c or -i to override.
tune2fs -C 1 out/target/product/imx51_BBG/system.img
tune2fs 1.41.11 (14-Mar-2010)
Setting current mount count to 1
e2fsck -fy out/target/product/imx51_BBG/system.img ; [ $? -lt 4 ]
e2fsck 1.41.11 (14-Mar-2010)
文件系统 did not have a UUID; generating one.
文件系统 has feature flag(s) set, but is a revision 0 文件系统. 处理? 是
第一步: 检查inode,块,和大小
第二步: 检查目录结构
第3步: 检查目录连接性
/lost+found未找到.创建? 是
Pass 4: Checking reference counts
第5步: 检查簇概要信息
system: ***** 文件系统已修改 *****
system: 521/1056 files (1.3% non-contiguous), 80423/96976 blocks
true
- 手工打包system.img
- 手工打包system.img
- 手工打包system.img
- android,system.img 打包
- 解压与打包system.img
- 解压与打包system.img
- 解压-打包system.img文件
- 解压与打包system.img
- 解压打包android system.img
- 解压-打包system.img文件
- android快速打包system.img
- system.img解包打包
- system.img解包打包
- Android system.img 打包解包
- system.img解包打包的方法
- system.img解包打包的方法
- Android 解压和重新打包system.img
- 解压打包android system.img (2)
- FrameBuffer的原理 linux开启FrameBuffer
- 新版连连看~
- 解决AjaxPro2中core.ashx 407缺少对象的问题
- 先人后己,助人为乐,事难我来 好处
- Servlet监听器
- 手工打包system.img
- Java Exception性能问题
- 重读经典-《Effective C++》Item2:尽量以const,enum,inline替换#define
- POJ 1836-ALignment 动态规划
- 一些常用命令
- LAMP转帖 2009第三届PHP中国开源发展及人才状况调查报告 第一部分 调查介绍
- LAMP转帖 2009第三届PHP中国开源发展及人才状况调查报告 第二部分 调查结论摘要
- CISCO 路由器 限制BT应用
- 人生苦短