办法:找到管理服务,直接拦截return掉
/frameworks/base/core/java/android/app/PackageManager.java 修改无效!
/frameworks/base/core/java/android/app/ApplicationPackageManager.java
@Override
public boolean hasSystemFeature(String name) {
//*/20231102,rm FEATURE_CAMERA API
if (name.equals(PackageManager.FEATURE_CAMERA)) {
return false;
}
//*/
return hasSystemFeature(name, 0);
}
/frameworks/base/services/core/java/com/android/server/VibratorService.java
@Override // Binder call
public boolean hasVibrator() {
//*/20231102,rm all vibrator API
return false;
/*/
return doVibratorExists();
//*/
}