Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/tegraxd/adb-local-file
Managing local file such as SQLite databases, shared preferences, and other files without Android Studio's Device File Explorer is not quite big problem.
https://github.com/tegraxd/adb-local-file
Last synced: 20 days ago
JSON representation
Managing local file such as SQLite databases, shared preferences, and other files without Android Studio's Device File Explorer is not quite big problem.
- Host: GitHub
- URL: https://github.com/tegraxd/adb-local-file
- Owner: TEGRAXD
- Created: 2022-02-16T07:31:27.000Z (almost 3 years ago)
- Default Branch: master
- Last Pushed: 2022-02-16T07:34:51.000Z (almost 3 years ago)
- Last Synced: 2024-11-17T05:36:51.363Z (3 months ago)
- Size: 1000 Bytes
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# ADB - Pulling App Local File without Root Access
According to [Android Studio Developers User Guide](https://developer.android.com/studio/command-line/adb).
\
Android Debug Bridge (adb) is a versatile command-line tool that lets you communicate with a device.
\
The adb command facilitates a variety of device actions, such as installing and debugging apps,
\
and it provides access to a Unix shell that you can use to run a variety of commands on a device.
\
It is a client-server program that includes three components:- A client, which sends commands. The client runs on your development machine. You can invoke a client from a command-line terminal by issuing an adb command.
- A daemon (adbd), which runs commands on a device. The daemon runs as a background process on each device.
- A server, which manages communication between the client and the daemon. The server runs as a background process on your development machine.## Download
`adb` is included inside the Android SDK Platform-Tools package.To download Android SDK Platform-Tools, you need to download [Android SDK Manager](https://developer.android.com/studio/index.html#command-tools).
\
But if you already have `android-sdk` installed by Android Studio, check under your `android-sdk` path to look for `platform-tools` folder.Use `sdkmanager` command through your terminal. An example command : `sdkmanager "platform-tools" "platforms;android-31"`
`sdkmanager` will installs `platform-tools` at android_sdk/platform-tools/.
To quick accessing command, add `.exe`'s folder or bin named folders path to System Environtment Variable.
## Local File
Managing local file such as SQLite databases, shared preferences, and other files without Android Studio's Device File Explorer is not quite a big problem. Here is basic commands of local file that you should know. Commands below can be used without root access.### Commands
- List of devices
```
adb devices
```- Run command to specific devices
```
adb -s
```- Direct command to the only attached USB device
```
adb -d
```
Note: Returns an error when more than one USB device is attached.- Direct command to the only running Emulator
```
adb -e
```
Note: Returns an error when more than one emulator is running.- Checking file and paths
```
adb shell
run-as
ls -l
```
Note: "run-as \" will automatically enter to app's local directory.- Pulling file without root access
```
adb exec-out run-as com.example.app_name cat file.ext > D:/file.ext
```
Note: You will copy "file.ext" out from app's local directory to your PC directory using "exec-out" command. (C:/ Path access needs Terminal as an Administrator)- Deleting file inside app's local dir
```
adb shell "run-as com.example.app_name rm file.ext"
```