[CM13][MOD] How to allow fingerprint unlock after a reboot - Zuk Z1 Android Development

How to allow fingerprint unlock after a reboot
Decompile SystemUI.
Go to smali/com/android/keygaurd/KeyguardUpdateMonitor.smali
Search for:
Code:
.method public isUnlockingWithFingerprintAllowed()Z
.locals 2
.prologue
const/4 v0, 0x0
Change the 0x0 to 0x1
Recompile!

I'm on 2.3 Zui official,
On zui official home tap acts as back button and I find unproductive for me, any idea which key binding file to edit to have capacitive home bottom?
can the u touch be modified like this, Left swipe: Previous app
Right swipe: Next App
Tap: Home

what does this have to do with the topic ???
whether there really are themselves idiots ???
XDA is not a playground!

S3V3N said:
How to allow fingerprint unlock after a reboot
Decompile SystemUI.
Go to smali/com/android/keygaurd/KeyguardUpdateMonitor.smali
Search for:
Code:
.method public isUnlockingWithFingerprintAllowed()Z
.locals 2
.prologue
const/4 v0, 0x0
Change the 0x0 to 0x1
Recompile!
Click to expand...
Click to collapse
Hi , just want to know is this code working for nougat ? i tried modified and still asking for password after rebooting.
anybody can help on this ? thank you so much

Related

[MOD] [HOW-TO] Remove / Restore keyboard icon in status bar

This will remove the keyboard notification icon in the status bar. For some (like me) its annoying. If you are running a custom ROM with changes to services.jar this will over write them. Best bet is to do a Nandroid before flashing. I am also including a restore zip for those who want to return to stock. I looked but did not see a specific mod to remove this option without loading a full ROM so enjoy. If there is one already floating around out there, then here is another...LOL. Thank me if this helps you.
This was tested on a stock deodexed LG1 ROM. It will more than likely work on other firmwares and non-stock ROMs but I have not tested on those.
The zips provided below will work in CWM or TWRP....or whatever recovery you prefer.
For those who want to do it themselves on thier own rom heres what to do:
Decompile: services.jar in framework.
Browse to: smali/com/android/server/InputMethodManagerService.smali
Scroll down to line (aprox) 8755 and look for the code:
Code:
iget-object v12, v0, Lcom/android/server/InputMethodManagerService;->mCurToken:Landroid/os/IBinder;
move-object/from16 v0, p1
[COLOR="Red"] if-eq v12, v0, :cond_1
[/COLOR]
.line 1369
:cond_0
const-string v12, "InputManagerService"
new-instance v13, Ljava/lang/StringBuilder;
Comment out or delete the line above in red.
Recompile
Chmod 644 and push to /system/framework
Enjoy!
ParanoidAndroid 2.10 Fail to Boot
Just flashed on ParanoidAndroid 2.10, bad idea. Caused an endless boot. I need to read all directions, glad I read the part about making a nandroid . I will have to try the code changes when I get time.
Thanks.
Like for example you turn your screen off after just sending a message and there's the little keyboard chooser notification??
Yeah, I hate that, but not so much to go through all this trouble.
jdubau55 said:
Like for example you turn your screen off after just sending a message and there's the little keyboard chooser notification??
Yeah, I hate that, but not so much to go through all this trouble.
Click to expand...
Click to collapse
Its just a zip file, shouldnt be that much trouble.
cannot find the line
cannot find the line in services.jar i am running latest paranoid rom
Didact74 said:
This will remove the keyboard notification icon in the status bar. For some (like me) its annoying. If you are running a custom ROM with changes to services.jar this will over write them. Best bet is to do a Nandroid before flashing. I am also including a restore zip for those who want to return to stock. I looked but did not see a specific mod to remove this option without loading a full ROM so enjoy. If there is one already floating around out there, then here is another...LOL. Thank me if this helps you.
This was tested on a stock deodexed LG1 ROM. It will more than likely work on other firmwares and non-stock ROMs but I have not tested on those.
The zips provided below will work in CWM or TWRP....or whatever recovery you prefer.
For those who want to do it themselves on thier own rom heres what to do:
Decompile: services.jar in framework.
Browse to: smali/com/android/server/InputMethodManagerService.smali
Scroll down to line (aprox) 8755 and look for the code:
Code:
iget-object v12, v0, Lcom/android/server/InputMethodManagerService;->mCurToken:Landroid/os/IBinder;
move-object/from16 v0, p1
[COLOR="Red"] if-eq v12, v0, :cond_1
[/COLOR]
.line 1369
:cond_0
const-string v12, "InputManagerService"
new-instance v13, Ljava/lang/StringBuilder;
Comment out or delete the line above in red.
Recompile
Chmod 644 and push to /system/framework
Enjoy!
Click to expand...
Click to collapse
If you're running PA then you shouldn't flash this as it should already be in the ROM.
Would you be able to update this for BLK3?
Thanks in advance.
jlee08517 said:
Would you be able to update this for BLK3?
Thanks in advance.
Click to expand...
Click to collapse
I would also like to know if this is possible
Edit: doesn't work
Sent from my SCH-I535 using Tapatalk 2

[MOD][DEV] Power Menu Soft-Reboot Option

WHAT IS THIS ?
soft reboot is different from normal reboot... it take very very less time to reboot, very useful if any app or mod require reboot...
while checking my smali skills got this .... so when you need to reboot just long press on power-off, bing.. it will take 25% of normal reboot time
STEPS:
#1:decompile android.policy.jar, goto com\android\internal\policy\impl\ ,open the file which is responsible for power-off...normally in all AOSP its GlobalActions$2.smali.... in other device it may be GlobalActions$3, $4....
HOW TO FIND THE CORRECT FILE ?
open the the file search for onPress()V , in that method it it have shutdown()V... then its Power-off method
#2:search for onLongPress()Z then in that method add the below code immidietly after onLongPress()Z,
Code:
.registers 4
const-string v1, "ctl.restart"
const-string v2, "surfaceflinger"
invoke-static {v1, v2}, Landroid/os/SystemProperties;->set(Ljava/lang/String;Ljava/lang/String;)V
const-string v2, "zygote"
invoke-static {v1, v2}, Landroid/os/SystemProperties;->set(Ljava/lang/String;Ljava/lang/String;)V
#3:save, compile... flash or push the new file...
NOTE : you can use the same method for adding long press options for reboot and recovery methods...
How about for normal reboot? Is it possible?
anerik said:
How about for normal reboot? Is it possible?
Click to expand...
Click to collapse
yup.. good idea... i will post tomarrow here...
akash akya said:
yup.. good idea... i will post tomarrow here...
Click to expand...
Click to collapse
That would be awesome! Since i tried to do an extended power menu but did not succeed, it would be nice to long-press shutdown = reboot and long-press airplane mode = recovery
akash akya said:
yup.. good idea... i will post tomarrow here...
Click to expand...
Click to collapse
Help me here bro
My GlobalActions$2.smali has this
Code:
# virtual methods
.method public onLongPress()Z
.registers 2
iget-object v0, p0, Lcom/android/internal/policy/impl/GlobalActions$2;->this$0:Lcom/android/internal/policy/impl/GlobalActions;
#getter for: Lcom/android/internal/policy/impl/GlobalActions;->mWindowManagerFuncs:Landroid/view/WindowManagerPolicy$WindowManagerFuncs;
invoke-static {v0}, Lcom/android/internal/policy/impl/GlobalActions;->access$500(Lcom/android/internal/policy/impl/GlobalActions;)Landroid/view/WindowManagerPolicy$WindowManagerFuncs;
move-result-object v0
invoke-interface {v0}, Landroid/view/WindowManagerPolicy$WindowManagerFuncs;->rebootSafeMode()V
const/4 v0, 0x1
return v0
.end method
I delete the above method and added yours
then when i long press power button it reboots
i can't slect options but simply reboot and can't turn off as well
akash akya said:
WHAT IS THIS ?
soft reboot is different from normal reboot... it take very very less time to reboot, very useful if any app or mod require reboot...
while checking my smali skills got this .... so when you need to reboot just long press on power-off, bing.. it will take 25% of normal reboot time
Cool, but I used xposed framewok and added apm, in this app it gives you the option to soft reboot and others in the power menu
Click to expand...
Click to collapse
And someone knows where to find the file responsible for the "power menu" ????

[MOD] [HOW-TO] 4.4.2 TW Camera Shutter sound | Flash with low battery

Isn't my work all credits to @jobnik & @majdinj
original thread: http://forum.xda-developers.com/showthread.php?t=2038675
I made it only compatible with KitKat (4.4.2)
Root and deodexed SamsungCamera2.apk recommended.
Needed tools:
Backsmali/Smali
Notepad++
7Zip
1.) Baksmali SamsungCamera2.apk
1. Adding "Shutter Sound On/Off" option in Camera Menu:
Instead smali editing you can add this line to your others.xml (so you do not have to do step 2,3,4,5,6,7) :
Code:
<CscFeature_Camera_ShutterSoundMenu>TRUE</CscFeature_Camera_ShutterSoundMenu>
2.) Navigate to com\sec\android\app\camera\resourcedata folder
3.) Open CommonSettingsMenuResourceData.smali
find: "CscFeature_Camera_ShutterSoundMenu"
Add the blue line
Code:
.line 66
invoke-static {}, Lcom/sec/android/app/CscFeature;->getInstance()Lcom/sec/android/app/CscFeature;
move-result-object v0
const-string v1, [COLOR="DarkGreen"]"CscFeature_Camera_ShutterSoundMenu"[/COLOR]
invoke-virtual {v0, v1}, Lcom/sec/android/app/CscFeature;->getEnableStatus(Ljava/lang/String;)Z
move-result v0
[COLOR="Blue"]const/4 v0, 0x1[/COLOR]
if-eqz v0, :cond_a5
4.) Save and close
5.) Navigate to \com\sec\android\app\camera folder
6.) Open Camera.smali
find: "CscFeature_Camera_ShutterSoundMenu"
Add the blue line
Code:
const-string v22, "[COLOR="DarkGreen"]CscFeature_Camera_ShutterSoundMenu[/COLOR]"
invoke-virtual/range {v21 .. v22}, Lcom/sec/android/app/CscFeature;->getEnableStatus(Ljava/lang/String;)Z
move-result v21
[COLOR="Blue"]const/16 v21, 0x1[/COLOR]
if-nez v21, :cond_4a1
7.) Save and close
8.) Now open your customer.xml and delete the following line from it: <ShutterSound>on</ShutterSound>
Isn't included in every customer.xml..
Shutter sound selection will work only after Factory data reset
2. Camera can be used with flash in low battery state:
9.) Navigate to \com\sec\android\app\camera folder
10.) Open Camera.smali
find: .method protected handleLowBattery(Z)V
Add the blue line.
Code:
[COLOR="DarkGreen"].method protected handleLowBattery(Z)V[/COLOR]
.registers 9
.parameter "temp"
.prologue
const v6, 0x7f0c01cb
const v5, 0x7f0c001d
const/4 v4, 0x0
const/4 v3, 0x1
.line 3045
[COLOR="blue"]return-void[/COLOR]
const-string v1, "Camera2"
const-string v2, "handleLowBattery"
find: .method private handleBatteryChanged(Landroid/content/IntentV
now find: handleLowBattery(Z)V Delete the whole line which one contains it:
Code:
iput-object v2, p0, Lcom/sec/android/app/camera/Camera;->mPluggedLowBatteryPopup:Landroid/app/AlertDialog;
.line 2872
invoke-virtual {p0}, Lcom/sec/android/app/camera/Camera;->finishTimerCount()V
.line 2873
[COLOR="Red"]invoke-virtual {p0, v5}, Lcom/sec/android/app/camera/Camera;->[/COLOR][COLOR="DarkGreen"]handleLowBattery(Z)V[/COLOR]
find: .method private handleBatteryChanged(Landroid/content/IntentV
now find: handlePluggedLowBattery(Z)V
Delete the whole line which one contains it, delete only the next three lines (search down with Notepad++)
Code:
.line 2843
[COLOR="Red"]invoke-direct {p0, v6}, Lcom/sec/android/app/camera/Camera;->[/COLOR][COLOR="DarkGreen"]handlePluggedLowBattery(Z)V[/COLOR]
.line 2864
:cond_bf
:goto_bf
iget v2, p0, Lcom/sec/android/app/camera/Camera;->battLevel:I
iget v3, p0, Lcom/sec/android/app/camera/Camera;->mLowBatteryWarningLevel:I
Code:
.line 2878
[COLOR="red"]invoke-direct {p0, v5}, Lcom/sec/android/app/camera/Camera;->[/COLOR][COLOR="DarkGreen"]handlePluggedLowBattery(Z)V[/COLOR]
.line 2879
iget-object v2, p0, Lcom/sec/android/app/camera/Camera;->mEngine:Lcom/sec/android/app/camera/CommonEngine;
invoke-virtual {v2, v8}, Lcom/sec/android/app/camera/CommonEngine;->isCurrentState(I)Z
move-result v2
if-nez v2, :cond_e3
.line 2880
[COLOR="Red"]invoke-direct {p0, v5}, Lcom/sec/android/app/camera/Camera;->[/COLOR][COLOR="DarkGreen"]handlePluggedLowBattery(Z)V[/COLOR]
find: .method private handlePluggedLowBattery(Z)V
Add the blue line.
Code:
[COLOR="DarkGreen"].method private handlePluggedLowBattery(Z)V[/COLOR]
.registers 9
.parameter "temp"
.prologue
const v6, 0x7f0c019a
const v5, 0x7f0c0199
const/4 v4, 0x1
const/4 v3, 0x0
.line 3102
[COLOR="blue"]return-void[/COLOR]
const-string v1, "Camera2"
const-string v2, "handlePluggedLowBattery"
11.) Save your changes
12.) Smali classout folder
13.) Add the new classes.dex file to SamsungCamera2.apk with 7Zip
14.) Push to your Phone
Nice?
Yes Tkari4. Good dev man. This mod going to be in 1.3 rom i think. [emoji6]
Envoyé de mon SM-N9005 en utilisant Tapatalk
micky387 said:
Yes Tkari4. Good dev man. This mod going to be in 1.3 rom i think. [emoji6]
Envoyé de mon SM-N9005 en utilisant Tapatalk
Click to expand...
Click to collapse
Yes, of course!
Shutter sound mod is fixed in the OP.
Now Off option can be selected:
{
"lightbox_close": "Close",
"lightbox_next": "Next",
"lightbox_previous": "Previous",
"lightbox_error": "The requested content cannot be loaded. Please try again later.",
"lightbox_start_slideshow": "Start slideshow",
"lightbox_stop_slideshow": "Stop slideshow",
"lightbox_full_screen": "Full screen",
"lightbox_thumbnails": "Thumbnails",
"lightbox_download": "Download",
"lightbox_share": "Share",
"lightbox_zoom": "Zoom",
"lightbox_new_window": "New window",
"lightbox_toggle_sidebar": "Toggle sidebar"
}
tkari4 said:
Shutter sound mod is fixed in the OP.
Now Off option can be selected:
Click to expand...
Click to collapse
did you do factory reset? I deleted <ShutterSound>on</ShutterSound> and changed features.xml, but still cannot swicht it off,
is it possible not to do factory reset??
pir0texnik said:
did you do factory reset? I deleted <ShutterSound>on</ShutterSound> and changed features.xml, but still cannot swicht it off,
is it possible not to do factory reset??
Click to expand...
Click to collapse
I think no, because it's in the csc.
Sent from my SM-N9005 using Tapatalk
tkari4 said:
I think no, because it's in the csc.
Sent from my SM-N9005 using Tapatalk
Click to expand...
Click to collapse
I tried changing customer.xml and features.xml on 4.4.2 (Noto 3) and 4.3 (S3, Note 2). In both cases it was possible to switch on shutter sound menu, but it never changes state. It is always on, taping does not work. I baksmalied SamsungCamera2.odex and converted to java to undertand how does it work, but I am not a big specialist in java, maybe someone can help finally kill the sound...
pir0texnik said:
I tried changing customer.xml and features.xml on 4.4.2 (Noto 3) and 4.3 (S3, Note 2). In both cases it was possible to switch on shutter sound menu, but it never changes state. It is always on, taping does not work. I baksmalied SamsungCamera2.odex and converted to java to undertand how does it work, but I am not a big specialist in java, maybe someone can help finally kill the sound...
Click to expand...
Click to collapse
1.) Add this line
Code:
<CscFeature_Camera_ShutterSoundMenu>TRUE</CscFeature_Camera_ShutterSoundMenu>
to others.xml or to features.xml. (if you have booth, than features xml will be used)
add over </FeatureSet>
Code:
<CscFeature_Camera_ShutterSoundMenu>TRUE</CscFeature_Camera_ShutterSoundMenu>
</FeatureSet>
</SamsungMobileFeauture>
2.) Delete <ShutterSound>on</ShutterSound> or <ShutterSound>off</ShutterSound> from customer.xml
3.) Factory data reset
Should work..
tkari4 said:
1.) Add this line
Code:
<CscFeature_Camera_ShutterSoundMenu>TRUE</CscFeature_Camera_ShutterSoundMenu>
to others.xml or to features.xml. (if you have booth, than features xml will be used)
add over </FeatureSet>
Code:
<CscFeature_Camera_ShutterSoundMenu>TRUE</CscFeature_Camera_ShutterSoundMenu>
</FeatureSet>
</SamsungMobileFeauture>
2.) Delete <ShutterSound>on</ShutterSound> or <ShutterSound>off</ShutterSound> from customer.xml
3.) Factory data reset
Should work..
Click to expand...
Click to collapse
This method is invalid, because I am in the China, code named CHN CSC
Is there a way to remove CSC restrictions?
lijianjunyonghu said:
This method is invalid, because I am in the China, code named CHN CSC
Is there a way to remove CSC restrictions?
Click to expand...
Click to collapse
Sorry I can't help more..
I'm using it without problem in my Rom...
1. I put <CscFeature_Camera_ShutterSoundMenu>true</CscFeature_Camera_ShutterSoundMenu> in features.xml
2. I deleted <ShutterSound>on</ShutterSound> from customer.xml
3. I did factory data reset.
Now menu really works, but sound plays no matter what option is chosen...
I even added ro.camera.sound.forced=0 in build.prop and did factory data reset without any effect, shutter still plays.
Device is Galaxy S3, 4.3
tkari4 said:
Sorry I can't help more..
I'm using it without problem in my Rom...
Click to expand...
Click to collapse
Thank you
An Error Occured ...
Hi,
if I try to Baksmali the SasmungCamera2.apk I get an error, please see uploaded pics.
Google couldnt help me. What am I doing wrong?
Thanks
Alec86 said:
Hi,
if I try to Baksmali the SasmungCamera2.apk I get an error, please see uploaded pics.
Google couldnt help me. What am I doing wrong?
Thanks
Click to expand...
Click to collapse
As I see you are trying to modify one apk file from an odexed Rom.
SamungCamera2.apk must be deodexed first.
You need SamungCamera2.apk & SamungCamera2.odex. Deodex it, than you can make changes.
If your Rom is odexed, than push the modified SamungCamera2.apk back to your phone, than delete SamungCamera2.odex and reboot.
deodexed apk
tkari4 said:
As I see you are trying to modify one apk file from an odexed Rom.
SamungCamera2.apk must be deodexed first.
You need SamungCamera2.apk & SamungCamera2.odex. Deodex it, than you can make changes.
If your Rom is odexed, than push the modified SamungCamera2.apk back to your phone, than delete SamungCamera2.odex and reboot.
Click to expand...
Click to collapse
First thank you for your response,
I tried to deodexe with "Universal_Deodexer_V5" , I followed the instructions for this tool and deodexed SamungCamera2.apk. But I cannt still "baksmali" the apk. Same error.
I uploaded the log file from "Universal_Deodexer_V5"
Any idea?
Thanks
Alec86 said:
First thank you for your response,
I tried to deodexe with "Universal_Deodexer_V5" , I followed the instructions for this tool and deodexed SamungCamera2.apk. But I cannt still "baksmali" the apk. Same error.
I uploaded the log file from "Universal_Deodexer_V5"
Any idea?
Thanks
Click to expand...
Click to collapse
Try with this version, because you have the same error: http://forum.xda-developers.com/showpost.php?p=55233256&postcount=1
deodexed apk
tkari4 said:
Try with this version, because you have the same error: http://forum.xda-developers.com/showpost.php?p=55233256&postcount=1
Click to expand...
Click to collapse
Hi,
thank you again. Meanwhile I tried to enable/disable the shutter sound over the " features.xml" and it worked immediately. The shutter sound is now disabled PERMANENTLY, no matter if it disabled or enabled in the camera settings. The camera settings disable only the autofocus sound. I haven't do the factory reset, only wiped cache.
By the way, the fixed "Universal_Deodexer" works well. I Smali classout folder with our scripts and get "Moded_SamsungCamera2.apk" . The new Moded apk dont worke on my Phone (force close), what should I do (for the further experince)? I pushed the classes.dex in the deodexed apk, but still force close.
Alec86 said:
Hi,
thank you again. Meanwhile I tried to enable/disable the shutter sound over the " features.xml" and it worked immediately. The shutter sound is now disabled PERMANENTLY, no matter if it disabled or enabled in the camera settings. The camera settings disable only the autofocus sound. I haven't do the factory reset, only wiped cache.
By the way, the fixed "Universal_Deodexer" works well. I Smali classout folder with our scripts and get "Moded_SamsungCamera2.apk" . The new Moded apk dont worke on my Phone (force close), what should I do (for the further experince)? I pushed the classes.dex in the deodexed apk, but still force close.
Click to expand...
Click to collapse
Did you deleted the SamsungCamera2.odex from your phone?
Normally the Moded_SamsungCamera2.apk must work. (maybe the raw folder compression causing the problem in the apk)
Set the compression level before baksmali to 0.
Try to wipe dalvik-cache.
compression level
tkari4 said:
Did you deleted the SamsungCamera2.odex from your phone?
Normally the Moded_SamsungCamera2.apk must work. (maybe the raw folder compression causing the problem in the apk)
Set the compression level before baksmali to 0.
Try to wipe dalvik-cache.
Click to expand...
Click to collapse
I sat the compression level to 0 and it works Thank you again
My shutter sound is still disabled PMANENTLY, no matter if it disabled or enabled in the camera settings. Is this supposet to be?
Thanks

Qestion regarding manually disable the apk signature verification in android MM 6.0.1

hi , i want to manually disable android apk signature check for android 6.0.1 (n910t samsung note 4) for my custom OS.
but there is no classes.dex in the services,jar to decompiled and to be edited.
did it moved other place ? i specifically means samsung roms.
_______________________
previously we could disable it by editing services.jar\smali\com\android\server\pm\PackageMa nagerService.smali
Code:
.method private compareSignaturesCompat(Lcom/android/server/pm/PackageSignatures;Landroid/content/pm/PackageParser$Package;)I
.locals 13
const/4 v0, 0x0
return v0"

[GUIDE] Remove Root Detection and App Protection from an APK

Hi all! I've been using USAA mobile app for a while now but a recent updated added root detection in which the app would immediately close itself. It was incredibly annoying but I figured out how to remove it and thought I would share it here since the general process is pretty much the same with all apks. I'll use it as an example. Since not all apps have built in modification protection, I'll split this into 2 parts
I use Notepad++ for pretty much this whole thing. It's ability to search through multiple files for a string is incredibly useful
1. How to remove root detection
Decompile the apk (I use APK Easy Tool)
Search the apk for any files containing "superuser" (you can change this to whatever you think will be a likely hit such as "supersu")
Ex: smali_classes2\com\rsa\mobilesdk\sdk\RootedDeviceChecker.smali
Then change all of the const-string entries with any root related apks or directories to something that doesn't exist:
{
"lightbox_close": "Close",
"lightbox_next": "Next",
"lightbox_previous": "Previous",
"lightbox_error": "The requested content cannot be loaded. Please try again later.",
"lightbox_start_slideshow": "Start slideshow",
"lightbox_stop_slideshow": "Stop slideshow",
"lightbox_full_screen": "Full screen",
"lightbox_thumbnails": "Thumbnails",
"lightbox_download": "Download",
"lightbox_share": "Share",
"lightbox_zoom": "Zoom",
"lightbox_new_window": "New window",
"lightbox_toggle_sidebar": "Toggle sidebar"
}
Recompile and sign the app (just have the "sign apk after compile" checkbox ticked) and you're done! Pretty easy huh?
If you find that upon doing this, you get some kind of a message about the app being modified (like with USAA app - you'd hope it'd have some kind of tampering protection considering it's a banking app), then you'll need to remove the tamper protection.
2. How to remove tamper protection:
This is much more complicated than root removal for obvious reasons and so you're mileage will likely vary. You'll just need to use your head for this one
Search the main strings file: (for example: "res\values\strings.xml") for the message that pops up when you something triggers the protective measures. Ex: "The application appears to have been modified or corrupted"
Take note of the string name. Ex: "tamper_block_message_default"
Then search the public.xml file (typically in the same place as the strings.xml) for the string name.
Take note of the hexadecimal id
Now for the fun part: Search the apk for the hex string. Ex: 0x7f100b15
In the case of the USAA app it was found in: smali_classes2/com/usaa/mobile/android/app/core/protection/TamperActions.smali
Go to the line in that file that has it. This is the section that's triggering the protection problem.
Scroll up until you find what it's housed in (like an if statement or try block).
Then find a way to make sure that problem block never executes. In this case, it was an if statement. The problem block occured when v0 was set to something other than 0.
The solution here would then be to make sure that v0 always equals 0. So add this above it: const/4 v0, 0x0
Recompile and sign the app (just have the "sign apk after compile" checkbox ticked) and you're done!
Note that due to potentially dangerous nature of these kinds of modifications, I'm kindly asking that nobody shares any apks that they modified and if any moderators see any modified apks floating around on this thread, that they're deleted
The reasons for this should be obvious. In disabling the protection the developer added to the app, malicious code could easily be added to the app and in the case of an app that deals with sensitive information like the USAA banking app, the results could be catastrophic.
Not that anyone here would do that but it'd be too easy for some two-bit hacker on another site to claim to be hosting an apk here when it's in fact not.
So just share what you did/how you did it so others can do the same (this is a developers forum after all) :good:
Can you please help to disable root detection in this app?
https://www.apkmirror.com/apk/appli...elease/app-cloner-1-5-2-android-apk-download/
nextheart said:
Can you please help to disable root detection in this app?
https://www.apkmirror.com/apk/appli...elease/app-cloner-1-5-2-android-apk-download/
Click to expand...
Click to collapse
What part of the guide didn't work for you? I'm assuming you're not using magisk?
Zackptg5 said:
What part of the guide didn't work for you? I'm assuming you're not using magisk?
Click to expand...
Click to collapse
I can't find anything like superuser or supersu inside apk.
Probably wants LP support. Don't bother.
Maadhaar app
Can you please remove the root detection of maadhaar app https://play.google.com/store/apps/details?id=in.gov.uidai.mAadhaarPlus
And upload it for me.
Thanks in advance.
prabhatpatel93 said:
Can you please remove the root detection of maadhaar app https://play.google.com/store/apps/details?id=in.gov.uidai.mAadhaarPlus
And upload it for me.
Thanks in advance.
Click to expand...
Click to collapse
Nope. Reread the OP again. I made it clear why posting modified apks here is a bad idea. This is also a guide so you can do it yourself not a place for ppl to request me to do it for them. This is a developers forum. Now if you were trying to follow the guide and got stuck on something I'd be happy to help. That's what this forum is all about
Its a DIY thread, people arent supposed to ask for modded apks, that'd be illegal
@Zackptg5 nice guide brother, it'd be fun to try it out
@Zackptg5
i Have tried ,but got this error
---------------------------
Decompile failed. Please check the log
Try clear framework if you got decompile error often
---------------------------
OK
---------------------------
@Zackptg5
Hey, do you know other methods banking apps use to detect root? I use a banking app called DnB that somehow detect root but there is no devicerootchecker file there, they have an another app that has that file and I have managed to stop it from detection root but this one I don't understand? Any help would be appreciated.
Dns94 said:
@Zackptg5
Hey, do you know other methods banking apps use to detect root? I use a banking app called DnB that somehow detect root but there is no devicerootchecker file there, they have an another app that has that file and I have managed to stop it from detection root but this one I don't understand? Any help would be appreciated.
Click to expand...
Click to collapse
Did you follow the instructions on the OP? The smali file can be named whatever they want and in many cases, the apk may be obfuscated so the smali file names don't even make sense (such as a.smali, b.smali, etc.). That's why I suggest using notepad++ or some other tool in which you can search all smali files for common root entries like supersu or superuser
Check smali/com/dynatrace/android/agent/RootDetector.smali
Zackptg5 said:
Did you follow the instructions on the OP? The smali file can be named whatever they want and in many cases, the apk may be obfuscated so the smali file names don't even make sense (such as a.smali, b.smali, etc.). That's why I suggest using notepad++ or some other tool in which you can search all smali files for common root entries like supersu or superuser
Check smali/com/dynatrace/android/agent/RootDetector.smali
Click to expand...
Click to collapse
Oh my... Im so stupid, I used Notepad++ but I used it wrongly (used windows explorer to find smali file,then use N++ to edit *facepalm*) , the other app I managed to modify looked exactly as your screenshots so it was easy to modify that one, but this was a bit different, anyways back to the problem I did find it under "smali/com/dynatrace/android/agent/RootDetector.smali", but there isnt any "const-strings" to edit there. What do I do then?
Dns94 said:
Oh my... Im so stupid, I used Notepad++ but I used it wrongly (used windows explorer to find smali file,then use N++ to edit *facepalm*) , the other app I managed to modify looked exactly as your screenshots so it was easy to modify that one, but this was a bit different, anyways back to the problem I did find it under "smali/com/dynatrace/android/agent/RootDetector.smali", but there isnt any "const-strings" to edit there. What do I do then?
Click to expand...
Click to collapse
Looks like this one won't be as straightforward as USAA. You'll need to do some outside the box thinking now. So you could search the apk for any instances of "RootDetector" to see how it's used. I found 1 entry in smali_classes2/com/dynatrace/android/agent/metrics/AndroidMetrics.smali
This makes it easier since we only have 1 place to look:
Code:
invoke-static {}, Lcom/dynatrace/android/agent/RootDetector;->isDeviceRooted()Z
move-result v0
iput-boolean v0, p0, Lcom/dynatrace/android/agent/metrics/AndroidMetrics;->deviceRooted:Z
new-instance v0, Ljava/lang/StringBuilder;
So it appears that it calls the isDeviceRooted function in the RootDetector.smali (which in turn calls the other functions in that file) and assigns the value to v0. The functions runs either 0 or 1 ultimately. I'd suggest trying to set the value to 0 first, and if that doesn't work, 1. Easiest way I can think of doing this would be to change the
Code:
move-result v0
line to
Code:
const/4 v0, 0x0
in the AndroidMetrics file.
So try making that one line change and see what happens. To change it to 1, just change the 0x0 to 0x1. It looked like a lot of this is outputted to the log too so following the logcat might help
Zackptg5 said:
Looks like this one won't be as straightforward as USAA. You'll need to do some outside the box thinking now. So you could search the apk for any instances of "RootDetector" to see how it's used. I found 1 entry in smali_classes2/com/dynatrace/android/agent/metrics/AndroidMetrics.smali
This makes it easier since we only have 1 place to look:
Code:
invoke-static {}, Lcom/dynatrace/android/agent/RootDetector;->isDeviceRooted()Z
move-result v0
iput-boolean v0, p0, Lcom/dynatrace/android/agent/metrics/AndroidMetrics;->deviceRooted:Z
new-instance v0, Ljava/lang/StringBuilder;
So it appears that it calls the isDeviceRooted function in the RootDetector.smali (which in turn calls the other functions in that file) and assigns the value to v0. The functions runs either 0 or 1 ultimately. I'd suggest trying to set the value to 0 first, and if that doesn't work, 1. Easiest way I can think of doing this would be to change the
Code:
move-result v0
line to
Code:
const/4 v0, 0x0
in the AndroidMetrics file.
So try making that one line change and see what happens. To change it to 1, just change the 0x0 to 0x1. It looked like a lot of this is outputted to the log too so following the logcat might help
Click to expand...
Click to collapse
Thank you so much for your help, but it seems that I cannot compile it back since it uses "AndResGuard" thing, so I cannot test wether it worked or not. As you might have noticed I have almost no clue what I am doing and this is getting too complicated it seems, or I am a complete moron. Anyways dont wanna waste time. Again thanks!
@Zackptg5 I'm using phh treble 9.0 and it doesn't allow me to use magisk. I'm trying to use Snapchat but it gives me a login error. I tried following your guide but I can't get the darn thing to decompile. Is there any way possible you can remove them for me? I would greatly appreciate it.
https://download.apkpure.com/b/apk/...AlMjBJbmMmdD1hcGsmdm49MTAuNTIuMy4wJnZjPTE5MDk
Donavonn said:
@Zackptg5 I'm using phh treble 9.0 and it doesn't allow me to use magisk. I'm trying to use Snapchat but it gives me a login error. I tried following your guide but I can't get the darn thing to decompile. Is there any way possible you can remove them for me? I would greatly appreciate it.
https://download.apkpure.com/b/apk/...AlMjBJbmMmdD1hcGsmdm49MTAuNTIuMy4wJnZjPTE5MDk
Click to expand...
Click to collapse
Nope but I got it (https://www.apkmirror.com/apk/snap-inc/snapchat/snapchat-10-52-3-0-release/) to decompile no problem with apk easy tool (https://forum.xda-developers.com/an...tool-apk-easy-tool-v1-02-windows-gui-t3333960)
Zackptg5 said:
Nope but I got it (https://www.apkmirror.com/apk/snap-inc/snapchat/snapchat-10-52-3-0-release/) to decompile no problem with apk easy tool (https://forum.xda-developers.com/an...tool-apk-easy-tool-v1-02-windows-gui-t3333960)
Click to expand...
Click to collapse
That's the tool I used but when I clicked decompile it gave me some error about framework? I don't know the exact error cause I'm at work on my phone. I did try installing the framework in the requirements but during installation it said I had it installed already.
Donavonn said:
That's the tool I used but when I clicked decompile it gave me some error about framework? I don't know the exact error cause I'm at work on my phone. I did try installing the framework in the requirements but during installation it said I had it installed already.
Click to expand...
Click to collapse
You'll want to clear all framework cache and start clean
I get this instead of RootedDeviceChecker and I have no idea what am I supposed to do...
D:\PROGRAMY\Android\APK Tool\1-Decompiled APKs\base\smali\softax\hce\feedback\HceFeedbackReceiverTransaction$TRANSACTION_RESULT.smali (5 hits)
Line 43: .field public static final enum DEVICE_PROBABLY_ROOTED:Lsoftax/hce/feedback/HceFeedbackReceiverTransaction$TRANSACTION_RESULT;
Line 294: const-string v1, "DEVICE_PROBABLY_ROOTED"
Line 300: sput-object v0, Lsoftax/hce/feedback/HceFeedbackReceiverTransaction$TRANSACTION_RESULT;->DEVICE_PROBABLY_ROOTED:Lsoftax/hce/feedback/HceFeedbackReceiverTransaction$TRANSACTION_RESULT;
Line 534: sget-object v1, Lsoftax/hce/feedback/HceFeedbackReceiverTransaction$TRANSACTION_RESULT;->DEVICE_PROBABLY_ROOTED:Lsoftax/hce/feedback/HceFeedbackReceiverTransaction$TRANSACTION_RESULT;
Line 704: sget-object p0, Lsoftax/hce/feedback/HceFeedbackReceiverTransaction$TRANSACTION_RESULT;->DEVICE_PROBABLY_ROOTED:Lsoftax/hce/feedback/HceFeedbackReceiverTransaction$TRANSACTION_RESULT;
D:\PROGRAMY\Android\APK Tool\1-Decompiled APKs\base\smali\softax\hce\feedback\NativeFeedbackCard.smali (3 hits)
Line 263: sget-object v2, Lsoftax/hce/feedback/HceFeedbackReceiverCard;->onHceClearOnRooted:Lsoftax/hce/property/Event;
Line 265: new-instance v3, Lsoftax/hce/feedback/HceFeedbackReceiverCard$HceFeedbackDataHceClearOnRooted;
Line 267: invoke-direct {v3, v0, v1}, Lsoftax/hce/feedback/HceFeedbackReceiverCard$HceFeedbackDataHceClearOnRooted;-><init>(Lsoftax/hce/feedback/HceFeedbackReceiverCard;Lsoftax/hce/feedback/OPERATION_RESULTV
D:\PROGRAMY\Android\APK Tool\1-Decompiled APKs\base\smali_classes2\iko\bcu.smali (5 hits)
Line 100: "Lsoftax/hce/feedback/HceFeedbackReceiverCard$HceFeedbackDataHceClearOnRooted;",
Line 166: sget-object v0, Lsoftax/hce/feedback/HceFeedbackReceiverCard;->onHceClearOnRooted:Lsoftax/hce/property/Event;
Line 1773: .method public a(Ljava/lang/Object;Lsoftax/hce/feedback/HceFeedbackReceiverCard$HceFeedbackDataHceClearOnRootedV
Line 3664: invoke-static {}, Lsoftax/hce/core/HceControl03;->systemIsProbablyRooted()Z
Line 3681: invoke-static {}, Lsoftax/hce/core/HceControl03;->systemIsProbablyRootedMethods()Ljava/lang/String;
D:\PROGRAMY\Android\APK Tool\1-Decompiled APKs\base\smali_classes2\iko\bcv.smali (5 hits)
Line 10: "Lsoftax/hce/feedback/HceFeedbackReceiverCard$HceFeedbackDataHceClearOnRooted;",
Line 47: .method public a(Ljava/lang/Object;Lsoftax/hce/feedback/HceFeedbackReceiverCard$HceFeedbackDataHceClearOnRootedV
Line 63: invoke-virtual {v0, p1, p2}, Liko/bcu;->a(Ljava/lang/Object;Lsoftax/hce/feedback/HceFeedbackReceiverCard$HceFeedbackDataHceClearOnRootedV
Line 84: check-cast p2, Lsoftax/hce/feedback/HceFeedbackReceiverCard$HceFeedbackDataHceClearOnRooted;
Line 86: invoke-virtual {p0, p1, p2}, Liko/bcv;->a(Ljava/lang/Object;Lsoftax/hce/feedback/HceFeedbackReceiverCard$HceFeedbackDataHceClearOnRootedV
D:\PROGRAMY\Android\APK Tool\1-Decompiled APKs\base\smali_classes2\iko\bdb.smali (2 hits)
Line 100: const-string v1, ", probablyRooted="
Line 108: const-string v1, ", probablyRootedMethods=\'"
D:\PROGRAMY\Android\APK Tool\1-Decompiled APKs\base\smali_classes2\iko\eby$a.smali (1 hit)
Line 55: const-string v1, "DEVICE_ROOTED"
D:\PROGRAMY\Android\APK Tool\1-Decompiled APKs\base\smali_classes2\iko\efs.smali (1 hit)
Line 166: const-string v0, "Device is considered as rooted or downgrade was detected"
D:\PROGRAMY\Android\APK Tool\1-Decompiled APKs\base\smali_classes2\iko\efw$a.smali (1 hit)
Line 53: const-string v1, "ROOTED"
D:\PROGRAMY\Android\APK Tool\1-Decompiled APKs\base\smali_classes2\iko\ega.smali (2 hits)
Line 47: const-string p0, "Trying to init profile in rooted mode"
Line 62: const-string v0, "Error while performing profile init in rooted mode"
D:\PROGRAMY\Android\APK Tool\1-Decompiled APKs\base\smali_classes2\iko\egq.smali (7 hits)
Line 24: const-string v0, "Should not update profile on rooted device"
Line 49: const-string v1, "Should not read settings on rooted device"
Line 66: const-string v0, "Should not modify settings on rooted device"
Line 79: const-string v0, "Should not modify settings on rooted device"
Line 100: const-string v0, "Should not modify settings on rooted device"
Line 121: const-string v0, "Should not modify settings on rooted device"
Line 142: const-string v1, "Should not touch set default service on rooted device"
D:\PROGRAMY\Android\APK Tool\1-Decompiled APKs\base\smali_classes2\iko\egs$a.smali (1 hit)
Line 51: const-string v1, "ROOTED"
Dns94 said:
@Zackptg5
Hey, do you know other methods banking apps use to detect root? I use a banking app called DnB that somehow detect root but there is no devicerootchecker file there, they have an another app that has that file and I have managed to stop it from detection root but this one I don't understand? Any help would be appreciated.
Click to expand...
Click to collapse
Hi, I suggest you Dex2jar to convert ” .dex” files to “.class” files and then use JD-GUI tool to read the jar file and use search function to search for any string in all the files. Then, follow the instructions from the post.
https://java-decompiler.github.io/
https://github.com/pxb1988/dex2jar/blob/2.x/README.md

Categories

Resources