[ SECURITY ] re-lock bootloader and custom recovery - Samsung Galaxy A8 (2018) Questions & Answers

after successfully flashing TWRP, Rooting and Installing Custom ROM, now I would like to :
-re-lock the bootloader (download mode) to prevent anyone from flashing a new ROM or any file by odin
but the OEM button in Dev Option is not available at all (disappeared)
- I would like to disable or lock access to the recovery (Custom TWRP) and download mod
I don't know
-disable power button when device is locked to prevent any one from powering it off without typing lock screen password
any ideas on how to please ? will be appreciated

I don't think you can re-oem-lock the bootloader without a stock-based ROM, and as far as I know, even if it's stock-based, it won't let you boot unless it's unmodified stock.
You can "disable access" to the recovery by basically making the recovery.img unbootable, or by making it boot to android (by flashing the boot.img to the recovery partition)
I don't think there's any method to disable access to download mode without hard bricking the device, or cutting the traces to a key on the mobo(and even then if you are rooted, you could technically reboot to download mode from android).
You can disable the power button long press on some ROMs, but it's pretty useless, since you can hard reset the phone by pressing power+vol down for 7 seconds, and there's no way to disable that without opening your phone up, and cutting the traces to your power or/and vol down button, and I don't think anyone would want to do that.

Related

[Q] Vol. down + power dosen't enter the bootloader

After I updated my (unrooeted/locked) Nexus S (9023) to 4.0.3 I wanted to try the 4.0.4 upgrade. After the 4.0.3 the recovery mode lost the backlight, so I figured the it was a good time to root.
I tried this one-click script to unlock. It worked and I installed CWMR and flashed the 4.0.4 upgrade. After a reboot the phone had ICS 4.0.4 and got root.
But not all is working. I lost the ability to get into the bootloader by pressing 'vol down.' & 'power'. The phone just starts normally.
The only way I can get into the bootloader, is to "reboot to bootloader" from a command line. If I choose recovery, I get a picture of an android at its back with a red ! (2105.dk/temp/img_1161.jpg). After two minutes it automatically reboots. What has gone wrong? What does it mean? And how can I fix it?
I'm new at this, so i'm out of ideas
try Vol up + power
Ahhh... now i'm feeling a bit stupid
Okay, i'm able to get into the bootloader, but the problem with the recovery still remains. (what does the picture mean? - 2105.dk/temp/img_1161.jpg)
I've tried both CWRM and TWRP. They seems to flash with no errors, but i still can not get them started from the bootloader (fastboot mode?).
Not sure if it's what you are looking for since I can't see the picture you are talking about but I think it's the recovery "security" screen. When you are there press power first and maintain it to press vol up, you should now be into the recovery...
Also remember stock rom has a script that overwrites any custom recovery with stock recovery each time the rom loads.
Yes, pressing [power] + [vol. up] at the recovery "security/error" screen, starts up a recovery.
I also didn't knew that the stock ROM overwrites the recovery. I never seen it mentioned any where else.
Thanks for the hints.
Okay, after learning how the stock OS trying to reinstall stock recovery, I managed to rename /etc/install-recovery.sh to *.bak
Now the stock recovery stays away, and CWM recovery stays on permanent.
Also, the error screen doesn't show up any more. (never found out what it means)

detect keypress during boot

Hi,
Is there any way to detect the volume up/down presses during the boot?
Something similar to this: http://forum.xda-developers.com/gal...kernel-dual-boot-powered-boot-custom-t2204705
* Normal Boot -> No keys are pressed, cyan LED ->Find kernel in /data/media/boot/1st.img
* Recovery Boot -> Volume Up key pressed, green LED -> Go to recovery
* Custom Boot -> Volume Down key pressed, blue LED ->Find kernel in /data/media/boot/2nd.img
Thanks.
Xposed has a disable feature which can be triggered during boot by repetitively pressing random keys, so yes its possible, only after enough has started to be able to tell if they're pressed. LED too. But by the time it can tell if something is pressed, you'd already have to do a full reboot to do what you want it to do.
You won't be able to switch kernels like that since you'd HAVE to go into the bootloader to boot one (and you can't really script that on the phone itself) or have to reboot into recovery and reflash the kernel (maybe with a recovery script). No point in the way you want to boot into recovery either, since you can just go into the bootloader and enter recovery from there, rather than booting into Android, then rebooting again into recovery.
Maybe possible if you edit the kernels, ROM and the recovery (maybe even the bootloader - don't know if its possible, could be a brick), but its overkill. There's already an easy enough way to get into recovery. Just flash the kernel if you want to switch.
Lethargy said:
You won't be able to switch kernels like that since you'd HAVE to go into the bootloader to boot one (and you can't really script that on the phone itself) or have to reboot into recovery and reflash the kernel (maybe with a recovery script). No point in the way you want to boot into recovery either, since you can just go into the bootloader and enter recovery from there, rather than booting into Android, then rebooting again into recovery.
Maybe possible if you edit the kernels, ROM and the recovery (maybe even the bootloader - don't know if its possible, could be a brick), but its overkill. There's already an easy enough way to get into recovery. Just flash the kernel if you want to switch.
Click to expand...
Click to collapse
Thanks for answering. Indeed, simply flashing a kernel in recovery would definitely be the easiest.
You can boot another kernel from the current kernel using kexec_hardboot (implemented in many kernels) so probably a hook like Xposed that clals kexec_hardboot would work.
I believe (I haven't checked but I recall seeing somewhere) that Nexus 5 has actually two bootloader zones so you have a backup in case you mess one up. This, however, is useless since the bootloader is closed source.
wkwkwk said:
Thanks for answering. Indeed, simply flashing a kernel in recovery would definitely be the easiest.
You can boot another kernel from the current kernel using kexec_hardboot (implemented in many kernels) so probably a hook like Xposed that clals kexec_hardboot would work.
I believe (I haven't checked but I recall seeing somewhere) that Nexus 5 has actually two bootloader zones so you have a backup in case you mess one up. This, however, is useless since the bootloader is closed source.
Click to expand...
Click to collapse
Yeah, there's a secondary bootloader which "some" people have gotten into, but others couldn't. I still wouldn't attempt to mess with it either way.

Recovery Flash not working

Hello, I bought a OnePlus one (came with CM11 - 4.4.4) and followed the standard steps to root it
1) unlock bootloader - successful, phone got factory reset, checked the status using fastboot
2) Flash custom recovery (TWRP) using fastboot - always "okay" message
3) The phone DOES NOT boot to recovery after this - it gets stuck at the 1+ logo, or remains stuck for a few seconds and goes to normal reboot. -I've tried using fastboot to reboot phone while holding down volume button
Please help! i've look this problem up and haven't found a solution.
I tried 2.7.0.0, and the latest 2.8.5.1, along with 2.8.6.0, along with trying to use the one plus tool kit. Using the toolkit, even flashing the stock recovery, then booting it didn't work.
after you flash recovery in fastboot, do not issue the fastboot reboot command. you need to manually power off the phone by keeping the power button pressed till it powers off
kenboyles72 said:
after you flash recovery in fastboot, do not issue the fastboot reboot command. you need to manually power off the phone by keeping the power button pressed till it powers off
Click to expand...
Click to collapse
I tried this, same result
ak14523 said:
I tried this, same result
Click to expand...
Click to collapse
As the other posted mentioned you have to fastboot flash twrp (2.8.6.0) then power off phone and use volume down + power button combo to get to recovery. Its flashing but if you boot to OS it will be overwritten by CM recovery hence booting directly will alleviate that
Boot into os, enable dev options by tapping the build number a bunch of times in settings-about phone section, go back and go into settings-developer options, make sure "update cyanogen recovery" is unchecked. Flash recovery again, and like people have said, power off the phone and use volume down and power buttons together to boot into recovery.
Thanks for the quick replies guys. I have tried all the above s and none of them have worked
Should I try unlocking the bootloader again?
I recommend going to this guide and following it closely: http://forum.xda-developers.com/oneplus-one/general/guides-bacon-timmaaas-how-to-guides-t2839471
As for which version of TWRP to use, I recommend this version: https://www.androidfilehost.com/?fid=24391638059059048

FRP Lock AND dm-verity verification issues

I've been searching and I have come empty.
I bought this pre owned S7 G935FD and I rooted,flashed twrp and Magisk. Was trying to make FlyGPs a system app and I succeeded but it still required me to toggle Mock locations at Developer Options. Toggling this is detected by PoGo and toggling it off makes FlyGPS useless.
That's how I ended up with developer options off.
I went on to delete the app manually from the system app and then decided to reboot just to see if it was gone.
I ended up with a brick throwing in dm-verity error. At this point I should have flashed the verity zip through twrp but instead I flashed stock rom giving away my precious twrp.
Now i have lost twrp and I have dm-verity error.
My request to you dear members is a solution. How do I remove FRP lock from recovery without booting because all methods i have include boot yet i can't boot because of verity?
Get Smart Switch on your PC, enter downloading mode on your phone (power + home + vol down) and install stock rom.

Phone is not power up?

I flashed cwm recovery over TWRP from this link below . now phone is not power on?
http://androidhost.org/hUhuh
Any suggestion. :crying:
sanrajbhar said:
I flashed cwm recovery over TWRP from this link below . now phone is not power on?
http://androidhost.org/hUhuh
Any suggestion. :crying:
Click to expand...
Click to collapse
Press volume down while powering on. Does the bootloader appear? If it does, use
Code:
fastboot flash recovery NAMEOFTWRPIMAGE.img
Code:
fastboot boot NAMEOFTWRPIMAGE.img
Backup your data, reboot to bootloader and flash stock ROM before proceeding to flash a custom ROM (or try flashing the custom one directly).
xMotoDA said:
Press volume down while powering on. Does the bootloader appear? If it does, use
Code:
fastboot flash recovery NAMEOFTWRPIMAGE.img
Code:
fastboot boot NAMEOFTWRPIMAGE.img
Backup your data, reboot to bootloader and flash stock ROM before proceeding to flash a custom ROM (or try flashing the custom one directly).
Click to expand...
Click to collapse
I tried volume down with power button but it does not working, no bootloader or sceen on. can I assume now nothing can be done.
My phone was rooted and installed with AOSP rom .
sanrajbhar said:
I tried volume down with power button but it does not working, no bootloader or sceen on. can I assume now nothing can be done.
My phone was rooted and installed with AOSP rom .
Click to expand...
Click to collapse
I have a similar issue, as my phone also cannot turn on and I have TWRP recovery.
I had rooted my phone with SuperSU and unlocked the bootloader via motorola's tool. But then due to SafetyNet, apps such as Snapchat wouldn't work (cant log in), and I couldn't download Netflix (totally a huge issue).
So I decided to try switching to Magisk instead, as I heard that uses systemless root that doesnt trip Safety Net. While uninstalling SuperSU (using the built in feature for full removal), I was able to uninstall SuperSU and unroot my phone, but was not able to restore the stock boot image in the process. It was at this point I made a NANdroid backup in case I stuffed anything up.
Because of this, I was unable to flash Magisk via the TWRP recovery, so I downloaded a previous version of the firmware from January to flash back to from here. After flashing this and also wiping the user data, my phone booted up fine and worked, and appeared to be in normal condition.
However, then I elected to download and install the firmware update. This all went well, and was installing, until just at the end of the process, when the phone turned off. It had over 60% battery at the time.
At this point in time I'm still unable to get it to boot up, even into recovery or fastboot mode, so I cant really do anything, or restore my NANdroid backup.
If I plug it into my laptop, and hold the power + volume button down for a period of time, I can hear the USB connected tone (Windows 10), which then switches to a disconnected tone and a "USB device malfunctioned" error message pops up.
I tried leaving it unplugged all of last night just in case it was stuck in a boot loop or something so the screen couldn't display anything, in order to flatten the battery, but obviously I couldn't tell any difference. I'm currently now trying to have it plugged into power for an extended period of time just in case it is actually just flat. The current condition is just a black screen as if there was no power at all, with no lights or anything, regardless of a charger being connected, with the buttons not doing anything (I've attempted holding down the power and volume down buttons together for at least 2 minutes to no effect)
Any help would be greatly appreciated.
My specs: Moto G Turbo (2015), model XT1557, running Android 6.0.1. Can't remember exactly, but it previously had the latest firmware available before I tried flashing the January firmware.

Categories

Resources