Skip to content

root化とFrida検知 - #32

Merged
Inlet-back merged 1 commit into
mainfrom
feat/add-detection
Oct 19, 2025
Merged

root化とFrida検知#32
Inlet-back merged 1 commit into
mainfrom
feat/add-detection

Conversation

@Inlet-back

Copy link
Copy Markdown
Collaborator

セキュリティ機構の追加

@Inlet-back
Inlet-back requested a review from Copilot October 19, 2025 05:44

Copilot AI left a comment

Copy link
Copy Markdown

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 adds security checks to detect rooted devices and Frida debugging frameworks to protect the Android application from reverse engineering and tampering attempts.

  • Creates a new SecurityChecks object with methods to detect device rooting and Frida presence
  • Integrates security checks into the app's startup process in MainActivity
  • Implements the security mechanism to terminate the app if threats are detected

Reviewed Changes

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

File Description
SecurityChecks.kt New security utility class implementing root detection and Frida detection methods
MainActivity.kt Integration of security checks during app initialization with termination on threat detection

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.


private fun hasSuBinary(): Boolean {
val paths = arrayOf(
"/system/bin/su","/system/xbin/su","/sbin/su",

Copilot AI Oct 19, 2025

Copy link

Choose a reason for hiding this comment

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

[nitpick] Missing spaces after commas in the array elements make the code harder to read. Add spaces after each comma for better readability.

Copilot uses AI. Check for mistakes.
Comment on lines +40 to +41
"com.topjohnwu.magisk","eu.chainfire.supersu","com.noshufou.android.su",
"com.koushikdutta.superuser","com.zachspong.temprootremovejb","com.ramdroid.appquarantine"

Copilot AI Oct 19, 2025

Copy link

Choose a reason for hiding this comment

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

[nitpick] Missing spaces after commas in the package name list make the code harder to read. Add spaces after each comma for better readability.

Suggested change
"com.topjohnwu.magisk","eu.chainfire.supersu","com.noshufou.android.su",
"com.koushikdutta.superuser","com.zachspong.temprootremovejb","com.ramdroid.appquarantine"
"com.topjohnwu.magisk", "eu.chainfire.supersu", "com.noshufou.android.su",
"com.koushikdutta.superuser", "com.zachspong.temprootremovejb", "com.ramdroid.appquarantine"

Copilot uses AI. Check for mistakes.
override fun onCreate(savedInstanceState: Bundle?) {
super.onCreate(savedInstanceState)
installSplashScreen()
// 起動時チェック

Copilot AI Oct 19, 2025

Copy link

Choose a reason for hiding this comment

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

[nitpick] The comment uses Japanese while the rest of the codebase appears to use English. Consider using English for consistency: // Security check on startup

Suggested change
// 起動時チェック
// Security check on startup

Copilot uses AI. Check for mistakes.
val rooted = SecurityChecks.isRooted(this)
val frida = SecurityChecks.isFridaDetected()
Log.w("Security", "rooted=$rooted frida=$frida")
if (rooted || frida) finish()

Copilot AI Oct 19, 2025

Copy link

Choose a reason for hiding this comment

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

[nitpick] The comment uses Japanese while the rest of the codebase appears to use English. Consider using English for consistency: // Security check on startup

Copilot uses AI. Check for mistakes.
Comment on lines +22 to +24
val rooted = SecurityChecks.isRooted(this)
val frida = SecurityChecks.isFridaDetected()
Log.w("Security", "rooted=$rooted frida=$frida")

Copilot AI Oct 19, 2025

Copy link

Choose a reason for hiding this comment

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

Inconsistent indentation in the security check block. Lines 22-24 use tabs while line 21 and 25 use spaces. Standardize to use consistent indentation throughout.

Suggested change
val rooted = SecurityChecks.isRooted(this)
val frida = SecurityChecks.isFridaDetected()
Log.w("Security", "rooted=$rooted frida=$frida")
val rooted = SecurityChecks.isRooted(this)
val frida = SecurityChecks.isFridaDetected()
Log.w("Security", "rooted=$rooted frida=$frida")

Copilot uses AI. Check for mistakes.
@Inlet-back
Inlet-back merged commit 18e392b into main Oct 19, 2025
2 checks passed
@Inlet-back
Inlet-back deleted the feat/add-detection branch October 19, 2025 05:48
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