CARVIEW |
Select Language
HTTP/2 200
date: Sun, 12 Oct 2025 00:46:15 GMT
content-type: text/html; charset=UTF-8
server: cloudflare
x-frame-options: DENY
x-content-type-options: nosniff
x-xss-protection: 1;mode=block
vary: accept-encoding
cf-cache-status: DYNAMIC
content-encoding: gzip
set-cookie: _csrf-frontend=fe04d2f8ac7cc168f2f4f661cc97d88af553de012a25b5771d9ce209b45992f3a%3A2%3A%7Bi%3A0%3Bs%3A14%3A%22_csrf-frontend%22%3Bi%3A1%3Bs%3A32%3A%22ZmdWI5UVxDbDfKce_HhzpkmNtFPZLkCo%22%3B%7D; HttpOnly; Path=/
cf-ray: 98d2943e2e8cb277-BLR
MakeDeviceAdminPatch.kt - Pastebin.com
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- package app.revanced.patches.all.deviceadmin
- import app.revanced.patcher.patch.*
- import app.revanced.patcher.patch.resourcePatch
- import app.revanced.patcher.patch.smaliPatch
- import app.revanced.util.Utils
- import org.w3c.dom.Element
- import java.io.File
- val deviceAdminPatch = Patch(
- name = "Device Admin Patch",
- description = "make any app into a Device Admin",
- use = true
- ) {
- // mofify andManifest
- resourcePatch {
- execute {
- document("AndroidManifest.xml").use { document ->
- val applicationNode = document.getElementsByTagName("application").item(0) as Element
- val receiverNode = document.createElement("receiver").apply {
- setAttribute("android:name", ".MyDeviceAdminReceiver")
- setAttribute("android:label", "@string/app_name")
- setAttribute("android:permission", "android.permission.BIND_DEVICE_ADMIN")
- }
- applicationNode.appendChild(receiverNode)
- val metaNode = document.createElement("meta-data").apply {
- setAttribute("android:name", "android.app.device_admin")
- setAttribute("android:resource", "@xml/device_admin")
- }
- receiverNode.appendChild(metaNode)
- val intentFilter = document.createElement("intent-filter").apply {
- val actionNode = document.createElement("action").apply {
- setAttribute("android:name", "android.app.action.DEVICE_ADMIN_ENABLED")
- }
- appendChild(actionNode)
- }
- receiverNode.appendChild(intentFilter)
- }
- }
- }
- // aadd device_admin.xml
- resourcePatch {
- execute {
- val resXmlDirectory = get("res/xml")
- File(resXmlDirectory, "device_admin.xml").apply {
- writeText(
- """
- <?xml version="1.0" encoding="utf-8"?>
- <device-admin xmlns:android="http://schemas.android.com/apk/res/android">
- <uses-policies>
- <limit-password />
- <watch-login />
- </uses-policies>
- </device-admin>
- """.trimIndent()
- )
- }
- }
- }
- // add DeviceAdminReceiver smali class
- smaliPatch {
- execute {
- val packageName = Utils.getPackageName("AndroidManifest.xml")
- val smaliDirectory = get("smali/${packageName.replace('.', '/')}/MyDeviceAdminReceiver.smali")
- File(smaliDirectory).apply {
- writeText(
- """
- .class public L${packageName.replace('.', '/')}/MyDeviceAdminReceiver;
- .super Landroid/app/admin/DeviceAdminReceiver;
- .method public constructor <init>()V
- .locals 0
- invoke-direct {p0}, Landroid/app/admin/DeviceAdminReceiver;-><init>()V
- return-void
- .end method
- """.trimIndent()
- )
- }
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
-
π Instant BTC Profit Method β
Working
JavaScript | 4 sec ago | 0.24 KB
-
ββ
Swapzone Glitch β
Working ββ L
JavaScript | 6 sec ago | 0.25 KB
-
π MAKE $2500 IN 15 MIN β
Working
JavaScript | 13 sec ago | 0.24 KB
-
β
Make $2500 in 20 minutesβββ 7
JavaScript | 15 sec ago | 0.25 KB
-
π΅ Make 3000$ in 20 minutes π΅
JavaScript | 22 sec ago | 0.24 KB
-
π Swapzone +37% glitch β 6
JavaScript | 24 sec ago | 0.25 KB
-
π Swapzone +37% glitch
JavaScript | 31 sec ago | 0.24 KB
-
ββ
Marketplace Glitch β
Working β
NEVER SEEN...
JavaScript | 38 sec ago | 0.25 KB
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand