Android init.rc BOOTCLASSPATH
来源:互联网 发布:网络誉情内参 编辑:程序博客网 时间:2024/05/18 00:13
BOOTCLASSPATH 不添加jar包路径,系统启动后将无法找到自定义JAVA层系统服务的相关类,这是由于自定义系统服务jar包是Dalvik所需的基本库文件。如果不添加相关路径会报如下错误:
W/dalvikvm( 2582): Unable to resolve superclass of Lcom/android/server/yourdir/yourService; (1633)
W/dalvikvm( 2582): Link of class 'Lcom/android/server/yourdir/yourService;' failed
D/dalvikvm( 2582): DexOpt: unable to opt direct call 0x276b at 0x258 in Lcom/android/server/ServerThread;.run
三篇必看原理文章:
Android 类实现探索-系统基础类
Dalvik 分析之准备篇
Dalvik 分析 - Class加载篇
init.rc:
export BOOTCLASSPATH /system/framework/core.jar:/system/framework/bouncycastle.jar:/system/framework/ext.jar:/system/framework/framework.jar:/system/framework/android.policy.jar:/system/framework/services.jar:/system/framework/core-junit.jar
BOOTCLASSPATH=/ango/system/framework/core.jar:/ango/system/framework/bouncycastle.jar:/ango/system/framework/ext.jar:/ango/system/framework/framework.jar:/ango/system/framework/android.policy.jar:/ango/system/framework/services.jar:/ango/system/framework/core-junit.jar
d:/linux/linuxkernel/WORKING_DIRECTORY/android-omap-20111108-gingerbread/dalvik/vm/Init.c
//getenv of classpath and BOOTCLASSPATH configed by init.rc
static void setCommandLineDefaults()
putenv("BOOTCLASSPATH=/ango/system/framework/core.jar:/ango/system/framework/bouncycastle.jar:/ango/system/framework/ext.jar:/ango/system/framework/framework.jar:/ango/system/framework/android.policy.jar:/ango/system/framework/services.jar:/ango/system/framework/core-junit.jar");
envStr = getenv("BOOTCLASSPATH");
if (envStr != NULL)
gDvm.bootClassPathStr = strdup(envStr);
else
gDvm.bootClassPathStr = strdup(".");
d:/linux/linuxkernel/WORKING_DIRECTORY/android-omap-20111108-gingerbread/dalvik/vm/oo/Class.c
/*
* Prepare a ClassPathEntry struct, which at this point only has a valid
* filename. We need to figure out what kind of file it is, and for
* everything other than directories we need to open it up and see
* what's inside.
*/
static bool prepareCpe(ClassPathEntry* cpe, bool isBootstrap)
/*
* Convert a colon-separated list of directories, Zip files, and DEX files
* into an array of ClassPathEntry structs.
*
* During normal startup we fail if there are no entries, because we won't
* get very far without the basic language support classes, but if we're
* optimizing a DEX file we allow it.
*
* If entries are added or removed from the bootstrap class path, the
* dependencies in the DEX files will break, and everything except the
* very first entry will need to be regenerated.
*/
static ClassPathEntry* processClassPath(const char* pathStr, bool isBootstrap)
/*
* Initialize the bootstrap class loader.
*
* Call this after the bootclasspath string has been finalized.
*/
bool dvmClassStartup(void)
- Android init.rc BOOTCLASSPATH
- Android init.rc BOOTCLASSPATH
- BootClassLoader BOOTCLASSPATH(init.environ.rc)
- Android 启动加载jar包 init.rc BOOTCLASSPATH
- Android init 进程 init.rc init.*.rc
- Android init 进程 init.rc init.*.rc
- Android init 进程 init.rc init.*.rc
- Android init.rc init.vendor.rc 介绍
- [init.rc] android init.rc 总结
- android init.c init.rc
- android init进程 init.rc
- android中的init.rc
- 转 android init.rc
- android init.rc 语法分析
- Android init.rc解析
- Android init.rc解析
- Android 修改init.rc
- Android init.rc解析
- 【SQL Server 2005 彻底卸载、重装问题】
- requestWindowFeature详解
- mysql 时间格式化
- win7里面可以查看完整网络映射,xp里面有没有办法实现?
- ASP.NET使用NPOI类库导出Excel(收藏)
- Android init.rc BOOTCLASSPATH
- python下的事件驱动编程
- POJ 1739 Tony's Tour
- 友元
- 目录下文件后缀的更改
- excel数据格式问题
- Eclipse NDK 配置
- 单个JSP页面中实现查询和删除数据实例
- android在点击EditText的时候始终不弹出软件键盘