Android车机DIY开发之软件篇(八)单独编译
1.CarLauncher单独编译
CarLauncher源码位于 packages/apps/Car/Launcher
用Eclipse ADT 谷歌定制版编译而成,.mk .bp编译
Android13目录如下:
bash
alientek@alientek:~/packages/apps/Car$ ls
Calendar LatinIME MessengerPrebuilt Settings
Cluster ***Launcher*** Notification SettingsIntelligence
DebuggingRestrictionController LinkViewer Provision systemlibs
DialerPrebuilt LocalMediaPlayer Radio SystemUI
Hvac MediaPrebuilt RotaryController SystemUpdater
SubLime或者Android Studio打开编译同步Launcher可以看到代码:
AndroidManifest.xml 是车载launch入口
android:name=".CarLauncher"
CarLauncher.java
####1.在根目录执行,再进Launcher执行
bash
source build/envsetup.sh
cd packages/apps/Car/Launcher
~/packages/apps/Car/Launcher$ mm
####2.在根目录全编
bash
source build/envsetup.sh
lunch
74
make -j5
####3.启动模拟器
2.Framework单独编译,时间很长
修改屏幕方向后模拟器无法启动log
WARNING | *** No gRPC protection active, consider launching with the -grpc-use-jwt flag. **
INFO | Started GRPC server at 127.0.0.1:8554, security: Local, auth: none
INFO | Advertising in: /run/user/1000/avd/running/pid_1968051.ini
INFO | Setting display: 0 configuration to: 1080x600, dpi: 120x120*
####1.在根目录执行,再进Launcher执行
bash
source build/envsetup.sh
cd frameworks/base
~/frameworks/base$ mm
####2.在根目录全编
bash
source build/envsetup.sh
lunch
74
make -j5
####3.启动模拟器