开发者

Android Emulator Screen Size

开发者 https://www.devze.com 2022-12-31 00:45 出处:网络
What do we need to change in the android source code to get the resolution of 1360x768 working in an emulator?

What do we need to change in the android source code to get the resolution of 1360x768 working in an emulator?

The followin开发者_如何学Cg changes let me start an emulator 1280x720

project bionic/
diff --git a/libc/kernel/arch-arm/asm/memory.h b/libc/kernel/arch-arm/asm/memory.h
index c1137a7..743b6ef 100644
--- a/libc/kernel/arch-arm/asm/memory.h
+++ b/libc/kernel/arch-arm/asm/memory.h
@@ -46,7 +46,7 @@
 #define MODULE_START (PHYS_OFFSET)

 #ifndef CONSISTENT_DMA_SIZE
-#define CONSISTENT_DMA_SIZE SZ_2M
+#define CONSISTENT_DMA_SIZE SZ_8M
 #endif

 #ifndef __virt_to_phys

project external/kernel-headers/
diff --git a/original/asm-arm/memory.h b/original/asm-arm/memory.h
index 91d536c..fcec3b1 100644
--- a/original/asm-arm/memory.h
+++ b/original/asm-arm/memory.h
@@ -114,7 +114,7 @@
  * between 2MB and 14MB inclusive.
  */
 #ifndef CONSISTENT_DMA_SIZE
-#define CONSISTENT_DMA_SIZE SZ_2M
+#define CONSISTENT_DMA_SIZE SZ_8M
 #endif

 /*
diff --git a/original/linux/mmzone.h b/original/linux/mmzone.h
index f45163c..043a812 100644
--- a/original/linux/mmzone.h
+++ b/original/linux/mmzone.h
@@ -18,7 +18,7 @@

 /* Free memory management - zoned buddy allocator.  */
 #ifndef CONFIG_FORCE_MAX_ZONEORDER
-#define MAX_ORDER 11
+#define MAX_ORDER 12
 #else
 #define MAX_ORDER CONFIG_FORCE_MAX_ZONEORDER
 #endif

project external/qemu/
diff --git a/vl.c b/vl.c
index 3242c23..154f44f 100644
--- a/vl.c
+++ b/vl.c
@@ -181,7 +181,7 @@ int main(int argc, char **argv)
 #  define LOG_IOPORT(...) do { } while (0)
 #endif

-#define DEFAULT_RAM_SIZE 128
+#define DEFAULT_RAM_SIZE 512

 /* Max number of USB devices that can be specified on the commandline.  */
 #define MAX_USB_CMDLINE 8


Apparently you needed some extra memory for a large (1280x720) screen, but this is not sufficient for an even larger (1360x768) screen. So, allocate even more memory?


Try the set-up tutorial below:

http://bid.berkeley.edu/cs160-fall10/index.php/Tips_and_Tricks

In the first section, "Android Quickstart," the last paragraph says:

When you run an error-free program, the emulator will start automatically. Its not smart about screen size however, and may be too large for some monitors. If you have this problem, start the emulator instead using "SDK setup" program from the main Android SDK directory before you run a program. It will give you a dialog to set the size or scale. Setting the height to 8" works well on 768-pixel high monitors.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号