Loading libs/binder/Android.bp +0 −4 Original line number Original line Diff line number Diff line Loading @@ -144,10 +144,6 @@ cc_defaults { "-DANDROID_UTILS_REF_BASE_DISABLE_IMPLICIT_CONSTRUCTION", "-DANDROID_UTILS_REF_BASE_DISABLE_IMPLICIT_CONSTRUCTION", ], ], product_variables: { product_variables: { binder32bit: { cflags: ["-DBINDER_IPC_32BIT=1"], }, debuggable: { debuggable: { cflags: [ cflags: [ "-DBINDER_RPC_DEV_SERVERS", "-DBINDER_RPC_DEV_SERVERS", Loading libs/binder/ProcessState.cpp +1 −8 Original line number Original line Diff line number Diff line Loading @@ -104,14 +104,7 @@ bool ProcessState::isVndservicemanagerEnabled() { return access("/vendor/bin/vndservicemanager", R_OK) == 0; return access("/vendor/bin/vndservicemanager", R_OK) == 0; } } sp<ProcessState> ProcessState::init(const char *driver, bool requireDefault) sp<ProcessState> ProcessState::init(const char* driver, bool requireDefault) { { #ifdef BINDER_IPC_32BIT LOG_ALWAYS_FATAL("32-bit binder IPC is not supported for new devices starting in Android P. If " "you do need to use this mode, please see b/232423610 or file an issue with " "AOSP upstream as otherwise this will be removed soon."); #endif if (driver == nullptr) { if (driver == nullptr) { std::lock_guard<std::mutex> l(gProcessMutex); std::lock_guard<std::mutex> l(gProcessMutex); if (gProcess) { if (gProcess) { Loading libs/binder/include/binder/Parcel.h +0 −5 Original line number Original line Diff line number Diff line Loading @@ -34,13 +34,8 @@ #include <binder/IInterface.h> #include <binder/IInterface.h> #include <binder/Parcelable.h> #include <binder/Parcelable.h> #ifdef BINDER_IPC_32BIT //NOLINTNEXTLINE(google-runtime-int) b/173188702 typedef unsigned int binder_size_t; #else //NOLINTNEXTLINE(google-runtime-int) b/173188702 //NOLINTNEXTLINE(google-runtime-int) b/173188702 typedef unsigned long long binder_size_t; typedef unsigned long long binder_size_t; #endif struct flat_binder_object; struct flat_binder_object; Loading libs/binder/tests/Android.bp +0 −49 Original line number Original line Diff line number Diff line Loading @@ -31,29 +31,9 @@ cc_defaults { ], ], } } cc_test { name: "binderDriverInterfaceTest_IPC_32", defaults: ["binder_test_defaults"], srcs: ["binderDriverInterfaceTest.cpp"], header_libs: ["libbinder_headers"], compile_multilib: "32", multilib: { lib32: { suffix: "", }, }, cflags: ["-DBINDER_IPC_32BIT=1"], test_suites: ["vts"], } cc_test { cc_test { name: "binderDriverInterfaceTest", name: "binderDriverInterfaceTest", defaults: ["binder_test_defaults"], defaults: ["binder_test_defaults"], product_variables: { binder32bit: { cflags: ["-DBINDER_IPC_32BIT=1"], }, }, header_libs: ["libbinder_headers"], header_libs: ["libbinder_headers"], srcs: ["binderDriverInterfaceTest.cpp"], srcs: ["binderDriverInterfaceTest.cpp"], test_suites: [ test_suites: [ Loading @@ -62,30 +42,6 @@ cc_test { ], ], } } cc_test { name: "binderLibTest_IPC_32", defaults: ["binder_test_defaults"], srcs: ["binderLibTest.cpp"], shared_libs: [ "libbase", "libbinder", "liblog", "libutils", ], static_libs: [ "libgmock", ], compile_multilib: "32", multilib: { lib32: { suffix: "", }, }, cflags: ["-DBINDER_IPC_32BIT=1"], test_suites: ["vts"], require_root: true, } // unit test only, which can run on host and doesn't use /dev/binder // unit test only, which can run on host and doesn't use /dev/binder cc_test { cc_test { name: "binderUnitTest", name: "binderUnitTest", Loading Loading @@ -135,11 +91,6 @@ aidl_interface { cc_test { cc_test { name: "binderLibTest", name: "binderLibTest", defaults: ["binder_test_defaults"], defaults: ["binder_test_defaults"], product_variables: { binder32bit: { cflags: ["-DBINDER_IPC_32BIT=1"], }, }, srcs: ["binderLibTest.cpp"], srcs: ["binderLibTest.cpp"], shared_libs: [ shared_libs: [ Loading libs/binder/tests/binderAbiHelper.hdeleted 100644 → 0 +0 −52 Original line number Original line Diff line number Diff line /* * Copyright (C) 2020 The Android Open Source Project * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ #pragma once #include <stdlib.h> #include <iostream> #ifdef BINDER_IPC_32BIT static constexpr bool kBuild32Abi = true; #else static constexpr bool kBuild32Abi = false; #endif // TODO: remove when CONFIG_ANDROID_BINDER_IPC_32BIT is no longer supported static inline bool ReadKernelConfigIs32BitAbi() { // failure case implies we run with standard ABI return 0 == system("zcat /proc/config.gz | grep -E \"^CONFIG_ANDROID_BINDER_IPC_32BIT=y$\""); } static inline void ExitIfWrongAbi() { bool runtime32Abi = ReadKernelConfigIs32BitAbi(); if (kBuild32Abi != runtime32Abi) { std::cout << "[==========] Running 1 test from 1 test suite." << std::endl; std::cout << "[----------] Global test environment set-up." << std::endl; std::cout << "[----------] 1 tests from BinderLibTest" << std::endl; std::cout << "[ RUN ] BinderTest.AbortForWrongAbi" << std::endl; std::cout << "[ INFO ] test build abi 32: " << kBuild32Abi << " runtime abi 32: " << runtime32Abi << " so, skipping tests " << std::endl; std::cout << "[ OK ] BinderTest.AbortForWrongAbi (0 ms) " << std::endl; std::cout << "[----------] 1 tests from BinderTest (0 ms total)" << std::endl; std::cout << "" << std::endl; std::cout << "[----------] Global test environment tear-down" << std::endl; std::cout << "[==========] 1 test from 1 test suite ran. (0 ms total)" << std::endl; std::cout << "[ PASSED ] 1 tests." << std::endl; exit(0); } } Loading
libs/binder/Android.bp +0 −4 Original line number Original line Diff line number Diff line Loading @@ -144,10 +144,6 @@ cc_defaults { "-DANDROID_UTILS_REF_BASE_DISABLE_IMPLICIT_CONSTRUCTION", "-DANDROID_UTILS_REF_BASE_DISABLE_IMPLICIT_CONSTRUCTION", ], ], product_variables: { product_variables: { binder32bit: { cflags: ["-DBINDER_IPC_32BIT=1"], }, debuggable: { debuggable: { cflags: [ cflags: [ "-DBINDER_RPC_DEV_SERVERS", "-DBINDER_RPC_DEV_SERVERS", Loading
libs/binder/ProcessState.cpp +1 −8 Original line number Original line Diff line number Diff line Loading @@ -104,14 +104,7 @@ bool ProcessState::isVndservicemanagerEnabled() { return access("/vendor/bin/vndservicemanager", R_OK) == 0; return access("/vendor/bin/vndservicemanager", R_OK) == 0; } } sp<ProcessState> ProcessState::init(const char *driver, bool requireDefault) sp<ProcessState> ProcessState::init(const char* driver, bool requireDefault) { { #ifdef BINDER_IPC_32BIT LOG_ALWAYS_FATAL("32-bit binder IPC is not supported for new devices starting in Android P. If " "you do need to use this mode, please see b/232423610 or file an issue with " "AOSP upstream as otherwise this will be removed soon."); #endif if (driver == nullptr) { if (driver == nullptr) { std::lock_guard<std::mutex> l(gProcessMutex); std::lock_guard<std::mutex> l(gProcessMutex); if (gProcess) { if (gProcess) { Loading
libs/binder/include/binder/Parcel.h +0 −5 Original line number Original line Diff line number Diff line Loading @@ -34,13 +34,8 @@ #include <binder/IInterface.h> #include <binder/IInterface.h> #include <binder/Parcelable.h> #include <binder/Parcelable.h> #ifdef BINDER_IPC_32BIT //NOLINTNEXTLINE(google-runtime-int) b/173188702 typedef unsigned int binder_size_t; #else //NOLINTNEXTLINE(google-runtime-int) b/173188702 //NOLINTNEXTLINE(google-runtime-int) b/173188702 typedef unsigned long long binder_size_t; typedef unsigned long long binder_size_t; #endif struct flat_binder_object; struct flat_binder_object; Loading
libs/binder/tests/Android.bp +0 −49 Original line number Original line Diff line number Diff line Loading @@ -31,29 +31,9 @@ cc_defaults { ], ], } } cc_test { name: "binderDriverInterfaceTest_IPC_32", defaults: ["binder_test_defaults"], srcs: ["binderDriverInterfaceTest.cpp"], header_libs: ["libbinder_headers"], compile_multilib: "32", multilib: { lib32: { suffix: "", }, }, cflags: ["-DBINDER_IPC_32BIT=1"], test_suites: ["vts"], } cc_test { cc_test { name: "binderDriverInterfaceTest", name: "binderDriverInterfaceTest", defaults: ["binder_test_defaults"], defaults: ["binder_test_defaults"], product_variables: { binder32bit: { cflags: ["-DBINDER_IPC_32BIT=1"], }, }, header_libs: ["libbinder_headers"], header_libs: ["libbinder_headers"], srcs: ["binderDriverInterfaceTest.cpp"], srcs: ["binderDriverInterfaceTest.cpp"], test_suites: [ test_suites: [ Loading @@ -62,30 +42,6 @@ cc_test { ], ], } } cc_test { name: "binderLibTest_IPC_32", defaults: ["binder_test_defaults"], srcs: ["binderLibTest.cpp"], shared_libs: [ "libbase", "libbinder", "liblog", "libutils", ], static_libs: [ "libgmock", ], compile_multilib: "32", multilib: { lib32: { suffix: "", }, }, cflags: ["-DBINDER_IPC_32BIT=1"], test_suites: ["vts"], require_root: true, } // unit test only, which can run on host and doesn't use /dev/binder // unit test only, which can run on host and doesn't use /dev/binder cc_test { cc_test { name: "binderUnitTest", name: "binderUnitTest", Loading Loading @@ -135,11 +91,6 @@ aidl_interface { cc_test { cc_test { name: "binderLibTest", name: "binderLibTest", defaults: ["binder_test_defaults"], defaults: ["binder_test_defaults"], product_variables: { binder32bit: { cflags: ["-DBINDER_IPC_32BIT=1"], }, }, srcs: ["binderLibTest.cpp"], srcs: ["binderLibTest.cpp"], shared_libs: [ shared_libs: [ Loading
libs/binder/tests/binderAbiHelper.hdeleted 100644 → 0 +0 −52 Original line number Original line Diff line number Diff line /* * Copyright (C) 2020 The Android Open Source Project * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ #pragma once #include <stdlib.h> #include <iostream> #ifdef BINDER_IPC_32BIT static constexpr bool kBuild32Abi = true; #else static constexpr bool kBuild32Abi = false; #endif // TODO: remove when CONFIG_ANDROID_BINDER_IPC_32BIT is no longer supported static inline bool ReadKernelConfigIs32BitAbi() { // failure case implies we run with standard ABI return 0 == system("zcat /proc/config.gz | grep -E \"^CONFIG_ANDROID_BINDER_IPC_32BIT=y$\""); } static inline void ExitIfWrongAbi() { bool runtime32Abi = ReadKernelConfigIs32BitAbi(); if (kBuild32Abi != runtime32Abi) { std::cout << "[==========] Running 1 test from 1 test suite." << std::endl; std::cout << "[----------] Global test environment set-up." << std::endl; std::cout << "[----------] 1 tests from BinderLibTest" << std::endl; std::cout << "[ RUN ] BinderTest.AbortForWrongAbi" << std::endl; std::cout << "[ INFO ] test build abi 32: " << kBuild32Abi << " runtime abi 32: " << runtime32Abi << " so, skipping tests " << std::endl; std::cout << "[ OK ] BinderTest.AbortForWrongAbi (0 ms) " << std::endl; std::cout << "[----------] 1 tests from BinderTest (0 ms total)" << std::endl; std::cout << "" << std::endl; std::cout << "[----------] Global test environment tear-down" << std::endl; std::cout << "[==========] 1 test from 1 test suite ran. (0 ms total)" << std::endl; std::cout << "[ PASSED ] 1 tests." << std::endl; exit(0); } }