-
-
Save JasonC761/510df93a0dddfd94fb65e92ab4bc090d to your computer and use it in GitHub Desktop.
Revisions
-
isti03 revised this gist
Feb 3, 2022 . 1 changed file with 17 additions and 3 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,21 +1,26 @@ Getting ADB (Android Debug Bridge) working on linux can be a bit harder than on other operating systems. This guide aims to help with that. # Installation ## 1. Install the adb package Just use your package manager ## 2. Add yourself to the plugdev group ``` sudo groupadd plugdev sudo usermod -a -G plugdev $USER ``` Then **reboot** ## 3. Enable Usb debugging on your device See https://www.getdroidtips.com/enable-usb-debugging/ ## 4. Connect to your device - Unlock your device - Run the command `adb devices` - Authorize access on a pop-up on your device @@ -25,15 +30,19 @@ See https://www.getdroidtips.com/enable-usb-debugging/ # Snippets ## Enter device shell Use `adb shell` to enter device shell, where you can issue basic Unix and Linux commands. You can use the pm package manager as well. Use the exit command to quit out of the shell. ## Filter packages ```adb shell pm list packages <searched-name>``` ## Remove user installed packages ```adb shell pm uninstall <package-name>``` ## Remove system packages for current user **Warning:** This can cause a bootloop if you uninstall an important system package. Check on the internet, whether the removal of the package is safe. @@ -42,18 +51,23 @@ If you encounter a bootloop, you have to reset your device in the recovery menu. ```adb shell pm uninstall -k --user 0 <package-name>``` ## Reinstall uninstalled system packages If you can still boot your phone up, but you want to reinstall a package, use: ```adb shell cmd package install-existing <package-name>``` ## Copy files or directories ```adb pull remote local``` ```adb push local remote``` ## Install apk from the computer ```adb install program.apk``` ## Port forward and reverse If the server is on the phone: ```adb forward tcp:3000 tcp:3000``` If the server is on the computer: ```adb reverse tcp:3000 tcp:3000``` -
isti03 revised this gist
May 2, 2021 . 1 changed file with 7 additions and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -50,4 +50,10 @@ If you can still boot your phone up, but you want to reinstall a package, use: ```adb push local remote``` ## Install apk from the computer ```adb install program.apk``` ## Port forward and reverse If the server is on the phone: ```adb forward tcp:3000 tcp:3000``` If the server is on the computer: ```adb reverse tcp:3000 tcp:3000``` -
isti03 revised this gist
Feb 3, 2021 . 1 changed file with 9 additions and 2 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -34,10 +34,17 @@ Use `adb shell` to enter device shell, where you can issue basic Unix and Linux ```adb shell pm uninstall <package-name>``` ## Remove system packages for current user **Warning:** This can cause a bootloop if you uninstall an important system package. Check on the internet, whether the removal of the package is safe. If you encounter a bootloop, you have to reset your device in the recovery menu. ```adb shell pm uninstall -k --user 0 <package-name>``` ## Reinstall uninstalled system packages If you can still boot your phone up, but you want to reinstall a package, use: ```adb shell cmd package install-existing <package-name>``` ## Copy files or directories ```adb pull remote local``` ```adb push local remote``` -
isti03 created this gist
May 14, 2020 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,46 @@ Getting ADB (Android Debug Bridge) working on linux can be a bit harder than on other operating systems. This guide help in it. # Installation ## 1. Install the adb package Just use your package manager ## 2. Add yourself to the plugdev group ``` sudo groupadd plugdev sudo sudo usermod -a -G plugdev $USER ``` Reboot after this ## 3. Enable Usb debugging on your device See https://www.getdroidtips.com/enable-usb-debugging/ ## 4. Connect to your device - Unlock your device - Run the command `adb devices` - Authorize access on a pop-up on your device - Re-run `adb devices`. You should see your device id, and `device` next to it. - If you get an error, `no permissions (user in plugdev group; are your udev rules wrong?)`, install the `android-udev` package and reboot. # Snippets ## Enter device shell Use `adb shell` to enter device shell, where you can issue basic Unix and Linux commands. You can use the pm package manager as well. Use the exit command to quit out of the shell. ## Filter packages ```adb shell pm list packages <searched-name>``` ## Remove user installed packages ```adb shell pm uninstall <package-name>``` ## Remove system packages for current user **Warning:** This can break your system. Use it with caution! If you broke the system with this command, enter the recovery mode, and reset your device. ```adb shell pm uninstall -k --user 0 <package-name>``` ## Copy files or directories ```adb pull remote local``` ```adb push local remote``` ## Install apk from the computer ```adb install program.apk```