阅读中的APN Android的4.2?APN、Android

2023-09-12 06:38:29 作者:凉冬

我有一个问题的读书的APN 在Android的4.2版的(是读,不写APNS),它抛出一个安全异常:

I have a problem reading APNs in Android v4.2 (Yes reading, not writing APNS), it is throwing a security exception:

没有写权限APN设置:无论是用户10068也不电流   过程中有android.permission.WRITE_APN_SETTINGS。

No permission to write APN settings: Neither user 10068 nor current process has android.permission.WRITE_APN_SETTINGS.

用于在所有的previous平台相同code,没有人知道任何工作围绕这个?

Same code used to work on all previous platforms, does anyone know of any work around to this?

谢谢!

推荐答案

这似乎是故意的改变。该git提交他们加入这一防御包括以下意见:

This appears to be an intentional change. The git commit where they added this defense includes the following comment:

由于数据库可能包含CORP密码,我们应该保护它。使用相同的权限为写入到数据库的读取是潜在的破坏性作为写。

Since the DB may contain corp passwords, we should secure it. Using the same permission as writing to the DB as the read is potentially as damaging as a write.

可以想象的是,您的问题将导致他们考虑增加一个独立的读取权限,但至少从目前来看,这是4.2的回归。

It is conceivable that your issue will cause them to consider adding a separate read permission, but at least for the time being, this is a regression in 4.2.