Tracking Android Client Chinese (accidental) garbled

Source: Internet
Author: User

Software Operating Environment:

Service side: Ubuntu 14.04.2 Server

Client: Android pad

Data tracking Tool: Wireless Card + Wireshark + Notepad + +

———————————————————————————————————————

When the client and the server in the process of data interaction, the testing process to find data anomalies, but in each other program ape through the printout data way to track the data anomalies, and in each other is sure that the data is not a problem, it is very painful, who is the fault? Then we intercept the data analysis from the receiving end or the sender's entrance in the data transmission medium.

here, I use interception of network data to the entrance of the Android device. It is a cumbersome process to use the packet re-analysis on the mobile device, and the root device is required, if the simulator + tcpdump operation is used, the process is cumbersome. I am here to share a wireless network card through the host (desktop) to become a hotspot and use mobile devices to connect this hotspot, the PC side with Wireshark Crawl Desktop wireless card data, you can easily analyze the data. the details are divided into the following steps (for client data display occasional Chinese garbled )

    1. Plug in the wireless card, download 360 free WiFi (really better than WiFi wizard, WiFi elf program old Dead), configure the wireless hotspot, with mobile devices to connect hotspots

    2. For example, the device is connected to the hotspot, the following is the Wireshark tool to open the PC side


      Select Wireless connection, click Start to start crawling packets on the wireless card.

    3. Set the filter conditions (for example, filtering data from the server 169.254.1.12), operating the software on the mobile device, using Wireshark to print the data to txt text, because it is a Chinese character, so to parse the inner code of the characters, so in the TXT packet to find the key data, and the Chinese characters of the 16 code into not epad++ in the Hex-editor edit, and finally save the edited data as HTML, with the browser clock, to see whether the Chinese display is correct (such as)



      As shown, the actual character of the intercepted data is " XXX Conference Room ISC TV ", the intercepted 16 binary into the notepad++ Hex-editor editor, and saved as an HTML file, and finally opened in a browser, choose a different encoding format

      notepad++ Hex-editor Edit as shown


Open with browser

The correct Chinese data and garbled Chinese data were intercepted by Wireshark two copies, compared. Because it is engaged in the development of the server, so through this method smoothly to push the responsibility of the Mobile client program ape. However, there is no reason to find garbled, because the data is divided into two network packets sent in the past, the current speculation may be the client in accepting packets, splicing problems, or the JSON library using the process of transferring utf-8 encoding problems.

Tracking Android Client Chinese (accidental) garbled

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.