Skip to content

FuncationHook != %hookf ??? #44

@be-huge

Description

@be-huge

I’m very sorry, I can’t see where the problem is. After bridging, Swift can indeed call the CTCellularDataPlanSetIsEnabled method directly, but when hooking it, the system immediately enters Safe Mode.

logos,perfect:

void CTCellularDataPlanSetIsEnabled(Boolean en);
%hookf(void, CTCellularDataPlanSetIsEnabled, Boolean enabled) {
   %orig(enabled);
}

Orion,safemode:

class CTCellularDataPlanSetIsEnabledHook: FunctionHook {
  static let target = Function.symbol("CTCellularDataPlanSetIsEnabled", image: nil);

  func function(_ ioHIDClient: Bool) {
    orig.function(ioHIDClient);
  }
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions