Skip to content
A bytecode optimizer for Android apps
C++ Python Java C M4 CMake Other
Branch: master
Clone or download

Latest commit

thezhangwei and facebook-github-bot Fix nullness analysis for instance and static fields
Summary:
We need to collect nullness mapping in the right order. That is we need to distinguish between an explicit null assignment and an implicit one. If a field is not initialized in clinit or ctors, it is implicitly null for the rest of the program. This change collects type and nullness mapping for fields first from clinits and ctors. We apply implicit null assignments if necessary and use that as the starting point when collecting information from the rest of the program.

The change includes the followings:
- FieldTypeAnalyzer -> CtorFieldAnalyzer
- Stop initializing local FieldTypeEnvironment based on global state. (We don't need this information)
- Collect clinits and ctors before the rest of the program
- Update tests

Reviewed By: justinjhendrick

Differential Revision: D21655628

fbshipit-source-id: 8bc95f36d3765fdf70789e63cf59774d455abcde
Latest commit 153deeb May 22, 2020

Files

Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
.circleci Docusaurus publishing via CircleCI configuration (#376) Feb 24, 2019
analysis Resolver: properly handle invoke-super May 15, 2020
cmake_modules Bump boost to 1.71 in Redex and Sparta Dec 10, 2019
config Kill ConstantPropagationPassV3 in configs Feb 25, 2020
container Docker image for OSS Toolchain May 15, 2020
docs update interdex.md to include a pointer for the right enum package Feb 5, 2020
examples Yearless license header Oct 23, 2019
java/com/facebook/redex/annotations Yearless license header Oct 23, 2019
liblocator Removing support for non-name-based locators, removing dex file order… Jan 8, 2020
libredex make DexInstruction's encode const & remove unused args May 21, 2020
libresource opt out arc lint of libresource + lint one python script Dec 11, 2019
m4 take 2: switch to boost::thread Jan 26, 2018
opt Remove AddRedexTxtToApkPass unused pass May 19, 2020
pyredex pick location of apksigner from PATH if it's not found in the sdk dir May 13, 2020
service Fix nullness analysis for instance and static fields May 22, 2020
shared Enable google-explicit-constructor (shared/oatmeal) Mar 13, 2020
sparta Reorder fields to save memory May 14, 2020
test Fix nullness analysis for instance and static fields May 22, 2020
tools Resolver: properly handle invoke-super May 15, 2020
util Add `modernize-use-using` Mar 13, 2020
website feat(website): add DocSearch as recommended by docusaurus (#472) Apr 29, 2020
.clang-format clang-format: Set BinPackArguments to true Feb 6, 2018
.clang-tidy Reformat .clang-tidy file Mar 16, 2020
.dockerignore Move website to Docusaurus (#373) Feb 22, 2019
.gitignore Text lint all .gitignore files May 15, 2019
.travis.yml Deprecate Travis Bot from fbsource repos Mar 9, 2020
CMakeLists.txt Yearless license header Oct 23, 2019
CODE_OF_CONDUCT.md Adopt Contributor Covenant Aug 30, 2019
CONTRIBUTING.md Switch license to MIT Jun 25, 2018
Dockerfile Move website to Docusaurus (#373) Feb 22, 2019
LICENSE Switch license to MIT Jun 25, 2018
Makefile.am Fix OSS May 19, 2020
README.md Move website to Docusaurus (#373) Feb 22, 2019
apkutil convert scripts to python3 Dec 9, 2019
bundle-redex.sh Yearless license header Oct 23, 2019
configure.ac Bump boost to 1.71 in Redex and Sparta Dec 10, 2019
docker-compose.yml Move website to Docusaurus (#373) Feb 22, 2019
get_boost.sh Bump boost to 1.71 in Redex and Sparta Dec 10, 2019
redex.py Create --enable-pgi flag May 12, 2020
redex_gdb_hooks.py Make Redex pretty printing a custom command Apr 23, 2020
selfextract.sh Yearless license header Oct 23, 2019
setup_oss_toolchain.sh Docker image for OSS Toolchain May 15, 2020

README.md

ReDex: An Android Bytecode Optimizer

ReDex is an Android bytecode (dex) optimizer originally developed at Facebook. It provides a framework for reading, writing, and analyzing .dex files, and a set of optimization passes that use this framework to improve the bytecode. An APK optimized by ReDex should be smaller and faster than its source.

Go to https://fbredex.com for full documentation.

You can’t perform that action at this time.