The first software that runs on an Android phone is the "Boot-loader".
From boot-loader, the phone can load either the Android ROM, or a utility program called the "recovery".
The operating system on an Android phone is called the "ROM". It is based on AOSP from Google,
which is a version of Unix.
Older smartphones will run a certain major version of ROM and not provide an update to a newer major version.
Some phones will be restricted to using only one telecomm company (carrier).
To change that, you "jailbreak" (usually on Apple) or "unlock" or "SIM unlock" (usually on Android) the phone.
Normally, the user and apps will have restricted access to the filesystem,
preventing changes to various system files and settings.
To get full, super-user access to the filesytem, you have to "root" the phone.
Smartphones will come with various Google-supplied and manufacturer-supplied apps installed,
and not let you remove those apps (unless you root the phone).
Connect your phone to your PC with a USB cable, enable USB debugging on your phone,
and install and run adb on your PC. Then you can type commands on your PC and do low-level
things to your phone or on your phone.
If "adb -d devices" lists device as unauthorized, unplug USB cable,
go to Settings / Developer options / Revoke all authorizations,
plug USB cable in, should see "authorize this device ?", click OK, try "adb -d devices" again.
Normally, the user and apps will have restricted access to the filesystem, preventing changes to various system files and settings.
To get full, super-user access to the filesytem, you have to "root" the phone (which mainly involves installing
the Unix SU program and using it to set everything to run with super-user permission). But if you leave it running in that state,
any malware application would have full access to all data and settings. And some applications will refuse to
run on a rooted system, especially because it may allow you to subvert payment requirements or
region restrictions (this may be called
"failing SafetyNet" ?).
The main reason to install a custom ROM is to get a newer version of Android than your phone manufacturer supports.
This gives you new features, maybe new apps, more bug and security fixes, maybe more memory space because
newer versions use SD card better.
If you just want to tweak settings or remove standard applications, you could just root the phone
instead of installing a custom ROM.
Apparently it makes no difference whether or not your phone is encrypted; it's never mentioned in the instructions.
I'm not sure how much free memory space your phone must have. I think if you do "sideloading",
new ZIP files (about 1 GB) are downloaded to your computer instead of your phone, so much less phone memory needed.
To go with your custom ROM, you'll need a matching GApps package for it.
Download recovery, ROM, and GApps files (ZIP files) to your computer. Don't unzip them.
Risks of the process:
You might wipe data, and then find that your backup was bad or recovery doesn't work.
You will void the warranty (if any) on your phone.
You might "hard brick" your phone (make it unable to boot at all), which means you'd have to throw away the phone.
But from /u/noahajac: "it is extremely difficult to hard brick a phone these days without the intention to do so".
You'll probably end up with the phone rooted, which means any malicious app can access all of the data.
And may make you fail SafetyNet, which means some apps won't run.
You'll probably end up with an unlocked boot-loader, which has dangers (what ?).
And may make you fail SafetyNet, which means some apps won't run.
You'll have to do any later minor system updates yourself; they won't happen
automatically through Android's built-in software update facility ? But I think Lineage OS has an app to do this for their ROM.
You will have to trust that the supplier of the custom ROM has not put any malware in it. Get the
files from XDA or the ROM builder directly, not any of the aggregation/downloading sites.
> install Lineage OS on Samsung Galaxy S4 GT-I9505:
The following instructions are for Windows only. Please don't use a virtual machine as these can cause problems communicating with the device. ...
First we need to download the tool that flashes to the devices different partitions.
On most devices you use a tool called fastboot, but Samsung devices aren't like most devices.
This tool is called Odin, it's Windows only and leaked from Samsung so you need to get it from a trusted source.
You can download the latest version (as of 5/5/2017)
Extract the "Odin_3.12.3.zip" file. You should now have a folder called "Odin_3.12.3".
Treat this as your working directory and download all other files to this folder.
You don't need a PIT file for your phone.
GT-i9505 is same as "Qualcomm" version of phone.
Now we need to download Team Win Recovery Project, or TWRP as most people call it.
TWRP is a custom recovery. A recovery is a mini-OS that is stored on another partition of the device that can do basic
functions like flashing and wiping. TWRP is one of the more full featured recoveries as it has stuff like backup
and restore built in. Devices do have stock recoveries but these are programmed to only flash files signed by the vendor,
people don't often notice this but stock recovery is what the device uses when you run an OTA (Over The Air) update or a factory reset.
You can get the latest version (as of 5/5/2017) of TWRP for your device
Make sure to click "Download twrp-3.1.0-0-jfltexx.img.tar" to download the actual file.
Now we need to download the Android platform tools. These contain multiple tools (including fastboot as I mentioned earlier)
but we are after ADB (Android Debug Bridge). It has multiple use cases and can be used in recovery or just in the normal Android system.
You can download the latest version (as of 5/5/2017) of the platform tools for Windows
Extract the "platform-tools-latest-windows.zip" file and there should be a "platform-tools" folder. Open this folder and move
its contents into the "Odin_3.12.3" folder from before.
Now to download LineageOS itself. Custom ROMs, along with a bunch of other things come in a flashable zip format that
gets flashed using a custom recovery. LineageOS has two build types as of now, one is an experimental migration build,
and the other is the normal build. As you're doing a clean install you need the normal build.
Please keep in mind stability isn't promised and it is recommended to keep TWRP backups.
You can get the latest build (as of 5/5/2017) for your device
The next file we need is Gapps (well we don't actually need it but the majority use it). Gapps (Google Apps) are basically all
the Google branded apps like the Play Store and it's needed services. They come in multiple variants depending on how many
Google Apps you want. I usually recommend either the stock package (installs Google Apps like it's on a Nexus) or the nano package
which is smaller and installs just the needed apps. You can get the latest nano package for your device
Or the latest stock package
Also, if you would like to have root access you will need to download the optional root add-on from
Keep in mind if you want SafetyNet to pass you would need to use an unofficial root method like Magisk.
Now to prepare the device to be flashed. Go into settings and look for "Developer Options" or something along those lines.
If it isn't there, go into "About phone" and tap "Build number" 7 times. Then go back up into settings.
They should be there now. Enable "Developer Options" (if it has a toggle) then enable "USB Debugging".
This allows us to use ADB on the stock ROM but it usually isn't needed (we enable it just in case).
Also enable "OEM Unlock" if it's there, this would allow us to flash unsigned images to the device
however not all builds have this setting so you may not need to enable it. Also go back into security
settings and disable "Reactivation Lock" if you can, because sometimes it can cause issues.
Once you have these options set, say goodbye to your stock ROM and just pull your battery.
Reinsert the battery and then hold the Volume Down, Home, and Power keys. This should put the device into download mode;
hold the keys until you see that.
Accept any warnings then plug the device in. Open "Odin.exe" from the "Odin_3.12.3" folder. In the log,
it should say Added! and have a blue COM thing near the top, meaning it detected your device.
If it didn't detect it, then tell me because that means you probably have a driver issue.
Click the "Option" tab and make sure "F. Reset Time" and "Auto Reboot" is enabled.
Also check the checkbox next to the "AP" button and then click the button.
Select the "twrp-3.1.0-0-jfltexx.img.tar" file. Now on the device, hold the Volume Up and Home keys
and click "Start" in Odin. Normally the key combo to get into recovery is Volume Up, Home, and Power but
since Odin is going to auto reboot the device when it finishes flashing we don't need to use the Power button.
If it's too hard to click "Start" at the same time as holding the buttons.
You can just disable "Auto Reboot" and click "Start". Once Odin says "RESET" or "PASS" near the top
and says it successfully flashed in the log. You can then just hold the Volume Up, Home, and Power keys.
Whatever method you choose, keep holding the keys until you see the Team Win Recovery Project (TWRP) splash screen.
It's going to ask you if you want to modify the system, you can just allow it to do this by swiping the slider.
It may also ask you anytime during the process if you want to root, don't let it do this.
Now click "Wipe", "Advanced Wipe", select "System", "Data", and "Cache",
and then swipe the slider. This clears the partition that user data is stored in,
along with the caches. Once that finishes you can click the home button. Now click "Advanced" and click "ADB Sideload".
Swipe the slider, you don't need to wait for it to start as it will start once it gets the command from your computer.
Open a command prompt Window up to the "Odin_3.12.3" folder and run "adb devices". After the message about starting the daemon you should see
something like "SERIALNUMBER sideload". If you don't then tell me because that means there is probably a driver issue.
There is multiple methods to flash with TWRP but this is my favorite as it doesn't leave the files on the device.
Now just run "adb sideload lineage-14.1-20170503-nightly-jfltexx-signed.zip" to flash it.
The percentage is inaccurate so don't worry if it goes over 100%. TWRP will say once it finishes.
Don't reboot yet though, we still need to flash Gapps. Click the home button and go back to the ADB Sideload menu.
Swipe the slider and this time run the same command but for the Gapps file ("adb sideload open_gapps-arm-7.1-full-20170505.zip" in my case).
If you want root,
do the same step for the root add-on ("adb sideload addonsu-arm-signed.zip" in my case) once Gapps is done flashing.
Now you can "Reboot System" to reboot into LineageOS. You should now see the LineageOS boot animation.
The first boot may take up to 15 minutes but you should soon be seeing the setup wizard where you can continue like you normally would.
If it doesn't boot, tell me.
If you flashed the root add-on don't forget to enable it in developer settings.
I have a Windows 10 computer with USB cable to phone.
I have a Samsung Galaxy S4 GT-I9505 phone with 16 GB memory running Android 5.0.1.
Lineage OS has a custom ROM and GApps
for Android 7.1 (Nougat) for my phone.
It's marked official, weekly, experimental, and nightly ?
I want to get a sense of how stable it is. Changelogs on the nightly downloads are empty.
Went to reddit's /r/LineageOS.
I don't see any error reports, and my phone is pretty basic and old, so I think I'm okay.
What I did:
Installed Titanium Backup and TWRP Manager apps on my phone.
The apps both want root mode, which I don't have yet.
Turned on USB Debugging Mode.
I don't see "OEM Unlock" or "Reactivation Lock" settings.
Tested ADB by opening a command window in the new folder and running "adb devices". Got a code and "unauthorized" in the list,
and a "let this device connect" dialog opened on my phone. Said yes, did "adb devices" again, got a code and "device" in the list. Working.
Downloaded Heimdall Suite from
and extracted it.
Downloaded zadig.exe from here and put it in "Heimdall Suite / Drivers" folder,
overwriting the older version already there. Plugged in phone, logged in to phone, ran zadig.exe,
followed instructions in Heimdall README file, and got "driver installation failed - resource already installed".
Downloaded PIT file from here
and put extracted file in "Heimdall Suite" folder. There seem to be a lot of scam sites offering PIT files; be careful.
Ran "hiemdall-frontend.exe", went to Utilities, loaded the PIT file. It loaded okay, but I don't understand the contents.
Found another PIT file at here.
On casual inspection, it seems identical to the other one.
Downloaded Lineage OS 14.1 file from [broken link]
and put zip file in "Heimdall Suite" folder.
Downloaded GApps arm-7.1-full file from here
and put zip file in "Heimdall Suite" folder.
Downloaded rooting file su(arm) from here
and put zip file in "Heimdall Suite" folder.
Tried to root phone by downloading Kingo Android Root from Kingo Android Root.
Installed it on computer (installer tried to install bloatware and change my home page, be careful).
Ran it with phone connected and well charged, and it ran for 5-10 minutes, up to 99% progress, saying
all this stuff about rooting. Then at 99% it said "okay, last step is to flash a custom recovery, okay ?".
I said cancel, and it said "rooting failed". Restarted the phone, everything is fine, but phone is not rooted.
But Kingo installed a couple of bloatware apps I didn't want: SuperBattery and AliExpress.
Then I saw this in their FAQ:
"There are two universal ways to root your Android, one is by implementing "exploits", the other is through flashing custom recovery.
The former one is relatively safe while the latter one can be risky. Kingo mainly focused on "exploits" method,
but also covers "recovery" for certain tricky devices (hot ones with no exploit available)."
So I ran it again, it took 10-15 minutes, then I allowed it to flash a custom recovery.
It restarted the phone a couple of times, phone said it was restoring the stock recovery,
then I had to log in to phone a couple of times, then Kingo said rooting succeeded, then phone said updating apps and updating Android.
Finally done, phone still works, Titanium Backup says it has root permission.
Ran Titanium Backup app to do backup. Very confusing; couldn't figure out how to back
up just an app's data, without also backing up the app itself.
And I'm not sure where the data is being backed up. In the cloud ?
Tried to do backup by direct filesystem access through USB cable. Mainly, I wanted
to back up my Contacts. But I couldn't find the file where they're stored.
Now /u/noahajac tells me Kingo is essentially spyware, I probably shouldn't have used it.
But it was a quick way to root and be able to use Titanium Backup.
Followed /u/noahajac's instructions to use Odin to flash TWRP, and it seemed to succeed, but
my phone won't boot into TWRP. Says something like "Recovery not SEANDROID enforcing" and gives black screen.
Can still boot into normal ROM; nothing changed there. Searching, I see this error is a mismatch
between versions of TWRP and ROM. But that's the whole point, I'm upgrading.
Found an answer and it worked: after seeing "Recovery not SEANDROID enforcing", let go of Home and Power buttons,
keep holding Volume+ button, and TWRP will boot eventually.
In TWRP, tried to wipe data, got all kinds of "can't find /data" and "can't find partition" failures.
Maybe because my phone is encrypted ?
Then I realized I should have done a TWRP backup first. Too late now.
Yes, wiping is different because my phone is encrypted. Did "Wipe --> Format Data" first, then wipe data, all worked.
Did "adb sideload lineage-14.1-20170503-nightly-jfltexx-signed.zip" which succeeded.
Did "adb sideload open_gapps-arm-7.1-full-20170505.zip" which failed because not enough space.
Did "adb sideload open_gapps-arm-7.1-mini-20170506.zip" which succeeded.
Did "adb sideload addonsu-arm-signed.zip" which succeeded.
In TWRP, clicked "Reboot System". Got "no OS installed" warning, ignored it.
Kept going, phone rebooted, got something on phone about "not SEANDROID enforcing",
then into a small green arc animation which I think is LineageOS starting up.
Took about 5 minutes. Then it started going through phone setup stuff: select language, connect to Wi-Fi, etc.
Got through it, tweaked various settings, it's working !
Powered off, powered on, looks good !
Clicked LineageOS build number seven times to get into developer mode, then turned on root access for apps.
Phone started the process encrypted, ended up unencrypted.
Installed Titanium Backup, and the backups I did are nowhere to be found [told later: the backup
was done to internal memory, which then got wiped]. Have
to rebuild my Contacts etc from scratch. There wasn't much on the phone, so it's not hard.
[Also realized later: I should have done a backup inside the WhatsApp application before starting.]
I've heard stories of phones getting bricked when people apply ROM upgrades. So I'm
not going to do that. And should do a TWRP backup before trying any upgrade. Also might brick if you try to flash a new TWRP.
Still have to do this trick to boot into TWRP: after seeing "Recovery not SEANDROID enforcing", let go of Home and Power buttons,
keep holding Volume+ button, and TWRP will boot eventually.
Did a TWRP backup. It gave an error "E: failed to write /dev/block/mmcblk0p9: I/O error" before starting the actual backup,
but otherwise seemed to work. Warns the backups of Data do not include files such as pictures or downloads. Took about 2.2 GB of storage !
Took about 3 minutes. The storage used is in type "Other" in Settings/Storage.
So far, I don't see any amazing new features in Android 7 as opposed to 5. You can revoke permissions from apps.
If I had an SD card, I guess I could use it for app storage.
Biggest problem: something is draining the battery heavily. But changing Location setting from
"High accuracy" to "Battery saving" seems to have fixed most of that.
5/2018: phone died, won't charge or run off charger. New battery revived it for a moment,
then it was dead again. Took it to a shop for repair, and they replaced the entire internals of it.
I had little data in it, so that's no problem, but goodbye LineageOS, it's running empty stock Samsung Android 5.0.1.
8/2018: for 2 months I've been using a phone running empty stock Doogee Android 6.0, and I really don't miss LineageOS.
Back up your device through TWRP before an update, and archive these backups somewhere (cloud storage, etc)
in case an update screws with your phone. TWRP does not preserve your data partition, so you will have to
redownload music, etc. App settings should get preserved, but correct me if I'm wrong.
If you're having issues after updating LineageOS, try wiping the cache and dalvik cache.
Open TWRP app with root permission. Press TWRP Flash, Select Device and download the .img file.
Now come back in the TWRP app, press select a file to flash ... Usually in sdcard/Download/.img and boom.
In "Select Device", my phone is "Samsung Galaxy S4 International Qualcomm", files have "jfltexx" in the name.
Select the ".img" file. After it downloads, click "Flash to Recovery". Takes only a few seconds.
Then out of app, reboot phone into Recovery, check TWRP version.
How to backup ?
Power phone down using power button.
Boot into TWRP by clicking power button and then holding Vol+ button until TWRP logo appears.
Partitions selected: Boot, System, Data (excl storage).
Swipe to backup.
When done, click Reboot System.
Boot into LineageOS.
Connect USB cable to computer and select Transfer files.
In Windows Explorer, go to [phone] / TWRP / BACKUPS / [code] and you will see a dated backup folder.
Move backup from phone to computer, including [code] folder. Don't copy it, move it, to make space for next time.
How to do an LOS update ?
Go into Settings / About Phone / LineageOS Update.
Select a new version and click "Download" button.
After it finishes downloading, see "Apply Update ?" dialog, click "Apply".
Boots into TWRP.
Click on "Install" button.
Find downloaded version in /data/data/org.lineageos.updater/app_updates and install it. Do NOT check ZIP signature; it will fail.
Encrypting the phone: Update to latest TWRP first (there was some bug). And do a full backup.
I bought a used LG G3 d855 to install Lineage OS on and use as my (only) phone.
The installation instructions (at https://wiki.lineageos.org/devices/d855/install)
for the phone seemed (reasonably) straightforward, even for a novice user like myself,
so I thought this would be a fun, little project. However I ended up using 20-30 hours (over multiple weeks) in total.
This is not meant as a complaint - on the contrary, I am full of gratitude to all developers creating
open source software - You're making the world a better place. Rather, by describing the efforts I went through,
I hope others may learn something from them and get an easier time than I had.
Here are the main painpoints and time sinks I encountered.
Unable to root from Linux. I thought that this would be a no-brainer (hey, Linux has everything!),
but no - it seems you have to have access to a windows pc to root the phone. Lesson: Use a windows pc to root.
The main time sink was trying to root the phone (from Windows). Eventually I downgraded the phone to Android 4.4 (KitKat)
to root it, and then the root instructions from linked from the lineage os wiki were more or less ok.
However, before I got there I went via multiple failed attempts to root from Android Lollipop and Android Marshmallow
and a bootlooped phone before the ultimate success. Lesson: Find and install an appropriate version of Android before rooting.
Installing custom recovery (TWRP). The instructions at the lineage wiki said to push the recovery file to /sdcard,
but that is not the correct location for Android KitKat on LG. Quite a few hours trying, researching, trying again.
In the end, the place to push was /storage/external_SD/, but I believe this may be LG/KitKat specific. Lesson: Not sure.
It also took me a little bit of time to realise I had to install an actual SD card in the phone to
install the TWRP - I've read this before, but the instructions for the phone at the lineage os wiki said nothing on this.
(You may write this down as "beginner" if you want to, and you will not be entirely incorrect.) Lesson: Install an SD card :)
Installing LineageOS from recovery. I got an error 7, because the installation expected a different Android version
than the one I was using. Removing the version checking from the installation script fixed the issue.
Lesson: Search for specific error messages you get.
Ultimately, the instructions at the lineage os wiki were not particularly helpful. Specifically, they're somewhat
misleading in that they make no provision at all for differences in Android versions. I found no other web site
with a complete AND working tutorial, either - I had to research each specific problem as it occurred.
The good news - it DID work out in the end. It was actually doable, and I believe it will be for other phones
and android versions as well.
I'd like to end with a thank you to all developers using their time to develop free and open source software. Thank you!
From people on reddit 3/2020:
Has useful filters when searching for apps (minimum rating, ads, IAPs, minimum downloads);
if you don't want to update an app for any reason you can blacklist it;
you can download apps from other countries.
But: downloads sometimes randomly bug and don't complete;
need to re-login with Google account all the time;
sometimes search an app and it just doesn't show up at all;
to update all apps, you need to manually tap "allow" each time an update downloads, for each app;
it says using Google account in Aurora Store will lead to ban by Google, so use Anonymous.
APKMirror (especially for beta-test versions of apps)
It seems any particular app X tends to be in either Google Play Store or in F-Droid, but not in both ?
Some differences among the stores:
Requirements for admission: e.g. F-Droid allows only open-source, Google Play Store doesn't allow ad-blockers ?
Because of the open-source requirement, some apps have different
features/subsystems in the different stores (e.g. Firebase subsystem).
Some apps have different pricing in the different stores.
Degree of screening of apps; e.g. Google has "Play Protect".
Because of market share, some apps may publish first to Google Play Store, then later to other stores.
Watch out for named-alike apps: malicious app given same or similar name as some legitimate very popular app.
Check the "made by" company name.
Watch out for fleeceware apps: subscriptions that say $10/year in big print and
then $10/week next to the button where you're paying.
Apps I like to add:
Be careful; there are lots of named-alike apps that may be malicious, or just
trying to profit off another app's success. Check the name and vendor name carefully.
A bank app.
Flashlight Free: No Permissions by Humberto.
IRS2Go (for US IRS).
K-9 Mail by K-9 Dog Walkers, and OpenKeychain: Easy PGP by Cotech.
Lightning browser by Anthony Restaino (from F-Droid).
Music Folder Player Free by Zorillasoft.
Bluetooth Scanner by Zoltan Pallagi (look for Bluetooth devices).
On phone, go into Settings / Apps / theappname, and do Disable and then Force Stop ?
adb shell pm uninstall PACKAGENAME
If package name is right, get "Success".
If name is wrong, get "Failure [DELETE_FAILED_INTERNAL_ERROR]".
Alternate method that probably won't work on system/pre-installed apps:
adb shell am start -a android.intent.action.DELETE -d package:PACKAGENAME
If package name is correct, get a "Do you want to uninstall this app ?" pop-up on the phone.
If package name is bad, get an "App not found" pop-up on the phone.
You may see the removed apps still appear in certain lists, with small amounts of
storage assigned to them.
You could try going into your computer's File Explorer, going to the phone's storage folders,
and deleting any folders you see corresponding to the deleted packages, under the InternalStorage/Android/data,
InternalStorage/Android/media, InternalStorage/.install, and InternalStorage folders.
You may see the removed apps still appear the main list of apps.
Try going into Settings / Apps, clicking on the app, and clicking Disable.
Instructions from a post somewhere:
Only if your device is rooted.
Download and Install Titanium Backup from the Play Store.
Enable USB Debugging under Developer Options.
Open Titanium Backup and Grant Root Access.
Go to the Backup/Restore Tab.
Find the app you want to delete.
Select Wipe Data.
Select OK on the Backup Prompt to continue without backing up.
Do the same with the Un-Install option.
Settings / Developer options / Take bug report and "adb bugreport DESTFILE" don't do anything on my phone.
If omit DESTFILE, name should be bugreport-BUILD_ID-DATE.zip
On my Android 6.0 system, "adb bugreport >bugreport.txt", and you get an 11 MB file.
adb shell ls -R /
adb shell pm list packages
adb shell pm list packages -f
From Daniel Micay (lead dev of GrapheneOS, I think) on reddit 4/2019
Re: OS Security: iOS vs GrapheneOS vs stock Android:
Android is not a single operating system but rather a family of operating systems conforming to the
"Compatibility Definition Document". Google builds the OS for their first-party devices from the
Android Open Source Project with the addition of a directory with proprietary Google apps and
resource overlays replacing the AOSP sample apps. That means the stock OS on Pixels is essentially AOSP,
but that isn't the case for other devices. There's a drastic difference between the current version of
AOSP with ongoing support and the sketchy forks of the OS on most other devices with tons of added attack surface,
rolled-back security features, poorly-written code and a lack of security updates or major upgrades.
I will assume that by Android you mean AOSP or the stock OS built from AOSP + Google apps on Pixels,
rather than Android as an operating system family. That means my statements do not apply to forks of the OS on other devices.
It's also important to note that lots of privacy and security is tied to firmware and hardware rather than
the OS running on it. The Nexus 5X and 6P were the start of addressing lackluster firmware and hardware security,
but they didn't move the needle much. Pixels have drastically improved it and each generation has added
compelling hardware security features and improved the existing ones. The firmware / hardware security
has also been tightened up a lot, despite some regressions like added attack surface in the boot chain.
AOSP has gone through extensive privacy and security improvements over the past few years, and there
are huge privacy improvements coming with Android Q that dwarf the progress in past years.
A Pixel 3 fares very well on the security front when comparing to a current generation iPhone at the software level.
It's catching up at the hardware level too, and matches most of the hardware security features.
The Titan M is definitely competitive with the SEP in terms of functionality and security.
On the other hand, other aspects of firmware / hardware security are lackluster compared to the iPhone.
I definitely trust Apple more with setting up proper IOMMU configuration, etc. at this point.
Their more-specific focus also means less attack surface in the firmware such as the boot chain.
Google has a lot of work to do as they take more control over the hardware and are able to properly harden it.
Google and Qualcomm generally do a very good job, but things sometimes really fall apart at
internal / external organization boundaries especially with peripherals from other companies
like Broadcom Wi-Fi. Apple is better at managing the whole stack from top to bottom and avoiding
some of the pitfalls that have been issues on Pixels.
I would say that when comparing only security of the OS and hardware on a Pixel 3 to an iPhone with iOS,
the Pixel fares well and trades blows with the iPhone. There are areas where it does better,
and areas that it does worse. It's a very complex story and it's very difficult to boil it down to a clear answer.
I'm not going to go into any depth about it because it's too much. It's not something you can
really ask on reddit since a book could be written about it and would constantly need to be
updated / rewritten. I can give you my opinions at a high level, but if you want details
you'll need to do the research since I can't spend all year writing about it.
iOS definitely does still offer better privacy from apps and their services are generally more
privacy-respecting than Play Services. However, a lot of the invasiveness of Play Services
is really opt-in or opt-out just like comparable analytics, etc. on iOS. It has privacy issues,
but a lot of the claims about it are misinformation and it's possible to set up a Google account
and stock device to be fairly privacy-respecting. I prefer devices without Play Services,
but there are comparable issues in Windows, macOS, iOS and even Linux distributions, etc.
Play and Google apps are particularly bad offenders in terms of nagging you to enable privacy-invasive
features, and having some bad defaults. Usually they get you to opt-in to the truly privacy-invasive
bits, but the nagging means most people end up doing it, since otherwise you'd need to actually
disable some of the notifications which most people probably don't even know how to do.
GrapheneOS starts from AOSP without adding in the proprietary Google apps and services. It's focused
on privacy and security-hardening to improve the OS from the baseline. It also preserves all
the standard software and hardware security features, unlike other alternative operating systems.
In the past, the project has made substantial improvements that definitely change the picture when
it comes to OS privacy and security. However, it has only recently been revived and has a long way
to go to reach that point again and surpass it by becoming a much broader project with a strong
development team. There is a limited scope to what can be done by only a single (more than)
full-time developer with some external code review and contributions. The goal is largely advancing
mobile security as a whole including landing lots of features upstream and doing a lot of useful
research and engineering work advancing the status quo everywhere. The project has been very successful
at doing that in the past, while also offering a compelling OS. I would say that once everything
is added back, it compared very favourably to iOS, and Pixel hardware is good enough to make it a
decent alternative. It's not currently at that point again. I'd definitely say that once it's fully
revived and going again, it will be significantly harder to remotely or locally exploit than iOS.
A major caveat to all of the security questions is that people are often not compromised with an exploit.
Even a targeted activist / journalist will often be compromised by tricking them into giving up credentials,
installing a malicious app and granting it permissions, etc. Android permits users to grant a lot more
access / permissions to apps. This has been changing, and Android Q locks things down much more.
Still, it offers users more control and freedom than iOS. You can also sideload apps, rather than
only installing them from whitelisted sources / signatures, which protects users from themselves
but also enables censorship and banning apps. It basically forces it since you put yourself in the
position of a moderator, and are pressured by governments and other organizations to ban apps.
It also achieves very little in terms of securing the system since so many of those apps have
vulnerabilities / trivial arbitrary code execution. It mostly just polices what people are allowed
to install, and many malicious apps / updates will still get through review. It's hard to distinguish
malice from incompetence too. Competence malice looks like unintended bugs if you even find them
which you probably won't. It's a trade-off in the design. ...
Android is not really "Linux". It's a Java run-time on top of the Linux kernel.
> Why is it so difficult to put a Linux distro on an Android device ?
First of all, the portable device can not discover its internals like a PC can.
It needs data (embedded in bootloader) which describes where everything is:
storage, screen, radio, etc. You may think that the data is unique for every model
of the device. Wrong: sometimes it is unique for every production batch of a model,
if the manufacturer had to change literally anything.
Changing the bootloader is a very risky operation: if anything goes wrong, the device is dead.
No second attempts, no factory resets, nothing.
You may use the manufacturer's bootloader, but even if it does not lock you into official
firmware only, usually it only supports Android kernels.
Then come the driver problems. Many devices inside a phone do not follow any open protocol
and have no open drivers. In some countries it is forbidden for a phone manufacturer to open
the drivers for the actual cell module.