Skip to content

append to init.rc instead of atrace.rc#232

Merged
Admirepowered merged 1 commit into
bmax121:mainfrom
Admirepowered:test
Dec 26, 2025
Merged

append to init.rc instead of atrace.rc#232
Admirepowered merged 1 commit into
bmax121:mainfrom
Admirepowered:test

Conversation

@Admirepowered

Copy link
Copy Markdown
Collaborator

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 changes the initialization file being intercepted and modified from atrace.rc to init.rc, updating the path from /system/etc/init/atrace.rc to /system/etc/init/hw/init.rc. The version is also bumped from 0.12.5 to 0.12.6.

  • Changes the target RC file for kernel initialization hooks from atrace.rc to init.rc
  • Bumps the version to 0.12.6

Reviewed changes

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

File Description
version Updates PATCH version from 5 to 6
kernel/patch/android/userd.c Changes ORIGIN_RC_FILE path from /system/etc/init/atrace.rc to /system/etc/init/hw/init.rc

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

#include <uapi/linux/stat.h>

#define ORIGIN_RC_FILE "/system/etc/init/atrace.rc"
#define ORIGIN_RC_FILE "/system/etc/init/hw/init.rc"

Copilot AI Dec 26, 2025

Copy link

Choose a reason for hiding this comment

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

The new path "/system/etc/init/hw/init.rc" is 33 bytes including the null terminator, but the buffer used to compare against it at line 270 is only 32 bytes. This will cause the path comparison to fail because strncpy_from_user will not be able to read the full path. The buffer size needs to be increased to at least 40 bytes to accommodate this path safely.

Copilot uses AI. Check for mistakes.
@Admirepowered Admirepowered merged commit 6274a45 into bmax121:main Dec 26, 2025
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants