This section highlights few useful commands tools for developing android and Linux BSP.
Build commands in Android source
Before this you need to set up the AOSP built setup.To set up your build environment, you need to load the variables and functions in build/envsetup.sh
To build entire Android image
# make -j4
In the above, the -j4 is used to execute 4 make sessions that run in parallel. Depends on your built machine you can use 2,4,8
To build all the modules in the current working directory
To build all the modules in the given working directory
# mmm <path to package>
# mmm packages/apps/Camera2/
//This will give Camera2.apk, so can copy this into device, using adb push <sour> <des> and reboot the device. For more details about adb tools refer below section.
To change the directory to the top of the tree
To edit a git last committed message
# git commit --amend
To show git log history along with full details
# git log -p
Grep and tree commands
To search a string in current directory recursive,ignore-case, along with line number
# grep -rin "string" ./
To find a file name and display the results it in tree pattern.
#tree | grep <search string>
To find a file name and display the results it in tree pattern along with full path
# tree -f | grep <search string>
You need to install tree package if not installed.
# sudo apt-get install tree