From 2779beecc7410f29102125e87e8174597acb2fe5 Mon Sep 17 00:00:00 2001 From: Raphael Date: Mon, 1 Nov 2010 15:29:34 -0700 Subject: Add env var ANDROID_TMP to override /tmp/android location. This is needed if there's already a /tmp/android which the current user can't access on the system. It would prevent the emulator from starting with a cryptic error message: NAND: could not create temp file for system NAND disk image: Permission deniedemulator: User-config was not changed. SDK Bug: 3154431 Change-Id: Iefe7fd6a5139da545aaef5670fb7f42d210d0edc --- android/utils/bufprint.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'android') diff --git a/android/utils/bufprint.c b/android/utils/bufprint.c index 45d411f..e3aa63c 100644 --- a/android/utils/bufprint.c +++ b/android/utils/bufprint.c @@ -215,7 +215,10 @@ bufprint_temp_dir(char* buff, char* end) return bufprint(buff, end, "%s", path); #else - const char* tmppath = "/tmp/android"; + const char* tmppath = getenv("ANDROID_TMP"); + if (!tmppath) { + tmppath = "/tmp/android"; + } mkdir(tmppath, 0744); return bufprint(buff, end, "%s", tmppath ); #endif -- cgit v1.1