Skip to content

feat: Ensure installation of stock APK during root installation#126

Open
Ushie wants to merge 6 commits intodevfrom
feat/ensure-stock-apk-installed
Open

feat: Ensure installation of stock APK during root installation#126
Ushie wants to merge 6 commits intodevfrom
feat/ensure-stock-apk-installed

Conversation

@Ushie
Copy link
Copy Markdown
Member

@Ushie Ushie commented Apr 5, 2026

No description provided.

@Ushie Ushie requested a review from oSumAtrIX April 5, 2026 19:08
@Ushie Ushie changed the title feat: Ensure stock APK is installed in RootInstaller feat: Ensure installation of stock APK during root installation Apr 5, 2026
internal class PackageNameRequiredException internal constructor() : Exception("Package name is required")
internal class NoRootPermissionException internal constructor() : Exception("No root permission")
internal class NoRootPermissionException internal constructor() :
Exception("Root permission is not granted")
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Isnt no root permission simpler

val stockApk: Apk,
) : InstallerOptions(patchedApk)

class Apk(file: File, val packageName: String, val versionName: String) : Installer.Apk(file) No newline at end of file
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Any reason this class is inside the RootInstallerOptions.kt class? Class apk is inside the Installer class, so this class should be inside RootInstaller.kt

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

You are right, but since the options were moved out of the Installer class, maybe class APK should move to InstallerOptions instead since thats where it's usage is

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Would be breaking change, refactoring like this can come in another PR, for now put APK in RootInstaller for consistency

)
}

fun getInstalledVersionName(packageName: String): String =
Copy link
Copy Markdown
Member

@oSumAtrIX oSumAtrIX Apr 14, 2026

Choose a reason for hiding this comment

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

Why were these APIs added here instead of a utils class? Is it because it needs the shell command runner? In the case of a utils class a command runner can be passed to it for this purpose

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