Last active
May 16, 2020 12:18
-
-
Save iniyanmurugavel/96ec3ebb04ac07671638ff5fd1f72b6c to your computer and use it in GitHub Desktop.
Linux command and Shell Useful command for android & SSH Key Generation
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 characters
| // Connect device with android studio using usb mode | |
| Connect your phone to your desktop with usb. | |
| make sure your desktop have the adb utility and a suitable driver for your phone is installed. | |
| adb start-server ; adb devices | |
| ##make sure device is connected. | |
| adb shell pm list packages|grep -i "keyword" | |
| ##get the package full name, eg,my phone will get "package:com.sonyericsson.music" by running in powershell>> | |
| adb shell pm list packages|grep -i music | |
| define the package's path "package:/data/app/com.sonyericsson.music-2/base.apk" by shell>> | |
| adb shell pm path com.sonyericsson.music | |
| find the base.apk file in your working dir after running in shell>> | |
| adb pull /data/app/com.netease.cloudmusic-1/base.apk. | |
| As the other guys say the apk file is actually a zip file, the extracting procedure seems easier. | |
| // Linux commands for android | |
| sudo apt-get install sysinfo // system info | |
| ls -a | grep Android To find android studio | |
| rm -rf ~/.AndroidStudio3.0 // To dlete folder | |
| find ~/ $PWD -name "*.apk" | grep -i "com.kreditbee.android-*.*.apk" // To get all apk | |
| ssh-keygen -t rsa -b 4096 -C "iniyan.m@krazybee.com" | |
| Generating public/private rsa key pair. | |
| Enter file in which to save the key (/home/iniyanm/.ssh/id_rsa): | |
| Enter passphrase (empty for no passphrase): | |
| Enter same passphrase again: | |
| Your identification has been saved in /home/iniyanm/.ssh/id_rsa. | |
| Your public key has been saved in /home/iniyanm/.ssh/id_rsa.pub. | |
| The key fingerprint is: | |
| SHA256:0fqrJOU4+wQLKQNDtaSGzG8HWA/zACEMPJMRaujBg2I iniyan.m@krazybee.com | |
| The key's randomart image is: | |
| +---[RSA 4096]----+ | |
| |**BB | | |
| |@*= B . | | |
| |OEoo o . . | | |
| |*o+ .. o | | |
| | .ooo.. S | | |
| | .o.. * . | | |
| | = + . | | |
| | * . | | |
| | ..o.. | | |
| +----[SHA256]-----+ | |
| iniyanm@FIN-IT-LT-242:~$ Agent pid 59566 | |
| Agent: command not found | |
| iniyanm@FIN-IT-LT-242:~$ ssh-agent -s | |
| SSH_AUTH_SOCK=/tmp/ssh-RZUa0jabV1ie/agent.11519; export SSH_AUTH_SOCK; | |
| SSH_AGENT_PID=11520; export SSH_AGENT_PID; | |
| echo Agent pid 11520; | |
| iniyanm@FIN-IT-LT-242:~$ ssh-add ~/.ssh/id_rsa | |
| iniyanm@FIN-IT-LT-242:~$ cat .ssh/id_rsa.pub | |
| ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAACAQDIbkdi9HKNM0z4k0Sjx0irJIGvz+n/eBRCFcXL4gwof6NtovHfLmLfD7le4i4Vw2xFUwkWVBdPHaR5Msy9viXyyTdKY3hFY5A6r2d/M8KOS08ObmXVeiAQpvPAQCl+z2EOsC5vC/yRQXZky7jQMhTjgpIH6YBNNPlar6vp4VffpwLKCUau8JD/eNzhtMkhgiuKwZz39SXSAOj1lanb3p1bjVr6ZkNcV15TMlVarmTFl6v4S+9e05vp3MScHeSr35PdDnw0K8vjMxJk+WYhfcer/rgZKBrASBA6A8lk5aZDm4ZbCbcT1ZT0In0GF8MK9oXvhYJ+reSx2BFox59Ynq+NwQ5eMCHPXLGuzxzaN+3jGfX/Ueb9DWLUDeb4ZjCEUcN886wO2F6S/ID24XoXTrz5JXpyGPLIezAsfP1zY7t6uFqDIsBGMPHeYDoxtXZ7zrPz29qvj2ft3ixMT9qRDiUecgkmnXOeLfyA/B9ZFIi5aB2+LCN4ixV2KP1QWxoQaUtODODvJqljn4HsB8apcFSKxQJJ0VCyO5rEe8FMZhe2v9V9ZTt585+E+dLU/mEReTIEY4Fo+bIUv1cIyX9LkMOHfYe7NHpoAmqJDAtlRsnjnjLztYRzuQeWabYZ831KmWukSRYH6xD1qXkb6aJn9ubQw0A499m+49P1QxJTFDlxBw== iniyan.m@krazybee.com | |
| // To start an intent action | |
| adb shell am start -W -a android.intent.action.VIEW -d "example://gizmos" | |
| // To find all activity manager current activities | |
| adb dumpsys activity activities | |
| Local devices connection problem resolved | |
| ./gradlew uA | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment