Skip to content

Commit a850415

Browse files
committed
update to platform tools 33.0.3
0 parents  commit a850415

File tree

141 files changed

+35098
-0
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

141 files changed

+35098
-0
lines changed

.gitignore

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
CMakeCache.txt
2+
CMakeFiles
3+
CMakeScripts
4+
Testing
5+
Makefile
6+
cmake_install.cmake
7+
install_manifest.txt
8+
compile_commands.json
9+
CTestTestfile.cmake
10+
build
11+
pack
12+
13+
src/libziparchive/cli-tests
14+
src/libziparchive/testdata
15+
src/zipalign/tests/data
16+
17+
**/*.zip
18+
**/*.apk

.gitmodules

Lines changed: 140 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,140 @@
1+
[submodule "src/core"]
2+
shallow = true
3+
path = src/core
4+
url = https://android.googlesource.com/platform/system/core.git
5+
[submodule "src/extras"]
6+
shallow = true
7+
path = src/extras
8+
url = https://android.googlesource.com/platform/system/extras.git
9+
[submodule "src/selinux"]
10+
shallow = true
11+
path = src/selinux
12+
url = https://android.googlesource.com/platform/external/selinux.git
13+
[submodule "src/f2fs-tools"]
14+
shallow = true
15+
path = src/f2fs-tools
16+
url = https://android.googlesource.com/platform/external/f2fs-tools.git
17+
[submodule "src/e2fsprogs"]
18+
shallow = true
19+
path = src/e2fsprogs
20+
url = https://android.googlesource.com/platform/external/e2fsprogs.git
21+
[submodule "src/boringssl"]
22+
shallow = true
23+
path = src/boringssl
24+
url = https://android.googlesource.com/platform/external/boringssl
25+
[submodule "src/mkbootimg"]
26+
shallow = true
27+
path = src/mkbootimg
28+
url = https://android.googlesource.com/platform/system/tools/mkbootimg
29+
[submodule "src/avb"]
30+
shallow = true
31+
path = src/avb
32+
url = https://android.googlesource.com/platform/external/avb
33+
[submodule "src/libbase"]
34+
shallow = true
35+
path = src/libbase
36+
url = https://android.googlesource.com/platform/system/libbase
37+
[submodule "src/base"]
38+
shallow = true
39+
path = src/base
40+
url = https://android.googlesource.com/platform/frameworks/base
41+
[submodule "src/native"]
42+
shallow = true
43+
path = src/native
44+
url = https://android.googlesource.com/platform/frameworks/native
45+
[submodule "src/adb"]
46+
shallow = true
47+
path = src/adb
48+
url = https://android.googlesource.com/platform/packages/modules/adb.git
49+
[submodule "src/logging"]
50+
shallow = true
51+
path = src/logging
52+
url = https://android.googlesource.com/platform/system/logging.git
53+
[submodule "src/incremental_delivery"]
54+
shallow = true
55+
path = src/incremental_delivery
56+
url = https://android.googlesource.com/platform/system/incremental_delivery
57+
[submodule "src/fmtlib"]
58+
shallow = true
59+
path = src/fmtlib
60+
url = https://android.googlesource.com/platform/external/fmtlib.git
61+
[submodule "src/pcre"]
62+
shallow = true
63+
path = src/pcre
64+
url = https://android.googlesource.com/platform/external/pcre.git
65+
[submodule "src/libpng"]
66+
shallow = true
67+
path = src/libpng
68+
url = https://android.googlesource.com/platform/external/libpng.git
69+
[submodule "src/expat"]
70+
shallow = true
71+
path = src/expat
72+
url = https://android.googlesource.com/platform/external/expat.git
73+
[submodule "src/protobuf"]
74+
shallow = true
75+
path = src/protobuf
76+
url = https://android.googlesource.com/platform/external/protobuf.git
77+
[submodule "src/aidl"]
78+
shallow = true
79+
path = src/aidl
80+
url = https://android.googlesource.com/platform/system/tools/aidl
81+
[submodule "src/unwinding"]
82+
shallow = true
83+
path = src/unwinding
84+
url = https://android.googlesource.com/platform/system/unwinding
85+
[submodule "src/zopfli"]
86+
shallow = true
87+
path = src/zopfli
88+
url = https://android.googlesource.com/platform/external/zopfli
89+
[submodule "src/jsoncpp"]
90+
shallow = true
91+
path = src/jsoncpp
92+
url = https://android.googlesource.com/platform/external/jsoncpp
93+
[submodule "jsoncpp"]
94+
shallow = true
95+
path = jsoncpp
96+
url = https://android.googlesource.com/platform/external/jsoncpp
97+
[submodule "src/art"]
98+
shallow = true
99+
path = src/art
100+
url = https://android.googlesource.com/platform/art
101+
[submodule "src/dalvik"]
102+
shallow = true
103+
path = src/dalvik
104+
url = https://android.googlesource.com/platform/dalvik
105+
[submodule "src/sqlite"]
106+
shallow = true
107+
path = src/sqlite
108+
url = https://android.googlesource.com/platform/external/sqlite
109+
[submodule "src/lz4"]
110+
shallow = true
111+
path = src/lz4
112+
url = https://android.googlesource.com/platform/external/lz4
113+
[submodule "src/zstd"]
114+
shallow = true
115+
path = src/zstd
116+
url = https://android.googlesource.com/platform/external/zstd
117+
[submodule "src/libusb"]
118+
shallow = true
119+
path = src/libusb
120+
url = https://android.googlesource.com/platform/external/libusb
121+
[submodule "src/brotli"]
122+
shallow = true
123+
path = src/brotli
124+
url = https://android.googlesource.com/platform/external/brotli
125+
[submodule "src/mdnsresponder"]
126+
shallow = true
127+
path = src/mdnsresponder
128+
url = https://android.googlesource.com/platform/external/mdnsresponder
129+
[submodule "src/abseil-cpp"]
130+
shallow = true
131+
path = src/abseil-cpp
132+
url = https://android.googlesource.com/platform/external/abseil-cpp
133+
[submodule "src/openscreen"]
134+
shallow = true
135+
path = src/openscreen
136+
url = https://android.googlesource.com/platform/external/openscreen
137+
[submodule "src/googletest"]
138+
shallow = true
139+
path = src/googletest
140+
url = https://android.googlesource.com/platform/external/googletest

CMakeLists.txt

Lines changed: 101 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,101 @@
1+
#
2+
# Copyright © 2022 Github Lzhiyong
3+
#
4+
# Licensed under the Apache License, Version 2.0 (the "License");
5+
# you may not use this file except in compliance with the License.
6+
# You may obtain a copy of the License at
7+
#
8+
# http://www.apache.org/licenses/LICENSE-2.0
9+
#
10+
# Unless required by applicable law or agreed to in writing, software
11+
# distributed under the License is distributed on an "AS IS" BASIS,
12+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
# See the License for the specific language governing permissions and
14+
# limitations under the License.
15+
#
16+
17+
cmake_minimum_required(VERSION 3.14.2)
18+
project(sdk-tools)
19+
20+
enable_language(ASM)
21+
22+
# set global cflags and cxxflags
23+
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fcolor-diagnostics -fPIC -Wno-attributes -std=gnu11")
24+
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fcolor-diagnostics -fPIC -Wno-attributes -std=gnu++2a")
25+
# static link
26+
set(CMAKE_EXE_LINKER_FLAGS "-static")
27+
28+
# platform tools version
29+
# see the patches/other/platform_tools_version.h
30+
set(TOOLS_VERSION 33.0.3)
31+
set(SRC ${PROJECT_SOURCE_DIR}/src)
32+
33+
# 64-bit off_t for lseek.
34+
add_definitions(-D_FILE_OFFSET_BITS=64)
35+
36+
set(PROTOC_COMPILER)
37+
38+
if(DEFINED PROTOC_PATH)
39+
set(PROTOC_COMPILER ${PROTOC_PATH})
40+
41+
if(NOT EXISTS ${PROTOC_COMPILER})
42+
unset(PROTOC_PATH CACHE)
43+
message(FATAL_ERROR "Invalid protoc: ${PROTOC_COMPILER}, please check if the path is correct")
44+
endif()
45+
46+
# check protoc version
47+
execute_process(
48+
COMMAND ${PROTOC_COMPILER} --version
49+
OUTPUT_VARIABLE PTOTOBUF_VERSION
50+
WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}
51+
)
52+
53+
if(NOT PTOTOBUF_VERSION MATCHES "^libprotoc*")
54+
unset(PROTOC_PATH CACHE)
55+
message(FATAL_ERROR "Invalid protoc: ${PROTOC_COMPILER}, this may not be an executable")
56+
endif()
57+
58+
string(REGEX MATCH "([0-9]+)\\.([0-9]+)\\.([0-9]+)" VERSIONS ${PTOTOBUF_VERSION})
59+
# please note that if the protobuf version is too high, you may encounter the following error
60+
# error: This file was generated by a newer version of protoc
61+
if(VERSIONS VERSION_GREATER "3.9.1")
62+
message(WARNING "${PTOTOBUF_VERSION}, the protobuf version is too high, may be incompatible!!")
63+
endif()
64+
endif()
65+
66+
# thrid-party libraries
67+
add_subdirectory(src/boringssl/src EXCLUDE_FROM_ALL)
68+
add_subdirectory(src/fmtlib EXCLUDE_FROM_ALL)
69+
add_subdirectory(src/pcre EXCLUDE_FROM_ALL)
70+
add_subdirectory(src/libpng EXCLUDE_FROM_ALL)
71+
add_subdirectory(src/expat EXCLUDE_FROM_ALL)
72+
add_subdirectory(src/zopfli EXCLUDE_FROM_ALL)
73+
add_subdirectory(src/jsoncpp EXCLUDE_FROM_ALL)
74+
add_subdirectory(src/zstd/build/cmake EXCLUDE_FROM_ALL)
75+
add_subdirectory(src/lz4/build/cmake EXCLUDE_FROM_ALL)
76+
add_subdirectory(src/brotli EXCLUDE_FROM_ALL)
77+
add_subdirectory(src/abseil-cpp EXCLUDE_FROM_ALL)
78+
add_subdirectory(src/protobuf/cmake EXCLUDE_FROM_ALL)
79+
80+
# building sdk-tools
81+
add_subdirectory(lib)
82+
add_subdirectory(build-tools)
83+
add_subdirectory(platform-tools)
84+
85+
# creating source tarballs
86+
set(CPACK_PACKAGE_DIRECTORY ${PROJECT_SOURCE_DIR}/pack)
87+
set(CPACK_RESOURCE_FILE_LICENSE "${PROJECT_SOURCE_DIR}/LICENSE.txt")
88+
set(CPACK_SOURCE_GENERATOR "TXZ")
89+
set(CPACK_SOURCE_PACKAGE_FILE_NAME "${PROJECT_NAME}-${TOOLS_VERSION}")
90+
set(CPACK_SOURCE_IGNORE_FILES
91+
${PROJECT_SOURCE_DIR}/.git
92+
${PROJECT_SOURCE_DIR}/.gitignore
93+
${PROJECT_SOURCE_DIR}/.gitmodules
94+
${PROJECT_SOURCE_DIR}/get_source.py
95+
${PROJECT_SOURCE_DIR}/build
96+
${PROJECT_SOURCE_DIR}/patches
97+
${PROJECT_SOURCE_DIR}/pack
98+
)
99+
100+
include(CPack)
101+

0 commit comments

Comments
 (0)