Open seyaobey-dev opened 2 years ago
@seyaobey-dev many thanks for reaching out.
That doesn't seem the path to the idb binary. On macOS, can you please execute this on the terminal:
which idb
That'll print out the path to idb. Copy the value and set it into Flipper -> Settings.
For example, this is a valid path for idb:
/usr/local/bin/idb
@Iblasa thank you so much for your answer. Here is the output of the command which idb
:
/Library/Frameworks/Python.framework/Versions/3.10/bin/idb
Also which pip3
returns:
/Library/Frameworks/Python.framework/Versions/3.10/bin/pip3
Please make sure the IDB setting ends with /idb
and restart Flipper. Is the file readable by flipper and executable? use ll /Library/Frameworks/Python.framework/Versions/3.10/bin/idb
to verify
@seyaobey-dev what was your steps installing idb on you mac? I'm kinda lost in the "make sure to install everything through homebrew" on m1 mac to keep stuff working.
For me
brew tap facebook/fb brew install idb-companion
fails with
==> Installing facebook/fb/idb-companion
==> pod install
==> ./idb_build.sh idb_companion build /opt/homebrew/Cellar/idb-companion/1.1.5
Last 15 lines from /Users/*****/Library/Logs/Homebrew/idb-companion/02.idb_build.sh:
'
/bin/sh: line 3: protoc: command not found
cp: /tmp/idb-companion-20211217-90921-1qolsbx/idb-1.1.5/build/Build/Intermediates.noindex/idb_companion.build/Debug/idbGRPC.build/DerivedSources/*.h: No such file or directory
Command RuleScriptExecution failed with a nonzero exit code
WriteAuxiliaryFile /tmp/idb-companion-20211217-90921-1qolsbx/idb-1.1.5/build/Build/Intermediates.noindex/idb_companion.build/Debug/idbGRPC.build/Objects-normal/arm64/idbGRPC.LinkFileList (in target 'idbGRPC' from project 'idb_companion')
cd /tmp/idb-companion-20211217-90921-1qolsbx/idb-1.1.5
write-file /tmp/idb-companion-20211217-90921-1qolsbx/idb-1.1.5/build/Build/Intermediates.noindex/idb_companion.build/Debug/idbGRPC.build/Objects-normal/arm64/idbGRPC.LinkFileList
** BUILD FAILED **
And i'm kinda lost at here.
EDIT:
activated a few more braincells, tried to brew install protobuf
, now it fails with another error
Last 15 lines from /Users/dseb/Library/Logs/Homebrew/idb-companion/02.idb_build.sh:
Libtool /tmp/idb-companion-20211217-48935-1gibx8q/idb-1.1.5/build/Build/Products/Debug/libPods-idb_companion.a normal (in target 'Pods-idb_companion' from project 'Pods')
cd /tmp/idb-companion-20211217-48935-1gibx8q/idb-1.1.5/Pods
export MACOSX_DEPLOYMENT_TARGET\=10.14
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/libtool -static -arch_only arm64 -D -syslibroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX12.0.sdk -L/tmp/idb-companion-20211217-48935-1gibx8q/idb-1.1.5/build/Build/Products/Debug -L/tmp/idb-companion-20211217-48935-1gibx8q/idb-1.1.5/build/Build/Products/Debug/BoringSSL-GRPC -L/tmp/idb-companion-20211217-48935-1gibx8q/idb-1.1.5/build/Build/Products/Debug/Protobuf-C++ -L/tmp/idb-companion-20211217-48935-1gibx8q/idb-1.1.5/build/Build/Products/Debug/abseil -L/tmp/idb-companion-20211217-48935-1gibx8q/idb-1.1.5/build/Build/Products/Debug/gRPC-C++ -L/tmp/idb-companion-20211217-48935-1gibx8q/idb-1.1.5/build/Build/Products/Debug/gRPC-Core -filelist /tmp/idb-companion-20211217-48935-1gibx8q/idb-1.1.5/build/Build/Intermediates.noindex/Pods.build/Debug/Pods-idb_companion.build/Objects-normal/arm64/Pods-idb_companion.LinkFileList -dependency_info /tmp/idb-companion-20211217-48935-1gibx8q/idb-1.1.5/build/Build/Intermediates.noindex/Pods.build/Debug/Pods-idb_companion.build/Objects-normal/arm64/Pods-idb_companion_libtool_dependency_info.dat -o /tmp/idb-companion-20211217-48935-1gibx8q/idb-1.1.5/build/Build/Products/Debug/libPods-idb_companion.a
Ld /tmp/idb-companion-20211217-48935-1gibx8q/idb-1.1.5/build/Build/Products/Debug/FBControlCore.framework/Versions/A/FBControlCore normal (in target 'FBControlCore' from project 'FBSimulatorControl')
cd /tmp/idb-companion-20211217-48935-1gibx8q/idb-1.1.5
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang -target arm64-apple-macos10.14 -dynamiclib -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX12.0.sdk -L/tmp/idb-companion-20211217-48935-1gibx8q/idb-1.1.5/build/Build/Products/Debug -F/tmp/idb-companion-20211217-48935-1gibx8q/idb-1.1.5/build/Build/Products/Debug -F/Applications/Xcode.app/Contents/Developer/../Frameworks -F/Applications/Xcode.app/Contents/Developer/../PlugIns -F/Applications/Xcode.app/Contents/Developer/../OtherFrameworks -F/Applications/Xcode.app/Contents/Developer/../SharedFrameworks -F/Applications/Xcode.app/Contents/Developer/Library/PrivateFrameworks -F/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX12.0.sdk/System/Library/PrivateFrameworks -F/Library/Developer/PrivateFrameworks -filelist /tmp/idb-companion-20211217-48935-1gibx8q/idb-1.1.5/build/Build/Intermediates.noindex/FBSimulatorControl.build/Debug/FBControlCore.build/Objects-normal/arm64/FBControlCore.LinkFileList -install_name @rpath/FBControlCore.framework/Versions/A/FBControlCore -Xlinker -rpath -Xlinker @executable_path -Xlinker -rpath -Xlinker @loader_path/Frameworks -Xlinker -object_path_lto -Xlinker /tmp/idb-companion-20211217-48935-1gibx8q/idb-1.1.5/build/Build/Intermediates.noindex/FBSimulatorControl.build/Debug/FBControlCore.build/Objects-normal/arm64/FBControlCore_lto.o -Xlinker -export_dynamic -Xlinker -no_deduplicate -fobjc-arc -fobjc-link-runtime -framework Foundation -framework Cocoa -framework CoreGraphics -framework ServiceManagement -framework CoreMedia -Xlinker -no_adhoc_codesign -compatibility_version 1 -current_version 1 -Xlinker -dependency_info -Xlinker /tmp/idb-companion-20211217-48935-1gibx8q/idb-1.1.5/build/Build/Intermediates.noindex/FBSimulatorControl.build/Debug/FBControlCore.build/Objects-normal/arm64/FBControlCore_dependency_info.dat -o /tmp/idb-companion-20211217-48935-1gibx8q/idb-1.1.5/build/Build/Products/Debug/FBControlCore.framework/Versions/A/FBControlCore
** BUILD FAILED **
The following build commands failed:
RuleScriptExecution /tmp/idb-companion-20211217-48935-1gibx8q/idb-1.1.5/build/Build/Intermediates.noindex/idb_companion.build/Debug/idbGRPC.build/DerivedSources/idb.pb.h /tmp/idb-companion-20211217-48935-1gibx8q/idb-1.1.5/build/Build/Intermediates.noindex/idb_companion.build/Debug/idbGRPC.build/DerivedSources/idb.pb.cc /tmp/idb-companion-20211217-48935-1gibx8q/idb-1.1.5/build/Build/Intermediates.noindex/idb_companion.build/Debug/idbGRPC.build/DerivedSources/idb.grpc.pb.h /tmp/idb-companion-20211217-48935-1gibx8q/idb-1.1.5/build/Build/Intermediates.noindex/idb_companion.build/Debug/idbGRPC.build/DerivedSources/idb.grpc.pb.cc /tmp/idb-companion-20211217-48935-1gibx8q/idb-1.1.5/proto/idb.proto normal arm64 (in target 'idbGRPC' from project 'idb_companion')
(1 failure)
which is kinda dead-end for me since not even an error message is present.
It seems that idb is not installed in this path /usr/local/bin/idb when using this command: pip3.10 install fb-idb Maybe pip3.6 accordingly to the documentation doesn't install in the same way..
I am using python 3.10
I moved idb from /Library/Frameworks/Python.framework/Versions/3.10/bin
to /usr/local/bin
Now after giving idb location as /usr/local/bin/idb
is flipper settings, idb is getting detected properly.
You should not have to move anything...
If idb is accessible from your $PATH it should be used and not be hard coded to /usr/local/bin/idb
...
Have absolutely the same issue, except cp /Library/Frameworks/Python.framework/Versions/3.10/bin/idb /usr/local/bin
doesn't help
idb
installed with python is not a binary but python's shell script.
#!/Library/Frameworks/Python.framework/Versions/3.10/bin/python3.10
# -*- coding: utf-8 -*-
import re
import sys
from idb.cli.main import main
if __name__ == '__main__':
sys.argv[0] = re.sub(r'(-script\.pyw|\.exe)?$', '', sys.argv[0])
sys.exit(main())
Temporary workaround:
pip install pyinstaller
pyinstaller -F `which idb`
sudo mv ./dist/idb /usr/local/bin/idb
This will create real executable file from python script, which may be used by flipper.
You may also need sudo cp /opt/homebrew/bin/idb_companion /usr/local/bin/idb_companion
@mweststrate could you update installation steps for new python versions?
I was heaving the same error, and the @gavrilikhin-d solution works for me. But the Flipper still don't recognize my ios device and I can't debug my application. Anyone having the same error? Note: "No Application Selected" is the error I'm getting here.
I spent a lot of time troubleshooting this myself. Turns out all I had to do was go into the Flipper settings, and change the "IDB binary location" to match the location given when you run which idb
In my case I had to change the location to "/Users/my-username/.pyenv/idb"
With the amount of people that report having issues with installing idb to use Flipper, it blows my mind that this solution isn't included anywhere in the Flipper Installation guide.
Again, if it's in your PATH nothing should be added in the documentation and it should work properly.
Again, if it's in your PATH nothing should be added in the documentation and it should work properly.
At first i was unable to get idb
in my path using the default instructions. I needed to run both
pip3 uninstall fb-idb
sudo pip3 install fb-idb
Based off of https://github.com/facebook/idb/issues/620
I'd prefer not to run this command as sudo
but not sure of another workaround atm.
WARNING: The directory '/Users/seandunford/Library/Caches/pip' or its parent directory is not owned or is not writable by the current user. The cache has been disabled. Check the permissions and owner of that directory. If executing pip with sudo, you should use sudo's -H flag.
Collecting fb-idb
Downloading fb_idb-1.1.7-py3-none-any.whl (149 kB)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 149.7/149.7 kB 4.3 MB/s eta 0:00:00
Requirement already satisfied: aiofiles in /usr/local/lib/python3.11/site-packages (from fb-idb) (23.2.1)
Requirement already satisfied: grpclib>=0.4.0 in /usr/local/lib/python3.11/site-packages (from fb-idb) (0.4.6)
Requirement already satisfied: protobuf in /usr/local/lib/python3.11/site-packages (from fb-idb) (4.21.12)
Requirement already satisfied: treelib in /usr/local/lib/python3.11/site-packages (from fb-idb) (1.7.0)
Requirement already satisfied: h2<5,>=3.1.0 in /usr/local/lib/python3.11/site-packages (from grpclib>=0.4.0->fb-idb) (4.1.0)
Requirement already satisfied: multidict in /usr/local/lib/python3.11/site-packages (from grpclib>=0.4.0->fb-idb) (6.0.4)
Requirement already satisfied: six in /usr/local/lib/python3.11/site-packages (from treelib->fb-idb) (1.16.0)
Requirement already satisfied: hyperframe<7,>=6.0 in /usr/local/lib/python3.11/site-packages (from h2<5,>=3.1.0->grpclib>=0.4.0->fb-idb) (6.0.1)
Requirement already satisfied: hpack<5,>=4.0 in /usr/local/lib/python3.11/site-packages (from h2<5,>=3.1.0->grpclib>=0.4.0->fb-idb) (4.0.0)
Installing collected packages: fb-idb
Successfully installed fb-idb-1.1.7
WARNING: Running pip as the 'root' user can result in broken permissions and conflicting behaviour with the system package manager. It is recommended to use a virtual environment instead: https://pip.pypa.io/warnings/venv
Installing with sudo
did add to my path and flipper worked correctly after that.
I just created a symbolic link to the current path, so I can keep it under homebrew:
~ which idb -> /opt/homebrew/bin/idb
Then I did this:
ln -s /opt/homebrew/bin/idb /usr/local/bin/idb
Done =)
ln -s /opt/homebrew/bin/idb /usr/local/bin/idb
This worked for me...
Thanks!
Once again asking devs to add a section in the troubleshooting docs about this because this is a common issue. Linking to the idb docs that link to non-existent pip install docs isn't very intuitive.
I used /Users/$user/Library/Python/3.9/bin/idb
and it works for me
Not working
🐛 Bug Report
Apologies, this may not be a bug per se but I could not find any forum or other place where I can find help. This is the first time for me using Flipper. After having followed the instructions, I was able to install Flipper on my Macbook air M1 (2020) Monterey. When I open "Setup Doctor", everything is green except a warning with IDB:
I followed the instructions on this repository and also on facebook IDB page.
To Reproduce
Install Flipper according to instructions Install facebook IDB companion and client
Environment
OS: MacOS Monterey 12.0.1, Chip Apple M1 Flipper version: 0.123.0 (50.0.0) Android Studio Artic Fox 2020.3.1 Patch 3 XCode 13.2 beta 2