Android代码量非常庞大,经常只需要编译修改过的一部分代码,例如放在external目录下的,这时候可以使用mm等命令,但是问题是默认情况下是按照generic的配置来编译的,这样生成的elf在目标板上无法运行。这时候需要修改默认配置。
root@jerry-desktop:/home/jerry/sandbox/myandroid# . build/envsetup.sh <- 注意这里是个点加空格
including device/fsl/imx5x/vendorsetup.sh
root@jerry-desktop:/home/jerry/sandbox/myandroid# choosecombo
Build for the simulator or the device?
1. Device
2. Simulator
Which would you like? [1]
Build type choices are:
1. release
2. debug
Which would you like? [1]
Which product would you like? [generic] 这里输入你的配置名
Variant choices are:
1. user
2. userdebug
3. eng
Which would you like? [eng]