From e12dc54a538c06aeaed19c4e766fc1b74642b12f Mon Sep 17 00:00:00 2001 From: vzakharchenko Date: Thu, 1 Oct 2020 11:39:11 +0300 Subject: [PATCH] Read mac, ip and port from files --- .gitignore | 14 + OUTLANDER_PHEV_REMOTE_APK/smali/a.smali | 7 +- .../smali/androidx/appcompat/app/a.smali | 6 +- .../smali/com/inventec/iMobile2/a2/b.smali | 14 +- .../smali/com/inventec/iMobile2/a2/g.smali | 559 ++++++- .../smali/com/inventec/iMobile2/a2/l.smali | 13 +- .../smali/com/inventec/iMobile2/a2/x.smali | 2 +- README.md | 11 +- smaliapp/.gitignore | 14 + smaliapp/app/.gitignore | 1 + smaliapp/app/build.gradle | 37 + smaliapp/app/proguard-rules.pro | 21 + .../ExampleInstrumentedTest.java | 26 + smaliapp/app/src/main/AndroidManifest.xml | 24 + .../example/myapplication/FirstFragment.java | 34 + .../myapplication/MainActivity$1.smali | 67 + .../example/myapplication/MainActivity.java | 255 +++ .../example/myapplication/MainActivity.smali | 1384 +++++++++++++++++ .../example/myapplication/SecondFragment.java | 34 + .../java/com/inventec/iMobile2/a2/g$b.smali | 57 + .../main/java/com/inventec/iMobile2/a2/g.java | 35 + .../java/com/inventec/iMobile2/a2/g.smali | 90 ++ .../drawable-v24/ic_launcher_foreground.xml | 30 + .../res/drawable/ic_launcher_background.xml | 170 ++ .../app/src/main/res/layout/activity_main.xml | 33 + .../app/src/main/res/layout/content_main.xml | 19 + .../src/main/res/layout/fragment_first.xml | 28 + .../src/main/res/layout/fragment_second.xml | 27 + smaliapp/app/src/main/res/menu/menu_main.xml | 10 + .../res/mipmap-anydpi-v26/ic_launcher.xml | 5 + .../mipmap-anydpi-v26/ic_launcher_round.xml | 5 + .../src/main/res/mipmap-hdpi/ic_launcher.png | Bin 0 -> 3593 bytes .../res/mipmap-hdpi/ic_launcher_round.png | Bin 0 -> 5339 bytes .../src/main/res/mipmap-mdpi/ic_launcher.png | Bin 0 -> 2636 bytes .../res/mipmap-mdpi/ic_launcher_round.png | Bin 0 -> 3388 bytes .../src/main/res/mipmap-xhdpi/ic_launcher.png | Bin 0 -> 4926 bytes .../res/mipmap-xhdpi/ic_launcher_round.png | Bin 0 -> 7472 bytes .../main/res/mipmap-xxhdpi/ic_launcher.png | Bin 0 -> 7909 bytes .../res/mipmap-xxhdpi/ic_launcher_round.png | Bin 0 -> 11873 bytes .../main/res/mipmap-xxxhdpi/ic_launcher.png | Bin 0 -> 10652 bytes .../res/mipmap-xxxhdpi/ic_launcher_round.png | Bin 0 -> 16570 bytes .../app/src/main/res/navigation/nav_graph.xml | 28 + smaliapp/app/src/main/res/values/colors.xml | 6 + smaliapp/app/src/main/res/values/dimens.xml | 3 + smaliapp/app/src/main/res/values/strings.xml | 12 + smaliapp/app/src/main/res/values/styles.xml | 19 + .../myapplication/ExampleUnitTest.java | 24 + smaliapp/build.gradle | 24 + smaliapp/gradle.properties | 19 + smaliapp/gradle/wrapper/gradle-wrapper.jar | Bin 0 -> 54329 bytes .../gradle/wrapper/gradle-wrapper.properties | 6 + smaliapp/gradlew | 172 ++ smaliapp/gradlew.bat | 84 + smaliapp/settings.gradle | 2 + 54 files changed, 3407 insertions(+), 24 deletions(-) create mode 100644 smaliapp/.gitignore create mode 100644 smaliapp/app/.gitignore create mode 100644 smaliapp/app/build.gradle create mode 100644 smaliapp/app/proguard-rules.pro create mode 100644 smaliapp/app/src/androidTest/java/com/example/myapplication/ExampleInstrumentedTest.java create mode 100644 smaliapp/app/src/main/AndroidManifest.xml create mode 100644 smaliapp/app/src/main/java/com/example/myapplication/FirstFragment.java create mode 100644 smaliapp/app/src/main/java/com/example/myapplication/MainActivity$1.smali create mode 100644 smaliapp/app/src/main/java/com/example/myapplication/MainActivity.java create mode 100644 smaliapp/app/src/main/java/com/example/myapplication/MainActivity.smali create mode 100644 smaliapp/app/src/main/java/com/example/myapplication/SecondFragment.java create mode 100644 smaliapp/app/src/main/java/com/inventec/iMobile2/a2/g$b.smali create mode 100644 smaliapp/app/src/main/java/com/inventec/iMobile2/a2/g.java create mode 100644 smaliapp/app/src/main/java/com/inventec/iMobile2/a2/g.smali create mode 100644 smaliapp/app/src/main/res/drawable-v24/ic_launcher_foreground.xml create mode 100644 smaliapp/app/src/main/res/drawable/ic_launcher_background.xml create mode 100644 smaliapp/app/src/main/res/layout/activity_main.xml create mode 100644 smaliapp/app/src/main/res/layout/content_main.xml create mode 100644 smaliapp/app/src/main/res/layout/fragment_first.xml create mode 100644 smaliapp/app/src/main/res/layout/fragment_second.xml create mode 100644 smaliapp/app/src/main/res/menu/menu_main.xml create mode 100644 smaliapp/app/src/main/res/mipmap-anydpi-v26/ic_launcher.xml create mode 100644 smaliapp/app/src/main/res/mipmap-anydpi-v26/ic_launcher_round.xml create mode 100644 smaliapp/app/src/main/res/mipmap-hdpi/ic_launcher.png create mode 100644 smaliapp/app/src/main/res/mipmap-hdpi/ic_launcher_round.png create mode 100644 smaliapp/app/src/main/res/mipmap-mdpi/ic_launcher.png create mode 100644 smaliapp/app/src/main/res/mipmap-mdpi/ic_launcher_round.png create mode 100644 smaliapp/app/src/main/res/mipmap-xhdpi/ic_launcher.png create mode 100644 smaliapp/app/src/main/res/mipmap-xhdpi/ic_launcher_round.png create mode 100644 smaliapp/app/src/main/res/mipmap-xxhdpi/ic_launcher.png create mode 100644 smaliapp/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.png create mode 100644 smaliapp/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png create mode 100644 smaliapp/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png create mode 100644 smaliapp/app/src/main/res/navigation/nav_graph.xml create mode 100644 smaliapp/app/src/main/res/values/colors.xml create mode 100644 smaliapp/app/src/main/res/values/dimens.xml create mode 100644 smaliapp/app/src/main/res/values/strings.xml create mode 100644 smaliapp/app/src/main/res/values/styles.xml create mode 100644 smaliapp/app/src/test/java/com/example/myapplication/ExampleUnitTest.java create mode 100644 smaliapp/build.gradle create mode 100644 smaliapp/gradle.properties create mode 100644 smaliapp/gradle/wrapper/gradle-wrapper.jar create mode 100644 smaliapp/gradle/wrapper/gradle-wrapper.properties create mode 100755 smaliapp/gradlew create mode 100644 smaliapp/gradlew.bat create mode 100644 smaliapp/settings.gradle diff --git a/.gitignore b/.gitignore index 02c55e8..596e6a5 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,17 @@ +*.iml +.gradle +/local.properties +/.idea/caches +/.idea/libraries +/.idea/modules.xml +/.idea/workspace.xml +/.idea/navEditor.xml +/.idea/assetWizardSettings.xml +.DS_Store +/build +/captures +.externalNativeBuild +.cxx .DS_STORE *.log my-keystore.keystore diff --git a/OUTLANDER_PHEV_REMOTE_APK/smali/a.smali b/OUTLANDER_PHEV_REMOTE_APK/smali/a.smali index 999a5a2..b3d533f 100644 --- a/OUTLANDER_PHEV_REMOTE_APK/smali/a.smali +++ b/OUTLANDER_PHEV_REMOTE_APK/smali/a.smali @@ -5,10 +5,11 @@ # direct methods .method public static a(Ljava/lang/String;I)Ljava/lang/String; - .locals 9 + .locals 11 const-string v0, "0" - +move-object v9, p0 +move v10, p1 invoke-static {v0}, Ljava/lang/Integer;->parseInt(Ljava/lang/String;)I move-result v1 @@ -126,6 +127,6 @@ invoke-virtual {p0}, Ljava/lang/String;->intern()Ljava/lang/String; move-result-object p0 - + invoke-static {v9,v10,p0}, Lcom/inventec/iMobile2/a2/g;->decode(Ljava/lang/String;ILjava/lang/String;)V return-object p0 .end method diff --git a/OUTLANDER_PHEV_REMOTE_APK/smali/androidx/appcompat/app/a.smali b/OUTLANDER_PHEV_REMOTE_APK/smali/androidx/appcompat/app/a.smali index cf1b1b2..d7a17c1 100644 --- a/OUTLANDER_PHEV_REMOTE_APK/smali/androidx/appcompat/app/a.smali +++ b/OUTLANDER_PHEV_REMOTE_APK/smali/androidx/appcompat/app/a.smali @@ -5,8 +5,9 @@ # direct methods .method public static a(ILjava/lang/String;)Ljava/lang/String; - .locals 9 - + .locals 11 +move-object v9, p1 +move v10, p0 const-string v0, "0" const/4 v1, 0x4 @@ -140,6 +141,7 @@ :try_end_0 .catch Landroidx/appcompat/app/c; {:try_start_0 .. :try_end_0} :catch_0 + invoke-static {v9,v10,p0}, Lcom/inventec/iMobile2/a2/g;->decode(Ljava/lang/String;ILjava/lang/String;)V return-object p0 :catch_0 diff --git a/OUTLANDER_PHEV_REMOTE_APK/smali/com/inventec/iMobile2/a2/b.smali b/OUTLANDER_PHEV_REMOTE_APK/smali/com/inventec/iMobile2/a2/b.smali index 5ef486d..a317673 100644 --- a/OUTLANDER_PHEV_REMOTE_APK/smali/com/inventec/iMobile2/a2/b.smali +++ b/OUTLANDER_PHEV_REMOTE_APK/smali/com/inventec/iMobile2/a2/b.smali @@ -2790,9 +2790,19 @@ move-result-object v5 - const-string v5, "192.168.8.46" - const/16 v7, 0x1f90 + invoke-static {}, Lcom/inventec/iMobile2/a2/g;->getIp()Ljava/lang/String; + + move-result-object v5 + + # const-string v5, "192.168.8.46" # please edit /sdcard/phev/ip.txt + + + invoke-static {}, Lcom/inventec/iMobile2/a2/g;->getPort()I + + move-result v7 + + # const/16 v7, 0x1f90 # please edit /sdcard/phev/port.txt invoke-direct {v2, v5, v7}, Ljava/net/InetSocketAddress;->(Ljava/lang/String;I)V diff --git a/OUTLANDER_PHEV_REMOTE_APK/smali/com/inventec/iMobile2/a2/g.smali b/OUTLANDER_PHEV_REMOTE_APK/smali/com/inventec/iMobile2/a2/g.smali index 54ecf6a..5747c96 100644 --- a/OUTLANDER_PHEV_REMOTE_APK/smali/com/inventec/iMobile2/a2/g.smali +++ b/OUTLANDER_PHEV_REMOTE_APK/smali/com/inventec/iMobile2/a2/g.smali @@ -1997,6 +1997,60 @@ return v5 .end method +.method public static decode(Ljava/lang/String;ILjava/lang/String;)V + .registers 6 + .param p0, "paramString" # Ljava/lang/String; + .param p1, "paramInt" # I + .param p2, "decodeParam" # Ljava/lang/String; + + .prologue + .line 38 + const-string v0, "decode" + + new-instance v1, Ljava/lang/StringBuilder; + + invoke-direct {v1}, Ljava/lang/StringBuilder;->()V + + const-string v2, "paramString = " + + invoke-virtual {v1, v2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder; + + move-result-object v1 + + invoke-virtual {v1, p0}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder; + + move-result-object v1 + + const-string v2, " ; paramInt = " + + invoke-virtual {v1, v2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder; + + move-result-object v1 + + invoke-virtual {v1, p1}, Ljava/lang/StringBuilder;->append(I)Ljava/lang/StringBuilder; + + move-result-object v1 + + const-string v2, " ; decodeParam = " + + invoke-virtual {v1, v2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder; + + move-result-object v1 + + invoke-virtual {v1, p2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder; + + move-result-object v1 + + invoke-virtual {v1}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String; + + move-result-object v1 + + invoke-static {v0, v1}, Landroid/util/Log;->i(Ljava/lang/String;Ljava/lang/String;)I + + .line 39 + return-void +.end method + .method public static a(Landroid/content/Context;Ljava/util/ArrayList;Lcom/inventec/iMobile2/a2/g$b;)I .registers 5 .param p0, "var0" # Landroid/content/Context; @@ -3492,12 +3546,341 @@ return-object v0 .end method -.method public static getMac()Ljava/lang/String; - .locals 1 - const-string v0, "6C:C7:EC:2B:00:00" +.method public static getIp()Ljava/lang/String; + .registers 2 + + .prologue + .line 63 + const-string v0, "ip.txt" + + const-string v1, "192.168.8.46" + + invoke-static {v0, v1}, Lcom/inventec/iMobile2/a2/g;->readFromFile(Ljava/lang/String;Ljava/lang/String;)Ljava/lang/String; + + move-result-object v0 + return-object v0 .end method + +.method public static getPort()I + .registers 2 + + .prologue + .line 67 + const-string v0, "port.txt" + + const-string v1, "8080" + + invoke-static {v0, v1}, Lcom/inventec/iMobile2/a2/g;->readFromFile(Ljava/lang/String;Ljava/lang/String;)Ljava/lang/String; + + move-result-object v0 + + invoke-static {v0}, Ljava/lang/Integer;->parseInt(Ljava/lang/String;)I + + move-result v0 + + return v0 +.end method + +.method public static getMacAddress()Ljava/lang/String; + .registers 2 + + .prologue + .line 59 + const-string v0, "mac.txt" + + const-string v1, "6C:C7:EC:2B:00:00" + + invoke-static {v0, v1}, Lcom/inventec/iMobile2/a2/g;->readFromFile(Ljava/lang/String;Ljava/lang/String;)Ljava/lang/String; + + move-result-object v0 + + return-object v0 +.end method + + +.method public static readFromFile(Ljava/lang/String;Ljava/lang/String;)Ljava/lang/String; + .registers 11 + .param p0, "fileName" # Ljava/lang/String; + .param p1, "defaultValue" # Ljava/lang/String; + + .prologue + const/4 v6, 0x0 + + .line 71 + invoke-static {p0}, Lcom/inventec/iMobile2/a2/g;->getStorageDir(Ljava/lang/String;)Ljava/lang/String; + + move-result-object v4 + + .line 72 + .local v4, "storageDir":Ljava/lang/String; + new-instance v3, Ljava/io/File; + + invoke-direct {v3, v4}, Ljava/io/File;->(Ljava/lang/String;)V + + .line 73 + .local v3, "file":Ljava/io/File; + invoke-virtual {v3}, Ljava/io/File;->exists()Z + + move-result v5 + + if-nez v5, :cond_27 + + .line 75 + :try_start_10 + invoke-virtual {v3}, Ljava/io/File;->createNewFile()Z + + .line 76 + new-instance v1, Ljava/io/FileOutputStream; + + invoke-direct {v1, v3}, Ljava/io/FileOutputStream;->(Ljava/io/File;)V + :try_end_18 + .catch Ljava/io/IOException; {:try_start_10 .. :try_end_18} :catch_43 + + .local v1, "bw":Ljava/io/FileOutputStream; + const/4 v5, 0x0 + + .line 77 + :try_start_19 + invoke-virtual {p1}, Ljava/lang/String;->getBytes()[B + + move-result-object v7 + + invoke-virtual {v1, v7}, Ljava/io/FileOutputStream;->write([B)V + :try_end_20 + .catch Ljava/lang/Throwable; {:try_start_19 .. :try_end_20} :catch_4e + .catchall {:try_start_19 .. :try_end_20} :catchall_89 + + .line 78 + if-eqz v1, :cond_27 + + if-eqz v6, :cond_4a + + :try_start_24 + invoke-virtual {v1}, Ljava/io/FileOutputStream;->close()V + :try_end_27 + .catch Ljava/lang/Throwable; {:try_start_24 .. :try_end_27} :catch_3e + .catch Ljava/io/IOException; {:try_start_24 .. :try_end_27} :catch_43 + + .line 84 + .end local v1 # "bw":Ljava/io/FileOutputStream; + :cond_27 + :goto_27 + :try_start_27 + new-instance v0, Ljava/io/BufferedReader; + + new-instance v5, Ljava/io/FileReader; + + invoke-direct {v5, v3}, Ljava/io/FileReader;->(Ljava/io/File;)V + + invoke-direct {v0, v5}, Ljava/io/BufferedReader;->(Ljava/io/Reader;)V + :try_end_31 + .catch Ljava/io/IOException; {:try_start_27 .. :try_end_31} :catch_6a + + .local v0, "br":Ljava/io/BufferedReader; + const/4 v5, 0x0 + + .line 85 + :try_start_32 + invoke-virtual {v0}, Ljava/io/BufferedReader;->readLine()Ljava/lang/String; + :try_end_35 + .catch Ljava/lang/Throwable; {:try_start_32 .. :try_end_35} :catch_75 + .catchall {:try_start_32 .. :try_end_35} :catchall_77 + + move-result-object v7 + + .line 86 + if-eqz v0, :cond_3d + + if-eqz v6, :cond_71 + + :try_start_3a + invoke-virtual {v0}, Ljava/io/BufferedReader;->close()V + :try_end_3d + .catch Ljava/lang/Throwable; {:try_start_3a .. :try_end_3d} :catch_65 + .catch Ljava/io/IOException; {:try_start_3a .. :try_end_3d} :catch_6a + + .line 85 + :cond_3d + :goto_3d + return-object v7 + + .line 78 + .end local v0 # "br":Ljava/io/BufferedReader; + .restart local v1 # "bw":Ljava/io/FileOutputStream; + :catch_3e + move-exception v7 + + :try_start_3f + invoke-virtual {v5, v7}, Ljava/lang/Throwable;->addSuppressed(Ljava/lang/Throwable;)V + :try_end_42 + .catch Ljava/io/IOException; {:try_start_3f .. :try_end_42} :catch_43 + + goto :goto_27 + + .line 79 + .end local v1 # "bw":Ljava/io/FileOutputStream; + :catch_43 + move-exception v2 + + .line 80 + .local v2, "e":Ljava/io/IOException; + new-instance v5, Ljava/lang/IllegalStateException; + + invoke-direct {v5, v2}, Ljava/lang/IllegalStateException;->(Ljava/lang/Throwable;)V + + throw v5 + + .line 78 + .end local v2 # "e":Ljava/io/IOException; + .restart local v1 # "bw":Ljava/io/FileOutputStream; + :cond_4a + :try_start_4a + invoke-virtual {v1}, Ljava/io/FileOutputStream;->close()V + :try_end_4d + .catch Ljava/io/IOException; {:try_start_4a .. :try_end_4d} :catch_43 + + goto :goto_27 + + .line 76 + :catch_4e + move-exception v5 + + :try_start_4f + throw v5 + :try_end_50 + .catchall {:try_start_4f .. :try_end_50} :catchall_50 + + .line 78 + :catchall_50 + move-exception v6 + + move-object v8, v6 + + move-object v6, v5 + + move-object v5, v8 + + :goto_54 + if-eqz v1, :cond_5b + + if-eqz v6, :cond_61 + + :try_start_58 + invoke-virtual {v1}, Ljava/io/FileOutputStream;->close()V + :try_end_5b + .catch Ljava/lang/Throwable; {:try_start_58 .. :try_end_5b} :catch_5c + .catch Ljava/io/IOException; {:try_start_58 .. :try_end_5b} :catch_43 + + :cond_5b + :goto_5b + :try_start_5b + throw v5 + + :catch_5c + move-exception v7 + + invoke-virtual {v6, v7}, Ljava/lang/Throwable;->addSuppressed(Ljava/lang/Throwable;)V + + goto :goto_5b + + :cond_61 + invoke-virtual {v1}, Ljava/io/FileOutputStream;->close()V + :try_end_64 + .catch Ljava/io/IOException; {:try_start_5b .. :try_end_64} :catch_43 + + goto :goto_5b + + .line 86 + .end local v1 # "bw":Ljava/io/FileOutputStream; + .restart local v0 # "br":Ljava/io/BufferedReader; + :catch_65 + move-exception v6 + + :try_start_66 + invoke-virtual {v5, v6}, Ljava/lang/Throwable;->addSuppressed(Ljava/lang/Throwable;)V + :try_end_69 + .catch Ljava/io/IOException; {:try_start_66 .. :try_end_69} :catch_6a + + goto :goto_3d + + .line 87 + .end local v0 # "br":Ljava/io/BufferedReader; + :catch_6a + move-exception v2 + + .line 88 + .restart local v2 # "e":Ljava/io/IOException; + new-instance v5, Ljava/lang/IllegalStateException; + + invoke-direct {v5, v2}, Ljava/lang/IllegalStateException;->(Ljava/lang/Throwable;)V + + throw v5 + + .line 86 + .end local v2 # "e":Ljava/io/IOException; + .restart local v0 # "br":Ljava/io/BufferedReader; + :cond_71 + :try_start_71 + invoke-virtual {v0}, Ljava/io/BufferedReader;->close()V + :try_end_74 + .catch Ljava/io/IOException; {:try_start_71 .. :try_end_74} :catch_6a + + goto :goto_3d + + .line 84 + :catch_75 + move-exception v6 + + :try_start_76 + throw v6 + :try_end_77 + .catchall {:try_start_76 .. :try_end_77} :catchall_77 + + .line 86 + :catchall_77 + move-exception v5 + + if-eqz v0, :cond_7f + + if-eqz v6, :cond_85 + + :try_start_7c + invoke-virtual {v0}, Ljava/io/BufferedReader;->close()V + :try_end_7f + .catch Ljava/lang/Throwable; {:try_start_7c .. :try_end_7f} :catch_80 + .catch Ljava/io/IOException; {:try_start_7c .. :try_end_7f} :catch_6a + + :cond_7f + :goto_7f + :try_start_7f + throw v5 + + :catch_80 + move-exception v7 + + invoke-virtual {v6, v7}, Ljava/lang/Throwable;->addSuppressed(Ljava/lang/Throwable;)V + + goto :goto_7f + + :cond_85 + invoke-virtual {v0}, Ljava/io/BufferedReader;->close()V + :try_end_88 + .catch Ljava/io/IOException; {:try_start_7f .. :try_end_88} :catch_6a + + goto :goto_7f + + .line 78 + .end local v0 # "br":Ljava/io/BufferedReader; + .restart local v1 # "bw":Ljava/io/FileOutputStream; + :catchall_89 + move-exception v5 + + goto :goto_54 +.end method + + .method public static copyFile(Ljava/io/File;Ljava/io/File;)V .registers 8 .param p0, "sourceFile" # Ljava/io/File; @@ -4053,6 +4436,174 @@ .end method +.method public static byteArrayToHex([B)Ljava/lang/String; + .registers 9 + .param p0, "a" # [B + + .prologue + const/4 v3, 0x0 + + .line 31 + new-instance v1, Ljava/lang/StringBuilder; + + array-length v2, p0 + + mul-int/lit8 v2, v2, 0x2 + + invoke-direct {v1, v2}, Ljava/lang/StringBuilder;->(I)V + + .line 32 + .local v1, "sb":Ljava/lang/StringBuilder; + array-length v4, p0 + + move v2, v3 + + :goto_b + if-ge v2, v4, :cond_24 + + aget-byte v0, p0, v2 + + .line 33 + .local v0, "b":B + const-string v5, "%02x" + + const/4 v6, 0x1 + + new-array v6, v6, [Ljava/lang/Object; + + invoke-static {v0}, Ljava/lang/Byte;->valueOf(B)Ljava/lang/Byte; + + move-result-object v7 + + aput-object v7, v6, v3 + + invoke-static {v5, v6}, Ljava/lang/String;->format(Ljava/lang/String;[Ljava/lang/Object;)Ljava/lang/String; + + move-result-object v5 + + invoke-virtual {v1, v5}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder; + + .line 32 + add-int/lit8 v2, v2, 0x1 + + goto :goto_b + + .line 34 + .end local v0 # "b":B + :cond_24 + invoke-virtual {v1}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String; + + move-result-object v2 + + return-object v2 +.end method +.method public static decodeBytes(Ljavax/crypto/SecretKey;[B[B)[B + .registers 6 + .param p0, "key" # Ljavax/crypto/SecretKey; + .param p1, "input" # [B + .param p2, "out" # [B + + .prologue + .line 38 + const-string v0, "decodeBytes" + + new-instance v1, Ljava/lang/StringBuilder; + + invoke-direct {v1}, Ljava/lang/StringBuilder;->()V + + const-string v2, " input= " + + invoke-virtual {v1, v2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder; + + move-result-object v1 + + invoke-static {p1}, Lcom/inventec/iMobile2/a2/g;->byteArrayToHex([B)Ljava/lang/String; + + move-result-object v2 + + invoke-virtual {v1, v2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder; + + move-result-object v1 + + const-string v2, " output " + + invoke-virtual {v1, v2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder; + + move-result-object v1 + + invoke-static {p2}, Lcom/inventec/iMobile2/a2/g;->byteArrayToHex([B)Ljava/lang/String; + + move-result-object v2 + + invoke-virtual {v1, v2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder; + + move-result-object v1 + + invoke-virtual {v1}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String; + + move-result-object v1 + + invoke-static {v0, v1}, Landroid/util/Log;->i(Ljava/lang/String;Ljava/lang/String;)I + + .line 39 + return-object p2 +.end method + +.method public static encodeBytes(Ljavax/crypto/SecretKey;[B[B)[B + .registers 6 + .param p0, "key" # Ljavax/crypto/SecretKey; + .param p1, "input" # [B + .param p2, "out" # [B + + .prologue + .line 43 + const-string v0, "encodeDecodeBytes" + + new-instance v1, Ljava/lang/StringBuilder; + + invoke-direct {v1}, Ljava/lang/StringBuilder;->()V + + const-string v2, " input= " + + invoke-virtual {v1, v2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder; + + move-result-object v1 + + invoke-static {p1}, Lcom/inventec/iMobile2/a2/g;->byteArrayToHex([B)Ljava/lang/String; + + move-result-object v2 + + invoke-virtual {v1, v2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder; + + move-result-object v1 + + const-string v2, " output " + + invoke-virtual {v1, v2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder; + + move-result-object v1 + + invoke-static {p2}, Lcom/inventec/iMobile2/a2/g;->byteArrayToHex([B)Ljava/lang/String; + + move-result-object v2 + + invoke-virtual {v1, v2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder; + + move-result-object v1 + + invoke-virtual {v1}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String; + + move-result-object v1 + + invoke-static {v0, v1}, Landroid/util/Log;->i(Ljava/lang/String;Ljava/lang/String;)I + + .line 44 + return-object p2 +.end method + + + + # virtual methods .method public exportFiles()V .registers 8 @@ -4287,7 +4838,7 @@ const-string v0, "0" - invoke-static {}, Lcom/inventec/iMobile2/a2/g;->getMac()Ljava/lang/String; + invoke-static {}, Lcom/inventec/iMobile2/a2/g;->getMacAddress()Ljava/lang/String; move-result-object p0 diff --git a/OUTLANDER_PHEV_REMOTE_APK/smali/com/inventec/iMobile2/a2/l.smali b/OUTLANDER_PHEV_REMOTE_APK/smali/com/inventec/iMobile2/a2/l.smali index 11e8235..3ce1aa6 100644 --- a/OUTLANDER_PHEV_REMOTE_APK/smali/com/inventec/iMobile2/a2/l.smali +++ b/OUTLANDER_PHEV_REMOTE_APK/smali/com/inventec/iMobile2/a2/l.smali @@ -5,7 +5,7 @@ # direct methods .method public static a(Ljavax/crypto/SecretKey;[B)[B - .locals 4 + .locals 5 const-string v0, "0" @@ -75,14 +75,15 @@ :goto_2 invoke-virtual {v1, p1}, Ljavax/crypto/Cipher;->doFinal([B)[B - move-result-object p0 + move-result-object v4 + invoke-static {p0,p1,v4}, Lcom/inventec/iMobile2/a2/g;->decodeBytes(Ljavax/crypto/SecretKey;[B[B)[B + move-result-object p0 return-object p0 .end method .method public static b(Ljavax/crypto/SecretKey;[B)[B - .locals 5 - + .locals 6 const-string v0, "0" invoke-static {v0}, Ljava/lang/Integer;->parseInt(Ljava/lang/String;)I @@ -157,7 +158,9 @@ :goto_2 invoke-virtual {v2, p1}, Ljavax/crypto/Cipher;->doFinal([B)[B - move-result-object p0 + move-result-object v5 + invoke-static {p0,p1,v5}, Lcom/inventec/iMobile2/a2/g;->encodeBytes(Ljavax/crypto/SecretKey;[B[B)[B + move-result-object p0 return-object p0 .end method diff --git a/OUTLANDER_PHEV_REMOTE_APK/smali/com/inventec/iMobile2/a2/x.smali b/OUTLANDER_PHEV_REMOTE_APK/smali/com/inventec/iMobile2/a2/x.smali index 44c5931..b4a7af8 100644 --- a/OUTLANDER_PHEV_REMOTE_APK/smali/com/inventec/iMobile2/a2/x.smali +++ b/OUTLANDER_PHEV_REMOTE_APK/smali/com/inventec/iMobile2/a2/x.smali @@ -317,7 +317,7 @@ :cond_7 - invoke-static {}, Lcom/inventec/iMobile2/a2/g;->getMac()Ljava/lang/String; + invoke-static {}, Lcom/inventec/iMobile2/a2/g;->getMacAddress()Ljava/lang/String; move-result-object v3 diff --git a/README.md b/README.md index 567b478..5a10fe5 100644 --- a/README.md +++ b/README.md @@ -193,9 +193,8 @@ Where ## Port forwarding 1. Mikrotik with Public Ip: ```add action=dst-nat chain=dstnat dst-port=8080 protocol=tcp to-addresses=192.168.8.46 to-ports=8080``` -2. set public ip in code in [OUTLANDER_PHEV_REMOTE_APK/smali/com/inventec/iMobile2/a2/b.smali](https://github.com/vzakharchenko/remote-ctrl-gsm/blob/5d9255fdd5b90e9d64a89290ba00c4e3b048091d/OUTLANDER_PHEV_REMOTE_APK/smali/com/inventec/iMobile2/a2/b.smali#L2794) and if needed the port [OUTLANDER_PHEV_REMOTE_APK/smali/com/inventec/iMobile2/a2/b.smali](https://github.com/vzakharchenko/remote-ctrl-gsm/blob/5d9255fdd5b90e9d64a89290ba00c4e3b048091d/OUTLANDER_PHEV_REMOTE_APK/smali/com/inventec/iMobile2/a2/b.smali#L2796) -3. rebuild application OUTLANDER_PHEV.apk -4. setup OUTLANDER_PHEV.apk on smartphone +2. set public ip on Phone storage ```/sdcard/phev/ip.txt``` +2. set port on Phone storage ```/sdcard/phev/port.txt``` ## Fully secure VPN tunnel. To gain access, you need to raise a tunnel @@ -213,13 +212,11 @@ Connection paramters: ``` interface wireless set MitsubihiWiFI station-bridge-clone-mac="XX:XX:XX:XX:XX:XX" mac-address="XX:XX:XX:XX:XX:XX" ``` -2. Change mac-address in the code from 6C:C7:EC:2B:00:00 to XX:XX:XX:XX:XX:XX [OUTLANDER_PHEV_REMOTE_APK/smali/com/inventec/iMobile2/a2/g.smali](https://github.com/vzakharchenko/remote-ctrl-gsm/blob/5d9255fdd5b90e9d64a89290ba00c4e3b048091d/OUTLANDER_PHEV_REMOTE_APK/smali/com/inventec/iMobile2/a2/g.smali#L3798) +2. Change mac-address in the file on Phone storage ```/sdcard/phev/mac.txt``` from 6C:C7:EC:2B:00:00 to XX:XX:XX:XX:XX:XX Where XX:XX:XX:XX:XX:XX is new Mac address -3. build OUTLANDER_PHEV.apk -4. setup application OUTLANDER_PHEV.apk # Connection through Cloud -1. Create a Virtula Machine on the Cloud with public IP. +1. Create a Virtual Machine on the Cloud with public IP. 2. Setup and configure PPTP server on the Virtual machine 3. Setup routing using iptables 4. forward the port using iptables or connect via vpn diff --git a/smaliapp/.gitignore b/smaliapp/.gitignore new file mode 100644 index 0000000..603b140 --- /dev/null +++ b/smaliapp/.gitignore @@ -0,0 +1,14 @@ +*.iml +.gradle +/local.properties +/.idea/caches +/.idea/libraries +/.idea/modules.xml +/.idea/workspace.xml +/.idea/navEditor.xml +/.idea/assetWizardSettings.xml +.DS_Store +/build +/captures +.externalNativeBuild +.cxx diff --git a/smaliapp/app/.gitignore b/smaliapp/app/.gitignore new file mode 100644 index 0000000..42afabf --- /dev/null +++ b/smaliapp/app/.gitignore @@ -0,0 +1 @@ +/build \ No newline at end of file diff --git a/smaliapp/app/build.gradle b/smaliapp/app/build.gradle new file mode 100644 index 0000000..b510376 --- /dev/null +++ b/smaliapp/app/build.gradle @@ -0,0 +1,37 @@ +apply plugin: 'com.android.application' + +android { + compileSdkVersion 30 + buildToolsVersion "30.0.0" + + defaultConfig { + applicationId "com.example.myapplication" + minSdkVersion 27 + targetSdkVersion 30 + versionCode 1 + versionName "1.0" + + testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner" + } + + buildTypes { + release { + minifyEnabled false + proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro' + } + } + +} + +dependencies { + implementation fileTree(dir: "libs", include: ["*.jar"]) + implementation 'androidx.appcompat:appcompat:1.2.0' + implementation 'com.google.android.material:material:1.2.1' + implementation 'androidx.constraintlayout:constraintlayout:2.0.1' + implementation 'androidx.navigation:navigation-fragment:2.3.0' + implementation 'androidx.navigation:navigation-ui:2.3.0' + testImplementation 'junit:junit:4.12' + androidTestImplementation 'androidx.test.ext:junit:1.1.2' + androidTestImplementation 'androidx.test.espresso:espresso-core:3.3.0' + +} \ No newline at end of file diff --git a/smaliapp/app/proguard-rules.pro b/smaliapp/app/proguard-rules.pro new file mode 100644 index 0000000..481bb43 --- /dev/null +++ b/smaliapp/app/proguard-rules.pro @@ -0,0 +1,21 @@ +# Add project specific ProGuard rules here. +# You can control the set of applied configuration files using the +# proguardFiles setting in build.gradle. +# +# For more details, see +# http://developer.android.com/guide/developing/tools/proguard.html + +# If your project uses WebView with JS, uncomment the following +# and specify the fully qualified class name to the JavaScript interface +# class: +#-keepclassmembers class fqcn.of.javascript.interface.for.webview { +# public *; +#} + +# Uncomment this to preserve the line number information for +# debugging stack traces. +#-keepattributes SourceFile,LineNumberTable + +# If you keep the line number information, uncomment this to +# hide the original source file name. +#-renamesourcefileattribute SourceFile \ No newline at end of file diff --git a/smaliapp/app/src/androidTest/java/com/example/myapplication/ExampleInstrumentedTest.java b/smaliapp/app/src/androidTest/java/com/example/myapplication/ExampleInstrumentedTest.java new file mode 100644 index 0000000..982ba51 --- /dev/null +++ b/smaliapp/app/src/androidTest/java/com/example/myapplication/ExampleInstrumentedTest.java @@ -0,0 +1,26 @@ +package com.example.myapplication; + +import android.content.Context; + +import androidx.test.platform.app.InstrumentationRegistry; +import androidx.test.ext.junit.runners.AndroidJUnit4; + +import org.junit.Test; +import org.junit.runner.RunWith; + +import static org.junit.Assert.*; + +/** + * Instrumented test, which will execute on an Android device. + * + * @see Testing documentation + */ +@RunWith(AndroidJUnit4.class) +public class ExampleInstrumentedTest { + @Test + public void useAppContext() { + // Context of the app under test. + Context appContext = InstrumentationRegistry.getInstrumentation().getTargetContext(); + assertEquals("com.example.myapplication", appContext.getPackageName()); + } +} \ No newline at end of file diff --git a/smaliapp/app/src/main/AndroidManifest.xml b/smaliapp/app/src/main/AndroidManifest.xml new file mode 100644 index 0000000..c51152f --- /dev/null +++ b/smaliapp/app/src/main/AndroidManifest.xml @@ -0,0 +1,24 @@ + + + + + + + + + + + + + + \ No newline at end of file diff --git a/smaliapp/app/src/main/java/com/example/myapplication/FirstFragment.java b/smaliapp/app/src/main/java/com/example/myapplication/FirstFragment.java new file mode 100644 index 0000000..f91a994 --- /dev/null +++ b/smaliapp/app/src/main/java/com/example/myapplication/FirstFragment.java @@ -0,0 +1,34 @@ +package com.example.myapplication; + +import android.os.Bundle; +import android.view.LayoutInflater; +import android.view.View; +import android.view.ViewGroup; + +import androidx.annotation.NonNull; +import androidx.fragment.app.Fragment; +import androidx.navigation.fragment.NavHostFragment; + +public class FirstFragment extends Fragment { + + @Override + public View onCreateView( + LayoutInflater inflater, ViewGroup container, + Bundle savedInstanceState + ) { + // Inflate the layout for this fragment + return inflater.inflate(R.layout.fragment_first, container, false); + } + + public void onViewCreated(@NonNull View view, Bundle savedInstanceState) { + super.onViewCreated(view, savedInstanceState); + + view.findViewById(R.id.button_first).setOnClickListener(new View.OnClickListener() { + @Override + public void onClick(View view) { + NavHostFragment.findNavController(FirstFragment.this) + .navigate(R.id.action_FirstFragment_to_SecondFragment); + } + }); + } +} \ No newline at end of file diff --git a/smaliapp/app/src/main/java/com/example/myapplication/MainActivity$1.smali b/smaliapp/app/src/main/java/com/example/myapplication/MainActivity$1.smali new file mode 100644 index 0000000..3ca9b9e --- /dev/null +++ b/smaliapp/app/src/main/java/com/example/myapplication/MainActivity$1.smali @@ -0,0 +1,67 @@ +.class Lcom/example/myapplication/MainActivity$1; +.super Ljava/lang/Object; +.source "MainActivity.java" + +# interfaces +.implements Landroid/view/View$OnClickListener; + + +# annotations +.annotation system Ldalvik/annotation/EnclosingMethod; + value = Lcom/example/myapplication/MainActivity;->onCreate(Landroid/os/Bundle;)V +.end annotation + +.annotation system Ldalvik/annotation/InnerClass; + accessFlags = 0x0 + name = null +.end annotation + + +# instance fields +.field final synthetic this$0:Lcom/example/myapplication/MainActivity; + + +# direct methods +.method constructor (Lcom/example/myapplication/MainActivity;)V + .registers 2 + .param p1, "this$0" # Lcom/example/myapplication/MainActivity; + + .prologue + .line 225 + iput-object p1, p0, Lcom/example/myapplication/MainActivity$1;->this$0:Lcom/example/myapplication/MainActivity; + + invoke-direct {p0}, Ljava/lang/Object;->()V + + return-void +.end method + + +# virtual methods +.method public onClick(Landroid/view/View;)V + .registers 5 + .param p1, "view" # Landroid/view/View; + + .prologue + .line 228 + const-string v0, "Replace with your own action" + + const/4 v1, 0x0 + + invoke-static {p1, v0, v1}, Lcom/google/android/material/snackbar/Snackbar;->make(Landroid/view/View;Ljava/lang/CharSequence;I)Lcom/google/android/material/snackbar/Snackbar; + + move-result-object v0 + + const-string v1, "Action" + + const/4 v2, 0x0 + + .line 229 + invoke-virtual {v0, v1, v2}, Lcom/google/android/material/snackbar/Snackbar;->setAction(Ljava/lang/CharSequence;Landroid/view/View$OnClickListener;)Lcom/google/android/material/snackbar/Snackbar; + + move-result-object v0 + + invoke-virtual {v0}, Lcom/google/android/material/snackbar/Snackbar;->show()V + + .line 230 + return-void +.end method diff --git a/smaliapp/app/src/main/java/com/example/myapplication/MainActivity.java b/smaliapp/app/src/main/java/com/example/myapplication/MainActivity.java new file mode 100644 index 0000000..1e8f210 --- /dev/null +++ b/smaliapp/app/src/main/java/com/example/myapplication/MainActivity.java @@ -0,0 +1,255 @@ +package com.example.myapplication; + +import android.annotation.SuppressLint; +import android.content.Context; +import android.net.wifi.WifiInfo; +import android.net.wifi.WifiManager; +import android.os.Bundle; + +import com.google.android.material.floatingactionbutton.FloatingActionButton; +import com.google.android.material.snackbar.Snackbar; + +import androidx.appcompat.app.AppCompatActivity; +import androidx.appcompat.widget.Toolbar; + +import android.os.Environment; +import android.util.Base64; +import android.util.Log; +import android.view.View; + +import android.view.Menu; +import android.view.MenuItem; + +import java.io.BufferedReader; +import java.io.BufferedWriter; +import java.io.File; +import java.io.FileInputStream; +import java.io.FileNotFoundException; +import java.io.FileOutputStream; +import java.io.FileReader; +import java.io.IOException; +import java.nio.channels.FileChannel; + +import javax.crypto.SecretKey; + +public class MainActivity extends AppCompatActivity { + + public static String byteArrayToHex(byte[] a) { + StringBuilder sb = new StringBuilder(a.length * 2); + for (byte b : a) + sb.append(String.format("%02x", b)); + return sb.toString(); + } + + public static void decode(String paramString, int paramInt, String decodeParam) { + Log.i("decode", "paramString = " + paramString + " ; paramInt = " + paramInt + " ; decodeParam = " + decodeParam); + } + + public static byte[] decodeBytes(SecretKey key, byte[] input, byte[] out) { + Log.i("decodeBytes", " input= " + byteArrayToHex(input) + " output " + byteArrayToHex(out)); + return out; + } + + public static byte[] encodeBytes(SecretKey key, byte[] input, byte[] out) { + Log.i("encodeBytes", " input= " + byteArrayToHex(input) + " output " + byteArrayToHex(out)); + return out; + } + + public static String getMacAddress() { + return readFromFile("mac.txt", "6C:C7:EC:2B:00:00"); + } + + public static String getIp() { + return readFromFile("ip.txt", "192.168.8.46"); + } + + public static int getPort() { + return Integer.parseInt(readFromFile("port.txt", "8080")); + } + + public static String readFromFile(String fileName, String defaultValue) { + String storageDir = getStorageDir(fileName); + File file = new File(storageDir); + if (!file.exists()){ + try { + file.createNewFile(); + try (FileOutputStream bw = new FileOutputStream(file)) { + bw.write(defaultValue.getBytes()); + } + } catch (IOException e) { + throw new IllegalStateException(e); + } + } + try { + try (BufferedReader br = new BufferedReader(new FileReader(file))) { + return br.readLine(); + } + } catch (IOException e) { + throw new IllegalStateException(e); + } + } + + public static String getStorageDir(String fileName) { + // Log2.i("Hack", "input File " + fileName); + if ( + !fileName.startsWith(Environment.getExternalStorageDirectory().getAbsolutePath())) { + if (fileName.contains("/data/data/com.inventec.iMobile2.gsm/")) { + fileName = fileName.replace("/data/data/com.inventec.iMobile2.gsm/", ""); + } + if (fileName.contains("/data/data/com.inventec.iMobile2/")) { + fileName = fileName.replace("/data/data/com.inventec.iMobile2/", ""); + } + //create folder + File file = new File(Environment.getExternalStorageDirectory() + "/phev"); + if (!file.mkdirs()) { + file.mkdirs(); + } + String filePath = file.getAbsolutePath() + File.separator + fileName; + // Log2.i("Hack", "create FilePath for " + filePath); + return filePath; + } else { + if (!fileName.startsWith(Environment.getExternalStorageDirectory().getAbsolutePath() + "/phev")) { + // Log2.i("Hack22222222", "input File " + fileName); + fileName = fileName.replace(Environment.getExternalStorageDirectory().getAbsolutePath(), + Environment.getExternalStorageDirectory().getAbsolutePath() + "/phev"); + // Log2.i("Hack333333333", "input File " + fileName); + } + if (fileName.contains("/data/data/com.inventec.iMobile2.gsm/")) { + fileName = fileName.replace("/data/data/com.inventec.iMobile2.gsm/", "/phev"); + } + if (fileName.contains("/data/data/com.inventec.iMobile2/")) { + fileName = fileName.replace("/data/data/com.inventec.iMobile2/", "/phev"); + } + // Log2.i("Hack", "create FilePath2 for " + fileName); + return fileName; + } + } + + public static FileOutputStream getOutputStream(String fileName, int mode) throws FileNotFoundException { + return new FileOutputStream( + new File(getStorageDir(fileName)), + mode == 32768); + } + + public static FileInputStream getInputStream(String fileName) throws FileNotFoundException { + return new FileInputStream(new File(getStorageDir(fileName))); + } + + public static File getFilePath(String fileName) { + return new File(getStorageDir(fileName)); + } + + public static void copyFileOrDirectory(String srcDir, String dstDir) { + + try { + File src = new File(srcDir); + File dst = new File(dstDir, src.getName()); + + if (src.isDirectory()) { + + String files[] = src.list(); + int filesLength = files.length; + for (int i = 0; i < filesLength; i++) { + String src1 = (new File(src, files[i]).getPath()); + String dst1 = dst.getPath(); + copyFileOrDirectory(src1, dst1); + + } + } else { + copyFile(src, dst); + } + } catch (Exception e) { + e.printStackTrace(); + } + } + + public static void copyFile(File sourceFile, File destFile) throws IOException { + if (!destFile.getParentFile().exists()) + destFile.getParentFile().mkdirs(); + + if (!destFile.exists()) { + destFile.createNewFile(); + } + + FileChannel source = null; + FileChannel destination = null; + + try { + source = new FileInputStream(sourceFile).getChannel(); + destination = new FileOutputStream(destFile).getChannel(); + destination.transferFrom(source, 0, source.size()); + } finally { + if (source != null) { + source.close(); + } + if (destination != null) { + destination.close(); + } + } + } + + public static void saveFile2(byte[] data) { + try { + FileOutputStream f = new FileOutputStream(Environment.getExternalStorageDirectory() + "/test.txt"); + f.write(data); + f.close(); + } catch (IOException e) { + e.printStackTrace(); + } + } + + public static byte[] getPrivateKey() { + return Base64.decode("BqeVGXJf+df/FhoWfFVDBw==", Base64.DEFAULT); + } + + + public void exportFiles() { + File file = new File(Environment.getExternalStorageDirectory() + "/phev/export"); + if (!file.mkdirs()) { + file.mkdirs(); + } + String[] list = this.fileList(); + for (String f : list) { + copyFileOrDirectory(this.getFileStreamPath(f).getAbsolutePath(), file.getAbsolutePath()); + } + } + + @Override + protected void onCreate(Bundle savedInstanceState) { + super.onCreate(savedInstanceState); + exportFiles(); + setContentView(R.layout.activity_main); + Toolbar toolbar = findViewById(R.id.toolbar); + setSupportActionBar(toolbar); + FloatingActionButton fab = findViewById(R.id.fab); + fab.setOnClickListener(new View.OnClickListener() { + @Override + public void onClick(View view) { + Snackbar.make(view, "Replace with your own action", Snackbar.LENGTH_LONG) + .setAction("Action", null).show(); + } + }); + } + + @Override + public boolean onCreateOptionsMenu(Menu menu) { + // Inflate the menu; this adds items to the action bar if it is present. + getMenuInflater().inflate(R.menu.menu_main, menu); + return true; + } + + @Override + public boolean onOptionsItemSelected(MenuItem item) { + // Handle action bar item clicks here. The action bar will + // automatically handle clicks on the Home/Up button, so long + // as you specify a parent activity in AndroidManifest.xml. + int id = item.getItemId(); + + //noinspection SimplifiableIfStatement + if (id == R.id.action_settings) { + return true; + } + + return super.onOptionsItemSelected(item); + } +} \ No newline at end of file diff --git a/smaliapp/app/src/main/java/com/example/myapplication/MainActivity.smali b/smaliapp/app/src/main/java/com/example/myapplication/MainActivity.smali new file mode 100644 index 0000000..dc96166 --- /dev/null +++ b/smaliapp/app/src/main/java/com/example/myapplication/MainActivity.smali @@ -0,0 +1,1384 @@ +.class public Lcom/example/myapplication/MainActivity; +.super Landroidx/appcompat/app/AppCompatActivity; +.source "MainActivity.java" + + +# direct methods +.method public constructor ()V + .registers 1 + + .prologue + .line 35 + invoke-direct {p0}, Landroidx/appcompat/app/AppCompatActivity;->()V + + return-void +.end method + +.method public static byteArrayToHex([B)Ljava/lang/String; + .registers 9 + .param p0, "a" # [B + + .prologue + const/4 v3, 0x0 + + .line 38 + new-instance v1, Ljava/lang/StringBuilder; + + array-length v2, p0 + + mul-int/lit8 v2, v2, 0x2 + + invoke-direct {v1, v2}, Ljava/lang/StringBuilder;->(I)V + + .line 39 + .local v1, "sb":Ljava/lang/StringBuilder; + array-length v4, p0 + + move v2, v3 + + :goto_b + if-ge v2, v4, :cond_24 + + aget-byte v0, p0, v2 + + .line 40 + .local v0, "b":B + const-string v5, "%02x" + + const/4 v6, 0x1 + + new-array v6, v6, [Ljava/lang/Object; + + invoke-static {v0}, Ljava/lang/Byte;->valueOf(B)Ljava/lang/Byte; + + move-result-object v7 + + aput-object v7, v6, v3 + + invoke-static {v5, v6}, Ljava/lang/String;->format(Ljava/lang/String;[Ljava/lang/Object;)Ljava/lang/String; + + move-result-object v5 + + invoke-virtual {v1, v5}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder; + + .line 39 + add-int/lit8 v2, v2, 0x1 + + goto :goto_b + + .line 41 + .end local v0 # "b":B + :cond_24 + invoke-virtual {v1}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String; + + move-result-object v2 + + return-object v2 +.end method + +.method public static copyFile(Ljava/io/File;Ljava/io/File;)V + .registers 8 + .param p0, "sourceFile" # Ljava/io/File; + .param p1, "destFile" # Ljava/io/File; + .annotation system Ldalvik/annotation/Throws; + value = { + Ljava/io/IOException; + } + .end annotation + + .prologue + .line 167 + invoke-virtual {p1}, Ljava/io/File;->getParentFile()Ljava/io/File; + + move-result-object v2 + + invoke-virtual {v2}, Ljava/io/File;->exists()Z + + move-result v2 + + if-nez v2, :cond_11 + + .line 168 + invoke-virtual {p1}, Ljava/io/File;->getParentFile()Ljava/io/File; + + move-result-object v2 + + invoke-virtual {v2}, Ljava/io/File;->mkdirs()Z + + .line 170 + :cond_11 + invoke-virtual {p1}, Ljava/io/File;->exists()Z + + move-result v2 + + if-nez v2, :cond_1a + + .line 171 + invoke-virtual {p1}, Ljava/io/File;->createNewFile()Z + + .line 174 + :cond_1a + const/4 v1, 0x0 + + .line 175 + .local v1, "source":Ljava/nio/channels/FileChannel; + const/4 v0, 0x0 + + .line 178 + .local v0, "destination":Ljava/nio/channels/FileChannel; + :try_start_1c + new-instance v2, Ljava/io/FileInputStream; + + invoke-direct {v2, p0}, Ljava/io/FileInputStream;->(Ljava/io/File;)V + + invoke-virtual {v2}, Ljava/io/FileInputStream;->getChannel()Ljava/nio/channels/FileChannel; + + move-result-object v1 + + .line 179 + new-instance v2, Ljava/io/FileOutputStream; + + invoke-direct {v2, p1}, Ljava/io/FileOutputStream;->(Ljava/io/File;)V + + invoke-virtual {v2}, Ljava/io/FileOutputStream;->getChannel()Ljava/nio/channels/FileChannel; + + move-result-object v0 + + .line 180 + const-wide/16 v2, 0x0 + + invoke-virtual {v1}, Ljava/nio/channels/FileChannel;->size()J + + move-result-wide v4 + + invoke-virtual/range {v0 .. v5}, Ljava/nio/channels/FileChannel;->transferFrom(Ljava/nio/channels/ReadableByteChannel;JJ)J + :try_end_37 + .catchall {:try_start_1c .. :try_end_37} :catchall_42 + + .line 182 + if-eqz v1, :cond_3c + + .line 183 + invoke-virtual {v1}, Ljava/nio/channels/FileChannel;->close()V + + .line 185 + :cond_3c + if-eqz v0, :cond_41 + + .line 186 + invoke-virtual {v0}, Ljava/nio/channels/FileChannel;->close()V + + .line 189 + :cond_41 + return-void + + .line 182 + :catchall_42 + move-exception v2 + + if-eqz v1, :cond_48 + + .line 183 + invoke-virtual {v1}, Ljava/nio/channels/FileChannel;->close()V + + .line 185 + :cond_48 + if-eqz v0, :cond_4d + + .line 186 + invoke-virtual {v0}, Ljava/nio/channels/FileChannel;->close()V + + .line 188 + :cond_4d + throw v2 +.end method + +.method public static copyFileOrDirectory(Ljava/lang/String;Ljava/lang/String;)V + .registers 12 + .param p0, "srcDir" # Ljava/lang/String; + .param p1, "dstDir" # Ljava/lang/String; + + .prologue + .line 145 + :try_start_0 + new-instance v6, Ljava/io/File; + + invoke-direct {v6, p0}, Ljava/io/File;->(Ljava/lang/String;)V + + .line 146 + .local v6, "src":Ljava/io/File; + new-instance v0, Ljava/io/File; + + invoke-virtual {v6}, Ljava/io/File;->getName()Ljava/lang/String; + + move-result-object v8 + + invoke-direct {v0, p1, v8}, Ljava/io/File;->(Ljava/lang/String;Ljava/lang/String;)V + + .line 148 + .local v0, "dst":Ljava/io/File; + invoke-virtual {v6}, Ljava/io/File;->isDirectory()Z + + move-result v8 + + if-eqz v8, :cond_31 + + .line 150 + invoke-virtual {v6}, Ljava/io/File;->list()[Ljava/lang/String; + + move-result-object v3 + + .line 151 + .local v3, "files":[Ljava/lang/String; + array-length v4, v3 + + .line 152 + .local v4, "filesLength":I + const/4 v5, 0x0 + + .local v5, "i":I + :goto_1a + if-ge v5, v4, :cond_34 + + .line 153 + new-instance v8, Ljava/io/File; + + aget-object v9, v3, v5 + + invoke-direct {v8, v6, v9}, Ljava/io/File;->(Ljava/io/File;Ljava/lang/String;)V + + invoke-virtual {v8}, Ljava/io/File;->getPath()Ljava/lang/String; + + move-result-object v7 + + .line 154 + .local v7, "src1":Ljava/lang/String; + invoke-virtual {v0}, Ljava/io/File;->getPath()Ljava/lang/String; + + move-result-object v1 + + .line 155 + .local v1, "dst1":Ljava/lang/String; + invoke-static {v7, v1}, Lcom/example/myapplication/MainActivity;->copyFileOrDirectory(Ljava/lang/String;Ljava/lang/String;)V + + .line 152 + add-int/lit8 v5, v5, 0x1 + + goto :goto_1a + + .line 159 + .end local v1 # "dst1":Ljava/lang/String; + .end local v3 # "files":[Ljava/lang/String; + .end local v4 # "filesLength":I + .end local v5 # "i":I + .end local v7 # "src1":Ljava/lang/String; + :cond_31 + invoke-static {v6, v0}, Lcom/example/myapplication/MainActivity;->copyFile(Ljava/io/File;Ljava/io/File;)V + :try_end_34 + .catch Ljava/lang/Exception; {:try_start_0 .. :try_end_34} :catch_35 + + .line 164 + .end local v0 # "dst":Ljava/io/File; + .end local v6 # "src":Ljava/io/File; + :cond_34 + :goto_34 + return-void + + .line 161 + :catch_35 + move-exception v2 + + .line 162 + .local v2, "e":Ljava/lang/Exception; + invoke-virtual {v2}, Ljava/lang/Exception;->printStackTrace()V + + goto :goto_34 +.end method + +.method public static decode(Ljava/lang/String;ILjava/lang/String;)V + .registers 6 + .param p0, "paramString" # Ljava/lang/String; + .param p1, "paramInt" # I + .param p2, "decodeParam" # Ljava/lang/String; + + .prologue + .line 45 + const-string v0, "decode" + + new-instance v1, Ljava/lang/StringBuilder; + + invoke-direct {v1}, Ljava/lang/StringBuilder;->()V + + const-string v2, "paramString = " + + invoke-virtual {v1, v2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder; + + move-result-object v1 + + invoke-virtual {v1, p0}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder; + + move-result-object v1 + + const-string v2, " ; paramInt = " + + invoke-virtual {v1, v2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder; + + move-result-object v1 + + invoke-virtual {v1, p1}, Ljava/lang/StringBuilder;->append(I)Ljava/lang/StringBuilder; + + move-result-object v1 + + const-string v2, " ; decodeParam = " + + invoke-virtual {v1, v2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder; + + move-result-object v1 + + invoke-virtual {v1, p2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder; + + move-result-object v1 + + invoke-virtual {v1}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String; + + move-result-object v1 + + invoke-static {v0, v1}, Landroid/util/Log;->i(Ljava/lang/String;Ljava/lang/String;)I + + .line 46 + return-void +.end method + +.method public static decodeBytes(Ljavax/crypto/SecretKey;[B[B)[B + .registers 6 + .param p0, "key" # Ljavax/crypto/SecretKey; + .param p1, "input" # [B + .param p2, "out" # [B + + .prologue + .line 49 + const-string v0, "decodeBytes" + + new-instance v1, Ljava/lang/StringBuilder; + + invoke-direct {v1}, Ljava/lang/StringBuilder;->()V + + const-string v2, " input= " + + invoke-virtual {v1, v2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder; + + move-result-object v1 + + invoke-static {p1}, Lcom/example/myapplication/MainActivity;->byteArrayToHex([B)Ljava/lang/String; + + move-result-object v2 + + invoke-virtual {v1, v2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder; + + move-result-object v1 + + const-string v2, " output " + + invoke-virtual {v1, v2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder; + + move-result-object v1 + + invoke-static {p2}, Lcom/example/myapplication/MainActivity;->byteArrayToHex([B)Ljava/lang/String; + + move-result-object v2 + + invoke-virtual {v1, v2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder; + + move-result-object v1 + + invoke-virtual {v1}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String; + + move-result-object v1 + + invoke-static {v0, v1}, Landroid/util/Log;->i(Ljava/lang/String;Ljava/lang/String;)I + + .line 50 + return-object p2 +.end method + +.method public static encodeBytes(Ljavax/crypto/SecretKey;[B[B)[B + .registers 6 + .param p0, "key" # Ljavax/crypto/SecretKey; + .param p1, "input" # [B + .param p2, "out" # [B + + .prologue + .line 54 + const-string v0, "encodeBytes" + + new-instance v1, Ljava/lang/StringBuilder; + + invoke-direct {v1}, Ljava/lang/StringBuilder;->()V + + const-string v2, " input= " + + invoke-virtual {v1, v2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder; + + move-result-object v1 + + invoke-static {p1}, Lcom/example/myapplication/MainActivity;->byteArrayToHex([B)Ljava/lang/String; + + move-result-object v2 + + invoke-virtual {v1, v2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder; + + move-result-object v1 + + const-string v2, " output " + + invoke-virtual {v1, v2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder; + + move-result-object v1 + + invoke-static {p2}, Lcom/example/myapplication/MainActivity;->byteArrayToHex([B)Ljava/lang/String; + + move-result-object v2 + + invoke-virtual {v1, v2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder; + + move-result-object v1 + + invoke-virtual {v1}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String; + + move-result-object v1 + + invoke-static {v0, v1}, Landroid/util/Log;->i(Ljava/lang/String;Ljava/lang/String;)I + + .line 55 + return-object p2 +.end method + +.method public static getFilePath(Ljava/lang/String;)Ljava/io/File; + .registers 3 + .param p0, "fileName" # Ljava/lang/String; + + .prologue + .line 139 + new-instance v0, Ljava/io/File; + + invoke-static {p0}, Lcom/example/myapplication/MainActivity;->getStorageDir(Ljava/lang/String;)Ljava/lang/String; + + move-result-object v1 + + invoke-direct {v0, v1}, Ljava/io/File;->(Ljava/lang/String;)V + + return-object v0 +.end method + +.method public static getInputStream(Ljava/lang/String;)Ljava/io/FileInputStream; + .registers 4 + .param p0, "fileName" # Ljava/lang/String; + .annotation system Ldalvik/annotation/Throws; + value = { + Ljava/io/FileNotFoundException; + } + .end annotation + + .prologue + .line 135 + new-instance v0, Ljava/io/FileInputStream; + + new-instance v1, Ljava/io/File; + + invoke-static {p0}, Lcom/example/myapplication/MainActivity;->getStorageDir(Ljava/lang/String;)Ljava/lang/String; + + move-result-object v2 + + invoke-direct {v1, v2}, Ljava/io/File;->(Ljava/lang/String;)V + + invoke-direct {v0, v1}, Ljava/io/FileInputStream;->(Ljava/io/File;)V + + return-object v0 +.end method + +.method public static getIp()Ljava/lang/String; + .registers 2 + + .prologue + .line 63 + const-string v0, "ip.txt" + + const-string v1, "192.168.8.46" + + invoke-static {v0, v1}, Lcom/example/myapplication/MainActivity;->readFromFile(Ljava/lang/String;Ljava/lang/String;)Ljava/lang/String; + + move-result-object v0 + + return-object v0 +.end method + +.method public static getMacAddress()Ljava/lang/String; + .registers 2 + + .prologue + .line 59 + const-string v0, "mac.txt" + + const-string v1, "6C:C7:EC:2B:00:00" + + invoke-static {v0, v1}, Lcom/example/myapplication/MainActivity;->readFromFile(Ljava/lang/String;Ljava/lang/String;)Ljava/lang/String; + + move-result-object v0 + + return-object v0 +.end method + +.method public static getOutputStream(Ljava/lang/String;I)Ljava/io/FileOutputStream; + .registers 5 + .param p0, "fileName" # Ljava/lang/String; + .param p1, "mode" # I + .annotation system Ldalvik/annotation/Throws; + value = { + Ljava/io/FileNotFoundException; + } + .end annotation + + .prologue + .line 129 + new-instance v1, Ljava/io/FileOutputStream; + + new-instance v2, Ljava/io/File; + + .line 130 + invoke-static {p0}, Lcom/example/myapplication/MainActivity;->getStorageDir(Ljava/lang/String;)Ljava/lang/String; + + move-result-object v0 + + invoke-direct {v2, v0}, Ljava/io/File;->(Ljava/lang/String;)V + + const v0, 0x8000 + + if-ne p1, v0, :cond_15 + + const/4 v0, 0x1 + + :goto_11 + invoke-direct {v1, v2, v0}, Ljava/io/FileOutputStream;->(Ljava/io/File;Z)V + + .line 129 + return-object v1 + + .line 130 + :cond_15 + const/4 v0, 0x0 + + goto :goto_11 +.end method + +.method public static getPort()I + .registers 2 + + .prologue + .line 67 + const-string v0, "port.txt" + + const-string v1, "8080" + + invoke-static {v0, v1}, Lcom/example/myapplication/MainActivity;->readFromFile(Ljava/lang/String;Ljava/lang/String;)Ljava/lang/String; + + move-result-object v0 + + invoke-static {v0}, Ljava/lang/Integer;->parseInt(Ljava/lang/String;)I + + move-result v0 + + return v0 +.end method + +.method public static getPrivateKey()[B + .registers 2 + + .prologue + .line 202 + const-string v0, "BqeVGXJf+df/FhoWfFVDBw==" + + const/4 v1, 0x0 + + invoke-static {v0, v1}, Landroid/util/Base64;->decode(Ljava/lang/String;I)[B + + move-result-object v0 + + return-object v0 +.end method + +.method public static getStorageDir(Ljava/lang/String;)Ljava/lang/String; + .registers 6 + .param p0, "fileName" # Ljava/lang/String; + + .prologue + .line 94 + .line 95 + invoke-static {}, Landroid/os/Environment;->getExternalStorageDirectory()Ljava/io/File; + + move-result-object v2 + + invoke-virtual {v2}, Ljava/io/File;->getAbsolutePath()Ljava/lang/String; + + move-result-object v2 + + invoke-virtual {p0, v2}, Ljava/lang/String;->startsWith(Ljava/lang/String;)Z + + move-result v2 + + if-nez v2, :cond_6f + + .line 96 + const-string v2, "/data/data/com.inventec.iMobile2.gsm/" + + invoke-virtual {p0, v2}, Ljava/lang/String;->contains(Ljava/lang/CharSequence;)Z + + move-result v2 + + if-eqz v2, :cond_1e + + .line 97 + const-string v2, "/data/data/com.inventec.iMobile2.gsm/" + + const-string v3, "" + + invoke-virtual {p0, v2, v3}, Ljava/lang/String;->replace(Ljava/lang/CharSequence;Ljava/lang/CharSequence;)Ljava/lang/String; + + move-result-object p0 + + .line 99 + :cond_1e + const-string v2, "/data/data/com.inventec.iMobile2/" + + invoke-virtual {p0, v2}, Ljava/lang/String;->contains(Ljava/lang/CharSequence;)Z + + move-result v2 + + if-eqz v2, :cond_2e + + .line 100 + const-string v2, "/data/data/com.inventec.iMobile2/" + + const-string v3, "" + + invoke-virtual {p0, v2, v3}, Ljava/lang/String;->replace(Ljava/lang/CharSequence;Ljava/lang/CharSequence;)Ljava/lang/String; + + move-result-object p0 + + .line 103 + :cond_2e + new-instance v0, Ljava/io/File; + + new-instance v2, Ljava/lang/StringBuilder; + + invoke-direct {v2}, Ljava/lang/StringBuilder;->()V + + invoke-static {}, Landroid/os/Environment;->getExternalStorageDirectory()Ljava/io/File; + + move-result-object v3 + + invoke-virtual {v2, v3}, Ljava/lang/StringBuilder;->append(Ljava/lang/Object;)Ljava/lang/StringBuilder; + + move-result-object v2 + + const-string v3, "/phev" + + invoke-virtual {v2, v3}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder; + + move-result-object v2 + + invoke-virtual {v2}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String; + + move-result-object v2 + + invoke-direct {v0, v2}, Ljava/io/File;->(Ljava/lang/String;)V + + .line 104 + .local v0, "file":Ljava/io/File; + invoke-virtual {v0}, Ljava/io/File;->mkdirs()Z + + move-result v2 + + if-nez v2, :cond_53 + + .line 105 + invoke-virtual {v0}, Ljava/io/File;->mkdirs()Z + + .line 107 + :cond_53 + new-instance v2, Ljava/lang/StringBuilder; + + invoke-direct {v2}, Ljava/lang/StringBuilder;->()V + + invoke-virtual {v0}, Ljava/io/File;->getAbsolutePath()Ljava/lang/String; + + move-result-object v3 + + invoke-virtual {v2, v3}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder; + + move-result-object v2 + + sget-object v3, Ljava/io/File;->separator:Ljava/lang/String; + + invoke-virtual {v2, v3}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder; + + move-result-object v2 + + invoke-virtual {v2, p0}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder; + + move-result-object v2 + + invoke-virtual {v2}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String; + + move-result-object v1 + + .line 124 + .end local v0 # "file":Ljava/io/File; + :goto_6e + return-object v1 + + .line 111 + :cond_6f + new-instance v2, Ljava/lang/StringBuilder; + + invoke-direct {v2}, Ljava/lang/StringBuilder;->()V + + invoke-static {}, Landroid/os/Environment;->getExternalStorageDirectory()Ljava/io/File; + + move-result-object v3 + + invoke-virtual {v3}, Ljava/io/File;->getAbsolutePath()Ljava/lang/String; + + move-result-object v3 + + invoke-virtual {v2, v3}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder; + + move-result-object v2 + + const-string v3, "/phev" + + invoke-virtual {v2, v3}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder; + + move-result-object v2 + + invoke-virtual {v2}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String; + + move-result-object v2 + + invoke-virtual {p0, v2}, Ljava/lang/String;->startsWith(Ljava/lang/String;)Z + + move-result v2 + + if-nez v2, :cond_b7 + + .line 113 + invoke-static {}, Landroid/os/Environment;->getExternalStorageDirectory()Ljava/io/File; + + move-result-object v2 + + invoke-virtual {v2}, Ljava/io/File;->getAbsolutePath()Ljava/lang/String; + + move-result-object v2 + + new-instance v3, Ljava/lang/StringBuilder; + + invoke-direct {v3}, Ljava/lang/StringBuilder;->()V + + .line 114 + invoke-static {}, Landroid/os/Environment;->getExternalStorageDirectory()Ljava/io/File; + + move-result-object v4 + + invoke-virtual {v4}, Ljava/io/File;->getAbsolutePath()Ljava/lang/String; + + move-result-object v4 + + invoke-virtual {v3, v4}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder; + + move-result-object v3 + + const-string v4, "/phev" + + invoke-virtual {v3, v4}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder; + + move-result-object v3 + + invoke-virtual {v3}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String; + + move-result-object v3 + + .line 113 + invoke-virtual {p0, v2, v3}, Ljava/lang/String;->replace(Ljava/lang/CharSequence;Ljava/lang/CharSequence;)Ljava/lang/String; + + move-result-object p0 + + .line 117 + :cond_b7 + const-string v2, "/data/data/com.inventec.iMobile2.gsm/" + + invoke-virtual {p0, v2}, Ljava/lang/String;->contains(Ljava/lang/CharSequence;)Z + + move-result v2 + + if-eqz v2, :cond_c7 + + .line 118 + const-string v2, "/data/data/com.inventec.iMobile2.gsm/" + + const-string v3, "/phev" + + invoke-virtual {p0, v2, v3}, Ljava/lang/String;->replace(Ljava/lang/CharSequence;Ljava/lang/CharSequence;)Ljava/lang/String; + + move-result-object p0 + + .line 120 + :cond_c7 + const-string v2, "/data/data/com.inventec.iMobile2/" + + invoke-virtual {p0, v2}, Ljava/lang/String;->contains(Ljava/lang/CharSequence;)Z + + move-result v2 + + if-eqz v2, :cond_d7 + + .line 121 + const-string v2, "/data/data/com.inventec.iMobile2/" + + const-string v3, "/phev" + + invoke-virtual {p0, v2, v3}, Ljava/lang/String;->replace(Ljava/lang/CharSequence;Ljava/lang/CharSequence;)Ljava/lang/String; + + move-result-object p0 + + :cond_d7 + move-object v1, p0 + + .line 124 + goto :goto_6e +.end method + +.method public static readFromFile(Ljava/lang/String;Ljava/lang/String;)Ljava/lang/String; + .registers 11 + .param p0, "fileName" # Ljava/lang/String; + .param p1, "defaultValue" # Ljava/lang/String; + + .prologue + const/4 v6, 0x0 + + .line 71 + invoke-static {p0}, Lcom/example/myapplication/MainActivity;->getStorageDir(Ljava/lang/String;)Ljava/lang/String; + + move-result-object v4 + + .line 72 + .local v4, "storageDir":Ljava/lang/String; + new-instance v3, Ljava/io/File; + + invoke-direct {v3, v4}, Ljava/io/File;->(Ljava/lang/String;)V + + .line 73 + .local v3, "file":Ljava/io/File; + invoke-virtual {v3}, Ljava/io/File;->exists()Z + + move-result v5 + + if-nez v5, :cond_27 + + .line 75 + :try_start_10 + invoke-virtual {v3}, Ljava/io/File;->createNewFile()Z + + .line 76 + new-instance v1, Ljava/io/FileOutputStream; + + invoke-direct {v1, v3}, Ljava/io/FileOutputStream;->(Ljava/io/File;)V + :try_end_18 + .catch Ljava/io/IOException; {:try_start_10 .. :try_end_18} :catch_43 + + .local v1, "bw":Ljava/io/FileOutputStream; + const/4 v5, 0x0 + + .line 77 + :try_start_19 + invoke-virtual {p1}, Ljava/lang/String;->getBytes()[B + + move-result-object v7 + + invoke-virtual {v1, v7}, Ljava/io/FileOutputStream;->write([B)V + :try_end_20 + .catch Ljava/lang/Throwable; {:try_start_19 .. :try_end_20} :catch_4e + .catchall {:try_start_19 .. :try_end_20} :catchall_89 + + .line 78 + if-eqz v1, :cond_27 + + if-eqz v6, :cond_4a + + :try_start_24 + invoke-virtual {v1}, Ljava/io/FileOutputStream;->close()V + :try_end_27 + .catch Ljava/lang/Throwable; {:try_start_24 .. :try_end_27} :catch_3e + .catch Ljava/io/IOException; {:try_start_24 .. :try_end_27} :catch_43 + + .line 84 + .end local v1 # "bw":Ljava/io/FileOutputStream; + :cond_27 + :goto_27 + :try_start_27 + new-instance v0, Ljava/io/BufferedReader; + + new-instance v5, Ljava/io/FileReader; + + invoke-direct {v5, v3}, Ljava/io/FileReader;->(Ljava/io/File;)V + + invoke-direct {v0, v5}, Ljava/io/BufferedReader;->(Ljava/io/Reader;)V + :try_end_31 + .catch Ljava/io/IOException; {:try_start_27 .. :try_end_31} :catch_6a + + .local v0, "br":Ljava/io/BufferedReader; + const/4 v5, 0x0 + + .line 85 + :try_start_32 + invoke-virtual {v0}, Ljava/io/BufferedReader;->readLine()Ljava/lang/String; + :try_end_35 + .catch Ljava/lang/Throwable; {:try_start_32 .. :try_end_35} :catch_75 + .catchall {:try_start_32 .. :try_end_35} :catchall_77 + + move-result-object v7 + + .line 86 + if-eqz v0, :cond_3d + + if-eqz v6, :cond_71 + + :try_start_3a + invoke-virtual {v0}, Ljava/io/BufferedReader;->close()V + :try_end_3d + .catch Ljava/lang/Throwable; {:try_start_3a .. :try_end_3d} :catch_65 + .catch Ljava/io/IOException; {:try_start_3a .. :try_end_3d} :catch_6a + + .line 85 + :cond_3d + :goto_3d + return-object v7 + + .line 78 + .end local v0 # "br":Ljava/io/BufferedReader; + .restart local v1 # "bw":Ljava/io/FileOutputStream; + :catch_3e + move-exception v7 + + :try_start_3f + invoke-virtual {v5, v7}, Ljava/lang/Throwable;->addSuppressed(Ljava/lang/Throwable;)V + :try_end_42 + .catch Ljava/io/IOException; {:try_start_3f .. :try_end_42} :catch_43 + + goto :goto_27 + + .line 79 + .end local v1 # "bw":Ljava/io/FileOutputStream; + :catch_43 + move-exception v2 + + .line 80 + .local v2, "e":Ljava/io/IOException; + new-instance v5, Ljava/lang/IllegalStateException; + + invoke-direct {v5, v2}, Ljava/lang/IllegalStateException;->(Ljava/lang/Throwable;)V + + throw v5 + + .line 78 + .end local v2 # "e":Ljava/io/IOException; + .restart local v1 # "bw":Ljava/io/FileOutputStream; + :cond_4a + :try_start_4a + invoke-virtual {v1}, Ljava/io/FileOutputStream;->close()V + :try_end_4d + .catch Ljava/io/IOException; {:try_start_4a .. :try_end_4d} :catch_43 + + goto :goto_27 + + .line 76 + :catch_4e + move-exception v5 + + :try_start_4f + throw v5 + :try_end_50 + .catchall {:try_start_4f .. :try_end_50} :catchall_50 + + .line 78 + :catchall_50 + move-exception v6 + + move-object v8, v6 + + move-object v6, v5 + + move-object v5, v8 + + :goto_54 + if-eqz v1, :cond_5b + + if-eqz v6, :cond_61 + + :try_start_58 + invoke-virtual {v1}, Ljava/io/FileOutputStream;->close()V + :try_end_5b + .catch Ljava/lang/Throwable; {:try_start_58 .. :try_end_5b} :catch_5c + .catch Ljava/io/IOException; {:try_start_58 .. :try_end_5b} :catch_43 + + :cond_5b + :goto_5b + :try_start_5b + throw v5 + + :catch_5c + move-exception v7 + + invoke-virtual {v6, v7}, Ljava/lang/Throwable;->addSuppressed(Ljava/lang/Throwable;)V + + goto :goto_5b + + :cond_61 + invoke-virtual {v1}, Ljava/io/FileOutputStream;->close()V + :try_end_64 + .catch Ljava/io/IOException; {:try_start_5b .. :try_end_64} :catch_43 + + goto :goto_5b + + .line 86 + .end local v1 # "bw":Ljava/io/FileOutputStream; + .restart local v0 # "br":Ljava/io/BufferedReader; + :catch_65 + move-exception v6 + + :try_start_66 + invoke-virtual {v5, v6}, Ljava/lang/Throwable;->addSuppressed(Ljava/lang/Throwable;)V + :try_end_69 + .catch Ljava/io/IOException; {:try_start_66 .. :try_end_69} :catch_6a + + goto :goto_3d + + .line 87 + .end local v0 # "br":Ljava/io/BufferedReader; + :catch_6a + move-exception v2 + + .line 88 + .restart local v2 # "e":Ljava/io/IOException; + new-instance v5, Ljava/lang/IllegalStateException; + + invoke-direct {v5, v2}, Ljava/lang/IllegalStateException;->(Ljava/lang/Throwable;)V + + throw v5 + + .line 86 + .end local v2 # "e":Ljava/io/IOException; + .restart local v0 # "br":Ljava/io/BufferedReader; + :cond_71 + :try_start_71 + invoke-virtual {v0}, Ljava/io/BufferedReader;->close()V + :try_end_74 + .catch Ljava/io/IOException; {:try_start_71 .. :try_end_74} :catch_6a + + goto :goto_3d + + .line 84 + :catch_75 + move-exception v6 + + :try_start_76 + throw v6 + :try_end_77 + .catchall {:try_start_76 .. :try_end_77} :catchall_77 + + .line 86 + :catchall_77 + move-exception v5 + + if-eqz v0, :cond_7f + + if-eqz v6, :cond_85 + + :try_start_7c + invoke-virtual {v0}, Ljava/io/BufferedReader;->close()V + :try_end_7f + .catch Ljava/lang/Throwable; {:try_start_7c .. :try_end_7f} :catch_80 + .catch Ljava/io/IOException; {:try_start_7c .. :try_end_7f} :catch_6a + + :cond_7f + :goto_7f + :try_start_7f + throw v5 + + :catch_80 + move-exception v7 + + invoke-virtual {v6, v7}, Ljava/lang/Throwable;->addSuppressed(Ljava/lang/Throwable;)V + + goto :goto_7f + + :cond_85 + invoke-virtual {v0}, Ljava/io/BufferedReader;->close()V + :try_end_88 + .catch Ljava/io/IOException; {:try_start_7f .. :try_end_88} :catch_6a + + goto :goto_7f + + .line 78 + .end local v0 # "br":Ljava/io/BufferedReader; + .restart local v1 # "bw":Ljava/io/FileOutputStream; + :catchall_89 + move-exception v5 + + goto :goto_54 +.end method + +.method public static saveFile2([B)V + .registers 5 + .param p0, "data" # [B + + .prologue + .line 193 + :try_start_0 + new-instance v1, Ljava/io/FileOutputStream; + + new-instance v2, Ljava/lang/StringBuilder; + + invoke-direct {v2}, Ljava/lang/StringBuilder;->()V + + invoke-static {}, Landroid/os/Environment;->getExternalStorageDirectory()Ljava/io/File; + + move-result-object v3 + + invoke-virtual {v2, v3}, Ljava/lang/StringBuilder;->append(Ljava/lang/Object;)Ljava/lang/StringBuilder; + + move-result-object v2 + + const-string v3, "/test.txt" + + invoke-virtual {v2, v3}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder; + + move-result-object v2 + + invoke-virtual {v2}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String; + + move-result-object v2 + + invoke-direct {v1, v2}, Ljava/io/FileOutputStream;->(Ljava/lang/String;)V + + .line 194 + .local v1, "f":Ljava/io/FileOutputStream; + invoke-virtual {v1, p0}, Ljava/io/FileOutputStream;->write([B)V + + .line 195 + invoke-virtual {v1}, Ljava/io/FileOutputStream;->close()V + :try_end_22 + .catch Ljava/io/IOException; {:try_start_0 .. :try_end_22} :catch_23 + + .line 199 + .end local v1 # "f":Ljava/io/FileOutputStream; + :goto_22 + return-void + + .line 196 + :catch_23 + move-exception v0 + + .line 197 + .local v0, "e":Ljava/io/IOException; + invoke-virtual {v0}, Ljava/io/IOException;->printStackTrace()V + + goto :goto_22 +.end method + + +# virtual methods +.method public exportFiles()V + .registers 8 + + .prologue + .line 207 + new-instance v1, Ljava/io/File; + + new-instance v3, Ljava/lang/StringBuilder; + + invoke-direct {v3}, Ljava/lang/StringBuilder;->()V + + invoke-static {}, Landroid/os/Environment;->getExternalStorageDirectory()Ljava/io/File; + + move-result-object v4 + + invoke-virtual {v3, v4}, Ljava/lang/StringBuilder;->append(Ljava/lang/Object;)Ljava/lang/StringBuilder; + + move-result-object v3 + + const-string v4, "/phev/export" + + invoke-virtual {v3, v4}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder; + + move-result-object v3 + + invoke-virtual {v3}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String; + + move-result-object v3 + + invoke-direct {v1, v3}, Ljava/io/File;->(Ljava/lang/String;)V + + .line 208 + .local v1, "file":Ljava/io/File; + invoke-virtual {v1}, Ljava/io/File;->mkdirs()Z + + move-result v3 + + if-nez v3, :cond_25 + + .line 209 + invoke-virtual {v1}, Ljava/io/File;->mkdirs()Z + + .line 211 + :cond_25 + invoke-virtual {p0}, Lcom/example/myapplication/MainActivity;->fileList()[Ljava/lang/String; + + move-result-object v2 + + .line 212 + .local v2, "list":[Ljava/lang/String; + array-length v4, v2 + + const/4 v3, 0x0 + + :goto_2b + if-ge v3, v4, :cond_41 + + aget-object v0, v2, v3 + + .line 213 + .local v0, "f":Ljava/lang/String; + invoke-virtual {p0, v0}, Lcom/example/myapplication/MainActivity;->getFileStreamPath(Ljava/lang/String;)Ljava/io/File; + + move-result-object v5 + + invoke-virtual {v5}, Ljava/io/File;->getAbsolutePath()Ljava/lang/String; + + move-result-object v5 + + invoke-virtual {v1}, Ljava/io/File;->getAbsolutePath()Ljava/lang/String; + + move-result-object v6 + + invoke-static {v5, v6}, Lcom/example/myapplication/MainActivity;->copyFileOrDirectory(Ljava/lang/String;Ljava/lang/String;)V + + .line 212 + add-int/lit8 v3, v3, 0x1 + + goto :goto_2b + + .line 215 + .end local v0 # "f":Ljava/lang/String; + :cond_41 + return-void +.end method + +.method protected onCreate(Landroid/os/Bundle;)V + .registers 5 + .param p1, "savedInstanceState" # Landroid/os/Bundle; + + .prologue + .line 219 + invoke-super {p0, p1}, Landroidx/appcompat/app/AppCompatActivity;->onCreate(Landroid/os/Bundle;)V + + .line 220 + invoke-virtual {p0}, Lcom/example/myapplication/MainActivity;->exportFiles()V + + .line 221 + const v2, 0x7f0b001c + + invoke-virtual {p0, v2}, Lcom/example/myapplication/MainActivity;->setContentView(I)V + + .line 222 + const v2, 0x7f080168 + + invoke-virtual {p0, v2}, Lcom/example/myapplication/MainActivity;->findViewById(I)Landroid/view/View; + + move-result-object v1 + + check-cast v1, Landroidx/appcompat/widget/Toolbar; + + .line 223 + .local v1, "toolbar":Landroidx/appcompat/widget/Toolbar; + invoke-virtual {p0, v1}, Lcom/example/myapplication/MainActivity;->setSupportActionBar(Landroidx/appcompat/widget/Toolbar;)V + + .line 224 + const v2, 0x7f08009c + + invoke-virtual {p0, v2}, Lcom/example/myapplication/MainActivity;->findViewById(I)Landroid/view/View; + + move-result-object v0 + + check-cast v0, Lcom/google/android/material/floatingactionbutton/FloatingActionButton; + + .line 225 + .local v0, "fab":Lcom/google/android/material/floatingactionbutton/FloatingActionButton; + new-instance v2, Lcom/example/myapplication/MainActivity$1; + + invoke-direct {v2, p0}, Lcom/example/myapplication/MainActivity$1;->(Lcom/example/myapplication/MainActivity;)V + + invoke-virtual {v0, v2}, Lcom/google/android/material/floatingactionbutton/FloatingActionButton;->setOnClickListener(Landroid/view/View$OnClickListener;)V + + .line 232 + return-void +.end method + +.method public onCreateOptionsMenu(Landroid/view/Menu;)Z + .registers 4 + .param p1, "menu" # Landroid/view/Menu; + + .prologue + .line 237 + invoke-virtual {p0}, Lcom/example/myapplication/MainActivity;->getMenuInflater()Landroid/view/MenuInflater; + + move-result-object v0 + + const/high16 v1, 0x7f0c0000 + + invoke-virtual {v0, v1, p1}, Landroid/view/MenuInflater;->inflate(ILandroid/view/Menu;)V + + .line 238 + const/4 v0, 0x1 + + return v0 +.end method + +.method public onOptionsItemSelected(Landroid/view/MenuItem;)Z + .registers 4 + .param p1, "item" # Landroid/view/MenuItem; + + .prologue + .line 246 + invoke-interface {p1}, Landroid/view/MenuItem;->getItemId()I + + move-result v0 + + .line 249 + .local v0, "id":I + const v1, 0x7f080044 + + if-ne v0, v1, :cond_b + + .line 250 + const/4 v1, 0x1 + + .line 253 + :goto_a + return v1 + + :cond_b + invoke-super {p0, p1}, Landroidx/appcompat/app/AppCompatActivity;->onOptionsItemSelected(Landroid/view/MenuItem;)Z + + move-result v1 + + goto :goto_a +.end method diff --git a/smaliapp/app/src/main/java/com/example/myapplication/SecondFragment.java b/smaliapp/app/src/main/java/com/example/myapplication/SecondFragment.java new file mode 100644 index 0000000..5bf2a10 --- /dev/null +++ b/smaliapp/app/src/main/java/com/example/myapplication/SecondFragment.java @@ -0,0 +1,34 @@ +package com.example.myapplication; + +import android.os.Bundle; +import android.view.LayoutInflater; +import android.view.View; +import android.view.ViewGroup; + +import androidx.annotation.NonNull; +import androidx.fragment.app.Fragment; +import androidx.navigation.fragment.NavHostFragment; + +public class SecondFragment extends Fragment { + + @Override + public View onCreateView( + LayoutInflater inflater, ViewGroup container, + Bundle savedInstanceState + ) { + // Inflate the layout for this fragment + return inflater.inflate(R.layout.fragment_second, container, false); + } + + public void onViewCreated(@NonNull View view, Bundle savedInstanceState) { + super.onViewCreated(view, savedInstanceState); + + view.findViewById(R.id.button_second).setOnClickListener(new View.OnClickListener() { + @Override + public void onClick(View view) { + NavHostFragment.findNavController(SecondFragment.this) + .navigate(R.id.action_SecondFragment_to_FirstFragment); + } + }); + } +} \ No newline at end of file diff --git a/smaliapp/app/src/main/java/com/inventec/iMobile2/a2/g$b.smali b/smaliapp/app/src/main/java/com/inventec/iMobile2/a2/g$b.smali new file mode 100644 index 0000000..30c6c01 --- /dev/null +++ b/smaliapp/app/src/main/java/com/inventec/iMobile2/a2/g$b.smali @@ -0,0 +1,57 @@ +.class public Lcom/inventec/iMobile2/a2/g$b; +.super Ljava/lang/Object; +.source "g.java" + + +# annotations +.annotation system Ldalvik/annotation/EnclosingClass; + value = Lcom/inventec/iMobile2/a2/g; +.end annotation + +.annotation system Ldalvik/annotation/InnerClass; + accessFlags = 0x9 + name = "b" +.end annotation + + +# instance fields +.field public a:Ljava/lang/String; + +.field public b:Ljava/lang/String; + +.field public c:Ljava/lang/String; + + +# direct methods +.method public constructor ()V + .registers 2 + + .prologue + .line 28 + invoke-direct {p0}, Ljava/lang/Object;->()V + + .line 24 + const-string v0, "" + + iput-object v0, p0, Lcom/inventec/iMobile2/a2/g$b;->a:Ljava/lang/String; + + .line 25 + const-string v0, "" + + iput-object v0, p0, Lcom/inventec/iMobile2/a2/g$b;->b:Ljava/lang/String; + + .line 29 + return-void +.end method + + +# virtual methods +.method public toString()Ljava/lang/String; + .registers 2 + + .prologue + .line 32 + iget-object v0, p0, Lcom/inventec/iMobile2/a2/g$b;->a:Ljava/lang/String; + + return-object v0 +.end method diff --git a/smaliapp/app/src/main/java/com/inventec/iMobile2/a2/g.java b/smaliapp/app/src/main/java/com/inventec/iMobile2/a2/g.java new file mode 100644 index 0000000..4db057c --- /dev/null +++ b/smaliapp/app/src/main/java/com/inventec/iMobile2/a2/g.java @@ -0,0 +1,35 @@ +package com.inventec.iMobile2.a2; + +import android.content.Context; + +import java.util.ArrayList; + +public class g { + + + public static int a(Context var0, ArrayList var1, g.b var2) { + var1.clear(); + b e = new b(); + var1.add(e); + e.a = "Outlander PHEV"; + e.b = e.a; + e.c = e.a; + var2.a = e.a; + var2.b = e.b; + var2.c = e.c; + return 1; + } + + public static class b { + public String a = ""; + public String b = ""; + public String c; + + public b() { + } + + public String toString() { + return this.a; + } + } +} diff --git a/smaliapp/app/src/main/java/com/inventec/iMobile2/a2/g.smali b/smaliapp/app/src/main/java/com/inventec/iMobile2/a2/g.smali new file mode 100644 index 0000000..c69dbfe --- /dev/null +++ b/smaliapp/app/src/main/java/com/inventec/iMobile2/a2/g.smali @@ -0,0 +1,90 @@ +.class public Lcom/inventec/iMobile2/a2/g; +.super Ljava/lang/Object; +.source "g.java" + + +# annotations +.annotation system Ldalvik/annotation/MemberClasses; + value = { + Lcom/inventec/iMobile2/a2/g$b; + } +.end annotation + + +# direct methods +.method public constructor ()V + .registers 1 + + .prologue + .line 7 + invoke-direct {p0}, Ljava/lang/Object;->()V + + return-void +.end method + +.method public static a(Landroid/content/Context;Ljava/util/ArrayList;Lcom/inventec/iMobile2/a2/g$b;)I + .registers 5 + .param p0, "var0" # Landroid/content/Context; + .param p2, "var2" # Lcom/inventec/iMobile2/a2/g$b; + .annotation system Ldalvik/annotation/Signature; + value = { + "(", + "Landroid/content/Context;", + "Ljava/util/ArrayList", + "<", + "Lcom/inventec/iMobile2/a2/g$b;", + ">;", + "Lcom/inventec/iMobile2/a2/g$b;", + ")I" + } + .end annotation + + .prologue + .line 11 + .local p1, "var1":Ljava/util/ArrayList;, "Ljava/util/ArrayList;" + invoke-virtual {p1}, Ljava/util/ArrayList;->clear()V + + .line 12 + new-instance v0, Lcom/inventec/iMobile2/a2/g$b; + + invoke-direct {v0}, Lcom/inventec/iMobile2/a2/g$b;->()V + + .line 13 + .local v0, "e":Lcom/inventec/iMobile2/a2/g$b; + invoke-virtual {p1, v0}, Ljava/util/ArrayList;->add(Ljava/lang/Object;)Z + + .line 14 + const-string v1, "Outlander PHEV" + + iput-object v1, v0, Lcom/inventec/iMobile2/a2/g$b;->a:Ljava/lang/String; + + .line 15 + iget-object v1, v0, Lcom/inventec/iMobile2/a2/g$b;->a:Ljava/lang/String; + + iput-object v1, v0, Lcom/inventec/iMobile2/a2/g$b;->b:Ljava/lang/String; + + .line 16 + iget-object v1, v0, Lcom/inventec/iMobile2/a2/g$b;->a:Ljava/lang/String; + + iput-object v1, v0, Lcom/inventec/iMobile2/a2/g$b;->c:Ljava/lang/String; + + .line 17 + iget-object v1, v0, Lcom/inventec/iMobile2/a2/g$b;->a:Ljava/lang/String; + + iput-object v1, p2, Lcom/inventec/iMobile2/a2/g$b;->a:Ljava/lang/String; + + .line 18 + iget-object v1, v0, Lcom/inventec/iMobile2/a2/g$b;->b:Ljava/lang/String; + + iput-object v1, p2, Lcom/inventec/iMobile2/a2/g$b;->b:Ljava/lang/String; + + .line 19 + iget-object v1, v0, Lcom/inventec/iMobile2/a2/g$b;->c:Ljava/lang/String; + + iput-object v1, p2, Lcom/inventec/iMobile2/a2/g$b;->c:Ljava/lang/String; + + .line 20 + const/4 v1, 0x1 + + return v1 +.end method diff --git a/smaliapp/app/src/main/res/drawable-v24/ic_launcher_foreground.xml b/smaliapp/app/src/main/res/drawable-v24/ic_launcher_foreground.xml new file mode 100644 index 0000000..2b068d1 --- /dev/null +++ b/smaliapp/app/src/main/res/drawable-v24/ic_launcher_foreground.xml @@ -0,0 +1,30 @@ + + + + + + + + + + + \ No newline at end of file diff --git a/smaliapp/app/src/main/res/drawable/ic_launcher_background.xml b/smaliapp/app/src/main/res/drawable/ic_launcher_background.xml new file mode 100644 index 0000000..07d5da9 --- /dev/null +++ b/smaliapp/app/src/main/res/drawable/ic_launcher_background.xml @@ -0,0 +1,170 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/smaliapp/app/src/main/res/layout/activity_main.xml b/smaliapp/app/src/main/res/layout/activity_main.xml new file mode 100644 index 0000000..e9fa907 --- /dev/null +++ b/smaliapp/app/src/main/res/layout/activity_main.xml @@ -0,0 +1,33 @@ + + + + + + + + + + + + + + \ No newline at end of file diff --git a/smaliapp/app/src/main/res/layout/content_main.xml b/smaliapp/app/src/main/res/layout/content_main.xml new file mode 100644 index 0000000..c4e7db6 --- /dev/null +++ b/smaliapp/app/src/main/res/layout/content_main.xml @@ -0,0 +1,19 @@ + + + + + \ No newline at end of file diff --git a/smaliapp/app/src/main/res/layout/fragment_first.xml b/smaliapp/app/src/main/res/layout/fragment_first.xml new file mode 100644 index 0000000..fb44a3d --- /dev/null +++ b/smaliapp/app/src/main/res/layout/fragment_first.xml @@ -0,0 +1,28 @@ + + + + + +