aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--android/avd/hardware-properties.ini8
-rw-r--r--android/avd/hw-config-defs.h7
-rw-r--r--android/main.c3
-rw-r--r--vl-android.c8
4 files changed, 24 insertions, 2 deletions
diff --git a/android/avd/hardware-properties.ini b/android/avd/hardware-properties.ini
index 5ecfcc4..6b5caae 100644
--- a/android/avd/hardware-properties.ini
+++ b/android/avd/hardware-properties.ini
@@ -276,3 +276,11 @@ type = string
default =
abstract = Path to snapshot storage
description = Path to a 'snapshot storage' file, where all snapshots are stored.
+
+# Android AVD name
+# This is set automatically before launching a core.
+#
+name = avd.name
+type = string
+default = <build>
+abstract = Name of the AVD being run
diff --git a/android/avd/hw-config-defs.h b/android/avd/hw-config-defs.h
index e2def30..0ab1f0f 100644
--- a/android/avd/hw-config-defs.h
+++ b/android/avd/hw-config-defs.h
@@ -269,6 +269,13 @@ HWCFG_STRING(
"Path to snapshot storage",
"Path to a 'snapshot storage' file, where all snapshots are stored.")
+HWCFG_STRING(
+ avd_name,
+ "avd.name",
+ "<build>",
+ "Name of the AVD being run",
+ "")
+
#undef HWCFG_INT
#undef HWCFG_BOOL
#undef HWCFG_DISKSIZE
diff --git a/android/main.c b/android/main.c
index 64314b0..acc91e6 100644
--- a/android/main.c
+++ b/android/main.c
@@ -1020,8 +1020,7 @@ int main(int argc, char **argv)
/* physical memory is now in hw->hw_ramSize */
- args[n++] = "-android-avdname";
- args[n++] = (char*) avdInfo_getName(avd);
+ hw->avd_name = ASTRDUP(avdInfo_getName(avd));
/* Set up the interfaces for inter-emulator networking */
if (opts->shared_net_id) {
diff --git a/vl-android.c b/vl-android.c
index a5510a0..d94bec0 100644
--- a/vl-android.c
+++ b/vl-android.c
@@ -4891,6 +4891,14 @@ int main(int argc, char **argv, char **envp)
}
#endif // CONFIG_NAND_LIMITS
+ /* Initialize AVD name from hardware configuration if needed */
+ if (!android_op_avd_name) {
+ if (android_hw->avd_name && *android_hw->avd_name) {
+ android_op_avd_name = android_hw->avd_name;
+ VERBOSE_PRINT(init,"AVD Name: %s", android_op_avd_name);
+ }
+ }
+
/* Initialize system partition image */
{
char tmp[PATH_MAX+32];