@@ -13,9 +13,9 @@ import { prettyMethod } from './stdstring';
1313 * @param symbol
1414 * @see https://docs.oracle.com/javase/8/docs/technotes/guides/jni/spec/functions.html#DefineClass
1515 */
16- export function hook_define_class ( symbol : NativePointer ) {
16+ export function hook_DefineClass ( symbol : NativePointer ) {
1717 if ( symbol === null || ! symbol ) {
18- Log . e ( `hook_define_class ` , `Unexpected value occurs: ${ symbol } ` ) ;
18+ Log . e ( `hook_DefineClass ` , `Unexpected value occurs: ${ symbol } ` ) ;
1919 }
2020 Interceptor . attach ( symbol , {
2121 onEnter ( args ) : void {
@@ -75,7 +75,7 @@ export function hook_find_class(symbol: NativePointer): void {
7575//// Calling Static Methods
7676
7777//// String Operations
78- export function hook_new_string ( symbol : NativePointer ) : void {
78+ export function hook_NewString ( symbol : NativePointer ) : void {
7979 if ( symbol === null || ! symbol ) {
8080 Log . e ( `hook_new_string` , `Unexpected value occurs: ${ symbol } ` ) ;
8181 }
@@ -89,7 +89,7 @@ export function hook_new_string(symbol: NativePointer): void {
8989 } ) ;
9090}
9191
92- export function hook_get_string_length ( symbol : NativePointer ) : void {
92+ export function hook_GetStringLength ( symbol : NativePointer ) : void {
9393 if ( symbol === null || ! symbol ) {
9494 Log . e ( `hook_get_string_length` , `Unexpected value occurs: ${ symbol } ` ) ;
9595 }
@@ -103,37 +103,36 @@ export function hook_get_string_length(symbol: NativePointer): void {
103103 } ) ;
104104}
105105
106- export function hook_release_string_chars ( symbol : NativePointer ) : void {
106+ export function hook_GetStringChars ( symbol : NativePointer ) : void {
107107 if ( symbol === null || ! symbol ) {
108- Log . e ( `hook_release_string_chars ` , `Unexpected value occurs: ${ symbol } ` ) ;
108+ Log . e ( `hook_get_string_chars ` , `Unexpected value occurs: ${ symbol } ` ) ;
109109 }
110110 Interceptor . attach ( symbol , {
111111 onEnter ( args ) : void {
112112 const character = args [ 1 ] . readCString ( ) ;
113- if ( character ) {
114- console . log ( 'env->ReleaseStringChars("' + character + '")' ) ;
115- }
113+ console . log ( character ) ;
114+ // if (character) {
115+ // console.log('env->hook_get_string_chars("' + character + '")');
116+ // }
116117 } ,
117118 } ) ;
118-
119119}
120120
121- export function hook_get_string_chars ( symbol : NativePointer ) : void {
121+ export function hook_ReleaseStringChars ( symbol : NativePointer ) : void {
122122 if ( symbol === null || ! symbol ) {
123- Log . e ( `hook_get_string_chars ` , `Unexpected value occurs: ${ symbol } ` ) ;
123+ Log . e ( `hook_release_string_chars ` , `Unexpected value occurs: ${ symbol } ` ) ;
124124 }
125125 Interceptor . attach ( symbol , {
126126 onEnter ( args ) : void {
127127 const character = args [ 1 ] . readCString ( ) ;
128- console . log ( character ) ;
129- // if (character) {
130- // console.log('env->hook_get_string_chars("' + character + '")');
131- // }
128+ if ( character ) {
129+ console . log ( 'env->ReleaseStringChars("' + character + '")' ) ;
130+ }
132131 } ,
133132 } ) ;
134133}
135134
136- export function hook_new_string_utf ( symbol : NativePointer ) : void {
135+ export function hook_NewStringUTF ( symbol : NativePointer ) : void {
137136 if ( symbol === null || ! symbol ) {
138137 Log . e ( `hook_new_string` , `Unexpected value occurs: ${ symbol } ` ) ;
139138 }
@@ -147,7 +146,7 @@ export function hook_new_string_utf(symbol: NativePointer): void {
147146 } ) ;
148147}
149148
150- export function hook_get_string_utf_length ( symbol : NativePointer ) : void {
149+ export function hook_GetStringUTFLength ( symbol : NativePointer ) : void {
151150 if ( symbol === null || ! symbol ) {
152151 Log . e ( `hook_new_string` , `Unexpected value occurs: ${ symbol } ` ) ;
153152 }
@@ -162,7 +161,7 @@ export function hook_get_string_utf_length(symbol: NativePointer): void {
162161 } ) ;
163162}
164163
165- export function hook_get_string_utf_chars ( symbol : NativePointer ) : void {
164+ export function hook_GetStringUTFChars ( symbol : NativePointer ) : void {
166165 if ( symbol === null || ! symbol ) {
167166 Log . e ( `hook_get_string_utf_chars` , `Unexpected value occurs: ${ symbol } ` ) ;
168167 }
@@ -177,7 +176,7 @@ export function hook_get_string_utf_chars(symbol: NativePointer): void {
177176 } ) ;
178177}
179178
180- export function hook_release_string_utf_chars ( symbol : NativePointer ) : void {
179+ export function hook_ReleaseStringUTFChars ( symbol : NativePointer ) : void {
181180 if ( symbol === null || ! symbol ) {
182181 Log . e ( `hook_release_string_utf_chars` , `Unexpected value occurs: ${ symbol } ` ) ;
183182 }
@@ -191,7 +190,7 @@ export function hook_release_string_utf_chars(symbol: NativePointer): void {
191190 } ) ;
192191}
193192
194- export function hook_get_string_region ( symbol : NativePointer ) : void {
193+ export function hook_GetStringRegion ( symbol : NativePointer ) : void {
195194 if ( symbol === null || ! symbol ) {
196195 Log . e ( `hook_get_string_region` , `Unexpected value occurs: ${ symbol } ` ) ;
197196 }
@@ -205,7 +204,7 @@ export function hook_get_string_region(symbol: NativePointer): void {
205204 } ) ;
206205}
207206
208- export function hook_get_utf_region ( symbol : NativePointer ) : void {
207+ export function hook_GetUTFRegion ( symbol : NativePointer ) : void {
209208 if ( symbol === null || ! symbol ) {
210209 Log . e ( `hook_get_utf_region` , `Unexpected value occurs: ${ symbol } ` ) ;
211210 }
@@ -219,8 +218,7 @@ export function hook_get_utf_region(symbol: NativePointer): void {
219218 } ) ;
220219}
221220
222- // GetStringUTFRegion
223- export function hook_get_string_utf_region ( symbol : NativePointer ) : void {
221+ export function hook_GetStringUTFRegion ( symbol : NativePointer ) : void {
224222 if ( symbol === null || ! symbol ) {
225223 Log . e ( `hook_get_string_utf_region` , `Unexpected value occurs: ${ symbol } ` ) ;
226224 }
@@ -234,7 +232,7 @@ export function hook_get_string_utf_region(symbol: NativePointer): void {
234232 } ) ;
235233}
236234
237- export function hook_get_string_critical ( symbol : NativePointer ) : void {
235+ export function hook_GetStringCritical ( symbol : NativePointer ) : void {
238236 if ( symbol === null || ! symbol ) {
239237 Log . e ( `hook_get_string_critical` , `Unexpected value occurs: ${ symbol } ` ) ;
240238 }
@@ -248,7 +246,7 @@ export function hook_get_string_critical(symbol: NativePointer): void {
248246 } ) ;
249247}
250248
251- export function hook_release_string_critical ( symbol : NativePointer ) : void {
249+ export function hook_ReleaseStringCritical ( symbol : NativePointer ) : void {
252250 if ( symbol === null || ! symbol ) {
253251 Log . e ( `hook_release_string_critical` , `Unexpected value occurs: ${ symbol } ` ) ;
254252 }
@@ -284,7 +282,7 @@ export function hook_release_string_critical(symbol: NativePointer): void {
284282 * ```
285283
286284 */
287- export function hook_register_natives ( symbol : NativePointer ) : void {
285+ export function hook_RegisterNatives ( symbol : NativePointer ) : void {
288286 if ( symbol === null || ! symbol ) {
289287 Log . e ( `hook_register_natives` , `Unexpected value occurs: ${ symbol } ` ) ;
290288 }
@@ -314,7 +312,7 @@ export function hook_register_natives(symbol: NativePointer): void {
314312//// Reflection Support
315313// todo impl
316314
317- export function hook_art_method ( symbol : NativePointer ) {
315+ export function hook_ArtMethod ( symbol : NativePointer ) {
318316 Interceptor . attach ( symbol , {
319317 onEnter ( args ) {
320318 const method_name = prettyMethod ( args [ 0 ] , 0 ) ;
0 commit comments