Protected Audience API를 테스트하도록 기기를 구성하는 방법에는 두 가지가 있습니다. 개인 정보 보호 샌드박스가 GitHub에서 제공하는 CLI 도구를 사용하거나 일련의 ADB 명령어를 실행하는 것입니다.
CLI 메서드
이 GitHub 저장소에서 CLI Python 스크립트를 가져올 수 있습니다. 리드미의 안내에 따라 종속 항목을 설치하고 원하는 경우 .bashrc
를 설정합니다. 그런 다음 다음 명령어를 사용하여 테스트를 위해 모든 기능 플래그를 빠르게 사용 설정할 수 있습니다.
run python3 main.py enable --disable-flag-push
또는 다음 명령어를 사용하여 특정 기능을 사용 설정할 수 있습니다.
run python3 main.py enable --feature-name <feature name> --disable-flag-push
또한 CLI는 맞춤 잠재고객 데이터 검사, Protected App Signals 인코딩 트리거, 입찰 서비스 테스트 요청에 사용할 기기 내 데이터 수집과 같이 Protected Audience 및 Protected App Signals 사용 사례를 디버깅하는 데 유용한 다른 여러 기능을 제공합니다.
ADB 메서드
앱을 실행하기 전에 다음 명령어를 실행하여 UI를 열고 개인 정보 보호 샌드박스를 사용 설정해야 합니다.
adb shell am start -n com.google.android.adservices.api/com.android.adservices.ui.settings.activities.AdServicesSettingsMainActivity
UI가 표시되면 모든 스위치를 전환하여 개인 정보 보호 샌드박스를 사용 설정한 후 다음 ADB 명령어를 실행하여 테스트용으로 기기 설정을 완료합니다.
adb shell setprop debug.adservices.global_kill_switch false
adb shell setprop debug.adservices.fledge_custom_audience_service_kill_switch false
adb shell setprop debug.adservices.fledge_select_ads_kill_switch false
adb shell setprop debug.adservices.adid_kill_switch false
adb shell setprop debug.adservices.fledge_auction_server_kill_switch false
adb shell setprop debug.adservices.fledge_on_device_auction_kill_switch false
adb shell device_config put adservices adservice_system_service_enabled true
adb shell setprop debug.adservices.disable_fledge_enrollment_check true
adb shell setprop debug.adservices.consent_manager_debug_mode true
adb shell setprop debug.adservices.consent_notification_debug_mode true
adb shell setprop debug.adservices.adservices_shell_command_enabled true
adb shell setprop debug.adservices.fledge_is_ad_selection_cli_enabled true
adb shell setprop debug.adservices.fledge_is_consented_debugging_cli_enabled true
adb shell setprop debug.adservices.fledge_auction_server_consented_debugging_enabled true
adb shell setprop debug.adservices.ad_services_js_isolate_console_messages_in_logs_enabled true
adb shell setprop debug.adservices.fledge_is_custom_audience_cli_enabled true
adb shell setprop debug.adservices.fledge_is_app_signals_cli_enabled true
adb shell device_config put adservices ppapi_app_allow_list \"\*\"
adb shell device_config put adservices pas_app_allow_list \"\*\"
adb shell device_config put adservices fledge_app_install_filtering_enabled true
adb shell device_config put adservices fledge_frequency_cap_filtering_enabled true
adb shell device_config put adservices fledge_fetch_custom_audience_enabled true
adb shell device_config put adservices fledge_schedule_custom_audience_update_enabled true
adb shell device_config put adservices protected_signals_enabled true
adb shell device_config put adservices protected_signals_periodic_encoding_enabled true
adb shell device_config put adservices fledge_ad_selection_ad_selection_prebuilt_uri_enabled true
adb shell device_config put adservices fledge_http_cache_enable_js_caching false
adb shell device_config put adservices fledge_event_level_debug_reporting_enabled true
adb shell device_config put adservices fledge_event_level_debug_report_send_immediately true
adb shell device_config put adservices fledge_ad_selection_contextual_ads_enabled true
adb shell device_config put adservices fledge_auction_server_enabled true
adb shell device_config put adservices fledge_auction_server_enabled_for_report_impression true
adb shell device_config put adservices fledge_auction_server_enabled_for_report_event true
adb shell device_config put adservices fledge_auction_server_enabled_for_update_histogram true
adb shell device_config put adservices fledge_auction_server_enabled_for_select_ads_mediation true
adb shell device_config put adservices fledge_auction_server_ad_render_id_enabled true
adb shell device_config put adservices fledge_auction_server_multi_cloud_enabled true
adb shell device_config put adservices fledge_auction_server_omit_ads_enabled true
adb shell device_config put adservices fledge_auction_server_request_flags_enabled true
adb shell device_config put adservices fledge_get_ad_selection_data_seller_configuration_enabled true
adb shell device_config put adservices fledge_register_ad_beacon_enabled true
adb shell device_config put adservices fledge_cpc_billing_enabled true
adb shell device_config put adservices fledge_data_version_header_enabled true
adb shell device_config put adservices fledge_measurement_report_and_register_event_api_enabled true
adb shell device_config put adservices fledge_kanon_sign_join_enabled true
adb shell device_config put adservices fledge_kanon_sign_join_on_device_auction_enabled true
adb shell device_config put adservices fledge_kanon_sign_join_auction_server_enabled true
adb shell device_config put adservices fledge_kanon_background_process_enabled true
adb shell device_config put adservices fledge_kanon_key_attestation_enabled true
adb shell device_config put adservices fledge_ad_selection_ad_selection_prebuilt_uri_enabled true
adb shell device_config put adservices fledge_event_level_debug_reporting_enabled true
adb shell device_config put adservices fledge_event_level_debug_report_send_immediately true
adb shell device_config put adservices fledge_ad_selection_contextual_ads_enabled true
adb shell device_config set_sync_disabled_for_tests none
adb shell setprop log.tag.adservices VERBOSE
adb shell setprop log.tag.adservices.fledge VERBOSE
adb shell setprop log.tag.adservices.measurement VERBOSE
adb shell setprop log.tag.adservices.topics VERBOSE
adb shell setprop log.tag.adservices.kanon VERBOSE
adb shell setprop log.tag.AdServicesShellCmd VERBOSE
adb shell setprop log.tag.FledgeSample VERBOSE
이러한 명령어를 실행하면 Protected Audience API를 호출할 수 있습니다.