yashsingh1/xdaforums huggingface dataset:
[Android Software/Hacking General [Developers Only]] GabbyWC:
Thanks for the quick reply. Upon closer inspection, I see that the updater-script file has a different file size and hash when comparing the same releases.
[Android Software/Hacking General [Developers Only]] osm0sis:
Ah, I guess it replaces those on-the-fly as well! And I guess I missed one last CR+LF file from chiteroman. :rolleyes::p

Edit: There! This place is cleansed. 😆

Clean up last remaining CR+LF · osm0sis/PlayIntegrityFork@a3cbed9

Fix Play Integrity (and SafetyNet) verdicts, allowing custom fields and props - Clean up last remaining CR+LF · osm0sis/PlayIntegrityFork@a3cbed9

github.com
[Android Software/Hacking General [Developers Only]] trevtdogg:
merry christmas to you too, and thanks for your work and help on this project :)

a bit of a noob question - i have a custom FP working well on your V3 fork. is there any reason it could stop working or have any issue if i upgrade to your V5 fork?

my initial thought is to not fix what isn't broken, and just wait to upgrade when i need to find a new FP. but if i'm being ridiculously paranoid about it, and there's no real logical way the upgrade could cause my setup to stop working, please tell me and i'll just upgrade with fingers crossed lol.
[Android Software/Hacking General [Developers Only]] osm0sis:
The migration script should handle it. Do it.🤘😁
[Android Software/Hacking General [Developers Only]] Fishawy:
V3 to V4 to V5 using the same print. All is well.

Plus, more goodies have been cooked in, so there's an additional reason to go for it.
[Android Software/Hacking General [Developers Only]] trevtdogg:
done!

and after reboot dev options in google play says i still have device integrity :)

thanks so much again for all your help with this module!
[Android Software/Hacking General [Developers Only]] frank93:
first of all - thanks! <3

second, what’s the noob-way to migrate/update a "collection of backup-fingerprints" on a windows-pc? (or maybe can we run the migrate-script manually even later, not only during the first module upgrade? like when a fingerprint gets "banned" and we want to switch to the next one that’s still in the old format?)

third - thanks again! :)
[Android Software/Hacking General [Developers Only]] osm0sis:
As the changelog says, it can indeed be run manually!

Just go to the module directory in a file explorer app that supports script execution and tap it to run it, or you can run it from a command prompt with `sh migrate.sh` and optionally supply the path to the custom.pif.json if it's not in the same directory. 👍
[Android Software/Hacking General [Developers Only]] frank93:
i don’t think this works on a windows-pc (there’s no "sh" here, etc) -- but i guess i’ll try on the phone itself using termux or something then .. :)
[Android Software/Hacking General [Developers Only]] osm0sis:
Well no, it's a Linux shell script... WSL/WSL2 is a thing on modern Windows however, and there's always VirtualBox Ubuntu Server or Cygwin/MSYS2.

And yeah, running on the phone is easiest. 😉
[Android Software/Hacking General [Developers Only]] frank93:
ahh - yes, can confirm, works for me. thanks!

(and i’ll check out wsl now ..)
[Android Software/Hacking General [Developers Only]] rogers11:
Good morning,

when I run the script on Debian it writes the "-e" from "echo -e" (line 84 of your script). Just to mention.

Google says: "echo -e is not defined by POSIX and probably varies by shell."
[Android Software/Hacking General [Developers Only]] swour:
The scripts run without issue on Raspbian for what it's worth. Only minor change needed is to replace the first line with #!/bin/bash.
[Android Software/Hacking General [Developers Only]] HippoMan:
The "echo" command is built in to most shells, and whether or not it accepts the "-e" argument is shell-specific.
[Android Software/Hacking General [Developers Only]] rogers11:
Didn't I write that?
[Android Software/Hacking General [Developers Only]] HippoMan:
I'm sorry. Was still half asleep when I read your message.
[Android Software/Hacking General [Developers Only]] osm0sis:
Fun! Busybox ash needed it I guess since it wouldn't parse the \n during an install/update through Magisk. I guess the only truly portable thing I could switch to would be straddling lines like

echo "
"

So I'll think about that for next release. 😛

Edit: Done! https://github.com/osm0sis/PlayInte...566797f1a874b9802426b45b512e827c22f882R92-R93
[Android Software/Hacking General [Developers Only]] DiamondJohn:
would printf "\n"; be another option closer to echo "\n"; ? or are you explicitly trying to keep it simple/consistent with echo commands?

or maybe a echo && echo;
[Android Software/Hacking General [Developers Only]] osm0sis:
One fun trick is

N="
"

Then just use $N any time you would normally use \n.

The issue was the custom.pif.json output's \n not being parsed at all during an update/install migration, unless -e was used. So not sure if an issue with Magisk ash, calling sh from within ash to run migrate, or doing sh or ash echo from within the ( ) captured output, or some combination of those factors, but either way it works well with the actual newline.
[Android Software/Hacking General [Developers Only]] HippoMan:
The 'printf' command is indeed supplied by the ash shell, so it would definitely be a usable choice here. But the ...

N="

"

... option discussed above would of course also still work.
[Android Software/Hacking General [Developers Only]] osm0sis:
Yep, felt cleaner in the end, so I just switched it over a few minutes ago actually!

migrate.sh: remove all use of echo \n to be even more portable · osm0sis/PlayIntegrityFork@3088f4b

Fix Play Integrity (and SafetyNet) verdicts, allowing custom fields and props - migrate.sh: remove all use of echo \n to be even more portable · osm0sis/PlayIntegrityFork@3088f4b

github.com
[Android Software/Hacking General [Developers Only]] DiamondJohn:
how does the old saying go? "give 100 programmers the exact same problem and get 100 solutions"?(y)
[Android Software/Hacking General [Developers Only]] GabbyWC:
Uh, what? You quoted a post from 2013. 😂

Is this spam from a bot? The quoted reply sounds like it has nothing to do with this XDA thread.
[Android Software/Hacking General [Developers Only]] HippoMan:
I thought it was "... 200 solutions." :ROFLMAO:
[Android Software/Hacking General [Developers Only]] osm0sis:
Sounds like ChatGPT to me... 🤨
[Android Software/Hacking General [Developers Only]] Homeboy76:
Thanks for Play Integrity Fork v5

Everything wirks as expected except the logs.:(

I added to custom.pif.json:

// Advanced Settings

"VERBOSE_LOGS": "100"

}

I didn't see log information nor can i find the stored log location.

What am I missing?
[Android Software/Hacking General [Developers Only]] osm0sis:
It's in the logcat, per the README.
[Android Software/Hacking General [Developers Only]] Homeboy76:
Speed reading doesn't work for me. :ROFLMAO:
[Android Software/Hacking General [Developers Only]] DiamondJohn:
I am not using and therefore not following this script, but are you writing to the logcat via a script?
[Android Software/Hacking General [Developers Only]] osm0sis:
Nope, Zygisk module.
[Android Software/Hacking General [Developers Only]] Jonog:
Exuse my ignorance is there a ready made zip i can download. Compiling etc is above my head. Thanks
[Android Software/Hacking General [Developers Only]] Wolfcity:
Module: https://github.com/osm0sis/PlayIntegrityFork/releases/tag/v5

Script:https://xdaforums.com/t/tools-zips-...tiple-devices-platforms.2239421/post-89173470
[Android Software/Hacking General [Developers Only]] Jonog:
Thanks. I don't know how I ended up here. I was actually looking for busybox current version as a zip. My PIF is working fine :)
[Android Software/Hacking General [Developers Only]] BillGoss:
Have a look in the OP. There's a zip there.
[Android Software/Hacking General [Developers Only]] osm0sis:
Updated my custom pif script!

- replace all use of echo \n to be even more portable

- fix regression from added ro.build.product fallback that broke generic value detection

Example output using my Pixel 8 Pro .prop files and "advanced" argument:

system build.prop to custom.pif.json/.prop creator
by osm0sis @ xda-developers

- Using format: json (Advanced)

- Parsing build.prop(s) ...
google/husky/husky:14/UQ1A.231205.015/11084887:user/release-keys

- Parsing build UTC date ...
Fri Nov 10 23:10:00 UTC 2023

- Build date newer than March 2018, adding SECURITY_PATCH ...
2023-12-05

- Parsing build first API level ...
34

- First API level 33 or higher, resetting to 32 ...

- Writing new custom.pif.json ...
{
// Build Fields
"MANUFACTURER": "Google",
"MODEL": "Pixel 8 Pro",
"FINGERPRINT": "google/husky/husky:14/UQ1A.231205.015/11084887:user/release-keys",
"BRAND": "google",
"PRODUCT": "husky",
"DEVICE": "husky",
"RELEASE": "14",
"ID": "UQ1A.231205.015",
"INCREMENTAL": "11084887",
"TYPE": "user",
"TAGS": "release-keys",
"SECURITY_PATCH": "2023-12-05",
"DEVICE_INITIAL_SDK_INT": "32",

// System Properties
"*.build.id": "UQ1A.231205.015",
"*.security_patch": "2023-12-05",
"*api_level": "32",

// Advanced Settings
"VERBOSE_LOGS": "0"
}
[Android Software/Hacking General [Developers Only]] osm0sis:
Updated the OPs a little to add gen_pif_custom.sh, autopif.sh, and the PIF How-To Guide, and reorganized the Scripts and Knowledge Base posts to group things better. :)
[Android Software/Hacking General [Developers Only]] uschipower:
I am extracting all prop-files manually from rom-files / android-dumps.

Is it possible to use the script with extracted prop-files instead of prop-files of the running Android, in which the script is executed?

It is difficult for me to understand which value i should take from which prop-file.

I have stock-rom-files from all of my devices. the prop-files are on different places, and the content also differ.

In some roms, I find a build.prop in /system and /vendor, and they have different attributes and values.

F.ex., in one file API-Level ist 28, in the other build.prop API-Level is 27. Or in the second file not "First api level" is used like in file 1, but there is api-level-sdk.
[Android Software/Hacking General [Developers Only]] badabing2003:
There is a priority order of files and priority order of props, the script does it for you, are you trying to build the json manually?

If so you need to understand what the script is doing..

Otherwise let the script do its thing.
[Android Software/Hacking General [Developers Only]] uschipower:
You are absolutely right.

I know that the script is doing it in right order.

But I suppose that the script is inteded that you have a real device with installed stock rom, boot this stockrom system, and the script does its job from running system as source.

My question is if it is possible to "feed" the script with prop-files which I have extracted from somewhere, so that I do not have to build the json manually.
[Android Software/Hacking General [Developers Only]] badabing2003:
of course

From OP:

# To be run with the /system/build.prop (build.prop) and
# /vendor/build.prop (vendor-build.prop) from the stock
# ROM of a device you want to spoof values from

# Command line options:
# "prop" forces prop format instead of default json
# "all" forces sometimes optional fields like SECURITY_PATCH to always be included
# "deprecated" forces the use of extra/incorrect chiteroman PIF fields and names
# "advanced" adds the verbose logging module setting entry
[Android Software/Hacking General [Developers Only]] uschipower:
ok, I think this was the missing link in my mind.

Normally you download a rom which consists of different image-Files (*.img). Do I think in the right way that the script cannot handle Images-files, and that the script needs extracted roms.

Can you recommend a tool for extracting all kind of img-Files?

Last week, i searched several days until I found a solution how to extract signed images-Files. In another case, manufactore splitted the rom files in many parts.

both is nothing which you can handle with tools which are normally intended for extracting Archiv-Files
[Android Software/Hacking General [Developers Only]] shoey63:
You can use Zarchiver to extract image files.
[Android Software/Hacking General [Developers Only]] UberNorse:
Not that anyone expected a change until the QPR2 Stable build or a V6 but can confirm device fail with this fork on AP11.231215.007 Beta 3.

I understand why with the Shadowhook/Dobby methods I believe they are called. But I wanted to test anyway seeing as how I prefer @osm0sis' fork anyway. Just was hoping Google made a change on their end but they did not.

Reverted to 14.0 PIF by Chiteroman until we get what I expect to be a rather all inclusive (not sure that could work) v6. Thanks again for everything!
[Android Software/Hacking General [Developers Only]] osm0sis:
Thanks for confirming it's still an issue. Looking into that is next on my list! 🙂
[Android Software/Hacking General [Developers Only]] sawdoctor:
Bit gutted they haven't replied to your bug report on GitHub yet. Doesn't fill me with confidence that they'll look at it
[Android Software/Hacking General [Developers Only]] Homeboy76:
:oops: TermOne Plus App, for the Google Pixel 8 Pro ?

TermOne Plus - Terminal Emulator for Android OS

TermOne Plus - Google Play Store

TermOne Plus

Terminal Emulator for Android OS

Terminal emulator is an Android application that turns your Android device into an computer terminal.

It is useful for accessing the command line shell (built into every Android phone) or use custom one (installed separately). This allows you to run various command line utilities.

"TermOne Plus" is an open source project licensed under "Apache License 2.0". It is successor of Jack Palevich's "Terminal Emulator for Android". Application development of is maintained publicly - source code repository, issue tracing and etc...

I wonder what benefits this App will provide that the current Terminal Emulator favorites Terminal Emulator and Termux do not provide.
[Android Software/Hacking General [Developers Only]] osm0sis:
Yeah I already mentioned that one. It actually works where Terminal Emulator doesn't and appears to be forked from it.

[TOOLS][ZIPS][SCRIPTS] osm0sis' Odds and Ends [Multiple Devices/Platforms]

osm0sis' Odds and Ends -- Misc./Batch Tools, Flashable Zips, Scripts, etc. General Information In a nutshell, I just wanted a single thread to gather links to some of my other, larger projects, but also serve as a spot I could put some smaller...

xdaforums.com

Only downside I've noticed is that from being built with the newer minSdk it gets hosed by scoped storage for unrooted sdcard access. Obviously with root all is normal.

Termux is of course a full environment, not just a terminal, so remains on a different level.
[Android Software/Hacking General [Developers Only]] Wolfcity:
I'm using that one at the moment and after deleting/unchecking the things @osm0sis mentioned it works quite nicely.

I'm looking for a terminal to do things like

su -c "logcat | grep 'PIF/'"

as fast as possible after a reboot.
[Android Software/Hacking General [Developers Only]] Umgak:
If you want as fast as possible:

adb wait-for-device shell su -c "logcat | grep 'PIF/'"

with the phone connected to PC.
[Android Software/Hacking General [Developers Only]] Homeboy76:
Thanks, I was blind in one eye and couldn't see out of the other one when you wrote post #3,392.:ROFLMAO:
[Android Software/Hacking General [Developers Only]] Wolfcity:
Working perfectly on my Xiaomi Mi 9T running xiaomi.eu 12.5.2 (A11) with my print, mined in the beginning of December 2023.🤘

Fingerprint sensor working too.
[Android Software/Hacking General [Developers Only]] DiamondJohn:
If you want as fast as possible, and you have Magisk installed, wouldn't a boot script be the best choice? And you have the choice between postfsdata and service.
[Android Software/Hacking General [Developers Only]] fbirraque:
Updated smoothly like always on Poco F3 running MIUI.eu

It was working before and still working flawlessly after.

Thanks!
[Android Software/Hacking General [Developers Only]] PatrickJK:
Having an issue on v6. Using Apatch on Android 13. Everything was working fine with v5, but after upgrading to v6 I only pass basic. Changing to other tested working prints still only pass basic. Going back to v5 results in passing both basic and device again.
[Android Software/Hacking General [Developers Only]] Fishawy:
As good as ever!

Many thanks for continuing to fortify this!
[Android Software/Hacking General [Developers Only]] osm0sis:
Hmm, have some time to troubleshoot with me via PM?

We'd ironed out a couple issues after I posted the "Release Candidate" CI build in the main PIF thread yesterday, but I guess we might have missed one!

Might be time for my first PIFork point release! 😛
[Android Software/Hacking General [Developers Only]] PatrickJK:
Going to be heading to bed soon but shoot me a PM and let me know what I should be testing and anything else you need and I'll get started tomorrow.
[Android Software/Hacking General [Developers Only]] osm0sis:
Copying this here so others may benefit. 🙂

Fair question, it is indeed a bit confusing, which is why I hid it under verbose logging.

I don't have a full answer for that one, but basically DEVICE_INITIAL_SDK_INT only seems to allow itself to be set once, so in a complete log you'll see it get set at the beginning, but then subsequent times it triggers "Couldn't determine 'DEVICE_INITIAL_SDK_INT' class name".

This may be what I recall from the USNF days where kdrag0n or Displax said they were having trouble getting API level to set that way and had to use properties instead.

Of course now we know the properties for *api_level are what's actually checked currently, but I left DEVICE_INITIAL_SDK_INT in the default template because it should match them, and I figured it's better to set it once than not at all.
[Android Software/Hacking General [Developers Only]] osm0sis:
Known PIFork v6 issues I'm actively working on:

- APatch is currently using an outdated build of resetprop which doesn't support `resetprop -Z` (added to Magisk 8 months ago...) to find the property context/file, so my new resetprop_hexpatch function will fail and the needed global props won't be set. There was a Magisk stable back in late November, so not sure how APatch ended up behind like that. KernelSU on the other hand is on the ball and up-to-date with the latest Magisk 26404 Canary resetprop as of 2 weeks ago. I might try to update my script to hack the context out directly so it doesn't rely on `resetprop -Z` as a workaround, but I really shouldn't have to. 🤷‍♂️

- Custom ROM spoof injection apps (Xiaomi.eu, EliteRoms, etc.) that are in /product won't be replaced properly to disable them. Troubleshooting it with a user now but my attempted fix weirdly isn't working yet for him though tests on my side show it should. Note PIF also doesn't seem to correctly handle this currently so was presumably always broken there as well. 🤔
[Android Software/Hacking General [Developers Only]] osm0sis:
Ahh, the reason it looked like the injector app replacement was working was because it was masked by another change which hadn't been reverted yet, so it basically didn't compete with the injector app when it wasn't actually properly replaced anyway. 😄

Whereas now the extra spoofing calls I added back to fix framework-level spoofing ROMs will actively fight with the injection app spoofing ROMs at each attestation, so the timing can get screwed and result in sometimes passing and sometimes failing.

Also, even with that /product app confirmed replaced the user is still seeing the ROM trying to inject its own spoof so there's something else going on on that front as well we'll have to investigate; my hunch is either another ROM app needs removal, or the removed app had updated itself and has a user app copy that's still running.

All in all v6 should be solid for any not in those 2 categories, and I'm thinking these fixes can be for v7 in a week or so. Maybe APatch will update before then and I won't need to worry about that one either: https://github.com/bmax121/APatch/issues/163 🤞

Hilariously ShadowHook stopped being dead overnight as well... but I'll continue to stick with Dobby for now: https://github.com/bytedance/android-inline-hook/issues/53#issuecomment-1897921405 😅
[Android Software/Hacking General [Developers Only]] fbirraque:
As far I know the only person that said .replace works with .EU solution is their Dev Leader - Igor Eisberg

Never worked for me even when chiteroman's module in use. I only could use root + PI after manually uninstalling the XiaomiEUInject as SU (ADB command) - Here

Also doesn't work uninstall it from Settings / Apps / Manage Apps because doesn't revert XiaomiEUInject to Version 1 as expected. It's a know bug that appears to have been fixed by .eu now but isn't included in many of the latest Stable versions like for Poco F3 yet.
[Android Software/Hacking General [Developers Only]] osm0sis:
Yeah exactly, broken thing remains broken... So far anyway!

Hey, can I PM you to troubleshoot this a little more? You seem to know stuff about things! 😛
[Android Software/Hacking General [Developers Only]] osm0sis:
Turns out both of my hunches were correct! The users will have to uninstall the user app, because I'm sure as sh*t not messing around in the /data/app or /data/data directories if I don't have to... But I've added a little instruction to do so in the installer, and added the system apk Stub directory we were missing to the replacement list. (y)

Add XiaomiEUInject-Stub to the default/example replace list · osm0sis/PlayIntegrityFork@5901844

Fix Play Integrity (and SafetyNet) verdicts, allowing custom fields and props - Add XiaomiEUInject-Stub to the default/example replace list · osm0sis/PlayIntegrityFork@5901844

github.com

https://github.com/osm0sis/PlayIntegrityFork/actions/runs/7584624248

Thanks to @CZ.Kostra for the help troubleshooting!
[Android Software/Hacking General [Developers Only]] primazz:
Xiaomi Mi11 stock here and using my 2. FP still. Used osm0sis fork since the beginning of this "mess"
[Android Software/Hacking General [Developers Only]] osm0sis:
TIL.

Difference with Magisk | KernelSU

A kernel-based root solution for Android GKI devices.

kernelsu.org

And directory replacement is actually even more different than described above:

KernelSU/userspace/ksud/src/installer.sh at main · tiann/KernelSU

A Kernel based root solution for Android. Contribute to tiann/KernelSU development by creating an account on GitHub.

github.com

Not sure why KernelSU chose not to just do this sh*t under the hood to keep (long-established) API compatibility with Magisk. 🤷‍♂️

Anyway...

Fix ROM injection app replacement when using KernelSU · osm0sis/PlayIntegrityFork@bdcfd28

Fix Play Integrity (and SafetyNet) verdicts, allowing custom fields and props - Fix ROM injection app replacement when using KernelSU · osm0sis/PlayIntegrityFork@bdcfd28

github.com
[Android Software/Hacking General [Developers Only]] osm0sis:
APatch has merged the needed resetprop update: https://github.com/bmax121/APatch/pull/175

Thanks to @PatrickJK for the assist! 🙌

So now they just need to do a new release with it and that's all the v6 Known Issues taken care of before v7. :)
[Android Software/Hacking General [Developers Only]] osm0sis:
With the above in mind, I believe we can call PIFork CI #127 a Release Candidate for v7 if people can please try it out:

Add prop hack return codes for testing, tidy other functions · osm0sis/PlayIntegrityFork@919526b

Fix Play Integrity (and SafetyNet) verdicts, allowing custom fields and props - Add prop hack return codes for testing, tidy other functions · osm0sis/PlayIntegrityFork@919526b

github.com

🤘
[Android Software/Hacking General [Developers Only]] ykjae:
Just installed latest ci #127 everything is good, everything has been good with previous releases as well. Thank you.
[Android Software/Hacking General [Developers Only]] BillGoss:
Ditto.
[Android Software/Hacking General [Developers Only]] HippoMan:
Works fine for me.