mobileinsight-mobile icon indicating copy to clipboard operation
mobileinsight-mobile copied to clipboard

[Android 10/Q] diag_revealer not giving output on API29 / Q

Open MaxwellDPS opened this issue 4 years ago • 2 comments

Versions

  • OS: diag_revealer built on Ubuntu 18
  • Python version: 2.7 & 3.7-3.8
  • Python installation method: APT
  • Android SDK version: API 29 Android 10/Q
  • Android NDK version: 21.3.6528147
  • Device: Pixel 4 flame
  • Device OS: Stock Pixel /w Magisk
  • Build: QQ3A.200805.001

Description

The app appears to be broken on Android 10 - Q

Upon running the app no errors occur but no logs populate either.

I tried to compile just the diag_revealer and run, but I'm not getting any output from /dev/diag. Could SELinux be causing issues?

It also looks like Android 10 has a different struct for diag_logging_mode_param_t than android 9 did.

Code and Logs

Android 10

struct diag_logging_mode_param_t {
--
  | uint32_t req_mode;
  | uint32_t peripheral_mask;
  | uint32_t pd_mask;
  | uint8_t mode_param;
  | uint8_t diag_id;
  | uint8_t pd_val;
  | uint8_t reserved;
  | int peripheral;
  | int device_mask;
  | } __packed;

Android 9

struct diag_logging_mode_param_t_pie {
    uint32_t req_mode;
	uint32_t peripheral_mask;
	uint32_t pd_mask;
	uint8_t mode_param;
	uint8_t diag_id;
	uint8_t pd_val;
	uint8_t reserved;
	int peripheral;
} __packed;

MaxwellDPS avatar Sep 06 '20 00:09 MaxwellDPS

Thank you for pointing out this issue! We are looking into this and see what we can do. Diag behaves differently across major Android versions and also different vendors, which indeed caused most problems.

zwyuan avatar Sep 19 '20 18:09 zwyuan

@zwyuan No problem, It also has not been working on Android 11. It seems like it may be an issue with ioctl, and possibly an SELinux.

MaxwellDPS avatar Sep 19 '20 22:09 MaxwellDPS