--- a/library/std/src/sys/pal/unix/os.rs +++ b/library/std/src/sys/pal/unix/os.rs @@ -601,7 +601,7 @@ crate::env::var_os("TMPDIR").map(PathBuf::from).unwrap_or_else(|| { cfg_select! { all(target_vendor = "apple", not(miri)) => darwin_temp_dir(), - target_os = "android" => PathBuf::from("/data/local/tmp"), + target_os = "android" => PathBuf::from("@TERMUX_PREFIX@/tmp"), _ => PathBuf::from("/tmp"), } })