mobile-insight / mobileinsight-mobile

Mobile Network Intelligence Made Easy -- Android version of MobileInsight app
http://mobileinsight.net
Other
88 stars 54 forks source link

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

Open MaxwellDPS opened 4 years ago

MaxwellDPS commented 4 years ago

Versions

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;
zwyuan commented 4 years ago

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.

MaxwellDPS commented 4 years ago

@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.