Custom Binary (Vbmeta) blocked by OEM inside download mode of Samsung Galaxy A50 - Android Q&A, Help & Troubleshooting

Hi Guys.
I am new to Forum.
I wanted to root my Samsung A505F/DS but when I try to do flash download mode and using ODIN try to install TWRP but it say "Custom Binary (VBMETA) blocked by OEM. I tried to turn on/off OEM unlocking in developer options but all in vain. Kindly help me out in this regard as i want to root the phone and flash TWRP with custom rom.

You have to disable AVB
Example code ( OF COURSE NOT TESTED ! )
Code:
adb devices
adb pull /vbmeta.img %TEMP%\VBMETA.IMG
adb root
adb shell "setenforce 0"
adb disable-verity
adb reboot fastboot
fastboot --disable-verification flash vbmeta %TEMP%\VBMETA.IMG
fastboot reboot

jwoegerbauer said:
You have to disable AVB
Example code ( OF COURSE NOT TESTED ! )
Code:
adb devices
adb pull /vbmeta.img %TEMP%\VBMETA.IMG
adb root
adb shell "setenforce 0"
adb disable-verity
adb reboot fastboot
fastboot --disable-verification flash vbmeta %TEMP%\VBMETA.IMG
fastboot reboot
Click to expand...
Click to collapse
I tried to code above to disable but it shows " adb: error: failed to start remote object '\vbmeta .img ' : No such file or directory"

okjadoon said:
I tried to code above to disable but it shows " adb: error: failed to start remote object '\vbmeta .img ' : No such file or directory"
Click to expand...
Click to collapse
It's on you to find the correct path to vbmeta.img
Code:
adb devices
adb shell "mkdir -p /data/local/tmp"
adb shell "ls -R / > /data/local/tmp/Android-Tree.txt"
adb pull /data/local/tmp/Android-Tree.txt %TEMP%\Android-Tree.txt
type "%TEMP%\Android-Tree.txt" | more
and input the path found instead of /vbmeta.img

Did u succeed?

jwoegerbauer said:
You have to disable AVB
Example code ( OF COURSE NOT TESTED ! )
Code:
adb devices
adb pull /vbmeta.img %TEMP%\VBMETA.IMG
adb root
adb shell "setenforce 0"
adb disable-verity
adb reboot fastboot
fastboot --disable-verification flash vbmeta %TEMP%\VBMETA.IMG
fastboot reboot
Click to expand...
Click to collapse
Not working on samsungs

Related

Honor 9 doesn't boot to system (Stuck + Bootloop)

Hello,
currently my Honor doesn't boot into the system anymore after trying to flash the OpenKirin's RROS v5.8.4 for Honor 9 Rom. I can boot to Bootloader but not to TWRP. When i tried to flash the Recovery via fastboot, I just get the following error message:
C:\Program Files (x86)\Minimal ADB and Fastboot>fastboot flash recovery twrp-3.1.1-0-stf.img
target reported max download size of 471859200 bytes
sending 'recovery' (18706 KB)...
OKAY [ 0.419s]
writing 'recovery'...
FAILED (remote: Command not allowed)
finished. total time: 0.429s
This happens with every file i tried to flash. My guess is that maybe the USB Debugging has been somehow disabled.
And when I try to boot to the system it Stuck at "Your device has failed verification and may not work properly" and restart every 2 - 3 min.
I also tried this method: https://forum.xda-developers.com/honor-9/how-to/guide-honor-9-t3653719 but it didn't work either because i get error messages after pressing on "update.bat". Maybe because of the USB Debugging.
My device is STF - L09 Europe.
I hope you can help me. Thanks.
Is your bootloader locked? You turned OEM Unlock Off in Developer Settings?
4r44444 said:
Is your bootloader locked? You turned OEM Unlock Off in Developer Settings?
Click to expand...
Click to collapse
Bootloader is unlocked and OEM ist activated.
I finally managed to restore my device!!! I did it with DC Phoenix.
But i notice four things:
- Only the Homebutton didn't work. ( I got onscreen buttons)
- I have a completely wrong model number: generic_a15 (hi3660). Normally it called: STF - L09
- I still can't flash TWRP because of the error message which i already got before: "FAILED (remote: Command not allowed)"
- The NFC Logo in the status bar flashes all the time
Navigation buttons don't work because you probably flashed a factory version L09C432B130, in which this is a known bug. Use a rebrand guide to downgrade to B120 and then update again to B130 via OTA. That will resolve all other issues.
For TWRP you will again need to unlock bootloader because now it is locked and also disable FRP.
lsvet1 said:
Navigation buttons don't work because you probably flashed a factory version L09C432B130, in which this is a known bug. Use a rebrand guide to downgrade to B120 and then update again to B130 via OTA. That will resolve all other issues.
For TWRP you will again need to unlock bootloader because now it is locked and also disable FRP.
Click to expand...
Click to collapse
ok thanks. Where can i get the B120?
Ayeshetu said:
ok thanks. Where can i get the B120?
Click to expand...
Click to collapse
Rebrand guide.
I got this error message:
https://youtu.be/8ex2-dSl6Q8
Phone is on Fastboot mode. Bootloader and FRP are unlocked
That's something related to your computer. Do you by any chance have already installed Cygwin?
1. Check if you already have any CYGWIN_HOME variable in the environment variables. If yes delete it.
2. Run the batch file from the current folder and not from system32.
lsvet1 said:
That's something related to your computer. Do you by any chance have already installed Cygwin?
1. Check if you already have any CYGWIN_HOME variable in the environment variables. If yes delete it.
2. Run the batch file from the current folder and not from system32.
Click to expand...
Click to collapse
now it worked. I just moved it to C: \ Users.
It says that it can't access. Probably because of the wrong model number.
{
"lightbox_close": "Close",
"lightbox_next": "Next",
"lightbox_previous": "Previous",
"lightbox_error": "The requested content cannot be loaded. Please try again later.",
"lightbox_start_slideshow": "Start slideshow",
"lightbox_stop_slideshow": "Stop slideshow",
"lightbox_full_screen": "Full screen",
"lightbox_thumbnails": "Thumbnails",
"lightbox_download": "Download",
"lightbox_share": "Share",
"lightbox_zoom": "Zoom",
"lightbox_new_window": "New window",
"lightbox_toggle_sidebar": "Toggle sidebar"
}
Ayeshetu said:
now it worked. I just moved it to C: \ Users.
It says that it can't access. Probably because of the wrong model number.
View attachment 4246735
Click to expand...
Click to collapse
The name of your phone is wrong because you installed RROS. Check all folders AND files in HWOTA folder and wherever you see 'STF' replace it with 'generic_a15'.
lsvet1 said:
The name of your phone is wrong because you installed RROS. Check all folders AND files in HWOTA folder and wherever you see 'STF' replace it with 'generic_a15'.
Click to expand...
Click to collapse
I changed all folders and files i see (STF) to generic_a15. But there is still the error message. Did it fit what I did?:
https://youtu.be/lVRm_t3n9cM
Ayeshetu said:
I changed all folders and files i see (STF) to generic_a15. But there is still the error message. Did it fit what I did?:
https://youtu.be/lVRm_t3n9cM
Click to expand...
Click to collapse
Still problems with the path. Try it first on another computer and unzip it directly to C:\ . If it still doesn't work I will send you another hwota.sh file.
lsvet1 said:
Still problems with the path. Try it first on another computer and unzip it directly to C:\ . If it still doesn't work I will send you another hwota.sh file.
Click to expand...
Click to collapse
Unfortunately I only have this one computer.
Ayeshetu said:
Unfortunately I only have this one computer.
Click to expand...
Click to collapse
In that case you'll have to do it manually. Flash first twrp recovery via fastboot, then boot into twrp and install the stock OS via ADB. If the phone is already rebranded you can skip rebranding step. Put all files in folder with adb.
Commands
Twrp installation:
Code:
fastboot flash recovery twrp.img
Reboot and boot to TWRP
Stock installation:
Code:
ADB shell "rm -fr /data/update/HWOTA > /dev/null 2>&1"
ADB shell "mkdir /data/update/HWOTA > /dev/null 2>&1"
ADB push update.zip /data/update/HWOTA/update.zip
ADB push update_data_public.zip /data/update/HWOTA/update_data_public.zip
ADB push update_all_hw.zip /data/update/HWOTA/update_all_hw.zip
ADB push STF_RECOVERY_NoCheck.img /tmp/STF_RECOVERY_NoCheck.img
ADB push STF_RECOVERY2_NoCheck.img /tmp/STF_RECOVERY2_NoCheck.img
ADB shell "dd if=/tmp/STF_RECOVERY_NoCheck.img of=/dev/block/mmcblk0p37"
ADB shell "dd if=/tmp/STF_RECOVERY2_NoCheck.img of=/dev/block/mmcblk0p34"
ADB shell "echo --update_package=/data/update/HWOTA/update.zip > /cache/recovery/command"
ADB shell "echo --update_package=/data/update/HWOTA/update_data_public.zip >> /cache/recovery/command"
ADB shell "echo --update_package=/data/update/HWOTA/update_all_hw.zip >> /cache/recovery/command"
ADB reboot recovery
ADB kill-server
lsvet1 said:
In that case you'll have to do it manually. Flash first twrp recovery via fastboot, then boot into twrp and install the stock OS via ADB. If the phone is already rebranded you can skip rebranding step. Put all files in folder with adb.
Commands
Twrp installation:
Code:
fastboot flash recovery twrp.img
Reboot and boot to TWRP
Stock installation:
Code:
ADB shell "rm -fr /data/update/HWOTA > /dev/null 2>&1"
ADB shell "mkdir /data/update/HWOTA > /dev/null 2>&1"
ADB push update.zip /data/update/HWOTA/update.zip
ADB push update_data_public.zip /data/update/HWOTA/update_data_public.zip
ADB push update_all_hw.zip /data/update/HWOTA/update_all_hw.zip
ADB push STF_RECOVERY_NoCheck.img /tmp/STF_RECOVERY_NoCheck.img
ADB push STF_RECOVERY2_NoCheck.img /tmp/STF_RECOVERY2_NoCheck.img
ADB shell "dd if=/tmp/STF_RECOVERY_NoCheck.img of=/dev/block/mmcblk0p37"
ADB shell "dd if=/tmp/STF_RECOVERY2_NoCheck.img of=/dev/block/mmcblk0p34"
ADB shell "echo --update_package=/data/update/HWOTA/update.zip > /cache/recovery/command"
ADB shell "echo --update_package=/data/update/HWOTA/update_data_public.zip >> /cache/recovery/command"
ADB shell "echo --update_package=/data/update/HWOTA/update_all_hw.zip >> /cache/recovery/command"
ADB reboot recovery
ADB kill-server
Click to expand...
Click to collapse
Thanks, I'll try it out.
lsvet1 said:
In that case you'll have to do it manually. Flash first twrp recovery via fastboot, then boot into twrp and install the stock OS via ADB. If the phone is already rebranded you can skip rebranding step. Put all files in folder with adb.
Commands
Twrp installation:
Code:
fastboot flash recovery twrp.img
Reboot and boot to TWRP
Stock installation:
Code:
ADB shell "rm -fr /data/update/HWOTA > /dev/null 2>&1"
ADB shell "mkdir /data/update/HWOTA > /dev/null 2>&1"
ADB push update.zip /data/update/HWOTA/update.zip
ADB push update_data_public.zip /data/update/HWOTA/update_data_public.zip
ADB push update_all_hw.zip /data/update/HWOTA/update_all_hw.zip
ADB push STF_RECOVERY_NoCheck.img /tmp/STF_RECOVERY_NoCheck.img
ADB push STF_RECOVERY2_NoCheck.img /tmp/STF_RECOVERY2_NoCheck.img
ADB shell "dd if=/tmp/STF_RECOVERY_NoCheck.img of=/dev/block/mmcblk0p37"
ADB shell "dd if=/tmp/STF_RECOVERY2_NoCheck.img of=/dev/block/mmcblk0p34"
ADB shell "echo --update_package=/data/update/HWOTA/update.zip > /cache/recovery/command"
ADB shell "echo --update_package=/data/update/HWOTA/update_data_public.zip >> /cache/recovery/command"
ADB shell "echo --update_package=/data/update/HWOTA/update_all_hw.zip >> /cache/recovery/command"
ADB reboot recovery
ADB kill-server
Click to expand...
Click to collapse
So if I have understood correctly, then I must enter these stock installation commands exactly the same in the CMD while the phone is in the TWRP.
In principle yes, but check the file names.

			
				
lsvet1 said:
In principle yes, but check the file names.
Click to expand...
Click to collapse
I have now figured out why I was not able to flash RROS properly. I have apparently made a mistake at the vendor flashing. When i boot the phone now then appears the RROS logo but it stuck there. Will the whole thing work if I install the B130 with DC Phoenix and then flash RROS again or are there other possibilities?

HELP: error: no devices/emulators found

I want to create a script that installs twrp recovery and then installs Magisk without doing any further actions on a Mac.
Code:
#!/bin/bash
# filename run.command
cd ~/platform-tools
adb devices
adb reboot bootloader
fastboot devices
fastboot flash recovery recovery-20181012.img
fastboot boot recovery-20181012.img
# adb wait-for-recovery
# adb wait-for-device
# adb kill-server && sudo adb start-server
adb shell twrp install /sdcart1/Magisk-v19.0.zip
adb shell twrp reboot
After twrp has been installed and booted I get this message
Code:
error: no devices/emulators found
If I make two files out of it then it works
Code:
#!/bin/bash
# filename step1.command
cd ~/platform-tools
adb devices
adb reboot bootloader
fastboot devices
fastboot flash recovery recovery-20181012.img
fastboot boot recovery-20181012.img
Code:
#!/bin/bash
# filename step2.command
cd ~/platform-tools
adb devices
adb shell twrp install /sdcart1/Magisk-v19.0.zip
adb shell twrp reboot
What else can I do?
I found it
Code:
#!/bin/bash
cd ~/platform-tools
adb devices
adb reboot bootloader
fastboot devices
fastboot flash recovery recovery-20181012.img
fastboot boot recovery-20181012.img
sleep 35
adb -d shell twrp install /sdcart1/Magisk-v19.0.zip
adb -d shell twrp reboot

sm-g610f repartition failed in odin

Hi I am having a problem trying to flash my g610f/DD phone. I tried removing the FRP lock with FRP Hijacker by Hagard and it totally messed up the phone where its boot looping. I've read and tried almost all the solutions on this website for that model phone. When I flashed the stock rom it is saying Re-Partition Failed in odin. Also on the phone it says in red "secure check fail". The current binary displays as Custom and the FRP lock is on.
I need some help since I tried a lot of solutions and none of them work.
Thanks,
A phone's NAND flash ( storage memory ) is divided into partitions, each of them is of fixed size. When you try to flash a ROM what contains partitions that exceed the size of already existing partitions then you will run in such a trouble. To get rid off of this you would have to completely clean / format the existing partitions ( except the EFS partition !!! ) before re-flashing a ROM. This can be achieved with ADB / Fastboot commands.
Generic Batch-file Example ( untested ! ) :
Code:
@echo off & setlocal
set "ROM=C:\stockrom.zip"
if NOT exist "%ROM%" ( goto :end )
set "PIT=%TEMP%\pit.txt"
adb devices
adb shell "cd /"
adb shell "ls -d" > %PIT%
if NOT exist "%PIT%" ( goto :end )
adb reboot bootloader
fastboot devices
for /f "tokens=9 delims= " %%a in ( "%PIT%" ) do (
if NOT [%%a]==[] (
echo %%a | findstr /I /C:"/EFS" > nul
if %ERRORLEVEL% NEQ 0 (
set "pn=%%a"
set "pn=%pn:~1,0%"
fastboot format %pn%
)
)
)
del /F /Q "%PIT%"
fastboot flashall %ROM%
fastboot reboot
:end
endlocal & @echo on & exit
Read also here: https://technastic.com/odin-nand-erase-samsung/
Hi Thanks for your reply. I can boot into the recovery mode now but when I tried to run the adb commands it gives me an error closed. Also try to install a stock rom it says custom rom block FRP lock.
itwayne said:
Hi Thanks for your reply. I can boot into the recovery mode now but when I tried to run the adb commands it gives me an error closed. Also try to install a stock rom it says custom rom block FRP lock.
Click to expand...
Click to collapse
In Recovery Mode you can't run most of ADB subcommands as for example "adb shell", this because Android OS isn't running.
jwoegerbauer said:
In Recovery Mode you can't run most of ADB subcommands as for example "adb shell", this because Android OS isn't running.
Click to expand...
Click to collapse
How can I format the partitions to get a stock rom on then if adb cant do it.
Thanks,

Help with flashing Calyxos on Google Pixel 3 XL

Hi guys, just a disclaimer here but I’m a newb when it comes to flashing ROM’s. I’m trying to flash Calyxos but I’m not having any luck. I get a very quick CMD window (using file flash-all.bat) that appears and then disappears and then… nothing. I’ve tried updating and installing adb drivers, downloading the latest adb fastboot (minimal_adb_fastboot_1.4.3_portable), re-downloading Calyxos (crosshatch-factory-2020.09.22.12) and setting the environment variables to reflect the location of the Caylxos files. I’ve already unlocked the phones bootloader and have USB debugging and OEM unlock enabled. When I run “adb devices” using cmd.exe, it’s able to detect the phone, but this is as far as I can get. If anyone has any advice for me, I’d really appreciated it!
Phone has also been updated to Android 11 and has the latest security patches installed
Anybody?
@jspicket1111
I guess you have heavily outdated ADB & Fastboot drivers installed. Use this tool to ensure the latest ones are installed.
I also guess the mentioned flash-all.bat is the one that comes with the Calyxos distribution you try to flash. Correct? If so then you can manually input each of the commands - one by one -
Code:
adb devices
adb reboot bootloader
fastboot devices
fastboot flash bootloader <PATH_TO_BOOTLOADER_IMG_ON_PC_HERE>
fastboot reboot-bootloader
ping -n 5 127.0.0.1 >nul
fastboot flash radio <PATH_TO_RADIO_IMG_ON_PC_HERE>
fastboot reboot-bootloader
ping -n 5 127.0.0.1 >nul
fastboot erase avb_custom_key
fastboot flash <PATH_TO_AVB_CUSTOM_KEY_BIN_ON PC_HERE>
fastboot reboot-bootloader
ping -n 5 127.0.0.1 >nul
fastboot -w --skip-reboot update <PATH_TO_CALYXOS_OS_ZIP_ON_PC_HERE>
fastboot reboot-bootloader
ping -n 5 127.0.0.1 >nul
in a Windows CMD window ( not in a Powershell window ! ) and execute it to see whether an error occurs or not.
Awesome! I'll try it again this evening and report back. Thank you very much for the help
jwoegerbauer said:
@jspicket1111
I guess you have heavily outdated ADB & Fastboot drivers installed. Use this tool to ensure the latest ones are installed.
I also guess the mentioned flash-all.bat is the one that comes with the Calyxos distribution you try to flash. Correct? If so then you can manually input each of the commands - one by one -
Code:
adb devices
adb reboot bootloader
fastboot devices
fastboot flash bootloader <PATH_TO_BOOTLOADER_IMG_ON_PC_HERE>
fastboot reboot-bootloader
ping -n 5 127.0.0.1 >nul
fastboot flash radio <PATH_TO_RADIO_IMG_ON_PC_HERE>
fastboot reboot-bootloader
ping -n 5 127.0.0.1 >nul
fastboot erase avb_custom_key
fastboot flash <PATH_TO_AVB_CUSTOM_KEY_BIN_ON PC_HERE>
fastboot reboot-bootloader
ping -n 5 127.0.0.1 >nul
fastboot -w --skip-reboot update <PATH_TO_CALYXOS_OS_ZIP_ON_PC_HERE>
fastboot reboot-bootloader
ping -n 5 127.0.0.1 >nul
in a Windows CMD window ( not in a Powershell window ! ) and execute it to see whether an error occurs or not.
Click to expand...
Click to collapse
So far I'm making progress. I've got to the part where I'm entering, "fastboot flash <PATH_TO_AVB_CUSTOM_KEY_BIN_ON PC_HERE>" and I'm getting this error in CMD...
C:\Users\XXX\Desktop\Google_Pixel_Tools_Blueline_Pixel3\platform-tools_r30.0.5-windows(1)\platform-tools>fastboot flash "C:\Users\XXX\Desktop\Google_Pixel_Tools_Blueline_Pixel3\platform-tools_r30.0.5-windows(1)\platform-tools\avb_pkmd.bin"
unknown partition 'C:\Users\XXX\Desktop\Google_Pixel_Tools_Blueline_Pixel3\platform-tools_r30.0.5-windows(1)\platform-tools\avb_pkmd.bin'
fastboot: error: cannot determine image filename for 'C:\Users\XXX\Desktop\Google_Pixel_Tools_Blueline_Pixel3\platform-tools_r30.0.5-windows(1)\platform-tools\avb_pkmd.bin'
I feel like I'm almost there! Not sure if it matters... but the "avb_pkmd.bin" file is only 1 KB in size. Anyhow, I'm not really sure how to fix this error. Would you be willing to help me out again?
jspicket1111 said:
So far I'm making progress. I've got to the part where I'm entering, "fastboot flash <PATH_TO_AVB_CUSTOM_KEY_BIN_ON PC_HERE>" and I'm getting this error in CMD...
...
Unknown partition 'C:\Users\XXX\Desktop\Google_Pixel_Tools_Blueline_Pixel3\platform-tools_r30.0.5-windows(1)\platform-tools\avb_pkmd.bin'
Click to expand...
Click to collapse
Line
Code:
fastboot flash <PATH_TO_AVB_CUSTOM_KEY_BIN_ON PC_HERE>
should read as
Code:
fastboot flash [color=red]avb_custom_key[/color] <PATH_TO_AVB_CUSTOM_KEY_BIN_ON PC_HERE>
Was a copy / paste error. Sorry for this.
jwoegerbauer said:
Line
Code:
fastboot flash <PATH_TO_AVB_CUSTOM_KEY_BIN_ON PC_HERE>
should read as
Code:
fastboot flash [color=red]avb_custom_key[/color] <PATH_TO_AVB_CUSTOM_KEY_BIN_ON PC_HERE>
Was a copy / paste error. Sorry for this.
Click to expand...
Click to collapse
I finally got it! Thank you very much for the help!

Been a while since I tried to root a device and first time ever from a linux device , halp pls ubuntu users ?

So the device is a motorola one hyper , bootloader is unlocked . TWRP is on micro sd , internal at root dir and adb folder .
I rebooted to bootloader . tried to flash and boot to renamed twrp.img im getting a access denied from SU in ubuntu terminal
adb reboot bootloader works . adb devices lists and sees my device .
Fastboot boot twrp.img or fastboot flash recovery twrp.img comes back with a permission denied error. Again Im sudo su to get root permissions when I run the commands.
I just want root access .
Any ideas ?
Also current slot set to B on device. Maybe this is why I cant boot TWRP ???
Set slot to a as it was set active to slot b same permission denied.
On the active slot ( A ) disable SELinux, dm-verity and/or AVB ( read: Android Verified Boot ) if not done yet. FYI: Slot B is used by OTAs.
Synthax:
Code:
fastboot --disable-verity --disable-verification flash vbmeta_a <vbmeta.img>
jwoegerbauer said:
On the active slot ( A ) disable SELinux, dm-verity and/or AVB ( read: Android Verified Boot ) if not done yet. FYI: Slot B is used by OTAs.
Synthax:
Code:
fastboot --disable-verity --disable-verification flash vbmeta_a <vbmeta.img>
Click to expand...
Click to collapse
The active slot by default was b I switched it to a
jwoegerbauer said:
On the active slot ( A ) disable SELinux, dm-verity and/or AVB ( read: Android Verified Boot ) if not done yet. FYI: Slot B is used by OTAs.
Synthax:
Code:
fastboot --disable-verity --disable-verification flash vbmeta_a <vbmeta.img>
Click to expand...
Click to collapse
whats vbmeta.img ? Is that just a standin for my twrp.img name or ?
vbmeta.img actually contains the hashes/keys for the boot, system, and vendor partitions.
More info here:
https://android.googlesource.com/platform/external/avb/+/master/READstructME.md#The-VBMeta-
In your case you have to pull out the existing vbmeta.img, and then pass this copy to fastboot as already shown above.
Example:
Code:
adb devices
adb shell "mkdir -p -m0664 /data/local/tmp/vbmeta"
adb shell "dd if=<DEVICE_NAME_OF_VBMETA.IMG> of=/data/local/tmp/vbmeta/vbmeta.img bs=4096"
adb pull /data/local/tmp/vbmeta/vbmeta.img %TEMP%\vbmeta.img
adb shell "rm -rF /data/local/tmp/vbmeta/*"

Categories

Resources