当前位置: 代码迷 >> Android >> android-x86怎么开启串口调试
  详细解决方案

android-x86怎么开启串口调试

热度:11   发布时间:2016-04-28 03:07:20.0
android-x86如何开启串口调试

android-x86的grub是采用相对UBuntu古老一些的方式,来grub kernel的

如何开启android-x86的串口调试模式呢,采用如下步骤:

(1)mount sda1:

    mkdir /data/fs

    mount -t ext2 /dev/block/sda1 /data/fs

(2)修改menu.lst文件

    这个文件保存grub配置,修改如下:

[email protected]:/data/fs/grub # cat menu.lst                                          default=0timeout=6splashimage=/grub/android-x86.xpm.gzroot (hd0,0)title Android-x86 4.4-r1        kernel /android-4.4-r1/kernel console=ttyS0,115200,n8 root=/dev/ram0 androidboot.hardware=android_x86 video=-16 SRC=/android-4.4-r1        initrd /android-4.4-r1/initrd.imgtitle Android-x86 4.4-r1 (Debug mode)        kernel /android-4.4-r1/kernel root=/dev/ram0 androidboot.hardware=android_x86 video=-16 DEBUG=2 SRC=/android-4.4-r1        initrd /android-4.4-r1/initrd.imgtitle Android-x86 4.4-r1 (Debug nomodeset)        kernel /android-4.4-r1/kernel nomodeset root=/dev/ram0 androidboot.hardware=android_x86 video=-16 DEBUG=2 SRC=/android-4.4-r1        initrd /android-4.4-r1/initrd.imgtitle Android-x86 4.4-r1 (Debug video=LVDS-1:d)        kernel /android-4.4-r1/kernel video=LVDS-1:d root=/dev/ram0 androidboot.hardware=android_x86 video=-16 DEBUG=2 SRC=/android-4.4-r1        initrd /android-4.4-r1/initrd.img[email protected]:/data/fs/grub # 

console=ttyS0,115200,n8原来为quiet,现在改成console=ttyS0,115200,n8,这样重启后将android设备的串口接到PC上,就可以在PC上通过串口来操作ANDROID的后台了

这也是调试中肯定会用到的方法或手段

  相关解决方案