Tag Info

Hot answers tagged

14

Yes. The command is pm disable <package name>. You must be root in order to do this: PC> adb shell shell@hammerhead:/ $ su root@hammerhead:/ # pm list packages -e | grep 'calculator' package:com.android.calculator2 root@hammerhead:/ # pm disable com.android.calculator2 Package com.android.calculator2 new state: disabled root@hammerhead:/ # pm list ...


8

I just did this! /data/property/persist.sys.dalvik.vm.lib is a textfile containing one of two values: 'libart.so' or 'libdvm.so'. You can change from ART to Dalvik simply by editing this file. Ex: adb shell 'echo libdvm.so >/data/property/persist.sys.dalvik.vm.lib'


7

There is no way to get Gingerbread to prompt the host to verify RSA key as that is found in newer versions of Android (Jellybean 4.1 and upwards). The only true method of hardening ADB in the sense of prevention of communicating over the USB is to modify the kernel for that appropriate device and disable the USB functionality within it in such a way that ...


7

You need to include the port number. adb -s 192.168.60.69:5555 shell If you're using a sensible shell with configurable tab-completion (i.e. not Windows), then you can type adb -sTab to get a list of devices.


5

Personally I had to run fastboot as root/sudo for fastboot to detect the device. I tried this on Linux as I don't own a Mac, but it's *NIX anyway ;)


4

There are two ways. The simpler one is to use a legacy market://details?id=com.shadowburst.showr URL instead of https://play.google.com/store/apps/details?id=com.shadowburst.showr. No browser will offer to open a market:// URL, but it's still possible that another installed app will do so. The more complex way is to explicitly specify what activity you ...


4

Check if you can connect a mouse (or Keyboard) through USB OTG port (and microUSB-to-USB converter cable)... I'm not sure whether your device supports OTG or not... Just give a try...


3

For future reference, this was my related case (involving a Nexus 4): I tried to bring my phone back to the original state (bootloader locked + stock rom). Now fastboot devices did not show the device where adb device did, until I put the phone in fastboot mode (this makes sense, but took me a while to figure out...) To put the Nexus 4 in fastboot mode: ...


3

Well if you phone is rooted you can run commands with the "su -c" command. Here is an example of a cat command on the build.prop file to get a phones product information. adb shell "su -c 'cat /system/build.prop |grep "product"'" This invokes root permission and runs the command inside the ' ' Notice the 5 end quotes, that is required that you close ...


3

The command is mount -o remount,rw /system


3

Quite easy: find / starts exploring at the file system root (i.e. the very top). So it comes to places you have no access to as normal user, and runs into permission issues. It sees a directory called /proc/19619 and, knowing this is a directory, wants to traverse into it. But it is not permitted to (most likely the permission of that directory is something ...


3

You don't use adb to connect to a device when it's in the bootloader menu: you need to use the fastboot command instead. That's why it's called "fastboot mode"! Not all phones support fastboot: in particular, older HTC phones use a proprietary protocol called HBOOT instead, but I think the newer ones support fastboot.


3

Not from within Android, no. Only root can mount or remount filesystems, including /system. There is another way, which is to go outside of Android completely by making the change you want from the recovery. Since the recovery doesn't use Android's permissions system, it can let you mount whatever filesystems you like, however you like. But if you're going ...


2

Additionally to what @Alex-p wrote, you can set the ENV environment variable to override the path of the mkshrc file used. All login shells also read /system/etc/profile and $HOME/.profile (these are a good place to export ENV). Disclaimer: I’m the mksh maintainer.


2

the -s should be before the 'install'


2

On Windows, you can just enter [Alt]+[3] via the numpad (don't forget to press enter afterwards). This sends [Ctrl]+[c] to the shell thereby terminating the current command: D:\Android>adb shell $ cat cat ♥ ^C $ exit exit D:\Android> Note that [Alt]+[3] produces the ASCII-Char ♥ in Windows which equals the ETX-Byte. You can also press [Alt]+[0]-[3] (hold ...


2

Logcat displays Android's logs. This is by definition information about things that happened in the past. Android's logs are stored in a ring buffer and if full, the then oldest entries are overwritten. It depends on how much is being logged, when that happens. Besides this, the buffer is reset when you restart the phone, so logs cannot be older than the ...


2

To make the system reconize the android device, in their several modes, one needs to set permissions for his user in udev. You need to repeat this process of loading android udev ids, for every mode the phone has (operating system, bootloader or recovery) because they have different usb ids # reboot into fastboot mode adb reboot bootloader # grab you ...


2

The problem is that you're missing the adb recovery driver. You might consider trying Koush's universal USB driver installer -- it solved this very problem by installing the missing drivers.


2

If you can get to recovery you should be able to flash the full factory image which will restore your phone to completely stock. Download the full occam factory image, which includes the full system, bootloader, recovery, kernel (boot.img), and radio. It's a clean slate for these components - they'll flash cleanly over anything you have now. You can run ...


2

On the SDK emulators and virtual machines like Genymotion, adbd starts up as root and provides a root shell. Short of modifying the source code to do otherwise and rebuilding your VM images, I think you will have to use the su approach suggested above. su shell does indeed work on both SDK emulators as well as the Genymotion VMs. Specifically: ubuntu$ adb ...


2

You can't set the lock screen PIN or password from the command-line or from an app. There are three reasons for this:- The logic behind setting a PIN is quite complicated, because a security policy installed on the device might prevent the use of a PIN (and require a more secure locking method). Setting the PIN would therefore fail in some cases. For ...


2

ADB backup archives are a "all or nothing" solution when it comes to restore – which is what the "unsafe warning" is about. Considering your circumstances, here are a few points to consider: do one "full backup" excluding your system apps cannot hurt, so you could restore that as-is. Note, hoever, that this most likely also excludes data of system apps, ...


2

Yes. Go to Settings -> Developer options and turn on the Stay awake option.


2

Solved the problem by installing Motorola Device Manager and re-plugging the phone. I felt so silly after finding that link.


2

This is more of a linux question, and it may need to be moved to superuser.se, but I can answer it. On linux, you string commands using && (or || or just ;). With &&, the first command must finish executing and have no error codes in order for the next command in the sequence to run. In your setup, it looks like you want to open an ADB ...


2

Android Studio contains ADB in folder android-studio\sdk\platform-tools It's possible to add to PATH in Windows and use Terminal inside Android Studio only by command: "adb shell" and after use "su" get root shell. locate Android studio platform tools folder (eg: C:\android-studio\sdk\platform-tools) open Enviroment Variables in Windows ...


2

This will work on a linux: adb shell dd if=/dev/block/mmcblk0p7|sed 's/\r$//' > backup.bin In MacOS it can be made to work as well, you just need to do it with Perl: adb shell dd if=/dev/block/mmcblk0p7|perl -pe 's/\x0D\x0A/\x0A/g' > backup.bin


2

Most superuser apps don't allow adb su access by default. Depending on the app you used the option may vary in location, but basically you need to go to settings in the superuser app and change it from "apps only" to "apps and adb." This should allow you to use su in an adb shell.


2

You can download and flash a factory image from here: https://developers.google.com/android/nexus/images#razorktu84p it also includes instructions at the top on how to do it. This will restore it completely to stock.



Only top voted, non community-wiki answers of a minimum length are eligible