Where do I find the version information in source files on Android platform?
I tried to find out some information listed in setting >> about phone. Some of the displayed information is, firmware version, module number, bas开发者_运维问答eband version, kernel version, ...
You can give it check in platform\build\core\version_defaults.mk
For cyanogen, the source for this file is https://github.com/CyanogenMod/android_packages_apps_Settings/blob/cm-10.2/src/com/android/settings/DeviceInfoSettings.java , it looks like https://android.googlesource.com/platform/packages/apps/Settings/+/master/src/com/android/settings/DeviceInfoSettings.java is the equivalent in AOSP.
From those files, it looks like most of those values are constants or in the preferences, while the kernel is read from /proc/version
.
First, the android kernel source code is divided from the main android source code.
The Android version
is the build version. It is found in build/make/core/build_id.mk
in the aosp android source (https://source.android.com/setup/build/downloading).
The Kernel version
is in the top level Makefile
of the android kernel source code (https://source.android.com/setup/build/building-kernels-deprecated)
精彩评论