yashsingh1/xdaforums huggingface dataset:
[Magisk] fOmey:
CHANGELOG ::

1.4 ::

Improved error checking - verify's services.odex size detecting if module already active.

Potential fix for "magisk download failed" that certain user's are experiencing.

From this version onward, All requests will be removed from the thread... Just follow the "ADB method" instructions on the original post - doesn't get any easier than that.
[Magisk] fOmey:
Try the ADB method in the OP.. for whatever reason apktool is struggling to decompile that jar file..
[Magisk] albeltw:
This explains a lot. So, do you simply use GPS joystick alone (system mode, indirect mocking or whatever)?

Anyway, except for PoGo, I'll gladly keep using this module, I like it a lot. When I have some spare time, I'm going to update to v1.4.
[Magisk] langithitam:
Hy [MENTION=5818781]Eng.Raman[/MENTION] !

could you please patch this one for me? thank you...

https://drive.google.com/open?id=1mJURUQ1crjaHvuDSpeARw7ihGQpA3_n-
[Magisk] Dante Enoshima:
Anyone can patch this services.jar please?

ROM : AEX 4.6

Android version : 7.1.2

View attachment services.jar
[Magisk] shoey63:
System mode on Oreo. Just copied the whole privacy mode generated folder from /data/app to /system/priv-app in TWRP. No indirect mocking required.

Why not try ADB method? The whole idea of the 1.4 release was to allow users to do it themselves, easily, and without the help of others.
[Magisk] Dante Enoshima:
The app stopped working everytime it's decompiling, so kinda doubt that the ADB method will work.
[Magisk] shoey63:
Yes, you are right. Extracts boot files into \..\SmaliPatcher-1.4-fOmey_XDA\adb\arm folder then stops (on Windows 10).
[Magisk] Eng.Raman:
Your services.jar is already deodexed, so try the alternative method and it will works fine ( just make sure that jre 8 or later / MS .Net framwork 4.6 or later installed ).
[Magisk] Dante Enoshima:
Nvm, looks like the solution is simple. I forgot that i reinstalled my Windows 10 recently and i forgot to reinstall Java. My bad.
[Magisk] cry00:
Hello Eng.Raman, help me please ,

How to fix this...?

Thx
[Magisk] Eng.Raman:
* For the deodexed services.jar → Use the alternative method.

* For the odexed services.jar → Use either:

1. The adb method ( Automated one for deodexing and generating the patched module ).

[ works on marshmallow up to oreo ].

2. The manual method ( Fulmics / baksmali code ) for deodexing it first then patching by the alternative method.

[ works on marshmallow up to oreo ] and LBD2.5 method [ for lollipop ].

---------- Post added at 08:19 PM ---------- Previous post was at 08:04 PM ----------

May be your module didn't patched successfully.
[Magisk] fOmey:
I'll have to add a check on startup for java.. baksmali/smali are a little subliminal with the error messages.

[MENTION=4675598]shoey63[/MENTION], was your issue related to java ?
[Magisk] wleagle:
when i was using the adb method, it just halt on "dumping framework...". I can find some files created in the adb folder, but no further steps. HTC 10, Leedroid 5.0
[Magisk] shoey63:
Not java related. Just pulls some files and stops

Edit: as per post above mine.
[Magisk] Duden17:
Hi f0mey, can you help me with my lollipop device? Some apps still detected my mock location is on. Is there any way fix this by changing service.jar script manually before patch service.jar, where or what should i changer or remove on it. help me please thanks before
[Magisk] fOmey:
Can you post the output ? Perhaps even upload the adb folder to mega.co.nz or something so I can have a look ?
[Magisk] P1nGu1n_:
I just tried v1.4, it crashes for me too. A stack trace will help you for sure! :)

Application: SmaliPatcher.exe
Framework Version: v4.0.30319
Description: The process was terminated due to an unhandled exception.
Exception Info: System.IO.DirectoryNotFoundException
at System.IO.__Error.WinIOError(Int32, System.String)
at System.IO.FileSystemEnumerableIterator`1[[System.__Canon, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089]].CommonInit()
at System.IO.FileSystemEnumerableIterator`1[[System.__Canon, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089]]..ctor(System.String, System.String, System.String, System.IO.SearchOption, System.IO.SearchResultHandler`1<System.__Canon>, Boolean)
at System.IO.Directory.GetFiles(System.String, System.String, System.IO.SearchOption)
at SmaliPatcher.Adb.pullFileset()
at SmaliPatcher.MainForm.<patchButton_Click>b__14_1()
at System.Threading.ThreadHelper.ThreadStart_Context(System.Object)
at System.Threading.ExecutionContext.RunInternal(System.Threading.ExecutionContext, System.Threading.ContextCallback, System.Object, Boolean)
at System.Threading.ExecutionContext.Run(System.Threading.ExecutionContext, System.Threading.ContextCallback, System.Object, Boolean)
at System.Threading.ExecutionContext.Run(System.Threading.ExecutionContext, System.Threading.ContextCallback, System.Object)
at System.Threading.ThreadHelper.ThreadStart()

I have both the Java JRE and the JDK installed (I'm an Android developer :P).

By the way, is the patcher open source or do you plan on open sourcing it? I'm interested in the code and creating a patch myself.
[Magisk] y2kbugleung:
I have Pixel 2 XL with Oreo 8.1.

Ubuntu 17.10, running Smali-Patcher on Windows 7 Pro x64 on Virtualbox 5.2, with USB 3.

"adb devices" responses the correct device.

Clicking "PATCH JAR" without choosing any file (adb method), the status-bar shows "Dumping framework...", and the program crashed.

I have no idea how to get services.jar from stock rom images.

Please help.

Problem signature:

Problem Event Name:	CLR20r3

Problem Signature 01:	SmaliPatcher.exe

Problem Signature 02:	0.0.1.4

Problem Signature 03:	5a9b142d

Problem Signature 04:	System

Problem Signature 05:	4.7.2053.0

Problem Signature 06:	58fa6cf0

Problem Signature 07:	2f57

Problem Signature 08:	3f0

Problem Signature 09:	System.ComponentModel.Win32

OS Version:	6.1.7601.2.1.0.256.48

Locale ID:	1033

Additional Information 1:	0a9e

Additional Information 2:	0a9e372d3b4ad19135b953a78882e789

Additional Information 3:	0a9e

Additional Information 4:	0a9e372d3b4ad19135b953a78882e789

Read our privacy statement online:

http://go.microsoft.com/fwlink/?linkid=104288&clcid=0x0409

If the online privacy statement is not available, please read our privacy statement offline:

C:\Windows\system32\en-US\erofflps.txt
[Magisk] fOmey:
Very interesting.. The patcher literally runs the exact same command.

Give 1.5 a try and hopefully it spits out a error that makes a little more sense...

I've added some more debug info, hopefully it provides some proper insight on what is going on there.

As for open sourcing maybe? I wasn't planning on it to be honest. The code is a little messy, perhaps if I clean it up a little.. I have been commenting in the source tho just in case I do decide to release it. We shall see!

CHANGELOG ::

1.5 ::

Improved error checking - added more debug info which hopefully will make diagnosing bugs a little easier.

Proper API detection using rom build.prop.

Improved a search function used for locating framework files.
[Magisk] fOmey:
What additional patches did you have in mind ?

What's the adb directory contents look like ?

For some reason it's not seeing "adb\framework"... Is there a subdirectory being made in "adb" called "framework" ?

Looking at that adb debug info it's dumping the files directly into the adb directory.
[Magisk] P1nGu1n_:
Yes, that's exactly what's happening: framework files are put directly in the adb directory. I'm not sure if the framework dir is being created, I could check tomorrow morning, I'm not near my PC at the moment (UTC+1 timezone).

Nothing in particular, because I'm not sure what would be possible with it as I don't know how it works. I just really like the concept of patching the framework by applying smali patches using a generated module, since it's applicable to multiple ROMs and devices. Which just made me curious how it's set up and to explore the possibilities. Maybe something like changing the Alert Slider behavior on OnePlus devices.. It's mainly the concept that triggers my curiosity, so don't worry about it :P

Edit:
[MENTION=1620550]fOmey[/MENTION] So I took a quick look if I could find the cause of the crash. I may be wrong, but aren't you pulling them to the adb dir explicitly?

for (int i = 0; i < array.Length; i++)
{
this.pull(array[i], "adb");
}
[Magisk] fOmey:
Anything is possible if your keen enough.. however your mostly working with smali code which turns most people off.

Ah easy fix - I know exactly what the problem is..

When testing on my phones: adb creates a folder named "framework" inside "adb" and dump's the files inside there which I assumed would be standardized behavior... obviously is not for whatever reason.

Trivial little annoying bugs..
[Magisk] erriccastro:
for that I understand very well, but it's there that makes me confused, from 3 mock that I use only one that is not running properly (mock detected location), from the third apk installation using the same way that is as a system using appsystemizer (magiskmodule) , would you please help me on this issue ... thanks before.
[Magisk] fOmey:
[MENTION=5122600]P1nGu1n_[/MENTION], [MENTION=4675598]shoey63[/MENTION]

CHANGELOG ::

1.6 ::

Framework base directory detection.
[Magisk] P1nGu1n_:
Still not working, now it's stuck at "Dumping framework" even though it already fully dumped the framework (directly in the 'adb' folder).

By the way, I already managed to create a patch module using the manual way instead of the automatic way with v1.5.
[Magisk] fOmey:
No errors tho... Weird.

Cool, glad the other method worked. Going to use you as a tester if you don't mind tho.

Are you running a deodexed rom ? Was the module you generated using the patcher active when you ran the test posted above?
[Magisk] kaniaen001:
helpme cant deodex

anyone can help my service jar?? [MENTION=1620550]fOmey[/MENTION]

i try use smali 1.7 still not work, i use methode patch jar adb

this my service jar pull system at my phone this original rom lenovo A7010a48 runing at marsmellow rom A7010a48_s232_161227_ROW

htt*ps://drive*google*com/open?id=1MXv-YyPcZU7lHzSCITv26cZ5z2cips5f
[Magisk] m.syam:
[MENTION=5818781]Eng.Raman[/MENTION]

Sir please patcher my another service jar

https://drive.google.com/file/d/1_v-8YFcVzG1yg3IxuwmLorCCDNKRHRNV/view?usp=drivesdk

Thx
[Magisk] s.i.t.h.l.o.r.d:
That's what happens to me when I try to use the ADB method. It starts out with an error message about build.prop, then pulls the files and crashes repeatedly.

OnePlus 5, OxygenOS 5.0.4, rooted through Magisk 16, default bootloader. Running your tool on Windows 10 Pro 64bit with latest updates, patches and hotfixes.

Attached is the folder structure as it looks after the tool force closed.

Please let me know how and what else I can provide to be of help.
[Magisk] fOmey:
You can dump the framework directory but not the build.prop ? Interesting... I'll sort out a fix for that tonight.

EDIT: Might of removed someone's post by mistake, sorry about that!

EDIT 2: [MENTION=6497801]s.i.t.h.l.o.r.d[/MENTION]

CHANGELOG ::

1.8 ::

Handle "permission denied" error when pulling build.prop.
[Magisk] kaniaen001:
help me fOmey patch my service.jar

help me [MENTION=1620550]fOmey[/MENTION] patch my service jar, im bit confuse about deodexing my rom lenovo A7010a48, i use original rom from lenovo

i try to deodex my service jar from your patch Jar using adb method, but unfortunatly still no luck :(

[IMG="ss error my pull adb patch"]https://drive.google.com/open?id=1S109itodFG0PDgnl41I8FXObek7XbWoZ[/IMG]

ttps://drive.google.com/open?id=1MXv-YyPcZU7lHzSCITv26cZ5z2cips5f

------ this my service jar please help me ------

thanks
[Magisk] s.i.t.h.l.o.r.d:
The good news:

the tool went through and did not force close on me.

The bad one:

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

Here's the full output:

fOmey @ XDA
Patcher Version: 0.0.1.8
* daemon not running. starting it now at tcp:5037 *
* daemon started successfully *
adb: error: failed to copy 'system/build.prop' to 'adb\build.prop': remote open failed: Permission denied
pull: building file list...
/system/framework/: 417 files pulled. 15.3 MB/s (267016688 bytes in 16.632s)
==> Dumped framework
==> Detected API: 00
==> Deodexed services.jar
==> Patched secure flag function
==> Patched secure flag boolean
==> Generated classes
I: Using Apktool 2.3.1 on services.jar
I: Copying assets and libs...
I: Copying unknown files...
I: Copying original files...
I: Using Apktool 2.3.1
I: Copying tmp classes.dex file...
I: Building apk file...
I: Copying unknown files/dir...
W: Could not find resources
==> Magisk template download complete
==> Generated magisk module zip file
*** Complete ***

To be honest, I do not wanna install the Magisk module until there are no errors anymore. Every single OTA since Christmas made me wipe my entire phone due to encryption errors, so I am sick of setting everything up from scratch.
[Magisk] fOmey:
Can you post the output of the adb method.. what error are you getting while using the adb method ?

That service.jar definitely needs to be deodexed.

That's not a error.. think of that like a warning.

If the patcher can't pull the build.prop it doesn't rely on it to gather info.. its fine. That was the entire point of the 1.8 update..

Beside if you ever bootloop from using a magisk module, just run the magisk uninstaller in recovery and reinstall magisk.. that will fix any bootloops. Don't need to wipe your rom..
[Magisk] rnadomuc:
Any chance of doing a build of the latest version with signature spoofing for Oreo? I'd like to see if it works for me. Dirty Unicorns does not have any support for it and I was interested in using NanoDroid.

I was looking into trying to patch the ROM but tools I tried required multiple dependencies and didn't work right. It was a huge pain and I don't know if it would've even worked had I gotten that far.
[Magisk] fOmey:
Few users have reported the patcher works on oreo, I personally don't own a oreo device so I can't confirm... give it a try!

As I said above just make sure you have the magiskuninstaller.zip on your sdcard if you get stuck in a boot loop just re-install magisk.
[Magisk] rnadomuc:
Wait, so you re-added the signature spoofer? IT says in the OP it is removed.
[Magisk] s.i.t.h.l.o.r.d:
I am one of the Oreo users. My phone's OxygenOS 5.0.4 equals Android 8.0.0
[Magisk] mik3see:
Any change to make a OSX version? Or Linux?

I don't have a windows box right now l, but wouldn't mind trying this.
[Magisk] fOmey:
Ah my bad.. misunderstood your questions.. no your right, signature spoofing has been removed for now.

Unfortunately not.. should run just fine in a virtual machine tho.
[Magisk] Kylenz:
Cant seen to make it work, the first method keep stuck on "dumping framework" and the second one gives an error of "services.jar must be deodexed".

Cant submit my services.jar since still doesnt have over 10 posts.
[Magisk] ARIF34:
Hi there brother. Eng.Raman

I have left the link and a message for you in your inbox. please see and help me brother again. thank you;)
[Magisk] toftof75:
Hello,

I took my "services.jar" (Samsung Galaxy Tab A6 sm-t285) and he says he is not deodexed. can you tell me how deodexed the services.jar.

thank you good day everyone
[Magisk] mik3see:
Yeah that's what I end up doing unfortunately my rom's (aosip) is not deodexed and I couldn't figure how to it...

It's Oreo so I wanted to test if it would work.

I might give it a try later with some other ROM (and not oreo)
[Magisk] Eng.Raman:
Welcome bro, see your inbox.
[Magisk] Kylenz:
Getting a bunch of errors when trying to patch using method #2 since ADB one keep stuck on "dumping framework"

fOmey @ XDA

Patcher Version: 0.0.1.8

I: Using Apktool 2.2.1 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.2.1

I: Checking whether sources has changed...

I: Smaling smali folder into classes.dex...

I: Building apk file...

W: Could not find resources

Exception in thread "main" brut.androlib.AndrolibException: brut.common.BrutException: could not exec: [aapt, p, -F, D:\Moto G5+ Toolkit-win32-ia32\tmp\dist\services.jar, -0, arsc, D:\Moto G5+ Toolkit-win32-ia32\tmp\build\apk]

at brut.androlib.res.AndrolibResources.aaptPackage(AndrolibResources.java:439)

at brut.androlib.Androlib.buildApk(Androlib.java:675)

at brut.androlib.Androlib.build(Androlib.java:315)

at brut.androlib.Androlib.build(Androlib.java:264)

at brut.apktool.Main.cmdBuild(Main.java:227)

at brut.apktool.Main.main(Main.java:84)

Caused by: brut.common.BrutException: could not exec: [aapt, p, -F, D:\Moto G5+ Toolkit-win32-ia32\tmp\dist\services.jar, -0, arsc, D:\Moto G5+ Toolkit-win32-ia32\tmp\build\apk]

at brut.util.OS.exec(OS.java:97)

at brut.androlib.res.AndrolibResources.aaptPackage(AndrolibResources.java:433)

... 5 more

Caused by: java.io.IOException: Cannot run program "aapt": CreateProcess error=2, El sistema no puede encontrar el archivo especificado

at java.base/java.lang.ProcessBuilder.start(Unknown Source)

at java.base/java.lang.ProcessBuilder.start(Unknown Source)

at brut.util.OS.exec(OS.java:90)

... 6 more

Caused by: java.io.IOException: CreateProcess error=2, El sistema no puede encontrar el archivo especificado

at java.base/java.lang.ProcessImpl.create(Native Method)

at java.base/java.lang.ProcessImpl.<init>(Unknown Source)

at java.base/java.lang.ProcessImpl.start(Unknown Source)

... 9 more

==> Magisk template download complete

==> Generated magisk module zip file

*** Complete ***

No feeling safe to bump that module
[Magisk] ARIF34:
Thank you so much brother. The patch is working fine. Thank again for helping.
[Magisk] TheUndertaker21:
fOmey @ XDA

Patcher Version: 0.0.1.8

==> Binary download complete

==> Unpacked binary.

I: Using Apktool 2.3.1 on services.jar

I: Baksmaling classes.dex...

I: Baksmaling classes2.dex...

I: Copying assets and libs...

I: Copying unknown files...

I: Copying original files...

==> Patched mock location boolean

==> Patched mock location boolean

==> Patched secure flag function

==> Patched secure flag boolean

==> Patched signature verification function

I: Using Apktool 2.3.1

I: Checking whether sources has changed...

I: Smaling smali folder into classes.dex...

I: Checking whether sources has changed...

I: Smaling smali_classes2 folder into classes2.dex...

I: Building apk file...

I: Copying unknown files/dir...

W: Could not find resources

==> Magisk template download complete

==> Generated magisk module zip file

*** Complete ***

doesn't seem like it's working. I need to disable the signature so i can install my mod apk on top of OG apk but it kept saying application not installed :(

the module was created. is this ok ? see the error above
[Magisk] MeNoNoob:
No, you have succeeded
[Magisk] TheUndertaker21:
thanks but the apk signature is not disabled it seems.

Edit : it's working thanks
[Magisk] fOmey:
Run the patcher groom the local hd - C:/

Failing to create the process not really related to the patcher more like the permissions on the PC.

If that doesn't work try running as administrator.
[Magisk] Kylenz:
Solve it, noticed that was using an outdated apktool, downloaded the most recent one and worked without any error.
[Magisk] baalajimaestro:
Does this work on a oreo 8.1 deodexed rom?
[Magisk] angelus_kun:
I cant make it work on android O 8.1 TnT module successfully created but dosent do nothing warning still appears when i try to take a screenshot of netflix :'(
[Magisk] Matu92:
I keep getting the following error....

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

Then the app just seems to hang and doesn't progress any further.

Any suggestions?

I'm using OnePlus 3T, running Open Beta 22 (Oreo).
[Magisk] fOmey:
No way of knowing unless you test it, some users reported success.. others not.

Netflix might use another method of detecting screenshots.. expecting the patch to provide 100% success rate with every app out there is unrealistic.

That isnt a error per se, the build.prop isnt required for the patch process..

Should begin dumping the framework after that step, when you say it hangs are you sure it's not dumping the framework ?
[Magisk] marcorua:
Hi!

One question: I'm only interested in playing pokemon go I just need to select "Mock locations". Do I have to select the 3 options? And now what's the best fake gps? I'm warning you to be banned from Pokemon go
[Magisk] RieTech:
Error occurred during initialization of VM

Could not reserve enough space for object heap

!!! ERROR: Target JAR must be deodexed.

want to try but got this, took service.jar from LineageOS 14.1 but get need deodexed, any clue?
[Magisk] februarysn0w:
Hi, I'm using your patch from the first release. Thank you so much for your hard work. And now I have a problem to deodex services.jar.

I have oneplus 5T and oxygen beta 4. (8.1) got a error like this.

Error code

Spoiler content hidden.

It's looks like not your software fault, but I do not have any good idea to solve this. Could you please kindly help me.

Thank you
[Magisk] Matu92:
Yeah I'm fairly certain, after that message it says dumping framework on the bottom left of the application. But I left it for 20 minutes and still nothing happened.

Unless I'm being impatient? ;)
[Magisk] Flint2:
Error in baksmali

Same happens when doing it from command line:

C:\temp\system\framework>java -jar ..\..\baksmali-2.2.2.jar x oat\arm64\services.odex -d arm64 -o tmp
Exception in thread "main" java.lang.ArrayIndexOutOfBoundsException: 1890213960
at org.jf.dexlib2.dexbacked.BaseDexBuffer.readSmallUint(BaseDexBuffer.java:53)
at org.jf.dexlib2.dexbacked.OatFile$DexEntryIterator.next(OatFile.java:579)
at org.jf.dexlib2.dexbacked.OatFile$DexEntryIterator.next(OatFile.java:570)
at com.google.common.collect.TransformedIterator.next(TransformedIterator.java:48)
at org.jf.util.AbstractForwardSequentialList$1.next(AbstractForwardSequentialList.java:91)
at java.util.AbstractSequentialList.get(Unknown Source)
at org.jf.dexlib2.DexFileFactory.loadDexFile(DexFileFactory.java:129)
at org.jf.baksmali.DexInputCommand.loadDexFile(DexInputCommand.java:144)
at org.jf.baksmali.DisassembleCommand.run(DisassembleCommand.java:161)
at org.jf.baksmali.Main.main(Main.java:102)

ROM: OnePlus5TOxygen_43_OTA_007_all_1803102230_3b07f91fdc45b.zip (OnePlus 5T OOS OB4) Android Oreo 8.1

Maybe we need to wait for new baksmali version for 8.1 ....

EDIT: Same issue with baksmali 2.2.3 , just cloned and built from https://github.com/JesusFreke/smali

Losing hope on 8.1 :(
[Magisk] fOmey:
That's right.

"Could not reserve enough space for object heap" - your PC is either running out of RAM or storage space... it's time for a clean up!

Known issue with baksmali - you guy's are running the bleeding edge.. developers are trying to play catch up!

https://github.com/JesusFreke/smali/issues/579

Depend's how slow your PC is.. haha if it doesn't spit out an error assume it's still working.

Or it could be the patcher spazzing out.. no idea - can't help without a error of some kind tho.. :p