I'm trying to patch Tingle on my Xiaomi Redmi 4A running on LineageOS 17.1 via ADB for enabling system spoofing signature for microG. But I'm getting this error :ADB Root access is disabled by system setting - enable in Settings -> System -> Developer options everytime I type adb root in cmd (running as admin). My device is rooted with Magisk 20.4 and the 'Super Access' option is enabled as "Apps and ADB". I've also enabled "Android debugging" option under the 'Settings -> System -> Developer options'.
But I'm unable to find any option called 'ADB Root access' or 'Root Access' under 'Settings -> System -> Developer options'. I've also tried abdb Insecure by Chainfire.
But with no luck, the problem still persist. I just want to get root access in my adb interface to be able to use Tingle.
Note : I'm on Android 10. My SELinux status is enforcing (not permissive) and my ROM isn't stock nor official.
Thanks in advance! Any kind of help would be highly appreciated. <3
As #biAji pointed out, the 'Rooted debugging' option is not shown if ro.debuggable is set to 0 in the system props. The ADB as root option will be visible in developer options if you add the line ro.debuggable=1 anywhere in the /system/build.prop file.
If you cannot edit the file as root but su is working in the adb shell or any terminal app then SmartPack Kernel Manager might be able to help. Install the app and go to the Build prop Editor section from the menu. If you can find a key-value pair ro.debuggable then edit its value to 1. If it doesn't exist then create a new prop with that name as key and the value as 1.
Now reboot the device and check if an ADB as Root option appears in developer options. If it does, the build.prop file was successfully edited and now you can uninstall SmartPack.
After check the source code, this settings item will be available if the device is debuggable
#Override
public boolean isAvailable() {
return Build.IS_DEBUGGABLE;
}
And it's depend on the system props ro.debuggable which is set to 0 in my case.
I think I need a debuggable-boot image to patch the device.
Related
I have a specific custom device that has a Fire OS vNext 7.0 (probably some kind of Fire TV type of the OS?) in it and I need to install my own APK into it.
I have an ADB access with root, but Developer Options are not enabled (I cannot access them), so I can't install the APK (adb install throws INSTALL_FAILURE_USER_RESTRICTED). I need to enable Developer Options to be able to enable installation of third party (unknown source) APKs.
I tried to tap the serial number 7 times in Settings - Device and Software - About as mentioned here, but it didn't do anything. I also tried to follow these steps, but the package com.android.settings does not have the shared_prefs directory that is mentioned there (and I didn't find any other settings package that would have such XML). I also tried to push the APK into the device, go to ADB shell (as root) and install via pm (ended up with the same result as adb install)
Is there any way how to either enable Developer Options so that they appear in the Settings menu, or how to directly enable unknown app installation? Or is there any other way how to install my APK?
I know it may sound weird that I have root ADB access without the Developer Options enabled, but that's just how it is, I already got this device in this state.
I used this adb command line: pm disable 'com.android.settings/com.android.settings.SubSettings' using the android root shell but of course it disables all sub settings and not just the reset option. Would it be possible to disable only the factory reset option?
I generate apk file for my project but when I drag and drop it to genymotion I see this error:
an error occurred while deploying the file. install failed conflicting provider
I had same problem, solved it by uncheck Verify apps over USB under Developer settings
Actually #WenChao's answer is the solution, but for me this option was disabled. in this case you need to run following command (in order to uncheck Verify apps over USB option):
adb shell settings put global verifier_verify_adb_installs 0
Make sure adb is connected to emulator (run adb devices to see connected devices)
If you want to check the option (are you crazy?) just pass 1 instead of 0 in above command.
it's too late ...
But this Ans does provide some help for others :)
Eror : an error occurred while deploying the file.
Open Genymotion
Go to Setting
In settings window select ADB
Under ADB tool connections setting select
Use Genymotion Android tools(default) radio button.
Now Start Your Virtual Device
now drag and drop work perfectly :)
I wanted to delete my custom apps on the Android emulator in Eclipse. I followed this guide and encountered the same behaviour as described in this question. I also tested the root access the same way Arsalan mentioned in his first answer and got the same result.
I would like to try if Vyomas approach works, but I don't know the command for deleting an app.
Can anyone help?
I am assuming you are getting "rm failed for minesweeper.apk, Read-only file system"
If that's the case, then you could always press "page up" to bring up the menu in the homescreen and uninstalled it through Settings -> applications -> Manage Applications
Or you could keep going comando style and use this from androidkit, worked for me:
Using adb shell :
Important: The device has to be unplugged from USB if you are trying to uninstall from the emulator, else emulator should not be open and device needs to be plugged in the USB of the PC if you are trying to uninstall from the G1 Device. If either of them are not connected the adb shell command will not work.
Go to the shell and making sure adb is in PATH:
Go to shell (from cmd->adb shell or directly through a terminal)
#
#cd data
#cd app
#cd ls
#rm com.company.product.apk
Can you not just reset the device on startup if you want it removed? If your using the Eclipse add-on to use the emulator just select the box to wipe user data before you launch?
Si
I'm trying to figure out how to debug applications directly on my phone (HTC Desire).
I've installed the USB driver that came with the phone and the phone is listed when using "adb devices".
How do I configure eclipse/ADT to launch on the phone instead of launching the emulator/virtual device?
Note: This answer is a heavily modified version of this guide that used to exist at developer.android.com. Portions of it are quoted verbatim from the original text without attribution for the specific parts that are quoted.
With an Android-powered device, you can develop and debug your Android applications just as you would on the emulator.
1. Declare your application as "debuggable" in AndroidManifest.xml.
<application
android:debuggable="true"
... >
...
</application>
2. On your handset, navigate to Settings > Security and check Unknown sources
3. Go to Settings > Developer Options and check USB debugging
Note that if Developer Options is invisible you will need to navigate to Settings > About Phone and tap on Build number several times until you are notified that it has been unlocked.
4. Set up your system to detect your device.
Follow the instructions below for your OS:
Windows Users
Install the Google USB Driver from the ADT SDK Manager
(Support for: ADP1, ADP2, Verizon Droid, Nexus One, Nexus S).
For devices not listed above, install an OEM driver for your device
Mac OS X
Your device should automatically work; Go to the next step
Ubuntu Linux
Add a udev rules file that contains a USB configuration for each type of device you want to use for development. In the rules file, each device manufacturer is identified by a unique vendor ID, as specified by the ATTR{idVendor} property. For a list of vendor IDs, click here. To set up device detection on Ubuntu Linux:
Log in as root and create this file: /etc/udev/rules.d/51-android.rules.
Use this format to add each vendor to the file:
SUBSYSTEM=="usb", ATTR{idVendor}=="0bb4", MODE="0666", GROUP="plugdev"
In this example, the vendor ID is for HTC. The MODE assignment specifies read/write permissions, and GROUP defines which Unix group owns the device node.
Now execute: chmod a+r /etc/udev/rules.d/51-android.rules
Note: The rule syntax may vary slightly depending on your environment. Consult the udev documentation for your system as needed. For an overview of rule syntax, see this guide to writing udev rules.
5. Run the project with your connected device.
With Eclipse/ADT: run or debug your application as usual. You will be presented with a Device Chooser dialog that lists the available emulator(s) and connected device(s).
With ADB: issue commands with the -d flag to target your connected device.
Sometimes you need to reset ADB.
To do that, in Eclipse, go:
Window>>
Show View >>
Android
(Might be found in the "Other" option)>>Devices
in the device Tab, click the down arrow, and choose reset adb.
in devices which has Android 4.3 and above you should follow these steps:
How to enable Developer Options:
Launch Settings menu.
Find the open the ‘About Device’ menu.
Scroll down to ‘Build Number’.
Next, tap on the ‘build number’ section seven times.
After the seventh tap you will be told that you are now a developer.
Go back to Settings menu and the Developer Options menu will now be displayed.
In order to enable the USB Debugging you will simply need to open Developer Options, scroll down and tick the box that says ‘USB Debugging’. That’s it.