--- a/plugins/corerouter/corerouter.c
+++ b/plugins/corerouter/corerouter.c
@@ -722,7 +722,7 @@
 	if (!ucr->pb_base_dir) {
 		ucr->pb_base_dir = getenv("TMPDIR");
 		if (!ucr->pb_base_dir)
-			ucr->pb_base_dir = "/tmp";
+			ucr->pb_base_dir = "@TERMUX_PREFIX@/tmp";
 	}
 
 	int nevents;
