Fake the device family by using the first word in the Build.MODEL. Works
well in most cases... "Nexus 6P" -> "Nexus", "Galaxy S7" -> "Galaxy".

@return family name of the device, as best we can tell
170707
protected static String getFamily() {
        try {
            return Build.MODEL.split(" ")[0];
        } catch (Exception e) {
            Log.e(TAG, "Error getting device family.", e);
            return null;
        }
    }
787524
protected String buildDefaultMavenCoordinates() {
        StringBuilder sb = new StringBuilder();
        sb.append(getGroupId()).append(":");
        sb.append(getArtifactId());
        if (StringUtils.isNotBlank(getType())) {
            sb.append(":").append(getType());
        }
        if (StringUtils.isNotBlank(getClassifier())) {
            sb.append(":").append(getClassifier());
        }
        sb.append(":");
        sb.append(getVersion());
        return sb.toString().trim();
    }
910536
public static String getfullNameForDevice(final String deviceName) throws DevFailed {
        checkNullOrEmptyString(deviceName);
        final String[] fields = deviceName.split(DEVICE_SEPARATOR);

        if (deviceName.contains(DBASE_NO) || fields.length != 1) {
            return deviceName;
        } else {
            final Database db = ApiUtil.get_db_obj();
            return db.get_device_from_alias(fields[0]);
        }
    }
635103
public com.google.api.ads.admanager.axis.v201811.DeviceCategoryTargeting getDeviceCategorySegment() {
        return deviceCategorySegment;
    }
754044
public java.util.List<String> getFamilies() {
        if (families == null) {
            families = new com.amazonaws.internal.SdkInternalList<String>();
        }
        return families;
    }
1142337
@Override
    public String getName() {
        Enterprise enterprise = model.getEnterprise();
        return "System Landscape" + (enterprise != null && enterprise.getName().trim().length() > 0 ? " for " + enterprise.getName() : "");
    }
491760
def get_hw_family(self, version_text):
        """"""
        family = None
        if version_text is None:
            return family

        match = re.search(self.platform_re, version_text, re.MULTILINE)
        if match:
            self.platform_string = match.group()
            self.log("Platform string: {}".format(match.group()))
            self.raw_family = match.group(1)
            # sort keys on len reversed (longest first)
            for key in sorted(self.families, key=len, reverse=True):
                if self.raw_family.startswith(key):
                    family = self.families[key]
                    break
            else:
                self.log("Platform {} not supported".format(family))
        else:
            self.log("Platform string not present. Refer to CSCux08958")
        return family
827804
byte[][] getFamilyKeys() {
		Charset c = Charset.forName(charset);

		byte[][] familyKeys = new byte[this.familyMap.size()][];
		int i = 0;
		for (String name : this.familyMap.keySet()) {
			familyKeys[i++] = name.getBytes(c);
		}
		return familyKeys;
	}
1168859
protected function guess_device_type() {
        global $CFG;
        if (empty($CFG->enabledevicedetection)) {
            $this->devicetype = self::DEVICETYPE_DEFAULT;
            return $this->devicetype;
        }
        foreach ($this->devicetypecustoms as $value => $regex) {
            if (preg_match($regex, $this->useragent)) {
                $this->devicetype = $value;
                return $this->devicetype;
            }
        }
        if ($this->is_useragent_mobile()) {
            $this->devicetype = self::DEVICETYPE_MOBILE;
        } else if ($this->is_useragent_tablet()) {
            $this->devicetype = self::DEVICETYPE_TABLET;
        } else if (self::check_ie_version('0') && !self::check_ie_version('7.0')) {
            // IE 6 and before are considered legacy.
            $this->devicetype = self::DEVICETYPE_LEGACY;
        } else {
            $this->devicetype = self::DEVICETYPE_DEFAULT;
        }
        return $this->devicetype;
    }
74067
public String getName()
  {
    if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) 
      SibTr.entry(tc, "getName");
    
    String name = foreignDest.getName();
    
    if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) 
      SibTr.exit(tc, "getName", name);
    
    return name;

  }
951114
public boolean detectAndroidTablet() {

        //First, let's make sure we're on an Android device.
        if (!detectAndroid()) {
            return false;
        }

        //Special check for Android devices with Opera Mobile/Mini. They should NOT report here.
        if (detectOperaMobile()) {
            return false;
        }

        //Otherwise, if it's Android and does NOT have 'mobile' in it, Google says it's a tablet.
        if ((userAgent.indexOf(mobile) > -1)) {
            return false;
        } else {
            return true;
        }
    }
514541
def variants
      return @_variants if @_variants

      @_variants = self.class.ancestors.select {|c| c.to_s =~ /^Jpmobile/ && c.to_s !~ /Emoticon/ }.map do |klass|
        klass = klass.to_s.
                  gsub(/Jpmobile::/, '').
                  gsub(/AbstractMobile::/, '').
                  gsub(/Mobile::SmartPhone/, 'smart_phone').
                  gsub(/Mobile::Tablet/, 'tablet').
                  gsub(/::/, '_').
                  gsub(/([A-Z]+)([A-Z][a-z])/, '\1_\2').
                  gsub(/([a-z\d])([A-Z])/, '\1_\2').
                  downcase
        (klass =~ /abstract/) ? 'mobile' : klass
      end

      if @_variants.include?('tablet')
        @_variants = @_variants.reject {|v| v == 'mobile' }.map {|v| v.gsub(/mobile_/, 'tablet_') }
      elsif @_variants.include?('smart_phone')
        @_variants = @_variants.reject {|v| v == 'mobile' }.map {|v| v.gsub(/mobile_/, 'smart_phone_') }
      end

      @_variants || []
    end
379674
public String adm_name() {
	Util.out4.println("DeviceImpl.adm_name() arrived");

	//
	// Record attribute request in black box
	//

	blackbox.insert_attr(Attr_AdmName);

	//
	// Return data to caller
	//

	Util.out4.println("Leaving DeviceImpl.adm_name()");
	return adm_device_name;
    }
189335
def get_android_id(self) -> str:
        ''''''
        output, _ = self._execute(
            '-s', self.device_sn, 'shell', 'settings', 'get', 'secure', 'android_id')
        return output.strip()
1185542
def device_id_from_name(device_name, nodes):
        
        device_id = None
        for node in nodes:
            if device_name == node['properties']['name']:
                device_id = node['id']
                break
        return device_id
965472
@TargetApi(Build.VERSION_CODES.HONEYCOMB)
    public static boolean hasFakeTouchFeature(PackageManager manager) {
        return manager.hasSystemFeature(PackageManager.FEATURE_FAKETOUCH);
    }
1279676
def name(self):
		

		pchar = self._libinput.libinput_device_get_name(self._handle)
		return string_at(pchar).decode()