-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
9b2da41
commit 7184161
Showing
46 changed files
with
1,597 additions
and
68 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,147 @@ | ||
#+TITLE: Using ADB to Delete Vanadium on GrapheneOS | ||
#+date: 2024-04-27 00:01 | ||
#+HUGO_AUTO_SET_LASTMOD: t | ||
#+hugo_base_dir: ../../ | ||
#+hugo_section: posts | ||
#+HUGO_MENU: :menu "posts" | ||
#+hugo_tags[]: technology, tutorial, adb, android, grapheneos | ||
#+filetags: technology tutorial adb android grapheneos | ||
#+HUGO_CODE_FENCE: | ||
#+EXPORT_FILE_NAME: adb_vanadium.md | ||
#+hugo_front_matter_key_replace: description>summary | ||
#+begin_description | ||
I wanted to delete the system browser app Vanadium on my phone running Grapheneos for productivity and mental health reasons. Do this at your own risk. | ||
#+end_description | ||
|
||
* Preamble | ||
Phone bad. You know it, I know it, everyone and their grandma knows that phone bad. It spys on you, it ruins your attention span, it's crumbling democracy before our very eyes. But I need the phone. I need to run android in order communicate with my closest circle of people through Signal, I need the offline maps, and I need it because my bank is run by dinosaurs and won't let you use otp without their proprietary phone app or SMS (Hmph!). I do not want to go through the hassle of researching the perfect "dumb feature phone" that will allow me to degoogle everything and also have a reasonably up-to-date OS and spend a few hundred bucks just to try it out when I already got a phone less than 2 years ago. | ||
|
||
My needs are very specific but also require some flexibility, with many clashing priorities between security, openness, modularity, and digital minimalism. The perfect combination of all of these priorities in a phone does not exist because smart phones are made for the general consumer and not hobbyists like me because then they wouldn't make any money. If you want to have the modularity of the FairPhone with the minimalism of a flip phone Motorolla and the modern security of a Pixel running degoogled GrapheneOS, it is a very tall order. If a phone can do one of these perfectly, it's a great phone; if it gets two priorities done decently it's an amazing acheivement; a phone with more than two of these done perfectly does not exist. | ||
|
||
All of this is to say that my current smart phone, a Pixel 7 running GrapheneOS, is one that I use somewhat begrudgingly, a necessary occupational hazard for most humans living in the 2020's, the kind of life that I'm living at least. My current phone is pretty minimal: my phone launcher is the highly minimal [[https://github.com/tanujnotes/Olauncher][Olauncher]], no social media other than Discord for school, and I use [[https://molly.im/][Molly-FOSS]] signal client for communcation [[cite:&unknown79_github_olaun;&molly]]. I have been running into one particular issue though which is why I'm writing all of this out: the browser. I will enable the browser to troubleshoot some issue I have that someone has solved on stack overflow or Reddit (search engines be useless), and as soon as you know it I have 20 tabs open on my phone and I've been on Youtube for 2 hours. "How did this happen?" I'll wonder as I disable Vanadium in the settings knowing full well I'll cave in again 2 days later and re-enable it. A few weeks ago I decided to take a bit of a more extreme measure by deleting the default browser system app entirely through the use of Android Debug Bridge (adb) via usb debugging, a command-line tool can be used to communicate with any android device directly [[cite:&android_developers_adb]]. I did all of this without having to root my phone. | ||
|
||
So far it's actually been working pretty well, I have not reinstalled the browser besides doing it for the sake of the guide to see if I could, and I have been wasting less time. I've outlined everything that I did here, and it will be transferable to removing whatever OEM/carrier bloatware is on your device that you wish to get rid of. | ||
|
||
* The Guide | ||
*Warning/Disclaimer*: Using adb on your phone to remove system apps could ruin certain functionality on the device; most Android developers including the ones at GrapheneOS would not suggest removing system apps. While I have not yet had any issues removing the default system browser from my phone, this guide is not responsible for anything here going wrong, it was made with educational intent in mind. | ||
|
||
The following guide assumes you already have following: | ||
- An android phone (this guide uses a Pixel 7 phone with GrapheneOs running android 14) | ||
- A client computer running desktop OS as long as it has ADB installed (guide was tested in a QubesOS sys-usb qube based on the Fedora 39 Linux template) | ||
- Linux/BSD: | ||
- Debian based: ~sudo apt install adb~ | ||
- RHEL based: ~sudo yum install adb~ or ~sudo dnf install adb~ | ||
- Gentoo/portage: ~sudo emerge -a dev-util/android~ | ||
- Alpine: ~sudo apk add adb~ | ||
- Arch based: ~sudo pacman -S android-tools~ | ||
- OpenSUSE: ~sudo zypper install adb~ | ||
- OpenBSD: ~doas pkg_add adb~ | ||
- FreeBSD: ~pkg install android-tools~ | ||
- MacOS | ||
- [[https://dl.google.com/android/repository/platform-tools-latest-darwin.zip][Install Android SDK Platform Tools ZIP]] or | ||
- Use [[https://brew.sh/][homebrew]]: ~brew install android-platform-tools~ | ||
- Windows | ||
- [[https://dl.google.com/android/repository/platform-tools-latest-windows.zip][Install Android SDK Platform Tools ZIP]] or | ||
- Use [[https://learn.microsoft.com/en-us/windows/package-manager/winget/][winget]]: ~winget install adb~ | ||
- A USB-C cable | ||
While this guide was done on Linux, most of the commands will still apply to other operating systems. | ||
** Phone Setup with Developer Mode and USB-debugging | ||
First we will want to enable developer mode on the phone. The steps to do this are assuming you're using a Google Pixel; other android OEMs do this slightly differently, but the idea is essentially the same [[cite:&android_developers_developer_mode]]. Open the Settings app on the Android phone and navigate to About Phone and find the Build number. Tap on the Build Number seven times to enable developer mode, you may be prompted to enter in your pin in order to enable it. | ||
|
||
#+BEGIN_EXPORT html | ||
<figure> | ||
<center> | ||
<img src="/images/blog/android_developer_mode_1.png" width="50%" /><img src="/images/blog/android_developer_mode_2.png" width="50%" /> | ||
<figcaption></figcaption> | ||
</center> | ||
</figure> | ||
#+END_EXPORT | ||
|
||
Once Developer mode you will need to enable USB debugging by going into System > Developer options, scroll down to USB debugging and toggle it [[cite:&android_developers_developer_mode]]. | ||
|
||
#+BEGIN_EXPORT html | ||
<figure> | ||
<center> | ||
<img src="/images/blog/android_usb_debugging_1.png" width="30%" /><img src="/images/blog/android_usb_debugging_2.png" width="30%" /><img src="/images/blog/android_usb_debugging_3.png" width="30%" /> | ||
<figcaption></figcaption> | ||
</center> | ||
</figure> | ||
#+END_EXPORT | ||
|
||
Next we will want to start an adb server which will manage communications between the computer that will forward commands to the phone, and the daemon that runs on the phone to execute those commands [[cite:&android_developers_adb]]. You may want to start your server in root in order to give it permissions. | ||
|
||
#+BEGIN_SRC sh | ||
$ adb start-server | ||
*daemon not running; starting now at tcp:5037 | ||
*daemon started successfully | ||
#+END_SRC | ||
|
||
Next we will need to see if our device is available from completing the previous steps: | ||
|
||
#+BEGIN_SRC sh | ||
$ adb devices | ||
#+END_SRC | ||
|
||
If the device is unauthorized, your phone should prompt to accept an RSA key that allows debbugging from the client computer, otherwise turn usb debugging off and back on again [[cite:&android_developers_adb]]. If it says that there are no permissions it means you must run adb server in root. | ||
|
||
** adb commands to run on PC to uninstall system apps from user | ||
|
||
For the next few steps we will be using the adb shell with the ~pm~ package manager for android. First, we want to find the vanadium browser app: | ||
|
||
#+BEGIN_SRC sh | ||
adb shell pm list packages | grep "vanadium" | ||
#+END_SRC | ||
|
||
There are three main Vanadium apps that GrapheneOS uses: | ||
~app.vanadium.browser~ | ||
~app.vanadium.webview~ | ||
~app.vanadium.config~ | ||
|
||
We will obviously want to remove ~app.vanadium.browser~. Do not remove the other packages as many apps use the hardened WebView rendering to run their apps. ~app.vanadium.config~ is a dependency for ~app.vanadium.webview~ [[cite:&grapheneos_vanadium]]. | ||
|
||
We may want to specify a user of the phone if for example, you are a parent lending your child your phone and have a secondary profile for them to do so. adb allows you to list current user profiles as follows: | ||
|
||
#+BEGIN_SRC sh | ||
adb shell pm list users | ||
#+END_SRC | ||
|
||
Here are my users as an example: | ||
|
||
#+BEGIN_SRC | ||
Users: | ||
UserInfo{0:Owner:4c13} running | ||
UserInfo{10:Work:410} | ||
#+END_SRC | ||
|
||
The user that I want to delete Vanadium for, "Owner", can be specified by the id 0. | ||
|
||
Finally we run the following: | ||
|
||
#+BEGIN_SRC sh | ||
adb shell pm uninstall -k --user 0 app.vanadium.browser | ||
#+END_SRC | ||
|
||
We keep data and cache using the ~-k~ flag in case we want to reinstall the app with its data in tact, and specify user with the ~--user~ flag. | ||
# #+BEGIN_SRC | ||
# uninstall [-k] [--user USER_ID] [--versionCode VERSION_CODE] | ||
# PACKAGE [SPLIT...] | ||
# Remove the given package name from the system. May remove an entire app | ||
# if no SPLIT names specified, otherwise will remove only the splits of the | ||
# given app. Options are: | ||
# -k: keep the data and cache directories around after package removal. | ||
# --user: remove the app from the given user. | ||
# --versionCode: only uninstall if the app has the given version code. | ||
# #+END_SRC | ||
|
||
** adb commands to run on PC to reinstall system apps for user | ||
Since we had previously only techincally removed the vandium browser for a user and did not fuly uninstall it, we can give the removed app back to the user. Execute the following: | ||
|
||
#+BEGIN_SRC | ||
$ adb shell pm install-existing app.vanadium.browser | ||
Package app.vanadium.browser installed for user: 0 | ||
#+END_SRC | ||
|
||
That's it! Enjoy adb! | ||
|
||
* References | ||
[[bibliography:../../references.bib]] |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
#+TITLE: Eclipse Sun Worm | ||
#+date: 2024-04-27 | ||
#+hugo_base_dir: ../../ | ||
#+HUGO_AUTO_SET_LASTMOD: t | ||
#+hugo_section: posts | ||
#+HUGO_MENU: :menu "posts" | ||
#+filetags: eclipse | ||
#+HUGO_CODE_FENCE: | ||
#+EXPORT_FILE_NAME: eclipse_2024_part2.md | ||
#+hugo_front_matter_key_replace: description>summary | ||
#+begin_description | ||
My very bad photos of the eclipse brought us an accidental masterpiece. | ||
#+end_description | ||
|
||
Only posting this multiple weeks post eclipse because exams were rolling around and I was super busy. Eclipse was super cool, the clouds didn't block the eclipse so I was not sad. I actually wasn't expecting the sharp change to darkness between 99.9% eclipse and totality, and then how much brighter mere seconds after the full eclipse was over. I took some photos with my phone covered by my eclipse glasses and none of them were particularly "good", but one photo that I took by accident at around 95-99% eclipse was at least interesting. | ||
|
||
#+BEGIN_EXPORT html | ||
<figure> | ||
<center> | ||
<img src="/images/blog/sun_worm.jpg" width="50%" /><img src="/images/blog/sun_worm_cropped.jpg" width="50%" /> | ||
<figcaption>All hail Sun Worm ☀️️ 🪱</figcaption> | ||
</center> | ||
</figure> | ||
#+END_EXPORT | ||
|
||
I've heard pretty passively through others that there were a lot of conspiracies surrounding the eclipse; I guess that's what fools get for being on TikTok. These conspiracy theorists clearly ignore the real major event of this eclipse: Sun Worm gracing us with its presence. A God so powerful It can turn the earth cool while still burning your eyes out without you even feeling it at first. ALL HAIL SUN WORM! | ||
|
||
You can make a religion out of this! |
This file contains 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
Oops, something went wrong.