Skip to content

RDKEMW-15146 : Introduce mechanism to unlock debug service - read /opt/swupdate.conf - #205

Merged
satya200 merged 60 commits into
developfrom
topic/RDKEMW-13335
Mar 30, 2026
Merged

RDKEMW-15146 : Introduce mechanism to unlock debug service - read /opt/swupdate.conf#205
satya200 merged 60 commits into
developfrom
topic/RDKEMW-13335

Conversation

@KTirumalaSrihari

Copy link
Copy Markdown
Contributor

Reason for change: to enable debug services, only if the build variant is labSigned and device is test type or if the build type is dev
Test Procedure: Flash the image and check for enabling secure debug services (Firmware download override)
Risks: Low

Introduce isSecureDbgSrvUnlocked API and replace the condition checks of buildType and deviceType with this API
@KTirumalaSrihari
KTirumalaSrihari requested a review from a team as a code owner March 9, 2026 07:12
Copilot AI review requested due to automatic review settings March 9, 2026 07:12

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR introduces additional gating logic for “secure debug services” so that firmware download override behavior (e.g., state red and swupdate.conf override URL selection) is only allowed when debug access is considered unlocked.

Changes:

  • Add a new RFC key (RFC_DEVICETYPE) and helper (getDeviceTypeRFC()) to retrieve device type (“test”/“prod”/“unknown”).
  • Introduce isSecureDbgSrvUnlocked() to decide whether secure debug services are unlocked based on build type, debug-service RFC, device-type RFC, and a LABSIGNED flag from device properties.
  • Update GetServURL() to use isSecureDbgSrvUnlocked() instead of the prior (build != PROD) || dbgServices check for enabling override behavior.

Reviewed changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated 5 comments.

File Description
src/rfcInterface/rfcinterface.c Adds getDeviceTypeRFC() helper to read device type from RFC.
src/include/rfcinterface.h Adds RFC_DEVICETYPE definition and getDeviceTypeRFC() declaration.
src/deviceutils/device_api.h Declares new isSecureDbgSrvUnlocked() API and documents its intent.
src/deviceutils/device_api.c Implements isSecureDbgSrvUnlocked() and uses it to gate override behavior in GetServURL().

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread src/deviceutils/device_api.c Outdated
Comment thread src/deviceutils/device_api.c Outdated
Comment thread src/deviceutils/device_api.h Outdated
Comment thread src/rfcInterface/rfcinterface.c Outdated
Comment thread src/deviceutils/device_api.c Outdated
@KTirumalaSrihari
KTirumalaSrihari marked this pull request as draft March 9, 2026 10:40
KTirumalaSrihari and others added 3 commits March 9, 2026 20:59
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Comment thread src/rfcInterface/rfcinterface.c Fixed
Comment thread src/rfcInterface/rfcinterface.c Fixed
Copilot AI review requested due to automatic review settings March 18, 2026 04:45

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 9 out of 9 changed files in this pull request and generated 1 comment.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread unittest/deviceutils/device_api_gtest.cpp Outdated
Copilot AI review requested due to automatic review settings March 18, 2026 04:52

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 9 out of 9 changed files in this pull request and generated 1 comment.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread unittest/deviceutils/device_api_gtest.cpp Outdated
Copilot AI review requested due to automatic review settings March 18, 2026 05:15

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 9 out of 9 changed files in this pull request and generated 2 comments.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread unittest/deviceutils/device_api_gtest.cpp Outdated
Comment thread src/deviceutils/device_api.c Outdated
Copilot AI review requested due to automatic review settings March 18, 2026 05:49

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 9 out of 9 changed files in this pull request and generated 3 comments.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread unittest/mocks/dbus_handlers_gmock.cpp
Comment thread unittest/mocks/deviceutils_mock.cpp
Comment thread src/deviceutils/device_api.c Outdated
Copilot AI review requested due to automatic review settings March 18, 2026 10:33

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 9 out of 9 changed files in this pull request and generated 2 comments.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread src/deviceutils/device_api.c
Comment thread src/deviceutils/device_api.c
Copilot AI review requested due to automatic review settings March 27, 2026 14:32

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 9 out of 9 changed files in this pull request and generated 2 comments.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread src/deviceutils/device_api.c
Comment thread unittest/fwdl_interface_gtest.cpp

@satya200 satya200 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good

@satya200
satya200 merged commit 8a09ec9 into develop Mar 30, 2026
17 checks passed
@github-actions github-actions Bot locked and limited conversation to collaborators Mar 30, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants