@Nullable
    public static File getDataDir(@NonNull Context context) {
        if (Build.VERSION.SDK_INT >= 24) {
            return context.getDataDir();
        } else {
            final String dataDir = context.getApplicationInfo().dataDir;
            return dataDir != null ? new File(dataDir) : null;
        }
    }
Returns the absolute path to the directory on the filesystem where all
private files belonging to this app are stored. Apps should not use this
path directly; they should instead use {@link Context#getFilesDir()},
{@link Context#getCacheDir()}, {@link Context#getDir(String, int)}, or
other storage APIs on {@link Context}.
<p>
The returned path may change over time if the calling app is moved to an
adopted storage device, so only relative paths should be persisted.
<p>
No additional permissions are required for the calling app to read or
write files under the returned path.

@see ApplicationInfo#dataDir
android/android_framework/base/src/main/java/github/tornaco/android/thanos/core/compat/ContextCompat.java