拉代码、上库、编译等
1.代码下载
拉仓
从远程主机拉取分支初始化仓库:
repo init -u [远程仓库地址] -b [分支] -m [.xml文件名] --no-repo-verify
下载该仓库下所有代码
repo sync
查看该project有哪些仓库
vim .repo/project.list
下载单个仓库
repo sync [仓名] --no-tags -c -j16
代码更新
repo sync --no-tags -c -f -j8
2.代码修改
分支操作
首先需要找到包含有.git文件的目录
新建分支
repo start [分支名] [代码路径,可省略]
或者
repo start [分支名] --all
查看分支
git branch -a
切换分支
git checkout [分支名]
删除分支
git branch -D [分支名]
查看历史修改
git status
对比历史修改
git diff
添加到缓存区
git add
代码回退(撤销全部修改)
git reset --hard
撤销对单个文件的修改
git checkout -- [文件名]
3.代码上库
提交代码
git commit
填写完成后ctrl+O
,enter
,ctrl+X
修改commit message
git commit --amend
上库
git push origin HEAD:refs/for/[远程分支名]
或
repo upload .
代码回退(修改不在)
git reset --hard [远程分支/commit号]
提交回退(修改的还在)
git reset HEAD~1
有关git的其他命令
可参考https://edu.youkuaiyun.com/skill/git/git-62c30f9c31f64a1d96af732c47c93f04?category=1413
4.编译
所有android编译的流程都主要依靠以下几步完成:
source []
lunch [number]
make []
AP侧
编译命令
export LC_ALL=C
source build/envsetup.sh
lunch
make [dtboimage\bootimage\pl\sensors.ssc.so]
具体编译什么,看最近的Android.mk文件的LOCAL_MODULE
编译后的文件路径会在编译结束时显示
编译生成的文件位置
编译生成文件:
/out/target/product/objname/vendor/lib/sensors.ssc.so
手机中文件位置:
/vendor/lib/sensors.ssc.so
仅供参考
ADSP侧(modem侧/BP侧 sensor编译)
编译命令
ecport BUILD_FOR_OBJNAME=YES
./build_modem.sh build adsp
或者
ecport BUILD_FOR_OBJNAME=YES
./build_modem_objname.sh adsp
编译生成的文件位置
编译生成文件:
/qcom/sdm429w-law-1-0_amss_standard_oem/adsp_proc/obj/439/LA/system/etc/firmware/
手机中文件位置:
firmware/image/