Commit Graph

127 Commits

Author SHA1 Message Date
topjohnwu
8c3e80ffe4 Fix typo 2024-06-27 18:14:19 -07:00
topjohnwu
9d245f0587 Update ShellImpl task scheduling
- Prevent execTask starvation: tasks scheduled through execTask are
  now queued along with submitted tasks, executing in order of
  submission
- waitAndClose now properly waits for all tasks to complete, including
  both synchronous and asynchronous tasks
2024-06-26 19:01:04 -07:00
topjohnwu
990a60377f Cleanup implementation 2024-06-24 21:37:21 -07:00
topjohnwu
c084ef5d32 Deprecate FLAG_REDIRECT_STDERR 2024-06-24 18:06:49 -07:00
topjohnwu
6c9618b878 Prevent infinite recursion 2024-06-23 19:08:06 -07:00
topjohnwu
c4f0a379c6 Use UNSET_LIST instead of NOPList 2024-06-23 18:54:50 -07:00
topjohnwu
1698dbffef Update implementation to prevent NPE 2024-06-23 18:20:26 -07:00
topjohnwu
d7f288a187 Remove deprecated methods
Simplify logic
2024-06-11 19:06:41 -07:00
topjohnwu
2eae61d7ac Change Shell.EXECUTOR type from ExecutorService to Executor
Remove unnecessary restrictions
2024-06-11 19:06:41 -07:00
topjohnwu
e01d4cbb8d Introduce internal shell task scheduling 2024-06-11 18:36:27 -07:00
topjohnwu
dc6d1ec3d7 Fix broken getCachedShell implementation 2024-06-11 18:12:26 -07:00
topjohnwu
d3df1a1b5a Use proper types 2024-06-10 17:37:19 -07:00
vvb2060
01570d643a Add setCommands method to Shell.Builder 2023-12-18 16:33:02 +08:00
vvb2060
ee17e20a4d Update gradle 2023-09-03 23:03:12 -07:00
topjohnwu
69652a9f7b Directly set and get context field in root process 2023-09-03 00:18:04 -07:00
topjohnwu
fe925895c7 Minor refactoring 2023-07-20 16:51:24 -07:00
topjohnwu
3bc545c9ba Consolidate TaskImpl into JobImpl 2023-07-19 20:44:14 -07:00
vvb2060
f32602748a Remove ROOT_MOUNT_MASTER status 2023-07-19 17:18:52 -07:00
topjohnwu
e7dcf62693 Add new API enqueue to get result with Future 2023-05-26 11:17:49 -07:00
topjohnwu
cca5732f2e Update copyright notice 2023-01-09 00:25:22 +08:00
topjohnwu
01de4f25fe Add pre-lollipop support 2023-01-08 21:59:35 +08:00
canyie
9043cd5c46 Do not readlink /proc/self/exe
Old platforms prevent `readlink /proc/self/exe` from being called from non-main threads on release builds

https://stackoverflow.com/questions/28590831/android-permission-denied-when-reading-proc-self-exe-from-non-main-thread
2023-01-08 21:59:35 +08:00
topjohnwu
9f75ae9598 Invert logic 2022-09-11 14:46:16 -07:00
topjohnwu
b184b45140 Fix escaped strings with single quotes
Fix #125
2022-09-11 10:20:41 -07:00
topjohnwu
979cb2b169 More efficient main thread detection 2022-06-02 00:58:31 -07:00
topjohnwu
cae7a272fe Update Android Studio 2022-05-18 01:40:48 -07:00
南宫雪珊
fc42e8274e
Add startup agents warning
Co-authored-by: topjohnwu <topjohnwu@gmail.com>
2022-05-01 13:12:06 -07:00
南宫雪珊
0f3698afa4
Check main shell when setBuilder
Co-authored-by: topjohnwu <topjohnwu@gmail.com>
2022-05-01 05:02:55 -07:00
topjohnwu
a9551dabcc Log exit code
Close #118
2022-05-01 04:40:36 -07:00
topjohnwu
d793ba9fff Add new API setContext 2022-05-01 03:44:41 -07:00
topjohnwu
c44dacc724 Move Shell.rootAccess() to deprecation section 2022-04-14 23:13:33 -07:00
topjohnwu
8fa89d240c Remove usage of Shell.rootAccess() 2022-04-14 23:05:20 -07:00
topjohnwu
19126657f7 Add new public API isAppGrantedRoot 2022-04-14 00:23:12 -07:00
南宫雪珊
8efbac3e18
Fix isAppGrantedRoot() 2022-04-13 23:30:40 -07:00
topjohnwu
39dcd3e1a0 Do not block getCached with MainShell.class 2022-03-21 23:28:07 -07:00
topjohnwu
046ef7b0a6 Ensure only one single main shell is created 2022-03-21 01:37:36 -07:00
topjohnwu
59eda41b13 Fix #108 2022-03-09 22:58:53 -08:00
topjohnwu
10a97bfe75 Mount ns might not exist in /proc 2022-03-09 22:32:03 -08:00
Fox2Code
59936355e3
Fix #103 2022-03-08 11:18:22 -08:00
topjohnwu
492ef7a28b Remove incorrect MainThread annotation 2022-02-28 01:51:29 -08:00
topjohnwu
cde8c71eab Make Utils.context package private 2022-02-27 22:09:42 -08:00
topjohnwu
9c7025130e Update Shell.rootAccess() implementation 2022-02-27 22:09:23 -08:00
topjohnwu
47c8d2c9c2 Replace su(...)/sh(...) with cmd(...) 2022-02-27 14:47:06 -08:00
topjohnwu
863ec4c2a1 Add @IntDef annotations 2022-02-27 05:29:16 -08:00
topjohnwu
9477c543b1 Better shell quote and escape
Close #94
2022-02-27 01:38:49 -08:00
topjohnwu
f53f829231 Suppress warnings 2022-02-26 21:55:59 -08:00
topjohnwu
d41be3df7b Get context without main thread
Fix #84
2022-02-26 20:08:19 -08:00
topjohnwu
a0e6724676 Minor refactoring 2022-02-26 14:48:10 -08:00
vvb2060
25cf6df632 Support custom process 2022-02-26 04:13:31 -08:00
topjohnwu
9f2fff6095 Bump minSdkVersion to 19 2022-02-26 04:10:25 -08:00