Today, I found a folder named "com" under the first directory of my APK, and the N-level directory under it was a text file named "Wup. properties. For example:
Curious, that is to say, the android program can read information from any place in the installation package like the one in the j2's (previously thought it could only read content under Res/raw ). After checking the decompilation, we finally found a class named "com/Tencent/QQ/JCE/Wup/wupinfo ". The Code is as follows:
Package COM. tencent. QQ. JCE. wup; <br/> Import Java. io. inputstream; <br/> Import Java. util. properties; <br/> public class wupinfo <br/>{< br/> Private Static string a; <br/> Private Static string B; <br/> Private Static string C; <br/> static <br/>{< br/> string STR = "unknown"; <br/> A = NULL; <br/> B = NULL; <br/> C = NULL; <br/> try <br/> {<br/> inputstream localinputstream = wupinfo. class. getresourceasstream ("/COM/QQ/JCE/Wup. properties "); <br/> properties localproperties = new properties (); <br/> localproperties. load (localinputstream); <br/> localinputstream. close (); <br/> A = localproperties. getproperty ("client.info"); <br/> B = localproperties. getproperty ("client. built "); <br/> C = localproperties. getproperty ("client. number "); <br/> if (a = NULL) <br/> A =" Tencent TAF "; <br/> If (B = NULL) <br/> B = STR; <br/> If (C = NULL) <br/> C = STR; <br/> return; <br/>}< br/> catch (throwable localthrowable) <br/>{< br/>}< br/>}
The key code is the content in try {} catch () {}. Use getresourceasstream ("file_path") to get the input stream. I tried to build a project by myself and a "Wup. properties" file with the same directory structure under the project directory. The Code failed. The next thought was that eclipse did not pack the folder "com" into the APK together, and exported the test package from the mobile phone. This is indeed true.
The solution is to manually put "com/QQ/JCE/Wup. properties" into the APK compressed package and re-sign the package.