Hacktoberfest 2026:维护者为十月标记出来的 issue,仍然开放、适合新手。 浏览 Hacktoberfest issue

Simlock ships its own Android device profiles

已关闭
#483 1 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

维护者通常 1 天内回复

还没有人认领这个 Issue。

评估

难度
5/5
预计耗时
一周以上
新手友好度
35/100
Issue 类型
功能
描述清晰度
描述清楚
活跃度
活跃
技术栈
android, typescript

调研方向

Start by reading the Android driver and the existing simlock doctor checks to see how profiles and SDK or devices.xml definitions are currently resolved. The issue names src/drivers/android/profiles/ and its index.ts as the new entry points; define the shipped profile set there and add the listed consistency and completeness tests. Done means shipped profiles are complete and unique, conflicts and missing recommended images are reported, and devices retain their creation-time config.ini.

由索引模型根据 Issue 内容生成。

描述

request:new
The problem

Simlock has no Android device profiles of its own. A model name such as "Pixel 9" is whatever the installed Android SDK ships (avdmanager list device) or whatever the user's Android Studio ~/.android/devices.xml defines. That causes four problems:

  • The same name can mean different hardware on different hosts, or not exist at all. A model is present only when the SDK is new enough, and devices.xml is per machine. A gateway routes by model name, so it assumes a name means the same device on every worker, and that is not guaranteed.
  • The default models for each class (Pixel 9, Pixel 8, ...) work only if the installed SDK happens to ship them.
  • Two sources can define the same name, and they disagree (#341).
  • A device created from a profile defined by properties starts from a seed SDK profile, and any hardware key the profile does not set keeps the seed's value. The device then depends partly on which seed was used.
Who runs into this

Operators who run more than one worker, or upgrade the SDK on one of them. Agents that ask for a model by name and expect the same device every time.

What you would like to happen

Simlock ships a small library of Android device profiles:

  • One TypeScript file per profile in src/drivers/android/profiles/ (pixel-9.ts, medium-phone.ts, ...), plus an index.ts that imports them all. Listing the folder shows which devices Simlock ships.
  • Each profile gives the name, its other names, the class, and the complete set of hardware keys written into the device's config.ini (screen, density, RAM, cores, keys, sensors, cameras), so the device never depends on the seed profile. Values are copied from the SDK's own profiles, so a name means the same as in Android Studio.
  • The library covers the default models for each class plus a few common screen sizes. Any other model still comes from the SDK or devices.xml.
  • Library names win. A name that the SDK or devices.xml also defines is reported by simlock doctor instead of being resolved silently.
  • A profile may name a recommended system image. It is only a recommendation: simlock doctor names a missing one, and nothing is downloaded implicitly.
  • A device keeps the config.ini it was created with, so changing a profile affects only devices created after the change.
  • Tests check that the folder and the index list the same profiles, that each file is named after its profile, that no name appears twice, and that every profile sets the full list of hardware keys.
Anything else

Planned Android slim emulators will want per-model values here, such as the guest RAM size for a slim device; that work is not filed yet. Related: #341.

Written by an agent.

主要语言
TypeScript
星标
22
派生
2
平均合并
9 小时 14 分钟
30 天内合并 PR
425

环境准备

这个项目没有提供开发容器、Dockerfile 或贡献指南,环境需要你自己搭建:先看它的 README,通用步骤见我们的新手贡献指南。

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

callstackincubator/simlock 的其他 Issue

查看 callstackincubator/simlock 的全部 Issue

相似的 Issue

更多 TypeScript Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。