如何改变vmlite的Android的屏幕尺寸? [英] How to change the screen size of vmlite android?
问题描述
我装 vmlite的机器人形象< /一>这是伟大的,但有一件事我没有找到解决办法:?如何改变屏幕尺寸
I installed vmlite's android image which is great but there is one thing I don't find solution: How to change the screen size?
它拥有屏幕的宽度/高度的固定比率,但我需要改变它来模拟一些Android手机。
It has a fix ratio of the width/height of the screen, but I need to change it to simulate some android phones.
我搜索了很多,但没有找到一个解决方案,请大家帮忙。
I searched a lot but not find a solution, please help.
更新
GRUB菜单是如下:
The grub menu is as following:
- CMDLINE(hd0,2)/ CMDLINE
- 内核--use-CMD线(hd0,2)/内核
- 的initrd(hd0,2)/ RAMDISK
我haved使用此命令添加自定义尺寸:
I haved add a custom size using this command:
VBoxManage.exe setextradata "android-vmlite" "CustomVideoMode1" "480x800x32"
然后 VGA-问
添加到所有的3个菜单选项,但没有工作。
Then add vga-ask
to all of the 3 menu options, but none works.
在preSS B
在他们身上,它不要求选择模型。
When press b
on them, it doesn't ask to choose model.
推荐答案
好吧,我做了一些研究,最后能够编辑虚拟框图像。具体方法如下:
Ok, I've done some research and finally was able to edit the virtual box image. Here's how:
如果你去vmlite在引导映像的GRUB项的内核条目(一个以仁关键字)有一个参数 - 用CMD行
,这 CMDLINE
第一项 CMDLINE(hd0,2)/ CMDLINE
,这是一个名为<$ c定义$ C> CMDLINE 放在启动硬盘的第三个分区里。
If you go to vmlite image's grub entries on boot , the kernel entry (one with "kernel" keyword) has an argument --use-cmd-line
, this cmdline
is defined in the first entry cmdline (hd0,2)/cmdline
, which is a file called cmdline
placed inside boot hard disk's third partition.
该文件的内核选项:
init=/init qemu=1 console=ttyS0 console=tty0 vga=788 verbose androidboot.hardware=vbox_x86 androidboot.console=ttyS0 android.qemud=ttyS1
现在,你必须编辑这个文件称为CMDLINE修改 VGA = 788
选项 VGA =询问
。
Now you must edit this file called cmdline to change vga=788
option to vga=ask
.
编辑:(在Linux系统上)
您需要安装 vdfuse
。
命令和apt-get安装的VirtualBox保险丝
地方创建两个空文件夹。
create two empty folders somewhere.
须藤的mkdir到/ mnt /图片
须藤的mkdir到/ mnt /分区
然后安装虚拟框图像(VDI,VMDK或VHD等)到一个文件夹。 (比方说VirtualBox虚拟磁盘镜像文件是 /tmp/vmlite.vmdk
,我们将其安装到的/ mnt /图片
文件夹)
Then mount the virtual box image (vdi, vmdk or vhd etc) to a folder. (Lets say virtualbox disk image file is /tmp/vmlite.vmdk
and we'll mount it to /mnt/image
folder)
vdfuse -w -f /tmp/vmlite.vmdk到/ mnt /图片
有些文件会在名为安装文件夹中创建的 EntireDisk 的分区1 的分区2 的 Partition3 的等
Some files will be created in mount folder named EntireDisk, Partition1 , Partition2, Partition3 and so on.
由于我们感兴趣的是第三个分区,我们将安装相应的文件,以的/ mnt /分区
:
since we are interested in third partition, we will mount the corresponding file to /mnt/partition
:
sudo的安装邻环到/ mnt /图像/ Partition3到/ mnt /分区
请参阅的内容:
须藤ls -l命令的/ mnt /分区
有会是CMDLINE,RAMDISK和内核。
There'd be cmdline, ramdisk and kernel.
现在我们编辑CMDLINE文件(我们将使用gedit文本编辑器,您可以使用您喜欢):
Now we edit the cmdline file (we'll use gedit text editor, you can use one you like):
须藤gedit中的/ mnt / partiton / CMDLINE
进行编辑,修改 VGA = 788
到 VGA =询问
,保存并关闭。验证新的文件内容:
make the edits, change vga=788
to vga=ask
, save and close. Verify new file contents:
sudo的猫的/ mnt /分区/ CMDLINE
卸载文件和图像:
sudo的使用umount / MNT /分区
sudo的使用umount / MNT /图片
如果我们不需要这些两个文件夹:
and if we don't need those two folders:
sudo的RM到/ mnt /图片
sudo的RM到/ mnt /分区
完成,引导映像从虚拟框。它会说:preSS Enter键查看可用的视频模式,在输入列表显示,输入所选择的数字,或键入扫描,以寻找更多的显示模式。
Done, boot image from virtual box. It'll say press ENTER to view available video modes, On Enter a list is shown, type the digit of choice, or type "scan" to search for more display modes.
注意:并非所有的工作模式,使用VESA模式与颜色深度24或32,并支持宽比
NOTE: Not all modes worked ,use VESA modes with color depth 24 or 32 and supported aspect ratios.
这篇关于如何改变vmlite的Android的屏幕尺寸?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!