mirror of https://github.com/YTVanced/Vanced
Add Guides
This commit is contained in:
parent
99da8a0079
commit
44889d6f12
|
@ -0,0 +1,56 @@
|
||||||
|
# Creating A Logcat
|
||||||
|
|
||||||
|
In this guide you will learn how to create a logcat to help app developers fix bugs
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## About Logcat
|
||||||
|
|
||||||
|
Logcat is a command line tool that dumps Android system logs, including stuff like errors or warnings.
|
||||||
|
|
||||||
|
These logs are very important to figure out what's going wrong!
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## Prerequisites
|
||||||
|
|
||||||
|
### You will need
|
||||||
|
|
||||||
|
- EITHER a PC with adb set up - A guide to do this can be found [here](./SettingUpAdb.md)
|
||||||
|
- OR a rooted phone
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## Creating a logcat
|
||||||
|
|
||||||
|
There are two ways to create a logcat. Either via a pc and adb or via a terminal on your Phone, but this requires root.
|
||||||
|
|
||||||
|
You can technically create a logcat with only your phone and no root, but this will only include limited info so it is not very useful!
|
||||||
|
|
||||||
|
### Creating a logcat using adb on your PC
|
||||||
|
|
||||||
|
- Run the following adb command. Unless you added adb to PATH, add a `.\` before the command. Having issues? Check the [Guide](./SettingUpAdb.md#Getting%20started%20using%20adb)
|
||||||
|
|
||||||
|
```bash
|
||||||
|
adb shell logcat -c
|
||||||
|
adb shell logcat *:W > logcat.txt
|
||||||
|
```
|
||||||
|
|
||||||
|
- If this prints nothing and just freezes your terminal, perfect! That means it's working
|
||||||
|
- Now just do whatever is needed to cause the issue on your phone
|
||||||
|
- Once that is done, simply press CTRL+C or close the terminal to stop the logcat
|
||||||
|
- Your logcat can be found in the adb folder as logcat.txt
|
||||||
|
|
||||||
|
### Creating a logcat using a rooted Android
|
||||||
|
|
||||||
|
- First you need a Terminal. I recommend [Termux](https://play.google.com/store/apps/details?id=com.termux)
|
||||||
|
- Open it up and run the following command
|
||||||
|
|
||||||
|
```bash
|
||||||
|
su -c "logcat -c && logcat *:W > /sdcard/logcat.txt"
|
||||||
|
```
|
||||||
|
|
||||||
|
- Grant root if prompted
|
||||||
|
- Now just do whatever is needed to cause the issue on your phone
|
||||||
|
- Once that is done, simply press CTRL+C or close the terminal to stop the logcat
|
||||||
|
- Your logcat can be found at /sdcard/logcat.txt which is the root of your file system where there's also stuff like your Download folder
|
|
@ -0,0 +1,9 @@
|
||||||
|
# Vanced Guides
|
||||||
|
|
||||||
|
This folder contains all sorts of guides which might come in handy when dealing with Vanced or Android
|
||||||
|
|
||||||
|
Just search through the files and open the one you need and you'll be greeted with a similar interface to the one you're reading right now
|
||||||
|
|
||||||
|
## Contributors
|
||||||
|
|
||||||
|
- [Vendicated](https://github.com/Vendicated)
|
|
@ -0,0 +1,99 @@
|
||||||
|
# Setting Up adb
|
||||||
|
|
||||||
|
In this guide you will learn how to set up adb
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## About adb
|
||||||
|
|
||||||
|
adb (Android Debug Bridge) is a command line tool that lets you communicate with your Android device from your PC.
|
||||||
|
|
||||||
|
It has a bunch of useful features like installing/uninstalling apps, collecting system logs from your phone and debugging apps.
|
||||||
|
|
||||||
|
It is an official Android sdk tool developed by Google, so it is completely safe to download and use!
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## Prerequisites
|
||||||
|
|
||||||
|
### You will need
|
||||||
|
|
||||||
|
- PC (Windows/Mac/Linux)
|
||||||
|
- USB cable to connect your phone to your PC
|
||||||
|
- IQ higher than 70
|
||||||
|
|
||||||
|
### Enabling USB Debugging on your phone
|
||||||
|
|
||||||
|
In order to debug your phone with adb you first have to allow it. To do so, simply do the following steps on your phone:
|
||||||
|
|
||||||
|
- Enable Developer Options. You can do so by going to `Settings > About Phone` and tapping Build Number 7 times
|
||||||
|
- Now go to `Settings > System > Developer options` and enable USB Debugging
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## Installing adb
|
||||||
|
|
||||||
|
Now on your PC:
|
||||||
|
|
||||||
|
- [Download adb](https://developer.android.com/studio/releases/platform-tools). Save it to wherever you want, it doesn't matter!
|
||||||
|
- Go to the folder you downloaded it to and extract the zip
|
||||||
|
|
||||||
|
Congratulations! You're all set and ready to use adb!
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## Getting started using adb
|
||||||
|
|
||||||
|
### Open the adb folder in a terminal
|
||||||
|
|
||||||
|
- EITHER right click the folder and click `Open in Powershell / Open command prompt here / whatever`
|
||||||
|
- OR open a terminal manually and change directory to the adb folder with `cd PathToFullFolder` like `cd C:\Users\Ven\Downloads\adb` or `cd /home/ven/Downloads/adb`
|
||||||
|
|
||||||
|
### Now you can execute adb commands via:
|
||||||
|
|
||||||
|
- Windows: `.\adb myCommand`
|
||||||
|
- Linux: `./adb myCommand`
|
||||||
|
|
||||||
|
Make sure your phone is connected to your PC and unlocked!
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## Let's test it!
|
||||||
|
|
||||||
|
- Unlock your phone and connect it to your PC
|
||||||
|
- Run `.\adb devices` or `./adb devices` depending on your Os
|
||||||
|
- If everything is okay, you should now get a popup on your Phone whether you want to allow USB Debugging. Select yes
|
||||||
|
- Your Terminal should print something like
|
||||||
|
|
||||||
|
```bash
|
||||||
|
List of devices attached
|
||||||
|
576OPB01 device
|
||||||
|
```
|
||||||
|
|
||||||
|
## Advanced - Adding adb to path for easier access
|
||||||
|
|
||||||
|
path is a variable that exists on all operating systems. It tells your terminal where to look for programs so you don't have to be in that program's directory all the time.
|
||||||
|
|
||||||
|
By adding adb to your path you can execute it from anywhere by simply typing `adb`. Doing so is very simple actually!
|
||||||
|
|
||||||
|
### Adding adb to your path on Windows
|
||||||
|
|
||||||
|
- Open the app search bar
|
||||||
|
- Search for env and choose `Edit the system environment variables`
|
||||||
|
- Click the Environment Variables button
|
||||||
|
- Under System Variables in the second half find PATH and click on edit
|
||||||
|
- Click New and paste the full path to the adb folder
|
||||||
|
|
||||||
|
Next time you start a terminal you can just run `adb` and it will know where to look!
|
||||||
|
|
||||||
|
### Adding adb to your path on Linux or Mac
|
||||||
|
|
||||||
|
- Open a terminal
|
||||||
|
- Find out which shell you're using via `echo $SHELL`
|
||||||
|
- Run the appropriate command for your shell:
|
||||||
|
- zsh -> `echo "export PATH=/FULL/PATH/TO/ADB/FOLDER:$PATH" >> ~/.zshrc`
|
||||||
|
- bash -> `echo "export PATH=/FULL/PATH/TO/ADB/FOLDER:$PATH" >> ~/.bash_profile`
|
||||||
|
- Make sure you replace `/FULL/PATH/TO/ADB/FOLDER` with the actual path
|
||||||
|
- Example with my setup: `echo "export PATH=/home/ven/Downloads/adb:$PATH" >> ~/.zshrc`
|
||||||
|
|
||||||
|
Next time you start a terminal you can just run `adb` and it will know where to look!
|
|
@ -54,6 +54,8 @@ ___
|
||||||
|
|
||||||
Useful guides like how to set up adb or how to create a logcat can be found [here](./Guides)
|
Useful guides like how to set up adb or how to create a logcat can be found [here](./Guides)
|
||||||
|
|
||||||
|
___
|
||||||
|
|
||||||
## Contributors
|
## Contributors
|
||||||
|
|
||||||
- [gghhkm](https://github.com/gghhkm)
|
- [gghhkm](https://github.com/gghhkm)
|
||||||
|
|
Loading…
Reference in New Issue