2025년 3월 27일부터 AOSP를 빌드하고 기여하려면 aosp-main
대신 android-latest-release
를 사용하는 것이 좋습니다. 자세한 내용은 AOSP 변경사항을 참고하세요.
USB를 통한 데이터 신호 사용 중지
컬렉션을 사용해 정리하기
내 환경설정을 기준으로 콘텐츠를 저장하고 분류하세요.
Android 12에서는 IT 관리자가 회사 소유 기기에서 USB를 통한 데이터 신호를 사용 중지하는 기능이 추가되었습니다(충전 기능 제외). 이 기능을 지원하려면 OEM은 USB HAL을 업데이트하고 추가된 기기 정책 관리자 API 지원을 활용해야 합니다.
기기 정책 관리자
USB를 통한 신호 사용 중지를 지원하기 위해 다음 세 가지 공개 API가 DevicePolicyManager
에 포함되어 있습니다.
setUsbDataSignalingEnabled(boolean enabled)
는 UsbManager
에서 enableUsbDataSignal
API를 호출하여 USB 데이터 신호를 사용 설정하거나 사용 중지하는 API입니다.
canUsbDataSignalingBeDisabled()
는 USB 데이터 신호 사용 설정 또는 사용 중지가 기기에서 지원되는지 확인하는 API입니다.
isUsbDataSignalingEnabled()
는 USB 데이터 신호가 사용 설정되었는지 확인하는 API입니다.
- 이는 정책 투명성 대화상자 창이 표시되는지 확인하는 데 필요합니다. 시스템 사용자는 시스템 사용자에서 호출할 수 있는 이 특정 API의 숨겨진 변형을 호출하여 USB 데이터 신호가 특정 사용자에게 사용 설정되었는지 확인할 수 있습니다.
기기 정책 관리자 구현 예
다음은 기기 정책 관리자를 구현하는 방법을 보여주는 예입니다.
class android.app.admin.DevicePolicyManager {
/**
* Called by device owner or profile owner of an organization-owned managed profile to
* enable or disable USB data signaling for the device. When disabled, USB data connections
* (except from charging functions) are prohibited.
*
* <p> This API is not supported on all devices, the caller should call
* {@link #canUsbDataSignalingBeDisabled()} to check whether enabling or disabling USB data
* signaling is supported on the device.
*
* @param enabled whether USB data signaling should be enabled or not.
* @throws SecurityException if the caller is not a device owner or a profile owner on
* an organization-owned managed profile.
* @throws IllegalStateException if disabling USB data signaling is not supported or
* if USB data signaling fails to be enabled/disabled.
*/
public void setUsbDataSignalingEnabled(boolean enabled);
/**
* Called by device owner or profile owner of an organization-owned managed profile to return
* whether USB data signaling is currently enabled by the admin.
*
* @return {@code true} if USB data signaling is enabled, {@code false} otherwise.
*/
public boolean isUsbDataSignalingEnabled();
/**
* Called by the system to check whether USB data signaling is currently enabled for this user.
*
* @param userId which user to check for.
* @return {@code true} if USB data signaling is enabled, {@code false} otherwise.
* @hide
*/
public boolean isUsbDataSignalingEnabledForUser(@UserIdInt int userId);
/**
* Returns whether enabling or disabling USB data signaling is supported on the device.
*
* @return {@code true} if the device supports enabling and disabling USB data signaling.
*/
public boolean canUsbDataSignalingBeDisabled();
설정
사용자는 USB가 연결되자마자 USB 환경설정과 테더링 설정을 수정할 수 있습니다. USB 환경설정 화면에 액세스하려면 다음을 실행하세요.
- 설정을 탭합니다.
- 연결된 기기를 탭합니다.
- USB를 탭합니다.
참고: USB가 연결되어 있지 않으면 USB 환경설정을 수정할 수 없고 환경설정이 연결된 기기 창에 표시되지 않습니다.
IT 관리자가 회사 소유 기기에서 USB 데이터 신호를 사용 중지하면 사용자는 USB 환경설정을 수정할 수 없습니다. 대신 설정의 모든 USB 환경설정이 완전히 사용 중지되어 정책 투명성 대화상자 창이 만들어집니다.
참고: USB 데이터 신호가 사용 중지되면 USB 디버깅과 기본 USB 구성, USB 오디오 라우팅 환경설정이 모두 개발자 옵션에서 사용 중지됩니다.
이 페이지에 나와 있는 콘텐츠와 코드 샘플에는 콘텐츠 라이선스에서 설명하는 라이선스가 적용됩니다. 자바 및 OpenJDK는 Oracle 및 Oracle 계열사의 상표 또는 등록 상표입니다.
최종 업데이트: 2025-07-27(UTC)
[[["이해하기 쉬움","easyToUnderstand","thumb-up"],["문제가 해결됨","solvedMyProblem","thumb-up"],["기타","otherUp","thumb-up"]],[["필요한 정보가 없음","missingTheInformationINeed","thumb-down"],["너무 복잡함/단계 수가 너무 많음","tooComplicatedTooManySteps","thumb-down"],["오래됨","outOfDate","thumb-down"],["번역 문제","translationIssue","thumb-down"],["샘플/코드 문제","samplesCodeIssue","thumb-down"],["기타","otherDown","thumb-down"]],["최종 업데이트: 2025-07-27(UTC)"],[],[],null,["# Disable data signaling over USB\n\nAndroid 12 has added the ability for IT admins to disable data signaling\nover USB on corporate-owned devices (except for the charging function). In order to support this\nfunctionality, OEMs must update their USB HAL and utilize the added support for Device Policy\nManager APIs.\n\nDevice Policy Manager\n---------------------\n\nTo support disabling signaling over USB, the following three public APIs are included in\n`DevicePolicyManager`:\n\n- `setUsbDataSignalingEnabled(boolean enabled)` is an API that enables or disables USB data signaling by calling the `enableUsbDataSignal` API in `UsbManager`.\n- `canUsbDataSignalingBeDisabled()` is an API that checks whether enabling or disabling USB data signaling is supported on the device.\n- `isUsbDataSignalingEnabled()` is an API that checks whether USB data signaling has been enabled.\n - This is required to check whether or not a policy transparency dialog window is shown. System users can call a hidden variant for this particular API that can be called by the system user to check if USB data signaling has been enabled for a particular user.\n\n### Device Policy Manager implementation example\n\nThe following is an example of how to implement the Device Policy Manager. \n\n```\nclass android.app.admin.DevicePolicyManager {\n /**\n * Called by device owner or profile owner of an organization-owned managed profile to\n * enable or disable USB data signaling for the device. When disabled, USB data connections\n * (except from charging functions) are prohibited.\n *\n * \u003cp\u003e This API is not supported on all devices, the caller should call\n * {@link #canUsbDataSignalingBeDisabled()} to check whether enabling or disabling USB data\n * signaling is supported on the device.\n *\n * @param enabled whether USB data signaling should be enabled or not.\n * @throws SecurityException if the caller is not a device owner or a profile owner on\n * an organization-owned managed profile.\n * @throws IllegalStateException if disabling USB data signaling is not supported or\n * if USB data signaling fails to be enabled/disabled.\n */\n public void setUsbDataSignalingEnabled(boolean enabled);\n\n\n /**\n * Called by device owner or profile owner of an organization-owned managed profile to return\n * whether USB data signaling is currently enabled by the admin.\n *\n * @return {@code true} if USB data signaling is enabled, {@code false} otherwise.\n */\n public boolean isUsbDataSignalingEnabled();\n\n\n /**\n * Called by the system to check whether USB data signaling is currently enabled for this user.\n *\n * @param userId which user to check for.\n * @return {@code true} if USB data signaling is enabled, {@code false} otherwise.\n * @hide\n */\n public boolean isUsbDataSignalingEnabledForUser(@UserIdInt int userId);\n\n\n /**\n * Returns whether enabling or disabling USB data signaling is supported on the device.\n *\n * @return {@code true} if the device supports enabling and disabling USB data signaling.\n */\n public boolean canUsbDataSignalingBeDisabled();\n```\n\nSettings\n--------\n\n- Users can modify USB preference and tethering settings as soon as USB is connected. To access the USB preferences screen, do the following:\n 1. Tap **Settings.**\n 2. Tap **Connected devices.**\n 3. Tap **USB.**\n- **Note:** If USB is not connected, USB preferences can't be modified and will not appear in the Connected devices window.\n- If an IT admin disables USB data signaling on a corporate-owned device, the user can't modify their USB preferences. Instead, all USB preferences in **Settings** are totally disabled, which will create a policy transparency dialog window.\n- **Note:** If USB data signaling is disabled, USB debugging, default USB configurations, and USB audio routing preferences will all be disabled in developer options."]]