Skip to content

Commit 3aa986c

Browse files
Added: Add info to device info for supported ABIs for armv8l and 64-bit-only aarch64 devices and PAGE_SIZE for 16KB page size devices
- https://source.android.com/docs/core/architecture/16kb-page-size/16kb
1 parent b7d2a4b commit 3aa986c

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

termux-shared/src/main/java/com/termux/shared/termux/AndroidUtils.java

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,19 @@ public static String getDeviceInfoMarkdownString(@NonNull final Context context)
9999
appendPropertyToMarkdown(markdownString, "BOARD", Build.BOARD);
100100
appendPropertyToMarkdown(markdownString, "HARDWARE", Build.HARDWARE);
101101
appendPropertyToMarkdown(markdownString, "DEVICE", Build.DEVICE);
102+
102103
appendPropertyToMarkdown(markdownString, "SUPPORTED_ABIS", Joiner.on(", ").skipNulls().join(Build.SUPPORTED_ABIS));
104+
appendPropertyToMarkdown(markdownString, "SUPPORTED_32_BIT_ABIS", Joiner.on(", ").skipNulls().join(Build.SUPPORTED_32_BIT_ABIS));
105+
appendPropertyToMarkdown(markdownString, "SUPPORTED_64_BIT_ABIS", Joiner.on(", ").skipNulls().join(Build.SUPPORTED_64_BIT_ABIS));
106+
107+
// If on Android >= 15
108+
if (Build.VERSION.SDK_INT >= 35) {
109+
try {
110+
appendPropertyToMarkdownIfSet(markdownString, "PAGE_SIZE", Os.sysconf(OsConstants._SC_PAGESIZE));
111+
} catch (Throwable t) {
112+
// Ignore
113+
}
114+
}
103115

104116
markdownString.append("\n##\n");
105117

0 commit comments

Comments
 (0)