测试平台
Platform: RK3588
OS: Android12
需求:
客户apk无法通过Build.getSerial方法正常获取到机器序列号
解决方法:
代码路径:frameworks/base/core/java/android/os/Build.java
--- a/core/java/android/os/Build.java
+++ b/core/java/android/os/Build.java
@@ -157,7 +157,7 @@ public class Build {
// IMPORTANT: This field should be initialized via a function call to
// prevent its value being inlined in the app during compilation because
// we will later set it to the value based on the app's target SDK.
- public static final String SERIAL = getString("no.such.thing");
+ public static final String SERIAL = getString("ro.serial