Nuking a phone
Factory reset
-
Enable Airplane mode
-
Power off
-
Remove SIM card
-
Power on
-
Settings > General management > Reset > Factory data reset
Initial setup
-
Language: English (Australia). (Start)
-
Wi-Fi: Off. (Next)
-
Terms and Conditions: EULA (but nothing else). (Next)
-
Date & time: [as appropriate]. (Next)
-
Name: [leave empty]. (Next)
-
Lock type: [as appropriate]
-
Secure startup: Require PIN when device powers on. (Continue)
-
Set PIN: [as appropriate]. (Done)
-
Notifications (for lock screen): Off. (Done)
-
Google Services: Disable All. (Accept)
-
Samsung account: [no]. (Skip twice)
-
More useful features: Turn off Secure your stuff. (Finish)
-
Enable Airplane mode
Debloat
Enable USB debugging
-
Settings > About phone > Software information
-
Tap Build number 7 times
-
Home
-
Settings > Developer options
-
Turn on USB debugging
Universal Android Debloater
See Universal Android Debloater.
On a computer:
$ sudo apt install android-sdk-platform-tools qpdf
$ git clone https://gitlab.com/W1nst0n/universal-android-debloater.git
Connect the phone by USB cable, then:
$ cd universal-android-debloater/
$ ./debloat_script.sh
Although remaining_packages.txt
will be generated
immediately upon arriving at the main menu,
it misses the package au.com.optus.selfservice
.
The following regex package search gets absolutely everything:
-
ADB backup:
N
-
Force-uninstall:
1
-
Choose action:
0
(Packages search)
-
Regex:
.*
-
Copy the output to
debloat-list.txt
-
Comment out packages to be kept with hashes
-
Press any key to continue
For the result, see [debloat-list.txt
].
Then do the actual debloating:
-
ADB backup:
N
-
Force-uninstall:
1
-
Choose action:
3
(Debloat packages)
-
Your selection:
7
(External list)
-
Path to the list: [as appropriate]
Unfortunately, at the time of writing (commit 8b93202ba61a
),
the above external-list debloating doesn't work;
it just prints "Nothing to debloat".
A workaround is to:
-
Wrap all non-commented package names in quotes
-
Stuff the result into the
AOSP.sh
declaration
-
Run the debloater for the AOSP list
For some reason au.com.optus.selfservice
remains,
so run the debloater to remove it individually
(or clear data & uninstall manually).
Finally:
-
X
(Exit and reboot the phone)
Finish up
-
Settings > Apps > 3-dot menu
-
App permissions: Turn off everything (even for System apps)
(only re-enable when needed)
-
Special access > Device administrators: Turn off Find My Device
(Deactivate)
-
Special access > Apps that can change system settings:
Turn off everything (even System apps)
-
Special access > Usage data access:
Turn off everything (even System apps)
-
Settings > Apps > Every app (even System apps)
-
Storage > Mobile data: Disable background data usage
-
Power off
-
Insert SIM card
-
Power on
Install F-Droid etc.
On a computer:
-
Get
F-Droid.apk
and F-Droid.apk.asc
(PGP Signature) from f-droid.org
-
Get the (official binary releases) Primary key fingerprint
37D2 ...
from Release Channels and Signing Keys
(henceforth referred to as <key>
)
-
Verify the binary release
(note the keyserver is important)
$ gpg --keyserver hkps://keyserver.ubuntu.com --receive-keys "<key>"
$ gpg --verify F-Droid.apk.asc F-Droid.apk
-
Copy
F-Droid.apk
to phone
On the phone:
-
Settings > Lock screen and security > Unknown sources: enabled
-
Install
F-Droid.apk
-
Disable Airplane mode
-
Connect to Wi-Fi
-
Install Termux, Aurora Store, etc.