GeezerVison is showing github.com — cli&gui · EricChows/FakerAndroid@2cc4ef0
File tree
Expand file treeCollapse file tree
Open diff view settings
main/java/faker/android/decoder/transforms test/java/faker/android/decoder
Expand file treeCollapse file tree
Open diff view settings
Collapse file
Copy file name to clipboardExpand all lines: controller/src/main/java/faker/android/decoder/transforms/ResourceProcesser.java +6-1Lines changed: 6 additions & 1 deletion | Original file line number | Diff line number | Diff line change |
|---|
@@ -93,14 +93,19 @@ private void project(AndroidProject androidProject) {//TODO Rename |
93 | 93 | if(libResources.exists()){ |
94 | 94 | libResources.renameTo(androidProject.getjniLibs()); |
95 | 95 | } |
| 96 | + |
96 | 97 | File unknownResources = new File(resources,"unknown"); |
97 | 98 | if(unknownResources.exists()){ |
98 | 99 | unknownResources.renameTo(androidProject.getResources()); |
99 | 100 | } |
100 | 101 |
|
101 | 102 | File originalResources = new File(resources,"original"); |
102 | 103 | if(originalResources.exists()){ |
103 | | - originalResources.renameTo(new File(androidProject.getAssets(),"original")); |
| 104 | + File assets = androidProject.getAssets(); |
| 105 | + if(!assets.exists()){ |
| 106 | + assets.mkdirs(); |
| 107 | + } |
| 108 | + originalResources.renameTo(new File(assets,"original")); |
104 | 109 | } |
105 | 110 | } |
106 | 111 | void fixRes(AndroidProject androidProject) { |
|
Collapse file
Copy file name to clipboardExpand all lines: controller/src/test/java/faker/android/decoder/TestProject.java +4-1Lines changed: 4 additions & 1 deletion | Original file line number | Diff line number | Diff line change |
|---|
|
15 | 15 |
|
16 | 16 | public class TestProject { |
17 | 17 | private static final Logger LOG = LoggerFactory.getLogger(TestProject.class); |
18 | | - static File in = TestUtils.getFileFromSampleDir("app-with-fake-dex.apk"); |
| 18 | +// static File in = TestUtils.getFileFromSampleDir("app-with-fake-dex.apk"); |
| 19 | + |
| 20 | + static File in = TestUtils.getFileFromSampleDir("waiwai.apk"); |
| 21 | + |
19 | 22 | @Test |
20 | 23 | public void fakeRroject() throws IOException { |
21 | 24 | File out = TestUtils.getFileOutSampleDir("fakeRroject","niuzai"); |
|