SoFunction
Updated on 2025-03-11

Two ways to quickly debug Android application system to modify properties

Preface

Almost all Android applications in the application market are in a non-debugable state. If we need to debug Android applications, we often need to decompile the corresponding apk, and then modify the application tag in the apk, and set the android:debuggable property to true. Then back-compile

<application android:debuggable="true">
</application>

This is not only troublesome, but also if the corresponding app has signed verification, it may prevent the app from running normally.

It is judged as to whether an application can be debugged in the Android system: When android starts, the system attribute is 1, and all programs in the system can be debugged. If 0 in the system is 0, it will determine whether the android:debuggable property in the application tag in the program is true.

Therefore, we can debug all applications in the device by modifying the properties in the file.

The following are two ways of modifying

Method 1 (not recommended)

Inject the init process and modify the attribute values ​​in memory. As long as the init process does not restart, these attribute values ​​will take effect. However, if the device restarts, the modified attribute value will be invalid.

Prerequisite: There is a su command (root)

Specific methods:

  • Search for MOP on Github and download the corresponding MOP tool
  • adb push ./mprop /data/local/tmpPush mprop to your phone
  • adb shellEnter the mobile phone shell
  • suSwitch to root
  • cd /data/local/tmp & chmod 777 ./mprop
  • ./mprop 1

Method 2 (Recommended)

Prerequisite: Magisk needs to be installed first

Specific methods:

  • Search for MagiskHidePropsConfig on Github and download the corresponding MagiskHidePropsConfig module
  • Install and enable the downloaded MagiskHidePropsConfig module in Magisk
  • adb shell
  • props
  • Enter 5, Add/edit custom props
MagiskHide Props Config v6.1.2
by Didgeridoohan @ XDA Developers
=====================================
 Select an option below.
=====================================
1 - Edit device fingerprint
2 - Force BASIC key attestation
3 - Device simulation (disabled)
4 - Edit MagiskHide props (active)
5 - Add/edit custom props
6 - Delete prop values
7 - Script settings
8 - Collect logs
u - Perform module update check
r - Reset all options/settings
b - Reboot device
e - Exit
See the module readme or the
support thread @ XDA for details.
Enter your desired option: 5
  • Enter n, New custom prop
MagiskHide Props Config v6.1.2
by Didgeridoohan @ XDA Developers
=====================================
 Custom props
 Select an option below:
=====================================
Set or edit custom prop values for your device.
Currently no custom props set.
Please add one by selecting
"New custom prop" below.
n - New custom prop
b - Go back to main menu
e - Exit
See the module readme or the
support thread @ XDA for details.
Enter your desired option: n
  • enter
MagiskHide Props Config v6.1.2
by Didgeridoohan @ XDA Developers
=====================================
 New custom prop
=====================================
Enter the prop to set. Example:
.lcd_density
b - Go back
e - Exit
Enter your desired option: 
  • Enter y
MagiskHide Props Config v6.1.2
by Didgeridoohan @ XDA Developers
=====================================
 
=====================================
 is
one of the sensitive props that can be
set by the MagiskHide props option.
Are you sure you want to proceed?
y - Yes
n - No
e - Exit
Enter your desired option: y
  • Enter 1
MagiskHide Props Config v6.1.2
by Didgeridoohan @ XDA Developers
=====================================
 
=====================================
Enter the value you want to set
 to,
or select from the options below.
The currently set value is:
0
Please enter the new value.
b - Go back
e - Exit
Enter your desired option: 1
  • Enter y
MagiskHide Props Config v6.1.2
by Didgeridoohan @ XDA Developers
=====================================
 
=====================================
This will set  to:
1
Pick an option below to change
what boot stage the prop will
be set in, or set/reset a delay:
1 - Default (current)
2 - post-fs-data
3 - late_start service
4 - Both boot stages
d - Delay
Do you want to continue?
Enter y(es), n(o), e(xit)
or an option from above: y
Working. Please wait...
Working. Please wait...
Working. Please wait...
Working. Please wait...
Working. Please wait...
MagiskHide Props Config v6.1.2
by Didgeridoohan @ XDA Developers
=====================================
 Reboot - 
=====================================
Reboot for changes to take effect.
Do you want to reboot now (y/n)?
Enter y(es), n(o) or e(xit): y
Rebooting...

Conclusion

After modifying the value in the above two methods, enter it in the mobile phone shellgetprop You should get 1. At this point we can happily debug all the apps on our phone.

The above is the detailed content of Android computer opening the system debugging master switch. For more information about Android computer opening the system debugging master switch, please pay attention to my other related articles!