Xiaomi and Huawei for application development

When on one of New Year's Eve days Santa Claus The courier brought Xiaomi Mi Max 2 and Huawei P10 lite to the office, I was debugging the developed application. So the first thing I tried to do with the two devices was to continue developing on them. But it turned out to be not so easy.

Xiaomi: SIM card and Chinese IP

It all started quite cloudlessly: the usual eight tapes according to the version MIUI, and now the 'For Developers' menu is open.

Xiaomi and Huawei for application development

Check the box for USB Debugging. Out of the corner of my eye I notice that there is also 'Install via USB'.

Xiaomi and Huawei for application development

I have never seen anything like this before (before that, during development, I had devices with 'developer' MIUI on Android 5.). I am trying to launch an application on my smartphone. An error is expected. So that flag was not in vain. OK, go back to settings and try to install it. But it was not there. To check this box in the settings, you must first log into your Mi-account!

Xiaomi and Huawei for application development

It's too lazy to rearrange a working SIM-card from another device, so I register an account by email. I try to check the 'Install via USB' checkbox again but fails again. Mandatory activation of the SIM card is required.

Xiaomi and Huawei for application development

Okay, let's have a SIM card. I rearrange it from another work phone, create a new Mi-account, turn on the coveted checkbox. The system thinks …

Xiaomi and Huawei for application development

… and gives another error message: 'The device is temporarily restricted'. After a short googling, it turns out that the problem is old and well-known, it has been manifested for a long time and on different devices:

Xiaomi and Huawei for application development

In the discussion there were various tips on how to overcome this problem, for example, disabling optimization MIUI helped someone. I tried it – no effect. But the most effective was another tip: download the FlexVPN app and launch it and choose China as your landing point. I did just that: I launched and chose Shenzhen.

Xiaomi and Huawei for application development

And voila! The cherished box was checked, and I was able to finally start developing applications on a smartphone Xiaomi Mi Max 2.

Huawei: secret menu

The first impression of Huawei was completely opposite: no mandatory accounts from the Chinese vendor, just tap the build number eight times and check the 'USB debugging' checkbox in the developer menu that appears.

Xiaomi and Huawei for application development

Xiaomi and Huawei for application development

But my joy was short-lived. At that moment, I was dealing with processing a complex request. It was not clear whether the server was sending incorrect data, or the application itself was processing it incorrectly. Having looked out of habit in the debug log (and all requests in debug mode are written there, as well as the server's responses to them), I did not find anything there. Nothing at all. No request logs, no information about errors that were successfully processed, no other debugging messages.

Breakpoints and step-by-step debugging worked great. Android Studio confidently reported that the device is connected and the application process is running on it, you can watch the debug log for this process. But there was no log content.

Google came to the rescue again.

Xiaomi and Huawei for application development

It turned out that the devices Huawei have a secret menu called up by a combination of symbols

 

in the 'dialer'.

Several transitions through nested submenus, setting a secret checkbox …

Xiaomi and Huawei for application development

Xiaomi and Huawei for application development

Xiaomi and Huawei for application development

And finally, full-fledged development on Huawei P10 lite is also possible!

Conclusion

Both devices left an ambiguous impression. On the one hand, they are pleasant to use, very nimble (Huawei just amazed at the speed of application launch). On the other hand, there are very strange problems at the beginning of development. For several years, devices from a couple of dozen vendors passed through my hands, ranging from Micromax and Highscreen to Samsung and Google / LG, but I faced such difficulties for the first time.

Rate article
About smartphones.
Add a comment