How to create a new project in Android
Content
1. A simple tutorial on a useful tool (Insight)
What can you learn?
A super powerful analysis assistant software.
2.Android optimization process analysis
What can you learn?
1. In-depth understanding of the Android optimization process
2. Close observation of the Android source code
2. You can see the functions in the lower part of the big boss’ shell
3.Android DEX file analysis Analysis
What can you learn?
1. Other functions that can be downloaded
2. The process of parsing dex files
3. A little knowledge about shelling and downloading
4. Analysis of Android DEX class loading process
What can you learn?
1. The complete process of class loading
2. Selection of shelling and reinforcement classes
0x01 A simple tutorial on a useful tool (Insight)
This software is very useful for Analysis of c/c and java source code has strong auxiliary functions, which will be used later, so a brief introduction is given.
Tools can be found in the attachment. Just upload and download separately.
SI3US-205035-36448
A registration code is provided here.
Install, next, next.
#Create a new project
Select new project.
Single machine OK
Select the first one
Select Add Tree, which means adding them all.
After loading is complete
we will use this software for analysis.
Android Optimization Process Analysis
I want to be verbose. At this time, I know the importance of English. Of course, my English is not good, but I can look it up in the dictionary.
1.extractAndProcessZip
Let’s not talk about this content first, let’s take a look at the name of this function. extract: Extract, and and, Process process Zip, compressed file format, we all know that apk is actually a zip compressed package.
Then the meaning of this function is the process of extracting zip.
Then let’s analyze it step by step.
Here is the intermediate variable definition of extractAndProcessZip. It is not the focus of our research.
DexClassVerifyMode verifyMode = VERIFY_MODE_ALL;
This sentence defines verifyMode, which is the verification module. The data initialized here is VERIFY_MODE_ALL, which means that everything is verified.
Thinking
If we make changes here, can we skip this verification.
Let’s look at other values.
If you have an idea, you can define this value yourself.
DexOptimizerMode dexOptMode = OPTIMIZE_MODE_VERIFIED;
Let’s continue looking down.
There is a function called dexOptCreateEmptyHeader which, as the name suggests, creates an empty header for dex optimization..
dexOffset, record the file position so we can get back here later, is actually the starting position of reading the dex file.
Let’s look at the next function.
Open the zip archive, find the DEX entry.
Obviously, what this part is doing is to find the dex file from the apk.
Then proceed with analysis.
Function to extract some offsets of dex.
Extract the DEX data into the cache file at the current offset. Record some offsets of the dex file.
The next thing to talk about is the process of dex odexing.
This is where verification is optimized.
You can modify the optimization process here, and even remove the optimization verification.
Think about
Where does the data here come from and where to compare it. ·
These data are compared in build.prop.
2. Continue to optimize
Let’s follow up on the dvmContinueOptimization function.
PS:
We are about to come into contact with a very important place that is very related to shelling
Open the dvmContinueOptimization function
The first is a judgment.
#Then there is a write to the dex file.
Then read on (the important point is coming)
Parameter 1: The base of the loaded DEX file in memory Address. (That is, DEX.035)
Parameter 2: The file length of the loaded DEX file,
Parameter 3: Output parameter, the DEX file is converted into a DvmDex structure, which contains the classes, fields, and methods of the Dex file. String information. The object that Dalivk operates on the Dex file is the structure structure
Format like this.
The place where this function is called is our key function dvmRawDexFileOpen. This function first calls dexOptGenerateCacheFileName to generate odex, and then calls dvmDexFileOpenFromFd for another optimization.
The last step in optimization is dexFileParse(), which is to parse DEX. This position is briefly summarized in DexFile
.
dvmRawDexFileOpen() main control function - dexOptGenerateCacheFileName() generates the corresponding odex - dvmDexFileOpenFromFd() further optimizes - dexFileParse() parses dex.
PS: Tips
When dexfileopenpartial is in the next section, you may find that there is no way to break it, then we can choose dexOptGenerateCacheFileNamePKcS0, dvmdexfileopenfromfd and other functions to proceed to the next section.
Generally speaking, dexfileopenpartial is better at handling things with shells.
0x04 Android Dex class loading process
Other source codes are guided by a main control function to guide other key functions to operate. The dex class loading process is also like this.
Its main control function is Dalvik_dalvik_system_DexFile_defineClassNative()
The above is the detailed content of How to create a new project in Android. For more information, please follow other related articles on the PHP Chinese website!

Hot AI Tools

Undresser.AI Undress
AI-powered app for creating realistic nude photos

AI Clothes Remover
Online AI tool for removing clothes from photos.

Undress AI Tool
Undress images for free

Clothoff.io
AI clothes remover

Video Face Swap
Swap faces in any video effortlessly with our completely free AI face swap tool!

Hot Article

Hot Tools

Notepad++7.3.1
Easy-to-use and free code editor

SublimeText3 Chinese version
Chinese version, very easy to use

Zend Studio 13.0.1
Powerful PHP integrated development environment

Dreamweaver CS6
Visual web development tools

SublimeText3 Mac version
God-level code editing software (SublimeText3)

Hot Topics



In recent days, Ice Universe has been steadily revealing details about the Galaxy S25 Ultra, which is widely believed to be Samsung's next flagship smartphone. Among other things, the leaker claimed that Samsung only plans to bring one camera upgrade

OnLeaks has now partnered with Android Headlines to provide a first look at the Galaxy S25 Ultra, a few days after a failed attempt to generate upwards of $4,000 from his X (formerly Twitter) followers. For context, the render images embedded below h

Alongside announcing two new smartphones, TCL has also announced a new Android tablet called the NXTPAPER 14, and its massive screen size is one of its selling points. The NXTPAPER 14 features version 3.0 of TCL's signature brand of matte LCD panels

The Vivo Y300 Pro just got fully revealed, and it's one of the slimmest mid-range Android phones with a large battery. To be exact, the smartphone is only 7.69 mm thick but features a 6,500 mAh battery. This is the same capacity as the recently launc

Samsung has not offered any hints yet about when it will update its Fan Edition (FE) smartphone series. As it stands, the Galaxy S23 FE remains the company's most recent edition, having been presented at the start of October 2023. However, plenty of

In recent days, Ice Universe has been steadily revealing details about the Galaxy S25 Ultra, which is widely believed to be Samsung's next flagship smartphone. Among other things, the leaker claimed that Samsung only plans to bring one camera upgrade

The Redmi Note 14 Pro Plus is now official as a direct successor to last year'sRedmi Note 13 Pro Plus(curr. $375 on Amazon). As expected, the Redmi Note 14 Pro Plus heads up the Redmi Note 14 series alongside theRedmi Note 14and Redmi Note 14 Pro. Li

OnePlus'sister brand iQOO has a 2023-4 product cycle that might be nearlyover; nevertheless, the brand has declared that it is not done with itsZ9series just yet. Its final, and possibly highest-end,Turbo+variant has just beenannouncedas predicted. T
