Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Task: Extract Xiaomi.eu PIF
- A1: Variable Set [
- Name: %pkgname
- To: eu.xiaomi.module.inject ]
- A2: Java Function [
- Return: pm
- Class Or Object: CONTEXT
- Function: getPackageManager
- {PackageManager} () ]
- A3: Java Function [
- Return: pi
- Class Or Object: pm
- Function: getPackageInfo
- {PackageInfo} (String, int)
- Param 1 (String): %pkgname
- Param 2 (int): 0
- Continue Task After Error:On ]
- A4: Java Function [
- Return: isInstalledAndEnabled
- Class Or Object: Boolean
- Function: valueOf
- {Boolean} (boolean)
- Param 1 (boolean): pi.applicationInfo.enabled ]
- A5: If [ isInstalledAndEnabled ~ true ]
- A6: Java Function [
- Return: resources
- Class Or Object: pm
- Function: getResourcesForApplication
- {Resources} (String)
- Param 1 (String): %pkgname ]
- A7: Java Function [
- Return: resourceId
- Class Or Object: resources
- Function: getIdentifier
- {int} (String, String, String)
- Param 1 (String): inject_fields
- Param 2 (String): xml
- Param 3 (String): %pkgname ]
- A8: If [ resourceId neq 0 ]
- A9: Flash [
- Text: Extracting FINGERPRINT props now...
- Tasker Layout: On
- Title: XiaomiEUModule app found
- Dismiss On Click: On ]
- A10: Java Function [
- Return: injectFields
- Class Or Object: resources
- Function: getXml
- {XmlResourceParser} (int)
- Param 1 (int): resourceId ]
- A11: Variable Set [
- Name: %pif_json
- To: {
- Structure Output (JSON, etc): On ]
- A12: Java Function [
- Return: eventType
- Class Or Object: injectFields
- Function: next
- {int} () ]
- <While != XmlResourceParser.END_DOCUMENT>
- A13: Stop [ ]
- If [ eventType eq 1 ]
- <If is XmlResourceParser.START_TAG>
- A14: If [ eventType eq 2 ]
- A15: Java Function [
- Return: %tag_name
- Class Or Object: injectFields
- Function: getName
- {String} () ]
- A16: If [ %tag_name ~ field ]
- A17: Java Function [
- Return: %name
- Class Or Object: injectFields
- Function: getAttributeValue
- {String} (String, String)
- Param 1 (String): null
- Param 2 (String): name ]
- A18: Java Function [
- Return: %value
- Class Or Object: injectFields
- Function: getAttributeValue
- {String} (String, String)
- Param 1 (String): null
- Param 2 (String): value ]
- <Rename DEVICE_INITIAL_SDK_INT to FIRST_API_LEVEL>
- A19: Variable Set [
- Name: %name
- To: FIRST_API_LEVEL
- Structure Output (JSON, etc): On ]
- If [ %name ~ DEVICE_INITIAL_SDK_INT ]
- A20: Variable Set [
- Name: %pif_json
- To:
- "%name": "%value",
- Append: On
- Structure Output (JSON, etc): On ]
- A21: End If
- A22: End If
- A23: Java Function [
- Return: eventType
- Class Or Object: injectFields
- Function: next
- {int} () ]
- A24: Goto [
- Type: Action Label
- Label: While != XmlResourceParser.END_DOCUMENT ]
- If [ eventType neq 1 ]
- A25: Java Function [
- Class Or Object: injectFields
- Function: close
- {} () ]
- <Add FIRST_API_LEVEL=23 if missing from XiaomiEUModule>
- A26: Variable Set [
- Name: %pif_json
- To:
- "FIRST_API_LEVEL": "23",
- Append: On
- Structure Output (JSON, etc): On ]
- If [ %pif_json !~R .*"FIRST_API_LEVEL".* ]
- A27: Variable Search Replace [
- Variable: %pif_json
- Search: ,$
- One Match Only: On
- Replace Matches: On ]
- A28: Variable Set [
- Name: %pif_json
- To:
- }
- Append: On
- Structure Output (JSON, etc): On ]
- A29: Java Function [
- Return: extPifDir
- Class Or Object: CONTEXT
- Function: getExternalFilesDir
- {File} (String) ]
- A30: Java Function [
- Return: %pif_dir
- Class Or Object: extPifDir
- Function: getCanonicalPath
- {String} () ]
- A31: Write File [
- File: %pif_dir/XiaomiEU.pif.json
- Text: %pif_json
- Add Newline: On ]
- A32: Flash [
- Text: XiaomiEU.pif.json is saved to %pif_dir directory
- Long: On
- Tasker Layout: On
- Title: Extraction successful
- Continue Task Immediately: On
- Dismiss On Click: On
- Use HTML: On ]
- A33: Text/Image Dialog [
- Title: Update Custom PIF
- Text: Do you want to update your custom PIF with XiaomiEU.pif.json?
- Button 1: Cancel
- Button 2: Update
- Close After (Seconds): 30 ]
- A34: If [ %td_button ~ Update ]
- A35: Perform Task [
- Name: Update Custom PIF
- Priority: %priority
- Structure Output (JSON, etc): On ]
- A36: Else
- A37: Flash [
- Text: Custom PIF not updated
- Tasker Layout: On
- Dismiss On Click: On
- Use HTML: On ]
- A38: Stop [ ]
- A39: End If
- A40: End If
- A41: Else
- A42: Flash [
- Text: XiaomiEUModule app not installed
- Tasker Layout: On
- Dismiss On Click: On
- Use HTML: On ]
- A43: End If
- A44: Disable
- ==========================================================
- Task: Update Custom PIF
- A1: Run Shell [
- Command: cat /data/adb/modules/playintegrityfix/module.prop | sed -n 's/name=\(.*\)/\1/ip'
- Timeout (Seconds): 0
- Use Root: On
- Store Output In: %stdout
- Store Errors In: %stderr
- Use Global Namespace: On
- Continue Task After Error:On ]
- A2: If [ %stdout Set ]
- A3: Flash [
- Text: Updating custom PIF...
- Tasker Layout: On
- Title: %stdout found
- Dismiss On Click: On ]
- A4: Java Function [
- Return: extPifDir
- Class Or Object: CONTEXT
- Function: getExternalFilesDir
- {File} (String) ]
- A5: Java Function [
- Return: %pif_dir
- Class Or Object: extPifDir
- Function: getCanonicalPath
- {String} () ]
- A6: Test File [
- Type: Exists
- Data: %pif_dir/XiaomiEU.pif.json
- Store Result In: %pif_exists
- Use Global Namespace: On ]
- A7: If [ %pif_exists ~ true ]
- A8: Flash [
- Text: Copying custom PIF into module directory...
- Tasker Layout: On
- Title: XiaomiEU.pif.json found
- Dismiss On Click: On ]
- A9: If [ %stdout ~R (?i).*fix.* ]
- A10: Run Shell [
- Command: cp %pif_dir/XiaomiEU.pif.json /data/adb/pif.json
- Timeout (Seconds): 0
- Use Root: On
- Use Global Namespace: On ]
- A11: Else
- If [ %stdout ~R (?i).*fork.* ]
- A12: Run Shell [
- Command: cp %pif_dir/XiaomiEU.pif.json /data/adb/modules/playintegrityfix/custom.pif.json
- Timeout (Seconds): 0
- Use Root: On
- Use Global Namespace: On ]
- A13: Run Shell [
- Command: test -f /data/adb/modules/playintegrityfix/migrate.sh && echo "true" || echo "false"
- Timeout (Seconds): 0
- Use Root: On
- Store Output In: %migrate_exists
- Use Global Namespace: On
- Continue Task After Error:On ]
- A14: If [ %migrate_exists ~ true ]
- A15: Run Shell [
- Command: sh /data/adb/modules/playintegrityfix/migrate.sh /data/adb/modules/playintegrityfix/custom.pif.json
- Timeout (Seconds): 0
- Use Root: On
- Use Global Namespace: On
- Continue Task After Error:On ]
- A16: End If
- A17: End If
- A18: Flash [
- Text: Stopping GMS unstable process...
- Tasker Layout: On
- Title: Custom PIF updated
- Dismiss On Click: On ]
- A19: Run Shell [
- Command: killall com.google.android.gms.unstable
- Timeout (Seconds): 0
- Use Root: On
- Store Errors In: %stderr
- Use Global Namespace: On
- Continue Task After Error:On ]
- A20: If [ %stderr Set ]
- A21: Flash [
- Text: GMS unstable process is not running
- Tasker Layout: On
- Dismiss On Click: On ]
- A22: Else
- A23: Flash [
- Text: GMS unstable process is stopped
- Tasker Layout: On
- Dismiss On Click: On ]
- A24: End If
- A25: Flash [
- Text: You can test for Play Integrity now
- Tasker Layout: On
- Title: Success
- Continue Task Immediately: On
- Dismiss On Click: On ]
- A26: Else
- A27: Flash [
- Text: XiaomiEU.pif.json not found
- Tasker Layout: On
- Continue Task Immediately: On
- Dismiss On Click: On ]
- A28: End If
- A29: Else
- A30: Flash [
- Text: PIF module for Magisk or KSU not found
- Tasker Layout: On
- Continue Task Immediately: On
- Dismiss On Click: On ]
- A31: End If
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement