Android ADB permissions changes

Source: Internet
Author: User

1. Change the root authority of ADB:

system/core$ git diff adb/adb.c
Diff--git A/adb/adb.c B/ADB/ADB.C
Index 99bea0f: d8fc090 100644
---A/ADB/ADB.C
+ + B/ADB/ADB.C
@@ -1217,6 +1217,11 @@ -1217,6 void drop_capabilities_bounding_set_if_needed () {

static int should_drop_privileges () {
#ifndef Allow_adbd_root
+ Char Value[property_value_max];
+ Property_get ("Hw.hasusbadbroot", Value, "");
+ if (strcmp (Value, "1") = = 0)
+ return 0;
+ Else
return 1;
#else/* Allow_adbd_root */
int secure = 0;

Join Hw.hasusbadbroot=1 in System.prop at the same time



2. Remove the ADB key check:

Ro.adb.secure=0


3. Change developer options to hide

Packages/apps/settings/src/com/android/settings/settings.java


private void Updateheaderlist (list-final Boolean Showdev = Mdevelopmentpreferences.getboolean (
-Developmentsettings.pref_show,
-Android.os.Build.TYPE.equals ("Eng"));
-int i = 0;
+//Final Boolean showdev = Mdevelopmentpreferences.getboolean (
+//Developmentsettings.pref_show,
+//android.os.Build.TYPE.equals ("eng")); Samjiang Modify
+ Final Boolean Showdev = true;
+ int i = 0;

Final Usermanager um = (usermanager) getsystemservice (Context.user_service);
Mheaderindexmap.clear ();

4.USB debugging is turned on by default:

@@ -272,7 +272,7 @@ -272,7 these).
<li>installs APKs According to the product definition files; Tags
is ignored for APK modules.
<li><code>ro.secure=1</code>
-<li><code>ro.debuggable=0</code>
+ <li><code>ro.debuggable=1</code>
<li><code>adb</code> is disabled by default.
</td>
</tr>

"<code>make user</code>"
<p>
This was the flavor intended to be the final release bits.
<ul>
<li>installs modules tagged with <code>shell_</code>$ (target_shell) and <code>user</code .
<li>installs non-apk modules that has no tags specified.
<li>installs APKs According to the product definition files; Tags
is ignored for APK modules.
<li><code>ro.secure=1</code>
<li><code>ro.debuggable=1</code>
<li><code>adb</code> is disabled by default.
</td>
</tr>
<tr>
<td>


@@ -350,7 +350,7 @@ -350,7 (true,$ (Strip $ (enable_target_debugging)))
Include_test_ota_keys: = True
else #!enable_target_debugging
# Target is less debuggable and adbd are off by default
-Additional_default_properties + = Ro.debuggable=0
+ Additional_default_properties + = ro.debuggable=1
endif #!enable_target_debugging





Android ADB permissions changes

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.