[Samsung Galaxy A50 Guides, News, & Discussion] fuzz500:
Adapting instructions for Linux/A505W - Canada

Greetings, I'm attempting to adapt the instructions by [MENTION=4934345]Darkcannibal[/MENTION] for my country variant for Canada (A505W) to use with Linux/Heimdall/ADB/Fastboot. I have some outstanding questions before pulling the trigger. I have BTC6 software, and based on [MENTION=8935656]JohnFreeman646[/MENTION] comments, he indicated [MENTION=4934345]Darkcannibal[/MENTION]'s procedure worked on his A505W.

I'm including inline here my interpretation of how ODIN file stores AP, BL, CP, and CSC map to actual partitions, and how I would proceed with Heimdall to flash.

I've also have a spreadsheet showing how I mapped it. PM me if you want a copy, I didn't see an option to upload here.

I welcome comments or guidance.

Regards, Fuzz

Instructions from [MENTION=4934345]Darkcannibal[/MENTION] modified by [MENTION=11061301]fuzz500[/MENTION] for Linux/Heimdall

Hi, i update the guide for Android 10 -BTC4- (only UB)

-Need UNLOCK BOOTLOADER if you try on LOCKED BOOTLOADER you have a nice brick

1. Download stock Firmware (i downloader by samfirm)

2. Disable Autoreboot in odin options

3. Enter Download Mode : Turn Power Off. Press and hold Volume Up key + Power Key

4. Flash on Odin Stock Firm: BL, AP, CSC (i use CSC_HOME but CSC work any), CP. Never flash only an AP file, as Odin can shrink your /data file-system if you do.

Q1. if you are running the stock firmware which came pre-installed on

your phone, which I am, why should you need to (re) flash the stock

firmware onto your phone. It's already there?

- or in the case of these instructions, you could flash BTC4, but since

I'm running BTC6, I presume that you would trigger an error, now

allowed to downgrade.

- See the Map to see which files go to which partitions

- Assuming you have to do this step, linux/heimdall instructions here

In an arbitrary directory, Unzip all stock files until you can't unzip anymore

you will get 20 .img.lz4 files

they must be .img OR .bin files to flash with Heimdall

how do you un-lz4 them? -->	apt install liblz4-tool

unlz4 whateverfilename.img.lz4 x 20 times until you have all .img and .bin files

Now with Heimdall flash all of the .img and .bin files to the *correct* partitions

what ODIN calls AP

heimdall flash --DTB	dt.img	--no-reboot

heimdall flash --DTBO	dtbo.img	--no-reboot

heimdall flash --BOOT	boot.img	--no-reboot

heimdall flash --RECOVERY recovery.img	--no-reboot

heimdall flash --SYSTEM	system.img	--no-reboot

heimdall flash --USERDATA userdata.img	--no-reboot

heimdall flash --VENDOR	vendor.img	--no-reboot

heimdall flash --VBMETA	vbmeta.img	--no-reboot

AP bundle also contains meta-data folder with a fota.zip file

Q2 - do we need to action this?

what ODIN calls BL	note .bin file extensions

heimdall flash --CM	cm.bin	--no-reboot

heimdall flash --KEYSTORAGE	keystorage.bin --no-reboot

heimdall flash --PARAM	param.bin	--no-reboot

heimdall flash --SBOOT	sboot.bin	--no-reboot

heimdall flash --UH	uh.bin	--no-reboot

heimdall flash --UP_PARAM	up_param.bin	--no-reboot

heimdall flash --VBMETA	vbmeta.img	--no-reboot

Q3. AP bundle has vbmeta.img DUPLICATE??? flash or not?

what ODIN calls BL	note .bin file extensions

heimdall flash --RADIO	modem.bin	--no-reboot

heimdall flash --CP_DEBUG	modem_debug.bin	--no-reboot

what ODIN calls CSC

heimdall flash --CACHE	cache.img	--no-reboot

heimdall flash --OMR	omr.img	--no-reboot

heimdall flash --PRODUCT	product.img	--no-reboot

Comment1: in this bundle there is a .pit, partition table. Presumably,

we don't need to re-partition

Q4. do you need to flash or otherwise action the fota.zip files?

-This step its obligatory.

5. Press and hold Volume Down key + Power Key, device reboot, then quickly press and hold Volume Up key

+ Power Key Samsung Logo appears release Power Key only, keep pressing Volume Up key until Android

Recovery Mode Appears and device restart, quickly press again Vol Up and Power Key, dont release Vol Up

Android Recovery Mode Appears, now you are in stock recovery.

6. Do a Factory Reset and then reboot to bootloader again.

7. Flash in odin only AP the TWRP in this thread, press and hold Volume Down key + Power Key, device reboot,

then quickly press and hold Volume Up key + Power Key Samsung Logo appears release Power Key only, keep

pressing Volume Up key until TWRP appears.

8. Format Data type YES (TWRP cannot use encrypted data partition).

9. Flash multidisabler zip.

10. In TWRP select reboot to recovery.

11. Success, now you have rooted and twrp in A505F