android服务端源码
‘壹’ 现在到哪获取android系统源代码
Android系统源码都在http://android.git.kernel.org/网址下,其中那个系统app都在platform/packages/apps结构下。
在刚才的Git的shell命名行窗口中输入下面的命名:
git clone git://android.git.kernel.org/platform/packages/apps/Luancher2.git
你就可以在你的msysGit安装目录的git下(~\msysgit\msysgit\git)看到Luancher工程文件夹了。
然后打开~\msysgit\msysgit\git\Luancher2文件夹,就可以看到Android的Luancher系统源码工程了。
对于其他的app系统源码的获取方法和上述的Luancher相同,只是命名行后的参数不同。
git clone git://android.git.kernel.org/需下载源码的app所在的位置。
‘贰’ 怎样查看 Android APP 源代码
需要把反编译的apk存放到apktools同级文件夹目录下,然后运行要查看的安装包,具体操作如下:
1、首先把反编译的apk存放到apktools同级文件夹目录下,如下图所示。
‘叁’ 如何获取android源代码
当前的Android代码托管在两个方:https://github.com/android 和https://android.googlesource.com之前在 android.git.kernel.org上也有托管,不过现在重定向到了https://android.googlesource.com好在都支持git访问。
google提供的repo工具实际上是一个内部操作git工具来简化操作Android源码的Python脚本。经过尝试,直接使用git工具在ubuntu下可以实现cloneAndroid源码。下面介绍一下方法:
1.获取当前的在github上托管的Androidgitrepositories:
github页面为:https://github.com/android/following。不过这个页面不支持通过wget"https://github.com/android/following"或者curl"https://github.com/android/following"的方式访问,错误信息如下:
这个时候需能做的只能是"tryagain"了。
需要说明的是"不要试图同时并发执行多个gitclone命令",这样会导致大量出现上面贴图中的错误,另外,整个clone过程中耗时最多的gitrepository如下:
kernel_common.gitkernel_msm.gitplatform_frameworks_base.gitplatform_prebuilt.git其中platform_prebuilt.git是google提供的预编译好的二进制文件,包含:各种库文件,jar包,可执行程序等等,如果只是阅读Android源代码,这个gitrepository可以不用clone.