IP Library Granted Patent US 9,483,283
Granted Patent B1
US 9,483,283 · App. 14/945,938 · Granted Nov 1, 2016

Enhanced code callback

View Patent ↗
Loading inventors, assignments & file history…
Monitor This Case
Get email alerts when status or documents change.
Order Certified Copies
Most orders are placed with the USPTO same day — all within 24 business hours.
Order via The Patent Place →
Pre-filled with this patent's details
Quick Facts
Patent No.
US 9,483,283
App. No.
14/945,938
Granted
Nov 1, 2016
Kind
B1
Abstract

Implementations are disclosed herein for enhancing swizzling technology. In at least one implementation, functions are hooked by modifying their machine code implementations to jump to a central callback function. The central callback function may then route to other target functions that serve to replace the hooked functions. In another implementation, the machine code implementations are modified to jump to intermediate functions. The intermediate functions invoke dispatch functions that can call into a central callback function. The central callback function may return to the hooked functions.

Claims (36)

1. An apparatus comprising:

one or more non-transitory computer readable storage media; and

program instructions stored on the one or more computer readable storage media, wherein the program instructions comprise a callback function that, when executed by a processing system in an application runtime environment, direct the processing system to at least:

identify an original function modified post-compilation to hook into a Java Native Interface (JNI) stub that calls into the callback function;

store an identity of the original function and identify a path for returning to the original function based on the identity of the original function;

identify a target function to run in-place of the original function and call into the target function; and

upon the target function completing, return to the original function, wherein the return is made such that the original function, and a program, routine, or application that it is a part of, continues to run normally.

2. The apparatus of claim 1 further comprising the processing system operatively coupled to the one or more computer readable storage media, wherein the processing system reads and executes the program instructions.

3. A method comprising:

modifying machine code representative of multiple original functions to hook into a Java Native Interface (JNI) stub that jumps into a single callback function when any of the multiple original functions are invoked;

tracking which original function of the multiple original functions jumped to the callback function when the callback function is called;

storing an identity of the original function that jumped to the callback function and identifying a path back to the original function based on the identity of the original function;

identifying which target function of multiple target functions to call into in response to the original function jumping to the callback function and calling the target function; and

when the target function returns to the callback function, return to the original function via the path, wherein the return is made such that the original function, and a program, routine, or application that it is a part of, continues to run normally.

4. An apparatus comprising:

one or more non-transitory computer readable storage media;

a processing system operatively coupled with the one or more computer readable storage media; and

program instructions stored on the one or more computer readable storage media that, when executed by the processing system, direct the processing system to at least:

modify machine code representative of multiple original functions to jump into trampoline functions when the multiple original functions are invoked;

when an original function of the multiple original functions is invoked, jump into a trampoline function to determine if the original function hooks into a Java Native Interface (JNI) stub that jumps into a callback function;

when the original function hooks into the JNI stub, store an identity of the original function that is invoked, identify a path for returning to the original function based on the identity of the original function, and execute a call dispatch function associated with the JNI stub to dispatch to a callback function with associated arguments/parameters;

identify a target function to execute in-place of the original function and call into the target function; and

upon the target function completing, return to the original function, wherein the return is made such that the original function, and a program, routine, or application that it is a part of, continues to run normally.

5. The apparatus of claim 1 , wherein the application runtime environment comprises Android Runtime (ART).

6. The apparatus of claim 1 , wherein the identity of the original function comprises one or more of a function name or one or more variables, arguments, or parameters associated with the function.

7. The apparatus of claim 1 , wherein the target function comprises a copy of the original function prior to modifications to hook into the JNI stub.

8. The apparatus of claim 1 , wherein the original function is modified post-compilation to hook into the JNI stub by, in part, marking the original function as native.

9. The method of claim 3 , wherein the identity of the original function comprises one or more of a function name or one or more variables, arguments, or parameters associated with the function.

10. The method of claim 3 , wherein the target function comprises a copy of the original function prior to modifications to hook into the JNI stub.

11. The method of claim 3 , wherein the original function is modified post-compilation to hook into the JNI stub by, in part, marking the original function as native.

12. The apparatus of claim 4 , wherein the dispatch function comprises a C++ function that corresponds to an argument pattern associated with the original function.

13. The apparatus of claim 4 , wherein the program instructions are executed by the processing system in an application runtime environment.

14. The apparatus of claim 13 , wherein the application runtime environment comprises Android Runtime (ART).

15. The apparatus of claim 4 , wherein the identity of the original function comprises one or more of a function name or one or more variables, arguments, or parameters associated with the function.

16. The apparatus of claim 4 , wherein the target function comprises a copy of the original function prior to modifications to hook into the JNI stub.

17. The apparatus of claim 4 , wherein the original functions are modified post-compilation to hook into the JNI stub by, in part, marking the original functions as native.

Assignments (6)
SECURITY INTEREST Recorded Jul 1, 2024
From: AIRSHIP GROUP, INC.; APPTIMIZE, LLC
To: RUNWAY GROWTH FINANCE CORP.
Reel/Frame 068099/0779 →
RELEASE OF SECURITY INTEREST Recorded Jun 28, 2024
From: WELLS FARGO BANK, NATIONAL ASSOCIATION
To: AIRSHIP GROUP, INC.; APPTIMIZE, LLC
Reel/Frame 067965/0545 →
CORRECTIVE ASSIGNMENT TO CORRECT THE ASSIGNEE'S NAME TO ADD A COMMA BETWEEN APPTIMIZE AND LLC PREVIOUSLY RECORDED ON REEL 050612 FRAME 0128. ASSIGNOR(S) HEREBY CONFIRMS THE CHANGE OF NAME. Recorded Feb 9, 2021
From: APPTIMIZE, INC.
To: APPTIMIZE, LLC
Reel/Frame 055278/0689 →
SECURITY INTEREST Recorded Apr 2, 2020
From: URBAN AIRSHIP, INC.; APPTIMIZE, LLC
To: WELLS FARGO BANK, NATIONAL ASSOCIATION
Reel/Frame 052308/0550 →
CHANGE OF NAME Recorded Oct 2, 2019
From: APPTIMIZE, INC.
To: APPTIMIZE LLC
Reel/Frame 050612/0128 →
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded Mar 8, 2016
From: HUA, NANCY; KOPPEL, JAMES BRANDON; ORLOW, JEREMY NELSON
To: APPTIMIZE, INC.
Reel/Frame 037923/0434 →