이전 버전과 마찬가지로 Android 17에는 앱에 영향을 미칠 수 있는 동작 변경사항이 포함되어 있습니다. 다음 동작 변경사항은 Android 17 이상을 타겟팅하는 앱에만 적용됩니다. 앱이 Android 17 이상을 타겟팅한다면 이러한 동작을 지원하도록 앱을 수정해야 합니다(적용되는 경우).
앱의 targetSdkVersion과 관계없이 Android 17에서 실행되는 모든 앱에 영향을 미치는 동작 변경사항
목록도 검토해야 합니다.
핵심 기능
Android 17에는 Android 시스템의 다양한 핵심 기능을 수정하거나 확장하는 다음과 같은 변경사항이 포함되어 있습니다.
MessageQueue의 새로운 잠금 없는 구현
Beginning with Android 17, apps targeting Android 17 (API level 37)
or higher receive a new lock-free implementation of
android.os.MessageQueue. The new implementation improves performance and
reduces missed frames, but may break clients that reflect on MessageQueue
private fields and methods.
For more information, including mitigation strategies, see MessageQueue behavior change guidance.
이제 정적 최종 필드를 수정할 수 없음
Apps running on Android 17 or higher that target
Android 17 (API level 37) or higher cannot change static final fields. If
an app attempts to change a static final field by using reflection, it will
cause an IllegalAccessException. Attempting to modify one of these fields
through JNI APIs (such as SetStaticLongField()) will cause the app to crash.
접근성
Android 17에서는 접근성을 개선하기 위해 다음과 같은 변경사항을 적용합니다.
복잡한 IME 실제 키보드 입력의 접근성 지원
This feature introduces new AccessibilityEvent and TextAttribute
APIs to enhance screen reader spoken feedback for CJKV language input. CJKV IME
apps can now signal whether a text conversion candidate has been selected during
text composition. Apps with edit fields can specify text change types when
sending text changed accessibility events.
For example, apps can specify that a text change occurred during text
composition, or that a text change resulted from a commit.
Doing this enables accessibility
services such as screen readers to deliver more precise feedback based on the
nature of the text modification.
App adoption
IME Apps: When setting composing text in edit fields, IMEs can use
TextAttribute.Builder.setTextSuggestionSelected()to indicate whether a specific conversion candidate was selected.Apps with Edit Fields: Apps that maintain a custom
InputConnectioncan retrieve candidate selection data by callingTextAttribute.isTextSuggestionSelected(). These apps should then callAccessibilityEvent.setTextChangeTypes()when dispatchingTYPE_VIEW_TEXT_CHANGEDevents. Apps targeting Android 17 (API level 37) that use the standardTextViewwill have this feature enabled by default. (That is,TextViewwill handle retrieving data from the IME and setting text change types when sending events to accessibility services).Accessibility Services: Accessibility services that process
TYPE_VIEW_TEXT_CHANGEDevents can callAccessibilityEvent.getTextChangeTypes()to identify the nature of the modification and adjust their feedback strategies accordingly.
개인 정보 보호
Android 17에는 사용자 개인 정보 보호를 개선하기 위해 다음과 같은 변경사항이 포함되어 있습니다.
ECH (Encrypted Client Hello) 사용 설정
Android 17 引入了对加密客户端问候 (ECH) 的平台支持。ECH 是一种 TLS 扩展,可通过加密 TLS 握手中的服务器名称指示 (SNI) 来增强用户隐私保护。这种加密有助于防止网络观察者轻松识别您的应用所连接的特定网域。
对于以 Android 17(API 级别 37)或更高版本为目标平台的应用,ECH 用于 TLS 连接。只有当应用使用的网络库(例如 HttpEngine、WebView 或 OkHttp)已集成 ECH 支持,并且远程服务器也支持 ECH 协议时,ECH 才会处于活跃状态。如果无法协商 ECH,客户端会发送一个包含随机内容的 ECH 扩展(一种称为 ECH GREASE 的机制)。如需详细了解 ECH GREASE 的工作原理,请参阅 RFC 9849。
为了让应用能够自定义此行为,Android 17 向网络安全配置文件添加了一个新的
<domainEncryption> 元素。
开发者可以在 <base-config> 或
<domain-config> 标记中使用 <domainEncryption>,以全局或按网域的方式选择 ECH 模式(例如
"enabled" 或 "disabled")。
如需了解详情,请参阅加密客户端问候文档。
Android 17을 타겟팅하는 앱에 로컬 네트워크 권한 필요
Android 17에서는 승인되지 않은 로컬 네트워크 액세스로부터 사용자를 보호하기 위해 ACCESS_LOCAL_NETWORK 런타임 권한을 도입합니다. 이 권한은 기존 NEARBY_DEVICES 권한 그룹에 속하므로 이미 다른 NEARBY_DEVICES 권한을 부여한 사용자에게는 다시 메시지가 표시되지 않습니다. 이 새로운 요구사항은 악성 앱이 무제한 로컬 네트워크 액세스를 활용하여 은밀한 사용자 추적 및 지문 생성을 하는 것을 방지합니다. 이 권한을 선언하고 요청하면 앱이 스마트 홈 기기나 전송 수신기 등 로컬 영역 네트워크 (LAN)의 기기를 검색하고 연결할 수 있습니다.
이제 Android 17 (API 수준 37) 이상을 타겟팅하는 앱에는 LAN 기기와의 통신을 유지하는 두 가지 경로가 있습니다. 시스템 중재, 개인 정보 보호 기기 선택기를 채택하여 권한 메시지를 건너뛰거나 런타임에 이 새로운 권한을 명시적으로 요청하여 로컬 네트워크 통신을 유지합니다.
자세한 내용은 로컬 네트워크 권한 문서를 참고하세요.
실제 기기에서 비밀번호 숨기기
If an app targets Android 17 (API level 37) or higher and the user is using
a physical input device (for example, an external keyboard), the Android
operating system applies the new show_passwords_physical setting to all
characters in the password field. By default, that setting hides all password
characters.
The Android system shows the last-typed password character to help the user see if they mistyped the password. However, this is much less necessary with larger external keyboards. In addition, devices with external keyboards often have larger displays, which increases the danger of someone seeing the typed password.
If the user is using the device's touchscreen, the system applies the new
show_passwords_touch setting.
표준 SMS 메시지의 OTP 보호
从 Android 17 开始,Android 将扩展其短信验证码保护功能,以适用于标准短信(包含验证码但不使用 WebOTP 或 SMS Retriever 格式的短信)。对于以 Android 17(API 级别 37)或更高版本为目标平台的应用,这些短信在收到后三小时内不会提供。此延迟旨在帮助防止动态密码劫持。在这三小时的延迟期间,系统会保留
SMS_RECEIVED_ACTION广播,并过滤
短信提供商数据库查询。延迟结束后,这些应用即可使用短信。
某些应用(例如默认短信助理应用、已连接的设备配套应用等)不受此延迟限制。所有依赖于读取短信 来提取动态密码的应用都应改用 SMS Retriever 或 SMS User Consent API,以确保功能持续可用。
보안
Android 17에서는 기기 및 앱 보안을 다음과 같이 개선합니다.
활동 보안
Android 17에서 플랫폼은 '기본적으로 보안' 아키텍처로 계속 전환하여 피싱, 상호작용 가로채기, 혼동된 대리인 공격과 같은 심각한 악용을 완화하도록 설계된 다양한 개선사항을 도입합니다. 이 업데이트에서는 개발자가 앱 호환성과 사용자 보호를 유지하기 위해 새로운 보안 표준을 명시적으로 선택해야 합니다.
개발자에게 미치는 주요 영향은 다음과 같습니다.
- BAL 강화 및 개선된 선택: 보호를
IntentSender로 확장하여 백그라운드 활동 실행 (BAL) 제한사항을 개선하고 있습니다. 개발자는 기존MODE_BACKGROUND_ACTIVITY_START_ALLOWED상수에서 이전해야 합니다. 대신 호출 앱이 표시되는 시나리오로 활동 시작을 제한하여 공격 노출 영역을 크게 줄이는MODE_BACKGROUND_ACTIVITY_START_ALLOW_IF_VISIBLE과 같은 세분화된 컨트롤을 채택해야 합니다. - 채택 도구: 개발자는 엄격 모드와 업데이트된 린트 검사를 활용하여 기존 패턴을 식별하고 향후 타겟 SDK 요구사항에 대비해야 합니다.
기본적으로 CT 사용 설정
앱이 Android 17 (API 수준 37) 이상을 타겟팅하는 경우 인증서 투명성 (CT)이 기본적으로 사용 설정됩니다. (Android 16에서는 CT를 사용할 수 있지만 앱이 선택해야 했습니다.)
더 안전한 네이티브 DCL—C
如果您的应用以 Android 17(API 级别 37)或更高版本为目标平台,则 Android 14 中针对 DEX 和 JAR 文件引入的更安全的动态代码加载 (DCL) 保护功能现在也适用于原生库。
使用 System.load() 加载的所有原生文件都必须标记为只读。否则,系统会抛出 UnsatisfiedLinkError。
我们建议应用尽可能避免动态加载代码,因为这样做会大大增加应用因代码注入或代码篡改而遭到入侵的风险。
CP2 데이터 뷰에서 PII 필드 제한
For apps targeting Android 17 (API level Android 17 (API level 37)) and higher, Contacts Provider 2 (CP2) restricts certain columns containing Personally Identifiable Information (PII) from the data view. When this change is enabled, these columns are removed from the data view to enhance user privacy. The restricted columns include:
Apps that are using these columns from ContactsContract.Data
can extract them from ContactsContract.RawContacts
instead, by joining with RAW_CONTACT_ID.
CP2에서 엄격한 SQL 검사 적용
Android 17 (API 수준 Android 17 (API 수준 37)) 이상을 타겟팅하는 앱의 경우 연락처 제공업체 2 (CP2)는 ContactsContract.Data 테이블에 액세스할 때 READ_CONTACTS 권한 없이 엄격한 SQL 쿼리 유효성 검사를 적용합니다.
이 변경사항을 통해 앱에 READ_CONTACTS
권한이 없으면 StrictColumns 및
StrictGrammar 옵션이 ContactsContract.Data 테이블을 쿼리할 때 설정됩니다. 쿼리에서 이러한 옵션과 호환되지 않는 패턴을 사용하는 경우 쿼리가 거부되고 예외가 발생합니다.
미디어
Android 17에는 미디어 동작에 다음과 같은 변경사항이 포함되어 있습니다.
백그라운드 오디오 강화
从 Android 17 开始,音频框架对后台音频互动(包括音频播放、音频焦点请求和音量更改 API)强制执行限制,以确保这些更改是由用户有意启动的。
部分音频限制适用于所有应用。不过,如果应用以 Android 17(API 级别 37)为目标平台,则限制会更加严格。如果这些应用在后台运行时与音频互动,则必须有前台服务正在运行。此外,应用还必须满足以下一项或两项要求:
- 前台服务必须具有仅在使用时授予的权限 (WIU)。
- 应用必须具有精确闹钟权限,并且正在与
USAGE_ALARM音频流互动。
如需了解详情(包括缓解措施),请参阅后台音频安全加固。
기기 폼 팩터
Android 17에는 다양한 기기 크기와 폼 팩터에서 사용자 환경을 개선하기 위해 다음과 같은 변경사항이 포함되어 있습니다.
대형 화면 (sw>=600dp)에서 방향, 크기 조절, 가로세로 비율 제약을 무시하는 플랫폼 API 변경사항
API 수준 36 이상을 타겟팅하는 앱의 경우 대형 화면 (sw >= 600dp)에서 방향, 가로세로 비율, 크기 조절 제한을 무시하도록 Android 16에서 플랫폼 API 변경사항을 도입했습니다. 개발자는 SDK 36을 사용하여 이러한 변경사항을 선택 해제할 수 있지만, Android 17 (API 수준 37) 이상을 타겟팅하는 앱에서는 더 이상 이 선택 해제를 사용할 수 없습니다.
자세한 내용은 방향 및 크기 조절 제한 무시 를 참고하세요.
연결
Android 17에서는 일관성을 개선하고 블루투스 RFCOMM 소켓의 표준 자바 InputStream 동작과 일치하도록 다음과 같은 변경사항을 도입합니다.
RFCOMM의 일관된 BluetoothSocket read() 동작
For apps targeting Android 17 (API level 37), the
read() method of the InputStream obtained from an
RFCOMM-based BluetoothSocket now returns -1 when the
socket is closed or the connection is dropped.
This change makes RFCOMM socket behavior consistent with LE CoC sockets and
aligns with the standard InputStream.read()
documentation, which states that -1 is returned when the end of the stream is
reached.
Apps that rely solely on catching an IOException to break out of a read loop may
be impacted by this change and should update the BluetoothSocket read loops to
explicitly check for a return value of -1. This ensures the loop terminates
correctly when the remote device disconnects or the socket is closed. For an
example of the recommended implementation, see the
code snippet in the Transfer Bluetooth data
guide.