Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
424 views
in Technique[技术] by (71.8m points)

android - when should use DONT_UNCOMPRESS_PRIV_APPS_DEXS

# Disable uncompressing priv apps so that there is enough space to build the system partition.
DONT_UNCOMPRESS_PRIV_APPS_DEXS := true

This is the description of DONT_UNCOMPRESS_PRIV_APPS_DEXS from android source code.

I have look into the usage and fount that when the property is true, then the classes.dex in apk file will be uncompressed (i.e. from deflated to stored), otherwise classes.dex will keep deflated.

# Uncompress dex files embedded in an apk.
#
define uncompress-dexs
$(hide) if (zipinfo $@ '*.dex' 2>/dev/null | grep -v ' stor ' >/dev/null) ; then 
  [email protected]; 
  rm -rf $$tmpdir && mkdir $$tmpdir; 
  unzip -q $@ '*.dex' -d $$tmpdir && 
  zip -qd $@ '*.dex' && 
  ( cd $$tmpdir && find . -type f | sort | zip -qD -X -0 ../$(notdir $@) -@ ) && 
  rm -rf $$tmpdir; 
  fi
endef

But no matter classes.dex is deflated or stored, the android system can load it as expected. So when should we use DONT_UNCOMPRESS_PRIV_APPS_DEXS? Should I enable it as long as I have enough space?


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)
等待大神答复

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...