GeezerVison is showing github.com — Project format · dewee-dev/FakerAndroid@cf1fb5a
File treeExpand file treeCollapse file tree Open diff view settings src/main/java/faker/android/decoder
main/java/faker/android/decoder test/java/faker/android/decoder
Expand file treeCollapse file tree Open diff view settings Collapse file Copy file name to clipboardExpand all lines: bin/FakerAndroid-cli/build.gradle +2Lines changed: 2 additions & 0 deletions | Original file line number | Diff line number | Diff line change |
|---|
@@ -12,6 +12,8 @@ repositories { | 12 | 12 | } | 13 | 13 |
| 14 | 14 | dependencies { | | 15 | + implementation 'com.luhuiguo:chinese-utils:1.0' | | 16 | + implementation project(':controller') | 15 | 17 | implementation project(':distribution:apktool:brut.apktool:apktool-lib') | 16 | 18 | implementation 'commons-cli:commons-cli:1.4' | 17 | 19 | testCompile group: 'junit', name: 'junit', version: '4.12' | |
Collapse file Copy file name to clipboardExpand all lines: bin/FakerAndroid-cli/src/main/java/faker/android/decoder/Main.java +7-1Lines changed: 7 additions & 1 deletion | Original file line number | Diff line number | Diff line change |
|---|
| 23 | 23 | import brut.common.BrutException; | 24 | 24 | import brut.directory.DirectoryException; | 25 | 25 | import brut.util.AaptManager; | | 26 | +import com.luhuiguo.chinese.ChineseUtils; | | 27 | +import com.luhuiguo.chinese.pinyin.PinyinFormat; | | 28 | +import faker.android.decoder.api.Transfer; | 26 | 29 | import org.apache.commons.cli.*; | 27 | 30 |
| 28 | 31 | import java.io.File; | @@ -113,7 +116,10 @@ private static void cmdFakeProject(CommandLine cli) { | 113 | 116 | if(cli.hasOption("o") || cli.hasOption("output")){ | 114 | 117 | outDir = cli.getOptionValue("o"); | 115 | 118 | } | 116 | | - // FakerTransfer.translate(apkName,outDir,null); | | 119 | + if(outDir==null){ | | 120 | + outDir = ChineseUtils.toPinyin(apkName.replace(".apk",""), PinyinFormat.TONELESS_PINYIN_FORMAT).replace(" ","-"); | | 121 | + } | | 122 | + new Transfer(apkName,outDir).translate(); | 117 | 123 | } | 118 | 124 |
| 119 | 125 | private static void cmdDecode(CommandLine cli) throws AndrolibException { | |
Collapse file Copy file name to clipboardExpand all lines: bin/FakerAndroid-gui/build.gradle +1Lines changed: 1 addition & 0 deletions | Original file line number | Diff line number | Diff line change |
|---|
| 1 | 1 | dependencies { | | 2 | + implementation project(':controller') | 2 | 3 | implementation 'com.luhuiguo:chinese-utils:1.0' | 3 | 4 | implementation(project(':library')) | 4 | 5 | } | |
Collapse file Copy file name to clipboardExpand all lines: bin/FakerAndroid-gui/src/main/java/FilechooserController.java +2Lines changed: 2 additions & 0 deletions | Original file line number | Diff line number | Diff line change |
|---|
| 1 | 1 | import com.luhuiguo.chinese.ChineseUtils; | 2 | 2 | import com.luhuiguo.chinese.pinyin.PinyinFormat; | | 3 | +import faker.android.decoder.api.Transfer; | 3 | 4 | import faker.android.decoder.util.TextUtil; | 4 | 5 | import javafx.application.Platform; | 5 | 6 | import javafx.event.ActionEvent; | @@ -127,6 +128,7 @@ public void run() { | 127 | 128 | // textArea.appendText(tring+"\r\n"); | 128 | 129 | // } | 129 | 130 | // }); | | 131 | + new Transfer(apkPath,outPath).translate(); | 130 | 132 | triggerButton.setDisable(false); | 131 | 133 | } | 132 | 134 | } | |
Collapse file Copy file name to clipboardExpand all lines: controller/build.gradle -2Lines changed: 0 additions & 2 deletions | Original file line number | Diff line number | Diff line change |
|---|
| 1 | 1 | plugins { | 2 | 2 | id 'java' | 3 | 3 | } | 4 | | - | 5 | 4 | group 'faker.android' | 6 | 5 | version '1.0-SNAPSHOT' | 7 | 6 |
| @@ -13,7 +12,6 @@ dependencies { | 13 | 12 | implementation 'org.dom4j:dom4j:2.1.1' | 14 | 13 | implementation 'commons-io:commons-io:2.4' | 15 | 14 | implementation(project(':library')) | 16 | | - implementation(project(':distribution:jadx-core')) | 17 | 15 | implementation(project(':distribution:il2cpp-dumper')) | 18 | 16 | implementation(project(':distribution:smali')) | 19 | 17 | implementation(project(':distribution:dex2jar')) | |
Collapse file Copy file name to clipboardExpand all lines: controller/src/main/java/faker/android/decoder/api/AndroidProject.java +1-1Lines changed: 1 addition & 1 deletion | Original file line number | Diff line number | Diff line change |
|---|
| 1 | | -package faker.android.decoder.pipeline; | | 1 | +package faker.android.decoder.api; | 2 | 2 |
| 3 | 3 | import java.io.File; | 4 | 4 | import java.util.HashMap; | |
Collapse file Copy file name to clipboardExpand all lines: controller/src/main/java/faker/android/decoder/api/Apk.java +1-1Lines changed: 1 addition & 1 deletion | Original file line number | Diff line number | Diff line change |
|---|
| 1 | | -package faker.android.decoder.pipeline; | | 1 | +package faker.android.decoder.api; | 2 | 2 |
| 3 | 3 | import java.io.File; | 4 | 4 |
| |
Collapse file Copy file name to clipboard +39Lines changed: 39 additions & 0 deletions | Original file line number | Diff line number | Diff line change |
|---|
| | 1 | +package faker.android.decoder.api; | | 2 | + | | 3 | +import faker.android.decoder.pipeline.TransformInvocation; | | 4 | +import faker.android.decoder.pipeline.TransformManager; | | 5 | +import faker.android.decoder.transforms.*; | | 6 | + | | 7 | +import java.io.File; | | 8 | + | | 9 | +public class Transfer { | | 10 | + private File in; | | 11 | + private File out; | | 12 | + public Transfer(String inPath,String outPath){ | | 13 | + in = new File(inPath); | | 14 | + out = new File(outPath); | | 15 | + } | | 16 | + public void translate(){ | | 17 | + TransformManager transformManager = new TransformManager(new TransformInvocation() { | | 18 | + @Override | | 19 | + public void callBack(String msg) { | | 20 | + } | | 21 | + }); | | 22 | + Apk apk = new Apk(in); | | 23 | + AndroidProject androidProject = new AndroidProject(out); | | 24 | + | | 25 | + //Decoder | | 26 | + transformManager.addTransform(new ResourceProcesser(apk,androidProject)); | | 27 | + transformManager.addTransform(new DexToSmali(apk,androidProject)); | | 28 | + transformManager.addTransform(new DexToJar(apk,androidProject)); | | 29 | + transformManager.addTransform(new Il2cppDumper(apk,androidProject)); | | 30 | + | | 31 | + //Merge | | 32 | + transformManager.addTransform(new RuntimeBaseMerge(apk,androidProject)); | | 33 | + transformManager.addTransform(new RuntimeIl2cppMerge(apk,androidProject)); | | 34 | + | | 35 | + //fix | | 36 | + transformManager.addTransform(new Project(apk,androidProject)); | | 37 | + transformManager.action(); | | 38 | + } | | 39 | +} |
Collapse file Copy file name to clipboardExpand all lines: controller/src/main/java/faker/android/decoder/conversation/SupportConversation.java +2-2Lines changed: 2 additions & 2 deletions | Original file line number | Diff line number | Diff line change |
|---|
| 1 | 1 | package faker.android.decoder.conversation; | 2 | 2 |
| 3 | | -import faker.android.decoder.pipeline.AndroidProject; | 4 | | -import faker.android.decoder.pipeline.Apk; | | 3 | +import faker.android.decoder.api.AndroidProject; | | 4 | +import faker.android.decoder.api.Apk; | 5 | 5 | import faker.android.decoder.pipeline.Context; | 6 | 6 | import faker.android.decoder.pipeline.Conversation; | 7 | 7 | import faker.android.decoder.transforms.DexToJar; | |
Collapse file Copy file name to clipboardExpand all lines: controller/src/main/java/faker/android/decoder/pipeline/Context.java +3Lines changed: 3 additions & 0 deletions | Original file line number | Diff line number | Diff line change |
|---|
| 1 | 1 | package faker.android.decoder.pipeline; | 2 | 2 |
| | 3 | +import faker.android.decoder.api.AndroidProject; | | 4 | +import faker.android.decoder.api.Apk; | | 5 | + | 3 | 6 | import java.util.List; | 4 | 7 | import java.util.logging.Logger; | 5 | 8 |
| |
|