听说新版本的android 增加了许多特性,浏览器速度更快,在2009年5月7号用repo下载了整个源码,进行编译,中间遇到了一些问题,并解决了。
1.下载(以下是大致过程,具体详细方法可参考android 官网)
mkdir build
cd build
repo init -u git://android .git.kernel.org/platform/manifest.git
repo sync

2.编译(需要安装JDK及相关环境,具体参考android 官网)
cd build
make
中间会提示出错,经过查看出错信息, 发现是一个java文件中的注释部分格式不对导致编译识别不了,将出错的那一行注释删掉或进行修改(根据出错信息)。

3.编译完之后,将新的文件系统挂到nfs下,这次启动界面上并没有机器人,而是一个android 图标,有一道亮光从左到右闪过,进入到主界面之后,由于电源电量不足,会挂在那里,进入不了主界面。

The reason may be that no battery and power soruce can be detected by
system.
(battery level =0 and unknown charging status)
So ShutdownThread is invoked by KeyguardUpdateMonitor to power off the
system.

Please comment line 300 of "frameworks/policies/base/phone/com/android /
internal/policy/impl/KeyguardUpdateMonitor"
and make again to get the new rootfs.
Then the battery check can be avoided when booting.
按照上面的说明注释掉frameworks/policies/base/phone/com/android /internal/policy/impl/KeyguardUpdateMonitor.java文件中的
// ShutdownThread .shutdownAfterDisablingRadio(mContext, false); // by xionggang
重新译,换成新的文件系统即可进入主界面。

我采用的是nfs 文件系统方式,先进入到Linux标准文件系统,再用脚本切换到android 文件系统。

android 文件系统存放在标准文件系统的根目录下,名字为android _rootfs,其中的内容从android 源码编译后生成的out/target /product/generic/system 和 root 中copy 过来,注意system/usr/keylayout下面的键盘映射文件需要修改(我使用的是USB键盘),其内容见附件, 使用的脚本为以下几句
umount /proc
mount -t proc proc /android _rootfs/proc
mount -t sysfs sysfs /android _rootfs/sys
chroot /android _rootfs ./init

注意:不要用老板本的init.rc,使用新文件系统的init.rc并,注释掉除
mount tmpfs tmpfs /sqlite_stmt_journals size="4m"
之外的所有mount 语句。在Linux标准文件系统中,设置好IP,网关,由于android DNS设置和标准文件系统有所不一样,需要在init.rc中进行设置,在
setprop net.tcp.buffersize.gprs 4092,8760,11680,4096,8760,11680
后加上
setprop net.dns1 192.168.2.1 # add by xionggang
用来设置DNS

更多相关文章

  1. Android基本操作1(意图使用、界面转换、按键操作、文本传递)
  2. Android 应用程序界面设计建议
  3. flutter与android混合开发一:Android原生项目创建flutter模块、An
  4. Android采用HTML设计软件界面
  5. 没事抽空学——常用界面组件属性
  6. Android Studio开发-day3 UI界面设计
  7. 制作linux根文件系统
  8. 探讨android 导航栏中的recent_app界面

随机推荐

  1. Android 推送之Androidpn项目分析(一)
  2. 手把手带你搭建 Elasticsearch 集群
  3. Android采用PULL解析XML文档
  4. 关于android AppWidget初探①
  5. Android 菜单(SubMenu)
  6. 如何去除Android布局文件xml中的斜体样式
  7. Android ListView的背景和黑色边缘化的问
  8. [ant]通过Android命令自动编译出build.xm
  9. 使用风格化Android的GridView元素背景
  10. 在Android上有类似于session的东西,叫做Ap