diff --git a/art/0001-hybris-Silence-some-build-errors-to-let-the-systemim.patch b/art/0001-hybris-Silence-some-build-errors-to-let-the-systemim.patch index 6ba3380..08d2600 100644 --- a/art/0001-hybris-Silence-some-build-errors-to-let-the-systemim.patch +++ b/art/0001-hybris-Silence-some-build-errors-to-let-the-systemim.patch @@ -1,4 +1,4 @@ -From af58fcbb7a0c501a5cd06ae6c5eaed17204b065c Mon Sep 17 00:00:00 2001 +From 1a27bd48255a96853e49d25c82a0fe47dd477f83 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bj=C3=B6rn=20Bidar?= Date: Fri, 3 Jul 2020 22:15:49 +0200 Subject: [PATCH] (hybris) Silence some build errors to let the systemimage @@ -16,9 +16,9 @@ Change-Id: Ide41188b6263a22c371ec28786bbc1ef1ee62df7 --- build/Android.gtest.mk | 20 ++++++++++---------- runtime/thread-current-inl.h | 2 +- - runtime/thread.cc | 4 ++-- - runtime/thread_list.cc | 2 +- - 4 files changed, 14 insertions(+), 14 deletions(-) + runtime/thread.cc | 4 ++++ + runtime/thread_list.cc | 2 ++ + 4 files changed, 17 insertions(+), 11 deletions(-) diff --git a/build/Android.gtest.mk b/build/Android.gtest.mk index 03aae07587..20e38df7b2 100644 @@ -64,7 +64,7 @@ index 03aae07587..20e38df7b2 100644 ifdef ART_TEST_HOST_GTEST_Main_DEX $(ART_TEST_HOST_GTEST_MainStripped_DEX): $(ART_TEST_HOST_GTEST_Main_DEX) diff --git a/runtime/thread-current-inl.h b/runtime/thread-current-inl.h -index 9241b1f875..904a62ccff 100644 +index 9241b1f875..a3e0520423 100644 --- a/runtime/thread-current-inl.h +++ b/runtime/thread-current-inl.h @@ -34,7 +34,7 @@ inline Thread* Thread::Current() { @@ -72,42 +72,45 @@ index 9241b1f875..904a62ccff 100644 } else { #ifdef ART_TARGET_ANDROID - void* thread = __get_tls()[TLS_SLOT_ART_THREAD_SELF]; -+ void* thread = __get_tls()[99]; ++ void* thread = nullptr; //__get_tls()[TLS_SLOT_ART_THREAD_SELF]; #else void* thread = pthread_getspecific(Thread::pthread_key_self_); #endif diff --git a/runtime/thread.cc b/runtime/thread.cc -index be0e30ad11..dd3d07d920 100644 +index be0e30ad11..da112e19c9 100644 --- a/runtime/thread.cc +++ b/runtime/thread.cc -@@ -933,7 +933,7 @@ bool Thread::Init(ThreadList* thread_list, JavaVMExt* java_vm, JNIEnvExt* jni_en +@@ -933,7 +933,9 @@ bool Thread::Init(ThreadList* thread_list, JavaVMExt* java_vm, JNIEnvExt* jni_en } #ifdef ART_TARGET_ANDROID -- __get_tls()[TLS_SLOT_ART_THREAD_SELF] = this; -+ __get_tls()[99] = this; ++#ifdef DISABLED_FOR_HYBRIS_SUPPORT + __get_tls()[TLS_SLOT_ART_THREAD_SELF] = this; ++#endif #else CHECK_PTHREAD_CALL(pthread_setspecific, (Thread::pthread_key_self_, this), "attach self"); #endif -@@ -2199,7 +2199,7 @@ void Thread::ThreadExitCallback(void* arg) { +@@ -2199,7 +2201,9 @@ void Thread::ThreadExitCallback(void* arg) { "going to use a pthread_key_create destructor?): " << *self; CHECK(is_started_); #ifdef ART_TARGET_ANDROID -- __get_tls()[TLS_SLOT_ART_THREAD_SELF] = self; -+ __get_tls()[99] = self; ++#ifdef DISABLED_FOR_HYBRIS_SUPPORT + __get_tls()[TLS_SLOT_ART_THREAD_SELF] = self; ++#endif #else CHECK_PTHREAD_CALL(pthread_setspecific, (Thread::pthread_key_self_, self), "reattach self"); #endif diff --git a/runtime/thread_list.cc b/runtime/thread_list.cc -index ed6b2c91e5..06e6f6585b 100644 +index ed6b2c91e5..37a2bd6911 100644 --- a/runtime/thread_list.cc +++ b/runtime/thread_list.cc -@@ -1482,7 +1482,7 @@ void ThreadList::Unregister(Thread* self) { +@@ -1482,7 +1482,9 @@ void ThreadList::Unregister(Thread* self) { // Clear the TLS data, so that the underlying native thread is recognizably detached. // (It may wish to reattach later.) #ifdef ART_TARGET_ANDROID -- __get_tls()[TLS_SLOT_ART_THREAD_SELF] = nullptr; -+ __get_tls()[99] = nullptr; ++#ifdef DISABLED_FOR_HYBRIS_SUPPORT + __get_tls()[TLS_SLOT_ART_THREAD_SELF] = nullptr; ++#endif #else CHECK_PTHREAD_CALL(pthread_setspecific, (Thread::pthread_key_self_, nullptr), "detach self"); #endif diff --git a/bionic/0002-hybris-Add-support-for-get-and-list-of-properties.patch b/bionic/0001-hybris-Add-support-for-get-and-list-of-properties.patch similarity index 84% rename from bionic/0002-hybris-Add-support-for-get-and-list-of-properties.patch rename to bionic/0001-hybris-Add-support-for-get-and-list-of-properties.patch index 4668923..115a8d3 100644 --- a/bionic/0002-hybris-Add-support-for-get-and-list-of-properties.patch +++ b/bionic/0001-hybris-Add-support-for-get-and-list-of-properties.patch @@ -1,7 +1,7 @@ -From 3c74a5052ea7eb73290fe34de4a8a05a2e0c9f11 Mon Sep 17 00:00:00 2001 +From cd7b68932bccda2eac104c841254f90c50359cf7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Matti=20Lehtim=C3=A4ki?= Date: Sun, 17 Dec 2017 00:16:16 +0200 -Subject: [PATCH 2/6] (hybris) Add support for get and list of properties. +Subject: [PATCH 1/7] (hybris) Add support for get and list of properties. Change-Id: I089a2a146c06d8ad0c234f0a9a4b5aa07beaeed5 --- diff --git a/bionic/0003-hybris-bionic_tls.h-shifting-TLS-slots-to-avoid-conf.patch b/bionic/0002-hybris-bionic_tls.h-shifting-TLS-slots-to-avoid-conf.patch similarity index 91% rename from bionic/0003-hybris-bionic_tls.h-shifting-TLS-slots-to-avoid-conf.patch rename to bionic/0002-hybris-bionic_tls.h-shifting-TLS-slots-to-avoid-conf.patch index 60fb112..c1fa034 100644 --- a/bionic/0003-hybris-bionic_tls.h-shifting-TLS-slots-to-avoid-conf.patch +++ b/bionic/0002-hybris-bionic_tls.h-shifting-TLS-slots-to-avoid-conf.patch @@ -1,7 +1,7 @@ -From 90df3815d26d79b32d6a9cb05f6ded82054744e0 Mon Sep 17 00:00:00 2001 +From 8da8433158fc287697bba8809218822781f386f5 Mon Sep 17 00:00:00 2001 From: Ricardo Salveti de Araujo Date: Thu, 9 Jan 2014 00:57:01 -0200 -Subject: [PATCH 3/6] (hybris) bionic_tls.h: shifting TLS slots to avoid +Subject: [PATCH 2/7] (hybris) bionic_tls.h: shifting TLS slots to avoid conflicts with libc/hybris Change-Id: Idf503fe8fa0a24edf4dbbabaa8d3a1c2d1f60295 diff --git a/bionic/0004-hybris-disable-tls-usage-in-locale.cpp-to-avoid-prob.patch b/bionic/0003-hybris-disable-tls-usage-in-locale.cpp-to-avoid-prob.patch similarity index 86% rename from bionic/0004-hybris-disable-tls-usage-in-locale.cpp-to-avoid-prob.patch rename to bionic/0003-hybris-disable-tls-usage-in-locale.cpp-to-avoid-prob.patch index c4e577f..bec1925 100644 --- a/bionic/0004-hybris-disable-tls-usage-in-locale.cpp-to-avoid-prob.patch +++ b/bionic/0003-hybris-disable-tls-usage-in-locale.cpp-to-avoid-prob.patch @@ -1,7 +1,7 @@ -From c2db77fdc026934f0c8198eab45608146dfb28dc Mon Sep 17 00:00:00 2001 +From d5ca09b790c93dbf6f9522743a975fe2817dc03d Mon Sep 17 00:00:00 2001 From: Simonas Leleiva Date: Wed, 18 Apr 2018 18:37:09 +0200 -Subject: [PATCH 4/6] (hybris) disable tls usage in locale.cpp, to avoid +Subject: [PATCH 3/7] (hybris) disable tls usage in locale.cpp, to avoid problems with libhybris Change-Id: I498a9749853e6a5a4aaa4ae93479aff083e02d4c diff --git a/bionic/0005-hybris-Fix-TLS-slots-for-x86-Aligns-with-this-libhyb.patch b/bionic/0004-hybris-Fix-TLS-slots-for-x86-Aligns-with-this-libhyb.patch similarity index 91% rename from bionic/0005-hybris-Fix-TLS-slots-for-x86-Aligns-with-this-libhyb.patch rename to bionic/0004-hybris-Fix-TLS-slots-for-x86-Aligns-with-this-libhyb.patch index ad73bc4..72241a1 100644 --- a/bionic/0005-hybris-Fix-TLS-slots-for-x86-Aligns-with-this-libhyb.patch +++ b/bionic/0004-hybris-Fix-TLS-slots-for-x86-Aligns-with-this-libhyb.patch @@ -1,7 +1,7 @@ -From dcdf30cb95462a99f22a6b711dd193888809262d Mon Sep 17 00:00:00 2001 +From 480a63cbf69884a8e274c305eccd3ac676e02a74 Mon Sep 17 00:00:00 2001 From: Ilya Bizyaev Date: Sat, 20 Jan 2018 17:48:27 +0300 -Subject: [PATCH 5/6] (hybris) Fix TLS slots for x86 Aligns with this libhybris +Subject: [PATCH 4/7] (hybris) Fix TLS slots for x86 Aligns with this libhybris patch: https://github.com/libhybris/libhybris/pull/370 Change-Id: Ibdbfa1c1672cbac5a687afdedbb1d8ff05861f4f diff --git a/bionic/0006-hybris-don-t-fail-because-of-fsetxattr.patch b/bionic/0005-hybris-don-t-fail-because-of-fsetxattr.patch similarity index 85% rename from bionic/0006-hybris-don-t-fail-because-of-fsetxattr.patch rename to bionic/0005-hybris-don-t-fail-because-of-fsetxattr.patch index a8f7000..bcae323 100644 --- a/bionic/0006-hybris-don-t-fail-because-of-fsetxattr.patch +++ b/bionic/0005-hybris-don-t-fail-because-of-fsetxattr.patch @@ -1,7 +1,7 @@ -From f6251489321b5e8b23f43a5c568c1a6a37aced92 Mon Sep 17 00:00:00 2001 +From c806b95a09f6ca97c44025a97ca5bddb7cec6162 Mon Sep 17 00:00:00 2001 From: Franz-Josef Haider Date: Thu, 28 Mar 2019 13:10:48 -0400 -Subject: [PATCH 6/6] (hybris) don't fail because of fsetxattr +Subject: [PATCH 5/7] (hybris) don't fail because of fsetxattr Change-Id: I4d765ff401d6b4f12da0305416cb751eb0c9e96b --- diff --git a/bionic/0001-hybris-Fix-__get_tls-and-related-functions-Android-8.patch b/bionic/0006-hybris-Fix-__get_tls-and-related-functions-Android-1.patch similarity index 78% rename from bionic/0001-hybris-Fix-__get_tls-and-related-functions-Android-8.patch rename to bionic/0006-hybris-Fix-__get_tls-and-related-functions-Android-1.patch index 1e2285b..8e7ce8a 100644 --- a/bionic/0001-hybris-Fix-__get_tls-and-related-functions-Android-8.patch +++ b/bionic/0006-hybris-Fix-__get_tls-and-related-functions-Android-1.patch @@ -1,32 +1,42 @@ -From d638f78bbaf290a38680261876fa456bff349fdc Mon Sep 17 00:00:00 2001 -From: Franz-Josef Haider -Date: Thu, 1 Feb 2018 00:57:52 +0000 -Subject: [PATCH 1/6] (hybris) Fix __get_tls and related functions (>=Android - 8) +From a52e2b68710dec02a46768b485ab50b0a193834c Mon Sep 17 00:00:00 2001 +From: Franz-Josef Haider +Date: Thu, 8 Oct 2020 14:43:42 +0000 +Subject: [PATCH 6/7] (hybris) Fix __get_tls and related functions (>=Android + 10) -Change-Id: If75e4ae739ec6c482a68b1b69c2130535add2279 -Signed-off-by: Simonas Leleiva +Signed-off-by: Simonas Leleiva +Change-Id: I24486873be638a1a8cd123705ba2e51ec7414b94 --- - libc/bionic/ndk_cruft.cpp | 18 +++++++---- + libc/Android.bp | 1 + + libc/bionic/ndk_cruft.cpp | 13 ++++---- + libc/hybris_support.c | 4 +++ libc/libc.map.txt | 1 + libc/private/__get_tls.h | 31 +++++++----------- libc/private/__get_tls_internal.h | 54 +++++++++++++++++++++++++++++++ - 4 files changed, 79 insertions(+), 25 deletions(-) + 6 files changed, 79 insertions(+), 25 deletions(-) + create mode 100644 libc/hybris_support.c create mode 100644 libc/private/__get_tls_internal.h +diff --git a/libc/Android.bp b/libc/Android.bp +index a5990288d..85e03f4a2 100644 +--- a/libc/Android.bp ++++ b/libc/Android.bp +@@ -18,6 +18,7 @@ libc_common_src_files = [ + "stdio/vfscanf.cpp", + "stdio/vfwscanf.c", + "stdlib/exit.c", ++ "hybris_support.c", + ] + + // Various kinds of cruft. diff --git a/libc/bionic/ndk_cruft.cpp b/libc/bionic/ndk_cruft.cpp -index 2c3299f7b..637e3dfa1 100644 +index 2c3299f7b..85626db4a 100644 --- a/libc/bionic/ndk_cruft.cpp +++ b/libc/bionic/ndk_cruft.cpp -@@ -49,6 +49,18 @@ +@@ -49,6 +49,13 @@ extern "C" { -+void** __get_tls_hooks(void) { -+#include "private/__get_tls_internal.h" -+ return __get_tls_internal(); -+} -+ +// TODO: does anything still need this? +// with hybris we need it, so thanks for keeping it. +void** __get_tls() { @@ -37,7 +47,7 @@ index 2c3299f7b..637e3dfa1 100644 // LP64 doesn't need to support any legacy cruft. #if !defined(__LP64__) -@@ -70,12 +82,6 @@ int __open() { +@@ -70,12 +77,6 @@ int __open() { abort(); } @@ -50,18 +60,28 @@ index 2c3299f7b..637e3dfa1 100644 // This non-standard function was in our for some reason. void memswap(void* m1, void* m2, size_t n) { char* p = reinterpret_cast(m1); +diff --git a/libc/hybris_support.c b/libc/hybris_support.c +new file mode 100644 +index 000000000..925253021 +--- /dev/null ++++ b/libc/hybris_support.c +@@ -0,0 +1,4 @@ ++void** __get_tls_hooks(void) { ++#include "private/__get_tls_internal.h" ++ return __get_tls_internal(); ++} diff --git a/libc/libc.map.txt b/libc/libc.map.txt -index 88192239a..1bf0e307d 100644 +index 88192239a..941faadf8 100644 --- a/libc/libc.map.txt +++ b/libc/libc.map.txt -@@ -1593,6 +1593,7 @@ LIBC_PRIVATE { - __gesf2; # arm - __get_thread; # arm x86 mips - __get_tls; # arm x86 mips -+ __get_tls_hooks; # # arm x86 mips hybris - __getdents64; # arm x86 mips - __gnu_ldivmod_helper; # arm - __gnu_uldivmod_helper; # arm +@@ -40,6 +40,7 @@ LIBC { + __fsetlocking; # introduced=23 + __fstatfs64; # arm x86 mips + __fwritable; # introduced=23 ++ __get_tls_hooks; # arm arm64 x86 mips introduced=21 + __get_h_errno; + __getcpu; # arm x86 mips introduced-arm=12 introduced-mips=16 introduced-x86=12 + __getcwd; # arm x86 mips diff --git a/libc/private/__get_tls.h b/libc/private/__get_tls.h index 04c5fdbbf..6a4b5728e 100644 --- a/libc/private/__get_tls.h diff --git a/bionic/0007-halium-libdl-neutralize-cfi_slowpath_common-as-it-br.patch b/bionic/0007-halium-libdl-neutralize-cfi_slowpath_common-as-it-br.patch new file mode 100644 index 0000000..921314b --- /dev/null +++ b/bionic/0007-halium-libdl-neutralize-cfi_slowpath_common-as-it-br.patch @@ -0,0 +1,26 @@ +From 3b2cfa4a631f91910300badccf93a40749d43817 Mon Sep 17 00:00:00 2001 +From: NeKit +Date: Fri, 3 Jul 2020 20:10:20 +0200 +Subject: [PATCH 7/7] (halium) libdl: neutralize cfi_slowpath_common as it + breaks libhybris + +Change-Id: I90b4af9d9e6b23cccafb659931a8e85b8bae091a +--- + libdl/libdl_cfi.cpp | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/libdl/libdl_cfi.cpp b/libdl/libdl_cfi.cpp +index 1dd5b21cd..f48a3cfef 100644 +--- a/libdl/libdl_cfi.cpp ++++ b/libdl/libdl_cfi.cpp +@@ -66,6 +66,7 @@ static uintptr_t cfi_check_addr(uint16_t v, void* Ptr) { + } + + static inline void cfi_slowpath_common(uint64_t CallSiteTypeId, void* Ptr, void* DiagData) { ++ return; + uint16_t v = shadow_load(Ptr); + switch (v) { + case CFIShadow::kInvalidShadow: +-- +2.27.0 + diff --git a/frameworks/av/0001-hybris-AudioService-is-disabled-in-hybris-adaptation.patch b/frameworks/av/0001-hybris-AudioService-is-disabled-in-hybris-adaptation.patch index cada968..4df1c1d 100644 --- a/frameworks/av/0001-hybris-AudioService-is-disabled-in-hybris-adaptation.patch +++ b/frameworks/av/0001-hybris-AudioService-is-disabled-in-hybris-adaptation.patch @@ -1,4 +1,4 @@ -From aadb47d6bedbb0052b7dc2a62b8fa6df3f65d536 Mon Sep 17 00:00:00 2001 +From b2644d4d8077015b2bdc0eb2bd21117875dffbfe Mon Sep 17 00:00:00 2001 From: Simonas Leleiva Date: Sun, 30 Oct 2016 14:07:11 +0000 Subject: [PATCH] (hybris) AudioService is disabled in hybris adaptations @@ -9,38 +9,37 @@ Content-Transfer-Encoding: 8bit Without this patch, camera is waiting for AudioService indefinitely Change-Id: Id572746cc77c8d26e3a8e7fc1dc05b17ac282ed4 -Signed-off-by: Simonas Leleiva +Signed-off-by: Simonas Leleiva Signed-off-by: Björn Bidar --- - services/camera/libcameraservice/CameraService.cpp | 9 +++++++-- - 1 file changed, 7 insertions(+), 2 deletions(-) + services/camera/libcameraservice/CameraService.cpp | 7 +++++++ + 1 file changed, 7 insertions(+) diff --git a/services/camera/libcameraservice/CameraService.cpp b/services/camera/libcameraservice/CameraService.cpp -index 3e6210294..5950c63ee 100644 +index 670e026183..c8a4694722 100644 --- a/services/camera/libcameraservice/CameraService.cpp +++ b/services/camera/libcameraservice/CameraService.cpp -@@ -2231,10 +2231,14 @@ void CameraService::increaseSoundRef() { - Mutex::Autolock lock(mSoundLock); +@@ -2275,9 +2275,15 @@ void CameraService::increaseSoundRef() { mSoundRef++; } -- + +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wunused-parameter" +#endif void CameraService::loadSoundLocked(sound_kind kind) { ATRACE_CALL(); -- + +#pragma clang diagnostic pop -+/* ++#ifdef DISABLED_FOR_HYBRIS_SUPPORT LOG1("CameraService::loadSoundLocked ref=%d", mSoundRef); if (SOUND_SHUTTER == kind && mSoundPlayer[SOUND_SHUTTER] == NULL) { mSoundPlayer[SOUND_SHUTTER] = newMediaPlayer("/product/media/audio/ui/camera_click.ogg"); -@@ -2253,6 +2257,7 @@ void CameraService::loadSoundLocked(sound_kind kind) { +@@ -2296,6 +2302,7 @@ void CameraService::loadSoundLocked(sound_kind kind) { mSoundPlayer[SOUND_RECORDING_STOP] = newMediaPlayer("/system/media/audio/ui/VideoStop.ogg"); } } -+ */ ++#endif } void CameraService::decreaseSoundRef() { diff --git a/frameworks/native/0001-hybris-Use-mini-services-and-disable-starting-unneed.patch b/frameworks/native/0001-hybris-Use-mini-services-and-disable-starting-unneed.patch index 158ee9d..1b5b2be 100644 --- a/frameworks/native/0001-hybris-Use-mini-services-and-disable-starting-unneed.patch +++ b/frameworks/native/0001-hybris-Use-mini-services-and-disable-starting-unneed.patch @@ -1,7 +1,7 @@ -From 2d948dadf24d983b57b2777349b801cd046e14c5 Mon Sep 17 00:00:00 2001 +From c4beef9773e328f1533d65bf08677d189b2b85c9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Matti=20Lehtim=C3=A4ki?= Date: Thu, 13 Jul 2017 00:53:55 +0300 -Subject: [PATCH 1/5] (hybris) Use mini services and disable starting unneeded +Subject: [PATCH 1/3] (hybris) Use mini services and disable starting unneeded services. Change-Id: I6e80eb3e2d92ddfbd83f1933971c3f24e9570d28 diff --git a/frameworks/native/0002-hybris-Pick-GLES-shared-objects-from-appropriate-pat.patch b/frameworks/native/0002-hybris-Pick-GLES-shared-objects-from-appropriate-pat.patch index 4d1900c..1ece9c5 100644 --- a/frameworks/native/0002-hybris-Pick-GLES-shared-objects-from-appropriate-pat.patch +++ b/frameworks/native/0002-hybris-Pick-GLES-shared-objects-from-appropriate-pat.patch @@ -1,7 +1,7 @@ -From 2270d2fdcae29295e47b5b4ae87688b14a29defd Mon Sep 17 00:00:00 2001 +From c47e6721089fb0773f4cf93b880746b01bdf2ded Mon Sep 17 00:00:00 2001 From: Simonas Leleiva Date: Wed, 15 Jul 2015 08:29:08 +0000 -Subject: [PATCH 2/5] (hybris) Pick GLES shared objects from appropriate paths +Subject: [PATCH 2/3] (hybris) Pick GLES shared objects from appropriate paths (32-bit case) Change-Id: I4c7739ba8a4d64fa115163d5700b0df3370b286b diff --git a/frameworks/native/0003-hybris-Use-private-__get_tls_hooks-from-bionic.patch b/frameworks/native/0003-hybris-Use-private-__get_tls_hooks-from-bionic.patch index dd0ddf4..f0e88e5 100644 --- a/frameworks/native/0003-hybris-Use-private-__get_tls_hooks-from-bionic.patch +++ b/frameworks/native/0003-hybris-Use-private-__get_tls_hooks-from-bionic.patch @@ -1,7 +1,7 @@ -From 5bc15a22820c54bc59f50209d189d28900846d54 Mon Sep 17 00:00:00 2001 +From 7b53411f90d79f206d1a1a689b36f87f750fd301 Mon Sep 17 00:00:00 2001 From: David Greaves Date: Tue, 25 Nov 2014 14:55:27 +0100 -Subject: [PATCH 3/5] (hybris) Use private __get_tls_hooks from bionic +Subject: [PATCH 3/3] (hybris) Use private __get_tls_hooks from bionic Change-Id: I38a4ea6d8561ab7da5dfedeeba16b84ee493051e Signed-off-by: David Greaves diff --git a/frameworks/native/0004-hybris-Allow-surfaceflinger-to-be-started-from-Sailf.patch b/frameworks/native/0004-hybris-Allow-surfaceflinger-to-be-started-from-Sailf.patch deleted file mode 100644 index 4018ba2..0000000 --- a/frameworks/native/0004-hybris-Allow-surfaceflinger-to-be-started-from-Sailf.patch +++ /dev/null @@ -1,76 +0,0 @@ -From 22ca067d2f9d82d82b7be22431a3fab8c103dbbf Mon Sep 17 00:00:00 2001 -From: Simonas Leleiva -Date: Wed, 18 Apr 2018 19:00:03 +0200 -Subject: [PATCH 4/5] (hybris) Allow surfaceflinger to be started from - SailfishOS. - -Change-Id: Ibaecd8d27524bbb0d3bc7b40017bf92736b8629d -Signed-off-by: Simonas Leleiva ---- - services/surfaceflinger/StartPropertySetThread.cpp | 5 +++-- - services/surfaceflinger/SurfaceFlinger.cpp | 6 +++--- - services/surfaceflinger/surfaceflinger.rc | 1 + - 3 files changed, 7 insertions(+), 5 deletions(-) - -diff --git a/services/surfaceflinger/StartPropertySetThread.cpp b/services/surfaceflinger/StartPropertySetThread.cpp -index db82772f4..27cc95abc 100644 ---- a/services/surfaceflinger/StartPropertySetThread.cpp -+++ b/services/surfaceflinger/StartPropertySetThread.cpp -@@ -29,10 +29,11 @@ status_t StartPropertySetThread::Start() { - bool StartPropertySetThread::threadLoop() { - // Set property service.sf.present_timestamp, consumer need check its readiness - property_set(kTimestampProperty, mTimestampPropertyValue ? "1" : "0"); -+ // Don't start the Android bootanimation in SFOS even if SurfaceFlinger is used. - // Clear BootAnimation exit flag -- property_set("service.bootanim.exit", "0"); -+ //property_set("service.bootanim.exit", "0"); - // Start BootAnimation if not started -- property_set("ctl.start", "bootanim"); -+ //property_set("ctl.start", "bootanim"); - // Exit immediately - return false; - } -diff --git a/services/surfaceflinger/SurfaceFlinger.cpp b/services/surfaceflinger/SurfaceFlinger.cpp -index 6166789fc..f4c338f54 100644 ---- a/services/surfaceflinger/SurfaceFlinger.cpp -+++ b/services/surfaceflinger/SurfaceFlinger.cpp -@@ -3882,7 +3882,7 @@ bool SurfaceFlinger::callingThreadHasUnscopedSurfaceFlingerAccess() { - IPCThreadState* ipc = IPCThreadState::self(); - const int pid = ipc->getCallingPid(); - const int uid = ipc->getCallingUid(); -- if ((uid != AID_GRAPHICS && uid != AID_SYSTEM) && -+ if ((uid != AID_GRAPHICS && uid != AID_SYSTEM && uid != 10000) && - !PermissionCache::checkPermission(sAccessSurfaceFlinger, pid, uid)) { - return false; - } -@@ -5134,7 +5134,7 @@ status_t SurfaceFlinger::CheckTransactCodeCredentials(uint32_t code) { - IPCThreadState* ipc = IPCThreadState::self(); - const int pid = ipc->getCallingPid(); - const int uid = ipc->getCallingUid(); -- if ((uid != AID_GRAPHICS) && -+ if ((uid != AID_GRAPHICS && uid != 100000) && - !PermissionCache::checkPermission(sReadFramebuffer, pid, uid)) { - ALOGE("Permission Denial: can't read framebuffer pid=%d, uid=%d", pid, uid); - return PERMISSION_DENIED; -@@ -5189,7 +5189,7 @@ status_t SurfaceFlinger::onTransact(uint32_t code, const Parcel& data, Parcel* r - IPCThreadState* ipc = IPCThreadState::self(); - const int uid = ipc->getCallingUid(); - if (CC_UNLIKELY(uid != AID_SYSTEM -- && !PermissionCache::checkCallingPermission(sHardwareTest))) { -+ && !PermissionCache::checkCallingPermission(sHardwareTest) && uid != 0 && uid != 10000)) { - const int pid = ipc->getCallingPid(); - ALOGE("Permission Denial: " - "can't access SurfaceFlinger pid=%d, uid=%d", pid, uid); -diff --git a/services/surfaceflinger/surfaceflinger.rc b/services/surfaceflinger/surfaceflinger.rc -index aea602bba..a48041daf 100644 ---- a/services/surfaceflinger/surfaceflinger.rc -+++ b/services/surfaceflinger/surfaceflinger.rc -@@ -7,3 +7,4 @@ service surfaceflinger /system/bin/surfaceflinger - socket pdx/system/vr/display/client stream 0666 system graphics u:object_r:pdx_display_client_endpoint_socket:s0 - socket pdx/system/vr/display/manager stream 0666 system graphics u:object_r:pdx_display_manager_endpoint_socket:s0 - socket pdx/system/vr/display/vsync stream 0666 system graphics u:object_r:pdx_display_vsync_endpoint_socket:s0 -+ setenv LD_PRELOAD /usr/libexec/droid-hybris/system/lib64/libsurfaceflinger.so -\ No newline at end of file --- -2.23.0 - diff --git a/frameworks/native/0005-hybris-Create-the-somehow-missing-settingsd-socket-f.patch b/frameworks/native/0005-hybris-Create-the-somehow-missing-settingsd-socket-f.patch deleted file mode 100644 index 1a9793f..0000000 --- a/frameworks/native/0005-hybris-Create-the-somehow-missing-settingsd-socket-f.patch +++ /dev/null @@ -1,29 +0,0 @@ -From e8a88f226a0548dcdd2f4ea6f278ccd210b62582 Mon Sep 17 00:00:00 2001 -From: Franz-Josef Haider -Date: Sun, 16 Jun 2019 13:14:30 +0200 -Subject: [PATCH 5/5] (hybris) Create the (somehow) missing settingsd socket - for rild - -Change-Id: Ic7415aab65788f37ee5c5a67be1916319e484f77 ---- - cmds/servicemanager/servicemanager.rc | 7 +++++++ - 1 file changed, 7 insertions(+) - -diff --git a/cmds/servicemanager/servicemanager.rc b/cmds/servicemanager/servicemanager.rc -index 1f447f9b0..3211e23f1 100644 ---- a/cmds/servicemanager/servicemanager.rc -+++ b/cmds/servicemanager/servicemanager.rc -@@ -32,3 +32,10 @@ service miniaf /usr/libexec/droid-hybris/system/bin/miniafservice - class main - user system - group audio -+ -+# dummy service to create the (somehow) missing settingsd socket for rild -+service settingsd_HYBRIS /bin/sleep infinity -+ setenv LD_LIBRARY_PATH /usr/lib:/lib -+ socket settingsd stream 0600 radio radio -+ class early_hal -+ oneshot --- -2.23.0 - diff --git a/system/core/0001-hybris-Add-usr-libexec-droid-hybris-lib-dev-alog-to-.patch b/system/core/0001-hybris-Add-usr-libexec-droid-hybris-lib-dev-alog-to-.patch index b66b764..13fb662 100644 --- a/system/core/0001-hybris-Add-usr-libexec-droid-hybris-lib-dev-alog-to-.patch +++ b/system/core/0001-hybris-Add-usr-libexec-droid-hybris-lib-dev-alog-to-.patch @@ -1,7 +1,7 @@ -From 9699aa77cb111d33e9cba291851fd9cdc1ed5c75 Mon Sep 17 00:00:00 2001 +From dd85495ff6a3e963d5624af0503bd741dcfd714b Mon Sep 17 00:00:00 2001 From: David Greaves Date: Wed, 6 Nov 2013 21:09:30 +0000 -Subject: [PATCH 01/40] (hybris) Add /usr/libexec/droid-hybris/lib-dev-alog/ to +Subject: [PATCH 01/50] (hybris) Add /usr/libexec/droid-hybris/lib-dev-alog/ to the LD_LIBRARY_PATH for all init'ed binaries to support the /dev/alog used in Mer diff --git a/system/core/0002-hybris-Don-t-create-mount-dev-proc-sys.-when-booting.patch b/system/core/0002-hybris-Don-t-create-mount-dev-proc-sys.-when-booting.patch index 685359c..a4e6885 100644 --- a/system/core/0002-hybris-Don-t-create-mount-dev-proc-sys.-when-booting.patch +++ b/system/core/0002-hybris-Don-t-create-mount-dev-proc-sys.-when-booting.patch @@ -1,7 +1,7 @@ -From eb2713ced66ee6af6b490a303519317edb65bb18 Mon Sep 17 00:00:00 2001 +From 6809c295f880556decb5a7342209bb0094cf541d Mon Sep 17 00:00:00 2001 From: David Greaves Date: Tue, 8 Oct 2013 16:59:30 +0100 -Subject: [PATCH 02/40] (hybris) Don't create/mount dev/proc/sys... when +Subject: [PATCH 02/50] (hybris) Don't create/mount dev/proc/sys... when booting with Mer Change-Id: I16afd5bf56ee3e36f09b3496b80e356ce9269a64 diff --git a/system/core/0003-hybris-Mer-can-specify-mis-alignment-handling-this-i.patch b/system/core/0003-hybris-Mer-can-specify-mis-alignment-handling-this-i.patch index 82d1324..12dadca 100644 --- a/system/core/0003-hybris-Mer-can-specify-mis-alignment-handling-this-i.patch +++ b/system/core/0003-hybris-Mer-can-specify-mis-alignment-handling-this-i.patch @@ -1,7 +1,7 @@ -From 7d692d25bfd04a767110d208769158f569034c27 Mon Sep 17 00:00:00 2001 +From 30530bd1e6823e6942dfef06e7909b68cf22fd1d Mon Sep 17 00:00:00 2001 From: David Greaves Date: Tue, 22 Oct 2013 17:07:56 +0100 -Subject: [PATCH 03/40] (hybris) Mer can specify mis-alignment handling - this +Subject: [PATCH 03/50] (hybris) Mer can specify mis-alignment handling - this is the wrong place to set it Change-Id: Ib46c0a0b6d285dbcd05736e7ba9e9fd0a0480984 @@ -10,7 +10,7 @@ Change-Id: Ib46c0a0b6d285dbcd05736e7ba9e9fd0a0480984 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/rootdir/init.rc b/rootdir/init.rc -index 893998cee..1d7b87ca9 100644 +index e898d4dc9..3ae5e1944 100644 --- a/rootdir/init.rc +++ b/rootdir/init.rc @@ -129,13 +129,15 @@ on init diff --git a/system/core/0004-hybris-Mount-points-are-handled-by-Mer.patch b/system/core/0004-hybris-Mount-points-are-handled-by-Mer.patch index 3fc5b74..6c8fa30 100644 --- a/system/core/0004-hybris-Mount-points-are-handled-by-Mer.patch +++ b/system/core/0004-hybris-Mount-points-are-handled-by-Mer.patch @@ -1,7 +1,7 @@ -From 10c2144b808ec5ede091ea3ecbd4dc505016ee09 Mon Sep 17 00:00:00 2001 +From 79f69b9aa4cdda9f9077b4b1cda024d7dfad37db Mon Sep 17 00:00:00 2001 From: David Greaves Date: Tue, 22 Oct 2013 17:09:20 +0100 -Subject: [PATCH 04/40] (hybris) Mount points are handled by Mer +Subject: [PATCH 04/50] (hybris) Mount points are handled by Mer Change-Id: I295b30a47b6e147b037275032a00b304085fe711 --- @@ -9,7 +9,7 @@ Change-Id: I295b30a47b6e147b037275032a00b304085fe711 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/rootdir/init.rc b/rootdir/init.rc -index 1d7b87ca9..1a5a5537d 100644 +index 3ae5e1944..897d392dc 100644 --- a/rootdir/init.rc +++ b/rootdir/init.rc @@ -50,8 +50,8 @@ on init diff --git a/system/core/0005-hybris-Systemd-handles-control-groups.patch b/system/core/0005-hybris-Systemd-handles-control-groups.patch index c2a97d3..e3bfdad 100644 --- a/system/core/0005-hybris-Systemd-handles-control-groups.patch +++ b/system/core/0005-hybris-Systemd-handles-control-groups.patch @@ -1,7 +1,7 @@ -From c5502ca02f088068ea04f5fd3e18878828e8a78a Mon Sep 17 00:00:00 2001 +From b6eb51f135773ee68fe490fbf366d54bddb0515d Mon Sep 17 00:00:00 2001 From: David Greaves Date: Tue, 22 Oct 2013 17:10:16 +0100 -Subject: [PATCH 05/40] (hybris) Systemd handles control groups +Subject: [PATCH 05/50] (hybris) Systemd handles control groups Change-Id: I92ef4b2389544906be32169c57176575eb1719ec --- @@ -9,7 +9,7 @@ Change-Id: I92ef4b2389544906be32169c57176575eb1719ec 1 file changed, 8 deletions(-) diff --git a/rootdir/init.rc b/rootdir/init.rc -index 1a5a5537d..19847001f 100644 +index 897d392dc..10d11146a 100644 --- a/rootdir/init.rc +++ b/rootdir/init.rc @@ -24,14 +24,6 @@ on early-init diff --git a/system/core/0006-hybris-Mer-uses-udev.patch b/system/core/0006-hybris-Mer-uses-udev.patch index a1d5fc5..4ce2058 100644 --- a/system/core/0006-hybris-Mer-uses-udev.patch +++ b/system/core/0006-hybris-Mer-uses-udev.patch @@ -1,7 +1,7 @@ -From a8c1f04597a77afae9d43a61f7bf355d1b58b52e Mon Sep 17 00:00:00 2001 +From 0133e7aff942108fcbd57f228775ec253b0158f5 Mon Sep 17 00:00:00 2001 From: David Greaves Date: Tue, 22 Oct 2013 17:12:18 +0100 -Subject: [PATCH 06/40] (hybris) Mer uses udev +Subject: [PATCH 06/50] (hybris) Mer uses udev Change-Id: I7588a80db2c77879fb56d5decfd055224f20ab54 --- @@ -9,7 +9,7 @@ Change-Id: I7588a80db2c77879fb56d5decfd055224f20ab54 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/rootdir/init.rc b/rootdir/init.rc -index 19847001f..9f17717b1 100644 +index 10d11146a..02c89ffca 100644 --- a/rootdir/init.rc +++ b/rootdir/init.rc @@ -24,7 +24,7 @@ on early-init diff --git a/system/core/0007-hybris-Add-a-ready-trigger-to-init-to-run-post-boot.patch b/system/core/0007-hybris-Add-a-ready-trigger-to-init-to-run-post-boot.patch index d6cce75..c75decd 100644 --- a/system/core/0007-hybris-Add-a-ready-trigger-to-init-to-run-post-boot.patch +++ b/system/core/0007-hybris-Add-a-ready-trigger-to-init-to-run-post-boot.patch @@ -1,7 +1,7 @@ -From 74de00f618ff6fdd1a5f5f4ef6c403083037a777 Mon Sep 17 00:00:00 2001 +From 37942533d3a2ef0d0931260359d758131da31eba Mon Sep 17 00:00:00 2001 From: David Greaves Date: Wed, 20 Nov 2013 19:18:51 +0000 -Subject: [PATCH 07/40] (hybris) Add a ready trigger to init to run post boot +Subject: [PATCH 07/50] (hybris) Add a ready trigger to init to run post boot Change-Id: I9c828463424c0e82c3de0159db08299e7ce6fe06 --- diff --git a/system/core/0008-hybris-Notify-Mer-s-systemd-that-we-re-done.patch b/system/core/0008-hybris-Notify-Mer-s-systemd-that-we-re-done.patch index 5ff9c7a..68f43ac 100644 --- a/system/core/0008-hybris-Notify-Mer-s-systemd-that-we-re-done.patch +++ b/system/core/0008-hybris-Notify-Mer-s-systemd-that-we-re-done.patch @@ -1,7 +1,7 @@ -From 3ed0e0d5da9ccea17dc64e31aedb4f5eff3dd85a Mon Sep 17 00:00:00 2001 +From 13a9255e20f0dc85eaba455b308766890c9ea688 Mon Sep 17 00:00:00 2001 From: David Greaves Date: Wed, 20 Nov 2013 19:24:31 +0000 -Subject: [PATCH 08/40] (hybris) Notify Mer's systemd that we're done +Subject: [PATCH 08/50] (hybris) Notify Mer's systemd that we're done Change-Id: If6a16f43397f00c8e579af79ae6cf8459786e7b3 Signed-off-by: David Greaves @@ -10,10 +10,10 @@ Signed-off-by: David Greaves 1 file changed, 16 insertions(+) diff --git a/rootdir/init.rc b/rootdir/init.rc -index 9f17717b1..93dc5e13e 100644 +index 02c89ffca..8df3c1f17 100644 --- a/rootdir/init.rc +++ b/rootdir/init.rc -@@ -842,3 +842,19 @@ on property:ro.debuggable=1 +@@ -851,3 +851,19 @@ on property:ro.debuggable=1 service flash_recovery /system/bin/install-recovery.sh class main oneshot diff --git a/system/core/0009-hybris-Disable-usb-import.patch b/system/core/0009-hybris-Disable-usb-import.patch index 20ac1ff..b21e453 100644 --- a/system/core/0009-hybris-Disable-usb-import.patch +++ b/system/core/0009-hybris-Disable-usb-import.patch @@ -1,7 +1,7 @@ -From 376f432dc2193cb6b55ac7e51e9ed3205e6b8f8e Mon Sep 17 00:00:00 2001 +From c94660fa0cbbd9411a60973ef27efc6f67c5da31 Mon Sep 17 00:00:00 2001 From: David Greaves Date: Wed, 19 Feb 2014 19:02:32 +0000 -Subject: [PATCH 09/40] (hybris) Disable usb import +Subject: [PATCH 09/50] (hybris) Disable usb import Change-Id: I8aba60bc79fb4aab3854f0569b325ad69c5126d4 Signed-off-by: David Greaves @@ -10,7 +10,7 @@ Signed-off-by: David Greaves 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/rootdir/init.rc b/rootdir/init.rc -index 93dc5e13e..3f4dbe678 100644 +index 8df3c1f17..1fb018783 100644 --- a/rootdir/init.rc +++ b/rootdir/init.rc @@ -5,7 +5,8 @@ diff --git a/system/core/0010-hybris-allow-system-group-to-trigger-haptics.patch b/system/core/0010-hybris-allow-system-group-to-trigger-haptics.patch index ef19a64..4a2b13d 100644 --- a/system/core/0010-hybris-allow-system-group-to-trigger-haptics.patch +++ b/system/core/0010-hybris-allow-system-group-to-trigger-haptics.patch @@ -1,7 +1,7 @@ -From 09f754eabf39dfbdcdbec23e4ad6b5fb797ca37f Mon Sep 17 00:00:00 2001 +From 59de5609b0aa2dc83ba2315c2c78270c40f2ff60 Mon Sep 17 00:00:00 2001 From: Simonas Leleiva Date: Thu, 13 Mar 2014 08:51:53 +0000 -Subject: [PATCH 10/40] (hybris) allow system group to trigger haptics +Subject: [PATCH 10/50] (hybris) allow system group to trigger haptics Signed-off-by: Simonas Leleiva @@ -14,10 +14,10 @@ Change-Id: I9f1af094fa8a4ef48f4c3ea0ec35cb66d3c083d8 1 file changed, 3 insertions(+) diff --git a/rootdir/init.rc b/rootdir/init.rc -index 3f4dbe678..0f3b85b7d 100644 +index 1fb018783..37a1174d9 100644 --- a/rootdir/init.rc +++ b/rootdir/init.rc -@@ -744,6 +744,9 @@ on boot +@@ -750,6 +750,9 @@ on boot # Define default initial receive window size in segments. setprop net.tcp.default_init_rwnd 60 diff --git a/system/core/0011-hybris-trigger-late_start-on-property-change.patch b/system/core/0011-hybris-trigger-late_start-on-property-change.patch index 32e6bd8..e9ee681 100644 --- a/system/core/0011-hybris-trigger-late_start-on-property-change.patch +++ b/system/core/0011-hybris-trigger-late_start-on-property-change.patch @@ -1,7 +1,7 @@ -From b112eb2e0639e0312fab137ff3b023bd66c8c89a Mon Sep 17 00:00:00 2001 +From 6fd475a458ca4d3c51dfd1b231809a3786103e91 Mon Sep 17 00:00:00 2001 From: Simonas Leleiva Date: Tue, 18 Mar 2014 14:07:11 +0000 -Subject: [PATCH 11/40] (hybris) trigger late_start on property change +Subject: [PATCH 11/50] (hybris) trigger late_start on property change Android's late_start is triggered by mount_all, which also determines whether the /data partition is encrypted. @@ -20,10 +20,10 @@ Conflicts: 1 file changed, 5 insertions(+) diff --git a/rootdir/init.rc b/rootdir/init.rc -index 0f3b85b7d..70284ead7 100644 +index 37a1174d9..c104d72d5 100644 --- a/rootdir/init.rc +++ b/rootdir/init.rc -@@ -752,6 +752,7 @@ on boot +@@ -758,6 +758,7 @@ on boot class_start core @@ -31,7 +31,7 @@ index 0f3b85b7d..70284ead7 100644 on nonencrypted class_start main class_start late_start -@@ -759,6 +760,10 @@ on nonencrypted +@@ -765,6 +766,10 @@ on nonencrypted on property:sys.init_log_level=* loglevel ${sys.init_log_level} diff --git a/system/core/0012-hybris-property_service.c-adding-support-for-getprop.patch b/system/core/0012-hybris-property_service.c-adding-support-for-getprop.patch index 4288cca..6153277 100644 --- a/system/core/0012-hybris-property_service.c-adding-support-for-getprop.patch +++ b/system/core/0012-hybris-property_service.c-adding-support-for-getprop.patch @@ -1,7 +1,7 @@ -From 7c88d33ebd233c5f1225b7c4b43ed09b877f058f Mon Sep 17 00:00:00 2001 +From b012.23.024a0bb38d2ac30f696a9a2061bf99db Mon Sep 17 00:00:00 2001 From: Ricardo Salveti de Araujo Date: Thu, 31 Oct 2013 12:19:19 +0200 -Subject: [PATCH 12/40] (hybris) property_service.c: adding support for getprop +Subject: [PATCH 12/50] (hybris) property_service.c: adding support for getprop and listprop MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 diff --git a/system/core/0013-hybris-reach-main-init-state.patch b/system/core/0013-hybris-reach-main-init-state.patch index 9486d9c..7767455 100644 --- a/system/core/0013-hybris-reach-main-init-state.patch +++ b/system/core/0013-hybris-reach-main-init-state.patch @@ -1,7 +1,7 @@ -From ce33e4c319ab68a3d19b8f0705ee843be6abb6fa Mon Sep 17 00:00:00 2001 +From e9af320c091fa528c32a29e4b74b282d86ef0847 Mon Sep 17 00:00:00 2001 From: Simonas Leleiva Date: Sat, 22 Aug 2015 12:03:42 +0100 -Subject: [PATCH 13/40] (hybris) reach main init state +Subject: [PATCH 13/50] (hybris) reach main init state Change-Id: I471f48afaebf91c92f0d2a7bd3a24c5d1fa58ecd --- @@ -9,7 +9,7 @@ Change-Id: I471f48afaebf91c92f0d2a7bd3a24c5d1fa58ecd 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/rootdir/init.rc b/rootdir/init.rc -index 70284ead7..f44b75501 100644 +index c104d72d5..2e9d1b736 100644 --- a/rootdir/init.rc +++ b/rootdir/init.rc @@ -342,7 +342,7 @@ on late-init diff --git a/system/core/0014-hybris-Disable-setting-hostname-and-domainname-in-in.patch b/system/core/0014-hybris-Disable-setting-hostname-and-domainname-in-in.patch index 60b6386..2968f9f 100644 --- a/system/core/0014-hybris-Disable-setting-hostname-and-domainname-in-in.patch +++ b/system/core/0014-hybris-Disable-setting-hostname-and-domainname-in-in.patch @@ -1,7 +1,7 @@ -From 2907bd88ef1288c189e6c4e0599157cd097f35dc Mon Sep 17 00:00:00 2001 +From 3642f27d982b64ba2c382ea1e1e15a89730ede56 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Matti=20Lehtim=C3=A4ki?= Date: Sat, 6 Aug 2016 11:37:38 +0300 -Subject: [PATCH 14/40] (hybris) Disable setting hostname and domainname in +Subject: [PATCH 14/50] (hybris) Disable setting hostname and domainname in init.rc. Change-Id: I5b9f59e80760e53636763c89f8f76f350c17b3ec @@ -10,7 +10,7 @@ Change-Id: I5b9f59e80760e53636763c89f8f76f350c17b3ec 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/rootdir/init.rc b/rootdir/init.rc -index f44b75501..041e1e5df 100644 +index 2e9d1b736..8b635876c 100644 --- a/rootdir/init.rc +++ b/rootdir/init.rc @@ -646,8 +646,9 @@ on zygote-start && property:ro.crypto.state=encrypted && property:ro.crypto.type diff --git a/system/core/0015-hybris-Update-rootdir-for-64bit-libs.patch b/system/core/0015-hybris-Update-rootdir-for-64bit-libs.patch index 0939fce..49a338c 100644 --- a/system/core/0015-hybris-Update-rootdir-for-64bit-libs.patch +++ b/system/core/0015-hybris-Update-rootdir-for-64bit-libs.patch @@ -1,7 +1,7 @@ -From 08365a541664a8545cd71e1e0f9afa64647c2fd5 Mon Sep 17 00:00:00 2001 +From 51acad44e8ae673dcdde66da5980a1bdce9d3ab0 Mon Sep 17 00:00:00 2001 From: Martin Ghosal Date: Sat, 15 Oct 2016 15:38:47 +0100 -Subject: [PATCH 15/40] (hybris) Update rootdir for 64bit libs +Subject: [PATCH 15/50] (hybris) Update rootdir for 64bit libs Change-Id: I593ae40da755c116bb28c96dcace863e6b30b4cc --- diff --git a/system/core/0016-hybris-Disable-all-zygote-variations.patch b/system/core/0016-hybris-Disable-all-zygote-variations.patch index 0307ca2..6969763 100644 --- a/system/core/0016-hybris-Disable-all-zygote-variations.patch +++ b/system/core/0016-hybris-Disable-all-zygote-variations.patch @@ -1,7 +1,7 @@ -From 0b06b24ac5054ab07794465ed25b23069216f97b Mon Sep 17 00:00:00 2001 +From 0da90c161feb77a57cd82e33813894610b7444a9 Mon Sep 17 00:00:00 2001 From: Martin Ghosal Date: Sun, 8 Jan 2017 16:34:54 +0000 -Subject: [PATCH 16/40] (hybris) Disable all zygote variations +Subject: [PATCH 16/50] (hybris) Disable all zygote variations Change-Id: Ie1ad26486f47b3bf67134db917b3c9e51536904c --- diff --git a/system/core/0017-hybris-Disable-ueventd-service.patch b/system/core/0017-hybris-Disable-ueventd-service.patch index 7e59915..573ff97 100644 --- a/system/core/0017-hybris-Disable-ueventd-service.patch +++ b/system/core/0017-hybris-Disable-ueventd-service.patch @@ -1,7 +1,7 @@ -From f6b43a3b1114018c3011a12722062ceb8593d0fa Mon Sep 17 00:00:00 2001 +From 19472a4180ff9d75a919fa0cc626bc59d77936c8 Mon Sep 17 00:00:00 2001 From: Martin Ghosal Date: Sun, 8 Jan 2017 17:16:08 +0000 -Subject: [PATCH 17/40] (hybris) Disable ueventd service +Subject: [PATCH 17/50] (hybris) Disable ueventd service Change-Id: I8ee7b863a533f4a6ef7658ef1c1ef4bdb95d5d65 --- @@ -9,10 +9,10 @@ Change-Id: I8ee7b863a533f4a6ef7658ef1c1ef4bdb95d5d65 1 file changed, 2 insertions(+) diff --git a/rootdir/init.rc b/rootdir/init.rc -index 041e1e5df..38b09a397 100644 +index 8b635876c..c66608d9c 100644 --- a/rootdir/init.rc +++ b/rootdir/init.rc -@@ -833,6 +833,8 @@ service ueventd /system/bin/ueventd +@@ -842,6 +842,8 @@ service ueventd /system/bin/ueventd critical seclabel u:r:ueventd:s0 shutdown critical diff --git a/system/core/0018-hybris-Disable-SELinux.patch b/system/core/0018-hybris-Disable-SELinux.patch index d3e2ae5..a9eac4c 100644 --- a/system/core/0018-hybris-Disable-SELinux.patch +++ b/system/core/0018-hybris-Disable-SELinux.patch @@ -1,7 +1,7 @@ -From 9105a073c94fee5a2758b2c8bb24e3c987c712ef Mon Sep 17 00:00:00 2001 +From 530e84916fc5a241395dd6ce75afb1b58935e0fb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Matti=20Lehtim=C3=A4ki?= Date: Thu, 9 Feb 2017 21:48:19 +0200 -Subject: [PATCH 18/40] (hybris) Disable SELinux +Subject: [PATCH 18/50] (hybris) Disable SELinux Change-Id: I0511b2a0de1b20996f4fb8e9f3569acb41e2cf0f --- @@ -38,7 +38,7 @@ index 86238b430..a47baebfe 100644 LOG(INFO) << "Loading SELinux policy"; diff --git a/init/service.cpp b/init/service.cpp -index ccc37b70c..c17afb246 100644 +index 2db548efe..21b22aefb 100644 --- a/init/service.cpp +++ b/init/service.cpp @@ -70,6 +70,9 @@ using android::base::WriteStringToFile; @@ -75,7 +75,7 @@ index ccc37b70c..c17afb246 100644 if (priority_ != 0) { if (setpriority(PRIO_PROCESS, 0, priority_) != 0) { PLOG(FATAL) << "setpriority failed for " << name_; -@@ -933,6 +941,9 @@ Result Service::Start() { +@@ -934,6 +942,9 @@ Result Service::Start() { } std::string scon; @@ -85,7 +85,7 @@ index ccc37b70c..c17afb246 100644 if (!seclabel_.empty()) { scon = seclabel_; } else { -@@ -952,7 +963,7 @@ Result Service::Start() { +@@ -953,7 +964,7 @@ Result Service::Start() { } post_data_ = ServiceList::GetInstance().IsPostData(); diff --git a/system/core/0019-hybris-Properly-handle-shutdown-from-Mer.patch b/system/core/0019-hybris-Properly-handle-shutdown-from-Mer.patch index 5be9ce8..99faf9a 100644 --- a/system/core/0019-hybris-Properly-handle-shutdown-from-Mer.patch +++ b/system/core/0019-hybris-Properly-handle-shutdown-from-Mer.patch @@ -1,7 +1,7 @@ -From 02af776981132783f359f88bfb6c321547714352 Mon Sep 17 00:00:00 2001 +From 9b688f7fc4342770c933e132a6e3b6ba4130c30d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Matti=20Lehtim=C3=A4ki?= Date: Sat, 8 Jul 2017 00:27:20 +0300 -Subject: [PATCH 19/40] (hybris) Properly handle shutdown from Mer. +Subject: [PATCH 19/50] (hybris) Properly handle shutdown from Mer. Change-Id: I89daebb9559d38f3c639f4634c417252c7a92fe0 --- @@ -9,10 +9,10 @@ Change-Id: I89daebb9559d38f3c639f4634c417252c7a92fe0 1 file changed, 9 insertions(+) diff --git a/rootdir/init.rc b/rootdir/init.rc -index 38b09a397..6f9037b7e 100644 +index c66608d9c..0406dcb65 100644 --- a/rootdir/init.rc +++ b/rootdir/init.rc -@@ -868,6 +868,15 @@ service droid_init_done /bin/sh /usr/bin/droid/droid-init-done.sh +@@ -877,6 +877,15 @@ service droid_init_done /bin/sh /usr/bin/droid/droid-init-done.sh class mer oneshot diff --git a/system/core/0020-hybris-Use-services-from-usr-libexec-droid-hybris-sy.patch b/system/core/0020-hybris-Use-services-from-usr-libexec-droid-hybris-sy.patch index e7d5c6e..616920d 100644 --- a/system/core/0020-hybris-Use-services-from-usr-libexec-droid-hybris-sy.patch +++ b/system/core/0020-hybris-Use-services-from-usr-libexec-droid-hybris-sy.patch @@ -1,7 +1,7 @@ -From cb3474915386a486a680d5110fb4005b573303e2 Mon Sep 17 00:00:00 2001 +From 45620e6ef26f76c69119a341763e3569ba9d3f1c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Matti=20Lehtim=C3=A4ki?= Date: Thu, 9 Feb 2017 21:57:47 +0200 -Subject: [PATCH 20/40] (hybris) Use services from +Subject: [PATCH 20/50] (hybris) Use services from /usr/libexec/droid-hybris/system/etc/init/. Change-Id: I6185781c2bd6a2db281201ad705394f4d6d24131 diff --git a/system/core/0021-hybris-Remove-LD_LIBRARY_PATH-from-init.environ.rc.patch b/system/core/0021-hybris-Remove-LD_LIBRARY_PATH-from-init.environ.rc.patch index 2c0682f..b5cd16e 100644 --- a/system/core/0021-hybris-Remove-LD_LIBRARY_PATH-from-init.environ.rc.patch +++ b/system/core/0021-hybris-Remove-LD_LIBRARY_PATH-from-init.environ.rc.patch @@ -1,7 +1,7 @@ -From 5a20c1057d5bb8e284f85236c263365bf9920a78 Mon Sep 17 00:00:00 2001 +From b1c8cae24979597d2db6757923b4e874df244b67 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Matti=20Lehtim=C3=A4ki?= Date: Tue, 17 Oct 2017 21:58:40 +0300 -Subject: [PATCH 21/40] (hybris) Remove LD_LIBRARY_PATH from init.environ.rc +Subject: [PATCH 21/50] (hybris) Remove LD_LIBRARY_PATH from init.environ.rc Change-Id: I52a2c733f609f90b6ac31be72a4f8fe7681beac0 --- diff --git a/system/core/0022-hybris-define-32-bit-LD_LIBRARY_PATH-for-32-bit-devi.patch b/system/core/0022-hybris-define-32-bit-LD_LIBRARY_PATH-for-32-bit-devi.patch index 5bdc26f..18acd97 100644 --- a/system/core/0022-hybris-define-32-bit-LD_LIBRARY_PATH-for-32-bit-devi.patch +++ b/system/core/0022-hybris-define-32-bit-LD_LIBRARY_PATH-for-32-bit-devi.patch @@ -1,7 +1,7 @@ -From 988accccc17569f44945b4d89a7881240200e747 Mon Sep 17 00:00:00 2001 +From 6ab44dda7269ac17b84712d80bf3f19cf2ba2487 Mon Sep 17 00:00:00 2001 From: Franz-Josef Haider Date: Wed, 25 Oct 2017 14:14:59 +0300 -Subject: [PATCH 22/40] (hybris) define 32-bit LD_LIBRARY_PATH for 32-bit +Subject: [PATCH 22/50] (hybris) define 32-bit LD_LIBRARY_PATH for 32-bit devices --- @@ -13,7 +13,7 @@ Subject: [PATCH 22/40] (hybris) define 32-bit LD_LIBRARY_PATH for 32-bit create mode 100644 rootdir/init.extraenv.armeabi-v7a.rc diff --git a/rootdir/Android.mk b/rootdir/Android.mk -index 7ff1588b2..407550449 100644 +index 24b39991a..e603d2c34 100644 --- a/rootdir/Android.mk +++ b/rootdir/Android.mk @@ -8,7 +8,18 @@ LOCAL_MODULE := init.rc @@ -57,7 +57,7 @@ index 000000000..c96e2c65d +on init + export LD_LIBRARY_PATH /usr/libexec/droid-hybris/lib-dev-alog:/vendor/lib:/system/lib diff --git a/rootdir/init.rc b/rootdir/init.rc -index 6f9037b7e..78c99eaaf 100644 +index 0406dcb65..543970e46 100644 --- a/rootdir/init.rc +++ b/rootdir/init.rc @@ -4,6 +4,12 @@ diff --git a/system/core/0023-hybris-Fix-list-and-get-properties.patch b/system/core/0023-hybris-Fix-list-and-get-properties.patch index 3b96c98..cb5e245 100644 --- a/system/core/0023-hybris-Fix-list-and-get-properties.patch +++ b/system/core/0023-hybris-Fix-list-and-get-properties.patch @@ -1,7 +1,7 @@ -From 3a1260bbc727738877c848f412655fbc315e1882 Mon Sep 17 00:00:00 2001 +From a075866fe514ac689a60b006c81acba930cc9a62 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Matti=20Lehtim=C3=A4ki?= Date: Tue, 16 Jan 2018 16:18:31 +0200 -Subject: [PATCH 23/40] (hybris) Fix list and get properties. +Subject: [PATCH 23/50] (hybris) Fix list and get properties. Change-Id: I9deb65f147e941fc5c9f91793f851440d02260e1 --- diff --git a/system/core/0024-hybris-more-SELinux-disablement.patch b/system/core/0024-hybris-more-SELinux-disablement.patch index c5cb7cd..5632eef 100644 --- a/system/core/0024-hybris-more-SELinux-disablement.patch +++ b/system/core/0024-hybris-more-SELinux-disablement.patch @@ -1,7 +1,7 @@ -From d809ec4dad4f78c4d916641192cdf4fbbb1d096f Mon Sep 17 00:00:00 2001 +From 260750e58e471a94508d56b3282dc1e475ef2f40 Mon Sep 17 00:00:00 2001 From: Simonas Leleiva Date: Wed, 18 Apr 2018 18:49:02 +0200 -Subject: [PATCH 24/40] (hybris) more SELinux disablement +Subject: [PATCH 24/50] (hybris) more SELinux disablement Change-Id: Ic1bc474e993f2b66ab9114e88d7ec4f718a99d5c Signed-off-by: Simonas Leleiva diff --git a/system/core/0025-hybris-don-t-try-to-mount-since-mer-handles-this.patch b/system/core/0025-hybris-don-t-try-to-mount-since-mer-handles-this.patch index a909c5a..2c4f3bc 100644 --- a/system/core/0025-hybris-don-t-try-to-mount-since-mer-handles-this.patch +++ b/system/core/0025-hybris-don-t-try-to-mount-since-mer-handles-this.patch @@ -1,7 +1,7 @@ -From c5a87a9c9600b792369a774709417ab6aa406fdd Mon Sep 17 00:00:00 2001 +From 351ea2bed9126be3fd0225078f73770b54c25d81 Mon Sep 17 00:00:00 2001 From: Franz-Josef Haider Date: Mon, 4 Jun 2018 10:00:13 +0200 -Subject: [PATCH 25/40] (hybris) don't try to mount since mer handles this +Subject: [PATCH 25/50] (hybris) don't try to mount since mer handles this Change-Id: I305ac649fd199ef11a8d88d350f1fc06171bc0ba --- diff --git a/system/core/0026-hybris-avoid-attempting-to-mount-partitions-mer-syst.patch b/system/core/0026-hybris-avoid-attempting-to-mount-partitions-mer-syst.patch index 94e7823..7994621 100644 --- a/system/core/0026-hybris-avoid-attempting-to-mount-partitions-mer-syst.patch +++ b/system/core/0026-hybris-avoid-attempting-to-mount-partitions-mer-syst.patch @@ -1,7 +1,7 @@ -From 0671793a09083e01156fa20c8a269aff697da52b Mon Sep 17 00:00:00 2001 +From 1d8767d941aaf0a1b1df5768b58cbc02d8886d8e Mon Sep 17 00:00:00 2001 From: Franz-Josef Haider Date: Wed, 6 Jun 2018 09:28:27 +0200 -Subject: [PATCH 26/40] (hybris) avoid attempting to mount partitions, +Subject: [PATCH 26/50] (hybris) avoid attempting to mount partitions, mer/systemd handles this Even partitions weren't mounted by this previously it still would produce an diff --git a/system/core/0027-hybris-load-services-from-droid-hybris-as-early-as-p.patch b/system/core/0027-hybris-load-services-from-droid-hybris-as-early-as-p.patch index 699afc2..fbc1d7a 100644 --- a/system/core/0027-hybris-load-services-from-droid-hybris-as-early-as-p.patch +++ b/system/core/0027-hybris-load-services-from-droid-hybris-as-early-as-p.patch @@ -1,7 +1,7 @@ -From b4962068222460a076c3a6a1b130a6ce8d10d57d Mon Sep 17 00:00:00 2001 +From bd3f137354a9f5187c8d7df97a1ea30ae185474d Mon Sep 17 00:00:00 2001 From: Franz-Josef Haider Date: Wed, 6 Jun 2018 09:30:01 +0200 -Subject: [PATCH 27/40] (hybris) load services from droid-hybris as early as +Subject: [PATCH 27/50] (hybris) load services from droid-hybris as early as possible This makes sure our service definitions are loaded first and can be used to diff --git a/system/core/0028-hybris-disable-remnants-of-SELinux-which-currently-b.patch b/system/core/0028-hybris-disable-remnants-of-SELinux-which-currently-b.patch index 95f3ccc..6c451ce 100644 --- a/system/core/0028-hybris-disable-remnants-of-SELinux-which-currently-b.patch +++ b/system/core/0028-hybris-disable-remnants-of-SELinux-which-currently-b.patch @@ -1,7 +1,7 @@ -From cc43550e4912973cfb2dbebdfb980f80fccc8e0d Mon Sep 17 00:00:00 2001 +From 0183f3623835f2d95f4fd930bc9a260a4b8f7cea Mon Sep 17 00:00:00 2001 From: Franz-Josef Haider Date: Wed, 6 Jun 2018 09:32:06 +0200 -Subject: [PATCH 28/40] (hybris) disable remnants of SELinux which currently +Subject: [PATCH 28/50] (hybris) disable remnants of SELinux which currently break Change-Id: I252a8399c9853d993fc17d769bfbb2e4c722cfe8 diff --git a/system/core/0029-hybris-disable-the-usage-of-libprocessgroup-since-it.patch b/system/core/0029-hybris-disable-the-usage-of-libprocessgroup-since-it.patch index b3a0d5f..755c412 100644 --- a/system/core/0029-hybris-disable-the-usage-of-libprocessgroup-since-it.patch +++ b/system/core/0029-hybris-disable-the-usage-of-libprocessgroup-since-it.patch @@ -1,7 +1,7 @@ -From 6145125c01cb798a1a7cbea40239c71abb54603a Mon Sep 17 00:00:00 2001 +From 84c3120a703b845f6013a710bf892bab4307b621 Mon Sep 17 00:00:00 2001 From: Franz-Josef Haider Date: Wed, 6 Jun 2018 09:33:03 +0200 -Subject: [PATCH 29/40] (hybris) disable the usage of libprocessgroup, since it +Subject: [PATCH 29/50] (hybris) disable the usage of libprocessgroup, since it is incompatible. Change-Id: Ie37ac0dcc5cabbf33de55c148009fdfff3e90c64 @@ -46,7 +46,7 @@ index 28a2d6661..8ff468ea9 100644 #ifndef RECOVERY diff --git a/init/service.cpp b/init/service.cpp -index c17afb246..8f8f54230 100644 +index 21b22aefb..b39282d53 100644 --- a/init/service.cpp +++ b/init/service.cpp @@ -38,7 +38,6 @@ @@ -81,7 +81,7 @@ index c17afb246..8f8f54230 100644 } } -@@ -1012,6 +1019,7 @@ Result Service::Start() { +@@ -1013,6 +1020,7 @@ Result Service::Start() { std::for_each(descriptors_.begin(), descriptors_.end(), std::bind(&DescriptorInfo::CreateAndPublish, std::placeholders::_1, scon)); @@ -89,7 +89,7 @@ index c17afb246..8f8f54230 100644 // See if there were "writepid" instructions to write to files under cpuset path. std::string cpuset_path; if (CgroupGetControllerPath("cpuset", &cpuset_path)) { -@@ -1069,6 +1077,7 @@ Result Service::Start() { +@@ -1070,6 +1078,7 @@ Result Service::Start() { PLOG(ERROR) << "cannot execve('" << args_[0] << "')"; } @@ -97,7 +97,7 @@ index c17afb246..8f8f54230 100644 _exit(127); } -@@ -1091,8 +1100,11 @@ Result Service::Start() { +@@ -1092,8 +1101,11 @@ Result Service::Start() { start_order_ = next_start_order_++; process_cgroup_empty_ = false; @@ -109,7 +109,7 @@ index c17afb246..8f8f54230 100644 errno = -createProcessGroup(uid_, pid_, use_memcg); if (errno != 0) { PLOG(ERROR) << "createProcessGroup(" << uid_ << ", " << pid_ << ") failed for service '" -@@ -1137,7 +1149,8 @@ Result Service::Start() { +@@ -1138,7 +1150,8 @@ Result Service::Start() { } } } diff --git a/system/core/0030-hybris-disable-vendor-symlink.patch b/system/core/0030-hybris-disable-vendor-symlink.patch index d545cec..13aca52 100644 --- a/system/core/0030-hybris-disable-vendor-symlink.patch +++ b/system/core/0030-hybris-disable-vendor-symlink.patch @@ -1,7 +1,7 @@ -From d9b76fd06ab672735202a270bfd9e770a781bb53 Mon Sep 17 00:00:00 2001 +From 9a27750a2b278c27445425edf52bb1590b5146c9 Mon Sep 17 00:00:00 2001 From: Franz-Josef Haider Date: Thu, 7 Jun 2018 15:29:53 +0000 -Subject: [PATCH 30/40] (hybris) disable vendor symlink +Subject: [PATCH 30/50] (hybris) disable vendor symlink Change-Id: I26a32268e2f3af7ab0550397900f7a3ef0edfae5 --- @@ -9,7 +9,7 @@ Change-Id: I26a32268e2f3af7ab0550397900f7a3ef0edfae5 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/rootdir/init.rc b/rootdir/init.rc -index 78c99eaaf..572b8c309 100644 +index 543970e46..29d8af76a 100644 --- a/rootdir/init.rc +++ b/rootdir/init.rc @@ -56,7 +56,9 @@ on init diff --git a/system/core/0031-hybris-ignore-mount-and-mkdir-tmp-commands-entirely.patch b/system/core/0031-hybris-ignore-mount-and-mkdir-tmp-commands-entirely.patch index b5b9207..30a6acb 100644 --- a/system/core/0031-hybris-ignore-mount-and-mkdir-tmp-commands-entirely.patch +++ b/system/core/0031-hybris-ignore-mount-and-mkdir-tmp-commands-entirely.patch @@ -1,7 +1,7 @@ -From d169848a583bd6d281e96fca3affa225b7955c2b Mon Sep 17 00:00:00 2001 +From 108b8eee47e032f4d1049a2d0eea1ad512475df4 Mon Sep 17 00:00:00 2001 From: Franz-Josef Haider Date: Mon, 27 Aug 2018 11:08:12 +0000 -Subject: [PATCH 31/40] (hybris) ignore "mount" and "mkdir /tmp" commands +Subject: [PATCH 31/50] (hybris) ignore "mount" and "mkdir /tmp" commands entirely. mount is usually removed during build, but if the *.rc files are on diff --git a/system/core/0032-hybris-Fix-actdead-charging-animation.-MER-1949.patch b/system/core/0032-hybris-Fix-actdead-charging-animation.-MER-1949.patch index 14d8dc3..5a39b54 100644 --- a/system/core/0032-hybris-Fix-actdead-charging-animation.-MER-1949.patch +++ b/system/core/0032-hybris-Fix-actdead-charging-animation.-MER-1949.patch @@ -1,17 +1,17 @@ -From 1045d181b582bdfe1654a9e0b88f9937afeccd9b Mon Sep 17 00:00:00 2001 +From 1ac6ca6abb8c016bf9c85287d546bbe0b32a61a9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Matti=20Lehtim=C3=A4ki?= Date: Thu, 30 Aug 2018 19:54:16 +0300 -Subject: [PATCH 32/40] (hybris) Fix actdead charging animation. MER#1949 +Subject: [PATCH 32/50] (hybris) Fix actdead charging animation. MER#1949 --- rootdir/init.rc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/rootdir/init.rc b/rootdir/init.rc -index 572b8c309..235d5deea 100644 +index 29d8af76a..70a15977e 100644 --- a/rootdir/init.rc +++ b/rootdir/init.rc -@@ -776,7 +776,7 @@ on property:droid.late_start=trigger_late_start +@@ -782,7 +782,7 @@ on property:droid.late_start=trigger_late_start class_start late_start on charger diff --git a/system/core/0033-hybris-system-core-Disable-usb-config.patch b/system/core/0033-hybris-system-core-Disable-usb-config.patch index 0c83508..9a7e0e2 100644 --- a/system/core/0033-hybris-system-core-Disable-usb-config.patch +++ b/system/core/0033-hybris-system-core-Disable-usb-config.patch @@ -1,7 +1,7 @@ -From db01ff150d9109bb408b55c0b1f7ee5af4dc39cc Mon Sep 17 00:00:00 2001 +From 89179ec5b69057cfb17223c18179dbd8063be9a4 Mon Sep 17 00:00:00 2001 From: Matti Kosola Date: Tue, 21 Feb 2017 13:13:26 +0100 -Subject: [PATCH 33/40] (hybris)[system/core] Disable usb config. +Subject: [PATCH 33/50] (hybris)[system/core] Disable usb config. Signed-off-by: Matti Kosola --- @@ -9,7 +9,7 @@ Signed-off-by: Matti Kosola 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/rootdir/init.rc b/rootdir/init.rc -index 235d5deea..b241ba33b 100644 +index 70a15977e..5d5468262 100644 --- a/rootdir/init.rc +++ b/rootdir/init.rc @@ -15,7 +15,7 @@ import /init.environ.rc diff --git a/system/core/0034-hybris-Remove-sbin-from-droid-PATH.patch b/system/core/0034-hybris-Remove-sbin-from-droid-PATH.patch index a533898..d6ead67 100644 --- a/system/core/0034-hybris-Remove-sbin-from-droid-PATH.patch +++ b/system/core/0034-hybris-Remove-sbin-from-droid-PATH.patch @@ -1,7 +1,7 @@ -From 92d86677baf15c7cd45f1440097ffed3d5238afc Mon Sep 17 00:00:00 2001 +From 2041529d9c5666862e174151dfa9df9d4ae9e7ce Mon Sep 17 00:00:00 2001 From: Jussi Laakkonen Date: Wed, 31 Jan 2018 17:12:14 +0200 -Subject: [PATCH 34/40] (hybris) Remove /sbin from droid PATH. +Subject: [PATCH 34/50] (hybris) Remove /sbin from droid PATH. --- rootdir/init.environ.rc.in | 2 +- diff --git a/system/core/0035-hybris-Fix-return-value-type-of-mount-command.patch b/system/core/0035-hybris-Fix-return-value-type-of-mount-command.patch index 5f98ef5..cb6de7d 100644 --- a/system/core/0035-hybris-Fix-return-value-type-of-mount-command.patch +++ b/system/core/0035-hybris-Fix-return-value-type-of-mount-command.patch @@ -1,7 +1,7 @@ -From 8a98d93214bbde8f350780b5c0fbd41f0160a30c Mon Sep 17 00:00:00 2001 +From a651ef33d8b26ae38196bd5ba64cf3aa7415f8a8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Matti=20Lehtim=C3=A4ki?= Date: Sun, 18 Nov 2018 18:51:22 +0200 -Subject: [PATCH 35/40] (hybris) Fix return value type of mount command. +Subject: [PATCH 35/50] (hybris) Fix return value type of mount command. Change-Id: Ib759e1be92d110863e43f13f7317372c6182a02d --- diff --git a/system/core/0036-hybris-disable-some-more-selinux-functionality.patch b/system/core/0036-hybris-disable-some-more-selinux-functionality.patch index 1b22194..2bb70a3 100644 --- a/system/core/0036-hybris-disable-some-more-selinux-functionality.patch +++ b/system/core/0036-hybris-disable-some-more-selinux-functionality.patch @@ -1,7 +1,7 @@ -From cbefe01dd0c205002462256ecc33d6a54efdbce7 Mon Sep 17 00:00:00 2001 +From 233d54ef951c478b2076821f216d479456e5d454 Mon Sep 17 00:00:00 2001 From: Franz-Josef Haider Date: Thu, 28 Mar 2019 12:46:12 -0400 -Subject: [PATCH 36/40] (hybris) disable some more selinux functionality. +Subject: [PATCH 36/50] (hybris) disable some more selinux functionality. Change-Id: Ie63eb13b73d626668b32041fec4400cf2edd2fe5 --- diff --git a/system/core/0037-hybris-Disable-mnt-tmpfs-creation.patch b/system/core/0037-hybris-Disable-mnt-tmpfs-creation.patch index d957785..c19b9c3 100644 --- a/system/core/0037-hybris-Disable-mnt-tmpfs-creation.patch +++ b/system/core/0037-hybris-Disable-mnt-tmpfs-creation.patch @@ -1,7 +1,7 @@ -From 0feaaaf0e71e35a94faf3ab76707d52e0cf8dbfe Mon Sep 17 00:00:00 2001 +From ae0512307ee34ecff25f6dc25f3dc5c5c65c6c3a Mon Sep 17 00:00:00 2001 From: Franz-Josef Haider Date: Mon, 3 Jun 2019 13:46:44 +0200 -Subject: [PATCH 37/40] (hybris) Disable /mnt tmpfs creation +Subject: [PATCH 37/50] (hybris) Disable /mnt tmpfs creation Change-Id: I7c4fb119475adc345104f6ac5a68b578b6b2d433 --- diff --git a/system/core/0038-hybris-Disable-init_user0-which-is-not-needed-on-Mer.patch b/system/core/0038-hybris-Disable-init_user0-which-is-not-needed-on-Mer.patch index b761e99..9dd4581 100644 --- a/system/core/0038-hybris-Disable-init_user0-which-is-not-needed-on-Mer.patch +++ b/system/core/0038-hybris-Disable-init_user0-which-is-not-needed-on-Mer.patch @@ -1,14 +1,14 @@ -From c6aa11add72792efa0dfe989703b27761ed650b6 Mon Sep 17 00:00:00 2001 +From 1e5788e7141ee30063d8652e0079e8ce0370b8b1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Matti=20Lehtim=C3=A4ki?= Date: Mon, 10 Dec 2018 12:11:06 +0200 -Subject: [PATCH 38/40] (hybris) Disable init_user0 which is not needed on Mer. +Subject: [PATCH 38/50] (hybris) Disable init_user0 which is not needed on Mer. --- rootdir/init.rc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/rootdir/init.rc b/rootdir/init.rc -index b241ba33b..1236c6919 100644 +index 5d5468262..c5e71291d 100644 --- a/rootdir/init.rc +++ b/rootdir/init.rc @@ -605,7 +605,7 @@ on post-fs-data diff --git a/system/core/0039-hybris-Disable-SELinux-init.patch b/system/core/0039-hybris-Disable-SELinux-init.patch index 37bfceb..b4af56e 100644 --- a/system/core/0039-hybris-Disable-SELinux-init.patch +++ b/system/core/0039-hybris-Disable-SELinux-init.patch @@ -1,7 +1,7 @@ -From 9e404a42d8916112cdcc4f503b2004b09d424257 Mon Sep 17 00:00:00 2001 +From 57cc123a345acb3d062a02630bcfcb9920cb1811 Mon Sep 17 00:00:00 2001 From: Matti Kosola Date: Wed, 4 Sep 2019 12:07:34 +0200 -Subject: [PATCH 39/40] (hybris) Disable SELinux init. +Subject: [PATCH 39/50] (hybris) Disable SELinux init. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit diff --git a/system/core/0040-hybris-Disable-unused-code-that-was-disabled-by-priv.patch b/system/core/0040-hybris-Disable-unused-code-that-was-disabled-by-prev.patch similarity index 86% rename from system/core/0040-hybris-Disable-unused-code-that-was-disabled-by-priv.patch rename to system/core/0040-hybris-Disable-unused-code-that-was-disabled-by-prev.patch index 9e07c8e..1565452 100644 --- a/system/core/0040-hybris-Disable-unused-code-that-was-disabled-by-priv.patch +++ b/system/core/0040-hybris-Disable-unused-code-that-was-disabled-by-prev.patch @@ -1,8 +1,8 @@ -From fc94f8187298d3deaa1e7ad836abe91558840192 Mon Sep 17 00:00:00 2001 +From 51435676f9d86e092dcef1c36aa998b726db2f7e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bj=C3=B6rn=20Bidar?= Date: Sun, 20 Oct 2019 15:19:55 +0200 -Subject: [PATCH 40/40] (hybris) Disable unused code that was disabled by - privous patches. +Subject: [PATCH 40/50] (hybris) Disable unused code that was disabled by + previous patches. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit @@ -14,7 +14,7 @@ Signed-off-by: Björn Bidar 1 file changed, 3 insertions(+) diff --git a/init/service.cpp b/init/service.cpp -index 8f8f54230..30f2508a4 100644 +index b39282d53..e77423eea 100644 --- a/init/service.cpp +++ b/init/service.cpp @@ -190,6 +190,7 @@ Result Service::EnterNamespaces() const { diff --git a/system/core/0041-hybris-Don-t-create-mount-proc-apex-dev-null-random.patch b/system/core/0041-hybris-Don-t-create-mount-proc-apex-dev-null-random.patch new file mode 100644 index 0000000..3bb1515 --- /dev/null +++ b/system/core/0041-hybris-Don-t-create-mount-proc-apex-dev-null-random.patch @@ -0,0 +1,77 @@ +From 740af4a340658bc08ef96ff2648069073c8e1f19 Mon Sep 17 00:00:00 2001 +From: Franz-Josef Haider +Date: Mon, 12 Oct 2020 14:22:46 +0000 +Subject: [PATCH 41/50] (hybris) Don't create/mount proc, apex, dev/null, + random, ... + +Signed-off-by: Simonas Leleiva +Change-Id: I3040e7e1ddf6d30644d8dc249ed3f0a6d6633615 +--- + init/first_stage_init.cpp | 24 ++++++++++++------------ + 1 file changed, 12 insertions(+), 12 deletions(-) + +diff --git a/init/first_stage_init.cpp b/init/first_stage_init.cpp +index 805bad2e5..a60e91f83 100644 +--- a/init/first_stage_init.cpp ++++ b/init/first_stage_init.cpp +@@ -124,7 +124,7 @@ int FirstStageMain(int argc, char** argv) { + CHECKCALL(mkdir("/dev/socket", 0755)); + //CHECKCALL(mount("devpts", "/dev/pts", "devpts", 0, NULL)); + #define MAKE_STR(x) __STRING(x) +- CHECKCALL(mount("proc", "/proc", "proc", 0, "hidepid=2,gid=" MAKE_STR(AID_READPROC))); ++ //CHECKCALL(mount("proc", "/proc", "proc", 0, "hidepid=2,gid=" MAKE_STR(AID_READPROC))); + #undef MAKE_STR + // Don't expose the raw commandline to unprivileged processes. + //CHECKCALL(chmod("/proc/cmdline", 0440)); +@@ -135,18 +135,18 @@ int FirstStageMain(int argc, char** argv) { + CHECKCALL(mount("selinuxfs", "/sys/fs/selinux", "selinuxfs", 0, NULL)); + #endif + +- CHECKCALL(mknod("/dev/kmsg", S_IFCHR | 0600, makedev(1, 11))); ++ //CHECKCALL(mknod("/dev/kmsg", S_IFCHR | 0600, makedev(1, 11))); + + if constexpr (WORLD_WRITABLE_KMSG) { + CHECKCALL(mknod("/dev/kmsg_debug", S_IFCHR | 0622, makedev(1, 11))); + } + +- CHECKCALL(mknod("/dev/random", S_IFCHR | 0666, makedev(1, 8))); +- CHECKCALL(mknod("/dev/urandom", S_IFCHR | 0666, makedev(1, 9))); ++ //CHECKCALL(mknod("/dev/random", S_IFCHR | 0666, makedev(1, 8))); ++ //CHECKCALL(mknod("/dev/urandom", S_IFCHR | 0666, makedev(1, 9))); + + // This is needed for log wrapper, which gets called before ueventd runs. +- CHECKCALL(mknod("/dev/ptmx", S_IFCHR | 0666, makedev(5, 2))); +- CHECKCALL(mknod("/dev/null", S_IFCHR | 0666, makedev(1, 3))); ++ //CHECKCALL(mknod("/dev/ptmx", S_IFCHR | 0666, makedev(5, 2))); ++ //CHECKCALL(mknod("/dev/null", S_IFCHR | 0666, makedev(1, 3))); + + // These below mounts are done in first stage init so that first stage mount can mount + // subdirectories of /mnt/{vendor,product}/. Other mounts, not required by first stage mount, +@@ -157,18 +157,18 @@ int FirstStageMain(int argc, char** argv) { + // "mode=0755,uid=0,gid=1000")); + // /mnt/vendor is used to mount vendor-specific partitions that can not be + // part of the vendor partition, e.g. because they are mounted read-write. +- CHECKCALL(mkdir("/mnt/vendor", 0755)); ++ //CHECKCALL(mkdir("/mnt/vendor", 0755)); + // /mnt/product is used to mount product-specific partitions that can not be + // part of the product partition, e.g. because they are mounted read-write. +- CHECKCALL(mkdir("/mnt/product", 0755)); ++ //CHECKCALL(mkdir("/mnt/product", 0755)); + + // /apex is used to mount APEXes +- CHECKCALL(mount("tmpfs", "/apex", "tmpfs", MS_NOEXEC | MS_NOSUID | MS_NODEV, +- "mode=0755,uid=0,gid=0")); ++ //CHECKCALL(mount("tmpfs", "/apex", "tmpfs", MS_NOEXEC | MS_NOSUID | MS_NODEV, ++ // "mode=0755,uid=0,gid=0")); + + // /debug_ramdisk is used to preserve additional files from the debug ramdisk +- CHECKCALL(mount("tmpfs", "/debug_ramdisk", "tmpfs", MS_NOEXEC | MS_NOSUID | MS_NODEV, +- "mode=0755,uid=0,gid=0")); ++ //CHECKCALL(mount("tmpfs", "/debug_ramdisk", "tmpfs", MS_NOEXEC | MS_NOSUID | MS_NODEV, ++ // "mode=0755,uid=0,gid=0")); + #undef CHECKCALL + + SetStdioToDevNull(argv); +-- +2.23.0 + diff --git a/system/core/0042-hybris-change-system-bin-init-to-sbin-droid-hal-init.patch b/system/core/0042-hybris-change-system-bin-init-to-sbin-droid-hal-init.patch new file mode 100644 index 0000000..98398a6 --- /dev/null +++ b/system/core/0042-hybris-change-system-bin-init-to-sbin-droid-hal-init.patch @@ -0,0 +1,42 @@ +From f359d5a20677f4ce51f79c3fef3475d5832c5ee4 Mon Sep 17 00:00:00 2001 +From: Franz-Josef Haider +Date: Mon, 12 Oct 2020 15:26:00 +0000 +Subject: [PATCH 42/50] (hybris) change /system/bin/init to + /sbin/droid-hal-init + +Signed-off-by: Simonas Leleiva +Change-Id: I29e02a59bb6be56a2aa0bd89e8a0602b9d0b14d6 +--- + init/first_stage_init.cpp | 2 +- + init/selinux.cpp | 2 +- + 2 files changed, 2 insertions(+), 2 deletions(-) + +diff --git a/init/first_stage_init.cpp b/init/first_stage_init.cpp +index a60e91f83..964cbb873 100644 +--- a/init/first_stage_init.cpp ++++ b/init/first_stage_init.cpp +@@ -239,7 +239,7 @@ int FirstStageMain(int argc, char** argv) { + uint64_t start_ms = start_time.time_since_epoch().count() / kNanosecondsPerMillisecond; + setenv("INIT_STARTED_AT", std::to_string(start_ms).c_str(), 1); + +- const char* path = "/system/bin/init"; ++ const char* path = "/sbin/droid-hal-init"; + const char* args[] = {path, "selinux_setup", nullptr}; + execv(path, const_cast(args)); + +diff --git a/init/selinux.cpp b/init/selinux.cpp +index ce506dd5e..13310740a 100644 +--- a/init/selinux.cpp ++++ b/init/selinux.cpp +@@ -552,7 +552,7 @@ int SetupSelinux(char** argv) { + PLOG(FATAL) << "restorecon failed of /system/bin/init failed"; + } + +- const char* path = "/system/bin/init"; ++ const char* path = "/sbin/droid-hal-init"; + const char* args[] = {path, "second_stage", nullptr}; + execv(path, const_cast(args)); + +-- +2.23.0 + diff --git a/system/core/0043-hybris-allow-second-stage-init-previously-disabled-b.patch b/system/core/0043-hybris-allow-second-stage-init-previously-disabled-b.patch new file mode 100644 index 0000000..59fb70b --- /dev/null +++ b/system/core/0043-hybris-allow-second-stage-init-previously-disabled-b.patch @@ -0,0 +1,35 @@ +From 59e5143bbb53b4663c9cf335253fcb4ea6f8cc65 Mon Sep 17 00:00:00 2001 +From: Franz-Josef Haider +Date: Mon, 12 Oct 2020 15:29:00 +0000 +Subject: [PATCH 43/50] (hybris) allow second stage init previously disabled by + selinux work + +Signed-off-by: Simonas Leleiva +Change-Id: I1089428e88e7d94457f76745b23f44728dba8f6e +--- + init/selinux.cpp | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/init/selinux.cpp b/init/selinux.cpp +index 13310740a..853ee03e5 100644 +--- a/init/selinux.cpp ++++ b/init/selinux.cpp +@@ -551,6 +551,7 @@ int SetupSelinux(char** argv) { + if (selinux_android_restorecon("/system/bin/init", 0) == -1) { + PLOG(FATAL) << "restorecon failed of /system/bin/init failed"; + } ++#endif + + const char* path = "/sbin/droid-hal-init"; + const char* args[] = {path, "second_stage", nullptr}; +@@ -560,7 +561,6 @@ int SetupSelinux(char** argv) { + // panic and never return from this function. + PLOG(FATAL) << "execv(\"" << path << "\") failed"; + +-#endif + return 1; + } + +-- +2.23.0 + diff --git a/system/core/0044-hybris-Don-t-bail-out-if-failed-to-initialize-proper.patch b/system/core/0044-hybris-Don-t-bail-out-if-failed-to-initialize-proper.patch new file mode 100644 index 0000000..f205df6 --- /dev/null +++ b/system/core/0044-hybris-Don-t-bail-out-if-failed-to-initialize-proper.patch @@ -0,0 +1,28 @@ +From 4933417b73d39fb52abed8eed7a5365a4d00d5b6 Mon Sep 17 00:00:00 2001 +From: Franz-Josef Haider +Date: Mon, 12 Oct 2020 16:48:00 +0000 +Subject: [PATCH 44/50] (hybris) Don't bail out if failed to initialize + property area + +Signed-off-by: Simonas Leleiva +Change-Id: Ie9fe31f9e60510b91fcd857b0715b6fcc253dfee +--- + init/property_service.cpp | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/init/property_service.cpp b/init/property_service.cpp +index 620507789..8275f9cb8 100644 +--- a/init/property_service.cpp ++++ b/init/property_service.cpp +@@ -104,7 +104,7 @@ void property_init() { + mkdir("/dev/__properties__", S_IRWXU | S_IXGRP | S_IXOTH); + CreateSerializedPropertyInfo(); + if (__system_property_area_init()) { +- LOG(FATAL) << "Failed to initialize property area"; ++ //LOG(FATAL) << "Failed to initialize property area"; + } + if (!property_info_area.LoadDefaultPath()) { + LOG(FATAL) << "Failed to load serialized property info file"; +-- +2.23.0 + diff --git a/system/core/0045-hybris-create-dev-socket-during-first-stage.patch b/system/core/0045-hybris-create-dev-socket-during-first-stage.patch new file mode 100644 index 0000000..4194cb1 --- /dev/null +++ b/system/core/0045-hybris-create-dev-socket-during-first-stage.patch @@ -0,0 +1,29 @@ +From 71ef9dc6953122f5a567def945134de3b1a64cf5 Mon Sep 17 00:00:00 2001 +From: Franz-Josef Haider +Date: Mon, 12 Oct 2020 17:11:00 +0000 +Subject: [PATCH 45/50] (hybris) create /dev/socket during first stage + +It will attempt to create it again during 2nd stage, do not fail then. + +Signed-off-by: Simonas Leleiva +Change-Id: I4701723d55032e35228a84bff81b20cc93424c32 +--- + init/first_stage_init.cpp | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/init/first_stage_init.cpp b/init/first_stage_init.cpp +index 964cbb873..0550b379c 100644 +--- a/init/first_stage_init.cpp ++++ b/init/first_stage_init.cpp +@@ -121,7 +121,7 @@ int FirstStageMain(int argc, char** argv) { + // on / and then we'll let the rc file figure out the rest. + //CHECKCALL(mount("tmpfs", "/dev", "tmpfs", MS_NOSUID, "mode=0755")); + //CHECKCALL(mkdir("/dev/pts", 0755)); +- CHECKCALL(mkdir("/dev/socket", 0755)); ++ /*CHECKCALL*/(mkdir("/dev/socket", 0755)); + //CHECKCALL(mount("devpts", "/dev/pts", "devpts", 0, NULL)); + #define MAKE_STR(x) __STRING(x) + //CHECKCALL(mount("proc", "/proc", "proc", 0, "hidepid=2,gid=" MAKE_STR(AID_READPROC))); +-- +2.23.0 + diff --git a/system/core/0046-hybris-execve-service.patch b/system/core/0046-hybris-execve-service.patch new file mode 100644 index 0000000..7ce8235 --- /dev/null +++ b/system/core/0046-hybris-execve-service.patch @@ -0,0 +1,50 @@ +From e9e08887b93efbea2c9af47e1b5394ba89fa030e Mon Sep 17 00:00:00 2001 +From: Franz-Josef Haider +Date: Mon, 12 Oct 2020 19:25:00 +0000 +Subject: [PATCH 46/50] (hybris) execve service + +Signed-off-by: Simonas Leleiva +Change-Id: I2efa4048bc2e4da848a61e24d8ef8b1824a81f06 +--- + init/service.cpp | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +diff --git a/init/service.cpp b/init/service.cpp +index e77423eea..894951a1e 100644 +--- a/init/service.cpp ++++ b/init/service.cpp +@@ -190,7 +190,6 @@ Result Service::EnterNamespaces() const { + return Success(); + } + +-/* + static bool ExpandArgsAndExecv(const std::vector& args, bool sigstop) { + std::vector expanded_args; + std::vector c_strings; +@@ -213,6 +212,7 @@ static bool ExpandArgsAndExecv(const std::vector& args, bool sigsto + } + + ++/* + static bool IsRuntimeApexReady() { + struct stat buf; + return stat("/apex/com.android.runtime/", &buf) == 0; +@@ -1066,6 +1066,7 @@ Result Service::Start() { + } + } + ++#endif + if (needs_console) { + setsid(); + OpenConsole(); +@@ -1081,7 +1082,6 @@ Result Service::Start() { + PLOG(ERROR) << "cannot execve('" << args_[0] << "')"; + } + +-#endif + _exit(127); + } + +-- +2.23.0 + diff --git a/system/core/0047-hybris-Do-not-SetupMountNamespaces.patch b/system/core/0047-hybris-Do-not-SetupMountNamespaces.patch new file mode 100644 index 0000000..8d42440 --- /dev/null +++ b/system/core/0047-hybris-Do-not-SetupMountNamespaces.patch @@ -0,0 +1,30 @@ +From 61cb16db3e9354f798e300568b40fdde18f92099 Mon Sep 17 00:00:00 2001 +From: Franz-Josef Haider +Date: Tue, 13 Oct 2020 13:29:00 +0000 +Subject: [PATCH 47/50] (hybris) Do not SetupMountNamespaces() + +Signed-off-by: Simonas Leleiva +Change-Id: Id2af1396ed2274a3533305722e117786aceb3cd0 +--- + init/init.cpp | 2 ++ + 1 file changed, 2 insertions(+) + +diff --git a/init/init.cpp b/init/init.cpp +index f2936d883..20aa65f37 100644 +--- a/init/init.cpp ++++ b/init/init.cpp +@@ -705,9 +705,11 @@ int SecondStageMain(int argc, char** argv) { + const BuiltinFunctionMap function_map; + Action::set_function_map(&function_map); + ++#ifdef DISABLED_FOR_HYBRIS_SUPPORT + if (!SetupMountNamespaces()) { + PLOG(FATAL) << "SetupMountNamespaces failed"; + } ++#endif + + subcontexts = InitializeSubcontexts(); + +-- +2.23.0 + diff --git a/system/core/0048-hybris-Do-not-launch-system-bin-vdc.patch b/system/core/0048-hybris-Do-not-launch-system-bin-vdc.patch new file mode 100644 index 0000000..26143f6 --- /dev/null +++ b/system/core/0048-hybris-Do-not-launch-system-bin-vdc.patch @@ -0,0 +1,36 @@ +From 149bf24830f3ac0d10067a49e437084bd2936c93 Mon Sep 17 00:00:00 2001 +From: Franz-Josef Haider +Date: Tue, 13 Oct 2020 15:39:00 +0000 +Subject: [PATCH 48/50] (hybris) Do not launch /system/bin/vdc + +Signed-off-by: Simonas Leleiva +Change-Id: Ic786cc3e8734c439309aeea09992a2b8859ad0ca +--- + rootdir/init.rc | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +diff --git a/rootdir/init.rc b/rootdir/init.rc +index c5e71291d..efa1884b4 100644 +--- a/rootdir/init.rc ++++ b/rootdir/init.rc +@@ -353,7 +353,7 @@ on early-fs + #start vold + + on post-fs +- exec - system system -- /system/bin/vdc checkpoint markBootAttempt ++# exec - system system -- /system/bin/vdc checkpoint markBootAttempt + + # Once everything is setup, no need to modify /. + # The bind+remount combination allows this to work in containers. +@@ -421,7 +421,7 @@ on post-fs-data + + # Start checkpoint before we touch data + #start vold +- exec - system system -- /system/bin/vdc checkpoint prepareCheckpoint ++# exec - system system -- /system/bin/vdc checkpoint prepareCheckpoint + + # We chown/chmod /data again so because mount is run as root + defaults + chown system system /data +-- +2.23.0 + diff --git a/system/core/0049-hybris-Allow-input-group-to-use-vibrator.patch b/system/core/0049-hybris-Allow-input-group-to-use-vibrator.patch new file mode 100644 index 0000000..eab6065 --- /dev/null +++ b/system/core/0049-hybris-Allow-input-group-to-use-vibrator.patch @@ -0,0 +1,38 @@ +From a13bc55e4b1ce6bc211b5475d59988a1ad100e56 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Juho=20H=C3=A4m=C3=A4l=C3=A4inen?= + +Date: Mon, 23 Mar 2020 17:40:04 +0200 +Subject: [PATCH 49/50] (hybris) Allow input group to use vibrator. +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +[hybris] Allow input group to use vibrator. JB#49350 + +Signed-off-by: Juho Hämäläinen +Change-Id: I2b86d9eec1b20301a128a4f9f83b5edb4b2da234 +--- + rootdir/init.rc | 5 +++-- + 1 file changed, 3 insertions(+), 2 deletions(-) + +diff --git a/rootdir/init.rc b/rootdir/init.rc +index efa1884b4..a9b7e8112 100644 +--- a/rootdir/init.rc ++++ b/rootdir/init.rc +@@ -733,10 +733,11 @@ on boot + chown system system /sys/devices/system/cpu/cpu0/cpufreq/scaling_max_freq + chmod 0660 /sys/devices/system/cpu/cpu0/cpufreq/scaling_max_freq + ++ # SailfishOS: allow input group to use vibrator ++ chown system input /sys/class/leds/vibrator/activate ++ chown system input /sys/class/leds/vibrator/duration + chown system system /sys/class/leds/vibrator/trigger +- chown system system /sys/class/leds/vibrator/activate + chown system system /sys/class/leds/vibrator/brightness +- chown system system /sys/class/leds/vibrator/duration + chown system system /sys/class/leds/vibrator/state + chown system system /sys/class/timed_output/vibrator/enable + chown system system /sys/class/leds/keyboard-backlight/brightness +-- +2.23.0 + diff --git a/system/core/0050-hybris-Allow-input-group-to-use-old-vibrator.patch b/system/core/0050-hybris-Allow-input-group-to-use-old-vibrator.patch new file mode 100644 index 0000000..f6990b3 --- /dev/null +++ b/system/core/0050-hybris-Allow-input-group-to-use-old-vibrator.patch @@ -0,0 +1,32 @@ +From 6444d034c7f405d5ff05c5989dab6b01c8ed635c Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Juho=20H=C3=A4m=C3=A4l=C3=A4inen?= + +Date: Tue, 24 Mar 2020 14:07:40 +0200 +Subject: [PATCH 50/50] (hybris) Allow input group to use old vibrator. +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +Signed-off-by: Juho Hämäläinen +Change-Id: I279b97beb82a5de51d40535221a2b71d3468a91f +--- + rootdir/init.rc | 3 ++- + 1 file changed, 2 insertions(+), 1 deletion(-) + +diff --git a/rootdir/init.rc b/rootdir/init.rc +index a9b7e8112..f68597523 100644 +--- a/rootdir/init.rc ++++ b/rootdir/init.rc +@@ -739,7 +739,8 @@ on boot + chown system system /sys/class/leds/vibrator/trigger + chown system system /sys/class/leds/vibrator/brightness + chown system system /sys/class/leds/vibrator/state +- chown system system /sys/class/timed_output/vibrator/enable ++ # SailfishOS: allow input group to use vibrator ++ chown system input /sys/class/timed_output/vibrator/enable + chown system system /sys/class/leds/keyboard-backlight/brightness + chown system system /sys/class/leds/lcd-backlight/brightness + chown system system /sys/class/leds/button-backlight/brightness +-- +2.23.0 +