如何在Android模拟器上运行设备设置向导?
我想运行设备设置向导 - 首次启动新鲜(出厂设备)设备时正在运行的应用程序。问题是:我想在Android模拟器上运行它。
运行Android 12:启动模拟器的模拟器上的以下操作
- 我已经尝试了通过Android Studio向导
- 。
adb shell
su
- 找出禁用向导的哪些组件:
dumpsys package com.google.android.setupwizard | GREP禁用-A3
这给了我:
disabledComponents:
com.google.android.setupwizard.SetupWizardActivity
com.google.android.setupwizard.deferred.ComponentStateMitigationReceiver
- 然后,我启用了具有以下命令的组件:
pm enable com.google.android.setupwizard/.setUpwizardActivity
pm pm启用com。 google.android.setupwizard/.deferred.com.ponentStateMitigationReceiver
- 然后,我在设置中浏览了各种值,这些值可能会影响以下命令的设置向导运行:
conteg> content query query -uri -uri -uri -uri -uri content:// content:// settings/secure
content query -uri content:// settings/settings/global
<代码> content query -uri content -uri content:// settings/system
- ,我已经设置了一些值:
设置放置安全user_setup_complete 0
设置put secure user_setup_personalization_state_state 0
设置put global demote_proviseed 0
reboot
。
然后将设备重新启动到主屏幕,并且没有运行设置向导。
上面的步骤有问题吗?如何在模拟器上运行设置向导?有可能吗?
I want to run device setup wizard - the app that's getting run when you first boot your fresh (factory reset) device. The problem is: I want to run it on Android Emulator.
I've tried the following on Emulator running Android 12:
- Boot emulator via Android Studio wizard.
adb shell
su
- Figure out what components of the wizard are disabled:
dumpsys package com.google.android.setupwizard | grep disabled -A3
this gave me:
disabledComponents:
com.google.android.setupwizard.SetupWizardActivity
com.google.android.setupwizard.deferred.ComponentStateMitigationReceiver
- Then I've enabled the components with the following commands:
pm enable com.google.android.setupwizard/.SetupWizardActivity
pm enable com.google.android.setupwizard/.deferred.ComponentStateMitigationReceiver
- Then I've poked around in settings to see various values that might influence the setup wizard run with the following commands:
content query --uri content://settings/secure
content query --uri content://settings/global
content query --uri content://settings/system
- Then I've set some values:
settings put secure user_setup_complete 0
settings put secure user_setup_personalization_state 0
settings put global device_provisioned 0
reboot
.
And the device rebooted to home screen and no setup wizard was run.
Is there something wrong in the steps above? How do I run a setup wizard on emulator? Is it even possible?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论