<div dir="ltr"><p style="box-sizing: border-box; color: rgb(51, 51, 51); font-family: -apple-system, BlinkMacSystemFont, &quot;Segoe UI&quot;, Helvetica, Arial, sans-serif, &quot;Apple Color Emoji&quot;, &quot;Segoe UI Emoji&quot;, &quot;Segoe UI Symbol&quot;; font-size: 14px;">Hi, <br style="box-sizing: border-box;">I want to instrument apks to invoke JNI method.So I need to find method <code style="box-sizing: border-box; font-family: Consolas, &quot;Liberation Mono&quot;, Menlo, Courier, monospace; font-size: 11.9px; padding-top: 0.2em; padding-bottom: 0.2em; background-color: rgba(0, 0, 0, 0.0392157); border-radius: 3px;">&lt;java.lang.System: void loadLibrary(java.lang.String)&gt;</code>.</p><ul style="box-sizing: border-box; padding-left: 2em; color: rgb(51, 51, 51); font-family: -apple-system, BlinkMacSystemFont, &quot;Segoe UI&quot;, Helvetica, Arial, sans-serif, &quot;Apple Color Emoji&quot;, &quot;Segoe UI Emoji&quot;, &quot;Segoe UI Symbol&quot;; font-size: 14px;"><li style="box-sizing: border-box; margin-left: 0px;"><p style="box-sizing: border-box; margin-bottom: 16px;">I use these codes to get libraryClass:<br style="box-sizing: border-box;"><code style="box-sizing: border-box; font-family: Consolas, &quot;Liberation Mono&quot;, Menlo, Courier, monospace; font-size: 11.9px; padding-top: 0.2em; padding-bottom: 0.2em; background-color: rgba(0, 0, 0, 0.0392157); border-radius: 3px;">for (SootClass libraryClass : Scene.v().getLibraryClasses()) { System.out.println(&quot;[DEBUG] libraryClass:&quot; + libraryClass); }</code></p></li><li style="box-sizing: border-box; margin-top: 0.25em; margin-left: 0px;"><p style="box-sizing: border-box; margin-bottom: 16px;">When the apk include native code,I can get <code style="box-sizing: border-box; font-family: Consolas, &quot;Liberation Mono&quot;, Menlo, Courier, monospace; font-size: 11.9px; padding-top: 0.2em; padding-bottom: 0.2em; background-color: rgba(0, 0, 0, 0.0392157); border-radius: 3px;">java.lang.System</code> class and <code style="box-sizing: border-box; font-family: Consolas, &quot;Liberation Mono&quot;, Menlo, Courier, monospace; font-size: 11.9px; padding-top: 0.2em; padding-bottom: 0.2em; background-color: rgba(0, 0, 0, 0.0392157); border-radius: 3px;">loadLibrary</code> method.<br style="box-sizing: border-box;"><a href="https://cloud.githubusercontent.com/assets/15721702/20780434/ddb9d8c6-b7b5-11e6-9879-bc0c6ef18b61.png" target="_blank" style="box-sizing: border-box; background-color: transparent; color: rgb(64, 120, 192); text-decoration: underline; outline-width: 0px;" tabindex="1"><img src="https://cloud.githubusercontent.com/assets/15721702/20780434/ddb9d8c6-b7b5-11e6-9879-bc0c6ef18b61.png" alt="image" style="box-sizing: content-box; border-style: none; max-width: 100%;"></a></p></li><li style="box-sizing: border-box; margin-top: 0.25em; margin-left: 0px;"><p style="box-sizing: border-box; margin-bottom: 16px;">But when I annotated code related with JNI, I can&#39;t get <code style="box-sizing: border-box; font-family: Consolas, &quot;Liberation Mono&quot;, Menlo, Courier, monospace; font-size: 11.9px; padding-top: 0.2em; padding-bottom: 0.2em; background-color: rgba(0, 0, 0, 0.0392157); border-radius: 3px;">java.lang.System</code> class.<br style="box-sizing: border-box;"><a href="https://cloud.githubusercontent.com/assets/15721702/20780470/399c8148-b7b6-11e6-9915-b90d017b2b11.png" target="_blank" style="box-sizing: border-box; background-color: transparent; color: rgb(64, 120, 192);" tabindex="1"><img src="https://cloud.githubusercontent.com/assets/15721702/20780470/399c8148-b7b6-11e6-9915-b90d017b2b11.png" alt="image" style="box-sizing: content-box; border-style: none; max-width: 100%;"></a></p></li><li style="box-sizing: border-box; margin-top: 0.25em; margin-left: 0px;"><p style="box-sizing: border-box; margin-bottom: 16px;">And I use another functional integrity apk but without JNI method invoke,it can also get <code style="box-sizing: border-box; font-family: Consolas, &quot;Liberation Mono&quot;, Menlo, Courier, monospace; font-size: 11.9px; padding-top: 0.2em; padding-bottom: 0.2em; background-color: rgba(0, 0, 0, 0.0392157); border-radius: 3px;">java.lang.System</code>.</p></li><li style="box-sizing: border-box; margin-top: 0.25em; margin-left: 0px;"><p style="box-sizing: border-box; margin-bottom: 16px;">Last,I found that different apks when I <code style="box-sizing: border-box; font-family: Consolas, &quot;Liberation Mono&quot;, Menlo, Courier, monospace; font-size: 11.9px; padding-top: 0.2em; padding-bottom: 0.2em; background-color: rgba(0, 0, 0, 0.0392157); border-radius: 3px;">getLibraryClass</code>,it will return different libraryClasses.For example,the apk native code annotated returned 83 classes,the apk without annotated returned 85 classes(<code style="box-sizing: border-box; font-family: Consolas, &quot;Liberation Mono&quot;, Menlo, Courier, monospace; font-size: 11.9px; padding-top: 0.2em; padding-bottom: 0.2em; background-color: rgba(0, 0, 0, 0.0392157); border-radius: 3px;">java.lang.System</code> <code style="box-sizing: border-box; font-family: Consolas, &quot;Liberation Mono&quot;, Menlo, Courier, monospace; font-size: 11.9px; padding-top: 0.2em; padding-bottom: 0.2em; background-color: rgba(0, 0, 0, 0.0392157); border-radius: 3px;">java.lang.SecurityManager</code> extra) and the functional integrity apk returned 98 classes.</p></li><li style="box-sizing: border-box; margin-top: 0.25em; margin-left: 0px;"><p style="box-sizing: border-box; margin-bottom: 16px;">How can I fix this problem?</p></li></ul></div>