Skip to content

Commit 4c81208

Browse files
authored
36.0.0
2 parents 702aac2 + ba461a2 commit 4c81208

File tree

18 files changed

+412
-177
lines changed

18 files changed

+412
-177
lines changed

.github/workflows/build.yml

Lines changed: 13 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ jobs:
2929
- name: Setup Zig
3030
uses: mlugg/setup-zig@v2.0.5
3131
with:
32-
version: 0.14.1
32+
version: 0.15.1
3333
use-cache: false
3434

3535
- name: Setup Zig Toolchain
@@ -39,7 +39,7 @@ jobs:
3939
cp -R ${PWD}/patches/zig/* $(whereis zig | awk '{print $2}' | xargs dirname)
4040
4141
- name: Get Sources
42-
run: sed -i 's/"35\.0\.2"/"${{ inputs.version }}"/g' ${PWD}/CMakeLists.txt ${PWD}/patches/misc/platform_tools_version.h && python get_source.py --tags "${{ inputs.tag }}"
42+
run: python get_source.py --tags "${{ inputs.tag }}"
4343

4444
- name: Install Dependencies
4545
run: sudo apt update && sudo apt install -y ninja-build autogen autoconf autoconf-archive m4 libtool build-essential
@@ -116,6 +116,9 @@ jobs:
116116
#define __BEGIN_DECLS\
117117
#define __END_DECLS\
118118
#endif\
119+
#endif\
120+
#ifndef __INTRODUCED_IN\
121+
#define __INTRODUCED_IN(version)\
119122
#endif' {} +
120123
121124
sed -i 's/__BEGIN_DECLS/#ifdef __cplusplus\nextern "C" {\n#endif/g; s/__END_DECLS/#ifdef __cplusplus\n}\n#endif/g' ${PWD}/src/core/libpackagelistparser/include/packagelistparser/packagelistparser.h
@@ -186,7 +189,6 @@ jobs:
186189
#define ART_FRAME_SIZE_LIMIT 10000' ${PWD}/src/art/libartbase/arch/instruction_set.h
187190
188191
sed -i '/#include "os.h"/a #include <sys/cachectl.h>' ${PWD}/src/art/libartbase/base/utils.cc
189-
190192
sed -i '/int r = cacheflush(start, limit, kCacheFlushFlags);/{
191193
s/.*/#if defined(__arm__) \&\& !defined(__aarch64__)\
192194
\
@@ -197,6 +199,10 @@ jobs:
197199
int r = cacheflush(start, limit, kCacheFlushFlags);\
198200
#endif/
199201
}' ${PWD}/src/art/libartbase/base/utils.cc
202+
sed -i '/FlushCpuCaches/,/}/ {
203+
/^[[:space:]]*__builtin___clear_cache[[:space:]]*(/i #if !defined(__s390x__) && !defined(__ppc__)
204+
/^[[:space:]]*__builtin___clear_cache[[:space:]]*(/a #endif
205+
}' ${PWD}/src/art/libartbase/base/utils.cc
200206
201207
sed -i '/#if __has_feature(cxx_exceptions)/,/^#endif/ c\using Task = std::packaged_task<void()>;' ${PWD}/src/openscreen/platform/api/task_runner.h
202208
@@ -234,6 +240,10 @@ jobs:
234240
sed -i 's/ \/\/__INSERT_HERE__//' ${PWD}/src/art/libdexfile/dex/dex_file.cc
235241
236242
sed -i "s/SOONG BUILD NUMBER PLACEHOLDER/$(date +%y%m%d%H%M%S)/" ${PWD}/src/soong/cc/libbuildversion/libbuildversion.cpp
243+
sed -i 's/set(CMAKE_CXX_STANDARD *14)/set(CMAKE_CXX_STANDARD 17)/' src/boringssl/CMakeLists.txt
244+
sed -i '/packLocale/s/constexpr //;/packScript/s/constexpr //' src/base/libs/androidfw/include/androidfw/LocaleDataLookup.h
245+
sed -i '/utf8.resize_and_overwrite/{N;N;N; s/utf8.resize_and_overwrite(utf8_length,.*{[^}]*});/utf8.resize(utf8_length);\n utf16_to_utf8(utf16.data(), utf16.length(), utf8.data(), utf8_length + 1);/}' src/base/libs/androidfw/Util.cpp
246+
sed -i 's/libusb::usb_init();/usb_init();/g' ${PWD}/src/adb/client/main.cpp
237247
238248
- name: Build Android SDK
239249
shell: bash

.github/workflows/make_sdk.yml

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -7,11 +7,11 @@ on:
77
version:
88
description: "Platform Tools Version"
99
required: true
10-
default: "35.0.2"
10+
default: "36.0.0"
1111
tag:
1212
description: "Android Source Tag"
1313
required: true
14-
default: "platform-tools-35.0.2"
14+
default: "android-16.0.0_r2"
1515

1616
permissions:
1717
contents: write
@@ -104,7 +104,7 @@ jobs:
104104

105105
- name: Setup Host Android SDK
106106
run: |
107-
export BUILD_TOOLS_VERSION="35.0.0"
107+
export BUILD_TOOLS_VERSION="36.1.0"
108108
echo BUILD_TOOLS_VERSION=${BUILD_TOOLS_VERSION} >> $GITHUB_ENV
109109
mkdir android-sdk
110110
cd android-sdk
@@ -119,7 +119,7 @@ jobs:
119119
HOST_SDK="${PWD}/android-sdk"
120120
BUILT_SDK="${PWD}/build-${{ matrix.target_triple }}"
121121
122-
find "${HOST_SDK}/build-tools/$BUILD_TOOLS_VERSION"" -type f | while IFS= read -r file; do
122+
find "${HOST_SDK}/build-tools/$BUILD_TOOLS_VERSION" -type f | while IFS= read -r file; do
123123
bname="$(basename "${file}")"
124124
if [ -f "${BUILT_SDK}/${bname}" ] && file "${file}" | grep -q 'ELF'; then
125125
echo "Replacing ${bname}"
@@ -137,7 +137,7 @@ jobs:
137137
138138
rm -rf ${HOST_SDK}/build-tools/$BUILD_TOOLS_VERSION/lib64
139139
rm -rf ${HOST_SDK}/platform-tools/lib64
140-
rm -rf ${HOST_SDK}/build-tools/$BUILD_TOOLS_VERSION"/*-ld ${HOST_SDK}/build-tools/$BUILD_TOOLS_VERSION/lld* ${HOST_SDK}/build-tools/$BUILD_TOOLS_VERSION/llvm-rs-cc ${HOST_SDK}/build-tools/$BUILD_TOOLS_VERSION/bcc_compat ${HOST_SDK}/build-tools/$BUILD_TOOLS_VERSION/renderscript
140+
rm -rf ${HOST_SDK}/build-tools/$BUILD_TOOLS_VERSION/*-ld ${HOST_SDK}/build-tools/$BUILD_TOOLS_VERSION/lld* ${HOST_SDK}/build-tools/$BUILD_TOOLS_VERSION/llvm-rs-cc ${HOST_SDK}/build-tools/$BUILD_TOOLS_VERSION/bcc_compat ${HOST_SDK}/build-tools/$BUILD_TOOLS_VERSION/renderscript
141141
sed -i -e '1s|^#!.*bash|#!/bin/sh|' \
142142
-e 's/^declare -a javaOpts=()/javaOpts=""/' \
143143
-e 's/javaOpts+=("-\${opt}")/javaOpts="\$javaOpts -\${opt}"/' \
@@ -176,3 +176,4 @@ jobs:
176176
allowUpdates: true
177177
replacesArtifacts: true
178178
body: ''
179+

CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ set(CMAKE_EXE_LINKER_FLAGS "-static")
2828

2929
# platform tools version
3030
# see the patches/other/platform_tools_version.h
31-
set(TOOLS_VERSION "35.0.2")
31+
set(TOOLS_VERSION "36.0.0")
3232
set(SRC ${PROJECT_SOURCE_DIR}/src)
3333

3434
# 64-bit off_t for lseek.

build-tools/aapt2.cmake

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -123,6 +123,8 @@ add_library(libaapt2 STATIC
123123
${SRC}/base/tools/aapt2/io/ZipArchive.cpp
124124
${SRC}/base/tools/aapt2/link/AutoVersioner.cpp
125125
${SRC}/base/tools/aapt2/link/FeatureFlagsFilter.cpp
126+
${SRC}/base/tools/aapt2/link/FlagDisabledResourceRemover.cpp
127+
${SRC}/base/tools/aapt2/link/FlaggedXmlVersioner.cpp
126128
${SRC}/base/tools/aapt2/link/ManifestFixer.cpp
127129
${SRC}/base/tools/aapt2/link/NoDefaultResourceRemover.cpp
128130
${SRC}/base/tools/aapt2/link/PrivateAttributeMover.cpp

build-tools/aidl.cmake

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -87,6 +87,7 @@ target_include_directories(aidl PRIVATE
8787
${SRC}/libbase/include
8888
${SRC}/fmtlib/include
8989
${SRC}/googletest/googletest/include
90+
${SRC}/aidl/include
9091
)
9192

9293
target_link_libraries(aidl

build-tools/dexdump.cmake

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,7 @@ add_library(libartbase STATIC
5858
${SRC}/art/libartbase/base/zip_archive.cc
5959
${SRC}/art/libartbase/base/globals_unix.cc
6060
${SRC}/art/libartbase/base/mem_map_unix.cc
61+
${SRC}/faked_functions.cpp
6162
)
6263
target_include_directories(libartbase PRIVATE ${INCLUDES})
6364

@@ -102,6 +103,7 @@ target_link_libraries(dexdump
102103
libziparchive
103104
liblog
104105
dl
106+
fmt::fmt
105107
${CMAKE_PREFIX_PATH}/lib/libz.a
106108
)
107109

get_source.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -70,6 +70,8 @@ def patches():
7070
shutil.copy2(Path("patches/misc/getrandom_fillin.h"), Path("src/boringssl/src/crypto/fipsmodule/rand/getrandom_fillin.h"));
7171

7272
shutil.copy2(Path("patches/misc/unscaledcycleclock.cc"), Path("src/abseil-cpp/absl/base/internal/unscaledcycleclock.cc"));
73+
74+
shutil.copy2(Path("patches/misc/CombinedIterator.h"), Path("src/base/libs/androidfw/include/androidfw/CombinedIterator.h"));
7375

7476
pattern = "\'s#frameworks/base/tools/aapt2/Configuration.proto#Configuration.proto#g\'"
7577
pattern2 = "\'s#frameworks/base/tools/aapt2/Resources.proto#Resources.proto#g\'"

include/sys/_system_properties.h

Lines changed: 0 additions & 124 deletions
Original file line numberDiff line numberDiff line change
@@ -1,125 +1 @@
1-
/*
2-
* Copyright (C) 2008 The Android Open Source Project
3-
* All rights reserved.
4-
*
5-
* Redistribution and use in source and binary forms, with or without
6-
* modification, are permitted provided that the following conditions
7-
* are met:
8-
* * Redistributions of source code must retain the above copyright
9-
* notice, this list of conditions and the following disclaimer.
10-
* * Redistributions in binary form must reproduce the above copyright
11-
* notice, this list of conditions and the following disclaimer in
12-
* the documentation and/or other materials provided with the
13-
* distribution.
14-
*
15-
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
16-
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
17-
* THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
18-
* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
19-
* FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
20-
* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
21-
* OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
22-
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
23-
* NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
24-
* EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
25-
*/
26-
27-
#ifndef _INCLUDE_SYS__SYSTEM_PROPERTIES_H
28-
#define _INCLUDE_SYS__SYSTEM_PROPERTIES_H
29-
30-
#include <stdint.h>
31-
32-
#ifndef _REALLY_INCLUDE_SYS__SYSTEM_PROPERTIES_H_
33-
#error "You should #include <sys/system_properties.h> instead."
34-
#endif
35-
361
#include <sys/system_properties.h>
37-
38-
#ifdef __cplusplus
39-
extern "C" {
40-
#endif
41-
42-
#define PROP_SERVICE_NAME "property_service"
43-
#define PROP_FILENAME "/dev/__properties__"
44-
45-
#define PROP_MSG_SETPROP 1
46-
#define PROP_MSG_SETPROP2 0x00020001
47-
48-
#define PROP_SUCCESS 0
49-
#define PROP_ERROR_READ_CMD 0x0004
50-
#define PROP_ERROR_READ_DATA 0x0008
51-
#define PROP_ERROR_READ_ONLY_PROPERTY 0x000B
52-
#define PROP_ERROR_INVALID_NAME 0x0010
53-
#define PROP_ERROR_INVALID_VALUE 0x0014
54-
#define PROP_ERROR_PERMISSION_DENIED 0x0018
55-
#define PROP_ERROR_INVALID_CMD 0x001B
56-
#define PROP_ERROR_HANDLE_CONTROL_MESSAGE 0x0020
57-
#define PROP_ERROR_SET_FAILED 0x0024
58-
59-
/**
60-
* This was previously for testing, but now that SystemProperties is its own
61-
* testable class, there is never a reason to call this function and its
62-
* implementation simply returns -1.
63-
*/
64-
int __system_property_set_filename(const char* __filename);
65-
66-
/**
67-
* Initialize the area to be used to store properties. Can only be done by a
68-
* single process that has write access to the property area.
69-
*/
70-
int __system_property_area_init(void);
71-
72-
/**
73-
* Read the global serial number of the system properties.
74-
*
75-
* Called to predict if a series of cached __system_property_find objects will
76-
* have seen __system_property_serial values change. Also helps determine if a
77-
* failed __system_property_find could now find a new object.
78-
*
79-
* Returns the serial number on success, -1 on error.
80-
*/
81-
uint32_t __system_property_area_serial(void);
82-
83-
/**
84-
* Add a new system property. Can only be done by a single process with write
85-
* access to the property area, ensuring the property does not already exist.
86-
*
87-
* Returns 0 on success, -1 if the property area is full.
88-
*/
89-
int __system_property_add(const char* __name, unsigned int __name_length,
90-
const char* __value, unsigned int __value_length);
91-
92-
/**
93-
* Update the value of a system property returned by __system_property_find.
94-
* Can only be done by a single process with write access to the property area.
95-
*
96-
* Returns 0 on success, -1 if the parameters are incorrect.
97-
*/
98-
int __system_property_update(prop_info* __pi, const char* __value,
99-
unsigned int __value_length);
100-
101-
/**
102-
* Read the serial number of a system property returned by __system_property_find.
103-
*
104-
* Returns the serial number on success, -1 on error.
105-
*/
106-
uint32_t __system_property_serial(const prop_info* __pi);
107-
108-
/**
109-
* Initialize the system properties area in read-only mode. Should be done by
110-
* all processes that need to read system properties.
111-
*
112-
* Returns 0 on success, -1 otherwise.
113-
*/
114-
int __system_properties_init(void);
115-
116-
/**
117-
* Deprecated: use __system_property_wait instead.
118-
*/
119-
uint32_t __system_property_wait_any(uint32_t __old_serial);
120-
121-
#ifdef __cplusplus
122-
}
123-
#endif
124-
125-
#endif // _INCLUDE_SYS__SYSTEM_PROPERTIES_H

0 commit comments

Comments
 (0)