Skip to content
This repository has been archived by the owner on Jun 18, 2023. It is now read-only.

Thanks for sharing #1

Closed
amo13 opened this issue Nov 29, 2021 · 23 comments
Closed

Thanks for sharing #1

amo13 opened this issue Nov 29, 2021 · 23 comments

Comments

@amo13
Copy link

amo13 commented Nov 29, 2021

Thank you for sharing your potential replacement for heimdall!

I just though of drawing your attention to another alternative and to my fork of heimdall with crucial pull requests merged.

Also: I know almost nothing about C#. Will it be possible to compile Hreidmar to simple binaries for the major platforms windows, macos and linux?

This project instantly caught my attention because my current work heavily relies on heimdall, which indeed is an abandoned project with yet no alternative that has proven itself reliable and widely compatible...

@TheAirBlow
Copy link
Contributor

TheAirBlow commented Nov 30, 2021

Also: I know almost nothing about C#. Will it be possible to compile Hreidmar to simple binaries for the major platforms windows, macos and linux?

.NET 5.0 is crossplatform and can be compiled for any platfrom: Windows, Linux and MacOS.

I just though of drawing your attention to another alternative

I think Heimdall is a better reference point, as Rust is hard to understand and it just looks ugly.

and to my fork of heimdall with crucial pull requests merged.

I'll look at your fork and try to use it as a reference point instead of Heimdall.
It doesn't have much differences, but I see that it has a lot of useful stuff.

@TheAirBlow
Copy link
Contributor

Closed as I now use the aboot.mbn as a reference point.

TheAirBlow added a commit that referenced this issue Dec 20, 2021
@amaterasushen
Copy link

Recently leaked the Samsung source code, there are still many sources related to odin and even had some python script that was used by Samsung devs to flash test roms. Is it not in your interest?

@TheAirBlow
Copy link
Contributor

Recently leaked the Samsung source code, there are still many sources related to odin and even had some python script that was used by Samsung devs to flash test roms. Is it not in your interest?

Sadly, I am no longer motivated.

@TheAirBlow TheAirBlow reopened this Mar 22, 2022
@TheAirBlow TheAirBlow pinned this issue Mar 22, 2022
@TheAirBlow
Copy link
Contributor

TheAirBlow commented Mar 22, 2022

Reopened and pinned. The development would be probably resumed. The Samsung Docs were already updated with new stuff discovered: https://samsung-loki.github.io/samsung-docs/

@TheAirBlow
Copy link
Contributor

No need to keep this issue opened. @amo13, do you have anyone that you know can sacrifice their phone test my implementation I would be working on soon?

@amo13
Copy link
Author

amo13 commented May 28, 2022

I do have an old I9305, but I'd rather not "sacrifice" it to be honest...

@TheAirBlow
Copy link
Contributor

TheAirBlow commented May 29, 2022

I do have an old I9305, but I'd rather not "sacrifice" it to be honest...

It was just a joke, @amo13

@TheAirBlow
Copy link
Contributor

TheAirBlow commented May 29, 2022

As I remember, I have two Samsung phones - one that is Android 2.0 and is 100% Loke bootloader, the other one is probably Odin bootloader, v2/v3, Android 4.4. But both of them are in bad state, the first one for example has a dead battery and a broken case.

@amo13
Copy link
Author

amo13 commented May 29, 2022

If you are confident enough that it is not going to hard-brick it, break the partition table or whatever, I can run tests with it then...

@TheAirBlow
Copy link
Contributor

TheAirBlow commented May 29, 2022

If you are confident enough that it is not going to hard-brick it, break the partition table or whatever, I can run tests with it then...

Do you have Discord? Mine is TheAirBlow#1917, better continue in it.
About hard-bricking - ofc we're better off flashing non-BL partitions, like vbmeta or system.
It would only soft-brick, and I am gonna implement some safeguards using the new PIT file format knowledge.

@amo13
Copy link
Author

amo13 commented May 29, 2022

I have registered with discord a few months ago but never took the time to actually dive in it and in how it works or how it is supposed to be used. Since I have very limited time until in a few weeks, I'd prefer github for now.
The i9305 is a pretty old device and I'm not sure it even has a vbmeta partition.

@TheAirBlow
Copy link
Contributor

I have registered with discord a few months ago but never took the time to actually dive in it and in how it works or how it is supposed to be used. Since I have very limited time until in a few weeks, I'd prefer github for now. The i9305 is a pretty old device and I'm not sure it even has a vbmeta partition.

No problem, gotta first upload my libraries to NuGet and begin working on the impl.

@TheAirBlow
Copy link
Contributor

I have registered with discord a few months ago but never took the time to actually dive in it and in how it works or how it is supposed to be used. Since I have very limited time until in a few weeks, I'd prefer github for now. The i9305 is a pretty old device and I'm not sure it even has a vbmeta partition.

Also, does it support newer Odin versions? If not, it is probably Loke bootloader, not Odin.

@amo13
Copy link
Author

amo13 commented May 29, 2022

Never really used odin, I'm a linux user.

@TheAirBlow
Copy link
Contributor

Never really used odin, I'm a linux user.

Okay, I'll implement a Loke check, it is very easy - just send SAMSUNG and check if we even get a response, it it's MITS then the BL is Loke and doesn't support the newer (and better) protocol.

@TheAirBlow
Copy link
Contributor

TheAirBlow commented May 29, 2022

Never really used odin, I'm a linux user.

If Heimdall worked, then BL is Odin. I am sure that you have at least once used it.

@TheAirBlow
Copy link
Contributor

Fun fact: Samsung's Thor doesn't use DVIF for some reason, and if you say that all of the connected devices aren't the same model, it would respond with "There is no way to flash multiple models reliably" lol

@amo13
Copy link
Author

amo13 commented May 29, 2022

yes, I have used heimdall a lot and it also worked with this device. I remember though that it is one of those devices that only accepts a single heimdall command. You can use the --no-reboot directive but the bootloader will not accept a second heimdall command. You need to reboot into bootloader to get to send another heimdall command.

@TheAirBlow
Copy link
Contributor

TheAirBlow commented May 29, 2022

yes, I have used heimdall a lot and it also worked with this device. I remember though that it is one of those devices that only accepts a single heimdall command. You can use the --no-reboot directive but the bootloader will not accept a second heimdall command. You need to reboot into bootloader to get to send another heimdall command.

It is a Qualcomm device? Probably empty packet fuckery. It should send zeroes according to Samsung's own implementation, which is more reliable and the BL just ignores it, so the protocol doesn't break.

@amo13
Copy link
Author

amo13 commented May 29, 2022

Exynos apparently. I've simply worked around this issue by actually only sending a single command, the flash recovery command.

@TheAirBlow
Copy link
Contributor

TheAirBlow commented May 29, 2022

Exynos apparently. I've simply worked around this issue by actually only sending a single command, the flash recovery command.

100% empty packets. Heimdall is a very good implementation, and empty packets is it's only downside. All of it's stuff matches Samsung's own implementation, so I'm sure the empty packets is the problem. Gotta look into it more.

@TheAirBlow
Copy link
Contributor

@amo13, have finished working on basic stuff.
I want you to try PIT dumping, restarting, shutting down, etc.
Download it from here
Also, send me the PIT it would dump.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants