diff options
| -rw-r--r-- | meta-oe/dynamic-layers/selinux/recipes-devtool/android-tools/android-tools/core/0016-Adapt-adbd-to-work-with-yocto.patch | 21 |
1 files changed, 15 insertions, 6 deletions
diff --git a/meta-oe/dynamic-layers/selinux/recipes-devtool/android-tools/android-tools/core/0016-Adapt-adbd-to-work-with-yocto.patch b/meta-oe/dynamic-layers/selinux/recipes-devtool/android-tools/android-tools/core/0016-Adapt-adbd-to-work-with-yocto.patch index 88194317bc..ce6bc87aa7 100644 --- a/meta-oe/dynamic-layers/selinux/recipes-devtool/android-tools/android-tools/core/0016-Adapt-adbd-to-work-with-yocto.patch +++ b/meta-oe/dynamic-layers/selinux/recipes-devtool/android-tools/android-tools/core/0016-Adapt-adbd-to-work-with-yocto.patch | |||
| @@ -1,19 +1,25 @@ | |||
| 1 | From 1c836e4402ae170b3e0bf31da9012b7a3b1c40a1 Mon Sep 17 00:00:00 2001 | 1 | From fbbcb1a9359b5bf0c09bcf56b149594473f91e3a Mon Sep 17 00:00:00 2001 |
| 2 | From: Etienne Cordonnier <ecordonnier@snap.com> | 2 | From: Etienne Cordonnier <ecordonnier@snap.com> |
| 3 | Date: Wed, 8 Mar 2023 15:21:49 +0100 | 3 | Date: Wed, 8 Mar 2023 15:21:49 +0100 |
| 4 | Subject: [PATCH] Adapt adbd to work with yocto | 4 | Subject: [PATCH] Adapt adbd to work with yocto |
| 5 | 5 | ||
| 6 | - remove TMPDIR which is used by commands like mktemp (set to /data/local/tmp in android | ||
| 7 | but vanilla linux uses /tmp per default) | ||
| 8 | - define PS1 which was missing | ||
| 9 | - remove android header-files and make adbd compile with yocto | ||
| 10 | |||
| 6 | Co-authored-by: JJ Robertson <jrobertson@snap.com> | 11 | Co-authored-by: JJ Robertson <jrobertson@snap.com> |
| 7 | Co-authored-by: Wejdene Smida <wsmida@snap.com> | 12 | Co-authored-by: Wejdene Smida <wsmida@snap.com> |
| 8 | Signed-off-by: Etienne Cordonnier <ecordonnier@snap.com> | 13 | Signed-off-by: Etienne Cordonnier <ecordonnier@snap.com> |
| 14 | |||
| 9 | --- | 15 | --- |
| 10 | adb/daemon/file_sync_service.cpp | 4 ++-- | 16 | adb/daemon/file_sync_service.cpp | 4 ++-- |
| 11 | adb/daemon/main.cpp | 4 ++-- | 17 | adb/daemon/main.cpp | 4 ++-- |
| 12 | adb/daemon/reboot_service.cpp | 5 ++++- | 18 | adb/daemon/reboot_service.cpp | 5 ++++- |
| 13 | adb/daemon/set_verity_enable_state_service.cpp | 6 +++++- | 19 | adb/daemon/set_verity_enable_state_service.cpp | 6 +++++- |
| 14 | adb/daemon/shell_service.cpp | 4 ++++ | 20 | adb/daemon/shell_service.cpp | 5 ++++- |
| 15 | adb/types.h | 1 + | 21 | adb/types.h | 1 + |
| 16 | 6 files changed, 18 insertions(+), 6 deletions(-) | 22 | 6 files changed, 18 insertions(+), 7 deletions(-) |
| 17 | 23 | ||
| 18 | diff --git a/adb/daemon/file_sync_service.cpp b/adb/daemon/file_sync_service.cpp | 24 | diff --git a/adb/daemon/file_sync_service.cpp b/adb/daemon/file_sync_service.cpp |
| 19 | index e82a51f2..ba112cbe 100644 | 25 | index e82a51f2..ba112cbe 100644 |
| @@ -130,11 +136,14 @@ index 889229fe..51e9be93 100644 | |||
| 130 | } | 136 | } |
| 131 | +#endif | 137 | +#endif |
| 132 | diff --git a/adb/daemon/shell_service.cpp b/adb/daemon/shell_service.cpp | 138 | diff --git a/adb/daemon/shell_service.cpp b/adb/daemon/shell_service.cpp |
| 133 | index 3c8f3939..84f4f54d 100644 | 139 | index 3c8f3939..355c1a1c 100644 |
| 134 | --- a/adb/daemon/shell_service.cpp | 140 | --- a/adb/daemon/shell_service.cpp |
| 135 | +++ b/adb/daemon/shell_service.cpp | 141 | +++ b/adb/daemon/shell_service.cpp |
| 136 | @@ -264,6 +264,10 @@ bool Subprocess::ForkAndExec(std::string* error) { | 142 | @@ -261,9 +261,12 @@ bool Subprocess::ForkAndExec(std::string* error) { |
| 137 | env["TMPDIR"] = "/data/local/tmp"; | 143 | env["HOSTNAME"] = GetHostName(); |
| 144 | env["LOGNAME"] = pw->pw_name; | ||
| 145 | env["SHELL"] = pw->pw_shell; | ||
| 146 | - env["TMPDIR"] = "/data/local/tmp"; | ||
| 138 | env["USER"] = pw->pw_name; | 147 | env["USER"] = pw->pw_name; |
| 139 | } | 148 | } |
| 140 | + if (env.find("PS1") == env.end()) { | 149 | + if (env.find("PS1") == env.end()) { |
