Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Why Is IOReportCreateSubscription Always Empty on iPhone 12? #1

Open
FlymeToTheMoonIn2012 opened this issue Nov 12, 2021 · 5 comments

Comments

@FlymeToTheMoonIn2012
Copy link

Hi,your project has been very helpful to me.
And I have a problem,why does IOReportCreateSubscription function always return an empty value on iPhone12?And the iPhone11 is ok!

@freedomtan
Copy link
Owner

No idea. To use IOReport, it seems you need root privilege or you have to disable amfi amfi_get_out_of_my_way=1 on iOS. I don't have access to either jailbroken iPhone 11 or 12 :-)

@badger200
Copy link

badger200 commented Apr 25, 2023

I was able to get it to work!! dmesg revealed this:
System Policy: test_ioreport(7145) deny(1) iokit-open IOReportUserClient The key is signing the binary with this entitlement:


    <key>com.apple.security.iokit-user-client-class</key>
        <array>
                <string>IOUserClient</string>
        </array>
        <key>com.apple.security.iokit-open</key>
        <true/>

unfortunately since it uses NSLog I can’t pipe the output to text to share it here.

iPad Pro A12X iPad8,4
iOS 14.4
Unc0ver 8.0.2

@ghostsun89
Copy link

Hi @badger200 , when I ran the test_ioreport binary on the iPhone13, it caused the following error:

iPhone-13:/var/tmp/test root# ./test_ioreport 
dyld[861]: Library not loaded: /usr/lib/libIOReport.dylib
  Referenced from: /private/var/tmp/test/test_ioreport
  Reason: tried: '/usr/lib/libIOReport.dylib' (wrong platform to load into process)
Abort trap: 6

How can I find libIOReport.dylib? Or Is there anything wrong with the way I compiled it?
Do you have any idea about the question? Thanks.

@freedomtan
Copy link
Owner

freedomtan commented Aug 24, 2023

Hi @badger200 , when I ran the test_ioreport binary on the iPhone13, it caused the following error:

iPhone-13:/var/tmp/test root# ./test_ioreport 
dyld[861]: Library not loaded: /usr/lib/libIOReport.dylib
  Referenced from: /private/var/tmp/test/test_ioreport
  Reason: tried: '/usr/lib/libIOReport.dylib' (wrong platform to load into process)
Abort trap: 6

How can I find libIOReport.dylib? Or Is there anything wrong with the way I compiled it? Do you have any idea about the question? Thanks.

in your messages,

...
Reason: tried: '/usr/lib/libIOReport.dylib' (wrong platform to load into process)
...

Please make sure that you build the binary with iOS SDK and choose the right archicture (arm64e?)

@ghostsun89
Copy link

@freedomtan Many thanks for your advise! I upgrade the compile tools version and choose the arm64e arch. Now it works!

iPhone-13:/var/tmp/test root# ./test_ioreport 
2023-08-24 13:59:39.092 test_ioreport[926:119538] subscribed: {
    IOReportChannels =     (
                {
            DriverID = 4294967804;
            DriverName = "baseband <id 0x1000001fc>";
            IOReportChannelInfo =             {
                IOReportChannelUnit = 0;
            };
            IOReportGroupName = "Interrupt Statistics (by index)";
            IOReportSubGroupName = "baseband 0";
            LegendChannel =             (
                5291294645182005248,
                4295098369,
                "               First Level Interrupt Handler Count"
            );
      ...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants