Code examples too flash stock firmware into samsung download mode? - IDEs, Libraries, & Programming Tools

Could someone provide an example of programmatically flashing in download mode the same way other tools do such as z3x & Odin ?
or even an example of something more simple like just pushing the 'recovery.img' file in download mode...
anything will help, I prefer the examples too be in C or Python.
My goal is to be able too flash in a similar way Odin does using AP, BL, CP, CSC

Related

RESOLVED : How to unbrick my sg4 i9505 after wipes ?

I need helps to unbrick my i9505
Before ,phone was on Android 5.0.1
& Base band OHD7
After an wipe all data
I get this screenshot &
phone is not recognize by pc
I have download mode but
i cant obtain recovery mode
Bigs Thanks for all replies.
Download from Sammobile the firmware for your model and country,put the phone in download mode en flash the firmware with Odin and all should be fine
Bigs thanks for answering
I will tray but not with big conviction
Because phone in download mode
is not detected by pc
I will test other pcs & other cables
Thanks very much
Two days ago i had the same issue and i tried on Windows Vista and on Windiws 10,no succes. Succes on Windows 7.
Do you have KIES on your pc? If not download Kies,it will install the nesesarry drivers on your pc.
hi , ludoke
i tried 2nd time with another laptop :
Now my phone is detected by pc on download mode it work on win7
i flash firmware but
i get FAIL with notification there is no partition : attached screenshot
Always no recovery mode and normal reboot give screen get issue with pc <-------->phone
i will try with kies
thanks for encouragements & helps
Then you have to search for firmware with Pit. file and CSC and Modem, Firmware files and flash with Odin ,repartition ticked.
Search or ask here on XDA, i can't help you with that
Did you unpack the firmware zipfile once ? Don't flash the zip file and do NOT tick repartition if you have just 1 file(tar)
Different usb port/ make sure you flash not an old firmware when you are on the knox bootloader.
Hi , Lennyz1988 & Kudoke
Before sofbrick phone was android v5.0.1 & Base band OHD7
I tried flash firmware XXUHOA7 with pit on odin 3.10.6
But i get FAIL attached screenshot on #1
i will test with other odin versions & other pc always win7
kind regards
In howmany files was that firmware ? Firmware from Sammobile has mostly 1 file in the zip,so my advice is to download firmware from Sammobile for your model and country,unpack the zipfile once and you get two files . Go to download mode.
Flash the biggest file in the AP box in Odin and do NOT thick repartition. Use Odin 3.09
Also,use usb 2 port
Lastly i success the flash
I get this far
for that i have reinstalled new Os windows 7 on laptop
i use odin 3.09 and the same firmware XXUHOA7 with 4 files no pit
miraculous thing : green PASS , attached screenshot on #1
i have average fifties flashs sucess & a dozen different devices rooted
but this one make me very happy
I hope that noobs friends share & take advantage of my modest experience in 3 days
Thousand thanks for Ludoke & Lennyz1988.

SM-G900FD (dual sim) stuck in bootloop

My Mom has an SM-G900FD > I think Russian because of the letters on the packaging and I recall the starting language to be russian or maybe Ukrainian.
My mom was taking pictures when suddenly the damn thing turned off and now stuck in bootloop.
I have tried flashing through ODIN the following firmwares and I cant get the damn thing to boot.
BOF1
ANJ1
BOE2
BOB2
BNL9
I dont have any information on the phone model other than what I mentioned earlier. I used Odin 3.10.7 and added the md5 file to the AP button. All of the firmwares I mentioned above resulted in bootloop. Any help/guidance would be truly appreciated. Am I flashing the correct firmware? Correct ODIN? Correct button in ODIN? (AP, CP, CSC, BL)??
Thanks a bundle
Model: G900FD
same here ... but here I have one g900fd with product code: g900wd (assuming wrong flash). After flashing via KIES sometimes hangs while playing samsung logo or hangs/crashes right after with black screen.
any help
guntherguerra6 said:
I dont have any information on the phone model other than what I mentioned earlier. I used Odin 3.10.7 and added the md5 file to the AP button. All of the firmwares I mentioned above resulted in bootloop. Any help/guidance would be truly appreciated. Am I flashing the correct firmware? Correct ODIN? Correct button in ODIN? (AP, CP, CSC, BL)??
Thanks a bundle
Click to expand...
Click to collapse
hbushi said:
Model: G900FD
same here ... but here I have one g900fd with product code: g900wd (assuming wrong flash). After flashing via KIES sometimes hangs while playing samsung logo or hangs/crashes right after with black screen.
any help
Click to expand...
Click to collapse
Install Smart Switch on a PC, and use the option Emergency software recovery and initialization.

Corrupted PIT

After installing TWRP, following the instructions precisely - at least as far as I can recall - I somehow messed up my PIT (partition information table fwiw). I noticed that I couldn't access my SD-card while in the recovery and upon exiting TWRP I encountered a bootloop. I tried to reflash my phone with a stock ROM but got an error message stating that 'There is no PIT partition'. Lovely. After owning the majority of the Galaxy S series and flashing them to tears, I finally encountered this issue.
I was rooting my S8 to tinker with remapping the Bixby button the hard but right way, without work-arounds. Found a thread on the S8+ forums, here's the link.
Anyway, long story short: I need a new PIT file from someone with an Exynos 64GB model. It's pretty easy to extract but you do need to be rooted.
The required terminal command is:
Code:
dd if=/dev/block/mmcblk0 of=/sdcard/out.pit bs=8 count=580 skip=2176
It can be run on the device and through adb, superuser rights are required.
Would anyone be kind enough to help me out?
EDIT:
Welp, looks like I might be fine after all. There's a PIT file in the CSC-part of a stock ROM. Flashing stuff as we speak, will update. I feel stupid about not googling, I panicked because it's a brand new device and I assumed there wouldn't be any available. Goes to show how tricky assumptions are.`
EDIT 2:
Kill me now. I didn't read the instructions properly and forgot to hold the key-combo to enter recovery immediately after flashing TWRP.
I have the same problem but nothing works for me. I am unable to do anything with the phone at the moment. Please help me!
I can hopefully help..
TarekElsakka said:
I have the same problem but nothing works for me. I am unable to do anything with the phone at the moment. Please help me!
Click to expand...
Click to collapse
I've just overcome this issue with my S8 also however it took me over a day of research. This should hopefully help as for some reason my S8 doesn't like TWRP.
Firstly Download the BL file for AQG5 (google will reveal it).
Next, you should have your regions AP, BL, CSC and CP files to hand.
Open the CSC file with winzip or 7zip and extract just the .PIT file onto your desktop.
Now put your phone into download mode (power, bixby, volume down).
Open ODIN and connect your phone, in 'options' select 'repartition', then click the PIT tab and after the warning select the extracted PIT file that you placed on your desktop.
Also select the AQG5 BL file and ensure that this box is ticked.
Now in ODIN press start and it should repartition your phone. If it doesn't work for some reason (it didn't for me a couple of times) and gives the DEVICEINFO failure, you need to reenter download mode, and keep your fingers over those buttons (power, bixby, volume down). Now click start (it's a multi finger juggle proceedure) and keep hitting 'start' just as you've pressed the 'volume up' to go into download mode. For some reason the PIT will now be flashed and although you'll still have the boot screen you'll at least have the partition to be able to flash the rest of the software.
Finally, reset ODIN and restart, then select your regions Ap, BL, CSC and CP files, ensure that 'repartion isn't selected and click start.
Problem solved.. now try and find an alternative custom recovery because i can't find one.
Good luck.
Barry
holidayaddict1 said:
I've just overcome this issue with my S8 also however it took me over a day of research. This should hopefully help as for some reason my S8 doesn't like TWRP.
Firstly Download the BL file for AQG5 (google will reveal it).
Next, you should have your regions AP, BL, CSC and CP files to hand.
Open the CSC file with winzip or 7zip and extract just the .PIT file onto your desktop.
Now put your phone into download mode (power, bixby, volume down).
Open ODIN and connect your phone, in 'options' select 'repartition', then click the PIT tab and after the warning select the extracted PIT file that you placed on your desktop.
Also select the AQG5 BL file and ensure that this box is ticked.
Now in ODIN press start and it should repartition your phone. If it doesn't work for some reason (it didn't for me a couple of times) and gives the DEVICEINFO failure, you need to reenter download mode, and keep your fingers over those buttons (power, bixby, volume down). Now click start (it's a multi finger juggle proceedure) and keep hitting 'start' just as you've pressed the 'volume up' to go into download mode. For some reason the PIT will now be flashed and although you'll still have the boot screen you'll at least have the partition to be able to flash the rest of the software.
Finally, reset ODIN and restart, then select your regions Ap, BL, CSC and CP files, ensure that 'repartion isn't selected and click start.
Problem solved.. now try and find an alternative custom recovery because i can't find one.
Good luck.
Barry
Click to expand...
Click to collapse
I had the same issue as you, after making a multitude of mods to my phone (S8+) I ended up bricking it pretty good. It would not boot to recovery, like the recovery partition image was not there. I could only get it into download mode. After pissing with different versions of ODIN, I saw that it told me I had no PIT
I stumbled across your post and man o man, the amout of time and the way you have to finagle ODIN and the putting the phone in download mode sucks! You have like milliseconds to put the phone in download mode and start the flash via odin. Took me like 20 tries, but was finally able to flash the PIT file and the other AP, BL, CP, and CSC and finally, FINALLY got my phone back.
I will pay more attention to the mods I make, but at least I know I can recover from it.
Thanks Barry
i have a s8 with the same problem, but the pit way dosent work.
every flash ends in3 sec. with fail.
nighty said:
i have a s8 with the same problem, but the pit way dosent work.
every flash ends in3 sec. with fail.
Click to expand...
Click to collapse
Hi Nighty,
It does work...like I said in my post, you have to be lightening quick with putting the phone in download mode and hitting start in ODIN. Its almost like you have to hit start in ODIN a split second before ODIN shows the device as added. Its nerve racking and frustrating as hell, but it does work. I was using ODIN 3.12 if that helps. Not sure what version you use or what version Barry used.
Good luck and keep trying.
it works .. thx
I emailed TWRP about this issue as it's clearly not just my phone with the problem. They didn't reply.
Has anyone else found an alternative custom recovery for the S8 Exynos?
holidayaddict1 said:
I've just overcome this issue with my S8 also however it took me over a day of research. This should hopefully help as for some reason my S8 doesn't like TWRP.
Firstly Download the BL file for AQG5 (google will reveal it).
Next, you should have your regions AP, BL, CSC and CP files to hand.
Open the CSC file with winzip or 7zip and extract just the .PIT file onto your desktop.
Now put your phone into download mode (power, bixby, volume down).
Open ODIN and connect your phone, in 'options' select 'repartition', then click the PIT tab and after the warning select the extracted PIT file that you placed on your desktop.
Also select the AQG5 BL file and ensure that this box is ticked.
Now in ODIN press start and it should repartition your phone. If it doesn't work for some reason (it didn't for me a couple of times) and gives the DEVICEINFO failure, you need to reenter download mode, and keep your fingers over those buttons (power, bixby, volume down). Now click start (it's a multi finger juggle proceedure) and keep hitting 'start' just as you've pressed the 'volume up' to go into download mode. For some reason the PIT will now be flashed and although you'll still have the boot screen you'll at least have the partition to be able to flash the rest of the software.
Finally, reset ODIN and restart, then select your regions Ap, BL, CSC and CP files, ensure that 'repartion isn't selected and click start.
Problem solved.. now try and find an alternative custom recovery because i can't find one.
Good luck.
Barry
Click to expand...
Click to collapse
THANNK YOU SOOOO MUCH,I i had a recovery seandriod brick,and your method save me!!!
bricked my s8 with an attemt at TWRP flash, this perfect instruction unbricked it. Many kudo's!!! Saved me hundreds of $ can't thank you enough
sorry to resurrect an old thread, but would this method work with nand erase all with S8?
Hi.
Any chance someone can translate this into English?
"Firstly Download the BL file for AQG5 (google will reveal it).
Next, you should have your regions AP, BL, CSC and CP files to hand."
BL = Bootloop?
AQG5 = ???
AP = ??
BL = Bootloop?
CSC = Country Specific Code??
CP = ???
Have just bought a Galaxy SIII Mini GT-I8200 which I am trying to Root and/or install TWRP, with zero luck after 48 hours solid of trying various methods... ADB, ODIN, TWRP.apk etc. etc.
Have been using Linux Mint 20 but am gonna install Windows tomorrow as this is now beyond a joke. All I wanted to do was erase all the Google Nazi stuff.
ADB keeps coming back as unverified signature and ODIN is stuck on 'corrupted PIT file'.
So HOW does one resolve a fecked PIT file? when the instructions above are in a foreign language?
Any help will be greatly appreciated.
Two Tonne Tubbs said:
Hi.
Any chance someone can translate this into English?
"Firstly Download the BL file for AQG5 (google will reveal it).
Next, you should have your regions AP, BL, CSC and CP files to hand."
BL = Bootloop?
AQG5 = ???
AP = ??
BL = Bootloop?
CSC = Country Specific Code??
CP = ???
Have just bought a Galaxy SIII Mini GT-I8200 which I am trying to Root and/or install TWRP, with zero luck after 48 hours solid of trying various methods... ADB, ODIN, TWRP.apk etc. etc.
Have been using Linux Mint 20 but am gonna install Windows tomorrow as this is now beyond a joke. All I wanted to do was erase all the Google Nazi stuff.
ADB keeps coming back as unverified signature and ODIN is stuck on 'corrupted PIT file'.
So HOW does one resolve a fecked PIT file? when the instructions above are in a foreign language?
Any help will be greatly appreciated.
Click to expand...
Click to collapse
BL = Bootloader
AQG5 = Software version
AP = System firmware
CSC =Country specific code
CP= Modem
Flash your latest firmware first, with this pit file
Account Suspended
https://twrp.me/Devices/Samsung/ find the twrp version here and flash through odin.
Nice one.
I actually saw all the abbreviations in the Windoze version of Odin. They don't show in the Linux version.
Thank you

Samsung S7 Edge stuck in Boot Loop

Hello everyone!
I have a Samsung SM-G935F which after a system update (a patch) is no longer working, it's stuck in boot loop.
When I turn it on I get: Kernel Rev check file Device 1, Binary 0.
I can get into the Download Mode and it will be recognized by ODIN.
But I don't know how to proceed in order to solve the presented scenario. Can you help me out? Thanks!
Regards,
Oliver
Hi, First you need to try to perform a format through recovery,holding power+home+volume up.
If phone did not boot,Then download firmware from sammobile using an app called SamFrim you can find it by simple search on google.
After you downloaded thr firmware,Launch odin and boot your phone into download mode by holding power+home+volume down.
Extract the firmware and it will generate 5 files
AP
BL
CP
CSC
Home_Csc
Add every file to its correct place in odin
AP
CP
BL
Csc( don't use Home_Csc,Because we want to perform a full wipe)
Then hit start, be careful not to unplug the cable,once it's done phone will auto reboot,leave it,It will do everything by its own.
Btw you must use latest odin version because older version doesn't support Oreo roms
Good Luck

Flashing without CP file ?

Hi !
I wanted to flash my wifi only Galaxy Tab S5e (SM-T720) via odin to change the region.
I downloaded the correct firmware (that does not contain the CP file because wifi only)
I entered the path of the BL, CP, AP and Home CSC files.
But when I flash I obtain a "modem" error at last and I'm not able to boot the tablet anymore.
Is there a way to fix it ?
Thank you all
Did you get it fixed
Atomic Lutin said:
Hi !
I wanted to flash my wifi only Galaxy Tab S5e (SM-T720) via odin to change the region.
I downloaded the correct firmware (that does not contain the CP file because wifi only)
I entered the path of the BL, CP, AP and Home CSC files.
But when I flash I obtain a "modem" error at last and I'm not able to boot the tablet anymore.
Is there a way to fix it ?
Thank you all
Click to expand...
Click to collapse
Was you able to get this fixed?

Categories

Resources