yashsingh1/xdaforums huggingface dataset:
[Magisk] firozpatel:
The steps i have taken are as follows

My device is deodexed already, currently on marshmellow

1. Downloaded all the necessary framework and java

2.copied service.jar from my phone to download folder on my phone

3.connected my phone

4.opened up smalipacher, and waited for it to do its thing untill i was able to browse for the file service.jar

5.ticked all 3 options and pressed patched

6.a file was created, so i copied that file (magisk module) back in to my phone

7. Rebooted my phone in to recovery and selected the module

8.opened up magisk, the module is there

So as everything is in order i went on to a banking app to see if the screen shot function is workin

But when i did try a message at the botten said, unable to screenshot due to security reasons

(Is there an app you are familiar with that is not able to screenshot but woth the module you can, i can yest it to see)
[Magisk] fOmey:
Upload your unmodified deodexed service.jar.
[Magisk] Telperion:
I was able to replicate the crash by accident; it's not an issue with SmaliPatcher, it's a device drivers issue. I was running it on a fresh Windows 10 installation. In spite of the fact that I could run ADB commands, I suspected a driver issue. I downloaded the Google USB driver, installed the INF, restarted my computer, and was able to run SmaliPatcher without a crash.

That being said, there still are issues getting it to work on my Pixel 3:

When I run the ADB method on a booted device, it can't pull build.prop (permissions issue) but can pull the framework directory. It creates a module, and the module installs, but SafetyNet fails while mocking a location -- passes again as soon as mocking app is stopped.

When I run it on a pulled Services.jar, it creates a module of the same size as the above method, but SafetyNet fails while mocking a location -- passes again as soon as mocking app is stopped.

When running in recovery, it can't find /system/framework or /system/build.prop -- on the Pixel 3 in TWRP, those are located at /system/system/framework and /system/system/build.prop. I symlinked /system/system/framework to /system/framework and same for build.prop and got further in the patch process, but it failed when it said services.jar wasn't deodexed. It's a 1KB file when pulled from recovery anyway so something's not right.

Here are the contents of SmaliPatcher's adb directory, as pulled when run from a booted device.
[Magisk] bosadels:
Hey thanks for responding. New update sadly closes down at the same exact spot.

I am running this ROM maybe its problem with the ROM itself?

This ROM

https://xdaforums.com/le-max-2/development/rom-omnirom-9-0-pie-t3854083

and this firmware (LEX820 (X2_CN) 30s)

https://androidfilehost.com/?fid=674106145207490413

I will try other PC as the other guy have said if not then I will upload the whole direction as you said maybe that can help! Hope I am not wasting to much of your time :)
[Magisk] Telperion:
A follow up question: Is there any discernible difference between mocking locations via the mock provider (with masked enabled) versus mocking using a system priv-app app? In other words, which one would give the most authentic-seeming locations? Is it all the same?
[Magisk] fOmey:
Not being able to pull build.prop is fine, the patcher doesn't depend on it at all - that error is treated as a warning..

The fact safetynet is failing while spoofing is a little odd tho.. do you have any other magisk modules installed?

You don't need to try a new PC.. just try installing the Google USB drivers: https://dl-ssl.google.com/android/repository/latest_usb_driver_windows.zip

The patch masks mocked locations.. its as close to genuine as you can get.
[Magisk] Telperion:
No other modules installed, just this one.

Update: Now it's working, I didn't do anything in the last few hours but now it's working when before it wasn't. Very strange
[Magisk] zubblwump:
Trying to run this on a Pixel XL (stock Android P) and I get an early error that it failed to copy build.prop, which a couple posts before this was said is not a problem. So, ignoring that, the program dumps the framework up to 100%, then "Dumping framework..?" then hangs at "Dumping framework.. 21%"

fOmey @ XDA
Patcher Version: 0.0.2.8
==> Binary download complete
==> Unpacked binarys.
adb: error: failed to copy 'system/build.prop' to 'adb\build.prop': remote open failed: Permission denied
pull: building file list...
/system/framework/: 362 files pulled. 21.8 MB/s (278993001 bytes in 12.221s)
==> Dumped framework
[INFO] Processing 1 file(s) from bin\services.vdex
[INFO] 1 out of 1 Vdex files have been processed
[INFO] 1 Dex files have been extracted in total
[INFO] Extracted Dex files are available in 'bin'
bin\compact_dex_converter: 1 file pushed. 19.1 MB/s (5087392 bytes in 0.254s)
bin\classes.cdex: 1 file pushed. 17.5 MB/s (9513952 bytes in 0.519s)
Opened '/data/local/tmp/classes.cdex', DEX version '001'

Not sure where to go from here...I would be grateful for any help
[Magisk] Ariel_PR:
Thanks for updating the patcher. Unfortunately I'm still getting the same error on 2.8. I've sent you my entire adb folder (pulled from Smali) to your private messages!
[Magisk] bosadels:
Hello installed the drivers you linked and I hope I did it the right way but still It gets closed down at the same spot as the previous time.

https://i.imgur.com/w5Jih2z.jpg

I will upload whole directory as you said and maybe its possible to see whats wrong there if not I guess its not for me or for my phone.

https://drive.google.com/file/d/1k1gyx0dh5L94P_AMWqNukLLJYXFpnYJM/view?usp=sharing
[Magisk] fOmey:
Can you both please a cmd terminal and type "java -version" and paste the output.. can't replicate this crash!! It's very frustrating..

Should spit out something like the following:

java version "1.8.0_121"
Java(TM) SE Runtime Environment (build 1.8.0_121-b13)
Java HotSpot(TM) 64-Bit Server VM (build 25.121-b13, mixed mode)

Might of been a issue with the safety net API.. good to hear!
[Magisk] Ariel_PR:
Mine says

java version "1.8.0_191"

Java(TM) SE Runtime Environment (build 1.8.0_191-b12)

Java HotSpot(TM) Client VM (build 25.191-b12, mixed mode)

I would be more than happy to give you remote access to my PC so you can mess around with it and see what's going on.
[Magisk] fOmey:
Can you target the services.jar with the patcher using the browse button in "adb/framework/services.jar" and let me know what happens... not a bad idea, might take you up on that offer if I don't figure it out.
[Magisk] gunkids:
help me

can you help me sir ?

i can't patch it on my laptop, maybe i miss another part of installation, i dont know

so, can i ask you to help me patch my service.jar ?

https://drive.google.com/open?id=1TSFLaLkivXs4-6gynJ4qvfQwAHiEPgmX
[Magisk] Spartacus500:
Here you are ;) You services.jar file 4 patch :cool:
[Magisk] gunkids:
thanks a lot sir

i really apreciate it :)

have a nice day
[Magisk] zubblwump:
If I can't get the ADB method to work, and I am on stock Android P (not deodexed)...do I just pull the services.jar from my system folder, deodex this file with a deodexing tool and then run the patcher?
[Magisk] Dissidius1:
don't use latest java JDK people it simply won't work and smalipatchet will crash!

uninstall java JDK

and install java 8 JRE
[Magisk] Telperion:
I used the latest JDK, no crash, so I don't know that it's entirely the problem either
[Magisk] coolkadet:
Alternative method

for those who still fail, maybe u can try the following methods:

1. Using root explorer or similar applications, create a new folder on ur phone's internal or external storage, name it "system" without quote.

2. Log into ur phone's /system directory.

3. Copy only the framework folder and all other files that are not folders.

4. Paste the copied file into the folder /system created earlier.

5. Now, copy or move that /system folder to your computer.

6. Run SmaliPatcher.exe as administrator and wait until the status becomes idle (u must have an active internet connection).

7. Browse the services.jar from inside the /system/framework folder that was copied earlier and then hit the "Patch jar" button.

8. Wait until the process is complete.

9. There should be no problems. Once the process has completed, the Magisk module will be generated in the same directory as "SmaliPatcher.exe".

10. Install the module.

Sorry for my bad English.
[Magisk] bosadels:
Hello I tried on other PC and it worked but now I cant understand how to install that module? I need to drop in on my phone and install with Magisk under module? When I try to do that it says.

This zip is not a Magisk module!

Why is that? Or I am doing something wrong?

All good I installed everything! Now lets hope I can make it work with Pokemon GO! :good::good::good::good:
[Magisk] Ariel_PR:
Can you do mine too please! I've been trying for a week. I only want the "Secure Flag" patch.
[Magisk] Ariel_PR:
I tried manually going to the adb/framework/services.jar that was pulled by Smali. Still closes itself. Do you want to coordinate a time so you can remotely control my PC? I'm available pretty much all day today, Saturday and Sunday. Just send me a PM or quote me so I can get the notification. We can use TeamViewer.
[Magisk] bosadels:
Wow all works!

Fomey i love you!
[Magisk] coolkadet:
maybe u can try the following methods:

1. Using root explorer or similar applications, create a new folder on ur phone's internal or external storage, name it "system" without quote.

2. Log into ur phone's /system directory.

3. Copy only the framework folder and all other files that are not folders.

4. Paste the copied file into the folder /system created earlier.

5. Now, copy or move that /system folder to your computer.

6. Run SmaliPatcher.exe as administrator and wait until the status becomes idle (u must have an active internet connection).

7. Browse the services.jar from inside the /system/framework folder that was copied earlier and then hit the "Patch jar" button.

8. Wait until the process is complete.

9. There should be no problems. Once the process has completed, the Magisk module will be generated in the same directory as "SmaliPatcher.exe".

10. Install the module.

Sorry for my bad English.
[Magisk] fOmey:
Great.. that tells me a lot actually.

That would be good, shoot me a PM with some team viewer details and I'll have a quick sus out.
[Magisk] Ariel_PR:
Do PMs work? I sent you some yesterday and you didn't respond.
[Magisk] fOmey:
They do, the new forum layout makes them hard to notice now tho.. especially if you have other notifications.
[Magisk] Ariel_PR:
I'm online again
[Magisk] fOmey:
Here is a module with secure flag patched.. It was generated off using my phone running android 7.0 - so it may not work, please backup prior to testing.

If it doesn't work, I'm sure someone will be willing to generate a module for you.

Thanks again for your help!
[Magisk] Ariel_PR:
I just flashed it and it's working perfectly! Still passes safety net too. Thanks for all the help over the past couple of days!
[Magisk] Aan579:
FOmey. thank you for the update sir.

scure flag still doesn't work I tried it on the netflix application. when I was watching I did a screenshot but there was a warning happening "unable to take screenshots not allowed by the application".
[Magisk] IceLitty:
When I use it on LOS 14.1, system crashed..

First this is smali patcher log, works great:

(I patch again use dump services.jar without phone open usb debugging mode, it also work but still crash in phone)

fOmey @ XDA
Patcher Version: 0.0.2.9
I: Using Apktool 2.3.4 on services.jar
I: Baksmaling classes.dex...
I: Copying assets and libs...
I: Copying unknown files...
I: Copying original files...
==> Patched mock location boolean
==> Patched mock location boolean
I: Using Apktool 2.3.4
I: Checking whether sources has changed...
I: Smaling smali folder into classes.dex...
I: Building apk file...
I: Copying unknown files/dir...
I: Built apk...
W: Could not find resources
==> Magisk template download complete
==> Generated magisk module zip file
*** Complete ***

Then restart phone it show "system interface" not working, infinite popup crash window...

Environment:

java -version
java version "1.8.0_162"
Java(TM) SE Runtime Environment (build 1.8.0_162-b12)
Java HotSpot(TM) 64-Bit Server VM (build 25.162-b12, mixed mode)

LineageOS version:
14.1-20181115-NIGHTLY-hydrogen
Android 7.1.2

Update:

Forgot enable adb shell root permission in magisk... Then apply services.jar my phone work correctly again, but in now versions PGO, it always show gps signal not found (11).

In any map app mock location work correctly, if PGO update function to prevent location modify?
[Magisk] Chilled26:
So the patcher works great with the mock locations option and I'm able to spoof but as a side effect, pressing the home button has input delay when the module is enabled and the phone is just not as smooth overall. Is this normal? I'm using a OnePlus 6T running OOS 9.0.7.
[Magisk] fOmey:
No that's not normal.. I can't see how this module could possibly effect your phone in that way.
[Magisk] Chilled26:
I don't understand it either. Phone is more laggy with the module enabled. Should I try and re do the smalli patch and reinstall the module?
[Magisk] fOmey:
Enable the module and use your phone over a couple of hours and see if it eases up.. might just be rebuilding cache.

Alternatively you can try clearing your entire cache in recovery mode, once it's rebuilt it should be fine.
[Magisk] dani971989:
dear fOmey

please help me i don't understand my phone get bootloop, this is my service.jar

https://drive.google.com/file/d/1kTel10SlRocEdK5GLHMArb-k5ncswdbJ/view?usp=drivesdk

thanks
[Magisk] zubblwump:
I've tried this so many times over the past week. Different PCs (windows 7 and Windows 10). Tried directly patching the serivices.jar, but being stock Android Pie, it's odexed...so I've looked into Fulmics deodexer, but apparently that doesn't work for 8.1 and up. So I've tried tried getting Linux distros running that can run SuperR's Kitchen to deodex, but that's giving me nothing but problems too.

This looks great, but I just can't seem to get it to work. Can anybody help me either figure it out (preferred), or willing to deodex and patch my services.jar for me?
[Magisk] fOmey:
Any reason why the ADB method isnt working?
[Magisk] zubblwump:
I'm not sure why. It will start dumping then hang as described here:

https://xdaforums.com/showpost.php?p=78357797&postcount=1782

The percentage will differ but it always stops before completing.
[Magisk] dani971989:
hello, i'm comeback again
[Magisk] dani971989:
Help

Dear Spartacus500

Can u help me, i've already deodex but now i get bootloop i don't understand why android pie is difficult

https://drive.google.com/file/d/1kTel10SlRocEdK5GLHMArb-k5ncswdbJ/view?usp=drivesdk
[Magisk] Spartacus500:
Works, see for yourself :)
[Magisk] Spartacus500:
[MENTION=8946634]dani971989[/MENTION]

Your services.jar is deodex without any patches Smali and after throwing into the system / framework / services.jar you have a bootloop?
[Magisk] Aan579:
What version do you use Android? I use Android 8.1.0 oreo and the Smali scure flag doesn't work. How did it happen? Is there something wrong when I make smali patcher because I do deodex service.jar through another deodex system
[Magisk] Spartacus500:
Android 8.0 Oreo S7 Edge, I do not have the opportunity to check on higher Android.
[Magisk] dani971989:
yes sir,

i've already try with pc to get smali patcher and always show error..i don' t know why always get error, now i've already flash my lenovo again but i need smali patcher sir, can u help me
[Magisk] Spartacus500:
[MENTION=8946634]dani971989[/MENTION]

So you want me to make a 4 patch on your services.jar file?
[Magisk] dani971989:
thank you Spartacus500

---------- Post added at 02:35 PM ---------- Previous post was at 02:33 PM ----------

yes sir, thank you sir
[Magisk] Spartacus500:
[MENTION=8946634]dani971989[/MENTION]

Here you are ;) You services.jar file 4 patch ;)
[Magisk] Aan579:
ok. no worries. tq for the information
[Magisk] fOmey:
Try running ADB method while /system mounted in recovery mode and report back.
[Magisk] zubblwump:
To do so, I boot recovery (TWRP) and select 'mount', then tick the box next to "system"? The box at the bottom is already ticked for "mount system partition read only" I expected to see something change when I checked the box, but didn't see any indication anything happened.

The Smali Patcher now just reports:

adb: error: failed to stat remote object 'system/build.prop': No such file or directory
adb: error: failed to stat remote object '/system/framework/': No such file or directory
!!! ERROR: Framework directory not found.

This would lead me to believe system is actually not mounted...
[Magisk] fOmey:
Safe assumption.. doesn't look like system is being mounted for whatever reason.

The PC your running the patcher on has at least 3GB of ram yeah?
[Magisk] zubblwump:
Yes, the primary PC I've tried has 32 GB RAM. The other has 4 GB, I believe.
[Magisk] zubblwump:
Another piece of information that may or may not help: I just tried on the same PC with a different phone, HTC One M9 running Android 6.0. Running with the phone booted and connected gives the "ERROR: Framework directory not found." message. But booted to recovery with system mounted it hung once at 23%, but the second and third try it reached 100%, detected API version...then the program crashes.

Again, I don't know if this helps you understand what's happening, but more information can't hurt...
[Magisk] fOmey:
What are the specs of the PC? Sounds like your running out of memory to me.
[Magisk] bush911:
I am on latest android P with 2016 pixel, rooted.

Does this patch work for some app which have their own special sdk, just like some apps from Tencent
[Magisk] Sago7:
Im stick on this:

7. Once the process has completed, magisk module will be generated in the same directory as "SmaliPatcher.exe".

There is no file in the directory after the smalipatcher is closed ...
[Magisk] Spartacus500:
[MENTION=2102593]Sago7[/MENTION]

Do you have internet enabled during Smali patcher ?
[Magisk] Sago7:
Yes. The only anomaly that i saw was this error.

https://vvcap.com/img/E2XHjhwLr.png
[Magisk] zubblwump:
Windows 7 Enterprise

Service Pack 1

Processor: Intel Xeon CPU E3-1240 v5 @ 3.50GHz

Installed memory (RAM): 32.0 GB

64 bit Operating System

Neither CPU or available RAM are taxed when I run the patcher. Performance monitor reports CPU never goes above 16% and memory goes up by 0.1 GB.
[Magisk] fOmey:
Definitely not a memory problem in that case.. very odd, not sure my friend!

All I can suggest is trying to dump the framework directory manually using ADB and see if the same thing happens.. perhaps try another cable or try using the patcher while in recovery mode with /system mounted.

Sorry I can't be much more help.
[Magisk] rynnstengweitian:
Rynns TENG

I have myself a j2 pro samsung 2018 with android 7.1.1.

Currently, I did what I saw inside the thread. I got bootloop when installing the module in magisk manager. I need HELP!
[Magisk] rynnstengweitian:
Rynns TENG

Can anyone help me to deodexed my service jar? Many thanks! Im new user, cannot post the link of my service jar file
[Magisk] zubblwump:
Thank you for trying to help. I truly appreciate it. I just tried again on my other, less powerful PC which also failed before...and it appears to have worked! I have no idea why it worked this time, but I think I'm going to press my luck and try again with all 4 patches. Just in case I later wish I had them.

Edit: Well, I tried. The log stops at:

"==>Patched secure flag function"

and I get a Windows error:

"The exception unknown software exception (0xe0434352) occurred in the application at location 0x0000000076131812."

Any ideas on this one?

Edit2: Nevermind, it worked the next try. Thank you for the tool, and for your help!
[Magisk] zzzhead:
I'm using Resurrection Remix 6.2.0 final for op6, the services.jar is only 310 bytes. Is there another file that I should look for?
[Magisk] Chilled26:
So I tried this for a few days and still the same issue. Even re did the smalli patch as well as doing one with all the options available but no change. Oh well I guess I'll just use it as I need it.
[Magisk] scorthyn:
Hey, i think everything went smooth but i get a "your device is not compatible" in pokemon go, any way to stop that?
[Magisk] Chilled26:
If you haven't already you have to hide PoGo in Magisk Hide as well hide the Magisk manager itself in the settings.
[Magisk] almolah:
Great job fOmey!

Thanks fOmey for a job well done! I just want to alert that there is something weird happening when running the patch! All tried failed by the patch app crashing before generating a module, I have tried that on multiple machines and I was not able to isolate the cause! Two with i7 Quad core, 16GB of ram, one is i5 Surface Pro with 8GB! Oddly I was able to run the patch successfully on my work desktop without admin privileges! Could it be the USB cable? I used USB-C to USB-C and at home I was using a USB-C to USB-A cable!

almolah
[Magisk] Suryo75:
I have tried with oreo, it failed even i had deodexied entire rom.
[Magisk] fOmey:
Could be, I'm not entirely sure!!

I can't seem to reproduce this issue... its been very difficult to figure out the cause.

When you say it failed, how did it fail exactly? What was the error?
[Magisk] Suryo75:
hello is it done ? or still fail ? similiar with mine also moto e4 plus, the different is magisk installed smooth but when i try to install the modules accure error as above . so now i have magisk root but no modules inside.

---------- Post added at 03:53 AM ---------- Previous post was at 02:59 AM ----------

- Copying zip to temp directory

- Installing SmaliPatcherModule-0.0.2.7-fOmey@XDA.zip

- Mounting /system, /vendor

Archive: /data/user/0/com.QYKuX.i8mz.skeGY/cache/install.zip

inflating: config.sh

inflating: module.prop

******************************

Smali Patcher

fOmey @ XDA

******************************

Powered by Magisk (@topjohnwu)

******************************

- Found /data/adb/magisk_merge.img

e2fsck 1.42.9 (28-Dec-2013)

mount /sbin/.magisk/block/loop12->/dev/tmp/magisk_img failed with 13: Permission denied

! /data/adb/magisk_merge.img mount failed...

! Installation failed
[Magisk] Suryo75:
Could you solve my trouble MOTO E4 plus, can not instal smali patcher

Copying zip to temp directory

- Installing SmaliPatcherModule-0.0.2.4-fOmey@XDA.zip

- Mounting /system, /vendor

Archive: /data/user/0/com.topjohnwu.magisk/cache/install.zip

inflating: config.sh

inflating: module.prop

******************************

Smali Patcher

fOmey @ XDA

******************************

Powered by Magisk (@topjohnwu)

******************************

- Found /data/adb/magisk_merge.img

- Mounting /data/adb/magisk_merge.img to /dev/tmp/magisk_img

! /data/adb/magisk_merge.img mount failed...

Failed!

! Installation failed[/QUOTE]

hello is it done ? or still fail ? similiar with mine also moto e4 plus, the different is magisk installed smooth but when i try to install the modules accure error as above . so now i have magisk root but no modules inside.
[Magisk] fOmey:
This appears to be a magisk issue.. review these search results for a solution: HERE

Has nothing to do with the module.
[Magisk] Goobly:
==> Dumped framework

==> Detected API: 25

Running LineageOS 14.1

What is the issue I'm encountering
[Magisk] Zeeboy360:
I've been using this patch in my j3. This patch has been a life saver thanks a lot! But i'm having trouble adding the module in my note 9. After i add it in Magisk modules and restart my phone it freezes on the samsung logo. Can you tell me whats might go wrong. Thank You
[Magisk] adinxmoa:
I need answer for this problems too ,please

I have same problem, , stuck in dumping 100% :crying: :(
[Magisk] TheUndertaker21:
not working on pixel xl3

stock

it just crashed

fOmey @ XDA

Patcher Version: 0.0.2.9

adb: error: failed to copy 'system/build.prop' to 'adb\build.prop': remote open failed: Permission denied

pull: building file list...

adb: error: failed to copy 'system/build.prop' to 'adb\build.prop': remote open failed: Permission denied

pull: building file list...