Tutorial Remove root detection from an APK file (Part 2)

AndnixSH

PMT Elite Modder
Original poster
Staff member
Modding-Team
Jun 27, 2017
4,535
302,463
1,213
Modding World
DG6OrMl.png


Can't play a game on your rooted devices?
Don't want to install Xposed or any 3rd party apps?
Don’t want to uninstall all unauthorized apps?

Here is how to remove Root Detection + Apps detection from any app. Notes: this may not work with every app.

i will mod Age of Empires World Domination in this tutorial

1. Backup the APK file you want to mod, using APK backup and restore, and copy the APK file to your computer;

2. Download any APK tools to your computer. I will use Apk Tool by TryOwnMe-Edg in this tutorial:

3. Install Notepad++ on your computer

4. Place the backed up APK inside the folder APK tool folder (it depends on which apk tool you are using). If you're using the Apk Tool provided in this tutorial, place it inside the 1-APK-in folder:

5. Open the APK tool, select the APK file, and decompile it.

6. Open Notepad++, click on "Search" -> "Find in files..."

btFMreE.png


7. Input the words of the error message in the “Find what :” field. In directory section, click on “…” button

AADoDvM.png


8. Select the path of the decompiled APK, and click OK

me2zFyF.png


9. Click on “Find all”

LR1oaEY.png


10. The result will appear below. Double-click in it to open the html file and it will highlight the word. See screenshot below

vAeK1nK.png


klpZODW.png


11. Look at bootup_stopped. We need to know where bootup_stopped is used in smali. Click on "Search" -> "Find in files..." and type “bootup_stopped” in the field

yRr1GWl.png


lmCHj2P.png


12. The result will appear below. If you found something interesting, double-click on the line to open the smali file and it will highlight the word. See screenshot below. Ignore the IDs because they are useless

jVgn2wJ.png


v22fFZz.png


13. Scroll up until you see the name of the function. The function with ()V is 'void' which means the function returns nothing

MygoZKr.png


14. Clear the code inside so the code will look like

OqzWAkv.png


15. The function with ()V is 'void' which means the function returns nothing, so null the function like this
Code:
.locals 0

return void
XaVl4Hs.png


16. Find debuggable. The function with ()Z is boolean which means the function can return false or true.

bruXQYF.png


17. Return it false. 0x0 means false and 0x1 means true.
Code:
.locals 1

const/4 v0, 0x0

return v0
B7WAsjG.png


18. Find isSuBinaryPresent. The function with ()Z is boolean which means the function can return false or true. Look at the keyword 'native'. The native keyword is applied to a method to indicate that the method is implemented in native code using JNI(Java Native Interface), so which means you can't return a function.

gLTuRwr.png


19. Remove the keyword 'native' and null the static function like this

0s3vxZz.png


20. Save the file and recompile the APK file with APKtool

Now you can play the game on any rooted devices with unauthorized apps installed

Credits:
AndnixSH#


< PART 1