Skip to content

Commit

Permalink
Merge pull request #5 from hapi-robo/devel
Browse files Browse the repository at this point in the history
Devel
  • Loading branch information
r-oung authored Aug 18, 2020
2 parents e776798 + 67621f4 commit c8a70bb
Show file tree
Hide file tree
Showing 2 changed files with 40 additions and 26 deletions.
64 changes: 39 additions & 25 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,50 +19,48 @@ sudo apt install aapt


## TL;DR
Clone the repository and update submodules:
Clone the repository:
```
git clone https://github.com/ray-hrst/temi-shortcut.git
git clone https://github.com/hapi-robo/temi-shortcut.git
cd temi-shortcut/
```

Get the APK's `package-name`:
```
./package_name.sh <apk>
```

This will output the APK's `package-name`, which is used in the following:
Create shortcut:
```
./shortcut.sh <package-name> <shortcut-name>
```

For example, to create a shortcut for Chrome:
```
$ ./package_name.sh chrome.apk
com.android.chrome
$ ./shortcut.sh com.android.chrome "Chrome"
./shortcut.sh com.android.chrome "Chrome"
```

The file `chrome_shortcut.apk` should then appear in the same directory.


## Usage
### package_name.sh
Returns an APK's the package-name.
The file `chrome_shortcut.apk` should then appear in the same directory. Install it onto your device, along with the package that it links to. For this example:
```
adb install chrome.apk
adb install chrome_shortcut.apk
```
usage: package_name.sh <apk>
Returns the APK's package-name

dependencies:
### APK Package-Name
If the APK is already installed on the device, you can look for it using:
```
adb shell pm list packages
```

This script depends on having the Android-SDK installed and having the
the ANDROID_HOME environment variable set appropriately.
If the package is on your computer, you can run the following script:
```
./package_name.sh <apk>
```

positional arguments:

apk APK filename (.apk)
## Dependencies
Scripts in this repository require the Android SDK, which is included in [Android Studio](https://developer.android.com/studio/). Once installed, export the SDK's path to the `ANDROID_HOME` environment variable, for example:
```
export ANDROID_HOME=/path/to/Android/Sdk/
```


## Usage
### shortcut.sh
Creates an APK (visible on temi's Launcher) that launches another APK. This can be used to run APKs that are hidden from temi's Launcher.
```
Expand All @@ -82,3 +80,19 @@ positional arguments:
a name with whitespace.
```

### package_name.sh
Returns an APK's package-name.
```
usage: package_name.sh <apk>
Returns the APK's package-name
dependencies:
This script depends on having the Android-SDK installed and having the
the ANDROID_HOME environment variable set appropriately.
positional arguments:
apk APK filename (.apk)
```
2 changes: 1 addition & 1 deletion template/app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -30,5 +30,5 @@ dependencies {

// temi
// https://github.com/robotemi/sdk
implementation 'com.robotemi:sdk:0.10.55'
implementation 'com.robotemi:sdk:0.10.65'
}

0 comments on commit c8a70bb

Please sign in to comment.