worawit / blutter

Flutter Mobile Application Reverse Engineering Tool
MIT License
752 stars 128 forks source link

MacOS tool is not working #44

Open Pavel401 opened 4 months ago

Pavel401 commented 4 months ago

Hi, I have installed all the required dependencies mentioned in the readme file. However, when I run the tool, it shows an error that I am unable to debug. I need some help with this.

error :

blutter.py /Users/pavel/Documents/blutter/lib/arm64-v8a build\vs --vs-sln Dart version: 3.1.5, Snapshot: 85db978ceb98b8ae97a75e17b3bdc693, Target: android arm64 flags: product no-code_comments dwarf_stack_traces_mode no-lazy_dispatchers dedup_instructions no-asserts arm64 android compressed-pointers null-safety CMake Error at /opt/homebrew/Cellar/cmake/3.28.3/share/cmake/Modules/FindPackageHandleStandardArgs.cmake:230 (message): Failed to find all ICU components (missing: ICU_LIBRARY _ICU_REQUIRED_LIBS_FOUND) (found version "72.1") Call Stack (most recent call first): /opt/homebrew/Cellar/cmake/3.28.3/share/cmake/Modules/FindPackageHandleStandardArgs.cmake:600 (_FPHSA_FAILURE_MESSAGE) /opt/homebrew/Cellar/cmake/3.28.3/share/cmake/Modules/FindICU.cmake:333 (FIND_PACKAGE_HANDLE_STANDARD_ARGS) CMakeLists.txt:20 (find_package)

-- Configuring incomplete, errors occurred! Traceback (most recent call last): File "/Users/pavel/Documents/blutter/blutter.py", line 168, in main(args.indir, args.outdir, args.rebuild, args.vs_sln, args.no_analysis) File "/Users/pavel/Documents/blutter/blutter.py", line 130, in main fetch_and_build(dart_version, arch, os_name, has_compressed_ptrs, snapshot_hash) File "/Users/pavel/Documents/blutter/dartvm_fetch_build.py", line 120, in fetch_and_build cmake_dart(ver, arch, os_name, has_compressed_ptrs, outdir) File "/Users/pavel/Documents/blutter/dartvm_fetch_build.py", line 110, in cmake_dart subprocess.run([CMAKE_CMD, '-GNinja', '-B', builddir, f'-DTARGET_OS={os_name}', f'-DTARGET_ARCH={arch}', ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/Users/pavel/anaconda3/lib/python3.11/subprocess.py", line 571, in run raise CalledProcessError(retcode, process.args, subprocess.CalledProcessError: Command '['cmake', '-GNinja', '-B', '/Users/pavel/Documents/blutter/build/dartvm3.1.5_android_arm64', '-DTARGET_OS=android', '-DTARGET_ARCH=arm64', '-DCOMPRESSED_PTRS=1', '-DCMAKE_BUILD_TYPE=Release', '--log-level=NOTICE']' returned non-zero exit status 1.

worawit commented 4 months ago

I guess the issue cause is HOMEBREW_PREFIX environment (in current CMakeLists.txt) is used for finding ICU library. I will fix this issue when I get my hand on macbook.

You can workaround by export HOMEBREW_PREFIX=$(brew --prefix) and remove build directory. The, run the command again.

worawit commented 4 months ago

In latest commit, it should work without setting HOMEBREW_PREFIX environment.

If an error still occur, try deleting "build" directory first.

Pavel401 commented 4 months ago

Thanks @worawit