mechanism of apk. Even so, it sounds a little excited, isn't it?Working Principle
As shown in, the host Program loads the apk to the file system, such as the SD card, and then executes the activity in the apk through an activity called proxy.
In theory, DexClassLoader, PathClassLoader, and URLClassLoader can be used for dynamic
Recently Tinker Android, encountered a problem, because there is no root permissions, need to invoke intent installation apk, but need to get the user is installed (such as, the user clicked back or cancel), check a lot of articles, and finally can be resolved, but there are flaws, the solution is as follows:
public static void InstallPackage (context, file, int requestcode) {//before installation records
Android apk incremental upgradePreface
Although this article seems very simple, there are many problems encountered in the experiment. For example, the ndk compilation error under andorid studio, which is the final feasible method presented in this article.The required resources bzip2 bsdiff ndk two different versions of the test apk principle on the server side,
: = $ (call my-DIR)Include $ (clear_vars)# Module name shoshould match APK name to be installedLocal_module: = testLocal_module_tags: = optionalLocal_src_files: = ((local_moduleapps.apkLocal_module_class: = appsLocal_module_suffix: = $ (common_android_package_suffix)Local_certificate: = presignedInclude $ (build_prebuilt)4) open the file build/target/product/$ {project}. mk ($ {project} indicates the project name)Add test to product_packages.5) copy t
Reprinted please indicate the source: http://www.blogjava.net/zh-weir/arch...11/352099.html
APK Crack
Before writing this article, I was hesitant to start a Pandora box? Later, we thought that similar Android malware had already been released, indicating that many software security experts or hackers are familiar with this. As a evangelist, I only tell you the secrets that a few people know. As a result, I
Android obtains information about installed and not installed apk.
PackageManager is the most important class for obtaining apk resources. We can use this class to get all kinds of things we want. First, we can get the basic information of installed apk, including label, and icons:
PackageManager pm = getPackageManage
to set this flag bit to 1 to achieve our goal. Android PackageManagerService does not care about this encrypted Bit During apk installation (we will call it this for the time being) it can be installed normally without affecting the running of apk.
Ii. zip file format
The zip file format consists of three parts: compressed file source data, compressed directory
Software Security and Reverse Analysis in Android [2]-apk anti-cracking technology and security protection mechanism
In Android Application Development, after we develop the software, we do not want others to decompile and crack our applications, and cannot modify our code logic. In fact, in consideration of the security mechanism of applications, we hope that ou
1. Send messages through the Intent message mechanism and call the system application to install/uninstall the apk.(1) Call the system installation application to enable the system to automatically install the apk
String fileName = "/data/com. zlc. ipanel. operate/FileOperate.apk ";Uri uri = Uri. fromFile (new File (fileName ));Intent intent = new Intent (Intent. ACTION_VIEW );Intent. setDataAndType (uri, "
Parse_failed_no_certificates]Others have encountered this problem: as the brother said,JDK1.7 Signature APK Exception http://blog.csdn.net/sgz_china/article/details/8060315The wrong signature is:C:\>jarsigner -verbose -keystore mydevel.keystore-storepass mydevel test.apk devel is adding: meta-inf/ DEVEL. SF is adding: meta-inf/devel. DSA is signing: Res/layout/main.xml is signing: Androidmanifest.xml is signing: RESOURCES.ARSC is signing: r
Service (Packagemanagerservice) does not care about this encryption bit (which we call it for the time being) during APK installation, and does not affect the operation of the APK.Two, zip file formatZIP file format usually consists of three parts: compressed file source data, compressed directory source data, directory end identity. The three sections that are related to the encryption bits we're talking about are the compressed directory source dat
so that the Anti-compilation tool (Jd-gui) cannot decompile and query your Java code. Jd-gui Bug actually quite a lot of, many special code block or field set can let it crash cannot decompile source code.Like what:private static final char[] WJ = "0123456789abcdef". ToCharArray ();public static String IMSI = "204046330839890";public static String p = "0";public static string keyword = "phone";p ublic static string Tranlatekeyword = "%e7%94%b5%e8%af%
) {System.out.println ("Debug:repalceresources Error"); E.printstacktrace (); } }We replace the context Mresources in the Attachbasecontext method of the activity so that we can load the layout in the offline apk.Packaging process for resource filesIf you want to plug-in, you need to understand the Android resource file packaging process, so that each plug-in can be numbered, and then follow the rules to generate r files. For example, take C
Dynamic LibraryIn order to facilitate the demonstration, I am in the Windows 10 platform to compile with VS2017, the actual situation of the server is mostly running under the Linux system, this everyone to test it.Windows Build DLL Dynamic Library Reference Android NDK Development Tour 10--JNI--JNI development processResources usedNote: The com_haocai_bsdiff_bsdiff.h is based on the Java file declaration, and the steps are omitted.The following erro
Android 2.2 software can be installed on SD for support, ADB commands have also been improved, for Android 2.2 firmware PM command support installation option parameters, the setinstalllocation parameter is added here. Here we can use ADB to execute the Linux PM command to add some parameters, such as ADB shell PM setinstalllocation 0. The last parameter
Gradle compiled and packaged Android apk detailed introduction
Understanding the Gradle build process and interpreting the configuration of the Android Gradle plug-in
Read this article must be used to generate APK gradle, the article will not tell how to install the running Gradle, if necessary, you can read the arti
(Code! = NULL) { Dumpdexcode (code); } return code;} (4) After finding the Dexcode, you can replace the instruction. The implementation is as follows:Const Dexcode *code = Dexfindclassmethod (gdexfile, "lcom/android/dex/myclass;", "Setflaghidden"); Const DEXCODE*CODE2 = Dexfindclassmethod (gdexfile, "lcom/android/dex/myclass;", "Setflag"); REMAP!!!! if (Mprotect (base, module_size,
On an article we talked about APK to prevent anti-compilation technology in the shell technology, if there is not clear can view my previous blog http://my.oschina.net/u/2323218/blog/393372. Next we will introduce another technique to prevent the apk from recompiling-modifying bytecode at runtime. This method is in the work in the implementation of the app wrapping, see a foreign article about the security
Java, is not What a difficult thing ~The Android system divides all permission (permissions) into four levels according to its potential risk, namely "normal", "dangerous", "signature", "Signatureorsystem". The permissions for the APK installation are install_packages, and the permission level belongs to the latter two. So, finally want to implement the APK sile
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.