Dalvik虚拟机学习1——Dalvik虚拟机源码结构分析

一、Dalvik虚拟机源码结构分析

1,dexdump

这个目录保存了dexdump工具的源码,dexdump是objdump工具的模仿版,可以使用与之形似的参数。dexdump工具可以用来查看dex文件的信息。可以通过这个工具将dex文件dump到txt文件中进行信息查看。下面是一些使用参考。

dexdump: [-c] [-d] [-f] [-h] [-i] [-l layout] [-m] [-t tempfile] dexfile…

-c : verify checksum and exit

-d : disassemble code sections

-f : display summary information from file header

-h : display file header details

-i : ignore checksum failures

-l : output layout, either ‘plain’ or ‘xml’

-m : dump register maps (and nothing else)

-t : temp file name (defaults to /sdcard/dex-temp-*)

参考文章:通过dexdump来学习DEX文件格式

2,dexgen

它是dex代码生成器的主工程目录,里面存储了很多跟dex相关的信息,如dex结构,LEB128等。它提供了在运行时创建dex classes的API。这个解决方案是基于dx工具的,并且广泛的使用了它的类。

3,dexlist

这个目录是生成查看dex文件里所有类的方法的工具

4,dexopt

对dex进行优化生成odex文件

5,docs

dalvik虚拟机的一些说明文档。包括怎样调试、执行模式等。

6,dx

是dx工具源码目录,可以把class文件转为dex文件。

7,hit

生成显示堆栈信信/对象信息的工具源码

8,libdex

用于生成主机和设备处理DEX文件的库

9,opcode-gen

包含了字节码定义等

10,tests

这个目录是保存测试相关测试用例

11,tools

在这个目录中保存了一些编译运行工具

12,unit-tests

在这个目录中有一个dvmHumanReadableDescriptor_test文件。主要是测试一些类型的签名写法是否对应。

13,vm

这个目录是保存虚拟机绝大部份代码,包括读取指令读取,指令执行等等

14,MODULE_LICENSE_APACHE2

APCHE2的版权声明文件

15,NOTICE

说明虚拟机源码的版权注意事项。

16,README.txt

这个文件是说明本目录相关内容和版权。

  • 0
    点赞
  • 2
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
Android虚拟机Dalvik完整源码,宝贵资源,欢迎下载! This directory contains the Dalvik virtual machine and core class library, as well as related tools, libraries, and tests. A note about the licenses and header comments --------------------------------------------- Much of the code under this directory originally came from the Apache Harmony project, and as such contains the standard Apache header comment. Some of the code was written originally for the Android project, and as such contains the standard Android header comment. Some files contain code from both projects. In these cases, the header comment is a combination of the other two, and the portions of the code from Harmony are identified as indicated in the comment. Here is the combined header comment: /* * Copyright (C) The Android Open Source Project * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * * ---------- * * Portions of the code surrounded by "// BEGIN Harmony code" and * "// END Harmony code" are copyrighted and licensed separately, as * follows: * * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ Native SH call bridge --------------------- Native SH call bridge is written by Shin-ichiro KAWASAKI and Contributed to Android by Hitachi, Ltd. and Renesas Solutions Corp.

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值