This article mainly introduces the Android APK Anti-compilation Foundation, the use of the tool is Apktoos, we will use a graphic way to explain how the Apktoos tool, you can refer to this method to decompile other apk tryA long time has written a wide-industry library homepage A crawler of the demo (because no interface, can only pick static pages), some of the
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
= apkPath; try {return appInfo. loadIcon (pm);} catch (OutOfMemoryError e) {Log. e ("ApkIconLoader", e. toString () ;}} return null ;}
In the following code segment, PackageManager, PackageInfo, and ApplicationInfo are all the same as above.2. Get the APK name
String label = appInfo.loadLabel(mPackManager).toString();
3. Get the APK package name
String packageName = appInfo.packageName;
4. Obtain the
need to modify it to the following format "com. sample. HelloWorld ". Do not change other formats of the image. Retain the original value.
Next, we need to modify the signature and other related information, as shown in:
First, modify platform to Android, because our current example shows how to package the Android apk installation package. The second step is t
The following is only an example of using Android. mk to compile the APK program. For more information about Android. mk, see 《
About Android. mk1. Compile a simple APK local_path :=$ (call my-DIR) include $ (clear_vars) # build all java files in the Java subdirectory local_
Android Security Special-Apk reinforcement Analysis
0x00
I am not going to be ugly about the principle part. The above three articles are very clear. I am going to discuss how to implement the reinforcement process from 0, and I have stepped on a lot of pitfalls.0x01
The first step is to create the reinforced Apk,
", "Hello, from upper layer information ");To. setclassname (pkgname, clsname );To. setflags (intent. flag_activity_new_task );Startactivity ();
4. ToolsInstallutils. Java public static Boolean isapkinstalled (context, final string pkgname ){Try {Context. getpackagemanager (). getpackageinfo (pkgname, 0 );Return true;} Catch (namenotfoundexception e ){// E. printstacktrace ();}Return false;
5. Set the portal class of the installed program androidmanif
Installation Process: copy the APK installation package to the data/APP directory, decompress and scan the installation package, and save the DEX file (Dalvik bytecode) to the Dalvik-cache directory, and create the corresponding application data directory under the Data/data directory.
Uninstall process: delete the files and directories created under the preceding three directories during installation.
Android
In learning the Android development process, you tend to learn how other people's apps are developed, and those beautiful animations and exquisite layouts may put you down, as a developer, you might want to know how these effects interfaces are implemented, You will be able to reverse-compile the application of the APK view. Below is a few articles I refer to after a simple tutorial detailed.
(Note: Anti-c
Achieve Android dynamic APK loading (Fragment or Activity implementation)
Recently, due to the project being too large, compilation and translation failed (Android seems to have a limit on the number of methods in an application), so I have been wondering whether to dynamically load the APK of some modules without ins
) Open our Jar file with Jd-gui to see the source code of our apk oncreate function. As follows:(4) We then add the Impossible Special Branch statement in the APK oncreate function, the code is as follows:
123456789101112131415161718192021222324
@OverrideprotectedvoidonCreate(BundlesavedInstanceState){super.onCreate(savedInstanceState);setContentView(R.layout.activity_main);switch(
Respect for the original: http://blog.csdn.net/yuanzeyao/article/details/38565345Recently due to the project is too large, resulting in the compilation pass (Android to an application of the number of methods seems to be limited), so has been wondering whether some of the modules can not install the APK, dynamic loading, through the Internet to find information and the help of netizens, finally realize the
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
package to a directory. Example: D: \ Android-SDK-WindowsThen add the full path D: \ Android-SDK-Windows \ tools to the system PATH variable (this step is mainly used for convenient calling when the APK software is installed in the future)My computer> right-click Properties> advanced> Environment Variables
Note:Add;No.
3. Configure the
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.