i remember porting that part  i think i still have the code here it is private static final string sdefaultignoreassets svn git ds store scc dir cvs  thumbs db  picasa ini non nls private string mignoreassets sets the pattern to use for ignoring asset files p patterns syntax ul li  delimiter is li  entry can start with the flag to avoid printing a warning about the file being ignored li  entry can have the flag code  dir to match only directories or code  file to match only files  default is to match both li  entry can be a simplified glob code  prefix or code suffix where prefix suffix must have at least character  so that we do not match a catch all pattern li  the special filenames and are always ignored li  otherwise the full string is matched li  match is not case sensitive ul return the pattern string nonnull public string getignoreassets string patterns mignoreassets if  patterns null patterns isempty patterns system getenv  android aapt ignore  non nls if  patterns null patterns isempty patterns sdefaultignoreassets return patterns returns whether the given file should be ignored  this can be customized with the code ignore assets  flag param file the file to check param reportskipped if true  report skipped files as warnings return true if the file is hidden public boolean isignored file file  boolean reportskipped string path file getpath int nameindex path lastindexof file separatorchar if  path equals path equals return true boolean ignore false boolean chatty true string matchedpattern null assert file exists file boolean isdirectory file isdirectory int namelength path length nameindex for  string token splitter on split getignoreassets if  token isempty continue int tokenindex chatty token charat tokenindex if chatty tokenindex skip if  token regionmatches tokenindex  dir if isdirectory continue tokenindex if  token regionmatches tokenindex  file if  isdirectory continue tokenindex matchedpattern token int n token length tokenindex if  token charat tokenindex match  suffix such as scc or tokenindex n if  n namelength ignore token regionmatches true  tokenindex  path  nameindex namelength n  n else if  n token charat token length match prefix  such as or ignore token regionmatches true  tokenindex  path  nameindex  n else match exactly  such as thumbs db git  etc  ignore token length tokenindex path length nameindex token regionmatches true  tokenindex  path  nameindex  path length nameindex if  ignore break if  ignore chatty reportskipped warning skipping  s s  due to android aapt ignore pattern s n isdirectory dir file path  matchedpattern null matchedpattern return ignore unit test public void testisignored throws exception aapt aapt new aapt assertfalse aapt isignored new file  a false assertfalse aapt isignored new file  foo false assertfalse aapt isignored new file  foo file separator bar false asserttrue aapt isignored new file false asserttrue aapt isignored new file false asserttrue aapt isignored new file git false asserttrue aapt isignored new file  foo file separator git false asserttrue aapt isignored new file svn false asserttrue aapt isignored new file  thumbs db false asserttrue aapt isignored new file  thumbs db false asserttrue aapt isignored new file  foo file separator thumbs db false suffix asserttrue aapt isignored new file  foo false asserttrue aapt isignored new file  foo scc false asserttrue aapt isignored new file  foo file separator foo scc false prefix asserttrue aapt isignored new file test false asserttrue aapt isignored new file  foo file separator test false don t match on non directory assertfalse aapt isignored new file test false file dir new file files createtempdir test asserttrue dir mkdirs asserttrue aapt isignored dir  false custom rules aapt setignoreassets  foo bar asserttrue aapt isignored new file  abc file separator foo false asserttrue aapt isignored new file  abc file separator bar false assertfalse aapt isignored new file  abc file separator barf false assertfalse aapt isignored new file  abc file separator abar false standard rules get replaced assertfalse aapt isignored new file  abc file separator git false 