ViRb3/magisk-frida

Make use of Strong-Frida

Azulath opened this issue ยท 8 comments

In order to avoid Frida being detected by various applications it would be beneficial if the following could be integrated:
https://github.com/feicong/strong-frida

I didn't want to create a separate, maybe related issue but I cloned the repository and wanted to adjust the URLs to point to strong-frida but now I'm getting the following error:

Last frida tag: v1.13
Last project tag: 15.0.10-1
Last commit tag: 15.0.10-1
Update needed to v1.13-1
MainThread : Creating module
arm : Filling module for arch 'arm'
arm : Downloading 'frida-server-v1.13-android-arm.xz' to '/Users/user/magisk-frida/downloads/frida-server-v1.13-android-arm.xz'
arm : Extracting 'frida-server-v1.13-android-arm.xz' to 'frida-server-arm'
arm64 : Filling module for arch 'arm64'
arm64 : Downloading 'frida-server-v1.13-android-arm64.xz' to '/Users/user/magisk-frida/downloads/frida-server-v1.13-android-arm64.xz'
arm64 : Extracting 'frida-server-v1.13-android-arm64.xz' to 'frida-server-arm64'
x86 : Filling module for arch 'x86'
x86 : Downloading 'frida-server-v1.13-android-x86.xz' to '/Users/user/magisk-frida/downloads/frida-server-v1.13-android-x86.xz'
x86 : Extracting 'frida-server-v1.13-android-x86.xz' to 'frida-server-x86'
concurrent.futures.process._RemoteTraceback: 
"""
Traceback (most recent call last):
  File "/Users/user/homebrew/Cellar/python@3.9/3.9.6/Frameworks/Python.framework/Versions/3.9/lib/python3.9/concurrent/futures/process.py", line 243, in _process_worker
    r = call_item.fn(*call_item.args, **call_item.kwargs)
  File "/Users/user/magisk-frida/build.py", line 87, in fill_module
    extract_file(frida_server_path, files_dir.joinpath(f"frida-server-{arch}"))
  File "/Users/user/magisk-frida/build.py", line 45, in extract_file
    file_content = f.read()
  File "/Users/user/homebrew/Cellar/python@3.9/3.9.6/Frameworks/Python.framework/Versions/3.9/lib/python3.9/lzma.py", line 200, in read
    return self._buffer.read(size)
  File "/Users/user/homebrew/Cellar/python@3.9/3.9.6/Frameworks/Python.framework/Versions/3.9/lib/python3.9/_compression.py", line 103, in read
    data = self._decompressor.decompress(rawblock, size)
_lzma.LZMAError: Input format not supported by decoder
"""

The above exception was the direct cause of the following exception:

x86_64 : Filling module for arch 'x86_64'
x86_64 : Downloading 'frida-server-v1.13-android-x86_64.xz' to '/Users/user/magisk-frida/downloads/frida-server-v1.13-android-x86_64.xz'
Traceback (most recent call last):
  File "/Users/user/magisk-frida/main.py", line 45, in <module>
x86_64 : Extracting 'frida-server-v1.13-android-x86_64.xz' to 'frida-server-x86_64'
    main()
  File "/Users/user/magisk-frida/main.py", line 41, in main
    build.do_build(last_frida_tag, new_project_tag)
  File "/Users/user/magisk-frida/build.py", line 118, in do_build
    raise future.exception()
_lzma.LZMAError: Input format not supported by decoder
ViRb3 commented

That's a very interesting project, thanks for linking it. I don't know why the build script is failing for you, I will have to look into it. I am a bit busy now, but I will try to incorporate the project you referenced in a Magisk module somehow.

In any case, I would create another module magisk-strong-frida to avoid more problems

ViRb3 commented

I was more considering to release two zips every update, especially since the Magisk repo is discontinued and this will the the official module channel. Should be trivial. The link to strong Frida is dead btw.

There's another repo that uses Actions to patch and compile "strong" Frida: https://github.com/hzzheyang/strongR-frida-android

Hello, this is not Magisk related, but how to get frida and frida-tools working with strongR-frida-android server versions on client side?

Traceback (most recent call last):
  File "xxxxxxx.py", line xxx, in <module>
    pid = device.spawn(["xxxxxxxxxxxx"])
  File "C:\Python37\lib\site-packages\frida\core.py", line 86, in wrapper
    return f(*args, **kwargs)
  File "C:\Python37\lib\site-packages\frida\core.py", line 968, in spawn
    return self._impl.spawn(program, **kwargs)
frida.InvalidArgumentError: undefined symbol: main`

I also had the same issue but I couldn't find solution for it :(

There's another repo that uses Actions to patch and compile "strong" Frida: hzzheyang/strongR-frida-android

I've created a fork for it.
https://github.com/MicroCBer/magisk-strongR-frida