Nagdroid is an add-on nagware for those Android app pirates who still have sympathy for the app developers.
It functions similarly to nagware in WinRAR, displaying a pop-up every time the app is opened after 30 days, with the hope that the user feels annoyed and eventually intends to purchase the app.
TODO
Make sure you have a basic understanding of reverse engineering and Smali. You can read this documentation to learn about Smali.
- You need to decompile the target APK using apktool or a similar tool. Then, locate the smali file that serves as the main activity of the APK (refer to the
activity
in AndroidManifest.xml with theandroid.intent.action.MAIN
action). - After you've found the smali file, add this code inside the
onCreate
method (replace theA
with the register):
new-instance vA, Lid/aozora/nagdroid/Nagdroid;
invoke-direct {vA, p0}, Lid/aozora/nagdroid/Nagdroid;-><init>(Landroid/content/Context;)V
invoke-virtual {vA}, Lid/aozora/nagdroid/Nagdroid;->show()Landroid/app/AlertDialog;
move-result-object vA
- Download the latest classes.dex, and then decompile it using baksmali.
- Move all the contents of its output (usually inside the
out
folder) into thesmali
folder of the decompiled APK folder earlier. - Rebuild the APK using apktool and then sign it using jarsigner (using debug keystore is recommended).
showAppIcon(Z)Lid/aozora/nagdroid/Nagdroid;
- Display the app icon within the dialog.0x0
(default) will not displaying the app icon,0x1
will displaying the app icon.showAppName(Z)Lid/aozora/nagdroid/Nagdroid;
- Display the app label within the dialog.0x0
will not displaying the app label.0x1
(default) will displaying the app label.forceMessageLang(Ljava/lang/String;)Lid/aozora/nagdroid/Nagdroid;
- Force the dialog to use message from the specific language. Only accept ISO-639 format. If the language is not available, the dialog will use English instead.show()Landroid/app/AlertDialog;
- Show the dialog if the time has comes.
This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with this program. If not, see https://www.gnu.org/licenses/.