Skip to content

Conversation

@Xplo8E
Copy link

@Xplo8E Xplo8E commented Dec 9, 2025

This commit addresses multiple issues with iOS device handling and library compilation in KnoxSpy:

  1. iOS Spawn Fix (fridamanager.ts)

    • Fix iOS app spawn failure caused by passing invalid uid option
    • iOS doesn't support multi-user like Android, so spawn options now check platform before adding uid parameter
    • Only pass uid for Android devices when user is not -1
    • Updated misleading log message about "attach instead"
  2. Library Compilation (server.ts)

    • Add npm install step before frida-compile to ensure @types/frida-gum and other dependencies are available
    • Use --ignore-scripts flag to skip environment-specific prepare/build hooks that may reference unavailable commands (like fridaenv)
    • Fixes "Cannot find namespace 'ObjC'" TypeScript compilation errors
  3. Platform-Based Library Filtering (websocket.ts)

    • Add platform filtering to library list handler
    • Normalize "iPhone OS" to "iOS" for consistent matching
    • Backend now filters libraries by platform when requested, ensuring only compatible libraries are shown for each device
  4. Frida Script Console Logging (repl.ts)

    • Add logHandler to capture console.log/warn/error from Frida scripts
    • Forward script logs to server console with [Frida Script LEVEL] prefix
    • Broadcast script logs to frontend via WebSocket (action: "script.log")
    • Enables real-time debugging and visibility into script execution

These changes enable successful iOS app spawning, proper library compilation from uploaded ZIP files, and better debugging capabilities for Frida scripts.

This commit addresses multiple issues with iOS device handling and library
compilation in KnoxSpy:

1. iOS Spawn Fix (fridamanager.ts)
   - Fix iOS app spawn failure caused by passing invalid `uid` option
   - iOS doesn't support multi-user like Android, so spawn options now
     check platform before adding uid parameter
   - Only pass uid for Android devices when user is not -1
   - Updated misleading log message about "attach instead"

2. Library Compilation (server.ts)
   - Add npm install step before frida-compile to ensure @types/frida-gum
     and other dependencies are available
   - Use --ignore-scripts flag to skip environment-specific prepare/build
     hooks that may reference unavailable commands (like fridaenv)
   - Fixes "Cannot find namespace 'ObjC'" TypeScript compilation errors

3. Platform-Based Library Filtering (websocket.ts)
   - Add platform filtering to library list handler
   - Normalize "iPhone OS" to "iOS" for consistent matching
   - Backend now filters libraries by platform when requested, ensuring
     only compatible libraries are shown for each device

4. Frida Script Console Logging (repl.ts)
   - Add logHandler to capture console.log/warn/error from Frida scripts
   - Forward script logs to server console with [Frida Script LEVEL] prefix
   - Broadcast script logs to frontend via WebSocket (action: "script.log")
   - Enables real-time debugging and visibility into script execution

These changes enable successful iOS app spawning, proper library compilation
from uploaded ZIP files, and better debugging capabilities for Frida scripts.
@Xplo8E Xplo8E requested a review from ajay-appknox December 9, 2025 07:38
…ling

- Add null check for activeRepeaterData in HTTPTraffic.vue
- Reuse existing Frida session in repeater replay (websocket.ts)
- Handle binary/ZIP responses in iOS_makeAPIRequest.js
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

Successfully merging this pull request may close these issues.

2 participants