HEIMDALL one-click The safest way to upgrade. - Galaxy S I9000 General

Hi,
We would like to make a idiot proof ROM upgrade method.
Too many people are, for example, accidentally upgrading P9000 ROM onto I9000.
That will brick a phone.
My suggesting is this.
Set phone to usb debugging mode.
Have a single tool that automatically does the following (unfortunately, only possible on a rooted phone):
1) Uses adb to backup the bml1 and bml3 boot loaders. (Might as well backup efs also and check the user has root. If a user cannot get root, they really should not be flashing their ROM in the first place. Some method to automatically check if the phone is "network locked" might help. Can you do things like *#06# from the adb command line?)
2) Do a checksum on the bml1 and bml3 backups to identify which boot loader is actually on the device, and therefore identify the device. I.e. I9000 or P9000.
3) Check the USB ID of the phone is correct.
4) Double checks that the boot loader files provided by the user are compatible.
5) Automatically use adb to switch the phone into download mode
6) Flash only a compatible bootloader.
If a new ROM is published with a new boot loader, prevent the user from using it, until developers upgrade HEIMDALL one-click to recognize the new boot loader.
Have another tool, that does similar, but that will never flash the bootloader. Instead it uses the files provided by the user to flash only the rest of the phone, and never the bootloaders.
So long as the boot loaders are not touched, even if boot loaders are in the user provided file, the user can always recover using the 301K JIG.
Another thing to consider is the PIT. Have the tool implement a feature to read the PIT from the phone and if the PIT provided by the user is the same, automatically do not re-partition.
If the PIT needs changing, only flash the PIT and with the bootloader tool (described above).
This will ensure the user can still reach Download mode, even though the user will have to flash an ROM to be able to boot the phone into Android after that. But the important bit is that the phone will not become a Brick.
Of the current PIT files, I don't think any of them wipe the BML1 and BML3 boot partitions.
They only modify the size of the system and data partitions.
The main way to make all this "safe" is to separate the "repartitioning and installing boot loaders" from the "ROM install".
"ROM install without PIT and bootloaders" is 100% safe, installing boot loaders and PIT is the risky bit, so provide a tool that does it safely.
Maybe include a good boot.bin and Sbl.bin with the safe bootloader tool.
What do people think?

I'm working with Benjamin Dobell, the developer of Heimdall. There will be several features in the first release..
The specs on the .9A release planned features are:
Open source - everyone can contribute
Java app- Cross platform, One download handles all major platforms
One Click Packaging-Developer can add in their PIT, PBL, SBL, Kernel, Modem and FactoryFS(ROM) by dropping files into the zip
Heimdall included-installed automatically for the platform the user is running
User Awareness-User must check "flash bootloader" and they must be "sure they want to do this" which will make it a 3 click operation
The 1.0 release will include more features. I'll make sure to point Benjamin to this thread.

it would be awesome to see this fly

It's good to hear that...
{
"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"
}

I cannot wait to see this! I am an Ubuntu user with Windows 7 only for Odin. Would love to have a reason not to use Windows.....ever.
Sent from my SAMSUNG-SGH-I897 using XDA App

As somewhat of a trial run, I branched this project into "One-Click UnBrick". This installs heimdall and will execute the close-pc-screen command. I am still working on it. The main problem is Win7 drivers. Distributing them in a one-click manner is tough. I've already worked around win7 UAC, registry, filesystem issues, and VC++ issues. The last problem is to figure out how to get the drivers to install for a Gadget device.

Related

[Q] Need Unlocking Help -Rooting with a Mac/Online Codes Not Working

Yes, I searched. I have a GS2 Locked to Virgin Mobile in Canada.
First off, I have a mac, so the whole rooting/unlocking thing seems to be impossible as ODIN and the other programs are all .exe's.
I tried buying a code online and they said they couldn't unlock it and most others sites don't like the phone as compatible.
What are my options here?
Thanks all.
Borrow a real computer.
to root use this to flash the correct kernel from here
to unlock
I have used Heimdall and it works
I'm struggling here. heimdall doesn't read .tar. I extract the tar and I just get an zimage and nothing more.
It seemed simpler on Odin, but I'm lost on this.
Take tar or the zimage and put it in the kernel slot and hit flash, it's less picky about the file type.
Sent from my GT-I9100 using XDA Premium App
I appreciate the help, but it's not that simple. It says firmware.xml is missing when I put it under the load package tab under firmware.
When I put it under the flash tab, it says not a valid PIT type. These are the only two places I can select a file.
{
"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"
}
veyka said:
to root use this to flash the correct kernel from here
to unlock
I have used Heimdall and it works
Click to expand...
Click to collapse
could you verify that you have managed to flash with latest version of Heimdall? i have tried everything with beta2, 1.3 and it simply refused to work. i just used a pc to update to latest version, and i have no files to flash to test (it's been one day and if something happens i have to reintsall everything again), so if you could verify this, or teach me a trick or two to get it to work, it will be much appreciated
FWIW, I loaded 1.1 and it was not compatible. 1.2 looked the same as 1.3 for me.
SGS2 has only been supported from version 1.2 onwards, maybe try the newest 1.3 that's just been released.
I have never used it apart from on windows, it looks like you may need to give it a pit before it will do anything.
You should be able to find it in an official rom, when I get home in 4-5 hours ill have a look at it.
Sent from my GT-I9100 using XDA Premium App
The screen looks like the ones I posted on 1.3.
Then you will need a pit from a stock rom, might try reading the faq
Sent from my GT-I9100 using XDA Premium App
HOWTO: flashing via Heimdall Suite 1.3.0
1) put your phone into download mode
2) connect to pc
3) load Heimdall GUI
4) click Utility tab
5) click detect device (if it detected goto 6, if not install drivers which should come with Heimdall)
6) click save as under "download pit", save it somewhere easy to find with a name like SGS2 (no need to add .pit)
7) hit download
8) phone will reboot, put back into download mode
9) click "flash" tab
10) click "browse" near the top and select your pit you saved earlier
11) on the righthand side there is a window saying "Partitions(files)" click "add" below it
12) select "kernel" on the lefthand side below "partition details"
13) click Browse below "partition details", select the kernel you want
It should now look like the attached pic
If it does, hit Start, and it should flash
i think problem with mac is still there :
although i have yet to try flash a ROM or parts of it, to see if it could successfully flash it.
EDIT: nope, it does not work , still the same error
Same issue here.
6) click save as under "download pit", save it somewhere easy to find with a name like SGS2 (no need to add .pit)
Click to expand...
Click to collapse
What I am selecting here? It asks you to DL something.
8) phone will reboot, put back into download mode
Click to expand...
Click to collapse
Phone just gets attached error - nothing further.

[AT&T] Return to stock w/o computer with Mobile ODIN

Chainfire is a well-known developer on XDA. He has released numerous apps that are extremely useful. One of particular interest is Mobile ODIN. As the name of the app suggests, it flashes Samsung firmware onto your device. This is extremely helpful as it is often annoying to have to rely on your computer to flash back to stock. Furthermore, some of you may experience problems due to the USB port on your computer or phone. Also, this will not trip your flash counter.
USE WITH CAUTION. I AM NOT RESPONSIBLE IF YOU BRICK YOUR DEVICE OR YOUR CAT GOES ON FIRE
This will not flash/re-partition PIT, IBL/PBL, SBL & EFS. (No need to anyways...)
To flash via Moile ODIN, you must have ROOT
As a safety precaution, you must have 80% battery power!
1. Go to Chainfire's thread for Mobile ODIN (here) and download the following files:
MobileODINLite-v3.00.apk
MobileODIN_FlashKernel_I747-v2.0.apk
[OPTIONAL] If you're feeling generous, then go do Chainfire (he deserves it!) and yourself a favor and download the paid app via the Play Market. Pro can inject root in the stock firmware prior to flashing!
Note: If you downloaded Mobile ODIN Pro, you wont need to install MobileODIN_FlashKernel_I747-v2.0.apk as it will automatically download the corresponding apk for your device.
2. Once you've downloaded and installed the two apps, go download AT&T stock firmware. As this is a huge file, download it on strong WiFi connection.
(MD5: 66c6dfae34fd06c098f07537d19943c2) <- MD5Sum of the zip file
3. Extract zip and place tar.md5 in the root of your internal sdcard.
4. Open Mobile Odin > select Open File... > I747UCALEM_I747ATTALEM_I747UCALEM_HOME.tar.md5
It will not flash the following files in tar:
aboot.mbn
sbl2.mbn
sbl3.mbn
rpm.mbn
tz.mbn
5. Check wipe data and cache & dalvik cache* and flash (select Check for MD5 sum).
{
"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"
}
Note*: While it is not necessary to wipe data and cache & dalvik cache in the app, it is suggested as to prevent boot loops.
nice guide
Pardon my ignorance, but when you say "It will not flash the following files in tar:"... are those files not needed at all or do we need to add them manually?
I don't think so as you don't need to flash boot loaders. Also, repartition is not necessary as were not using hellraised roms (yet).I am not 100% sure tho.
Sent from my SAMSUNG-SGH-I747 using Tapatalk 2
tamanaco said:
Pardon my ignorance, but when you say "It will not flash the following files in tar:"... are those files not needed at all or do we need to add them manually?
Click to expand...
Click to collapse
I believe it's a "safety" feature that the dev built in, because unless absolutely necessary, you generally don't want to mess with bootloaders, as those are the few items that can seriously f up (aka "Hard" brick) a phone if it goes bad. Also, it was found that some of the latest leaks from Samsung on various devices contained some shady bootloaders that noobs were indiscriminately flashing, so again, this helps save them from themselves

[Q] Samsung s5360 - Customizing Odin Ready PDA.tar.md5 file

So I have the odin pda tar file - PDA_S5360_DDLF2.tar.md5
I unzipped it and extracted the following files:
Code:
1) boot.img
2) param.lfs
3) sbl.bin
4) system.img
5) userdata.img
I opened system.img and added/removed some apps inside the app folder. Saved system.img and exited. Look below:
{
"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"
}
These are the five files again from pda.tar which I'm putting in the tar archive
Code:
1) boot.img
2) param.lfs
3) sbl.bin
4) system.img (edited using ultraiso: see above)
5) userdata.img
I used the following code in terminal to make the tar ball:
Code:
tar -H ustar -c boot.img param.lfs sbl.bin system.img serdata.img > Custom_PDA_S5360.tar
The I used the following commands to md5 it:
Code:
md5sum Custom_PDA_S5360.tar
md5sum –t Custom_PDA_S5360.tar >> Custom_PDA_S5360.tar
mv Custom_PDA_S5360.tar Custom_PDA_S5360.tar.md5
Now i have the custom pda.tar.md5 with me. I'm a little scared to flash it without knowing whether it could brick my phone or not.
I need some guidance and advise from the senior xda gurus.
Will it work? Or not?
Or will I end up with a bricked phone?
Am I wasting my time?
Connect your phone to odin and flash it...
If it doesn't work flash stock...
And if flashing stock fails goto service center and sae " I swear i am never going to use that online update again!!!"
Globally recognised and certified NOOB
alkesh saar ji,
thank you for the wise crack answer. but i don't have the time to run around the service centre to fix my phone.
im not sure what the actual reasons are for hard bricking a phone
A phone that gets stuck in bootloop but can still switch into odin download mode is not actual brick IMO
in the past, i have successful placed several windows and linux OS's on one bootable dvd. I guess what im trying to say is that im not familiar with the mechanisms of an android OS.
broadways said:
alkesh saar ji,
thank you for the wise crack answer. but i don't have the time to run around the service centre to fix my phone.
im not sure what the actual reasons are for hard bricking a phone
A phone that gets stuck in bootloop but can still switch into odin download mode is not actual brick IMO
in the past, i have successful placed several windows and linux OS's on one bootable dvd. I guess what im trying to say is that im not familiar with the mechanisms of an android OS.
Click to expand...
Click to collapse
If you want to try then do as I said....
Wait why you are using odin method you can simply push apk via rootex or adb
Globally recognised and certified NOOB
Do you mean adb install method?
After each time i flash stock, i root and remove things i don't need from system(youtube, maps etc)
Then i install my imp apps on system(by removing sd) using adb install
Then i shift dalvik to system
I'm trying to automate my work. I don't think i can do dalvik shift in an odin package but I think I can do the apps add/remove thing.
What do you think?
broadways said:
Do you mean adb install method?
After each time i flash stock, i root and remove things i don't need from system(youtube, maps etc)
Then i install my imp apps on system(by removing sd) using adb install
Then i shift dalvik to system
I'm trying to automate my work. I don't think i can do dalvik shift in an odin package but I think I can do the apps add/remove thing.
What do you think?
Click to expand...
Click to collapse
Do simplest method use root explorer to push apps to system and set their permission rw-r--r--
Globally recognised and certified NOOB
I prefer automation.
I use batch "rm" commands in adb shell to remove apps from "system/app"
And I use adb install batch command file to install all apps in android.
The order of automation:
1) Flashing rom
2) Rooting
3) Removing unwanted app from system
4) Installing apps on system
5) Unrooting
Whole process takes around 15-20 minutes and much of it is done through batch files.
What I want now is to add/remove the apps in the pda.tar flashable file itself.
If I can achieve this, my time will be reduced from 15-20 minutes to 3-5 minutes.
What is the result? Have u flashed it?
Sent from my GT-S5360 using xda premium

[SLOT A/B devices] Universal A/B-cloner

I DO NOT TAKE RESPONSIBILITY FOR YOUR DEVICE BREAKING
THIS /WILL/ COPY YOUR BOOTLOADER FROM ONE SLOT TO ANOTHER
IF YOU DO THAT WITH A BOOTLOADER THAT IS OLDER THAN THE SLOT YOURE OVERWRITING YOUR DEVICE MIGHT BRICK
Ok, thats over with
INFO:
This is just a simple script, in a simple ZIP, designed to clone all the devices ACTIVE slots in /dev/block/bootdevice/by-name to the INACTIVE ones
it does nothing more, nothing less.
For me, this solved some issues with lineage and custom roms on my device and keeps my mild ocd... well.. mild.
This will not touch any partition with the word logo in it (lowercase only for now, oops)
BASIC HOW-TO:
0) have basic knowledge of how android works, dont be stupid
1) flash rom
2) run AB-Cloner-test
3) If the test runs normal rename it to AB-Cloner.zip ( remove the word "test" from the zip name)
4) run AB-Cloner
5) ???
6) profit!
Tested devices:
Successful tests:
Motorola Z² Force
(report your success below)
Unsuccessful tests:
PLEASE report below, so no one else endangers their phones
Known Bugs/Issues:
currently the word test must be lowercase in the filename, if any letter is not lowercase in the word test IT WILL RUN THE ACTUAL COMMANDS. this will be fixed in RC2/Normal releases
You tell me ?
TODO:
add VOL key detection to cancel zip/ make choices
update detection: figure out which slot is newer, flash that one to older
aroma? probably not tho
You tell me?
C+ slots? if theres a device that needs it
Pictures:
{
"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"
}
Download:
RC1: here (GDrive)
Ae3NerdGod said:
I DO NOT TAKE RESPONSIBILITY FOR YOUR DEVICE BREAKING
THIS /WILL/ COPY YOUR BOOTLOADER FROM ONE SLOT TO ANOTHER
IF YOU DO THAT WITH A BOOTLOADER THAT IS OLDER THAN THE SLOT YOURE OVERWRITING YOUR DEVICE MIGHT BRICK
Ok, thats over with
This is just a simple script, in a simple ZIP, designed to clone all the devices ACTIVE slots in /dev/block/bootdevice/by-name to the INACTIVE ones
it does nothing more, nothing less
for me, this solved some issues with lineage and custom roms on my device
BASIC HOW-TO
0) have basic knowledge of how android works, dont be stupid
1) flash rom
2) run AB-Cloner-test
3) If the test runs normal Rname it to AB-Cloner ( remove the word test from the zip name)
4) run AB-Cloner
5) ???
6) profit!
Known Bugs/Issues:
- currently the word test must be lowercase in the filename, if any letter is not lowercase in the word test IT WILL RUN THE ACTUAL COMMANDS. this will be fixed in RC2/Normal releases
- You tell me ?
TODO:
- add VOL key detection to cancel zip/ make choices
- update detection: figure out which slot is newer, flash that one to older
- aroma? probably not tho
- You tell me?
- C+ slots? if theres a device that needs it
Download:
RC1: here (GDrive)
Click to expand...
Click to collapse
This is good work
([emoji3590]09-09-18[emoji3590])
PoochyX said:
This is good work
([emoji3590]09-09-18[emoji3590])
Click to expand...
Click to collapse
thank you!
FYI I just ran this on my G7 Power (Ocean) and it seemed to work just fine. I had a good Resurrection Remix install on Slot A (active) and some weird borked stuff on Slot B.
I loaded and ran the .zip via adb sideload, it copied everything over, and it all seems to work just fine now, and identical on both slots.
FYI when running it this way (adb sideload) the name included "-test" but there was no test. It just ran--luckily it seemed to work OK.
Oneplus 8 5G UW (IN2019) did not work

S20/S20+/Ultra - GUIDE: Remove Bootloader Unlocked Warnings Etc

I removed the bootloader warning on my S20+ and attached the .tar file you need to flash in the AP slot. Also wrote a quick guide how to do it yourself for other models or to personalize it.
I found a guide, original credit to this youtube video.
As a result I personally modifed several files in photoshop to remove all the bootloader unlocked warnings, etc, and also to remove all non-english text on the download screen, etc.
All you need to do if you have my exact phone is to
0. Make sure you have SM-G985F/DS (S20+) phone ONLY. Otherwise, skip to create your own assets or see if another user added your phone into this thread.
I. Boot into DL mode (either boot into TWRP and click download, or turn off phone and turn it on and hold VolUP+Power until it goes to recovery, or VolDn+Power and insert USB)
II. flash the file attached, up_param.tar that I have attached, under the AP tab in Odin. Yes, AP NOT BL!!
Success!
It might seem like boot is longer, but it's the same time, it's just now 3 separate screens are all the same one instead of extra screens with errors.
{
"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"
}
ABOUT THE MOD:
Changed this to just black, thus removing it:
Changed these 3 screens to the one after it (and positioned them perfectly):
Also changed some other ones by removing things like WARNING! and non-english text.
e.g.
In case you want to do it for other phones, I don't know if it's the same assets so I would NOT recommend to flash my exact file, but rather create your own using my assets I attached that I created. Open the original file in photoshop and you can do whatever you want to it.
To modify other phones, you need:
A. 7-zip Z-std (ZS) version (regular 7-zip doesn't work)
B. Odin (attached, or find it on XDA)
C. (Optional) Photoshop or photo editor app
HOW TO MODIFY OTHER PHONES ASSETS:
1. First extract up_param.lz4 using 7-zip ZS.
2. Now extract up_param.bin to its own folder.
3. Modify the assets however you like. You can personalize literally however you like, modify these pictures in any way and you get your own boot screens.
4. Open up_param.bin using 7-zip ZS FM (open and choose default as 7-Zip ZS FM, navigate to it),
5. Drag and drop your modified files into up_param.bin
6. Right-click and choose 7-zip ZS > Add to archive
7. Choose a tar archive and click OK
Then just do the first steps I & II at the top of this post to finish the flash.
Hope it helps!
Please add that it is only for Exynos version. On snapdragon it will not work
lukjod said:
Please add that it is only for Exynos version. On snapdragon it will not work
Click to expand...
Click to collapse
Not quite. It will work on Chinese variant that can unlock bootloader and anything that can unlock bootloader.
WILL NOT WORK ON US/CA DEVICES, DON'T TRY! (Bootloader will likely never be unlocked on those devices.)
Only use this if you have unlocked bootloader/rooted.
Use common sense.
Hope it helps.
p.s. I have an exynos version for the root. I'd rather have 8gb ram and unlocked bootloader than US locked bootloader trash with 12gb ram. That said I'd rather have a 5+ year old device than to not be able to unlock the bootloader/root.
Later I'm going to modify these screens with a dimmer version. I always hate rebooting my phone at night with that ultra bright glaring logo.
xbt- said:
Not quite. It will work on Chinese variant that can unlock bootloader and anything that can unlock bootloader.
WILL NOT WORK ON US/CA DEVICES, DON'T TRY! (Bootloader will likely never be unlocked on those devices.)
Only use this if you have unlocked bootloader/rooted.
Use common sense.
Hope it helps.
p.s. I have an exynos version for the root. I'd rather have 8gb ram and unlocked bootloader than US locked bootloader trash with 12gb ram. That said I'd rather have a 5+ year old device than to not be able to unlock the bootloader/root.
Click to expand...
Click to collapse
Well, I have EUR version of Z Flip 3 with snapdragon, rooted and with unblocked bootloader. Simply this way is ONLY valid for Samsung Exynos chipset and not for SNAPDRAGON. There is no up_param in Snapdragon.

Resources