Android root access via ABD
by Antoine - categories : Android OS Security
Even on third-party Android distributions like Calyx, Graphene or Lineage, root access isn't enabled by default.
I recently needed to access an backup an app internal data on my own device. On Android, these can be found on /data/data/com.myappcompany
which is only accessible by the concerned app, meaning that the user is unable to browse it from another application on an unrooted device.
Android Debug Tool allows to browse the device internal memory from a remote desktop, with access restriction on these protected path. Fortunately there is a very simple way to browse it with root.
Browse device from ADB with root
On the phone :
- Enable developer options
- In the devs options, enable USB debugging on the phone
- Still in the devs options, enable rooted debugging
On the remote desktop :
- Connect the Android device through USB
- Install USB drivers for your model (e.g. for Samsung's https://developer.samsung.com/android-usb-driver )
- Download and unzip adb tools somewhere
- We can check that ADB recognizes the phone with the following command (Powershell).
PS C:\Users\User\Desktop\adb> .\adb.exe devices
List of devices attached
RF*******LP device
- Run the following commands in powershell to browse the phone with its default BASH, with root user.
PS C:\Users\User\Desktop\adb> .\adb.exe root
PS C:\Users\User\Desktop\adb> .\adb.exe shell
beyond0lte:/ #
- Use
pull
andpush
commands to transfer data from/to the device.
PS C:\Users\User\Desktop\adb> .\adb.exe pull /data/data/com.myappcompany/ ./com.myappcompany
/data/data/com.myappcompany/: 275 files pulled, 0 skipped. 11.7 MB/s (26798924 bytes in 2.181s)
External links/ressources
- Official ABD documentation https://developer.android.com/tools/adb
Be the first to comment 🡮