Commit 4d36ca8
authored
redundancy: remove unspecial special cases (#3755)
As we discussed before, some of the dirs in RAW_DIRNAMES are treated
as standard dirs in an APK, despite not being such.
Instead of arbitrarily deciding what is known and what is unknown,
we can make a concrete distinction: known dirs are dirs that are
standard in APKs as generated by aapt: "assets", "lib" and "res".
Everything else is app or library-specific and is unknown to aapt or
smali/baksmali and should be treated as raw files that must be
preserved as-is.
"libs" (not "lib") is another example of a non-standard dir that might
appear in specific APKs simply because the developers decided so, but
it's not used for native libraries when calling loadLibrary.
https://cs.android.com/android/platform/superproject/main/+/main:frameworks/base/core/java/android/app/LoadedApk.java;l=565
Thanks to refactoring done some months ago, everything in "unknown" is
already being preserved when rebuilding an APK, no special considerations
needed for kotlin.1 parent 7e03efc commit 4d36ca8
File tree
10 files changed
+2
-141
lines changed- brut.apktool/apktool-lib/src
- main/java/brut/androlib
- apk
- res/decoder
- test
- java/brut/androlib
- aapt1
- decode
- resources/decode
- kotlin-coroutines
- testkotlin
- brut.j.dir/src/main/java/brut/directory
10 files changed
+2
-141
lines changedLines changed: 0 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
158 | 158 | | |
159 | 159 | | |
160 | 160 | | |
161 | | - | |
162 | 161 | | |
163 | 162 | | |
164 | 163 | | |
| |||
Lines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
29 | 29 | | |
30 | 30 | | |
31 | 31 | | |
32 | | - | |
| 32 | + | |
33 | 33 | | |
34 | 34 | | |
35 | 35 | | |
| |||
Lines changed: 0 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
810 | 810 | | |
811 | 811 | | |
812 | 812 | | |
813 | | - | |
814 | 813 | | |
815 | 814 | | |
816 | 815 | | |
| |||
Lines changed: 0 additions & 6 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
536 | 536 | | |
537 | 537 | | |
538 | 538 | | |
539 | | - | |
540 | 539 | | |
541 | 540 | | |
542 | 541 | | |
| |||
569 | 568 | | |
570 | 569 | | |
571 | 570 | | |
572 | | - | |
573 | | - | |
574 | | - | |
575 | | - | |
576 | | - | |
577 | 571 | | |
Lines changed: 0 additions & 73 deletions
This file was deleted.
Lines changed: 0 additions & 57 deletions
This file was deleted.
Binary file not shown.
Binary file not shown.
Lines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
235 | 235 | | |
236 | 236 | | |
237 | 237 | | |
238 | | - | |
239 | 238 | | |
| 239 | + | |
240 | 240 | | |
241 | 241 | | |
242 | 242 | | |
| |||
Lines changed: 0 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
167 | 167 | | |
168 | 168 | | |
169 | 169 | | |
170 | | - | |
171 | 170 | | |
172 | 171 | | |
173 | 172 | | |
| |||
0 commit comments