安卓隐藏 APP
| hide <package> | 隱藏應用 | PMS.setApplicationHiddenSettingAsUser |
adb shell pm hide/unhide package
system_process W/BroadcastQueue: Background execution not allowed: receiving Intent { act=android.intent.action.PACKAGE_REMOVED dat=package:com.iffy.car flg=0x4000010 (has extras) }
?
adb shell pm unhide package
BroadcastQueue: Background execution not allowed: receiving Intent { act=android.intent.action.PACKAGE_ADDED dat=package:com.iffy.car flg=0x4000010 (has extras) }
?
?
/*** Puts the package in a hidden state, which is almost like an uninstalled state,* making the package unavailable, but it doesn't remove the data or the actual* package file. Application can be unhidden by either resetting the hidden state* or by installing it, such as with {@link #installExistingPackage(String)}* @hide*/ @UnsupportedAppUsage public abstract boolean setApplicationHiddenSettingAsUser(@NonNull String packageName,boolean hidden, @NonNull UserHandle userHandle);/*** Returns the hidden state of a package.* @see #setApplicationHiddenSettingAsUser(String, boolean, UserHandle)* @hide*/ @UnsupportedAppUsage public abstract boolean getApplicationHiddenSettingAsUser(@NonNull String packageName,@NonNull UserHandle userHandle);代碼實現
//you need to remove all accounts from the device before running the commands in this blog, // I just removed them in on the device in Settings > Accounts, no factory reset required for me.//adb shell dpm set-profile-owner com.iffy.car/com.iffy.car.fawvw.MyAdmindpm.setApplicationHidden(ownerComponent, "com.iffy.mzc", newHiddenValue);總結
- 上一篇: numpy.random.rand使用详
- 下一篇: tf.stack()和tf.unstac