├── ApkShield └── smali │ └── com │ └── apk │ └── shield │ ├── ShieldApplication.smali │ ├── ShieldClassLoader.smali │ └── ShieldDexClassLoader.smali ├── LICENSE ├── README.md ├── Shield.py ├── ShieldSrc ├── .classpath ├── .project ├── .settings │ └── org.eclipse.jdt.core.prefs ├── AndroidManifest.xml ├── assets │ ├── default │ │ └── default_layout.xml │ ├── ex07.apk │ └── mm.txt ├── bin │ ├── AndroidManifest.xml │ ├── ApkShield.apk │ ├── classes.dex │ ├── classes │ │ ├── com │ │ │ └── apk │ │ │ │ └── shield │ │ │ │ ├── ShieldApplication.class │ │ │ │ ├── ShieldClassLoader.class │ │ │ │ └── ShieldDexClassLoader.class │ │ └── yeling │ │ │ └── ex07 │ │ │ ├── BuildConfig.class │ │ │ ├── R$attr.class │ │ │ ├── R$drawable.class │ │ │ ├── R$id.class │ │ │ ├── R$layout.class │ │ │ ├── R$string.class │ │ │ └── R.class │ ├── dexedLibs │ │ ├── android-support-v4-c1ec07e958d081b565b64a64189e6f4e.jar │ │ └── annotations-a63b825fc0f7cc53ff999a644e236039.jar │ ├── jarlist.cache │ ├── res │ │ ├── drawable-hdpi │ │ │ └── ic_launcher.png │ │ └── drawable-mdpi │ │ │ └── ic_launcher.png │ └── resources.ap_ ├── gen │ └── yeling │ │ └── ex07 │ │ ├── BuildConfig.java │ │ └── R.java ├── ic_launcher-web.png ├── libs │ ├── android-support-v4.jar │ └── armeabi │ │ └── libcocos2dcpp.so ├── proguard-project.txt ├── project.properties ├── res │ ├── drawable-hdpi │ │ ├── ic_launcher.png │ │ ├── image01.jpg │ │ ├── image02.jpg │ │ ├── image03.jpg │ │ └── image04.jpg │ ├── drawable-mdpi │ │ ├── ic_launcher.png │ │ ├── image01.jpg │ │ ├── image02.jpg │ │ ├── image03.jpg │ │ └── image04.jpg │ ├── layout │ │ └── main.xml │ └── values │ │ └── strings.xml └── src │ └── com │ └── apk │ └── shield │ ├── ShieldApplication.java │ ├── ShieldClassLoader.java │ └── ShieldDexClassLoader.java ├── aapt.exe ├── apktool.bat ├── apktool.jar ├── autosign.bat ├── platform.pk8 ├── platform.x509.pem └── signapk.jar /ApkShield/smali/com/apk/shield/ShieldApplication.smali: -------------------------------------------------------------------------------- 1 | .class public Lcom/apk/shield/ShieldApplication; 2 | .super Landroid/app/Application; 3 | .source "ShieldApplication.java" 4 | 5 | 6 | # instance fields 7 | .field private field:Ljava/lang/reflect/Field; 8 | 9 | .field private mAssetManager:Landroid/content/res/AssetManager; 10 | 11 | .field private mDexPath:Ljava/lang/String; 12 | 13 | .field private mResources:Landroid/content/res/Resources; 14 | 15 | .field private mTheme:Landroid/content/res/Resources$Theme; 16 | 17 | 18 | # direct methods 19 | .method public constructor ()V 20 | .locals 1 21 | 22 | .prologue 23 | .line 19 24 | invoke-direct {p0}, Landroid/app/Application;->()V 25 | 26 | .line 27 27 | const-string v0, "/mnt/sdcard/ex07.apk" 28 | 29 | iput-object v0, p0, Lcom/apk/shield/ShieldApplication;->mDexPath:Ljava/lang/String; 30 | 31 | .line 19 32 | return-void 33 | .end method 34 | 35 | 36 | # virtual methods 37 | .method protected attachBaseContext(Landroid/content/Context;)V 38 | .locals 23 39 | .param p1, "base" # Landroid/content/Context; 40 | 41 | .prologue 42 | .line 63 43 | invoke-super/range {p0 .. p1}, Landroid/app/Application;->attachBaseContext(Landroid/content/Context;)V 44 | 45 | .line 64 46 | invoke-virtual/range {p0 .. p0}, Lcom/apk/shield/ShieldApplication;->getFilesDir()Ljava/io/File; 47 | 48 | move-result-object v6 49 | 50 | .line 65 51 | .local v6, "dir":Ljava/io/File; 52 | new-instance v18, Ljava/lang/StringBuilder; 53 | 54 | invoke-virtual {v6}, Ljava/io/File;->getAbsolutePath()Ljava/lang/String; 55 | 56 | move-result-object v19 57 | 58 | invoke-static/range {v19 .. v19}, Ljava/lang/String;->valueOf(Ljava/lang/Object;)Ljava/lang/String; 59 | 60 | move-result-object v19 61 | 62 | invoke-direct/range {v18 .. v19}, Ljava/lang/StringBuilder;->(Ljava/lang/String;)V 63 | 64 | const-string v19, "/ex07.apk" 65 | 66 | invoke-virtual/range {v18 .. v19}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder; 67 | 68 | move-result-object v18 69 | 70 | invoke-virtual/range {v18 .. v18}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String; 71 | 72 | move-result-object v15 73 | 74 | .line 66 75 | .local v15, "path":Ljava/lang/String; 76 | const-string v18, "ex07.apk" 77 | 78 | move-object/from16 v0, p0 79 | 80 | move-object/from16 v1, v18 81 | 82 | invoke-virtual {v0, v1, v15}, Lcom/apk/shield/ShieldApplication;->copyLib(Ljava/lang/String;Ljava/lang/String;)V 83 | 84 | .line 67 85 | move-object/from16 v0, p0 86 | 87 | iput-object v15, v0, Lcom/apk/shield/ShieldApplication;->mDexPath:Ljava/lang/String; 88 | 89 | .line 68 90 | invoke-virtual/range {p0 .. p0}, Lcom/apk/shield/ShieldApplication;->getBaseContext()Landroid/content/Context; 91 | 92 | move-result-object v5 93 | 94 | .line 72 95 | .local v5, "context":Landroid/content/Context; 96 | :try_start_0 97 | invoke-virtual {v5}, Ljava/lang/Object;->getClass()Ljava/lang/Class; 98 | 99 | move-result-object v4 100 | 101 | .line 73 102 | .local v4, "cls":Ljava/lang/Class; 103 | invoke-virtual {v4}, Ljava/lang/Class;->getDeclaredFields()[Ljava/lang/reflect/Field; 104 | 105 | move-result-object v9 106 | 107 | .line 74 108 | .local v9, "fields":[Ljava/lang/reflect/Field; 109 | invoke-virtual {v4}, Ljava/lang/Class;->getDeclaredMethods()[Ljava/lang/reflect/Method; 110 | 111 | move-result-object v14 112 | 113 | .line 75 114 | .local v14, "methods":[Ljava/lang/reflect/Method; 115 | invoke-virtual {v5}, Ljava/lang/Object;->getClass()Ljava/lang/Class; 116 | 117 | move-result-object v18 118 | 119 | const-string v19, "mPackageInfo" 120 | 121 | invoke-virtual/range {v18 .. v19}, Ljava/lang/Class;->getDeclaredField(Ljava/lang/String;)Ljava/lang/reflect/Field; 122 | 123 | move-result-object v10 124 | 125 | .line 76 126 | .local v10, "loadedApkField":Ljava/lang/reflect/Field; 127 | const/16 v18, 0x1 128 | 129 | move/from16 v0, v18 130 | 131 | invoke-virtual {v10, v0}, Ljava/lang/reflect/Field;->setAccessible(Z)V 132 | 133 | .line 77 134 | invoke-virtual {v10, v5}, Ljava/lang/reflect/Field;->get(Ljava/lang/Object;)Ljava/lang/Object; 135 | 136 | move-result-object v13 137 | 138 | .line 78 139 | .local v13, "mPackageInfo":Ljava/lang/Object; 140 | invoke-virtual {v13}, Ljava/lang/Object;->getClass()Ljava/lang/Class; 141 | 142 | move-result-object v18 143 | 144 | const-string v19, "mClassLoader" 145 | 146 | invoke-virtual/range {v18 .. v19}, Ljava/lang/Class;->getDeclaredField(Ljava/lang/String;)Ljava/lang/reflect/Field; 147 | 148 | move-result-object v18 149 | 150 | move-object/from16 v0, v18 151 | 152 | move-object/from16 v1, p0 153 | 154 | iput-object v0, v1, Lcom/apk/shield/ShieldApplication;->field:Ljava/lang/reflect/Field; 155 | 156 | .line 79 157 | move-object/from16 v0, p0 158 | 159 | iget-object v0, v0, Lcom/apk/shield/ShieldApplication;->field:Ljava/lang/reflect/Field; 160 | 161 | move-object/from16 v18, v0 162 | 163 | const/16 v19, 0x1 164 | 165 | invoke-virtual/range {v18 .. v19}, Ljava/lang/reflect/Field;->setAccessible(Z)V 166 | 167 | .line 81 168 | move-object/from16 v0, p0 169 | 170 | iget-object v0, v0, Lcom/apk/shield/ShieldApplication;->field:Ljava/lang/reflect/Field; 171 | 172 | move-object/from16 v18, v0 173 | 174 | move-object/from16 v0, v18 175 | 176 | invoke-virtual {v0, v13}, Ljava/lang/reflect/Field;->get(Ljava/lang/Object;)Ljava/lang/Object; 177 | 178 | move-result-object v12 179 | 180 | .line 83 181 | .local v12, "mClassLoader":Ljava/lang/Object; 182 | new-instance v11, Lcom/apk/shield/ShieldClassLoader; 183 | 184 | move-object/from16 v0, p0 185 | 186 | iget-object v0, v0, Lcom/apk/shield/ShieldApplication;->mDexPath:Ljava/lang/String; 187 | 188 | move-object/from16 v18, v0 189 | 190 | invoke-virtual/range {p0 .. p0}, Lcom/apk/shield/ShieldApplication;->getApplicationInfo()Landroid/content/pm/ApplicationInfo; 191 | 192 | move-result-object v19 193 | 194 | move-object/from16 v0, v19 195 | 196 | iget-object v0, v0, Landroid/content/pm/ApplicationInfo;->sourceDir:Ljava/lang/String; 197 | 198 | move-object/from16 v19, v0 199 | 200 | check-cast v12, Ldalvik/system/PathClassLoader; 201 | 202 | .end local v12 # "mClassLoader":Ljava/lang/Object; 203 | move-object/from16 v0, v18 204 | 205 | move-object/from16 v1, p0 206 | 207 | move-object/from16 v2, v19 208 | 209 | invoke-direct {v11, v0, v1, v2, v12}, Lcom/apk/shield/ShieldClassLoader;->(Ljava/lang/String;Landroid/content/Context;Ljava/lang/String;Ldalvik/system/PathClassLoader;)V 210 | 211 | .line 85 212 | .local v11, "loader":Ljava/lang/ClassLoader; 213 | move-object/from16 v0, p0 214 | 215 | iget-object v0, v0, Lcom/apk/shield/ShieldApplication;->field:Ljava/lang/reflect/Field; 216 | 217 | move-object/from16 v18, v0 218 | 219 | move-object/from16 v0, v18 220 | 221 | invoke-virtual {v0, v13, v11}, Ljava/lang/reflect/Field;->set(Ljava/lang/Object;Ljava/lang/Object;)V 222 | 223 | .line 88 224 | const-class v18, Landroid/content/res/AssetManager; 225 | 226 | invoke-virtual/range {v18 .. v18}, Ljava/lang/Class;->newInstance()Ljava/lang/Object; 227 | 228 | move-result-object v3 229 | 230 | check-cast v3, Landroid/content/res/AssetManager; 231 | 232 | .line 89 233 | .local v3, "am":Landroid/content/res/AssetManager; 234 | invoke-virtual {v3}, Ljava/lang/Object;->getClass()Ljava/lang/Class; 235 | 236 | move-result-object v18 237 | 238 | const-string v19, "addAssetPath" 239 | 240 | const/16 v20, 0x1 241 | 242 | move/from16 v0, v20 243 | 244 | new-array v0, v0, [Ljava/lang/Class; 245 | 246 | move-object/from16 v20, v0 247 | 248 | const/16 v21, 0x0 249 | 250 | const-class v22, Ljava/lang/String; 251 | 252 | aput-object v22, v20, v21 253 | 254 | invoke-virtual/range {v18 .. v20}, Ljava/lang/Class;->getMethod(Ljava/lang/String;[Ljava/lang/Class;)Ljava/lang/reflect/Method; 255 | 256 | move-result-object v18 257 | 258 | const/16 v19, 0x1 259 | 260 | move/from16 v0, v19 261 | 262 | new-array v0, v0, [Ljava/lang/Object; 263 | 264 | move-object/from16 v19, v0 265 | 266 | const/16 v20, 0x0 267 | 268 | move-object/from16 v0, p0 269 | 270 | iget-object v0, v0, Lcom/apk/shield/ShieldApplication;->mDexPath:Ljava/lang/String; 271 | 272 | move-object/from16 v21, v0 273 | 274 | aput-object v21, v19, v20 275 | 276 | move-object/from16 v0, v18 277 | 278 | move-object/from16 v1, v19 279 | 280 | invoke-virtual {v0, v3, v1}, Ljava/lang/reflect/Method;->invoke(Ljava/lang/Object;[Ljava/lang/Object;)Ljava/lang/Object; 281 | 282 | .line 90 283 | invoke-virtual {v5}, Landroid/content/Context;->getResources()Landroid/content/res/Resources; 284 | 285 | move-result-object v17 286 | 287 | .line 91 288 | .local v17, "rs":Landroid/content/res/Resources; 289 | new-instance v16, Landroid/content/res/Resources; 290 | 291 | invoke-virtual/range {v17 .. v17}, Landroid/content/res/Resources;->getDisplayMetrics()Landroid/util/DisplayMetrics; 292 | 293 | move-result-object v18 294 | 295 | invoke-virtual/range {v17 .. v17}, Landroid/content/res/Resources;->getConfiguration()Landroid/content/res/Configuration; 296 | 297 | move-result-object v19 298 | 299 | move-object/from16 v0, v16 300 | 301 | move-object/from16 v1, v18 302 | 303 | move-object/from16 v2, v19 304 | 305 | invoke-direct {v0, v3, v1, v2}, Landroid/content/res/Resources;->(Landroid/content/res/AssetManager;Landroid/util/DisplayMetrics;Landroid/content/res/Configuration;)V 306 | 307 | .line 92 308 | .local v16, "res":Landroid/content/res/Resources; 309 | invoke-virtual {v13}, Ljava/lang/Object;->getClass()Ljava/lang/Class; 310 | 311 | move-result-object v18 312 | 313 | const-string v19, "mResources" 314 | 315 | invoke-virtual/range {v18 .. v19}, Ljava/lang/Class;->getDeclaredField(Ljava/lang/String;)Ljava/lang/reflect/Field; 316 | 317 | move-result-object v8 318 | 319 | .line 93 320 | .local v8, "field":Ljava/lang/reflect/Field; 321 | const/16 v18, 0x1 322 | 323 | move/from16 v0, v18 324 | 325 | invoke-virtual {v8, v0}, Ljava/lang/reflect/Field;->setAccessible(Z)V 326 | 327 | .line 94 328 | move-object/from16 v0, v16 329 | 330 | invoke-virtual {v8, v13, v0}, Ljava/lang/reflect/Field;->set(Ljava/lang/Object;Ljava/lang/Object;)V 331 | :try_end_0 332 | .catch Ljava/lang/Exception; {:try_start_0 .. :try_end_0} :catch_0 333 | 334 | .line 101 335 | .end local v3 # "am":Landroid/content/res/AssetManager; 336 | .end local v4 # "cls":Ljava/lang/Class; 337 | .end local v8 # "field":Ljava/lang/reflect/Field; 338 | .end local v9 # "fields":[Ljava/lang/reflect/Field; 339 | .end local v10 # "loadedApkField":Ljava/lang/reflect/Field; 340 | .end local v11 # "loader":Ljava/lang/ClassLoader; 341 | .end local v13 # "mPackageInfo":Ljava/lang/Object; 342 | .end local v14 # "methods":[Ljava/lang/reflect/Method; 343 | .end local v16 # "res":Landroid/content/res/Resources; 344 | .end local v17 # "rs":Landroid/content/res/Resources; 345 | :goto_0 346 | return-void 347 | 348 | .line 97 349 | :catch_0 350 | move-exception v7 351 | 352 | .line 99 353 | .local v7, "e":Ljava/lang/Exception; 354 | invoke-virtual {v7}, Ljava/lang/Exception;->printStackTrace()V 355 | 356 | goto :goto_0 357 | .end method 358 | 359 | .method public copyLib(Ljava/lang/String;Ljava/lang/String;)V 360 | .locals 7 361 | .param p1, "src" # Ljava/lang/String; 362 | .param p2, "dst" # Ljava/lang/String; 363 | 364 | .prologue 365 | .line 35 366 | :try_start_0 367 | new-instance v5, Ljava/io/File; 368 | 369 | invoke-direct {v5, p2}, Ljava/io/File;->(Ljava/lang/String;)V 370 | 371 | .line 36 372 | .local v5, "out":Ljava/io/File; 373 | invoke-virtual {v5}, Ljava/io/File;->exists()Z 374 | 375 | move-result v6 376 | 377 | if-eqz v6, :cond_0 378 | 379 | .line 56 380 | .end local v5 # "out":Ljava/io/File; 381 | :goto_0 382 | return-void 383 | 384 | .line 40 385 | .restart local v5 # "out":Ljava/io/File; 386 | :cond_0 387 | invoke-virtual {p0}, Lcom/apk/shield/ShieldApplication;->getAssets()Landroid/content/res/AssetManager; 388 | 389 | move-result-object v6 390 | 391 | invoke-virtual {v6, p1}, Landroid/content/res/AssetManager;->open(Ljava/lang/String;)Ljava/io/InputStream; 392 | 393 | move-result-object v2 394 | 395 | .line 41 396 | .local v2, "fis":Ljava/io/InputStream; 397 | new-instance v3, Ljava/io/FileOutputStream; 398 | 399 | invoke-direct {v3, v5}, Ljava/io/FileOutputStream;->(Ljava/io/File;)V 400 | 401 | .line 42 402 | .local v3, "fos":Ljava/io/FileOutputStream; 403 | const/16 v6, 0x400 404 | 405 | new-array v0, v6, [B 406 | 407 | .line 43 408 | .local v0, "buffer":[B 409 | const/4 v4, 0x0 410 | 411 | .line 44 412 | .local v4, "len":I 413 | :goto_1 414 | invoke-virtual {v2, v0}, Ljava/io/InputStream;->read([B)I 415 | 416 | move-result v4 417 | 418 | if-nez v4, :cond_1 419 | 420 | .line 48 421 | invoke-virtual {v2}, Ljava/io/InputStream;->close()V 422 | 423 | .line 49 424 | invoke-virtual {v3}, Ljava/io/FileOutputStream;->close()V 425 | :try_end_0 426 | .catch Ljava/lang/Exception; {:try_start_0 .. :try_end_0} :catch_0 427 | 428 | goto :goto_0 429 | 430 | .line 51 431 | .end local v0 # "buffer":[B 432 | .end local v2 # "fis":Ljava/io/InputStream; 433 | .end local v3 # "fos":Ljava/io/FileOutputStream; 434 | .end local v4 # "len":I 435 | .end local v5 # "out":Ljava/io/File; 436 | :catch_0 437 | move-exception v1 438 | 439 | .line 54 440 | .local v1, "e":Ljava/lang/Exception; 441 | invoke-virtual {v1}, Ljava/lang/Exception;->printStackTrace()V 442 | 443 | goto :goto_0 444 | 445 | .line 46 446 | .end local v1 # "e":Ljava/lang/Exception; 447 | .restart local v0 # "buffer":[B 448 | .restart local v2 # "fis":Ljava/io/InputStream; 449 | .restart local v3 # "fos":Ljava/io/FileOutputStream; 450 | .restart local v4 # "len":I 451 | .restart local v5 # "out":Ljava/io/File; 452 | :cond_1 453 | const/4 v6, 0x0 454 | 455 | :try_start_1 456 | invoke-virtual {v3, v0, v6, v4}, Ljava/io/FileOutputStream;->write([BII)V 457 | :try_end_1 458 | .catch Ljava/lang/Exception; {:try_start_1 .. :try_end_1} :catch_0 459 | 460 | goto :goto_1 461 | .end method 462 | 463 | .method public getAssets()Landroid/content/res/AssetManager; 464 | .locals 2 465 | 466 | .prologue 467 | .line 125 468 | const-string v0, "MM" 469 | 470 | const-string v1, "getAssets" 471 | 472 | invoke-static {v0, v1}, Landroid/util/Log;->d(Ljava/lang/String;Ljava/lang/String;)I 473 | 474 | .line 126 475 | invoke-super {p0}, Landroid/app/Application;->getAssets()Landroid/content/res/AssetManager; 476 | 477 | move-result-object v0 478 | 479 | return-object v0 480 | .end method 481 | 482 | .method public getResources()Landroid/content/res/Resources; 483 | .locals 2 484 | 485 | .prologue 486 | .line 133 487 | const-string v0, "MM" 488 | 489 | const-string v1, "getAssets" 490 | 491 | invoke-static {v0, v1}, Landroid/util/Log;->d(Ljava/lang/String;Ljava/lang/String;)I 492 | 493 | .line 134 494 | invoke-super {p0}, Landroid/app/Application;->getResources()Landroid/content/res/Resources; 495 | 496 | move-result-object v0 497 | 498 | return-object v0 499 | .end method 500 | -------------------------------------------------------------------------------- /ApkShield/smali/com/apk/shield/ShieldClassLoader.smali: -------------------------------------------------------------------------------- 1 | .class public Lcom/apk/shield/ShieldClassLoader; 2 | .super Ldalvik/system/PathClassLoader; 3 | .source "ShieldClassLoader.java" 4 | 5 | 6 | # instance fields 7 | .field private context:Landroid/content/Context; 8 | 9 | .field private mClassLoader:Ldalvik/system/PathClassLoader; 10 | 11 | .field private mDexClassLoader:Ldalvik/system/DexClassLoader; 12 | 13 | .field private mDexPath:Ljava/lang/String; 14 | 15 | 16 | # direct methods 17 | .method public constructor (Ljava/lang/String;Landroid/content/Context;Ljava/lang/String;Ldalvik/system/PathClassLoader;)V 18 | .locals 11 19 | .param p1, "desDexPath" # Ljava/lang/String; 20 | .param p2, "context" # Landroid/content/Context; 21 | .param p3, "dexPath" # Ljava/lang/String; 22 | .param p4, "parent" # Ldalvik/system/PathClassLoader; 23 | 24 | .prologue 25 | .line 31 26 | invoke-direct {p0, p3, p4}, Ldalvik/system/PathClassLoader;->(Ljava/lang/String;Ljava/lang/ClassLoader;)V 27 | 28 | .line 20 29 | const/4 v6, 0x0 30 | 31 | iput-object v6, p0, Lcom/apk/shield/ShieldClassLoader;->mClassLoader:Ldalvik/system/PathClassLoader; 32 | 33 | .line 32 34 | new-instance v4, Ljava/io/File; 35 | 36 | invoke-direct {v4, p1}, Ljava/io/File;->(Ljava/lang/String;)V 37 | 38 | .line 33 39 | .local v4, "file":Ljava/io/File; 40 | iput-object p2, p0, Lcom/apk/shield/ShieldClassLoader;->context:Landroid/content/Context; 41 | 42 | .line 34 43 | iput-object p4, p0, Lcom/apk/shield/ShieldClassLoader;->mClassLoader:Ldalvik/system/PathClassLoader; 44 | 45 | .line 40 46 | :try_start_0 47 | const-class v0, Ldalvik/system/PathClassLoader; 48 | 49 | .line 41 50 | .local v0, "cls":Ljava/lang/Class; 51 | invoke-virtual {v0}, Ljava/lang/Class;->getDeclaredFields()[Ljava/lang/reflect/Field; 52 | 53 | move-result-object v3 54 | 55 | .line 42 56 | .local v3, "fields":[Ljava/lang/reflect/Field; 57 | invoke-virtual {v0}, Ljava/lang/Class;->getDeclaredMethods()[Ljava/lang/reflect/Method; 58 | 59 | move-result-object v5 60 | 61 | .line 52 62 | .local v5, "methods":[Ljava/lang/reflect/Method; 63 | const-string v6, "dex" 64 | 65 | const/4 v7, 0x0 66 | 67 | invoke-virtual {p2, v6, v7}, Landroid/content/Context;->getDir(Ljava/lang/String;I)Ljava/io/File; 68 | 69 | move-result-object v1 70 | 71 | .line 53 72 | .local v1, "dexOutputDir":Ljava/io/File; 73 | new-instance v7, Lcom/apk/shield/ShieldDexClassLoader; 74 | 75 | invoke-virtual {v4}, Ljava/io/File;->getAbsolutePath()Ljava/lang/String; 76 | 77 | move-result-object v8 78 | 79 | invoke-virtual {v1}, Ljava/io/File;->getAbsolutePath()Ljava/lang/String; 80 | 81 | move-result-object v9 82 | 83 | invoke-virtual {v4}, Ljava/io/File;->getAbsolutePath()Ljava/lang/String; 84 | 85 | move-result-object v10 86 | 87 | invoke-virtual {p2}, Landroid/content/Context;->getClassLoader()Ljava/lang/ClassLoader; 88 | 89 | move-result-object v6 90 | 91 | check-cast v6, Ldalvik/system/PathClassLoader; 92 | 93 | invoke-direct {v7, v8, v9, v10, v6}, Lcom/apk/shield/ShieldDexClassLoader;->(Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ldalvik/system/PathClassLoader;)V 94 | 95 | iput-object v7, p0, Lcom/apk/shield/ShieldClassLoader;->mDexClassLoader:Ldalvik/system/DexClassLoader; 96 | :try_end_0 97 | .catch Ljava/lang/Exception; {:try_start_0 .. :try_end_0} :catch_0 98 | 99 | .line 61 100 | .end local v0 # "cls":Ljava/lang/Class; 101 | .end local v1 # "dexOutputDir":Ljava/io/File; 102 | .end local v3 # "fields":[Ljava/lang/reflect/Field; 103 | .end local v5 # "methods":[Ljava/lang/reflect/Method; 104 | :goto_0 105 | return-void 106 | 107 | .line 55 108 | :catch_0 109 | move-exception v2 110 | 111 | .line 58 112 | .local v2, "e":Ljava/lang/Exception; 113 | invoke-virtual {v2}, Ljava/lang/Exception;->printStackTrace()V 114 | 115 | goto :goto_0 116 | .end method 117 | 118 | 119 | # virtual methods 120 | .method protected findClass(Ljava/lang/String;)Ljava/lang/Class; 121 | .locals 4 122 | .param p1, "name" # Ljava/lang/String; 123 | .annotation system Ldalvik/annotation/Signature; 124 | value = { 125 | "(", 126 | "Ljava/lang/String;", 127 | ")", 128 | "Ljava/lang/Class", 129 | "<*>;" 130 | } 131 | .end annotation 132 | 133 | .annotation system Ldalvik/annotation/Throws; 134 | value = { 135 | Ljava/lang/ClassNotFoundException; 136 | } 137 | .end annotation 138 | 139 | .prologue 140 | .line 67 141 | const-string v1, "MM" 142 | 143 | new-instance v2, Ljava/lang/StringBuilder; 144 | 145 | const-string v3, "findClass name " 146 | 147 | invoke-direct {v2, v3}, Ljava/lang/StringBuilder;->(Ljava/lang/String;)V 148 | 149 | invoke-virtual {v2, p1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder; 150 | 151 | move-result-object v2 152 | 153 | invoke-virtual {v2}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String; 154 | 155 | move-result-object v2 156 | 157 | invoke-static {v1, v2}, Landroid/util/Log;->d(Ljava/lang/String;Ljava/lang/String;)I 158 | 159 | .line 68 160 | const/4 v0, 0x0 161 | 162 | .line 71 163 | .local v0, "clazz":Ljava/lang/Class; 164 | :try_start_0 165 | iget-object v1, p0, Lcom/apk/shield/ShieldClassLoader;->mClassLoader:Ldalvik/system/PathClassLoader; 166 | 167 | invoke-virtual {v1, p1}, Ldalvik/system/PathClassLoader;->loadClass(Ljava/lang/String;)Ljava/lang/Class; 168 | :try_end_0 169 | .catch Ljava/lang/Exception; {:try_start_0 .. :try_end_0} :catch_0 170 | 171 | move-result-object v0 172 | 173 | .line 76 174 | :goto_0 175 | if-eqz v0, :cond_0 176 | 177 | .line 80 178 | .end local v0 # "clazz":Ljava/lang/Class; 179 | :goto_1 180 | return-object v0 181 | 182 | .restart local v0 # "clazz":Ljava/lang/Class; 183 | :cond_0 184 | iget-object v1, p0, Lcom/apk/shield/ShieldClassLoader;->mDexClassLoader:Ldalvik/system/DexClassLoader; 185 | 186 | invoke-virtual {v1, p1}, Ldalvik/system/DexClassLoader;->loadClass(Ljava/lang/String;)Ljava/lang/Class; 187 | 188 | move-result-object v0 189 | 190 | goto :goto_1 191 | 192 | .line 73 193 | :catch_0 194 | move-exception v1 195 | 196 | goto :goto_0 197 | .end method 198 | 199 | .method public findLibrary(Ljava/lang/String;)Ljava/lang/String; 200 | .locals 4 201 | .param p1, "name" # Ljava/lang/String; 202 | 203 | .prologue 204 | .line 89 205 | const-string v1, "MM" 206 | 207 | new-instance v2, Ljava/lang/StringBuilder; 208 | 209 | const-string v3, "findLibrary name " 210 | 211 | invoke-direct {v2, v3}, Ljava/lang/StringBuilder;->(Ljava/lang/String;)V 212 | 213 | invoke-virtual {v2, p1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder; 214 | 215 | move-result-object v2 216 | 217 | invoke-virtual {v2}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String; 218 | 219 | move-result-object v2 220 | 221 | invoke-static {v1, v2}, Landroid/util/Log;->d(Ljava/lang/String;Ljava/lang/String;)I 222 | 223 | .line 92 224 | :try_start_0 225 | iget-object v1, p0, Lcom/apk/shield/ShieldClassLoader;->mClassLoader:Ldalvik/system/PathClassLoader; 226 | 227 | invoke-virtual {v1, p1}, Ldalvik/system/PathClassLoader;->findLibrary(Ljava/lang/String;)Ljava/lang/String; 228 | :try_end_0 229 | .catch Ljava/lang/Exception; {:try_start_0 .. :try_end_0} :catch_0 230 | 231 | move-result-object v1 232 | 233 | .line 96 234 | :goto_0 235 | return-object v1 236 | 237 | .line 94 238 | :catch_0 239 | move-exception v0 240 | 241 | .line 96 242 | .local v0, "e":Ljava/lang/Exception; 243 | iget-object v1, p0, Lcom/apk/shield/ShieldClassLoader;->mDexClassLoader:Ldalvik/system/DexClassLoader; 244 | 245 | invoke-virtual {v1, p1}, Ldalvik/system/DexClassLoader;->findLibrary(Ljava/lang/String;)Ljava/lang/String; 246 | 247 | move-result-object v1 248 | 249 | goto :goto_0 250 | .end method 251 | 252 | .method protected findResource(Ljava/lang/String;)Ljava/net/URL; 253 | .locals 3 254 | .param p1, "name" # Ljava/lang/String; 255 | 256 | .prologue 257 | .line 105 258 | const-string v0, "MM" 259 | 260 | new-instance v1, Ljava/lang/StringBuilder; 261 | 262 | const-string v2, "findResource name " 263 | 264 | invoke-direct {v1, v2}, Ljava/lang/StringBuilder;->(Ljava/lang/String;)V 265 | 266 | invoke-virtual {v1, p1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder; 267 | 268 | move-result-object v1 269 | 270 | invoke-virtual {v1}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String; 271 | 272 | move-result-object v1 273 | 274 | invoke-static {v0, v1}, Landroid/util/Log;->d(Ljava/lang/String;Ljava/lang/String;)I 275 | 276 | .line 106 277 | invoke-super {p0, p1}, Ldalvik/system/PathClassLoader;->findResource(Ljava/lang/String;)Ljava/net/URL; 278 | 279 | move-result-object v0 280 | 281 | return-object v0 282 | .end method 283 | 284 | .method protected findResources(Ljava/lang/String;)Ljava/util/Enumeration; 285 | .locals 3 286 | .param p1, "name" # Ljava/lang/String; 287 | .annotation system Ldalvik/annotation/Signature; 288 | value = { 289 | "(", 290 | "Ljava/lang/String;", 291 | ")", 292 | "Ljava/util/Enumeration", 293 | "<", 294 | "Ljava/net/URL;", 295 | ">;" 296 | } 297 | .end annotation 298 | 299 | .prologue 300 | .line 113 301 | const-string v0, "MM" 302 | 303 | new-instance v1, Ljava/lang/StringBuilder; 304 | 305 | const-string v2, "findResources name " 306 | 307 | invoke-direct {v1, v2}, Ljava/lang/StringBuilder;->(Ljava/lang/String;)V 308 | 309 | invoke-virtual {v1, p1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder; 310 | 311 | move-result-object v1 312 | 313 | invoke-virtual {v1}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String; 314 | 315 | move-result-object v1 316 | 317 | invoke-static {v0, v1}, Landroid/util/Log;->d(Ljava/lang/String;Ljava/lang/String;)I 318 | 319 | .line 115 320 | invoke-super {p0, p1}, Ldalvik/system/PathClassLoader;->findResources(Ljava/lang/String;)Ljava/util/Enumeration; 321 | 322 | move-result-object v0 323 | 324 | return-object v0 325 | .end method 326 | 327 | .method protected declared-synchronized getPackage(Ljava/lang/String;)Ljava/lang/Package; 328 | .locals 3 329 | .param p1, "name" # Ljava/lang/String; 330 | 331 | .prologue 332 | .line 123 333 | monitor-enter p0 334 | 335 | :try_start_0 336 | const-string v0, "MM" 337 | 338 | new-instance v1, Ljava/lang/StringBuilder; 339 | 340 | const-string v2, " getPackage name " 341 | 342 | invoke-direct {v1, v2}, Ljava/lang/StringBuilder;->(Ljava/lang/String;)V 343 | 344 | invoke-virtual {v1, p1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder; 345 | 346 | move-result-object v1 347 | 348 | invoke-virtual {v1}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String; 349 | 350 | move-result-object v1 351 | 352 | invoke-static {v0, v1}, Landroid/util/Log;->d(Ljava/lang/String;Ljava/lang/String;)I 353 | 354 | .line 124 355 | invoke-super {p0, p1}, Ldalvik/system/PathClassLoader;->getPackage(Ljava/lang/String;)Ljava/lang/Package; 356 | :try_end_0 357 | .catchall {:try_start_0 .. :try_end_0} :catchall_0 358 | 359 | move-result-object v0 360 | 361 | monitor-exit p0 362 | 363 | return-object v0 364 | 365 | .line 123 366 | :catchall_0 367 | move-exception v0 368 | 369 | monitor-exit p0 370 | 371 | throw v0 372 | .end method 373 | 374 | .method public toString()Ljava/lang/String; 375 | .locals 2 376 | 377 | .prologue 378 | .line 131 379 | const-string v0, "MM" 380 | 381 | const-string v1, " toString " 382 | 383 | invoke-static {v0, v1}, Landroid/util/Log;->d(Ljava/lang/String;Ljava/lang/String;)I 384 | 385 | .line 132 386 | invoke-super {p0}, Ldalvik/system/PathClassLoader;->toString()Ljava/lang/String; 387 | 388 | move-result-object v0 389 | 390 | return-object v0 391 | .end method 392 | -------------------------------------------------------------------------------- /ApkShield/smali/com/apk/shield/ShieldDexClassLoader.smali: -------------------------------------------------------------------------------- 1 | .class public Lcom/apk/shield/ShieldDexClassLoader; 2 | .super Ldalvik/system/DexClassLoader; 3 | .source "ShieldDexClassLoader.java" 4 | 5 | 6 | # instance fields 7 | .field mParent:Ldalvik/system/PathClassLoader; 8 | 9 | 10 | # direct methods 11 | .method public constructor (Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ldalvik/system/PathClassLoader;)V 12 | .locals 1 13 | .param p1, "dexPath" # Ljava/lang/String; 14 | .param p2, "optimizedDirectory" # Ljava/lang/String; 15 | .param p3, "libraryPath" # Ljava/lang/String; 16 | .param p4, "parent" # Ldalvik/system/PathClassLoader; 17 | 18 | .prologue 19 | .line 22 20 | invoke-direct {p0, p1, p2, p3, p4}, Ldalvik/system/DexClassLoader;->(Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/ClassLoader;)V 21 | 22 | .line 15 23 | const/4 v0, 0x0 24 | 25 | iput-object v0, p0, Lcom/apk/shield/ShieldDexClassLoader;->mParent:Ldalvik/system/PathClassLoader; 26 | 27 | .line 24 28 | return-void 29 | .end method 30 | 31 | 32 | # virtual methods 33 | .method protected findClass(Ljava/lang/String;)Ljava/lang/Class; 34 | .locals 1 35 | .param p1, "name" # Ljava/lang/String; 36 | .annotation system Ldalvik/annotation/Signature; 37 | value = { 38 | "(", 39 | "Ljava/lang/String;", 40 | ")", 41 | "Ljava/lang/Class", 42 | "<*>;" 43 | } 44 | .end annotation 45 | 46 | .annotation system Ldalvik/annotation/Throws; 47 | value = { 48 | Ljava/lang/ClassNotFoundException; 49 | } 50 | .end annotation 51 | 52 | .prologue 53 | .line 31 54 | invoke-super {p0, p1}, Ldalvik/system/DexClassLoader;->findClass(Ljava/lang/String;)Ljava/lang/Class; 55 | 56 | move-result-object v0 57 | 58 | return-object v0 59 | .end method 60 | 61 | .method public findLibrary(Ljava/lang/String;)Ljava/lang/String; 62 | .locals 4 63 | .param p1, "name" # Ljava/lang/String; 64 | 65 | .prologue 66 | .line 39 67 | const-string v1, "MM" 68 | 69 | new-instance v2, Ljava/lang/StringBuilder; 70 | 71 | const-string v3, "ShieldDexClassLoader findLibrary name " 72 | 73 | invoke-direct {v2, v3}, Ljava/lang/StringBuilder;->(Ljava/lang/String;)V 74 | 75 | invoke-virtual {v2, p1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder; 76 | 77 | move-result-object v2 78 | 79 | invoke-virtual {v2}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String; 80 | 81 | move-result-object v2 82 | 83 | invoke-static {v1, v2}, Landroid/util/Log;->d(Ljava/lang/String;Ljava/lang/String;)I 84 | 85 | .line 40 86 | invoke-super {p0, p1}, Ldalvik/system/DexClassLoader;->findLibrary(Ljava/lang/String;)Ljava/lang/String; 87 | 88 | move-result-object v0 89 | 90 | .line 41 91 | .local v0, "libpath":Ljava/lang/String; 92 | invoke-static {v0}, Landroid/text/TextUtils;->isEmpty(Ljava/lang/CharSequence;)Z 93 | 94 | move-result v1 95 | 96 | if-eqz v1, :cond_0 97 | 98 | .line 43 99 | invoke-virtual {p0}, Lcom/apk/shield/ShieldDexClassLoader;->getParent()Ljava/lang/ClassLoader; 100 | 101 | move-result-object v1 102 | 103 | check-cast v1, Ldalvik/system/PathClassLoader; 104 | 105 | invoke-virtual {v1, p1}, Ldalvik/system/PathClassLoader;->findLibrary(Ljava/lang/String;)Ljava/lang/String; 106 | 107 | move-result-object v0 108 | 109 | .line 45 110 | :cond_0 111 | return-object v0 112 | .end method 113 | 114 | .method protected findResource(Ljava/lang/String;)Ljava/net/URL; 115 | .locals 3 116 | .param p1, "name" # Ljava/lang/String; 117 | 118 | .prologue 119 | .line 53 120 | const-string v0, "MM" 121 | 122 | new-instance v1, Ljava/lang/StringBuilder; 123 | 124 | const-string v2, "ShieldDexClassLoader findResource name " 125 | 126 | invoke-direct {v1, v2}, Ljava/lang/StringBuilder;->(Ljava/lang/String;)V 127 | 128 | invoke-virtual {v1, p1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder; 129 | 130 | move-result-object v1 131 | 132 | invoke-virtual {v1}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String; 133 | 134 | move-result-object v1 135 | 136 | invoke-static {v0, v1}, Landroid/util/Log;->d(Ljava/lang/String;Ljava/lang/String;)I 137 | 138 | .line 54 139 | invoke-super {p0, p1}, Ldalvik/system/DexClassLoader;->findResource(Ljava/lang/String;)Ljava/net/URL; 140 | 141 | move-result-object v0 142 | 143 | return-object v0 144 | .end method 145 | 146 | .method protected findResources(Ljava/lang/String;)Ljava/util/Enumeration; 147 | .locals 3 148 | .param p1, "name" # Ljava/lang/String; 149 | .annotation system Ldalvik/annotation/Signature; 150 | value = { 151 | "(", 152 | "Ljava/lang/String;", 153 | ")", 154 | "Ljava/util/Enumeration", 155 | "<", 156 | "Ljava/net/URL;", 157 | ">;" 158 | } 159 | .end annotation 160 | 161 | .prologue 162 | .line 62 163 | const-string v0, "MM" 164 | 165 | new-instance v1, Ljava/lang/StringBuilder; 166 | 167 | const-string v2, "ShieldDexClassLoader findResources name " 168 | 169 | invoke-direct {v1, v2}, Ljava/lang/StringBuilder;->(Ljava/lang/String;)V 170 | 171 | invoke-virtual {v1, p1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder; 172 | 173 | move-result-object v1 174 | 175 | invoke-virtual {v1}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String; 176 | 177 | move-result-object v1 178 | 179 | invoke-static {v0, v1}, Landroid/util/Log;->d(Ljava/lang/String;Ljava/lang/String;)I 180 | 181 | .line 63 182 | invoke-super {p0, p1}, Ldalvik/system/DexClassLoader;->findResources(Ljava/lang/String;)Ljava/util/Enumeration; 183 | 184 | move-result-object v0 185 | 186 | return-object v0 187 | .end method 188 | 189 | .method protected declared-synchronized getPackage(Ljava/lang/String;)Ljava/lang/Package; 190 | .locals 3 191 | .param p1, "name" # Ljava/lang/String; 192 | 193 | .prologue 194 | .line 71 195 | monitor-enter p0 196 | 197 | :try_start_0 198 | const-string v0, "MM" 199 | 200 | new-instance v1, Ljava/lang/StringBuilder; 201 | 202 | const-string v2, "ShieldDexClassLoader getPackage name " 203 | 204 | invoke-direct {v1, v2}, Ljava/lang/StringBuilder;->(Ljava/lang/String;)V 205 | 206 | invoke-virtual {v1, p1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder; 207 | 208 | move-result-object v1 209 | 210 | invoke-virtual {v1}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String; 211 | 212 | move-result-object v1 213 | 214 | invoke-static {v0, v1}, Landroid/util/Log;->d(Ljava/lang/String;Ljava/lang/String;)I 215 | 216 | .line 72 217 | invoke-super {p0, p1}, Ldalvik/system/DexClassLoader;->getPackage(Ljava/lang/String;)Ljava/lang/Package; 218 | :try_end_0 219 | .catchall {:try_start_0 .. :try_end_0} :catchall_0 220 | 221 | move-result-object v0 222 | 223 | monitor-exit p0 224 | 225 | return-object v0 226 | 227 | .line 71 228 | :catchall_0 229 | move-exception v0 230 | 231 | monitor-exit p0 232 | 233 | throw v0 234 | .end method 235 | 236 | .method public toString()Ljava/lang/String; 237 | .locals 1 238 | 239 | .prologue 240 | .line 79 241 | invoke-super {p0}, Ldalvik/system/DexClassLoader;->toString()Ljava/lang/String; 242 | 243 | move-result-object v0 244 | 245 | return-object v0 246 | .end method 247 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | GNU GENERAL PUBLIC LICENSE 2 | Version 2, June 1991 3 | 4 | Copyright (C) 1989, 1991 Free Software Foundation, Inc., 5 | 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA 6 | Everyone is permitted to copy and distribute verbatim copies 7 | of this license document, but changing it is not allowed. 8 | 9 | Preamble 10 | 11 | The licenses for most software are designed to take away your 12 | freedom to share and change it. By contrast, the GNU General Public 13 | License is intended to guarantee your freedom to share and change free 14 | software--to make sure the software is free for all its users. This 15 | General Public License applies to most of the Free Software 16 | Foundation's software and to any other program whose authors commit to 17 | using it. (Some other Free Software Foundation software is covered by 18 | the GNU Lesser General Public License instead.) You can apply it to 19 | your programs, too. 20 | 21 | When we speak of free software, we are referring to freedom, not 22 | price. Our General Public Licenses are designed to make sure that you 23 | have the freedom to distribute copies of free software (and charge for 24 | this service if you wish), that you receive source code or can get it 25 | if you want it, that you can change the software or use pieces of it 26 | in new free programs; and that you know you can do these things. 27 | 28 | To protect your rights, we need to make restrictions that forbid 29 | anyone to deny you these rights or to ask you to surrender the rights. 30 | These restrictions translate to certain responsibilities for you if you 31 | distribute copies of the software, or if you modify it. 32 | 33 | For example, if you distribute copies of such a program, whether 34 | gratis or for a fee, you must give the recipients all the rights that 35 | you have. You must make sure that they, too, receive or can get the 36 | source code. And you must show them these terms so they know their 37 | rights. 38 | 39 | We protect your rights with two steps: (1) copyright the software, and 40 | (2) offer you this license which gives you legal permission to copy, 41 | distribute and/or modify the software. 42 | 43 | Also, for each author's protection and ours, we want to make certain 44 | that everyone understands that there is no warranty for this free 45 | software. If the software is modified by someone else and passed on, we 46 | want its recipients to know that what they have is not the original, so 47 | that any problems introduced by others will not reflect on the original 48 | authors' reputations. 49 | 50 | Finally, any free program is threatened constantly by software 51 | patents. We wish to avoid the danger that redistributors of a free 52 | program will individually obtain patent licenses, in effect making the 53 | program proprietary. To prevent this, we have made it clear that any 54 | patent must be licensed for everyone's free use or not licensed at all. 55 | 56 | The precise terms and conditions for copying, distribution and 57 | modification follow. 58 | 59 | GNU GENERAL PUBLIC LICENSE 60 | TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION 61 | 62 | 0. This License applies to any program or other work which contains 63 | a notice placed by the copyright holder saying it may be distributed 64 | under the terms of this General Public License. The "Program", below, 65 | refers to any such program or work, and a "work based on the Program" 66 | means either the Program or any derivative work under copyright law: 67 | that is to say, a work containing the Program or a portion of it, 68 | either verbatim or with modifications and/or translated into another 69 | language. (Hereinafter, translation is included without limitation in 70 | the term "modification".) Each licensee is addressed as "you". 71 | 72 | Activities other than copying, distribution and modification are not 73 | covered by this License; they are outside its scope. The act of 74 | running the Program is not restricted, and the output from the Program 75 | is covered only if its contents constitute a work based on the 76 | Program (independent of having been made by running the Program). 77 | Whether that is true depends on what the Program does. 78 | 79 | 1. You may copy and distribute verbatim copies of the Program's 80 | source code as you receive it, in any medium, provided that you 81 | conspicuously and appropriately publish on each copy an appropriate 82 | copyright notice and disclaimer of warranty; keep intact all the 83 | notices that refer to this License and to the absence of any warranty; 84 | and give any other recipients of the Program a copy of this License 85 | along with the Program. 86 | 87 | You may charge a fee for the physical act of transferring a copy, and 88 | you may at your option offer warranty protection in exchange for a fee. 89 | 90 | 2. You may modify your copy or copies of the Program or any portion 91 | of it, thus forming a work based on the Program, and copy and 92 | distribute such modifications or work under the terms of Section 1 93 | above, provided that you also meet all of these conditions: 94 | 95 | a) You must cause the modified files to carry prominent notices 96 | stating that you changed the files and the date of any change. 97 | 98 | b) You must cause any work that you distribute or publish, that in 99 | whole or in part contains or is derived from the Program or any 100 | part thereof, to be licensed as a whole at no charge to all third 101 | parties under the terms of this License. 102 | 103 | c) If the modified program normally reads commands interactively 104 | when run, you must cause it, when started running for such 105 | interactive use in the most ordinary way, to print or display an 106 | announcement including an appropriate copyright notice and a 107 | notice that there is no warranty (or else, saying that you provide 108 | a warranty) and that users may redistribute the program under 109 | these conditions, and telling the user how to view a copy of this 110 | License. (Exception: if the Program itself is interactive but 111 | does not normally print such an announcement, your work based on 112 | the Program is not required to print an announcement.) 113 | 114 | These requirements apply to the modified work as a whole. If 115 | identifiable sections of that work are not derived from the Program, 116 | and can be reasonably considered independent and separate works in 117 | themselves, then this License, and its terms, do not apply to those 118 | sections when you distribute them as separate works. But when you 119 | distribute the same sections as part of a whole which is a work based 120 | on the Program, the distribution of the whole must be on the terms of 121 | this License, whose permissions for other licensees extend to the 122 | entire whole, and thus to each and every part regardless of who wrote it. 123 | 124 | Thus, it is not the intent of this section to claim rights or contest 125 | your rights to work written entirely by you; rather, the intent is to 126 | exercise the right to control the distribution of derivative or 127 | collective works based on the Program. 128 | 129 | In addition, mere aggregation of another work not based on the Program 130 | with the Program (or with a work based on the Program) on a volume of 131 | a storage or distribution medium does not bring the other work under 132 | the scope of this License. 133 | 134 | 3. You may copy and distribute the Program (or a work based on it, 135 | under Section 2) in object code or executable form under the terms of 136 | Sections 1 and 2 above provided that you also do one of the following: 137 | 138 | a) Accompany it with the complete corresponding machine-readable 139 | source code, which must be distributed under the terms of Sections 140 | 1 and 2 above on a medium customarily used for software interchange; or, 141 | 142 | b) Accompany it with a written offer, valid for at least three 143 | years, to give any third party, for a charge no more than your 144 | cost of physically performing source distribution, a complete 145 | machine-readable copy of the corresponding source code, to be 146 | distributed under the terms of Sections 1 and 2 above on a medium 147 | customarily used for software interchange; or, 148 | 149 | c) Accompany it with the information you received as to the offer 150 | to distribute corresponding source code. (This alternative is 151 | allowed only for noncommercial distribution and only if you 152 | received the program in object code or executable form with such 153 | an offer, in accord with Subsection b above.) 154 | 155 | The source code for a work means the preferred form of the work for 156 | making modifications to it. For an executable work, complete source 157 | code means all the source code for all modules it contains, plus any 158 | associated interface definition files, plus the scripts used to 159 | control compilation and installation of the executable. However, as a 160 | special exception, the source code distributed need not include 161 | anything that is normally distributed (in either source or binary 162 | form) with the major components (compiler, kernel, and so on) of the 163 | operating system on which the executable runs, unless that component 164 | itself accompanies the executable. 165 | 166 | If distribution of executable or object code is made by offering 167 | access to copy from a designated place, then offering equivalent 168 | access to copy the source code from the same place counts as 169 | distribution of the source code, even though third parties are not 170 | compelled to copy the source along with the object code. 171 | 172 | 4. You may not copy, modify, sublicense, or distribute the Program 173 | except as expressly provided under this License. Any attempt 174 | otherwise to copy, modify, sublicense or distribute the Program is 175 | void, and will automatically terminate your rights under this License. 176 | However, parties who have received copies, or rights, from you under 177 | this License will not have their licenses terminated so long as such 178 | parties remain in full compliance. 179 | 180 | 5. You are not required to accept this License, since you have not 181 | signed it. However, nothing else grants you permission to modify or 182 | distribute the Program or its derivative works. These actions are 183 | prohibited by law if you do not accept this License. Therefore, by 184 | modifying or distributing the Program (or any work based on the 185 | Program), you indicate your acceptance of this License to do so, and 186 | all its terms and conditions for copying, distributing or modifying 187 | the Program or works based on it. 188 | 189 | 6. Each time you redistribute the Program (or any work based on the 190 | Program), the recipient automatically receives a license from the 191 | original licensor to copy, distribute or modify the Program subject to 192 | these terms and conditions. You may not impose any further 193 | restrictions on the recipients' exercise of the rights granted herein. 194 | You are not responsible for enforcing compliance by third parties to 195 | this License. 196 | 197 | 7. If, as a consequence of a court judgment or allegation of patent 198 | infringement or for any other reason (not limited to patent issues), 199 | conditions are imposed on you (whether by court order, agreement or 200 | otherwise) that contradict the conditions of this License, they do not 201 | excuse you from the conditions of this License. If you cannot 202 | distribute so as to satisfy simultaneously your obligations under this 203 | License and any other pertinent obligations, then as a consequence you 204 | may not distribute the Program at all. For example, if a patent 205 | license would not permit royalty-free redistribution of the Program by 206 | all those who receive copies directly or indirectly through you, then 207 | the only way you could satisfy both it and this License would be to 208 | refrain entirely from distribution of the Program. 209 | 210 | If any portion of this section is held invalid or unenforceable under 211 | any particular circumstance, the balance of the section is intended to 212 | apply and the section as a whole is intended to apply in other 213 | circumstances. 214 | 215 | It is not the purpose of this section to induce you to infringe any 216 | patents or other property right claims or to contest validity of any 217 | such claims; this section has the sole purpose of protecting the 218 | integrity of the free software distribution system, which is 219 | implemented by public license practices. Many people have made 220 | generous contributions to the wide range of software distributed 221 | through that system in reliance on consistent application of that 222 | system; it is up to the author/donor to decide if he or she is willing 223 | to distribute software through any other system and a licensee cannot 224 | impose that choice. 225 | 226 | This section is intended to make thoroughly clear what is believed to 227 | be a consequence of the rest of this License. 228 | 229 | 8. If the distribution and/or use of the Program is restricted in 230 | certain countries either by patents or by copyrighted interfaces, the 231 | original copyright holder who places the Program under this License 232 | may add an explicit geographical distribution limitation excluding 233 | those countries, so that distribution is permitted only in or among 234 | countries not thus excluded. In such case, this License incorporates 235 | the limitation as if written in the body of this License. 236 | 237 | 9. The Free Software Foundation may publish revised and/or new versions 238 | of the General Public License from time to time. Such new versions will 239 | be similar in spirit to the present version, but may differ in detail to 240 | address new problems or concerns. 241 | 242 | Each version is given a distinguishing version number. If the Program 243 | specifies a version number of this License which applies to it and "any 244 | later version", you have the option of following the terms and conditions 245 | either of that version or of any later version published by the Free 246 | Software Foundation. If the Program does not specify a version number of 247 | this License, you may choose any version ever published by the Free Software 248 | Foundation. 249 | 250 | 10. If you wish to incorporate parts of the Program into other free 251 | programs whose distribution conditions are different, write to the author 252 | to ask for permission. For software which is copyrighted by the Free 253 | Software Foundation, write to the Free Software Foundation; we sometimes 254 | make exceptions for this. Our decision will be guided by the two goals 255 | of preserving the free status of all derivatives of our free software and 256 | of promoting the sharing and reuse of software generally. 257 | 258 | NO WARRANTY 259 | 260 | 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY 261 | FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN 262 | OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES 263 | PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED 264 | OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF 265 | MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS 266 | TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE 267 | PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, 268 | REPAIR OR CORRECTION. 269 | 270 | 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING 271 | WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR 272 | REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, 273 | INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING 274 | OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED 275 | TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY 276 | YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER 277 | PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE 278 | POSSIBILITY OF SUCH DAMAGES. 279 | 280 | END OF TERMS AND CONDITIONS 281 | 282 | How to Apply These Terms to Your New Programs 283 | 284 | If you develop a new program, and you want it to be of the greatest 285 | possible use to the public, the best way to achieve this is to make it 286 | free software which everyone can redistribute and change under these terms. 287 | 288 | To do so, attach the following notices to the program. It is safest 289 | to attach them to the start of each source file to most effectively 290 | convey the exclusion of warranty; and each file should have at least 291 | the "copyright" line and a pointer to where the full notice is found. 292 | 293 | {description} 294 | Copyright (C) {year} {fullname} 295 | 296 | This program is free software; you can redistribute it and/or modify 297 | it under the terms of the GNU General Public License as published by 298 | the Free Software Foundation; either version 2 of the License, or 299 | (at your option) any later version. 300 | 301 | This program is distributed in the hope that it will be useful, 302 | but WITHOUT ANY WARRANTY; without even the implied warranty of 303 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 304 | GNU General Public License for more details. 305 | 306 | You should have received a copy of the GNU General Public License along 307 | with this program; if not, write to the Free Software Foundation, Inc., 308 | 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. 309 | 310 | Also add information on how to contact you by electronic and paper mail. 311 | 312 | If the program is interactive, make it output a short notice like this 313 | when it starts in an interactive mode: 314 | 315 | Gnomovision version 69, Copyright (C) year name of author 316 | Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'. 317 | This is free software, and you are welcome to redistribute it 318 | under certain conditions; type `show c' for details. 319 | 320 | The hypothetical commands `show w' and `show c' should show the appropriate 321 | parts of the General Public License. Of course, the commands you use may 322 | be called something other than `show w' and `show c'; they could even be 323 | mouse-clicks or menu items--whatever suits your program. 324 | 325 | You should also get your employer (if you work as a programmer) or your 326 | school, if any, to sign a "copyright disclaimer" for the program, if 327 | necessary. Here is a sample; alter the names: 328 | 329 | Yoyodyne, Inc., hereby disclaims all copyright interest in the program 330 | `Gnomovision' (which makes passes at compilers) written by James Hacker. 331 | 332 | {signature of Ty Coon}, 1 April 1989 333 | Ty Coon, President of Vice 334 | 335 | This General Public License does not permit incorporating your program into 336 | proprietary programs. If your program is a subroutine library, you may 337 | consider it more useful to permit linking proprietary applications with the 338 | library. If this is what you want to do, use the GNU Lesser General 339 | Public License instead of this License. 340 | 341 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # ApkShield 2 | Android 平台 加固方案 3 | 4 | QQ:406673768 5 | EMAIL:yelingzj@gmail.com 6 | 7 | 运行环境:Java Python2.7 8 | 9 | 使用命令 10 | Shield *.apk 11 | 后续会生成 12 | shield*.apk加固之后的apk 13 | -------------------------------------------------------------------------------- /Shield.py: -------------------------------------------------------------------------------- 1 | import os 2 | import sys 3 | import xml.dom.minidom 4 | import codecs 5 | import shutil 6 | import zipfile 7 | 8 | def decypt(path): 9 | decypt = 'java -jar apktool.jar d -f -o out ' + path 10 | print decypt 11 | os.system(decypt) 12 | 13 | def encypt(path): 14 | encypt = 'java -jar apktool.jar b out -o .\out\shield.apk'; 15 | print encypt 16 | os.system(encypt) 17 | 18 | def sign(path): 19 | sign = 'java -jar signapk.jar platform.x509.pem platform.pk8 .\out\shield.apk' + ' shield' + path 20 | print sign 21 | os.system(sign) 22 | 23 | def install(path): 24 | ins = 'adb install -r '+' shield' + path 25 | print ins 26 | os.system(ins) 27 | 28 | #解析xml文件,增加application 29 | def parseXml(): 30 | path = '.\out\AndroidManifest.xml' 31 | pathout = '.\out\AndroidManifest.xml' 32 | tree = xml.dom.minidom.parse(path) 33 | app = tree.getElementsByTagName('application')[0] 34 | applicationName = app.getAttribute('android:name') 35 | if len(applicationName) > 0: 36 | print "Already has application" 37 | return 38 | else: 39 | print "Normal" 40 | 41 | print app 42 | app.setAttribute('android:name','com.apk.shield.ShieldApplication') 43 | 44 | f=file(pathout, 'w') 45 | writer = codecs.lookup('utf-8')[3](f) 46 | tree.writexml(writer, encoding='utf-8') 47 | writer.close() 48 | 49 | def copyFile(src): 50 | shieldsrc = '.\\ApkShield\\smali\\com\\apk\\shield\\' 51 | shielddst = '.\\out\\smali\\com\\apk\\shield\\' 52 | shutil.rmtree('.\\out\\smali\\') 53 | shutil.copytree(shieldsrc,shielddst) 54 | #dstapk = '.\\out\\assets\\ex07.apk' 55 | #shutil.copy(src,dstapk) 56 | 57 | #将apk中dex解析出来并且拷贝到对应的目录 58 | def extractDex(src): 59 | zipFile = zipfile.ZipFile(src) 60 | dstpath = '.\\out\\assets\\' 61 | zipFile.extract('classes.dex',dstpath) 62 | shutil.copy(dstpath + 'classes.dex',dstpath + 'ex07.apk') 63 | 64 | #=================================================================================== 65 | print 'Begin decypt' 66 | print 'Begin Shield' 67 | args = "" 68 | for i in range(1,len(sys.argv)): 69 | args += sys.argv[i] 70 | print args 71 | src = args 72 | #解开apk 73 | decypt(args) 74 | #deal xml file 75 | parseXml() 76 | # 77 | copyFile(src) 78 | # 79 | extractDex(src) 80 | #apk打包 81 | encypt(args) 82 | #apk签名 83 | sign(args) 84 | 85 | shutil.rmtree('.\\out') 86 | 87 | #install(src) 88 | 89 | print 'End decypt' 90 | print 'End Shield' 91 | 92 | 93 | -------------------------------------------------------------------------------- /ShieldSrc/.classpath: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | -------------------------------------------------------------------------------- /ShieldSrc/.project: -------------------------------------------------------------------------------- 1 | 2 | 3 | ApkShield 4 | 5 | 6 | 7 | 8 | 9 | com.android.ide.eclipse.adt.ResourceManagerBuilder 10 | 11 | 12 | 13 | 14 | com.android.ide.eclipse.adt.PreCompilerBuilder 15 | 16 | 17 | 18 | 19 | org.eclipse.jdt.core.javabuilder 20 | 21 | 22 | 23 | 24 | com.android.ide.eclipse.adt.ApkBuilder 25 | 26 | 27 | 28 | 29 | 30 | com.android.ide.eclipse.adt.AndroidNature 31 | org.eclipse.jdt.core.javanature 32 | 33 | 34 | -------------------------------------------------------------------------------- /ShieldSrc/.settings/org.eclipse.jdt.core.prefs: -------------------------------------------------------------------------------- 1 | #Tue Apr 14 16:55:22 CST 2015 2 | eclipse.preferences.version=1 3 | org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.6 4 | org.eclipse.jdt.core.compiler.compliance=1.6 5 | org.eclipse.jdt.core.compiler.source=1.6 6 | -------------------------------------------------------------------------------- /ShieldSrc/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 2 | 6 | 7 | 10 | 11 | 12 | 13 | 14 | 19 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | -------------------------------------------------------------------------------- /ShieldSrc/assets/default/default_layout.xml: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 12 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 31 | 36 | 37 | 38 | 39 | 43 | 100 | 101 | 159 | 160 | 168 | 180 | 195 | 199 | 203 | 205 | 206 | 207 | 208 | 209 | 215 | 216 | 222 | 223 | 229 | 230 | 236 | 237 | 243 | 244 | 250 | 251 | 257 | 258 | 264 | 265 | 271 | 272 | 278 | 279 | 285 | 286 | 291 | 292 | 297 | 298 | 304 | 305 | 311 | 312 | 318 | 319 | 324 | 325 | 329 | 330 | 336 | 340 | 341 | 348 | 349 | 355 | 356 | 360 | 361 | 367 | 368 | 374 | 375 | 381 | 382 | 383 | 387 | 388 | 392 | 393 | 397 | 398 | 403 | 404 | 408 | 409 | 413 | 414 | 419 | 420 | 425 | 426 | 430 | 431 | 435 | 436 | 440 | 441 | 445 | 446 | 450 | 451 | 455 | 456 | 460 | 461 | 465 | 466 | 471 | 472 | 477 | 478 | 483 | 484 | 489 | 490 | 495 | 496 | -------------------------------------------------------------------------------- /ShieldSrc/assets/ex07.apk: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yeling/ApkShield/e5e4f1c8ff5afb52cb9022ee6dca475b6ccd93a6/ShieldSrc/assets/ex07.apk -------------------------------------------------------------------------------- /ShieldSrc/assets/mm.txt: -------------------------------------------------------------------------------- 1 | 2 | 1052: d01c 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | -------------------------------------------------------------------------------- /ShieldSrc/bin/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 2 | 6 | 7 | 10 | 11 | 12 | 13 | 14 | 19 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | -------------------------------------------------------------------------------- /ShieldSrc/bin/ApkShield.apk: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yeling/ApkShield/e5e4f1c8ff5afb52cb9022ee6dca475b6ccd93a6/ShieldSrc/bin/ApkShield.apk -------------------------------------------------------------------------------- /ShieldSrc/bin/classes.dex: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yeling/ApkShield/e5e4f1c8ff5afb52cb9022ee6dca475b6ccd93a6/ShieldSrc/bin/classes.dex -------------------------------------------------------------------------------- /ShieldSrc/bin/classes/com/apk/shield/ShieldApplication.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yeling/ApkShield/e5e4f1c8ff5afb52cb9022ee6dca475b6ccd93a6/ShieldSrc/bin/classes/com/apk/shield/ShieldApplication.class -------------------------------------------------------------------------------- /ShieldSrc/bin/classes/com/apk/shield/ShieldClassLoader.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yeling/ApkShield/e5e4f1c8ff5afb52cb9022ee6dca475b6ccd93a6/ShieldSrc/bin/classes/com/apk/shield/ShieldClassLoader.class -------------------------------------------------------------------------------- /ShieldSrc/bin/classes/com/apk/shield/ShieldDexClassLoader.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yeling/ApkShield/e5e4f1c8ff5afb52cb9022ee6dca475b6ccd93a6/ShieldSrc/bin/classes/com/apk/shield/ShieldDexClassLoader.class -------------------------------------------------------------------------------- /ShieldSrc/bin/classes/yeling/ex07/BuildConfig.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yeling/ApkShield/e5e4f1c8ff5afb52cb9022ee6dca475b6ccd93a6/ShieldSrc/bin/classes/yeling/ex07/BuildConfig.class -------------------------------------------------------------------------------- /ShieldSrc/bin/classes/yeling/ex07/R$attr.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yeling/ApkShield/e5e4f1c8ff5afb52cb9022ee6dca475b6ccd93a6/ShieldSrc/bin/classes/yeling/ex07/R$attr.class -------------------------------------------------------------------------------- /ShieldSrc/bin/classes/yeling/ex07/R$drawable.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yeling/ApkShield/e5e4f1c8ff5afb52cb9022ee6dca475b6ccd93a6/ShieldSrc/bin/classes/yeling/ex07/R$drawable.class -------------------------------------------------------------------------------- /ShieldSrc/bin/classes/yeling/ex07/R$id.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yeling/ApkShield/e5e4f1c8ff5afb52cb9022ee6dca475b6ccd93a6/ShieldSrc/bin/classes/yeling/ex07/R$id.class -------------------------------------------------------------------------------- /ShieldSrc/bin/classes/yeling/ex07/R$layout.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yeling/ApkShield/e5e4f1c8ff5afb52cb9022ee6dca475b6ccd93a6/ShieldSrc/bin/classes/yeling/ex07/R$layout.class -------------------------------------------------------------------------------- /ShieldSrc/bin/classes/yeling/ex07/R$string.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yeling/ApkShield/e5e4f1c8ff5afb52cb9022ee6dca475b6ccd93a6/ShieldSrc/bin/classes/yeling/ex07/R$string.class -------------------------------------------------------------------------------- /ShieldSrc/bin/classes/yeling/ex07/R.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yeling/ApkShield/e5e4f1c8ff5afb52cb9022ee6dca475b6ccd93a6/ShieldSrc/bin/classes/yeling/ex07/R.class -------------------------------------------------------------------------------- /ShieldSrc/bin/dexedLibs/android-support-v4-c1ec07e958d081b565b64a64189e6f4e.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yeling/ApkShield/e5e4f1c8ff5afb52cb9022ee6dca475b6ccd93a6/ShieldSrc/bin/dexedLibs/android-support-v4-c1ec07e958d081b565b64a64189e6f4e.jar -------------------------------------------------------------------------------- /ShieldSrc/bin/dexedLibs/annotations-a63b825fc0f7cc53ff999a644e236039.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yeling/ApkShield/e5e4f1c8ff5afb52cb9022ee6dca475b6ccd93a6/ShieldSrc/bin/dexedLibs/annotations-a63b825fc0f7cc53ff999a644e236039.jar -------------------------------------------------------------------------------- /ShieldSrc/bin/jarlist.cache: -------------------------------------------------------------------------------- 1 | # cache for current jar dependency. DO NOT EDIT. 2 | # format is 3 | # Encoding is UTF-8 4 | -------------------------------------------------------------------------------- /ShieldSrc/bin/res/drawable-hdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yeling/ApkShield/e5e4f1c8ff5afb52cb9022ee6dca475b6ccd93a6/ShieldSrc/bin/res/drawable-hdpi/ic_launcher.png -------------------------------------------------------------------------------- /ShieldSrc/bin/res/drawable-mdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yeling/ApkShield/e5e4f1c8ff5afb52cb9022ee6dca475b6ccd93a6/ShieldSrc/bin/res/drawable-mdpi/ic_launcher.png -------------------------------------------------------------------------------- /ShieldSrc/bin/resources.ap_: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yeling/ApkShield/e5e4f1c8ff5afb52cb9022ee6dca475b6ccd93a6/ShieldSrc/bin/resources.ap_ -------------------------------------------------------------------------------- /ShieldSrc/gen/yeling/ex07/BuildConfig.java: -------------------------------------------------------------------------------- 1 | /** Automatically generated file. DO NOT MODIFY */ 2 | package yeling.ex07; 3 | 4 | public final class BuildConfig { 5 | public final static boolean DEBUG = true; 6 | } -------------------------------------------------------------------------------- /ShieldSrc/gen/yeling/ex07/R.java: -------------------------------------------------------------------------------- 1 | /* AUTO-GENERATED FILE. DO NOT MODIFY. 2 | * 3 | * This class was automatically generated by the 4 | * aapt tool from the resource data it found. It 5 | * should not be modified by hand. 6 | */ 7 | 8 | package yeling.ex07; 9 | 10 | public final class R { 11 | public static final class attr { 12 | } 13 | public static final class drawable { 14 | public static final int ic_launcher=0x7f020000; 15 | public static final int image01=0x7f020001; 16 | public static final int image02=0x7f020002; 17 | public static final int image03=0x7f020003; 18 | public static final int image04=0x7f020004; 19 | } 20 | public static final class id { 21 | public static final int BTN=0x7f050001; 22 | public static final int IMAGE=0x7f050002; 23 | public static final int MAIN=0x7f050000; 24 | public static final int myView=0x7f050004; 25 | public static final int myViewGroup=0x7f050003; 26 | } 27 | public static final class layout { 28 | public static final int main=0x7f030000; 29 | } 30 | public static final class string { 31 | public static final int app_name=0x7f040001; 32 | public static final int hello=0x7f040000; 33 | } 34 | } 35 | -------------------------------------------------------------------------------- /ShieldSrc/ic_launcher-web.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yeling/ApkShield/e5e4f1c8ff5afb52cb9022ee6dca475b6ccd93a6/ShieldSrc/ic_launcher-web.png -------------------------------------------------------------------------------- /ShieldSrc/libs/android-support-v4.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yeling/ApkShield/e5e4f1c8ff5afb52cb9022ee6dca475b6ccd93a6/ShieldSrc/libs/android-support-v4.jar -------------------------------------------------------------------------------- /ShieldSrc/libs/armeabi/libcocos2dcpp.so: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yeling/ApkShield/e5e4f1c8ff5afb52cb9022ee6dca475b6ccd93a6/ShieldSrc/libs/armeabi/libcocos2dcpp.so -------------------------------------------------------------------------------- /ShieldSrc/proguard-project.txt: -------------------------------------------------------------------------------- 1 | # To enable ProGuard in your project, edit project.properties 2 | # to define the proguard.config property as described in that file. 3 | # 4 | # Add project specific ProGuard rules here. 5 | # By default, the flags in this file are appended to flags specified 6 | # in ${sdk.dir}/tools/proguard/proguard-android.txt 7 | # You can edit the include path and order by changing the ProGuard 8 | # include property in project.properties. 9 | # 10 | # For more details, see 11 | # http://developer.android.com/guide/developing/tools/proguard.html 12 | 13 | # Add any project specific keep options here: 14 | 15 | # If your project uses WebView with JS, uncomment the following 16 | # and specify the fully qualified class name to the JavaScript interface 17 | # class: 18 | #-keepclassmembers class fqcn.of.javascript.interface.for.webview { 19 | # public *; 20 | #} 21 | -------------------------------------------------------------------------------- /ShieldSrc/project.properties: -------------------------------------------------------------------------------- 1 | # This file is automatically generated by Android Tools. 2 | # Do not modify this file -- YOUR CHANGES WILL BE ERASED! 3 | # 4 | # This file must be checked in Version Control Systems. 5 | # 6 | # To customize properties used by the Ant build system edit 7 | # "ant.properties", and override values to adapt the script to your 8 | # project structure. 9 | # 10 | # To enable ProGuard to shrink and obfuscate your code, uncomment this (available properties: sdk.dir, user.home): 11 | #proguard.config=${sdk.dir}/tools/proguard/proguard-android.txt:proguard-project.txt 12 | 13 | # Project target. 14 | target=android-15 15 | -------------------------------------------------------------------------------- /ShieldSrc/res/drawable-hdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yeling/ApkShield/e5e4f1c8ff5afb52cb9022ee6dca475b6ccd93a6/ShieldSrc/res/drawable-hdpi/ic_launcher.png -------------------------------------------------------------------------------- /ShieldSrc/res/drawable-hdpi/image01.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yeling/ApkShield/e5e4f1c8ff5afb52cb9022ee6dca475b6ccd93a6/ShieldSrc/res/drawable-hdpi/image01.jpg -------------------------------------------------------------------------------- /ShieldSrc/res/drawable-hdpi/image02.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yeling/ApkShield/e5e4f1c8ff5afb52cb9022ee6dca475b6ccd93a6/ShieldSrc/res/drawable-hdpi/image02.jpg -------------------------------------------------------------------------------- /ShieldSrc/res/drawable-hdpi/image03.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yeling/ApkShield/e5e4f1c8ff5afb52cb9022ee6dca475b6ccd93a6/ShieldSrc/res/drawable-hdpi/image03.jpg -------------------------------------------------------------------------------- /ShieldSrc/res/drawable-hdpi/image04.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yeling/ApkShield/e5e4f1c8ff5afb52cb9022ee6dca475b6ccd93a6/ShieldSrc/res/drawable-hdpi/image04.jpg -------------------------------------------------------------------------------- /ShieldSrc/res/drawable-mdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yeling/ApkShield/e5e4f1c8ff5afb52cb9022ee6dca475b6ccd93a6/ShieldSrc/res/drawable-mdpi/ic_launcher.png -------------------------------------------------------------------------------- /ShieldSrc/res/drawable-mdpi/image01.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yeling/ApkShield/e5e4f1c8ff5afb52cb9022ee6dca475b6ccd93a6/ShieldSrc/res/drawable-mdpi/image01.jpg -------------------------------------------------------------------------------- /ShieldSrc/res/drawable-mdpi/image02.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yeling/ApkShield/e5e4f1c8ff5afb52cb9022ee6dca475b6ccd93a6/ShieldSrc/res/drawable-mdpi/image02.jpg -------------------------------------------------------------------------------- /ShieldSrc/res/drawable-mdpi/image03.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yeling/ApkShield/e5e4f1c8ff5afb52cb9022ee6dca475b6ccd93a6/ShieldSrc/res/drawable-mdpi/image03.jpg -------------------------------------------------------------------------------- /ShieldSrc/res/drawable-mdpi/image04.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yeling/ApkShield/e5e4f1c8ff5afb52cb9022ee6dca475b6ccd93a6/ShieldSrc/res/drawable-mdpi/image04.jpg -------------------------------------------------------------------------------- /ShieldSrc/res/layout/main.xml: -------------------------------------------------------------------------------- 1 | 2 | 7 | 8 | 12 | 13 |