Skip to content

Commit

Permalink
fixup! 453fc63 Transfering incorrect secontext to kernel
Browse files Browse the repository at this point in the history
Signed-off-by: GarfieldHan <[email protected]>
  • Loading branch information
pomelohan committed Jan 24, 2025
1 parent 4d06bdf commit f35f416
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
3 changes: 3 additions & 0 deletions app/src/main/java/me/bmax/apatch/ui/screen/SuperUser.kt
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@ import coil.request.ImageRequest
import com.ramcosta.composedestinations.annotation.Destination
import com.ramcosta.composedestinations.annotation.RootGraph
import kotlinx.coroutines.launch
import me.bmax.apatch.APApplication
import me.bmax.apatch.Natives
import me.bmax.apatch.R
import me.bmax.apatch.ui.component.ProvideMenuShape
Expand Down Expand Up @@ -200,6 +201,7 @@ private fun AppItem(
excludeApp = 0
config.allow = 1
config.exclude = 0
config.profile.scontext = APApplication.MAGISK_SCONTEXT
} else {
config.allow = 0
}
Expand Down Expand Up @@ -228,6 +230,7 @@ private fun AppItem(
if (it) {
excludeApp = 1
config.allow = 0
config.profile.scontext = APApplication.DEFAULT_SCONTEXT
Natives.revokeSu(app.uid)
} else {
excludeApp = 0
Expand Down
1 change: 0 additions & 1 deletion app/src/main/java/me/bmax/apatch/util/PkgConfig.kt
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,6 @@ object PkgConfig {
// Root App should not be excluded
if (config.allow == 1) {
config.exclude = 0
config.profile.scontext = APApplication.MAGISK_SCONTEXT
}
if (config.allow == 0 && configs[uid] != null && config.exclude != 0) {
configs.remove(uid)
Expand Down

0 comments on commit f35f416

Please sign in to comment.