android studio 真机调试(vivo为例)

 android  android studio 真机调试(vivo为例)已关闭评论
7月 252021


  1. 设置–》更多设置–》关于手机–》连续点击版本号即可打开开发者模式–》
  2. 返回设置–》系统和更新–》开发人员选项 –》打开开发人员选项 -》打开USB调试

然后在打开android studio, 数据线连接手机和电脑,android studio将自动检测手机,点三角按钮run。



  1. 安装过程vivo要输入账号密码, 并允许开启未知来源安装。
  2. 安装过程一直提示 “安装失败”, 解决方法: 在工程的gradle.properties中加上 android.injected.testOnly=false



virtualbox 里使用itunes步骤及注意事项

 virtualBox  virtualbox 里使用itunes步骤及注意事项已关闭评论
8月 022019

在virtualbox 里想使用itunes,会发现插入usb端口,设备连接了但发现不了iphone设备等问题, 网上找到一篇英文等资料,有详细步骤及注意事项,大家可以参考下(我遇到的问题就是原来打开的是USB 1.0,实际需要打开:USB 2.0 EHCI controller ):

Ok, for the record, I’m not the biggest fan of iTunes for Windows, and that’s why when I needed to use iTunes I decided to install it within an Oracle Virtualbox virtual machine.

This configuration provides the benefit of portability and it also prevents Apple iTunes from wreaking havoc on your host PC.

Hooray for no iTunes on my host machine!!!

Anyway, this is how you do it,

How to set it up

  1. Download and install Oracle VirtualBox from
  2. Open VirtualBox and click MACHINE > NEW to create a new virtual machine.
  3. Select your OS and memory allocation. In my case I chose Microsoft Windows 7 32 bit
    Oracle VirtualBox Screenshot
  4. Choose option Create a virtual hard drive now. You can use the defaults for the next prompts. It’s advisable that you  allocate more hard disk space if you are going to store your media files within the Virtual Machine. In my situation I created a shared folder on my host which I mapped to the Virtual Machine.
  5. Plug in your iDevice to your PC.
  6. You should now see your Virtual Machine in the VirtualBox Manager window. Click SETTINGS to configuring your VM.
    Oracle VirtualBox screenshot
  7. You’ll need to mount the OS storage media within the Storagepanel to install your OS.
  8. Enable the Network Adapter in Bridged Mode so that you have internet access.
  9. In the USB pane, ensure the USB 2.0 EHCI controller is enabled otherwise your iDevice will not operate correctly. If you plugged in your iDevice then click the green ‘+’ button and select your iDevice, this will ensure that control of your device is passed straight to your VM automatically each time you start your VM. Otherwise you can manually ‘pass through’ the device once the VM is started.
    Oracle VirtualBox Screenshot
  10. It’s also advisable to enable 2D hardware acceleration and add additional Video Memory for improved performance.
  11. Click OK to save your changes
  12. Start your Virtual Machine and install the OS and Apple iTunes
  13. Setup your iTunes library to find your media files. It’s recommended that you use the ‘Consolidate Files‘ library option in iTunes to store all your media files in one single location, that way it’ll be easier for you to relocate your Virtual Machine in future to another PC.
  14. If you need access to the CD Drive on your host machine, simply start your Virtual Machine and ‘pass through’ control of your CD drive to your Virtual Machine through the DEVICES > CD/DVD DEVICES > HOST DRIVE option
  15. iTunes should now see your device and should sync successfully.
    iTunes Screenshot

Issues that I encountered

I had iTunes setup to consolidate all media files to an external USB drive. I experienced device ‘timeout‘ issues and ‘Could not connect to lockdown port‘ errors while syncing with my iPhone. After much hair pulling I realised that the timeouts were occurring only when I configured VirtualBox to ‘pass through’ my USB drive to the Virtual Machine. The issue was solved by instead creating a Shared Machine Folder within the Virtual Machine settings mapping to my USB drive.

I would certainly suggest that you create a snapshot of your Virtual Machine once you’ve created it incase anything goes wrong and you need to rollback to an earlier time.