yashsingh1/xdaforums huggingface dataset:
[Android Software/Hacking General [Developers Only]] DarrenNewsgroup:
Hi @steadfasterX

I am trying SALT on my LG G6 H870 and have some positive starts but also some questions

I tried to use FWUL (persistent) - the 8GB version - on an SDCARD in my USB SDCARD reader formatting it with ETCHER but when I booted the PC from the SDCARD (as USB) I got an error saying

Failed to load ldlinux.c32

I the tried booting as UEFI and it got a bit further but still no joy

I then burnt the forgetful ISO to a 4.7GB DVD and this booted OK. I had a problem with it saying error /dev/disk/by-label/FWUL but this seemed to disappear when I booted from DVD and I had removed my SDCARD.

Anyway I booted off the DVD and put my phone into DOWNLOAD mode. SALT recognised the phone as an H870 and I could get a partition list once I had gone into a terminal and entered your UFS text

cd ~/programs/lglafng
git checkout ufs-test

In the main window I could "REBOOT your device" and the phone rebooted.

Once I went back into download mode and restarted SALT I tried to do the backup partitions and this is where I got stuck. Everytime I tried to backup a partition I got the error message

ERROR:
Calculated target size is too small (0)!
Upload and share the debug log

I assume this is because I am running the forgetful DVD and there is no writeable disk space on the DVD. I have 3 hard disks on the PC, one of which had 65GB free and I managed to mount it after having to enter the password "linux" when I double clicked the disc in the File Manager app.

I am not sure how to tell SALT that I want my data backed up to a folder on that drive.

I guess on the persistent USB version the USB is writeable to store the partition backups.

I have linked my SALT debug log here https://bpaste.net/show/14dd48bf33f5

What is my next move?

Darren
[Android Software/Hacking General [Developers Only]] mengfei:
hi will the LG G7thinQ be in the list of supported models.

thanks
[Android Software/Hacking General [Developers Only]] Seedmanc:
LG G4 bootloop

So I tried Salt with virtual box, I tried with natively, booting my PC with it, I tried various USB cables and ports, but no matter what I do I can never get past the 2 gigabytes of my userdata partition backing up before it hangs. Sometimes it hangs even before that. I also tried some of those extract partitions.py scripts and it hung just after a few dozens of files. Worst of all, Salt refuses to mount the unfinished .img file so I can't even get the little data I manage to pull out of it. The file recovery utility bundled with FWUL only extracts around 500mb of data from that 2gb image. The other .py scripts in the LG folder I tried complain about some inconsistent indentation somewhere.

I don't think it's caused by the phone heating beyond the cryogenic temperature it only works at now, since it doesn't reboot after Salt hangs, however Salt doesn't recognize it when I launch it again. After a while it reports "backup success" and only then it starts recognizing it again.

My questions are as follows:

1) How to get past the 2gb limit and recover my data properly?

2) If not possible, how to mount at least the 2gb I got?

3) Why isn't it possible to view the partition filesystem itself so the user would be able to only download the files they need instead of wasting time downloading entire partition that might never succeed? Somewhere in those .py scripts I saw a mention of "download a particular file from the phone" so it should be possible. I'd rather just download all *.jpg files to get my photos back, for example.
[Android Software/Hacking General [Developers Only]] steadfasterX:
Thanks for your valuable feedback!

Well sdcard isn't tested and as you saw it may not work properly.. Sorry for that but USB is the only true way to go.

Well that error means I need a live debug. There is nothing you could do else atm .

You can use dvd ofc and its fine when you mount your windows disk. It will not help now but for later after fixing the current issue.

Sure

There is no such xx GB limit in SALT . It VERY likely means your target storage do not have enough free disk space.

Usually you need to mount your windows disk and point the backup target there.

It's normal that in download mode a command must run until it finishes even when it locally failed. There are only 2 ways to abort that. Either force a reboot to download mode or wait..

You need the full partition to mount it properly (well without doing Linux stuff).

You could try the qphotorec Tool on that incomplete file though .

Keep in mind that the userdata partition must be UNENCRYPTED otherwise you would just backup a bunch of unreadable data.

Yes in theory it is possible to implement such a file browser but it isn't there atm. Why? Nobody asked for that . If you want that feature feel free to add a feature request on my bug tracker.
[Android Software/Hacking General [Developers Only]] mrrocketdog:
+1

err on the side of kindness
[Android Software/Hacking General [Developers Only]] onedeathbyflame:
I heard that I should flash something before the Dec 2017 security patch. I can't find any KDZ files unfortunately and was hoping someone here would have a server I could pull it from.
[Android Software/Hacking General [Developers Only]] TacoShow:
Well I'm very thrilled by the existence of SALT, so thank you for answering. So it looks like that SALT is the tool that allows to recover from data wipe after unlocking. I dread unlocking an already in-use device, as backing up stuff & restoring from within Android is limited, time consuming and overall just annoying to deal with.

Lastly:

Is SALT only compatible with LG devices? Or does the list on point 7 in the FAQ literally mean that only those devices are supported, and any device that is omitted from the list will not work with SALT?

Can you choose which partitions you'd want to restore with SALT?

Is there a place where you can track the progress on V40 support being added to SALT?
[Android Software/Hacking General [Developers Only]] Seedmanc:
I certainly don't have a free space limit, I have plenty (50gb), besides Salt wouldn't even let me start the backup if I didn't have enough. 2.2gb is just the most I was able to get, sometimes it fails at 1.5 or even 300mb. I think I saw a user earlier in this thread having a similar issue with their system partition.

It is very strange that nobody asked for a file browser feature, no way only my phone is dead to the point of the partition image being unrecoverable. Besides, downloading by a filemask would reduce the free space requirements and the time needed, and time is of essence when the phone only works after being put in a freezer and quickly heats up to the room temperature and stops working.

I managed to mount the incomplete image using some Windows software so I had a little more luck recovering the files from it now.
[Android Software/Hacking General [Developers Only]] steadfasterX:
Yes at least when the device was not encrypted then for sure. It may even work when encrypted as long as the encryption footer / metadata partition will be restored too.

Yes. SALT is made for LG only. The way SALT operates depends on the LG download mode and so can't be adapted to other devices easily.

That list lists confirmed devices only . In theory ANY LG device will work. Newer devices need a workaround which is mentioned there as well until I had the time to implement the auto detect for UFS devices .

Of course. Currently flashing supports 2 modes:

Kdz flash

Folder flash (e.g from a folder which contains a previously taken backup)

Both will let you choose the partitions to flash and even more you can change even the destination partition on the folder flash mode. E.g. You could flash TWRP in the boot or laf partition etc.

Sure:

https://github.com/steadfasterX/SALT/issues/29

Without the debug log (see faq) I can't say why that happens to you sorry.
[Android Software/Hacking General [Developers Only]] DarrenNewsgroup:
I realised that I have a Sony USB microSD card converter(?) that presents itself as a USB disk. I managed to install persistent 30GB on the SDCard using Etcher and my standard SD card reader (that didn't work as a USB disk). Interestingly Etcher failed many times to install FWUL in the Sony USB converter but it worked fine on my SD card reader. I then transferred the micro-SD card to the Sony USB converter and managed to boot that from the BIOS as a USB disk no problems at all. So that's one bit of progress.

I updated SALT and entered the UFS commands into a terminal and tried SALT again. I didn't have much time to test as we need the Windows PC back but I am not sure if SALT failed to recognise the phone on a USB3 port but I know that it recognised it on a USB2 port. I managed to get a partition list but still got the same ERROR as before with "(0)" in it. That is even though the USB disk is supposed to have 28GB free (it was a 32GB microSD card).

I've attached the log file for this test in case it gives you more clues. https://bpaste.net/show/4ea5d13ed471

Darren
[Android Software/Hacking General [Developers Only]] TacoShow:
Thank you for your answers OP. I very much appreciate them and your project.
[Android Software/Hacking General [Developers Only]] steadfasterX:
Hm well you maybe missed it but I said I need a live debug :)

That means meet on IRC (topic support in the OP) and waiting for me. I'm online there from Mondays to Fridays between 9am and 5pm UTC+1.

Np. If I can help I'll try to do so ;)
[Android Software/Hacking General [Developers Only]] Seedmanc:
Okay, here is the log: puu.sh/CKeHY/f003dfdb74.log (it failed to upload on its own so I saved manually, I guess bpaste is blocked by my ISP).

By the timestamp of 20:12 it has already hung up, this time I got to around 2.5 Gb. I can tell when it hangs up, because while in FWUL my PC makes a high-pitched noise that changes based on CPU load and after it hangs the sound becomes different from when it's working.
[Android Software/Hacking General [Developers Only]] steadfasterX:
Hmm that's strange . Usually it should give a trace back when it get stuck . If you don't mind try it again but this time in debug mode (assuming you use FWUL) or when not using FWUL start SALT from the commandline. When it get stuck again copy the terminal output as well.. You.may have to wait 5min before the trace back get shown .

Thanks
[Android Software/Hacking General [Developers Only]] strk3r:
V40 (V405UA) is detecting fine. But cant do anything, even backup doesnt work.
[Android Software/Hacking General [Developers Only]] DarrenNewsgroup:
Right, it will have to be on a Friday as I finish work early on Fridays. If i manage to make it this Friday it would be about 3pm UK time (GMT/UTC).
[Android Software/Hacking General [Developers Only]] steadfasterX:
Thanks for reporting please read the faq and share the debug log file link
[Android Software/Hacking General [Developers Only]] strk3r:
bpaste.net/show/3623d756edcd
[Android Software/Hacking General [Developers Only]] steadfasterX:
thanks. Do you had switched the branch as mentioned in the FAQ (#7)?

Here is how:

Close SALT.

preparation for UFS devices (all newer LG models) :

Start SALT.

Share the debug log again.

.-
[Android Software/Hacking General [Developers Only]] strk3r:
Any changes

bpaste.net/show/501990147757
[Android Software/Hacking General [Developers Only]] JohnFawkes:
https://bpaste.net/show/63c8383a59c8

[MENTION=5545101]steadfasterX[/MENTION] trying to dump partitions from ls-998
[Android Software/Hacking General [Developers Only]] steadfasterX:
Thanks folks . I will release a first fix for this next week in the testing channel . I'll let you know when you can test ..
[Android Software/Hacking General [Developers Only]] JohnFawkes:
whats weird is im able to dump them with lgup. this is how i make and release the kdz2zips for the ls998 since sprint doesnt release kdzs. i have to flash a back to factory zip i made to unroot and untwrp and then take OTA and then pull partitions via lgup (would rather use salt ;) btw) but yea just tag me please when you push a fix and ill for sure test it out! thanks in advance. love the work :good:
[Android Software/Hacking General [Developers Only]] steadfasterX:
Well reverse engineering a proprietary tool like lgup isn't an easy task so it's clear SALT cannot be exactly act as lgup . ..

The current issue you both have is because I didn't *calculated* the bytes of a partition but instead simply used the *output* from the device . But... : on some firmwares the bytes column will not be printed (like on yours) so I have to calculate that to make it work for all . Not a big deal I already have the 4 lines of code here but there is another thing coming into play:

UFS devices have a different block size (4k) then non UFS devices (512). Not a big deal either but to calculate correctly I have to auto detect the device type (UFS or not) first. This is on the to-do list anyways to make sure no manual branch switch is needed anymore.
[Android Software/Hacking General [Developers Only]] JohnFawkes:
Trust and believe me I understand. I port audio mods so I understand. I am part of the team that ported dts hpx recently. So i completely understand its not easy and I do appreciate what you do with salt. :good:

BTW I did switch to the UFS test branch before posting here and that allowed the partitions to be seen but not dumped.
[Android Software/Hacking General [Developers Only]] nicogp:
Hi, I am trying to do a full backup but shortly after starting this stops and raise this exception

File "partitions.py", line 177, in dump_partition

data = laf_read(comm, disk_fd, read_offset // BLOCK_SIZE, chunksize)

File "partitions.py", line 84, in laf_read

header, response = comm.call(read_cmd)

File "lglaf.py", line 250, in call

header = self.read(0x20)

File "lglaf.py", line 230, in read

buff = self._read(need, timeout=timeout)

File "lglaf.py", line 276, in _read

return self.f.read(n)

OSError: [Errno 22] Invalid argument

Device: LG G2 and LG Spirit (same error)
[Android Software/Hacking General [Developers Only]] steadfasterX:
read and follow FAQ #1000

.-
[Android Software/Hacking General [Developers Only]] bmueller90:
LG 40

Hello, i am new to your world of FWUL and SALT - none the less I am poking around in here and trying to figure out how to pull a backup from LG v40 sprint model with SALT. I cannot read the partitions - i've already tried changing the branch as well as reading in the forums for a few hours. could anyone point me in the correct direction???

:)
[Android Software/Hacking General [Developers Only]] steadfasterX:
read and follow FAQ #1000
[Android Software/Hacking General [Developers Only]] steadfasterX:
Just a quick note to those having newer devices.

Thanks to [MENTION=3931436]DarrenNewsgroup[/MENTION] I was able to make some progress here while the current code is still not fully working. For this I need to implement another detection first and this will take some time but a lot of that is prepared already .

The calculation works now but as ufs devices requires several different communication steps to fully show all partitions there is some code needed which handles that first. Everything is not a big deal here but it's hard to develop for these devices as I do not have such a new one. So I'm stick with people helping me on IRC like Darren.

That's all for the moment I hope to give some update soon.
[Android Software/Hacking General [Developers Only]] DarrenNewsgroup:
Just a note for people with devices other than G4 and G6(H870); it was very little trouble on my part to help steadfasterX. He does most of the work whilst connected to your PC and phone. All I had to do was reboot the phone into android or download mode and various times.

The hardest part was getting FWUL running mostly because I created it on a micro SD card rather than a proper USB stick.

If you are at all worried about security of your personal data you could disconnect all your PC's hard drives and just have the USB stick connected with FWUL, so he can't get access to your data.

In summary it wasn't hard to "donate" a different device and so allow steadfasterX the chance to support your device. You do need to sit at the screen while he works and answer some questions. He is very kind and patient.

Darren
[Android Software/Hacking General [Developers Only]] bmueller90:
V40 and SALT

here is the log link from Salt for my V40. I will allow you full access to develop whatever you need to for this device if it comes to that - if you so choose to. Thanks for the support!!!

https://bpaste.net/show/b1b10c75c8ce
[Android Software/Hacking General [Developers Only]] steadfasterX:
Ok same. That require the UFS fix mentioned ..

Topic support in the OP .. Come to IRC from Monday to Friday and meet me there ;)
[Android Software/Hacking General [Developers Only]] bmueller90:
I assume that the tool itself doesn't work for the newer models but the LGLAF terminal prompt would still do the job given the right commands - correct?
[Android Software/Hacking General [Developers Only]] steadfasterX:
Nope . It works even on newer devices . Just not 100% atm.

The problem on newer firmwares is that the terminal is useless unless you haven't unlocked the device as LG stripped it extremely down so even not a simple ls or echo would work.

So we have to use the laf protocol to do stuff and it works already with (currently) manual adjustments.

Just see here: https://github.com/steadfasterX/lglaf/commit/c68c77893a9c1c17222

I have added those open cmds already thx to [MENTION=3167089]runningnak3d[/MENTION] but I have just to implement a little check for UFS now (the how is clear already).

I just need 2 hours of free time and its done....
[Android Software/Hacking General [Developers Only]] bmueller90:
I'll wait for you ;)- you know your stuff. To go through and reverse engineer all that and make what you have is pretty cool. I'm trying to get to that point but have a ways to go still. Cya in irc Tues.
[Android Software/Hacking General [Developers Only]] strk3r:
AFAIK, in v40 lg have made some changes in laf protocol compared to v35/g7.
[Android Software/Hacking General [Developers Only]] twoxa:
I'm here to help with any testing necessary with my V40 AT&T model!
[Android Software/Hacking General [Developers Only]] steadfasterX:
Great :) read the support topic in the OP for that and meet me on IRC
[Android Software/Hacking General [Developers Only]] steadfasterX:
Extended support option :P

Like FWUL SALT has now a Telegram Group which is bridged with my IRC channel as well.

Many ppl are feeling more comfortable with TG theses days and as I now have a bridge between I am ok with it.

Feel free to join

LGLAF+SALT Users TG Group

.-
[Android Software/Hacking General [Developers Only]] baconbacon:
I have an LG G5 I can connect to a vm/laptop if you want to get on noodle around with it.
[Android Software/Hacking General [Developers Only]] onedeathbyflame:
I've tried desperately to get SALT to work on Linux mint 19.1 but I keep getting one fatal error.

"python-zstandard(python3)"

I have pip installed and every zstandard package I could find but keep getting this.
[Android Software/Hacking General [Developers Only]] steadfasterX:
mixing pip and the package manager files will make things worse.

installing multiple variants will make things worse, too.

so REMOVE all those mixed things you installed first.

Then read the OP again as it states CLEARY for *buntu, Debian (so Mint as well):

sudo pip3 install zstandard
[Android Software/Hacking General [Developers Only]] onedeathbyflame:
alright got it to work now
[Android Software/Hacking General [Developers Only]] onedeathbyflame:
How do I use SALT to flash or load a KDZ file onto a soft bricked phone?

Right now the phone doesn't have any partitions but CAN be put into download mode. :D

Any help would be much appreciated because even after years of flashing phones I still feel like a total beginner. :confused:
[Android Software/Hacking General [Developers Only]] steadfasterX:
SALT's flashing feature is still in development while it works pretty good depending on what firmware you have.

Share the debug log (see FAQ) when the device is connected and I can tell you if that will be possible on yours.

.-
[Android Software/Hacking General [Developers Only]] robles4242:
I'm on win10 on virtual box. I finally have FWUL running and simple ADB detects my phone in mtp/ adb mode. But SALT will not pick it up in download mode.... when Windows does....

Any suggestions?
[Android Software/Hacking General [Developers Only]] steadfasterX:
Try USB v2 in VirtualBox.

Ensure the USB device when in download mode (its different then when in ADB) gets redirected in VirtualBox settings.

Do not use Virtualbox for critical operations.

If that doesnt help share the debug log (see FAQ) when the device is connected and I can tell you if that will be possible on yours.

.-
[Android Software/Hacking General [Developers Only]] ANDROID2468:
The usb name chages when you put it in download mode. Make sure you check all the usb names that mentions lge in virtualbox settings.

Edit: ops steadfasterX already mentioned it. lol My bad. :D
[Android Software/Hacking General [Developers Only]] hamed_forum:
Can install tot kdz in this Linux?
[Android Software/Hacking General [Developers Only]] steadfasterX:
SALT is an application not a linux. SALT can extract kdz but not tot.
[Android Software/Hacking General [Developers Only]] hamed_forum:
can flash kdz in FWUL by salt? lg g4 h818p
[Android Software/Hacking General [Developers Only]] steadfasterX:
Use LGup on Windows as flashing is experimental in SALT .
[Android Software/Hacking General [Developers Only]] hamed_forum:
i have problm by lgup

when i try install kdz in 9% have error code =0x2000

my phone modle h818p e20 (show in salt) but when connect lgup it recognize h818 10c and say put dll

the 10c dell vesion 0.0.2.13 and cant find new dll

what must do?phone in bootloop and can go download mode
[Android Software/Hacking General [Developers Only]] steadfasterX:
SALT will extract the dll's so simply dl a the kdz and extract with SALT a single partition (doesn't matter which, choose a small one). you will find the dll in the folder "extractedkdz" then

so something like that:

-
[Android Software/Hacking General [Developers Only]] pchacker47:
How to flash partitions or full kdz file with salt ?
[Android Software/Hacking General [Developers Only]] pchacker47:
Can SALT be able to flash kdz file or specific partitions ???
[Android Software/Hacking General [Developers Only]] steadfasterX:
flashing with SALT is experimental and requires a compatible device.

I can tell you if your device is compatible when you share the debug log (read the FAQ for how)

.-
[Android Software/Hacking General [Developers Only]] steadfasterX:
Pls share the SALT debug log after trying to extract with SALT . Read the faq for a how-to and follow it briefly.

And share a link to the kdz file pls.

..and SALT uses more intelligence then the included backend tools alone . If you try to just use the kdzmanager.sh or the kdztools from a terminal you may fail like shown above.
[Android Software/Hacking General [Developers Only]] pchacker47:
here is the log : https://bpaste.net/show/9bbb64378bc2

i want to know that can we unofficial unlock the bootloader of v10 ? i can provide you with the files that you needed for v10.

and my 2nd question is that i flashed my v10 with 21w firmware now it has many problem like can't set security lock etc, my device is bootloader locked , can you suggest me how can i fix this issue ?
[Android Software/Hacking General [Developers Only]] steadfasterX:
SALT cannot flash when running that firmware version yet, sorry (before your upgrade to 21w likely yes).

If a factory reset does not help on your issue better ask in the v10 forum..

.-