Tutorial How to decrypt an encrypted .dll [NO-ROOT]

G-Bo ッ

Administrator
Original poster
Staff member
Administrator
Mar 22, 2017
8,618
339,247
2,350
Behind you.
platinmods.com
Intro
The binaries given is home made, dont expect any good thing in it. I'll explain it on 2nd post. Might not work on some games.
Prerequisities
  • Basic-Intermediate knowledge about android modding,
  • Apktool,
  • Injection lib.
libs.tar.gz

Steps
1. Decompile apk. (self explaination)
2a. (Optional, but recommended) add

Code:
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"/>
before </manifest> at AndroidManifest.xml
2b. Find mainactivity,
---
Open AndroidManifest.xml, look for <action android:name="android.intent.action.MAIN"/>

Code:
<activity android:configChanges="locale|fontScale|keyboard|keyboardHidden|mcc|mnc|navigation|orientation|screenLayout|screenSize|smallestScreenSize|touchscreen|uiMode" android:label="@string/app_name" android:launchMode="singleTop" android:name="net.circleous.domtweaks.StartActivity" android:screenOrientation="landscape">
  <intent-filter>
    <action android:name="android.intent.action.MAIN"/>
    <category android:name="android.intent.category.LAUNCHER"/>
  </intent-filter>
</activity>

if you read that carefully and see on top of it(<action android:name="android.intent.action.MAIN"/>) ->
android.name="net.circleous.domtweaks.StartActivity"
You have to open StartActivity.smali file at smali/net/circleous/domtweaks/
---
3. Now add at onCreate or .method constructor <init>

Code:
    const-string v0, "monoDump"
     invoke-static {v0}, Ljava/lang/System;->loadLibrary(Ljava/lang/String;)V
4. Extract libs.tar.gz and put armeabi, armeabi-v7a, and x86 folder to lib/ folder.
File tree,

Code:
libs
├── armeabi
│   ├── ....
│   ├── libTKHooklib.so
│   └── libmonoDump.so
├── armeabi-v7a
│   ├── ....
│   ├── libTKHooklib.so
│   └── libmonoDump.so
└── x86
    ├── ....
    └── libmonoDump.so
5. Re-build and sign apk.
6. Install and run the game.
7. Dumps is located at /sdcard/<packagename>-<dll>


Credits: Wobm
 

mimilu

Platinian
Jun 9, 2017
14
2
3
23
I mean how to encrypt the dll (and also .so file) for code protection
Xg8E733.png



I cannot find any tutorials talking about this
 
Last edited:
N

Null69

Guest
What? The injection lib file is not as what you declared in your thread
 

nik2143

Jr. PMT Modder
Staff member
Modding-Team
Jun 30, 2018
526
28,137
1,193
Italy
I tried it on Rolling Sky but it doesn't work the game is stuck on a white screen
File.png