Skip to content

Commit

Permalink
🎉 First relased Sun Jul 11 04:48:01 PM IST 2021
Browse files Browse the repository at this point in the history
  • Loading branch information
ASHWIN990 committed Jul 11, 2021
1 parent 6416c9b commit 5feb0d0
Show file tree
Hide file tree
Showing 7 changed files with 136 additions and 15 deletions.
82 changes: 80 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,81 @@
# app-manager (CLI)
Manage Android application in Linux (CLI)
<h1 align="center">app-manager</h1>

<div align="center" markdown="1">

[![License: GPL v3](https://img.shields.io/badge/License-GPLv3-blue.svg)](https://www.gnu.org/licenses/gpl-3.0)
[![Maintenance](https://img.shields.io/badge/Maintained%3F-yes-green.svg)](https://gitHub.com/ASHWIN990/app-manager/graphs/commit-activity)
[![made-with-bash](https://img.shields.io/badge/-Made%20with%20Bash-1f425f.svg?logo=image%2Fpng%3Bbase64%2CiVBORw0KGgoAAAANSUhEUgAAABgAAAAYCAYAAADgdz34AAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAyZpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw%2FeHBhY2tldCBiZWdpbj0i77u%2FIiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8%2BIDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuNi1jMTExIDc5LjE1ODMyNSwgMjAxNS8wOS8xMC0wMToxMDoyMCAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvIiB4bWxuczp4bXBNTT0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL21tLyI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1zG%2Fu5uGH4swzd561F%2BuhIT4%2BLnSuPsv9%2BJKIpjNr9dXYOyk7%2FBZrcjIT4eCnoKgedJP4BEqhG77E3NKP31FO7cfQA5K0dSYuLgz2TwCWJSOBzG6crzKK%2BohNfni%2Bx6OMUMMNe%2Fgf7ocbw0v0acKg6J8Ql0q%2BT%2FAXR5PNi5dz9c71upuQqCKFAD%2BYhrZLEAmpodaHO3Qy6TI3NhBpbrshGtOWKOSMYwYGQM8nJzoFJNxP2HjyIQho4PewK6hBktoDcUwtIln4PjOWzflQ%2Be5yl0yCCYgYikTclGlxadio%2BBQCSiW1UXoVGrKYwH4RgMrjU1HAB4vR6LzWYfFUCKxfS8Ftk5qxHoCUQAUkRJaSEokkV6Y%2F%2BJUOC4hn6A39NVXVBYeNP8piH6HeA4fPbpdBQV5KOx0QaL1YppX3Jgk0TwH2Vg6S3u%2BdB91%2B%2FpuNYPYFl5uP5V7ZqvsrX7jxqMXR6ff3gCQSTzFI0a1TX3wIs8ul%2Bq4HuWAAiM39vhOuR1O1fQ2gT%2F26Z8Z5vrl2OHi9OXZn995nLV9aFfS6UC9JeJPfuK0NBohWpCHMSAAsFe74WWP%2BvT25wtP9Bpob6uGqqyDnOtaeumjRu%2ByFu36VntK%2FPA5umTJeUtPWZSU9BCgud661odVp3DZtkc7AnYR33RRC708PrVi1larW7XwZIjLnd7R6SgSqWSNjU1B3F72pz5TZbXmX5vV81Yb7Lg7XT%2FUXriu8XLVqw6c6XqWnBKiiYU%2BMt3wWF7u7i91XlSEITwSAZ%2FCzAAHsJVbwXYFFEAAAAASUVORK5CYII%3D)](https://www.gnu.org/software/bash/)
<!-- [![Hits](https://hits.seeyoufarm.com/api/count/incr/badge.svg?url=https%3A%2F%2Fgithub.com%2FASHWIN990%2Fapp-manager&count_bg=%2379C83D&title_bg=%23555555&icon=&icon_color=%23E7E7E7&title=Hits&edge_flat=false)](https://ashwini.codes) -->

</div>

<h3 align="center">Manage Android application in GNU/Linux (CLI) 🖥️</h3>

<p markdown="1">

**app-manager** is a BASH Script to handle ***Android Application*** from the fancy of your terminal screen, i got the idea of it when i wanted to disable some non uninstallable *bloatware* so i had to take the help of *ADB* and it worked great and now i'm shraing this to all.

</p>


## Funtions

```
1. Get Device Detail
2. Uninstall Application
3. Install Application 'apk'
4. Disable Application
5. Enable Application
6. List Applications (Multiple)
6.1. List All Application
6.2. List Enabled Application
6.3. List Disabled Application
6.4. List System Application
6.5. List Third Party Application
```

## Installation

```bash
git clone https://github.com/ASHWIN990/app-manager.git

cd app-manager

sudo chmod +x app-manager
```

## Usage

```bash
# Go to the directory where you cloned the app-manager repo

./app-manager

# or you can do

bash app-manager
```


## Screenshots

<p align="center">
<img src="./screenshot/am.png"></img>
<img src="./screenshot/la.png"></img>
</p>


## Contributing

Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.


## Support Me

<a href="https://www.buymeacoffee.com/ashwinisahu" target="_blank"><img src="https://www.buymeacoffee.com/assets/img/custom_images/orange_img.png" alt="Buy Me A Coffee" style="height: 41px !important;width: 174px !important;box-shadow: 0px 3px 2px 0px rgba(190, 190, 190, 0.5) !important;-webkit-box-shadow: 0px 3px 2px 0px rgba(190, 190, 190, 0.5) !important;" ></a>


## Author

- **ASHWINI SAHU** - _WHOLE WORK_ - (https://github.com/ASHWIN990)
67 changes: 56 additions & 11 deletions app-manager.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,19 +3,63 @@
#Tool = app-manager
#Version = 0.1
#Author = ASHWINI SAHU
#GitHub = ASHWIN990
#Date = 10/07/2021
#Written in Bash

# Usage and Help Documentaion.
function usage() {
echo "Help"

cat << "EOF"
app-manager - Manage Android application in Linux (CLI)

USAGE :-
app-manager [options]
OPTIONS :-
-s, --serial <Serial No.> Pass the serial number of device.
-h, --help Print the Help message.
EOF
}

# Usage and Help Documentaion.
function usage_full() {

cat << "EOF"
app-manager - Manage Android application in Linux (CLI)

USAGE :-
app-manager [options]
OPTIONS :-
-s, --serial <Serial No.> Pass the serial number of device.
-h, --help Print the Help message
Functions :-
1. Get Device Detail
2. Uninstall Application
3. Install Application 'apk'
4. Disable Application
5. Enable Application
6. List Applications (Multiple)
6.1. List All Application
6.2. List Enabled Application
6.3. List Disabled Application
6.4. List System Application
6.5. List Third Party Application
EOF
}

# Checking if help agrument is passed or not.
for i in "$@"; do
if [[ $i == "-h" ]] || [[ $i == "--help" ]]; then
if [[ $i == "-h" ]]; then
usage
exit 0
elif [[ $i == "--help" ]]; then
usage_full
exit 0
fi
done

Expand Down Expand Up @@ -109,7 +153,7 @@ for ((i = 1; i <= $#; i++)); do
j=$((i + 1))

if [[ "${!i}" == "-s" ]] || [[ "${!i}" == "--serial" ]]; then
if [[ "${!j}" == "" ]]; then
if [[ -z "${!j}" ]]; then
echo -e "\n\e[1;91mError : \e[0mNo Serial no. passed.\e[0m\n"
echo -e "\e[32mUse\e[0m : -s <serial no> or --help\e[0m"
exit 1
Expand Down Expand Up @@ -181,7 +225,7 @@ function option_2() {

read -rp $'\e[1;93m\nEnter the package name to uninstall : \e[21;92m' uninstall_pkg

if [ "$uninstall_pkg" == "" ]; then
if [ -z "$uninstall_pkg" ]; then
echo -e "\n\e[1;91mError : \e[0mNo package name was provided\e[0m"
exit 1
else
Expand Down Expand Up @@ -215,7 +259,7 @@ function option_3() {

read -rp $'\e[1;93m\nEnter the path of the apk file : \e[21;92m' apk_file_paths

if [ "$apk_file_paths" = "" ]; then
if [ -z "$apk_file_paths" ]; then
echo -e "\n\e[1;91mError : \e[0mNo apk was provided\e[0m"
exit 1
else
Expand All @@ -234,7 +278,7 @@ function option_3() {
function option_4() {

read -rp $'\e[1;93m\nEnter the package name to disable : \e[21;92m' disable_pkg
if [ "$disable_pkg" == "" ]; then
if [ -z "$disable_pkg" ]; then
echo -e "\n\e[1;91mError : \e[0mNo package was provided\e[0m"
exit 1
else
Expand All @@ -254,7 +298,7 @@ function option_4() {
function option_5() {

read -rp $'\e[1;93m\nEnter the package name to enable : \e[21;92m' enable_pkg
if [ "$enable_pkg" == "" ]; then
if [ -z "$enable_pkg" ]; then
echo -e "\n\e[1;91mError : \e[0mNo package was provided\e[0m"
exit 1
else
Expand Down Expand Up @@ -293,7 +337,8 @@ function list_application() {
counter="1"
while read -r line; do
set "$line"
echo "$counter : ${1#*:}" counter=$((counter + 1)) >>"$temp_file2"
echo "$counter : ${1#*:}" >>"$temp_file2"
counter=$((counter + 1))
done <"$temp_file1"

$LESS -R "${temp_file2}" # Displaying all the apps
Expand Down Expand Up @@ -463,7 +508,7 @@ function list_application() {
break
;;
[Ee]*)
echo -e "\n\e[1;93mWarning : \e[0mExiting.....\n"
echo -e "\n\e[1;93mWarning : \e[0mExiting....."
break
exit 0
;;
Expand Down Expand Up @@ -522,7 +567,7 @@ function option_picker() {
break
;;
[Ee]*)
echo -e "\n\e[1;93mWarning : \e[0mExiting.....\n"
echo -e "\n\e[1;93mWarning : \e[0mExiting....."
break
exit 0
;;
Expand Down Expand Up @@ -550,4 +595,4 @@ function main() {

#### Calling the main function ####

main
main
2 changes: 0 additions & 2 deletions launcher

This file was deleted.

Binary file added screenshot/am.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added screenshot/am1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added screenshot/la.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added screenshot/la1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 5feb0d0

Please sign in to comment.