The first thing that comes to the android source directory is probably to execute. Build/envsetup. Sh first to initialize some commands. Today, we mainly analyze envsetup. Sh.
1. The command-that is, the function in envsetup. Sh
Function help () # display help information
Function get_abs_build_var () # obtain Absolute Variables
Function get_build_var () # obtain Absolute Variables
Function check_product () # Check Product
Function check_variant () # Check Variables
Function setpaths () # Set the file path
Function printconfig () # print the configuration
Function set_stuff_for_environment () # Set Environment Variables
Function set_sequence_number () # Set the serial number
Function settitle () # Set the title
Function choosetype () # Set Type
Function chooseproduct () # Set Product
Function choosevariant () # Set Variant
Function tapas () # functions the same as choosecombo
Function choosecombo () # Set compilation Parameters
Function add_lunch_combo () # Add a lunch project
Function print_lunch_menu () # print the lunch list
Function lunch () # configure lunch
Function M () # make from top
Function findmakefile () # Find makefile
Function mm () # make from current directory
Function Mmm () # Make the supplied Directories
Function Croot () # Return to the root directory
Function cproj ()
Function PID ()
Function systemstack ()
Function gdbclient ()
Function jgrep () # Find a Java File
Function cgrep () # Find the C/CPP File
Function resgrep ()
Function tracedmdump ()
Function runhat ()
Function getbugreports ()
Function startviewserver ()
Function stopviewserver ()
Function isviewserverstarted ()
Function smoketest ()
Function runtest ()
Function godir () # Jump to the specified directory
# Add the default one here
Add_lunch_combo generic-Eng
# Execute the contents of any vendorsetup. Sh files we can find.
For f in '/bin/ls vendor/*/vendorsetup. Sh vendor/*/build/vendorsetup. Sh 2>/dev/null'
Do
Echo "including $ F"
. $ F
Done
2. Lunch command
Someone has analyzed it and moved it directly:
Http://www.lupaworld.com/home.php? MoD = Space & uid = 131820 & Do = Blog & id = 149462
Here we will talk about the check_product process:
To be continued
3. choosecombo
To be continued