Notice that I'm utilizing an android tablet to install the app and then pull the installed apk from there.
First, install the required tools. I'm using Fedora 34 as my main OS so the package manager is yum / dnf for me.
$ sudo yum -d 2 -y install android-tools
Start the adb-server:
$ sudo adb start-server
Once that is finished, enable usb debugging on your android device and plug it in to your computer and authorize the access.
Now, list the packages and grep the application that you want to pull from the device:
$ sudo adb shell pm list packages | grep -ie 'myapp'
The previous command will get you, hopefully, one line of output in the format of 'package:io.myapp.app' which refers to the full name of the installed package. Once you got that, download the file to your local filesystem:
$ sudo adb pull $(sudo adb shell pm path $(sudo adb shell pm list packages | grep -ie 'myapp' | cut -d: -f2) | cut -d: -f2) Downloads/
Since the download was done as root, the permissions are wrong for my user which does not allow me to do much with the file. Let's fix that and rename the apk to something meaningful so that it can be clearly identified:
$ sudo chown -R $(id -u):$(id -g) Downloads/base.apk
$ mv Downloads/base.apk Downloads/io.app.myapp.apk
You can unplug the android device and disable usb debugging since it's not required anymore.
Now repeat the process for enabling usb debugging for your GrapheneOS device. Once your device is listed using 'adb devices', you can install the apk to the GrapheneOS device:
$ sudo adb install Downloads/io.app.myapp.apk
Note that this will only download and install the apk, not guarantee functionality. Also, this is more a write-up to 'download apks for the paranoid'. A lot of the apk download sites are probably safe and secure but I've never gotten an apk file from them which matched the sha256sum from the one I pulled from an actual android device although this behavior might be expected ... I'm not an expert on this.
Feel free to comment and / or suggest a topic.
Comments
Post a Comment