Skip to content

Commit 5b5a0b7

Browse files
committed
base-patches-30: enlarge PROP_VALUE_MAX size
fixes E libc : The property "ro.build.fingerprint" has a value with length 114 that is too large for __system_property_get()/__system_property_read(); use __system_property_read_callback() instead.
1 parent 3db3e26 commit 5b5a0b7

File tree

3 files changed

+78
-0
lines changed

3 files changed

+78
-0
lines changed
Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
From 59142fd0ca5b2906e96ad9c03bc3b55e7848439e Mon Sep 17 00:00:00 2001
2+
From: jingjiezhuang <jingjie.zhuang@igg.com>
3+
Date: Thu, 27 Mar 2025 22:33:56 +0800
4+
Subject: [PATCH] enlarge PROP_VALUE_MAX size
5+
6+
Change-Id: Id631c83a9b21abce857e29d2f942c2036f4f03bd
7+
---
8+
libc/include/sys/system_properties.h | 2 +-
9+
1 file changed, 1 insertion(+), 1 deletion(-)
10+
11+
diff --git a/libc/include/sys/system_properties.h b/libc/include/sys/system_properties.h
12+
index a2e1923b0..33aab9c8e 100644
13+
--- a/libc/include/sys/system_properties.h
14+
+++ b/libc/include/sys/system_properties.h
15+
@@ -38,7 +38,7 @@ __BEGIN_DECLS
16+
17+
typedef struct prop_info prop_info;
18+
19+
-#define PROP_VALUE_MAX 92
20+
+#define PROP_VALUE_MAX 128
21+
22+
/*
23+
* Sets system property `name` to `value`, creating the system property if it doesn't already exist.
24+
--
25+
2.48.1
26+
Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
From 6372be3a6b508398ec69940564c9cf33942483be Mon Sep 17 00:00:00 2001
2+
From: jingjiezhuang <jingjie.zhuang@igg.com>
3+
Date: Thu, 27 Mar 2025 22:29:40 +0800
4+
Subject: [PATCH] enlarge PROP_VALUE_MAX size
5+
6+
Change-Id: I04f80660b3d23d8092871a02558a497c4d596579
7+
---
8+
tools/post_process_props.py | 2 +-
9+
1 file changed, 1 insertion(+), 1 deletion(-)
10+
11+
diff --git a/tools/post_process_props.py b/tools/post_process_props.py
12+
index 45a46caf3c..84483e77a1 100755
13+
--- a/tools/post_process_props.py
14+
+++ b/tools/post_process_props.py
15+
@@ -22,7 +22,7 @@ import sys
16+
# See PROP_VALUE_MAX in system_properties.h.
17+
# The constant in system_properties.h includes the terminating NUL,
18+
# so we decrease the value by 1 here.
19+
-PROP_VALUE_MAX = 91
20+
+PROP_VALUE_MAX = 127
21+
22+
# Put the modifications that you need to make into the /system/build.prop into this
23+
# function. The prop object has get(name) and put(name,value) methods.
24+
--
25+
2.48.1
26+
Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
From 288c7bd0e895295fac71696e2e90f7a87e484859 Mon Sep 17 00:00:00 2001
2+
From: jingjiezhuang <jingjie.zhuang@igg.com>
3+
Date: Thu, 27 Mar 2025 22:39:11 +0800
4+
Subject: [PATCH] enlarge PROP_VALUE_MAX size
5+
6+
Change-Id: I8b078fe28e627ebdf4411151d401ce9449e9154c
7+
---
8+
cmds/installd/installd_deps.h | 2 +-
9+
1 file changed, 1 insertion(+), 1 deletion(-)
10+
11+
diff --git a/cmds/installd/installd_deps.h b/cmds/installd/installd_deps.h
12+
index 509317803e..3b2bfb6082 100644
13+
--- a/cmds/installd/installd_deps.h
14+
+++ b/cmds/installd/installd_deps.h
15+
@@ -34,7 +34,7 @@ extern int get_property(const char *key,
16+
const char *default_value);
17+
// Size constants. Should be checked to be equal to the cutils requirements.
18+
constexpr size_t kPropertyKeyMax = 32u;
19+
-constexpr size_t kPropertyValueMax = 92u;
20+
+constexpr size_t kPropertyValueMax = 128u;
21+
22+
// Compute the output path for dex2oat.
23+
extern bool calculate_oat_file_path(char path[PKG_PATH_MAX],
24+
--
25+
2.48.1
26+

0 commit comments

Comments
 (0)