Remove spoofVendingSdk from webui

18e65b5917
This commit is contained in:
KOWX712 2025-03-29 05:41:10 +08:00
parent 18e65b5917
commit 865e3222e6
2 changed files with 0 additions and 49 deletions

View File

@ -27,13 +27,6 @@
<span class="slider round"></span>
</label>
</div>
<div class="toggle-list ripple-element" id="sdk-vending-toggle-container">
<span class="toggle-text">Spoof sdk version to Play Store</span>
<label class="toggle-switch">
<input type="checkbox" id="toggle-sdk-vending" disabled>
<span class="slider round"></span>
</label>
</div>
</div>
<div class="output-terminal">
<div class="output-terminal-header">

View File

@ -19,35 +19,10 @@ async function execCommand(command) {
// Apply button event listeners
function applyButtonEventListeners() {
const fetchButton = document.getElementById('fetch');
const sdkVendingToggle = document.getElementById('sdk-vending-toggle-container');
const previewFpToggle = document.getElementById('preview-fp-toggle-container');
const clearButton = document.querySelector('.clear-terminal');
fetchButton.addEventListener('click', runAction);
sdkVendingToggle.addEventListener('click', async () => {
try {
const pifPath = await execCommand(`
[ ! -f /data/adb/modules/playintegrityfix/pif.json ] || echo /data/adb/modules/playintegrityfix/pif.json
[ ! -f /data/adb/pif.json ] || echo /data/adb/pif.json
`);
if (pifPath.trim() === "") {
appendToOutput("[!] No pif.json found");
return;
}
const isChecked = document.getElementById('toggle-sdk-vending').checked;
const paths = pifPath.trim().split('\n');
for (const path of paths) {
if (path) {
await execCommand(`sed -i 's/"spoofVendingSdk": [01]/"spoofVendingSdk": ${isChecked ? 0 : 1}/' ${path}`);
}
}
appendToOutput(`[+] Successfully changed spoofVendingSdk to ${isChecked ? 0 : 1}`);
document.getElementById('toggle-sdk-vending').checked = !isChecked;
} catch (error) {
appendToOutput("[!] Failed to change spoofVendingSdk");
console.error('Failed to toggle sdk vending:', error);
}
});
previewFpToggle.addEventListener('click', async () => {
try {
const isChecked = document.getElementById('toggle-preview-fp').checked;
@ -109,22 +84,6 @@ async function loadVersionFromModuleProp() {
}
}
// Function to load spoofVendingSdk config
async function loadSpoofVendingSdkConfig() {
try {
const sdkVendingToggle = document.getElementById('toggle-sdk-vending');
const isChecked = await execCommand(`grep -o '"spoofVendingSdk": [01]' /data/adb/modules/playintegrityfix/pif.json | cut -d' ' -f2`);
if (isChecked === '0') {
sdkVendingToggle.checked = false;
} else {
sdkVendingToggle.checked = true;
}
} catch (error) {
appendToOutput("[!] Failed to load spoofVendingSdk config");
console.error("Failed to load spoofVendingSdk config:", error);
}
}
// Function to load preview fingerprint config
async function loadPreviewFingerprintConfig() {
try {
@ -294,7 +253,6 @@ function updateFontSize(newSize) {
document.addEventListener('DOMContentLoaded', async () => {
checkMMRL();
loadVersionFromModuleProp();
loadSpoofVendingSdkConfig();
loadPreviewFingerprintConfig();
applyButtonEventListeners();
applyRippleEffect();