Today I was trying to debug my application directly on my HuaWei Honor 6, because the android emulator is really slow and that’s a lot more fun on a brand new phone 🙂
I had some difficulties so I thought I would explain here.
- Activate usb debug mode. If it’s the first time you will have to unhide the Developer option menu in the settings. Go to About phone and click 7 times the build number item.
- Then go to the Developer options menu in the settings (it should be there now)
- Activate USB debuggind
- Now we need to install the huawei driver. It can be found here. use the numbr 65 “huawei honor 6”, at least it works for me with my L04.
- Install the exe
- install the exe only gives you the driver on your drive but you still need to chosse it.
- Connect your phone and choose MTP.
- Go to the driver Device Manager (Right click on computer > Properties > Device Manager)
- Right click on the unknown device you should have and Update driver software
- Then use Browse My Computer.
- Use Let me Pick.
- Click Have Disk.
- Go where you installed the driver then in usb_driver/i386 and select the file android_winusb.inf.
- Then you should have Android ADB interface in the list, just choose this and valid.
- Accept everything.
Unplug the phone and replug it. Your device should be recognized in eclipse when you starting your application. But the log are only INFO and you can get DEBUG, which is a pain. Here is how to enable debug log on the Honor 6:
- Dial *#*#2846579#*#*
- Click on ProjectMenu
- Click on Background Setting
- Click on Log Setting
- Select LOG on and confirm
- Select Dump & Log
- Enable Log switch
- Enable Lower down loggers’ priority
- Press Back until home
- Reboot the phone.
Now when you start your application from eclipse, even not in debug mode you should have all logcat log even in DEBUG mode.