Skip to content

Commit f7d23d7

Browse files
Vinayak Katochquic-vkatoch
authored andcommitted
Remove ro.debuggable android definition and enable critical logs
for all build types. Signed-off-by: Vinayak Katoch <[email protected]>
1 parent 738eaf3 commit f7d23d7

File tree

3 files changed

+3
-21
lines changed

3 files changed

+3
-21
lines changed

inc/fastrpc_common.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -126,7 +126,6 @@
126126
FASTRPC_ENABLE_SYSTRACE = 6, //to enable tracing using Systrace
127127
FASTRPC_DEBUG_PDDUMP = 7, // to enable pd dump debug data collection on rooted device for signed/unsigned pd
128128
FASTRPC_PROCESS_ATTRS_PERSISTENT = 8, // to set proc attr as persistent
129-
FASTRPC_BUILD_TYPE = 9 // Fetch build type of firmware image. It gives the details if its debug or prod build
130129
}fastrpc_properties;
131130

132131
/**

src/fastrpc_apps_user.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -228,8 +228,7 @@ const char *ENV_DEBUG_VAR_NAME[] = {"FASTRPC_PROCESS_ATTRS",
228228
"FASTRPC_PERF_FREQ",
229229
"FASTRPC_DEBUG_SYSTRACE",
230230
"FASTRPC_DEBUG_PDDUMP",
231-
"FASTRPC_PROCESS_ATTRS_PERSISTENT",
232-
"ro.debuggable"};
231+
"FASTRPC_PROCESS_ATTRS_PERSISTENT"};
233232

234233
const char *SUBSYSTEM_NAME[] = {"adsp", "mdsp", "sdsp", "cdsp", "cdsp1", "reserved", "reserved", "reserved"};
235234

src/fastrpc_log.c

Lines changed: 2 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,13 @@
11
// Copyright (c) 2024, Qualcomm Innovation Center, Inc. All rights reserved.
22
// SPDX-License-Identifier: BSD-3-Clause
33

4-
#define _GNU_SOURCE
54
#include <pthread.h>
65
#include <stdbool.h>
76
#include <stdio.h>
87
#include <stdlib.h>
98
#include <string.h>
109
#include <sys/time.h>
1110
#include <limits.h>
12-
#include <unistd.h>
1311

1412
#include "AEEStdErr.h"
1513
#include "fastrpc_config.h"
@@ -279,28 +277,14 @@ void HAP_debug(const char *msg, int level, const char *filename, int line) {
279277
}
280278

281279
void fastrpc_log_init() {
282-
bool debug_build_type = false;
283280
int nErr = AEE_SUCCESS, fd = -1;
284281
char build_type[PROPERTY_VALUE_MAX];
285282
char *logfilename;
286283

287284
pthread_mutex_init(&persist_buf.mut, 0);
288285
pthread_mutex_lock(&persist_buf.mut);
289-
/*
290-
* Get build type by reading the target properties,
291-
* if buuid type is eng or userdebug allocate 1 MB persist buf.
292-
*/
293-
if (fastrpc_get_property_string(FASTRPC_BUILD_TYPE, build_type, NULL)) {
294-
#if !defined(LE_ENABLE)
295-
if (!strncmp(build_type, "eng", PROPERTY_VALUE_MAX) ||
296-
!strncmp(build_type, "userdebug", PROPERTY_VALUE_MAX))
297-
debug_build_type = true;
298-
#else
299-
if (atoi(build_type))
300-
debug_build_type = true;
301-
#endif
302-
}
303-
if (persist_buf.buf == NULL && debug_build_type) {
286+
287+
if (persist_buf.buf == NULL) {
304288
/* Create a debug buffer to append DEBUG FARF level message. */
305289
persist_buf.buf = (char *)rpcmem_alloc_internal(
306290
RPCMEM_HEAP_ID_SYSTEM, RPCMEM_DEFAULT_FLAGS | RPCMEM_TRY_MAP_STATIC,

0 commit comments

Comments
 (0)