Giter Club home page Giter Club logo

android-login-form-java's Introduction

Android Login Form in Java

Simple login form in Java only

Keep in mind that it is mainly for APK modding and not for general app development purposes

okhttp dependency is no longer required, we use URL instead. You can still use okhttp if you want, uncomment the okhttp codes related

Note: This project is for experienced modders and programmers only and you must be able to do yourself and be able to search for help. This project will not be maintained much, we will NOT offer help and support with this project, and the Example will not be updated.

PHP

Add login.php to your server that supports PHP, use 000webhost.com for free webserver. Repo based hosting such as Github does not support PHP

Change URL on public static String URL on MainActivity.java file

Merging into your project

It's easy, just copy and paste the code of public static void Start(final Context context) into your project and make some changes

See the example folder how the login code was merged into the mod menu project on MainActivity.java file

How to implement to APK:

Build the project to APK file.

Build -> Build Bundle(s)/APK(s) -> Build APK(s)

If no errors occured, you did everything right and build will succeded. You will be notified that it build successfully

Click on locate to show you the location of build.apk. It is stored at (your-project)\app\build\outputs\apk\app-debug.apk

Now decompile your app-debug.apk.

Copy all your smali folders to the game's smali folder to the game's decompiled directory (game name)\smali. If the game have multidexes, add your smali to the last classes dex if possible to prevent compilation errors such as Unsigned short value out of range: xxxxx

If the game has already okhttp smalis, don't add it.

Now, you must know the game's launch activity/main activity

You can either use APK Easy Tool to view main activity like screenshot below:

Or decompile your game APK using apktool.jar, or any 3rd party CLI or GUI tools, and open androidmanifest.xml and search after <action android:name="android.intent.action.MAIN"/>

In this case, my game's main activity was com.unity3d.player.UnityPlayerActivity

On the game's androidmanifest.xml, besure that <uses-permission android:name="android.permission.INTERNET"/> exist

Locate to the game's path of main activity and open the smali file.

Example if it was com.unity3d.player.UnityPlayerActivity, the path would be (decompiled game)/com/unity3d/player/UnityPlayerActivity.smali

If the game have multi dexes, it may be located in smali_classes2... please check all

Open the main acitivity's smali file, search for OnCreate method and paste this code inside (change the package name if you had changed it)

invoke-static {p0}, Lcom/example/androidloginjava/MainActivity;->Start(Landroid/content/Context;)V

Save the file

Now compile the game APK

It should launch the login screen and successfully launch the activity after login :)

Simple protection in lib

See native-lib.cpp for example how to check if the user has logged in

There are the codes called Check() and System.loadLibrary("yourlib");. They are commented out

You may need to protect your dex and lib files for that

android-login-form-java's People

Contributors

lglteam avatar rafaelfernandesx avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.