<commit_before>DESCRIPTION = "Different utilities from Android"
SECTION = "console/utils"
LICENSE = "Apache-2.0 & GPL-2.0 & BSD-2-Clause & BSD-3-Clause"
LIC_FILES_CHKSUM = " \
    file://${COMMON_LICENSE_DIR}/Apache-2.0;md5=89aea4e17d99a7cacdbeed46a0096b10 \
    file://${COMMON_LICENSE_DIR}/GPL-2.0;md5=801f80980d171dd6425610833a22dbe6 \
    file://${COMMON_LICENSE_DIR}/BSD-2-Clause;md5=8bef8e6712b1be5aa76af1ebde9d6378 \
    file://${COMMON_LICENSE_DIR}/BSD-3-Clause;md5=550794465ba0ec5312d6919e203a55f9 \
"
DEPENDS = "libbsd libpcre openssl zlib libcap"

ANDROID_TAG = "android-5.1.1_r37"
ANDROID_MIRROR = "android.googlesource.com"
CORE_REPO = "${ANDROID_MIRROR}/platform/system/core"
EXTRAS_REPO = "${ANDROID_MIRROR}/platform/system/extras"
LIBHARDWARE_REPO = "${ANDROID_MIRROR}/platform/hardware/libhardware"
LIBSELINUX_REPO = "${ANDROID_MIRROR}/platform/external/libselinux"
BUILD_REPO = "${ANDROID_MIRROR}/platform/build"

SRC_URI = " \
    git://${CORE_REPO};name=core;protocol=https;nobranch=1;destsuffix=git/system/core;tag=${ANDROID_TAG} \
    git://${EXTRAS_REPO};name=extras;protocol=https;nobranch=1;destsuffix=git/system/extras;tag=${ANDROID_TAG} \
    git://${LIBHARDWARE_REPO};name=libhardware;protocol=https;nobranch=1;destsuffix=git/hardware/libhardware;tag=${ANDROID_TAG} \
    git://${LIBSELINUX_REPO};name=libselinux;protocol=https;nobranch=1;destsuffix=git/external/libselinux;tag=${ANDROID_TAG} \
    git://${BUILD_REPO};name=build;protocol=https;nobranch=1;destsuffix=git/build;tag=${ANDROID_TAG} \
    file://remove-selinux-android.patch \
    file://use-capability.patch \
    file://use-local-socket.patch \
    file://preserve-ownership.patch \
    file://mkbootimg-Add-dt-parameter-to-specify-DT-image.patch \
    file://remove-bionic-android.patch \
    file://define-shell-command.patch \
    file://implicit-declaration-function-strlcat-strlcopy.patch \
    file://fix-big-endian-build.patch \
    file://android-tools-adbd.service \
    file://.gitignore;subdir=git \
    file://adb.mk;subdir=${BPN} \
    file://adbd.mk;subdir=${BPN} \
    file://ext4_utils.mk;subdir=${BPN} \
    file://fastboot.mk;subdir=${BPN} \
    file://mkbootimg.mk;subdir=${BPN} \
"

S = "${WORKDIR}/git"
B = "${WORKDIR}/${BPN}"

# http://errors.yoctoproject.org/Errors/Details/133881/
ARM_INSTRUCTION_SET_armv4 = "arm"
ARM_INSTRUCTION_SET_armv5 = "arm"

inherit systemd

SYSTEMD_SERVICE_${PN} = "android-tools-adbd.service"
SYSTEMD_AUTO_ENABLE_${PN} = "disable"

# Get rid of files uneeded to build Android tools
do_unpack_extra() {
    cd ${S}
    rm -rf \
      system/core/.git \
      system/extras/.git \
      hardware/libhardware/.git \
      external/libselinux/.git \
      build/.git
    git init
    git add .
    git commit -m \
      "Initial import - committed ${ANDROID_TAG}"
    git clean -fdx
}<commit_msg>Imporve build failure problem for network connection timeout<commit_after>DESCRIPTION = "Different utilities from Android"
SECTION = "console/utils"
LICENSE = "Apache-2.0 & GPL-2.0 & BSD-2-Clause & BSD-3-Clause"
LIC_FILES_CHKSUM = " \
    file://${COMMON_LICENSE_DIR}/Apache-2.0;md5=89aea4e17d99a7cacdbeed46a0096b10 \
    file://${COMMON_LICENSE_DIR}/GPL-2.0;md5=801f80980d171dd6425610833a22dbe6 \
    file://${COMMON_LICENSE_DIR}/BSD-2-Clause;md5=8bef8e6712b1be5aa76af1ebde9d6378 \
    file://${COMMON_LICENSE_DIR}/BSD-3-Clause;md5=550794465ba0ec5312d6919e203a55f9 \
"
DEPENDS = "libbsd libpcre openssl zlib libcap"

ANDROID_TAG = "android-5.1.1_r37"
ANDROID_MIRROR = "android.googlesource.com"
CORE_REPO = "${ANDROID_MIRROR}/platform/system/core"
EXTRAS_REPO = "${ANDROID_MIRROR}/platform/system/extras"
LIBHARDWARE_REPO = "${ANDROID_MIRROR}/platform/hardware/libhardware"
LIBSELINUX_REPO = "${ANDROID_MIRROR}/platform/external/libselinux"
BUILD_REPO = "${ANDROID_MIRROR}/platform/build"

SRC_URI = " \
    git://${CORE_REPO};name=core;protocol=https;nobranch=1;destsuffix=git/system/core \
    git://${EXTRAS_REPO};name=extras;protocol=https;nobranch=1;destsuffix=git/system/extras \
    git://${LIBHARDWARE_REPO};name=libhardware;protocol=https;nobranch=1;destsuffix=git/hardware/libhardware \
    git://${LIBSELINUX_REPO};name=libselinux;protocol=https;nobranch=1;destsuffix=git/external/libselinux \
    git://${BUILD_REPO};name=build;protocol=https;nobranch=1;destsuffix=git/build \
    file://remove-selinux-android.patch \
    file://use-capability.patch \
    file://use-local-socket.patch \
    file://preserve-ownership.patch \
    file://mkbootimg-Add-dt-parameter-to-specify-DT-image.patch \
    file://remove-bionic-android.patch \
    file://define-shell-command.patch \
    file://implicit-declaration-function-strlcat-strlcopy.patch \
    file://fix-big-endian-build.patch \
    file://android-tools-adbd.service \
    file://.gitignore;subdir=git \
    file://adb.mk;subdir=${BPN} \
    file://adbd.mk;subdir=${BPN} \
    file://ext4_utils.mk;subdir=${BPN} \
    file://fastboot.mk;subdir=${BPN} \
    file://mkbootimg.mk;subdir=${BPN} \
"

SRCREV_core = "81df1cc77722000f8d0025c1ab00ced123aa573c"
SRCREV_extras = "8e9fa76016a34ec53b83157032e38fad06af1135"
SRCREV_libhardware = "64a2b7534486c509d0e13b91b12d52b42166080e"
SRCREV_libselinux = "6608a1875b07370733d0f93f3a52febcef3442bf"
SRCREV_build = "04f82d5e3692231eb8bfaa57712841bfd76daa12"

S = "${WORKDIR}/git"
B = "${WORKDIR}/${BPN}"

# http://errors.yoctoproject.org/Errors/Details/133881/
ARM_INSTRUCTION_SET_armv4 = "arm"
ARM_INSTRUCTION_SET_armv5 = "arm"

inherit systemd

SYSTEMD_SERVICE_${PN} = "android-tools-adbd.service"
SYSTEMD_AUTO_ENABLE_${PN} = "disable"

# Get rid of files uneeded to build Android tools
do_unpack_extra() {
    cd ${S}
    rm -rf \
      system/core/.git \
      system/extras/.git \
      hardware/libhardware/.git \
      external/libselinux/.git \
      build/.git
    git init
    git add .
    git commit -m \
      "Initial import - committed ${ANDROID_TAG}"
    git clean -fdx
}
{'fraction_non_alphanumeric': 0.15558555518056025, 'fraction_numerical': 0.061255484306446166, 'mean_word_length': 4.330035971223022, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3403140', 'n_tokens_mistral': 2581, 'n_tokens_neox': 2398, 'n_words': 231}