android 查内核,如何查找android emulator内核的精确版本

android api22, arm images

root@generic:/ # cat /proc/version

Linux version 3.4.67-01422-gd3ffcc7-dirty (digit@tyrion.par.corp.google.com) (gcc version 4.8 (GCC) ) #1 PREEMPT Tue Sep 16 19:34:06 CEST 2014

内核版本3.4.67,下载goldfish代码:

git clone git://mirrors.ustc.edu.cn/aosp/kernel/goldfish.git

shuyin.wsy@10-101-175-19:/disk7/shuyin.wsy/goldfish$ git branch -a

* (no branch)

master

remotes/origin/HEAD -> origin/master

remotes/origin/android-3.10

remotes/origin/android-3.18

remotes/origin/android-3.4

remotes/origin/android-goldfish-2.6.29

remotes/origin/android-goldfish-3.10

remotes/origin/android-goldfish-3.10-l-mr1-dev

remotes/origin/android-goldfish-3.10-m-dev

remotes/origin/android-goldfish-3.18-dev

remotes/origin/android-goldfish-3.4

remotes/origin/android-goldfish-3.4-l-mr1-dev

remotes/origin/android-goldfish-4.4-dev

remotes/origin/linux-goldfish-3.0-wip

remotes/origin/mastergit checkout remotes/origin/android-goldfish-3.4

但是,预编译好的kernel-qemu到底对应了哪个commit id呢?

看版本号,发现g后面的就是commit id,d3ffcc7

然后git checkout d3ffcc7就可以了

android api22, x86 images

root@generic_x86:/ # cat /proc/version

Linux version 3.4.67+ (digit@tyrion.par.corp.google.com) (gcc version 4.8 (GCC) ) #3 PREEMPT Tue Sep 16 19:46:22 CEST 2014没有goldfish commit id信息,怎么玩呢?

1、求取预编译的kernel-qemu的md5sum为6c5f6f4359c7b94b637ef266387c5ff9

2、cd android-5.1.0_r1/prebuilts/qemu-kernel/

3、求取x86/kernel-qemu的md5sum,对比是否相同

4、相同,那么看commit msg,里面有说明对应的goldfish commit id是多少

5、不同,git reset --hard ,回到第3步

最后,得到的commit msg是:

commit 2cd41c75898f6eb19619e4d03fd39e08821a1e38

Author: David 'Digit' Turner

Date: Wed Sep 17 00:14:04 2014 +0200

Upgrade qemu kernels to support multinetwork.

This patch updates the binaries of emulator-specific kernels to

the following revisions (https://android.googlesource.com/kernel/goldfish):

android-goldfish-3.4: ea97df6 goldfish: Enable multinetwork kernel featu

android-goldfish-3.10: 64a0393 goldfish: Enable multinetwork kernel featu

The main goals is to get multinetwork working, which is required to

properly emulate Android L and beyond. This also includes other patches,

including compatibility-related patches for the ARM64 kernel that make

ARMv7 binaries run properly under it.

BUG=17516983

Change-Id: I2f1c352b72ca6b254dbcb9732dee3c014867ae99

goldfish commit id是ea97df6

PS:如果用md5sum的方式,得到的arm的goldfish commit id也是ea97df6

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值