The pits encountered in Android automation-solve View Hierarchy can not start

The pits encountered in Android automation-solve View Hierarchy can not start

The pits encountered in Android automation-solve View Hierarchy can not start

The 11th issue of
The pits encountered in Android automation-solve View Hierarchy can not start
Zouxin original solves the problem that View Hierarchy cannot be started?
▲▲▲
Help: Why can't Redmi debug?
background:

I installed the mobile-development version, and I have obtained official root permissions.

The results are as follows:
The pits encountered in Android automation-solve View Hierarchy can not start

I posted this request to the official Xiaomi forum, address:

http://bbs.xiaomi.cn/forum.php?mod=viewthread&tid=9094823&pid=188718482&page=1&extra=page%3D1

ps: It seems that there is no technology to solve it. ! !

———————————————————–

After a search, I learned:

If you need to use hierarchyviewer, you need to enable the corresponding service on your mobile phone.

And, Xiaomi, I don’t know what to do, I didn’t black you, I spent the middle of the night and one morning in order to do this.

Yesterday, I did a solution in the middle of the night: Redmi can’t get root permission on the computer, adb root not allowed

Adb root problem solution:

http://seo.plar.cn/seo-2024.html

There was a new problem this morning! !

Ready to sell as a brick!

stop! The solution is as follows:

Solution: Install on the phone: ViewServer.apk

Note: You need to keep the phone in the background.

Where can I download the ViewServer.apk that enables the ViewServer service? There is no such thing in any market. . Then just compile one yourself.

Android source code download address:

http://pan.baidu.com/s/1sjIulYl

Extraction code: wrc8

Note: The download list contains source code, and installable apk, which can be used directly.

This article solves the problem:

Android View Hierarchy, solve the problem that View Hierarchy cannot be started.

-----------------------

Reasons why the View Hierarchy cannot be started

To preserve security, Hierarchy Viewer can only connect to devices running a developer version of the Android system

That is: For security reasons, Hierarchy Viewer can only connect to Android development version mobile phones or emulators (to be precise, only the android system with ro.secure parameter equal to 0 and ro.debuggable equal to 1).

When Hierarchy Viewer is connected to a mobile phone, a client called View Server must be started on the mobile phone to communicate with it via socket. On commercial mobile phones, View Server cannot be opened, so Hierarchy Viewer cannot connect to ordinary commercial mobile phones.

The Android source code realizes this restriction in: A section in the
root directory of the Android source code\frameworks\base\services\java\com\android\server\wm\WindowManageService.java
: The method to
The pits encountered in Android automation-solve View Hierarchy can not start
verify whether a mobile phone is enabled with View Server is :
Adb shell service call window 3
If the return value is: Result: Parcel(00000000 00000000'……..')” It means that the View Server is closed.
If the return value is: Result: Parcel(00000000 00000001'……..') "It means that View Server is on.
If it is a mobile phone that can open View Server (Android development version mobile phone, emulator or mobile phone that patched the system according to the steps in this post), we can use the following command to open View Server:
adb shell service call window 1 i32 4939
Use the following command to close View Server:
adb shell service call window 2 i32 4939
The pits encountered in Android automation-solve View Hierarchy can not start

  • End -
    Author: Brain hole big food goods Leo likes specializes in technology, diligent summarized, make friends with words, good and love to kill one life, happy to share a technical madman.
    Software Tester
    The pits encountered in Android automation-solve View Hierarchy can not start

I heard that this account can kill the leader

· Guess the article you like·

Guess you like

Origin blog.51cto.com/15009374/2555989