proguard 反编译

In this article, we will examine the Android Studio project structure and key concepts in detail followed by compilers.

在本文中,我们将详细研究Android Studio项目结构和关键概念,然后详细介绍编译器。

When we start a new Android project in Android Studio, it will automatically creates a lot of files and folders for us. Let’s look at their functions and meaning. A New Project automatically opens in the Android Project View.

当我们在Android Studio中启动新的Android项目时,它将自动为我们创建许多文件和文件夹。 让我们看看它们的功能和含义。 新项目会自动在Android项目视图中打开。

Android专案检视 (Android Project View)

The Android project view shows all the build files at the top level of the project hierarchy under Gradle Scripts. Each project module appears as a folder at the top level of the project hierarchy and contains these three elements at the top level:

Android项目视图在Gradle脚本下的项目层次结构的顶层显示所有构建文件。 每个项目模块在项目层次结构的顶层显示为一个文件夹,并在顶层包含以下三个元素:

  • java/ : Source files for the module.java / :模块的源文件。
  • manifests/ : Manifest files for the modulemanifests / :模块的清单文件
  • res/ : Resource files for the moduleres / :模块的资源文件

Here is the brief description of important files/folders in the Android project structure:

这是Android项目结构中重要文件/文件夹的简短描述:

Android清单文件 (Android Manifest File)

AndroidManifest.xml is one of the most important file in the Android project structure.It contains information of the package, including components of the application such as activities, services, broadcast receivers, content providers etc.
It performs the following tasks:

AndroidManifest.xml是Android项目结构中最重要的文件之一,它包含软件包的信息,包括应用程序的组件,例如活动,服务,广播接收者,内容提供者等。
它执行以下任务:

  • It is responsible to protect the application to access any protected parts by providing the permissions它负责通过提供权限来保护应用程序访问任何受保护的部分
  • It also declares the android api that the application is going to use它还声明了应用程序将要使用的android api
  • It lists the instrumentation classes. The instrumentation classes provides profiling and other informations. These information are removed just before the application is published etc.它列出了检测类。 检测类提供概要分析和其他信息。 这些信息将在应用程序发布之前被删除等。

Java (java)

The java folder contains the Java source code files of the application organized into packages. We can have more than one package in the Android application. Its always a good practice to break the source code of the application into different packages based on its core functionality. All the source files of the Activities, Services etc. go into this folder.

java文件夹包含组织成软件包的应用程序的Java源代码文件。 我们在Android应用程序中可以有多个软件包。 将应用程序的源代码根据其核心功能分为不同的软件包始终是一个好习惯。 活动,服务等的所有源文件都进入此文件夹。

资源 (res)

Res folder is where all the external resources for the application such as images, layout XML files, strings, animations, audio files etc. are stored.

Res文件夹是用于存储应用程序所有外部资源的位置,例如图像,布局XML文件,字符串,动画,音频文件等。

Sub folders:

子文件夹:

  • Drawable: This folder contains the bitmap file to be used in the program. There are different folders to store drawables. They are drawable-ldpi, drawable-mdpi, drawable-hdpi,drawable-xdpi etc. The folders are to provide alternative image resources to specific screen configurations. Ldpi, mdpi & hdpi stands for low density, medium density & high density screens respectively. The resources for each screen resolutions are stored in respective folders and the android system will choose it according to the pixel density of the deviceDrawable :此文件夹包含要在程序中使用的位图文件。 有不同的文件夹来存储绘图。 它们是drawable-ldpi,drawable-mdpi,drawable-hdpi,drawable-xdpi等。文件夹用于为特定屏幕配置提供替代图像资源。 Ldpi,mdpi和hdpi分别代表低密度,中密度和高密度屏幕。 每种屏幕分辨率的资源都存储在相应的文件夹中,Android系统将根据设备的像素密度进行选择
  • Layout: It contains XML files that define the User Interface of the application布局 :它包含XML文件,这些文件定义了应用程序的用户界面
  • Menu: XML files that define menus for the application goes into this folder菜单 :定义应用程序菜单的XML文件进入此文件夹
  • Mipmap: The mipmap folders is used for placing the app icons only. Any other drawable assets should be placed in the relevant drawable folders as before.Mipmap :mipmap文件夹仅用于放置应用程序图标。 任何其他可绘制资产应像以前一样放置在相关的可绘制文件夹中。
  • Values : XML files that define simple values such as strings, arrays, integers, dimensions, colors, styles etc. are placed in this folder :将定义简单值(例如字符串,数组,整数,尺寸,颜色,样式等)的XML文件放置在此文件夹中

Gradle脚本 (Gradle Scripts)

Gradle scripts are used to automate tasks.For the most part, Android Studio performs application builds in the background without any intervention from the developer. This build process is handled using the Gradle system, an automated build toolkit designed to allow the ways in which projects are built to be configured and managed through a set of build configuration files.It uses a language called groovy.

Gradle脚本用于自动执行任务。大多数情况下,Android Studio在后台执行应用程序构建,而无需开发人员的任何干预。 该构建过程使用Gradle系统处理,该系统是一个自动化构建工具包,旨在通过一组构建配置文件来配置和管理构建项目的方式,它使用一种名为groovy的语言。

项目视图 (The Project View)

。理念 (.idea)

Eclipse uses project.properties file for project specific metadata. Here in Android Studio, this .idea does the same thing. This means the project specific metadata is stored by Android Studio.

Eclipse将project.properties文件用于项目特定的元数据。 在Android Studio中,此.idea的作用相同。 这意味着特定于项目的元数据由Android Studio存储。

项目模块(应用程序) (Project Module(app))

This is the actual project folder where the application code resides. The application folder has following sub directories

这是应用程序代码所在的实际项目文件夹。 应用程序文件夹具有以下子目录

  • build : This has all the complete output of the make process i.e. classes.dex, compiled classes and resources, etc.In the Android Studio GUI, only a few folders are shown. The important part is that the R.java is found here under build/generated/source/r/…/R.javabuild :具有make过程的所有完整输出,即classes.dex,已编译的类和资源等。在Android Studio GUI中,仅显示了几个文件夹。 重要的是R.java可以在build / Generated / source / r /…/ R.java下找到
  • libs : This is a commonly seen folder in eclipse and android studio, which optionally can hold the libraries or .jar fileslibs :这是eclipse和android studio中的常见文件夹,可以选择保存库或.jar文件
  • src : The src folder can have both application code and android unit test script. You will find two folders named “androidTest” and “main” correspond to src folder. The main folder contains two subfolders java and res. The java folder contains all the java codes and res contains drawables, layouts etc.src :src文件夹可以同时包含应用程序代码和android单元测试脚本。 您会发现两个名为“ androidTest”和“ main”的文件夹对应于src文件夹。 主文件夹包含两个子文件夹java和res。 java文件夹包含所有Java代码,res包含可绘制对象,布局等。

摇动 (gradle)

This is where the gradle build systems jar wrapper is found. This jar is how Android Studio communicates with gradle installed in Windows/MAC.

这是找到gradle构建系统jar包装器的地方。 这个jar是Android Studio与Windows / MAC中安装的gradle通信的方式。

外部图书馆 (External Libraries)

This is not actually a folder but a place where Referenced Libraries and information on targeted platform SDK are shown.

这实际上不是文件夹,而是显示参考库和目标平台SDK上的信息的位置。

什么是R.java? (What is R.java?)

Android R.java is an auto-generated file by aapt (Android Asset Packaging Tool) that contains resource IDs for all the resources of res/ directory.
On creating any component in the activity_main.xml file, id for the corresponding component is automatically created in this file. This id can be used in the activity source file to perform any action on the component.

Android R.java是aapt (Android资产打包工具)自动生成的文件,其中包含res /目录的所有资源的资源ID。
在activity_main.xml文件中创建任何组件时,将在该文件中自动创建相应组件的ID。 可以在活动源文件中使用此ID对组件执行任何操作。

Android编译器 (Android Compilers)

The compilers converts compiled .class files to executable .dex files in the Dalvik format for further execution in the Android environment. Following are the two important tools used:

编译器将Dalvik格式的已编译.class文件转换为可执行.dex文件,以在Android环境中进一步执行。 以下是使用的两个重要工具:

敏捷 (DEX)

Dalvik Virtual Machine is an Android Virtual Machine optimized for mobile devices. It optimizes the virtual machine for memory, battery life and performance. The Dex compiler converts the class files into the .dex file that run on the Dalvik Virtual Machine. The Multiple class files are converted into one dex file. Following flow depicts compiling and packaging process from the source file:

Dalvik虚拟机是为移动设备优化的Android虚拟机。 它优化了虚拟机的内存,电池寿命和性能。 Dex编译器将类文件转换为在Dalvik虚拟机上运行的.dex文件。 将多个类文件转换为一个dex文件。 以下流程描述了源文件的编译和打包过程:

  • The javac tool compiles the java source file into the class file.javac工具将Java源文件编译为类文件。
  • The dx tool takes all the class files of the application and generates a single .dex file. It is a platform-specific tool.dx工具获取应用程序的所有类文件,并生成一个.dex文件。 它是特定于平台的工具。
  • The Android Assets Packaging Tool (aapt) handles the packaging process.Android资产打包工具( aapt )处理打包过程。

Android ProGuard (Android ProGuard)

The ProGuard tool shrinks, optimizes, and obfuscates the code by removing unused code and renaming classes, fields, and methods with semantically obscure names. The result is a smaller sized .apk file that is more difficult to reverse engineer.

ProGuard工具通过删除未使用的代码并使用语义上模糊的名称重命名类,字段和方法,从而对代码进行压缩,优化和混淆。 结果是一个较小的.apk文件,很难进行反向工程。

翻译自: https://www.journaldev.com/9319/android-studio-project-structure-compiler-proguard

proguard 反编译

proguard 反编译_Android Studio项目结构,编译器,ProGuard相关推荐

  1. android 反编译_Android 反编译实战

    ❝ 文中相关工具下载链接:https://pan.baidu.com/s/1_bknFSnsYxLUNJ3WTulEFA 提取码:4qo8 ❞ 我的所有原创Android知识体系 https://gi ...

  2. Android Studio项目结构

    我们创建了一个Android Project,打开就如下图所示:  我们选择Project视图,就会有以下的项目文档结构:  上面笔者标注的数字是接下来要讲解的内容.  我们先来看1:  我们创建Ap ...

  3. vue打包代码反编译_Android逆向反编译代码注入APK过程思路分析

    一.名称解释 逆向 - 是一种产品设计技术再现过程,从可运行的程序系统出发,运用解 密.反汇编.系统分析等多种计算机技术,对软件的结构.流程.算法. 代码等进行逆向拆解和分析,推导出软件产品的源代码. ...

  4. NDK学习笔记<六> 反编译现成的项目,调用该项目的so文件

    这里提供美图秀秀非常早先的一个版本(相关资源文章最后给出),我们使用AndroidKiller反编译该apk, 然后获取到美图秀秀的源代码以及so库文件,然后尝试在自己的程序中调用美图秀秀的so库文件 ...

  5. android 无法运行 项目红叉_Android Studio 项目报红叉没法运行的几种解决办法总结...

    文章总要有点前言的,呃,这个,我就说两句吧,最近电脑老是不禁的自动重启,但是,这是我没法抗拒的,由于夏天了,杨絮和柳絮各类飘,天气也干燥,个人项目要常常用U盘拷贝放到设备上,这就致使了静电的产生,着实 ...

  6. Android Studio项目结构介绍

    新建一个空的工程会出现以下界面: 从上往下依次是:项目名称.包名.项目存储的位置.项目所用的语言.项目所用的Android的系统版本. 进入之后右侧可选择界面的展示结构: 如果选择Android则会出 ...

  7. 反编译008神器,修改手机型号与android版本号信息

    一个可以修改手机信息的xposed插件 008神器依赖xposed可修改其他应用获取到的系统参数值,见下图 但是我们直接从网上下载的008神器生成的手机型号和安卓版本号都是好几年前的.下面就来分析下怎 ...

  8. Android 反编译利器,jadx 的高级技巧

    一.前言 今天介绍一个非常好用的反编译的工具 jadx(Java,Dex反编译器) .jadx 的功能非常的强大,对我而言,基本上满足日常反编译需求. jadx 优点: 图形化的界面. 拖拽式的操作. ...

  9. Android 反编译利器,jadx 的高级技巧,2021年五面蚂蚁

    直接下载最新版就可以了,现在的最新版是 jadx-0.6.1 .下载好解压之后,你会获得这样的目录结构: [外链图片转存失败,源站可能有防盗链机制,建议将图片保存下来直接上传(img-HY1d0CnZ ...

最新文章

  1. arcgis python规划地类-作为规划师,为什么我建议你学Python数据分析?
  2. Acwing -- 单调队列优化的DP问题
  3. 第五十期:详解语音识别技术的发展
  4. 从零开始学_JavaScript_系列(四)——jquery(基础,选择器,触发条件,动画,回调函数)...
  5. docker java 中文乱码_java使用awt包在生产环境docker部署时出现中文乱码的处理
  6. windows 安装nginx
  7. 博主带你两个月入门自然语言处理~
  8. Python标准库——走马观花
  9. 软件测试加油站ic卡管理系统,加油站IC卡管理系统,加油机IC卡管理系统,加油站自助加油机功能介绍...
  10. 如何实现施耐德Twido系列PLC远程上下载
  11. 准备工作-PPT母版
  12. netware显示没有首选服务器,NetWare下服务器配置几例
  13. 计算机学院品牌活动总结,计算机学院研究生会工作总结
  14. BGP——MPLS-V P Ǹ综合实验
  15. 服务器重启后samba启动不了,提示stop: Unknown instance: smbd start/running, process 76585
  16. 微信公众平台开发-消息管理-发送模板消息
  17. windows2012自动锁定计算机,如何去除 windows server 2012 r2 自动锁定
  18. 招聘网站数百万条敏感数据泄露,简历、身份证扫描件统统曝光
  19. 我说,执着造就了成功
  20. 前端——获取手机验证码案例

热门文章

  1. [转载] numpy.linalg.matrix_power 计算矩阵的次方
  2. [转载] 利用python对csv文件进行简单的数据分析
  3. Capital Asset Pricing Model (CAPM)
  4. python 在window 系统 连接并操作远程 oracle 数据库
  5. Getting Started with Processing 第五章的easing问题(2)
  6. BZOJ4557 JLOI2016侦察守卫(树形dp)
  7. Android Studio 创建不同分辨率的图标
  8. Atitit 我们的devops战略与规划 规范 推荐标准
  9. Unity3D 多平台_预编译相关宏定义
  10. 短信开发系列(二):GSM手机短信开发之短信解码