ADB on a rooted device
We have already seen how the ADB tool can be used to interact with the device and execute certain commands on the device. However, on a normal Android phone, certain locations, such as /data/data
, cannot be accessed. For example, the following the command-line output appears when you try to access /data/data
on a normal device:
C:\Program Files (x86)\Android\android-sdk\platform-tools>adb.exe shell shell@android:/ $ cd /data/data cd /data/data shell@android:/data/data $ ls ls opendir failed, Permission denied
This is because the private data of all the applications is stored in this folder. Thus, the security is enforced by Android. Only the root user has access to this location. Hence, on a rooted device, you will be able to see all the data under this location, as shown in the following commands:
C:\Program Files (x86)\Android\android-sdk\platform-tools>adb.exe shell shell@android:/ # ls /data/data ls /data/data android.googleSearch.googleSearchWidget com.android...