Skip to content
This repository was archived by the owner on Feb 12, 2026. It is now read-only.

Fix some edge cases in dex2oat.c#19

Open
fatalcoder524 wants to merge 1 commit intoThePedroo:masterfrom
fatalcoder524:fix-some-dex2oat-edgecases
Open

Fix some edge cases in dex2oat.c#19
fatalcoder524 wants to merge 1 commit intoThePedroo:masterfrom
fatalcoder524:fix-some-dex2oat-edgecases

Conversation

@fatalcoder524
Copy link
Collaborator

  • Treat the newly installed app similarly to an app in the denylist.
  • Do not continue if liboat_hook is not found.
  • Add retry support for the write_string operation.

- Treat the newly installed app similarly to an app in the denylist.
- Do not continue if liboat_hook is not found.
- Add retry support for the write_string operation.
@ThePedroo
Copy link
Owner

I don't see to:
"Treat the newly installed app similarly to an app in the denylist."

If the user's system works on a blacklist logic, it is only reasonable it would also follow that

@fatalcoder524
Copy link
Collaborator Author

I don't see to: "Treat the newly installed app similarly to an app in the denylist."

If the user's system works on a blacklist logic, it is only reasonable it would also follow that

Nope. If KSU is set to manual umount and not global default umount, it doesn't work. So this will prevent that for first dex2oat and gives time for user the configure umount list. Also no need of reoptimize after setting umount.

People forget they have reoptimize and also many don't know what it even does. This should provide temporary protection for a small period of time!

Comment on lines +121 to +124
if (ret <= 0) {
PLOGE("write_string data failed");
return; // or abort, since protocol is broken
}
Copy link
Owner

Choose a reason for hiding this comment

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

Properly space

Copy link
Owner

Choose a reason for hiding this comment

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

(and remove that comment)

if (strncmp(argv[i], prefix, prefix_len) != 0) continue;
if (strncmp(argv[i], compilation_reason_prefix, compilation_reason_prefix_len) == 0) {
const char* reason = argv[i] + compilation_reason_prefix_len;
if (strcmp(reason, "install") == 0) {
Copy link
Owner

Choose a reason for hiding this comment

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

use early-continue, avoid entering scopes

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.

2 participants