最終更新:2016-07-06 (水) 15:12:18 (1111d)  

lunch はてなブックマークを見る
Top / lunch

ビルドに関する各種個別情報を設定する envsetup.sh の関数

lunch <product_name>-<build_variant>

http://source.android.com/source/building.html

使い方

  • lunch <BUILD>-<BUILDTYPE> ;ビルドターゲットの指定
    make -j8 ;Androidのビルド
    • 例)lunch aosp_hammerhead-userdebug

定義場所

引数

  • lunch <product_name>-<build_variant>
    lunch aosp_hammerhead-userdebug

BUILD

  • ビルド名デバイス名メモ
    aosp_armARM emulatorAOSP, fully configured with all languages, apps, input methods
    aosp_maguromaguroAOSP, running on Galaxy Nexus GSM/HSPA+ ("maguro")
    aosp_pandapandaAOSP, running on PandaBoard ("panda")
  • mini_emulator
  • 昔の
    fullemulatorfully configured with all languages, apps, input methods
    full_maguromagurofull build running on Galaxy Nexus GSM/HSPA+ ("maguro")
    full_pandapandafull build running on PandaBoard ("panda")

BUILDTYPE

android-5.1.1_r1での選択肢

  • $ lunch
    You're building on Linux
    
    Lunch menu... pick a combo:
         1. aosp_arm-eng
         2. aosp_arm64-eng
         3. aosp_mips-eng
         4. aosp_mips64-eng
         5. aosp_x86-eng
         6. aosp_x86_64-eng
         7. aosp_hammerhead-userdebug
         8. aosp_mako-userdebug
         9. aosp_flounder-userdebug
         10. aosp_shamu-userdebug
         11. mini_emulator_mips-userdebug
         12. mini_emulator_arm64-userdebug
         13. mini_emulator_x86-userdebug
         14. mini_emulator_x86_64-userdebug
         15. m_e_arm-userdebug
         16. aosp_manta-userdebug
         17. aosp_flo-userdebug
         18. aosp_grouper-userdebug
         19. full_fugu-userdebug
         20. aosp_fugu-userdebug
         21. aosp_deb-userdebug
         22. aosp_tilapia-userdebug
    
    Which would you like? [aosp_arm-eng] aosp_flo-userdebug
    
    ============================================
    PLATFORM_VERSION_CODENAME=REL
    PLATFORM_VERSION=5.1.1
    TARGET_PRODUCT=aosp_flo
    TARGET_BUILD_VARIANT=userdebug
    TARGET_BUILD_TYPE=release
    TARGET_BUILD_APPS=
    TARGET_ARCH=arm
    TARGET_ARCH_VARIANT=armv7-a-neon
    TARGET_CPU_VARIANT=krait
    TARGET_2ND_ARCH=
    TARGET_2ND_ARCH_VARIANT=
    TARGET_2ND_CPU_VARIANT=
    HOST_ARCH=x86_64
    HOST_OS=linux
    HOST_OS_EXTRA=Linux-3.16.0-30-generic-x86_64-with-Ubuntu-14.04-trusty
    HOST_BUILD_TYPE=release
    BUILD_ID=LMY47V
    OUT_DIR=out
    ============================================

Nexus 5eng

  • user@user-VirtualBox:/media/user/AOSP-Build/android-5.1.1_r1$ lunch aosp_hammerhead-eng
    
    ============================================
    PLATFORM_VERSION_CODENAME=REL
    PLATFORM_VERSION=5.1.1
    TARGET_PRODUCT=aosp_hammerhead
    TARGET_BUILD_VARIANT=eng
    TARGET_BUILD_TYPE=release
    TARGET_BUILD_APPS=
    TARGET_ARCH=arm
    TARGET_ARCH_VARIANT=armv7-a-neon
    TARGET_CPU_VARIANT=krait
    TARGET_2ND_ARCH=
    TARGET_2ND_ARCH_VARIANT=
    TARGET_2ND_CPU_VARIANT=
    HOST_ARCH=x86_64
    HOST_OS=linux
    HOST_OS_EXTRA=Linux-3.16.0-30-generic-x86_64-with-Ubuntu-14.04-trusty
    HOST_BUILD_TYPE=release
    BUILD_ID=LMY47V
    OUT_DIR=out
    ============================================

昔の

  • full-eng
  • full_x86-eng
  • vbox_x86-eng
  • full_mips-eng
  • sdk-eng

Android/ビルドタイプ

eng

  • This is the default flavor. A plain "make" is the same as "make eng". droid is an alias for eng.
    • Installs modules tagged with: eng, debug, shell_$(TARGET_SHELL), user, and/or development.
    • Installs non-APK modules that have no tags specified.
    • Installs APKs according to the product definition files, in addition to tagged APKs.
    • ro.secure=0
    • ro.debuggable=1
    • ro.kernel.android.checkjni=1
    • adb is enabled by default.

user

  • "make user"
  • This is the flavor intended to be the final release bits.
    • Installs modules tagged with shell_$(TARGET_SHELL?) and user.
    • Installs non-APK modules that have no tags specified.
    • Installs APKs according to the product definition files; tags are ignored for APK modules.
    • ro.secure=1
    • ro.debuggable=0
    • adb is disabled by default.

userdebug

  • "make userdebug"
  • The same as user, except:
  • Also installs modules tagged with debug.
  • ro.debuggable=1
  • adb is enabled by default.

SDKのビルド

デバイス別の推奨オプション/ブランチ

export

設定

定義

  • function lunch()
    {
        local answer
    
        if [ "$1" ] ; then
            answer=$1
        else
            print_lunch_menu
            echo -n "Which would you like? [aosp_arm-eng] "
            read answer
        fi
    
        local selection=
    
        if [ -z "$answer" ]
        then
            selection=aosp_arm-eng
        elif (echo -n $answer | grep -q -e "^[0-9][0-9]*$")
        then
            if [ $answer -le ${#LUNCH_MENU_CHOICES[@]} ]
            then
                selection=${LUNCH_MENU_CHOICES[$(($answer-1))]}
            fi
        elif (echo -n $answer | grep -q -e "^[^\-][^\-]*-[^\-][^\-]*$")
        then
            selection=$answer
        fi
    
        if [ -z "$selection" ]
        then
            echo
            echo "Invalid lunch combo: $answer"
            return 1
        fi
    
        export TARGET_BUILD_APPS=
    
        local product=$(echo -n $selection | sed -e "s/-.*$//")
        check_product $product
        if [ $? -ne 0 ]
        then
            echo
            echo "** Don't have a product spec for: '$product'"
            echo "** Do you have the right repo manifest?"
            product=
        fi
    
        local variant=$(echo -n $selection | sed -e "s/^[^\-]*-//")
        check_variant $variant
        if [ $? -ne 0 ]
        then
            echo
            echo "** Invalid variant: '$variant'"
            echo "** Must be one of ${VARIANT_CHOICES[@]}"
            variant=
        fi
    
        if [ -z "$product" -o -z "$variant" ]
        then
            echo
            return 1
        fi
    
        export TARGET_PRODUCT=$product
        export TARGET_BUILD_VARIANT=$variant
        export TARGET_BUILD_TYPE=release
    
        echo
    
        set_stuff_for_environment
        printconfig
    }

関連

  • combosetup?