[Galaxy S 4 i9505 Original Android Development] stylemessiah:
Signature Spoofing Guide Using Windows and Haymaker by Lanchon

Meanwhile, heres my quickish guide to patching the ROM for signature spoofing, to enable use of MicroG (an alternate to flashing GApps - understand its not for everyone, and it can take some work to get contacts/calendar/email/maps and store functionility working WITHOUT GApps on your device or only using some of them (with some mixed results). I will stab a kitten for every time someone fiddles with this without doing their homework (like the bloody f2fs fiddlers do, and ill hate you more than i hate people who ask f2fs questions) and posts a question on MicroG, we're not talking about MicroG here except to say, we're talking purely about how to patch the framework to enable sig spoofing so you have the option of trying MicroG. Hopefully if theres enough interest, side might make it an option in Aroma. This process would best be done after a clean ROM flash, in recovery and WITHOUT flashing GApps of course. What happens after this process, the MicroG stuff, is best explored here https://xdaforums.com/android/apps-games/app-microg-gmscore-floss-play-services-t3217616 before going any further...

Disclaimer: Continuing beyond this point is up to you, and you accept any issues that may arise by following any steps, whether its on your PC or device.

Firstly, theres no include patches for 7.1 yet, but i had no issues using the 7.0 patch included in HayMaker and using the sdk version of 25 in the patch-fileset lines...

Pre-Requisites:

Java JDK

http://www.oracle.com/technetwork/java/javase/downloads/jdk8-downloads-2133151.html

I used the x64 build...195Mb, feel free to pick your own architecture

Install this BEFORE Android SDK...Android SDK will then automatically find it during SDK install

Android SDK

https://android-sdk.en.uptodown.com/windows/old

I downloaded v24.4.1 144MB (its less than the current bloated Android Studio - 1.8 Gb!)

By default it will install to C:\Program Files (x86)\Android\android-sdk

At end of setup, leave tick in run SDK Manager, and finish.

In SDK Manager, it by default ticks:

Android SDK Tools (an update available) - untick, not necessary...wasted download for what we're doing

Android SDK Platform-Tools - leave ticked unless you already have adb installed somewhere and its in your path

Android SDK Build-Tools - leave ticked...this gives you a few tools needed by the haystack script

Android 7.1.1 (API25) - entire section is ticked, untick the main tree, it will deselect the entire tree

Google USB Driver (at bottom) - if you already have it installed, and most will...untick

If you have done as i have, click the button in bottom right "Install 2 packages"

On next screen Accept License and Install

Close window when done

Git SCM (Git for Windows) - probably the easiest way to get a working bash without any drama

https://git-scm.com/ 35Mb

Hit Downloads for Windows (it will detect your architecture and initiate the download)

During setup leave default options all the way through...

Haystack

https://github.com/Lanchon/haystack 3.4Mb

Hit Clone or Download, and then Download Zip

Extract to a handy folder, i suggest in the root of a drive or a path without many levels or spaces/non-alpha characters

Gnu Zip for Windows

http://gnuwin32.sourceforge.net/packages/zip.htm 590Kb

Download both Binaries and Dependencies packages

Extract these files from zip-3.0-bin.zip and place in path (i dumped them in c:\Windows, along with all the other gnu tools in there for my squid for windows blocklist updating/parsing files like sed :) ):

/bin/zip.exe

/bin/zip32z64.dll

Extract these files from zip-3.0-dep.zip and place in path (i dumped them in c:\Windows, along with all the other gnu tools in there for my squid for windows blocklist updating/parsing files like sed :) ):

/bin/bzip2.dll

Environment Variables:

I added path entries for:

C:\Program Files (x86)\Android\android-sdk;C:\Program Files (x86)\Android\android-sdk\platform-tools;

(assuming you installed the sdk to c:\)

Reboot

adb is now in your path, and can be called from anywhere, which is handy for many things

Patching Process

1) Start phone in recovery mode, mount /system, and connect to PC

2) Start windows admin cmd prompt and navigate to haystack-master folder (hopefully you have a right click shell entry for Elevated Command Prompt Here, i do)

3) In windows cmd prompt (because if you try the pull-fileset script in git bash it will error: adb: error: remote object 'C:/Program Files/Git/system/framework/framework.jar' does not exist - it prefaces the script line with "C:/Program Files/Git" and i couldnt be arsed trying to figure that out :) )

4) Copy and paste into cmd prompt each of the following lines, one at a time, pressing enter at each step OR copy into a file, say win-pull.bat, saved in and run from the haymaker-master folder

md s4
adb start-server
adb pull /system/framework/core-libart.jar s4/
adb pull /system/framework/core-oj.jar s4/
adb pull /system/framework/ext.jar s4/
adb pull /system/framework/framework.jar s4/
adb pull /system/framework/services.jar s4/
adb pull /system/priv-app/Settings/Settings.apk s4/

All required files should now be in a folder called s4...

Leave cmd prompt open...you'll need it later

5) In explorer right click on haystack-master and click on Git Bash Here

Copy and paste into bash shell each of the following lines, one at a time, pressing enter at each step

./patch-fileset patches/sigspoof-hook-7.0/ 25 s4/
./patch-fileset patches/sigspoof-core/ 25 s4__sigspoof-hook-7.0/
./patch-fileset patches/sigspoof-ui-global-7.0/ 25 s4__sigspoof-hook-7.0__sigspoof-core/

6) Back in windows cmd prompt (still running in haymaker-master folder)

Copy and paste into cmd prompt each of the following lines, one at a time, pressing enter at each step OR copy into a file, say win-push.bat, saved in and run from the haymaker-master folder

adb root
adb remount
cd s4__sigspoof-hook-7.0__sigspoof-core__sigspoof-ui-global-7.0
adb push framework.jar /system/framework
adb push ext.jar /system/framework
adb push services.jar /system/framework/
adb push Settings.apk /system/priv-app/Settings/

You can also try installing the SigSpoof Checker app via adb via:

adb install Lanchon-SigSpoof-Checker-1.0.apk

Note: the above errored for me, so i did the following and installed it after reboot from internal memory. I had the apk copied to the haywire-master folder...

adb push Lanchon-SigSpoof-Checker-1.0.apk /sdcard/

7)

adb reboot

8) Go into Settings, then Development...scroll to bottom, toggle Spoofing on

9) Install Lanchon-SigSpoof-Checker-1.0.apk from internal memory if you copied it there as i did

10) Run the Spoof Checking app...you should see green!

As for MicroG, ill refer you to them for the info and installation and support. Be sure you know what youre lettign yourself in for with MicroG,

for instance youll need to set up a cloud caldav service to sync contacts and calndaring etc. Removing your dependence on GApps means work.

I wont answer any questions about MicroG, they have their own thread for info/support, and im new to it myself.

MicroG: https://xdaforums.com/android/apps-games/app-microg-gmscore-floss-play-services-t3217616

And id recommend reading this: https://shadow53.com/no-gapps/setup-guide/