-
-
Notifications
You must be signed in to change notification settings - Fork 24
Description
你觉得框架有什么不足之处?【必答】
Build.MODEL只显示产品型号
例如: NX769J
这个值展示给用户后,对于用户来说很陌生,用户更熟悉的是 NX769J 对应的 nubia 红魔9 Pro游戏手机
市面上机型实在是太多了,一个人的精力时间相对不足,且我也没有那么多的测试手机来校验准确性和完善兼容更多的机型
我提供下目前我收集的,基本满足大部分手机销售型号的获取
这里抛出来,问问大佬是否有精力和足够的机型来完善这个信息
ro.lge.petname
ro.product.display
ro.oppo.market.name
ro.vivo.market.name
ro.product.marketname
ro.vivo.internet.name
ro.config.marketing_name
ro.vendor.product.ztename
ro.product.odm.marketname
ro.boot.vendor.lge.petname
ro.vendor.vivo.market.name
ro.vendor.oplus.market.name
ro.product.vendor.marketname
ro.product.bootimage.marketname
ro.vendor.asus.product.mkt_name
ro.vendor.config.lgsi.market_name
获取逻辑就是返回有值就使用,没有值就获取下一个,获取时不分先后顺序

但是目前三星是无法获取的,只能通过 Build.MODEL 查字典匹配
因为三星的型号同系列前面一样后面有区别,所以这里不是key全匹配,这里key只记录同系列前面部分
例如:SM-S921 是 Samsung Galaxy S24
同系列的还有 SM-S9210 SM-S9211 SM-S921x 但是他们的销售型号名称都是 Samsung Galaxy S24
所以这里key只记录SM-S921 匹配的时候 使用 startsWith
除了三星需要key匹配外,我这边也收集了一些其他品牌的 model :market_name,不过大部分厂商都可以通过getprop匹配到,收集的那些品牌model :market_name实际有没有生效,我这边也没有足够的数据支持,就一起贴在后面,如果有类似需求的人,也可以作为参考
ps:这里只有Samsung是通过 startsWith 匹配的,其他品牌都是直接匹配key值
Samsung.name.entries.firstOrNull { Build.MODEL.startsWith(it.key) }?.let { return it.value }
Huawei.name[Build.MODEL]?.let { return it }
object Samsung {
val name = mapOf(
"SCH-i909" to "Samsung Galaxy S",
"SCH-I91" to "Samsung Galaxy S Duos",
"SCH-I939" to "Samsung Galaxy S3",
"SCH-I959" to "Samsung Galaxy S4",
"SGH-I437" to "Samsung Galaxy Express",
"SCH-I889" to "Samsung Galaxy Note",
"SCH-N719" to "Samsung Galaxy Note 2",
"SCH-W2013" to "Samsung W2013",
"SCH-W699" to "Samsung W699",
"SCH-W799" to "Samsung W799",
"SCH-W899" to "Samsung W899",
"SCH-W999" to "Samsung W999",
"GT-I900" to "Samsung Galaxy S",
"GT-I908" to "Samsung Galaxy Grand",
"GT-I910" to "Samsung Galaxy S2",
"GT-I915" to "Samsung Galaxy Mega",
"GT-S550" to "Samsung Galaxy S5 Mini",
"GT-S543" to "Samsung Galaxy S5 Mini",
"GT-I930" to "Samsung Galaxy S3",
"GT-I819" to "Samsung Galaxy S3 Mini",
"GT-I950" to "Samsung Galaxy S4",
"GT-I922" to "Samsung Galaxy Note",
"GT-I920" to "Samsung Galaxy Mega",
"GT-S726" to "Samsung Galaxy Star Pro",
"GT-S727" to "Samsung Galaxy Ace 3",
"GT-S739" to "Samsung Galaxy Trend Lite",
"GT-S531" to "Samsung Galaxy Pocket Neo",
"GT-S528" to "Samsung Galaxy Star",
"GT-I826" to "Samsung Galaxy Core",
"GT-N710" to "Samsung Galaxy Note 2",
"GT-I570" to "Samsung Galaxy Spica",
"GT-B551" to "Samsung Galaxy Y Pro",
"GT-S631" to "Samsung Galaxy Young",
"GT-S681" to "Samsung Galaxy Fame",
"SM-G710" to "Samsung Galaxy Grand 2",
"SM-G715" to "Samsung Galaxy Xcover Pro",
"SM-G770" to "Samsung Galaxy S10 Lite",
"SM-G780" to "Samsung Galaxy S20 FE",
"SM-G781" to "Samsung Galaxy S20 FE 5G",
"SM-G892" to "Samsung Galaxy S8 Active",
"SM-G950" to "Samsung Galaxy S8",
"SM-G955" to "Samsung Galaxy S8+",
"SM-G960" to "Samsung Galaxy S9",
"SM-G965" to "Samsung Galaxy S9+",
"SM-G970" to "Samsung Galaxy S10e",
"SM-G973" to "Samsung Galaxy S10",
"SM-G975" to "Samsung Galaxy S10+",
"SM-G977" to "Samsung Galaxy S10 5G",
"SM-G980" to "Samsung Galaxy S20",
"SM-G981" to "Samsung Galaxy S20 5G",
"SM-G985" to "Samsung Galaxy S20+",
"SM-G986" to "Samsung Galaxy S20+ 5G",
"SM-G988" to "Samsung Galaxy S20 Ultra",
"SM-G990" to "Samsung Galaxy S21",
"SM-G991" to "Samsung Galaxy S21 5G",
"SM-G996" to "Samsung Galaxy S21+",
"SM-G998" to "Samsung Galaxy S21 Ultra",
"SM-G350E" to "Samsung Galaxy Star 2+",
"SM-G355H" to "Samsung Galaxy Core 2",
"SM-G3502" to "Samsung Galaxy Core+",
"SM-G318H" to "Samsung Galaxy Trend 2 Lite",
"SM-G313F" to "Samsung Galaxy Ace 4",
"SM-G310" to "Samsung Galaxy Ace Style",
"SM-G750F" to "Samsung Galaxy Mega 2",
"SM-G110B" to "Samsung Galaxy Pocket 2",
"SM-G532" to "Samsung Galaxy J2 Prime",
"SM-G530" to "Samsung Galaxy Grand Prime",
"SM-G550" to "Samsung Galaxy On5",
"SM-G551" to "Samsung Galaxy On5 青春版",
"SM-G552" to "Samsung Galaxy On5 时尚版",
"SM-G160" to "Samsung Galaxy Folder",
"SM-G165" to "Samsung Galaxy Folder 2",
"SM-G600" to "Samsung Galaxy On7",
"SM-G611" to "Samsung Galaxy J4 Prime 2",
"SM-G615" to "Samsung Galaxy J7 Max",
"SM-G885" to "Samsung Galaxy A9",
"SM-G887" to "Samsung Galaxy A8s",
"SM-G610" to "Samsung Galaxy J7 Prime",
"SM-G620" to "Samsung Galaxy A6s",
"SM-G390" to "Samsung Galaxy Xcover 4",
"SM-G850" to "Samsung Galaxy Alpha",
"SM-G875" to "Samsung Galaxy S 轻奢版",
"SM-G960" to "Samsung Galaxy S9",
"SM-G965" to "Samsung Galaxy S9+",
"SM-G930" to "Samsung Galaxy S7",
"SM-G935" to "Samsung Galaxy S7 Edge",
"SM-G891" to "Samsung Galaxy S7 Active",
"SM-G890" to "Samsung Galaxy S6 Active",
"SM-G920" to "Samsung Galaxy S6",
"SM-G925" to "Samsung Galaxy S6 edge",
"SM-G928" to "Samsung Galaxy S6 edge+",
"SM-G900" to "Samsung Galaxy S5",
"SM-G903" to "Samsung Galaxy S5 Neo",
"SM-G360" to "Samsung Galaxy Core Prime",
"SM-G130" to "Samsung Galaxy Young 2",
"SM-G386" to "Samsung Galaxy Core",
"SM-N950" to "Samsung Galaxy Note 8",
"SM-N960" to "Samsung Galaxy Note 9",
"SM-N970" to "Samsung Galaxy Note 10",
"SM-N971" to "Samsung Galaxy Note 10 5G",
"SM-N975" to "Samsung Galaxy Note 10+",
"SM-N976" to "Samsung Galaxy Note 10+ 5G",
"SM-N980" to "Samsung Galaxy Note 20",
"SM-N981" to "Samsung Galaxy Note 20 5G",
"SM-N985" to "Samsung Galaxy Note 20 Ultra",
"SM-N986" to "Samsung Galaxy Note 20 Ultra 5G",
"SM-N750" to "Samsung Galaxy Note 3",
"SM-N910" to "Samsung Galaxy Note 4",
"SM-N915" to "Samsung Galaxy Note Edge",
"SM-N920" to "Samsung Galaxy Note 5",
"SM-N930" to "Samsung Galaxy Note 7",
"SM-N935" to "Samsung Galaxy Note Fan Edition",
"SM-N770" to "Samsung Galaxy Note 10 Lite",
"SM-N900" to "Samsung Galaxy Note 3",
"SM-F700" to "Samsung Galaxy Z Flip",
"SM-F707" to "Samsung Galaxy Z Flip 5G",
"SM-F711" to "Samsung Galaxy Z Flip 3",
"SM-F721" to "Samsung Galaxy Z Flip 4",
"SM-F731" to "Samsung Galaxy Z Flip 5",
"SM-F900" to "Samsung Galaxy Z Fold",
"SM-F907" to "Samsung Galaxy Z Fold 5G",
"SM-F916" to "Samsung Galaxy Z Fold 2",
"SM-F926" to "Samsung Galaxy Z Fold 3",
"SM-F936" to "Samsung Galaxy Z Fold 4",
"SM-F946" to "Samsung Galaxy Z Fold 5",
"SM-F127" to "Samsung Galaxy F12",
"SM-F415" to "Samsung Galaxy F41",
"SM-W2014" to "Samsung W2014",
"SM-W2015" to "Samsung W2015",
"SM-W2016" to "Samsung W2016",
"SM-W2017" to "Samsung W2017",
"SM-W2018" to "Samsung W2018",
"SM-W2019" to "Samsung W2019",
"SM-W2020" to "Samsung W20 5G",
"SM-W2021" to "Samsung W21 5G",
"SM-W2022" to "Samsung W22 5G",
"SM-W9023" to "Samsung W23",
"SM-W7023" to "Samsung W23 Flip",
"SM-W9024" to "Samsung W24",
"SM-W7024" to "Samsung W24 Flip",
"SM-W700" to "Samsung Galaxy TabPro S WLAN",
"SM-T82" to "Samsung Galaxy Tab S3",
"SM-T83" to "Samsung Galaxy Tab S4",
"SM-T86" to "Samsung Galaxy Tab S6",
"SM-T87" to "Samsung Galaxy Tab S7",
"SM-T97" to "Samsung Galaxy Tab S7+",
"SM-T547" to "Samsung Galaxy Tab Active Pro 10.1",
"SM-T70" to "Samsung Galaxy Tab S 8.4",
"SM-T71" to "Samsung Galaxy Tab S2 8.0",
"SM-T81" to "Samsung Galaxy Tab S2 9.7",
"SM-T73" to "Samsung Galaxy Tab S7 FE",
"SM-T35" to "Samsung Galaxy Tab A 8.0",
"SM-T55" to "Samsung Galaxy Tab A 9.7",
"SM-T58" to "Samsung Galaxy Tab A 10.1",
"SM-T38" to "Samsung Galaxy Tab A 8.0",
"SM-T59" to "Samsung Galaxy Tab A 10.5",
"SM-T29" to "Samsung Galaxy Tab A 8.0",
"SM-T51" to "Samsung Galaxy Tab A 10.1",
"SM-T50" to "Samsung Galaxy Tab A7 10.4",
"SM-T22" to "Samsung Galaxy Tab A7 Lite 8.7",
"SM-T23" to "Samsung Galaxy Tab4 7.0",
"SM-T33" to "Samsung Galaxy Tab4 8.0",
"SM-T53" to "Samsung Galaxy Tab4 10.1",
"SM-T32" to "Samsung Galaxy Tab PRO 8.4",
"SM-T52" to "Samsung Galaxy Tab PRO 10.1",
"SM-T92" to "Samsung Galaxy View 2",
"SM-T28" to "Samsung Galaxy Tab A6",
"SM-T67" to "Samsung Galaxy View",
"SM-T80" to "Samsung Galaxy Tab S 10.5",
"SM-X70" to "Samsung Galaxy Tab S8",
"SM-X80" to "Samsung Galaxy Tab S8+",
"SM-X90" to "Samsung Galaxy Tab S8 Ultra",
"SM-X71" to "Samsung Galaxy Tab S9",
"SM-X81" to "Samsung Galaxy Tab S9+",
"SM-X91" to "Samsung Galaxy Tab S9 Ultra",
"SM-X20" to "Samsung Galaxy Tab A8 10.5",
"SM-X510" to "Samsung Galaxy Tab S9 FE",
"SM-X610" to "Samsung Galaxy Tab S9 FE",
"SM-X210" to "Samsung Galaxy Tab A9+",
"SM-P58" to "Samsung Galaxy Tab A with S Pen 10.1",
"SM-A505" to "Samsung Galaxy A50",
"SM-A500" to "Samsung Galaxy A5",
"SM-A507" to "Samsung Galaxy A50s",
"SM-A515" to "Samsung Galaxy A51",
"SM-A516" to "Samsung Galaxy A51 5G",
"SM-A705" to "Samsung Galaxy A70",
"SM-A716" to "Samsung Galaxy A71",
"SM-A715" to "Samsung Galaxy A71",
"SM-A326" to "Samsung Galaxy A32",
"SM-S916" to "Samsung Galaxy S23+",
"SM-S918" to "Samsung Galaxy S23 Ultra",
"SM-S911" to "Samsung Galaxy S23",
"SM-S906" to "Samsung Galaxy S22+",
"SM-S901" to "Samsung Galaxy S22",
"SM-C101" to "Samsung Galaxy S4 zoom",
"SM-S908" to "Samsung Galaxy S22 Ultra",
"SM-S711" to "Samsung Galaxy S23 FE",
"SM-S921" to "Samsung Galaxy S24",
"SM-S926" to "Samsung Galaxy S24+",
"SM-S928" to "Samsung Galaxy S24 Ultra",
"SM-A300" to "Samsung Galaxy A3",
"SM-A307" to "Samsung Galaxy A30s",
"SM-A305" to "Samsung Galaxy A30",
"SM-A700" to "Samsung Galaxy A7",
"SM-A800" to "Samsung Galaxy A8",
"SM-A510" to "Samsung Galaxy A5",
"SM-A710" to "Samsung Galaxy A7",
"SM-A900" to "Samsung Galaxy A9",
"SM-A910" to "Samsung Galaxy A9 Pro",
"SM-A207" to "Samsung Galaxy A20s",
"SM-A606" to "Samsung Galaxy A60",
"SM-A707" to "Samsung Galaxy A70s",
"SM-A805" to "Samsung Galaxy A80",
"SM-A908" to "Samsung Galaxy A90",
"SM-A526" to "Samsung Galaxy A52",
"SM-A536" to "Samsung Galaxy A53",
"SM-E526" to "Samsung Galaxy F52",
"SM-A546" to "Samsung Galaxy A54",
"SM-A556" to "Samsung Galaxy A55",
"SM-C501" to "Samsung Galaxy C5 Pro",
"SM-C700" to "Samsung Galaxy C7",
"SM-C701" to "Samsung Galaxy C5 Pro",
"SM-C710" to "Samsung Galaxy C8",
"SM-J500" to "Samsung Galaxy J5",
"SM-J700" to "Samsung Galaxy J7",
"SM-J311" to "Samsung Galaxy J3 Pro",
"SM-J510" to "Samsung Galaxy J5",
"SM-J710" to "Samsung Galaxy J7",
"SM-J330" to "Samsung Galaxy J3",
"SM-E700" to "Samsung Galaxy E7",
"SM-P61" to "Samsung Galaxy Tab S6 Lite",
"SM-S515" to "Samsung Galaxy A51",
"SC-54A" to "Samsung Galaxy A51 5G",
"SC-01M" to "Samsung Galaxy Note10+",
"SC-53A" to "Samsung Galaxy Note20 Ultra 5G",
"SC-03L" to "Samsung Galaxy S10",
"SC-04L" to "Samsung Galaxy S10+",
"SC-05L" to "Samsung Galaxy S10+ Olympic Games Edition",
"SC-51A" to "Samsung Galaxy S20 5G",
"SC-52A" to "Samsung Galaxy S20+ 5G",
"SC-02H" to "Samsung Galaxy S7 Edge",
"SC-01H" to "Samsung Galaxy Active Neo",
"SM-M307" to "Samsung Galaxy M30s",
"SM-C500" to "Samsung Galaxy C5",
"SM-A528" to "Samsung Galaxy A52s 5G",
"SM-A525" to "Samsung Galaxy A52",
"SM-A520" to "Samsung Galaxy A5",
"SM-A136" to "Samsung Galaxy A13 5G",
"SM-A032" to "Samsung Galaxy A03 Core",
"SM-E426" to "Samsung Galaxy F42 5G",
"SM-M526" to "Samsung Galaxy M52 5G",
"SM-M225" to "Samsung Galaxy M22",
"SM-M326" to "Samsung Galaxy M32 5G",
"SM-A037" to "Samsung Galaxy A03s",
"SM-E225" to "Samsung Galaxy F22",
"SM-M325" to "Samsung Galaxy M32",
"SM-A226" to "Samsung Galaxy A22 5G",
"SM-A225" to "Samsung Galaxy A22",
"SM-M426" to "Samsung Galaxy M42 5G",
"SM-E025" to "Samsung Galaxy F02s",
"SM-A725" to "Samsung Galaxy A72",
"SM-A325" to "Samsung Galaxy A32",
"SM-M625" to "Samsung Galaxy M62",
"SM-E625" to "Samsung Galaxy F62",
"SM-M127" to "Samsung Galaxy M12",
"SM-M022" to "Samsung Galaxy M02",
"SM-A022" to "Samsung Galaxy A02",
"SM-M025" to "Samsung Galaxy M02s",
"SM-A025" to "Samsung Galaxy A02s",
"SM-A125" to "Samsung Galaxy A12",
"SM-M217" to "Samsung Galaxy M21s",
"SM-A426" to "Samsung Galaxy A42 5G",
"SM-M515" to "Samsung Galaxy M51",
"SM-M317" to "Samsung Galaxy M31s",
"SM-A013" to "Samsung Galaxy A01 Core",
"SM-M017" to "Samsung Galaxy M01s",
"SM-M015" to "Samsung Galaxy M01",
"SM-A217" to "Samsung Galaxy A21s",
"SM-A215" to "Samsung Galaxy A21",
"SM-M115" to "Samsung Galaxy M11",
"SM-A315" to "Samsung Galaxy A31",
"SM-A415" to "Samsung Galaxy A41",
"SM-M215" to "Samsung Galaxy M21",
"SM-A115" to "Samsung Galaxy A11",
"SM-M315" to "Samsung Galaxy M31",
"SM-A015" to "Samsung Galaxy A01",
"SM-M107" to "Samsung Galaxy M10s",
"SM-A107" to "Samsung Galaxy A10s",
"SM-A102" to "Samsung Galaxy A10e",
"SM-M405" to "Samsung Galaxy M40",
"SM-A405" to "Samsung Galaxy A40",
"SM-A205" to "Samsung Galaxy A20",
"SM-A202" to "Samsung Galaxy A20e",
"SM-A260" to "Samsung Galaxy A2 Core",
"SM-A105" to "Samsung Galaxy A10",
"SM-M305" to "Samsung Galaxy M30",
"SM-M105" to "Samsung Galaxy M10",
"SM-M205" to "Samsung Galaxy M20",
"SM-A750" to "Samsung Galaxy A7",
"SM-J415" to "Samsung Galaxy J4+",
"SM-J610" to "Samsung Galaxy J6+",
"SM-J800" to "Samsung Galaxy J8",
"SM-J737" to "Samsung Galaxy J7",
"SM-A600" to "Samsung Galaxy A6",
"SM-J400" to "Samsung Galaxy J4",
"SM-J720" to "Samsung Galaxy J3 Duo",
"SM-J250" to "Samsung Galaxy J4 Pro",
"SM-A530" to "Samsung Galaxy A5",
"SM-J200" to "Samsung Galaxy J2",
"SM-J530" to "Samsung Galaxy J5",
"SM-A720" to "Samsung Galaxy A7",
"SM-A320" to "Samsung Galaxy A3",
"SM-A810" to "Samsung Galaxy A8",
"SM-J320" to "Samsung Galaxy J3",
"SM-J105" to "Samsung Galaxy J1 Mini",
"SM-J120" to "Samsung Galaxy J1",
"SM-A310" to "Samsung Galaxy A3",
"SM-J100" to "Samsung Galaxy J1",
"SM-E500" to "Samsung Galaxy E5",
"SM-C115" to "Samsung Galaxy K Zoom",
"SM-V700" to "Samsung Galaxy Gear",
"SM-T595" to "Samsung Galaxy Tab A 10.5",
"SM-T835" to "Samsung Galaxy Tab S4",
)
}
issue 是否有人曾提过类似的建议?【必答】
否
框架文档是否提及了该问题【必答】
否
是否已经查阅框架文档但还未能解决的【必答】
是
你觉得该怎么去完善会比较好?【非必答】
No response