code: public void collectDeviceInfo(Context ctx) {
          infos.clear();
  
          addVersionInfo(ctx);
  
          Field[] fields = Build.class.getDeclaredFields();
          for (Field field : fields) {
              try {
                  field.setAccessible(true);
                  infos.put(field.getName(), field.get(null).toString());
                  // Log.d(TAG, field.getName() + " : " + field.get(null));
              } catch (Exception e) {
                  Log.e(TAG, "an error occured when collect crash info", e);
              }
          }
      }
docs: 收集设备参数信息
  
  @param ctx