Skip to content

Commit 9e4d76c

Browse files
committed
Update README, add guidelines and code of conduct
Signed-off-by: Abhijeet <98699436+gitclone-url@users.noreply.github.com>
1 parent fbc4792 commit 9e4d76c

File tree

3 files changed

+271
-24
lines changed

3 files changed

+271
-24
lines changed

CODE_OF_CONDUCT.md

Lines changed: 132 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,132 @@
1+
# Contributor Covenant Code of Conduct
2+
3+
## Our Pledge
4+
5+
We as members, contributors, and leaders pledge to make participation in our
6+
community a harassment-free experience for everyone, regardless of age, body
7+
size, visible or invisible disability, ethnicity, sex characteristics, gender
8+
identity and expression, level of experience, education, socio-economic status,
9+
nationality, personal appearance, race, caste, color, religion, or sexual
10+
identity and orientation.
11+
12+
We pledge to act and interact in ways that contribute to an open, welcoming,
13+
diverse, inclusive, and healthy community.
14+
15+
## Our Standards
16+
17+
Examples of behavior that contributes to a positive environment for our
18+
community include:
19+
20+
* Demonstrating empathy and kindness toward other people
21+
* Being respectful of differing opinions, viewpoints, and experiences
22+
* Giving and gracefully accepting constructive feedback
23+
* Accepting responsibility and apologizing to those affected by our mistakes,
24+
and learning from the experience
25+
* Focusing on what is best not just for us as individuals, but for the overall
26+
community
27+
28+
Examples of unacceptable behavior include:
29+
30+
* The use of sexualized language or imagery, and sexual attention or advances of
31+
any kind
32+
* Trolling, insulting or derogatory comments, and personal or political attacks
33+
* Public or private harassment
34+
* Publishing others' private information, such as a physical or email address,
35+
without their explicit permission
36+
* Other conduct which could reasonably be considered inappropriate in a
37+
professional setting
38+
39+
## Enforcement Responsibilities
40+
41+
Community leaders are responsible for clarifying and enforcing our standards of
42+
acceptable behavior and will take appropriate and fair corrective action in
43+
response to any behavior that they deem inappropriate, threatening, offensive,
44+
or harmful.
45+
46+
Community leaders have the right and responsibility to remove, edit, or reject
47+
comments, commits, code, wiki edits, issues, and other contributions that are
48+
not aligned to this Code of Conduct, and will communicate reasons for moderation
49+
decisions when appropriate.
50+
51+
## Scope
52+
53+
This Code of Conduct applies within all community spaces, and also applies when
54+
an individual is officially representing the community in public spaces.
55+
Examples of representing our community include using an official email address,
56+
posting via an official social media account, or acting as an appointed
57+
representative at an online or offline event.
58+
59+
## Enforcement
60+
61+
Instances of abusive, harassing, or otherwise unacceptable behavior may be
62+
reported to the community leaders responsible for enforcement at
63+
[Telegram](https://t.me/PhantomXPain).
64+
All complaints will be reviewed and investigated promptly and fairly.
65+
66+
All community leaders are obligated to respect the privacy and security of the
67+
reporter of any incident.
68+
69+
## Enforcement Guidelines
70+
71+
Community leaders will follow these Community Impact Guidelines in determining
72+
the consequences for any action they deem in violation of this Code of Conduct:
73+
74+
### 1. Correction
75+
76+
**Community Impact**: Use of inappropriate language or other behavior deemed
77+
unprofessional or unwelcome in the community.
78+
79+
**Consequence**: A private, written warning from community leaders, providing
80+
clarity around the nature of the violation and an explanation of why the
81+
behavior was inappropriate. A public apology may be requested.
82+
83+
### 2. Warning
84+
85+
**Community Impact**: A violation through a single incident or series of
86+
actions.
87+
88+
**Consequence**: A warning with consequences for continued behavior. No
89+
interaction with the people involved, including unsolicited interaction with
90+
those enforcing the Code of Conduct, for a specified period of time. This
91+
includes avoiding interactions in community spaces as well as external channels
92+
like social media. Violating these terms may lead to a temporary or permanent
93+
ban.
94+
95+
### 3. Temporary Ban
96+
97+
**Community Impact**: A serious violation of community standards, including
98+
sustained inappropriate behavior.
99+
100+
**Consequence**: A temporary ban from any sort of interaction or public
101+
communication with the community for a specified period of time. No public or
102+
private interaction with the people involved, including unsolicited interaction
103+
with those enforcing the Code of Conduct, is allowed during this period.
104+
Violating these terms may lead to a permanent ban.
105+
106+
### 4. Permanent Ban
107+
108+
**Community Impact**: Demonstrating a pattern of violation of community
109+
standards, including sustained inappropriate behavior, harassment of an
110+
individual, or aggression toward or disparagement of classes of individuals.
111+
112+
**Consequence**: A permanent ban from any sort of public interaction within the
113+
community.
114+
115+
## Attribution
116+
117+
This Code of Conduct is adapted from the [Contributor Covenant][homepage],
118+
version 2.1, available at
119+
[https://www.contributor-covenant.org/version/2/1/code_of_conduct.html][v2.1].
120+
121+
Community Impact Guidelines were inspired by
122+
[Mozilla's code of conduct enforcement ladder][Mozilla CoC].
123+
124+
For answers to common questions about this code of conduct, see the FAQ at
125+
[https://www.contributor-covenant.org/faq][FAQ]. Translations are available at
126+
[https://www.contributor-covenant.org/translations][translations].
127+
128+
[homepage]: https://www.contributor-covenant.org
129+
[v2.1]: https://www.contributor-covenant.org/version/2/1/code_of_conduct.html
130+
[Mozilla CoC]: https://github.com/mozilla/diversity
131+
[FAQ]: https://www.contributor-covenant.org/faq
132+
[translations]: https://www.contributor-covenant.org/translations

CONTRIBUTING.md

Lines changed: 107 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,107 @@
1+
# Contributing to Boot Image Extractor
2+
3+
First off, thanks for taking the time to contribute! ❤️
4+
5+
When contributing to this repository, please first discuss the change you wish to make with the owner of this repository via [Telegram](https://t.me/PhantomXPain). Your help is greatly appreciated. Below are some guidelines to help you get started.
6+
7+
All types of contributions are encouraged and valued. See the [Table of Contents](#table-of-contents) for different ways to help and details about how this project handles them. Please make sure to read the relevant section before making your contribution.
8+
9+
> And if you like the project, but just don't have time to contribute, that's fine. There are other easy ways to support the project and show your appreciation, which we would also be very happy about:
10+
> - Star the project
11+
> - Tweet about it
12+
> - Refer this project in your project's readme
13+
> - Mention the project at local meetups and tell your friends/colleagues
14+
15+
## Table of Contents
16+
- [How Can I Contribute?](#how-can-i-contribute)
17+
- [Reporting Bugs](#reporting-bugs)
18+
- [Suggesting Enhancements](#suggesting-enhancements)
19+
- [Submitting Pull Requests](#submitting-pull-requests)
20+
- [Code Style](#code-style)
21+
- [Community Guidelines](#community-guidelines)
22+
- [Contact](#contact)
23+
24+
## How Can I Contribute?
25+
26+
### Reporting Bugs
27+
28+
If you encounter any bugs, please help us improve Boot Image Extractor by reporting them. Before creating a bug report, please check if an existing issue already addresses your concern.
29+
30+
#### Before Submitting a Bug Report
31+
32+
A good bug report shouldn't leave others needing to chase you up for more information. Therefore, we ask you to investigate carefully, collect information and describe the issue in detail in your report. Please complete the following steps in advance to help us fix any potential bug as fast as possible.
33+
34+
- Make sure that you are using the latest version.
35+
- Determine if your bug is really a bug and not an error on your side (e.g., using incompatible environment components/versions). Make sure that you have read the [documentation](). If you are looking for support, you might want to check [this section](#contact).
36+
- To see if other users have experienced (and potentially already solved) the same issue, check if there is an existing bug report for your issue in the [bug tracker](https://github.com/gitclone-url/Boot-image-Extractor/issues?q=label%3Abug).
37+
- Search the internet (including Stack Overflow) to see if users outside of the GitHub community have discussed the issue.
38+
- Collect information about the bug:
39+
- Stack trace (Traceback)
40+
- OS, Platform, and Version (Windows, Linux, macOS, x86, ARM)
41+
- Version of the interpreter, compiler, SDK, runtime environment, package manager, depending on what seems relevant.
42+
- Possibly your input and the output
43+
- Can you reliably reproduce the issue? And can you also reproduce it with older versions?
44+
45+
To report a bug:
46+
1. Open an issue on the [GitHub Issues page](https://github.com/gitclone-url/Boot-image-Extractor/issues).
47+
2. Select the bug report template.
48+
3. Read the instructions carefully and fill out the template with as much detail as possible.
49+
4. Submit the issue and wait for support.
50+
51+
### Suggesting Enhancements
52+
53+
Enhancement suggestions are tracked as [GitHub issues](https://github.com/gitclone-url/Boot-image-Extractor/issues).
54+
55+
1. Open an issue on the [GitHub Issues page](https://github.com/gitclone-url/Boot-image-Extractor/issues).
56+
2. Use a **clear and descriptive title** for the issue to identify the suggestion.
57+
3. Provide a **step-by-step description of the suggested enhancement** in as many details as possible.
58+
4. **Describe the current behavior** and **explain which behavior you expected to see instead** and why. At this point you can also tell which alternatives do not work for you.
59+
5. **Explain why this enhancement would be useful** to most Boot Image Extractor users. You may also want to point out other projects that solved it better and which could serve as inspiration.
60+
6. Include any relevant examples or code snippets if applicable.
61+
62+
### Submitting Pull Requests
63+
64+
To make a code contribution, follow these steps:
65+
66+
1. **Fork the Repository**: Fork the repository by clicking the "Fork" button at the top right of the [repository page](https://github.com/gitclone-url/Boot-image-Extractor).
67+
68+
2. **Create a Branch**: Create a new branch for your work:
69+
```bash
70+
git checkout -b your-branch-name
71+
```
72+
73+
3. **Make Changes**: Make your changes to the code. Ensure your changes adhere to the project's [code style](#code-style).
74+
75+
4. **Commit Your Changes**: Commit your changes with a clear and concise message:
76+
```bash
77+
git commit -m "Description of the changes made"
78+
```
79+
80+
5. **Push to the Branch**: Push your changes to your forked repository:
81+
```bash
82+
git push origin your-branch-name
83+
```
84+
85+
6. **Submit a Pull Request**: Go to the original repository and [create a pull request](https://github.com/gitclone-url/Boot-image-Extractor/pulls) from your forked repository. Include a clear title and description of your changes.
86+
87+
Your pull request will be reviewed, and feedback will be provided. Please be responsive to any requested changes or questions.
88+
89+
## Code Style
90+
91+
- Follow [PEP 8](https://www.python.org/dev/peps/pep-0008/) for Python code style.
92+
- Use meaningful variable names.
93+
- Write docstrings for all functions and classes.
94+
- Ensure your code is well-documented and readable.
95+
- Format your code using tools like `black` or `flake8` to maintain consistency.
96+
97+
## Community Guidelines
98+
99+
1. Be respectful and considerate in all interactions.
100+
2. Provide constructive feedback and help others when possible.
101+
3. Follow the [Code of Conduct](CODE_OF_CONDUCT.md) to maintain a positive and inclusive community.
102+
103+
## Contact
104+
105+
If you have any questions or need further assistance, please contact the repository owner via [Telegram](https://t.me/PhantomXPain).
106+
107+
Thank you for contributing to Boot Image Extractor! Your efforts help make this project better for everyone 😉.

README.md

Lines changed: 32 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -1,67 +1,75 @@
11
# Boot Image Extractor
22

3-
Boot Image Extractor is a standalone Python script designed to extract the boot image from Android devices with root access. It supports both single and dual-slotted devices. This script was developed as part of an automated method for extracting boot images described in the [Boot Image Extraction Guide](https://gist.github.com/gitclone-url/a1f693b64d8f8701ec24477a2ccaab87#file-boot-image-extraction-guide-md).
3+
Boot Image Extractor is a standalone Python script designed to extract the boot image from Android devices with root access. It supports both [A/B](https://source.android.com/devices/tech/ota/ab) and [legacy partition](https://source.android.com/devices/bootloader/partitions) styles. This script was developed as part of an automated method for extracting boot images described in the [Boot Image Extraction Guide](https://gist.github.com/gitclone-url/a1f693b64d8f8701ec24477a2ccaab87#file-boot-image-extraction-guide-md).
44

55
## Requirements
66

7-
- Python 3.x
8-
- Pyfiglet library
7+
- Python 3 or higher
98
- Root access on the Android device
9+
- Python package: `pyfiglet`
1010

1111
## Installation Instructions
1212

13-
### Procedure 1: Direct Installation
13+
#### Procedure 1: Direct Installation
1414

15-
1. Run the following command in your terminal:
16-
17-
```bash
18-
apt update && yes | apt upgrade -y && apt install tsu curl python -y && pip install pyfiglet && curl -o boot_image_extractor.py https://raw.githubusercontent.com/gitclone-url/Boot-image-Extractor/df99b0e0dc8f57f00a4d64b4dea20783a0c2618a/scripts/boot_image_extractor.py && sudo python boot_image_extractor.py
19-
```
15+
1. Download [Termux](https://termux.com/) and install it.
16+
2. Open Termux and allow storage permission using:
17+
```bash
18+
termux-setup-storage
19+
```
20+
3. If you going to use this script on a [Phh-based GSI](https://github.com/phhusson/treble_experimentations/wiki/Frequently-Asked-Questions-%28FAQ%29) that ships with an inbuilt [superuser](https://github.com/phhusson/treble_experimentations/wiki/Frequently-Asked-Questions-%28FAQ%29#naming-conventions-that-some-gsi-buildermaintainer-uses) check if the PHH Superuser app is installed by running:
21+
```bash
22+
(pm list packages | grep me.phh.superuser) && echo "Found" || echo "Not found"
23+
```
24+
> **Note:** If "Not found" is displayed, install the app from [F-Droid](https://f-droid.org/en/packages/me.phh.superuser/). This app is essential to manage root access for Termux. Skip this step if your device is already rooted with Magisk or a other method.
2025
21-
This command will download the script, install necessary dependencies, and execute it directly.
26+
4. Grant superuser permission to Termux by typing:
27+
```bash
28+
su
29+
```
30+
5. Copy and paste the following command and hit enter to start running the script:
31+
```bash
32+
apt update && apt upgrade -y; { command -v tsu && command -v curl && command -v python && command -v pip && python -c 'import pyfiglet' &>/dev/null; } || apt install -y tsu curl python; pip install pyfiglet; curl -s https://raw.githubusercontent.com/gitclone-url/Boot-img-flasher/Master/boot-img-flasher.sh -o boot-img-flasher.sh; clear; sudo boot_image_extractor.py
33+
```
34+
> **Note:** It may take some time to run for the first time because the script will be downloaded along with the required tools. Please be patient.
2235
23-
### Procedure 2: Manual Installation
36+
#### Procedure 2: Manual Installation
2437

25-
1. Clone the repository or download the zip file from [GitHub](https://github.com/gitclone-url/Boot-image-Extractor/archive/refs/heads/Master.zip).
38+
1. Clone the repository or download the zip file from [GitHub](https://github.com/gitclone-url/Boot-image-Extractor/archive/refs/heads/master.zip).
2639

2740
2. Install Python if not already installed on your terminal:
28-
2941
```bash
3042
pkg install python -y
3143
```
3244

33-
3. Install tsu using the following command:
34-
45+
3. Install `tsu` using the following command:
3546
```bash
3647
pkg install tsu
3748
```
3849

3950
4. Navigate to the cloned or extracted directory and run the command:
40-
4151
```bash
4252
pip install .
4353
```
44-
45-
This will install the boot image extractor script system-wide on your terminal.
54+
This will install the Boot Image Extractor script on your terminal and make it accessible system-wide.
4655

4756
## Usage Instructions
4857

49-
This script can be executed from any directory using the following command only if you have used the manual installation method
50-
58+
After installation, you can execute the script using the following command:
5159
```bash
52-
sudo python boot_image_extractor.py
60+
sudo boot_image_extractor.py
5361
```
5462

55-
Otherwise, for direct installation, you have to navigate to the directory containing the script and execute it.
63+
If you used the direct installation method and the script was downloaded to a different directory instead of Termux's `$HOME` directory, you may need to change the directory to where the script is located before running it.
5664

5765
## Contribution
5866

59-
Contributions to the Boot Image Extractor are welcome. Please fork the repository, make your modifications, and submit a pull request.
67+
Contributions to the Boot Image Extractor are welcome. Please fork the repository, make your modifications, and submit a pull request. For detailed guidelines, see our [Contributing Guidelines](CONTRIBUTING.md).
6068

6169
## License
6270

6371
This script is distributed under the terms of the [MIT License](LICENSE).
6472

6573
## Support
6674

67-
For any issues or inquiries, please open an issue on the repository's issue tracker or contact the developer via [Telegram](https://t.me/PhantomXPain).
75+
For any issues or inquiries, please open an issue on the repository's [issue tracker](https://github.com/gitclone-url/Boot-image-Extractor/issues) or contact the developer via [Telegram](https://t.me/PhantomXPain).

0 commit comments

Comments
 (0)