[Q] Encryption, custom recoveries, unlocked/relocked bootloader and security - Nexus 5 Q&A, Help & Troubleshooting

Rather technical and controversial topic but I got something really bothers me. I'm about to root my nexus 5 and have checked on xda, reddit, and various forums regarding to possible threats to unlocked bootloaders and security concerns for custom recoveries.
I will certainly encrypt my phone, but not sure how custom recoveries will react to that. Will they work? If so, will they compromise my security? Should I bother with installing stock recovery and re-locking my bootloader? This guy* seems to know what he's talking about, and there are some apps** to ease this process. However, there are loads of forum posts by senior posters assuring that one shouldn't bother with all those.
Being new to android, what advice can you give to me?
ps. sorry for the links. being new to forums, I'm not allowed to embed links into my posts.
*android.stackexchange.com/questions/36830/whats-the-security-implication-of-having-an-unlocked-boot-loader
**play.google.com/store/apps/details?id=net.segv11.bootunlocker

himgil said:
Rather technical and controversial topic but I got something really bothers me. I'm about to root my nexus 5 and have checked on xda, reddit, and various forums regarding to possible threats to unlocked bootloaders and security concerns for custom recoveries.
I will certainly encrypt my phone, but not sure how custom recoveries will react to that. Will they work? If so, will they compromise my security? Should I bother with installing stock recovery and re-locking my bootloader? This guy* seems to know what he's talking about, and there are some apps** to ease this process. However, there are loads of forum posts by senior posters assuring that one shouldn't bother with all those.
Being new to android, what advice can you give to me?
ps. sorry for the links. being new to forums, I'm not allowed to embed links into my posts.
*android.stackexchange.com/questions/36830/whats-the-security-implication-of-having-an-unlocked-boot-loader
**play.google.com/store/apps/details?id=net.segv11.bootunlocker
Click to expand...
Click to collapse
In case anyone come across the same problem in the future, I wrote my first impressions on the issue.
First and foremost, I easily rooted my phone by following this: forum.xda-developers.com/showthread.php?t=2507905
Installed ClockworkMod (CWM) and Koush's Superuser (because it's a free software in Stallman terms), then encrypted my phone.
Later on, installed following trio:
Bootlocker: to allow me to change the state of my bootloader's locking situation
Flashify: to flash the stock recovery by replacing CWM
Cryptfs Password: to change my encrypted partition password.
I don't have any problem whatsoever regarding the performance or stability. Everything is great so far. So, for those who concern for their security of their data, I'd recommend it.

Related

[Q]Rooting, Please help !

I'm totally new to this. I have this handset i want to root after reading all the advantages (custom roms, updates, overclocking). Is there an official guide here on xda to root? some info would be real helpful !
Also some questions:
- Does rooting surely voids the guarentee?
- If you use system's reset thing, can you unroot the phone that way?
thx
1. Yes.
2. No.
Also, the description of this forum says "no noobs". You are, by your own admission, "totally new to this", which means you're a noob. There are other forums for this type of question.
Rooting is not that hard to do just do some research throughout the threads. In some cases Rooting is as simple as turning your phone off and on (At least for me it was)

Confused about specifics, would appreciate clarification

Hi all,
I'm attempting to upgrade my Galaxy S Captivate (Rogers) 2.2 stock phone, although it is rooted and unlocked currently. I've read many of the plethora of threads both here and elsewhere, but in all honesty it is a bit overwhelming and I was hoping to get some clarification on some of the specifics and was hoping people here could help.
1) I was hoping to upgrade to 2.3, either stock or a custom ROM. Which ones are good and stable? There are really so many now, I would appreciate a few suggestions. I've looked through many of the threads, but can't really make up my mind.
2) After I choose a ROM, what are the steps for my phone. Should I unroot? Or at least remove the unlock? I was hoping to maybe just have a list of things I should look for in the guides so I know that they're accurate to my specific device and setup.
3) Just to confirm, I should be able to root and unlock with the new ROMs on 2.3, right? Same for lagfix, that was pretty damn useful.
4) Are there any modems which are better than others? Do I do that separately?
Sorry if I seem a bit confused here. Any help people could provide would be much appreciated.
Thanks!
Lucky75 said:
Hi all,
I'm attempting to upgrade my Galaxy S Captivate (Rogers) 2.2 stock phone, although it is rooted and unlocked currently. I've read many of the plethora of threads both here and elsewhere, but in all honesty it is a bit overwhelming and I was hoping to get some clarification on some of the specifics and was hoping people here could help.
1) I was hoping to upgrade to 2.3, either stock or a custom ROM. Which ones are good and stable? There are really so many now, I would appreciate a few suggestions. I've looked through many of the threads, but can't really make up my mind.
Click to expand...
Click to collapse
My experience (in alphabetical order)
Continuum
Mosaic
Serendipity
Lucky75 said:
2) After I choose a ROM, what are the steps for my phone. Should I unroot? Or at least remove the unlock? I was hoping to maybe just have a list of things I should look for in the guides so I know that they're accurate to my specific device and setup.
Click to expand...
Click to collapse
Custom ROMs (kernels) are already rooted. Nothing to do there.
Lucky75 said:
3) Just to confirm, I should be able to root and unlock with the new ROMs on 2.3, right? Same for lagfix, that was pretty damn useful.
Click to expand...
Click to collapse
Most (not all) kernels have a lagfix (EXT4 file system) option, some don't. It seems RFS has been behaving well for most on 2.3.
Lucky75 said:
4) Are there any modems which are better than others? Do I do that separately?
Click to expand...
Click to collapse
Every ROM will have one preloaded by the ROM dev. Modems are very often (geographical) area specific. They're quick and painless to flash so try out a few.
Read/study to info guides and tech terms. And especially- always follow the instruction of the ROM dev before installing- it will help you tremendously.
Thanks for the reply mate. So, I was thinking of using continuum, and I was just hoping to confirm everything as I understand it.
I'm looking at this thread: http://www.team-continuum.net/forum...ses/(guide)general-installation-instructions/
And at this thread: http://www.team-continuum.net/forum...lease)(rom)continuum-6-1-xxjvq-android-2-3-4/
1) My device is NOT the i9000, correct? (Galaxy S Captivate from rogers, I think it's the i896?)
Current Firmware: 2.2
Baseband: I896UXJL1
Kernel: 2.6.32.9
Should I have any problems?
2) I shouldn't need to re-lock my phone or anything. I use titanium backup to copy everything off my phone (I just used the batch backup)
3) Then I update the bootloader with this one (I897UCKF1), and I assume I just download and run the executable while connected?
4) Then I flash the non-i9000 kernel with odin?
5) Finally, I put the phone into recovery, and install continuum from the SD.
6) What apps do I restore from titanium? Just the apps? Or can I move some system settings over too? Might be a bit dangerous.
7) Does doing all of this wipe everything on my internal SD card? And should I take out my external SD before doing all this?
Is that correct, or am I missing something?
Thanks!
Problems can always happen with humans in the mix, but if you follow proper directions you shouldn't have any.
1. No problem there (see answer 3).
2. Make sure you copy your Titanium backup file off of your phone as you will wipe everything during the ROM flash. Not sure what you mean by "re-lock"...
3. Again, just follow the instructions to the letter- icezar (Cezar - Continuum) does well to explain the process in his thread.
4 and 5. See answer 3.
6. Apps only. I may be corrected on this but I believe going from 2.2 to 2.3 it may be best just skip any data at all. As a general rule there are very few scenarios where you would ever load system data from Titanium Backup.
Everything you asked about could be answered by spending some time reading the forums. As for which ROM, only you can answer that. There is no "best" ROM because each person has different needs and ROMs can run differently from phone to phone. Next time, spend some time doing some searches, look through the ROM-specific stickies in Q&A, and read up in the developer's ROM thread in Dev. Personalized service is nice, but this is more of a do-it-yourself forum with helpful, unpaid volunteers.
Yes, and Kona was very helpful. Thanks for that mate.
As I mentioned before, I had indeed read many of the stickies, but there are simply too many versions of the same information and I got a bit confused. It's especially hard when the same device has many different models, and each model can have multiple ROMS, and each ROM has many different versions. Factor in unlocking and rooting, and there are a vast number of possible setups. For someone who hasn't loaded a custom ROM before, that can be a bit daunting. Even the threads that try to keep things in one place can sometimes add to the confusion.
Lucky75 said:
Yes, and Kona was very helpful. Thanks for that mate.
As I mentioned before, I had indeed read many of the stickies, but there are simply too many versions of the same information and I got a bit confused. It's especially hard when the same device has many different models, and each model can have multiple ROMS, and each ROM has many different versions. Factor in unlocking and rooting, and there are a vast number of possible setups. For someone who hasn't loaded a custom ROM before, that can be a bit daunting. Even the threads that try to keep things in one place can sometimes add to the confusion.
Click to expand...
Click to collapse
That's why it's better to post to an existing related thread rather than start a new one that just ends up adding to the clutter.

Root + Custom Roms

I'm sure this has been breached before, but searching for a question that involves keywords of root and ROM are really tricky.
Preface, does rooting a device make it less secure? Based on my understanding of root and having used the privileges in linux on occasion I'm lead to believe the answer is absolutely. I would love to hear someone more educated on the subject confirm for me though and maybe expend a little.
Following that, if the answer is yes, once you flash a ROM onto the phone, can you "un-root" the phone while keeping the ROM? I'd appreciate any input. I'm just starting to scratch the surface in regards to security on Android. Thank you!
For both questions, yes.
Edit: consider that a custom rom might patch some security issues while creating others. Depends on the rom.

Rooting Help for a Huawei T1-701ua Tablet

Hello XDA Community,
I have an old tablet, the Huawei T1-701ua. In recent times I haven't used it as much, but it's because it's running slow.
I want to root it and repurpose it for something else, like a portable media device. Because this tablet is my only one with a moderately big screen. But I've been running into some issues.
The bootloader is locked with a code, that I just cannot unlock. It's argubly the dumbest system Huawei has invented for locking a bootloader. But even if I really was able to unlock it. What do I do with it? Paying a small fee for the code is okay.
And even if I went through all these roadblocks and successfully rooted my tablet, I can't see any officially supported custom roms/images for it, and I don't want to risk bricking it. I've wanted for a long time to install another OS on it, but I wasn't knowledgeable enough.
*I don't want to use Kingroot, Kingoroot, or other one tap root apps, since to me they seem unsafe, and it also makes this rooting process way less interesting*
So with this post, I am kindly asking anyone who sees this to answer a couple of questions, that will help me greatly.
1. Is it worth it to root, in order to remove all bloatware and make this tablet run better, or is there another way?
2. What do I do in order to unlock bootloader with the code?
3. Can I install a custom rom/image/OS through recovery, that isn't supported, and not get my tablet bricked? (eg. LineageOS, even if it's an older version)
I still haven't figured out how and with what exactly I will root my tablet eventually, but due to the lack of information about rooting this kind of tablet, and almost no custom rom developers including this tablet in their support list, I haven't decided.
I will greatly appreciate if anyone who does have information about this topic, link me to another forum post or etc. if this sort of stuff can be easily answered there.
Thanks in advance.
bump
Simple. No. It is not possible to install another OS. Most, if not all Huaweis, has 3 states only: EMUI, off and bricked.
Thanks for the reply! I guess Huaweis are just the worst devices for rooting/installing another OS. Bad luck I got right there.
I am not gonna root it, maybe just a factory reset and debloating wherever I can.

Out of warranty thinking of using a Custom ROM but...

Hi Folks,
I hope you guys can shed some light into this, sorry if this is long and if this has been asked I'm sorry but I could not find the answers I was looking for, as some results they sound almost the same and some had not specified enough. So I hope the clever people here can explain a few things before I go ahead.
Background on my Phone (don't know if its relevant or not)
I own an Exynos SM-G970F, on One UI 3.1, June 2021 Update, this was purchased in Australia. Now that my phone is out of warranty I was thinking of installing a custom ROM. The main motivation was to reduce CPU usage and improve battery life.
I have installed a custom ROM and rooted my tablet for practice and it was easy to follow. I gotta say it was phenomenal how it brought back ancient hardware to buttery smooth performance of newer android versions. I wanted this same experience on my daily driver phone and there are some security based questions I would like to know.
Questions
1. First off unlocking the bootloader, I have read that it reduces your security of the phone as this allows hackers to gain access to your phone unlike a locked bootloader. As far as I understand the bootloader is to check if the system partition is a Samsung ROM. So in an unlocked state it will still load the kernel and run the system regardless if the ROM is Samsung or not, am I correct in this?
1a. If that's the case and if I installed the custom ROM and then locked the bootloader I would brick my phone right? as the bootloader is looking for a Samsung ROM but since it can't recognize the ROM it will boot loop.
1b. So in this case how would an unlocked bootloader make it vulnerable apart from accessing the OS? I'm thinking in a real word scenario if I were to lose my phone and someone found it, they could have means of access from an unlocked bootloader? but then again they could have access through custom recovery?
1c. Would it be necessary to lock a bootloader once you install a custom ROM? Do some custom ROM support signing bootloaders?
2. SafetyNet, as far as I understand this is a Google thing? like the app from Play store will check your system for any tampered software before functioning or at least warning the consequences of using the app in a custom ROM, is this right?
2a. So this could lead to some banking apps not working as it requires a SafetyNet pass on your device. But this only happens if you end up rooting your device? I understand Magisk is systemless root so the SafetyNet should pass in theory?
Primarily I'm concerned of the security and privacy of the phone but nothing is perfect, so there has to be some give and take with privacy and security? Though I will lose some privacy as I will install OpenGApps for some applications to work. So security would be the most important thing. What would be some best practices for a daily driver phone on custom ROM?
I imagine that hackers are not interested attacking an individual as this takes a lot of time and energy, unless they are bored or something like that.
Thanks for taking the time to read all this and if you can shed more information that would be great! I would like to learn more before giving the green light for custom ROM on my Samsung S10e.
With the caveat that I'm really bad at Samsung, I'll try to give a couple of answers. Sounds like you have the gist of it though...
Unlocking the bootloader is necessary to install anything custom, yes, and it does reduce the security of the device but mainly if someone has physical access to it. Keeping the device encrypted can help protecting your data though. There are some devices that allow locking the bootloader with custom firmware installed, but those are few. General rule: don't even try. I've seen some talk from people at Google about letting custom ROMs be certified, so that you could lock the bootloader with them, but currently there's nothing like that (that I know of). Once in a while I see people talking about trying to sign their images to lock the bootloader, but IMHBCO it's not worth the effort (if it's possible). If you're going custom, keep the bootloader unlocked.
About SafetyNet, it's an API provided with Google's play services and can be used by apps to check if a device's security has been compromised. Far from all bank apps will be using this and many instead have their own ways of detecting a "tampered" device (more on that below). SafetyNet will trigger from a number of things:
Unlocked bootloader
Custom ROM
Root
Etc...
So, as you see it's not only rooting that will cause you problems. There are ways around it though, mainly with the help of Magisk.
When it comes to what bank apps will detect, that could include a custom ROM, root apps, files on your device, Magisk, etc. They're often much more picky than SafetyNet even...
If you need help with getting SafetyNet and banking apps working on a custom ROM, with Magisk, I've got a few resources and tips collected here:
https://www.didgeridoohan.com/magisk/HomePage
Regarding security and custom ROMs it's pretty much the same as on a stock device. Don't install weird apps from outside the Play Store, don't click links in emails, etc. On to of that, another thing to look out for is SELinux. Don't use a ROM that has it disabled. It's quite important for the security of the OS... And if you do root, be careful with what apps you give root access, since an app with root access can do whatever it wants.
No idea if this cleared anything up or just created more questions. If there are Samsung specific stuff I've gotten wrong or missed I hope that someone that actually knows what they're talking about shows up...
Didgeridoohan said:
With the caveat that I'm really bad at Samsung, I'll try to give a couple of answers. Sounds like you have the gist of it though...
Unlocking the bootloader is necessary to install anything custom, yes, and it does reduce the security of the device but mainly if someone has physical access to it. Keeping the device encrypted can help protecting your data though. There are some devices that allow locking the bootloader with custom firmware installed, but those are few. General rule: don't even try. I've seen some talk from people at Google about letting custom ROMs be certified, so that you could lock the bootloader with them, but currently there's nothing like that (that I know of). Once in a while I see people talking about trying to sign their images to lock the bootloader, but IMHBCO it's not worth the effort (if it's possible). If you're going custom, keep the bootloader unlocked.
About SafetyNet, it's an API provided with Google's play services and can be used by apps to check if a device's security has been compromised. Far from all bank apps will be using this and many instead have their own ways of detecting a "tampered" device (more on that below). SafetyNet will trigger from a number of things:
Unlocked bootloader
Custom ROM
Root
Etc...
So, as you see it's not only rooting that will cause you problems. There are ways around it though, mainly with the help of Magisk.
When it comes to what bank apps will detect, that could include a custom ROM, root apps, files on your device, Magisk, etc. They're often much more picky than SafetyNet even...
If you need help with getting SafetyNet and banking apps working on a custom ROM, with Magisk, I've got a few resources and tips collected here:
https://www.didgeridoohan.com/magisk/HomePage
Regarding security and custom ROMs it's pretty much the same as on a stock device. Don't install weird apps from outside the Play Store, don't click links in emails, etc. On to of that, another thing to look out for is SELinux. Don't use a ROM that has it disabled. It's quite important for the security of the OS... And if you do root, be careful with what apps you give root access, since an app with root access can do whatever it wants.
No idea if this cleared anything up or just created more questions. If there are Samsung specific stuff I've gotten wrong or missed I hope that someone that actually knows what they're talking about shows up...
Click to expand...
Click to collapse
Hi Didgeridoohan,
Thank you for taking the time to comb through my queries and I believe you have answered what I was looking for. So it has dispelled any myths and misconceptions of custom roms.
Personally I use the phone most and my significant other uses my phone for some games. So physical access is not likely to fall in the hands of someone else unless I lost it. Encrypting the phone is a good safety measure, I assume this is something that can be done in the settings of the OS?
With banking I guess I will have to install and see if it works out, otherwise I don't mind going to a phone web browser and do it that way.
I appreciate your link for further info of Magisk, I will be reading through the page to get better insight.
Regarding SELinux, I had seen this on my phone though it says SE for Android Status and says 'Enforcing' and on the Custom ROM on my tablet in the settings it also says 'Enforcing'. So I can assume that its ensuring the security of the OS.
I didn't have the intention of rooting as I thought I can root at any point in time but if its good practice to do it when flashing the custom ROM please let me know.
I had planned on installing TWRP and use either Lineage or crDroid (kinda leaning to this one). They both are supported on their website so I don't think I will run into issues.
Once again thanks for your help and advice on the custom ROM, I think my questions were broad and it may not be Samsung specific as there are features I know I will lose but have never used when I had the original ROM.
dude777 said:
Encrypting the phone is a good safety measure, I assume this is something that can be done in the settings of the OS?
Click to expand...
Click to collapse
Yes. Just make sure that any ROM you choose is compatible with encryption. And remember that if you ever want to remove the encryption you'll have to wipe the device.
Regarding SELinux, I had seen this on my phone though it says SE for Android Status and says 'Enforcing' and on the Custom ROM on my tablet in the settings it also says 'Enforcing'. So I can assume that its ensuring the security of the OS.
Click to expand...
Click to collapse
Correct. That's the way it should be if you want to keep some security on your device.
I didn't have the intention of rooting as I thought I can root at any point in time but if its good practice to do it when flashing the custom ROM please let me know.
Click to expand...
Click to collapse
You can wait with rooting. If you don't have any need for it, why bother? I use Magisk to hide the fact that I have an unlocked bootloader (and to hide Magisk from some apps), to use a custom hosts file (for adblocking) and for app backups (I use Swift Backup, works great).
Once again thanks for your help and advice on the custom ROM, I think my questions were broad and it may not be Samsung specific as there are features I know I will lose but have never used when I had the original ROM.
Click to expand...
Click to collapse
There are some things you'll lose when unlocking the bootloader on a Samsung, due to the tripped Knox fuse. I can't say much about that though, since I don't do Samsung...
Have fun!
Thanks Didgeridoohan,
This has given me some confidence in going forward with custom ROM. I will make some backups and take measures and if it doesn't work out I can go back but I probably wont .
I've been running LineageOS on my Exynos S10e for a few days now and it's great, better battery life than on Samsung's firmware too from what I can see.
Settings say encryption is enabled. I'm assuming on /data only, I'll have to poke around as I've been away from Android for a while and I haven't been keeping up with what's going on.
I had to use the Magisk props module (selected the same phone model) to pass SafetyNet and enable Google Pay. Banking apps here in Australia don't seem to care, at least CommBank, Bendigo, AMP by I did select them in MagiskHide just in case.
If you decide to go for it, remove all your accounts before flashing the LineageOS recovery. I didn't and wasn't able to flash recovery until I re-added and removed them (Factory Reset Protection kicked in apparently). Smooth ride after I did this.
If you don't like the LOS gestures use Fluid (FNG), I love how customizable it is. You can hide the navigation bar in Termux by running:
su
props qemu.hw.mainkeys 1
Good luck and feel free to ask me questions if you have any!

Categories

Resources