-
-
Notifications
You must be signed in to change notification settings - Fork 361
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #503 from KOWX712/new_webui
Add action-on-webui support to old root manager.
- Loading branch information
Showing
5 changed files
with
89 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
<!DOCTYPE html> | ||
<html> | ||
<head> | ||
<meta charset="utf-8"> | ||
<meta name="viewport" content="width=device-width, initial-scale=1.0"> | ||
<title>Play Integrity Fix</title> | ||
<link rel="stylesheet" href="styles.css" type="text/css"> | ||
<link rel="stylesheet" type="text/css" href="/mmrl/insets.css" /> | ||
<script type="module" crossorigin src="scripts.js"></script> | ||
</head> | ||
<body> | ||
<div class="output">[+] Fetching pif.json, please wait...</div> | ||
</body> | ||
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
// Execute shell commands with ksu.exec | ||
async function execCommand(command) { | ||
const callbackName = `exec_callback_${Date.now()}`; | ||
return new Promise((resolve, reject) => { | ||
window[callbackName] = (errno, stdout, stderr) => { | ||
delete window[callbackName]; | ||
errno === 0 ? resolve(stdout) : reject(stderr); | ||
}; | ||
ksu.exec(command, "{}", callbackName); | ||
}); | ||
} | ||
|
||
// Function to run the script and display its output | ||
async function runAction() { | ||
const output = document.querySelector('.output'); | ||
try { | ||
const scriptOutput = await execCommand("sh /data/adb/modules/playintegrityfix/action.sh"); | ||
output.innerHTML = ''; | ||
const lines = scriptOutput.split('\n'); | ||
lines.forEach(line => { | ||
const lineElement = document.createElement('div'); | ||
lineElement.style.whiteSpace = 'pre-wrap'; | ||
lineElement.textContent = line; | ||
if (line === '') { | ||
lineElement.innerHTML = ' '; | ||
} | ||
output.appendChild(lineElement); | ||
}); | ||
} catch (error) { | ||
output.innerHTML = '[!] Error: Fail to execute action.sh'; | ||
console.error('Script execution failed:', error); | ||
} | ||
} | ||
|
||
document.addEventListener('DOMContentLoaded', async () => { | ||
setTimeout(runAction, 200); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
@font-face { | ||
font-family: 'Mono'; | ||
src: url('assets/RobotoMono-Regular.ttf') format('truetype'); | ||
font-weight: normal; | ||
font-style: normal; | ||
} | ||
|
||
body { | ||
font-family: 'Mono'; | ||
padding-top: var(--window-inset-top); | ||
padding-bottom: var(--window-inset-bottom); | ||
} | ||
|
||
.output { | ||
font-size: 14px; | ||
left: 10px; | ||
width: calc(100vw - 20px); | ||
white-space: nowrap; | ||
word-break: break-all; | ||
} | ||
|
||
@media (prefers-color-scheme: dark) { | ||
body { | ||
background-color: #121212; | ||
color: #fff; | ||
} | ||
} |