yashsingh1/xdaforums huggingface dataset:
[Android Software/Hacking General [Developers Only]] xda-yup:
Having SALT issues while trying to do initial backup before trying UsU on my H815. 3 issues:

1. I tried the 15GB FWUL version of FWUL 3.1 and this worked fine to boot via usb, but SALT got "fatal error- missing phyton cryptography module" error on trying to update SALT.

2. Because of error 1, wiped USB drive and installed latest mAid nightly mAid_v2020-04-07. Booting and the mAid OS are fine, SALT recognises device fine, but SALT gives error on trying to do full backup, same error as comment 819, i'm backing up to a 4TB NTFS drive with about 3.9TB free on it.

---so followed steps from comment 819, backup of everything else works fine except for userdata.img, which always 'succeeds' but then fails md5 check. this happened on both

SALT - 3.22-12:STABLE. (all 3 branches stable per faq)

and

SALT - 3.23-0:TESTING (all 3 branches develop per faq)

. Tried again after factory reset H815 phone (it's still unmodified) and with same results. Any ideas why userdata.img is always failing md5 check? Is userdata even important to backup, or is it just photos and stuff which i've already deleted anyway from factory reset? If not important i'll just skip userdata backup as i have everything else backed up via SALT now.

3. When i go to SALT > Advanced > debug log, i am unable to export the log to provide here, get "Error in module 'haste' while uploading logfile..." among others.

My device is H815 20e TWN, on MM fully stock (no modding at all yet) if it helps. I've really tried to follow all threads and FAQs so sorry if i've missed something.
[Android Software/Hacking General [Developers Only]] steadfasterX:
userdata "just" contains your photos, apps etc. it is not a critical part when it comes to e.g. unbricking a device so if you can live with loosing your data (which you already have due to the factory reset) you can skip that. no without the log I cannot say why the md5 is failing here. will check why uploading failing.

.-
[Android Software/Hacking General [Developers Only]] wantpizza:
Reading between the lines.

Let me just say 1000 apologies for interrupting this thread. But I am in a tough spot.

TL/DR - Can I use TWRP to dd my old user data from a LGUP backup (from Nougat) into a fresh install of Lineage 17.1? Just temporarily to recover some improperly backed up userdata? I am willing to downgrade or almost anything to get there - just looking for simple, safe and no risk to my newly unlocked bootloader :D:D.

Long version: Okay - again - 1000 apologies. I hate when others bust into a thread... but this stuff looks the closest to what I am imagining my solution to be.

I had -

LG V20 - AT&T version H910

Software version - H91010p

Android Security patch level: August 1, 2017

Kernel Version: 3.18.31

TWRP version 3.3.1-0

Before doing anything - I did a full LGUP dump - INCLUDING MY USER DATA

I also installed LG Switch and did a full backup.

Next - I followed this DirtySanta post to Unlock the bootloader etc.

I am now running LOS17.1 - an Android Q ROM

Android Security patch level = April 5, 2020

So - I am looking for a way to get back some accidentally lost user data.

I tried LG switch and it just wants to backup my new install. Not sure how you get it to restore data...

I tried LGUP and no where does it say anything about restoring...

I am willing to try a dd trick in Linux (currently running Pop_OS and have Manjaro too) or Win 10 if need be.

I am willing to fubar my current LOS17 install. I will just reinstall after extracting my data.

I am willing to downgrade to Nougat or.... anything.

As long as I don't lose my root & unlocked boot loader, TWRP.

BTW - I tried just mounting the lgup file in linux and get some sort of bad superblock error.

I have the LGUP dump on the external at /LGUP...

So in TWRP do I just go to Advanced/Terminal and

dd if=/external_sd/LGUP/userdata.img of=/dev/block/bootdevice/by-name/userdata bs=1024

sync

Do I need to restore anything else? I don't care if I get ForcedClose of some programs as long as FX File explorer works long enough to fetch my data? Oh and - will this work? My userdata is 52.2 GB...

Risks? Thinking of just trying it.

Is there another way?

Thanks in advance for any tips, tricks, breadcrumbs or best of all ANSWERS!!

Best Regards!!

---------- Post added at 04:50 PM ---------- Previous post was at 04:44 PM ----------

I might have already found a gotcha... /data/media on the phone shows 39 GB free of 51 GB... So even if I delete everything - not sure how to get 52.2 GB into that partition? Hopefully someone smarter than me will explain how...

Thanks.
[Android Software/Hacking General [Developers Only]] wantpizza:
Hold everything!!

I was able to recover my missing data.

I reverted back to Nougat and then LGSwitch was able to restore my data.

I grabbed it up onto a SD card and flashed forward to Pie.

Sorry for the interruption. It is still a very interesting thought question.
[Android Software/Hacking General [Developers Only]] ezzony:
Now that I have transitioned to Linux i'm delighted to come across this app.

So, I couldn't get persistent mode to work on my usb stick, it would just hang on boot with a black Terminal - like screen. Non-persistent does boot.

So I tried to install on my Linux Mint (latest) installation and it works with a problem. My LG devices are detected but I see only 2 partitions, one is GPT (or GTP?) and I forget the other one. I went though all the required dependencies and installed them one by one.

BTW I was delighted to see that I can extract a never version KDZ file which I was looking to do, worked perfectly and was able to extract system.img. One other problem with that is some of the files are locked and I can't work on them. Would anyone know how to repack the system.img? Ultimately I'm looking to make a flashable zip.

Soz for lumping a few issues in there in one go.
[Android Software/Hacking General [Developers Only]] steadfasterX:
1. Use mAid nightlies (oldest one you can get) as FWUL is out of date.

2. You can mount a system img in SALT (advanced menu) which should give the right permissions

3. Read the faq on how to provide a log when it comes to any connection issues
[Android Software/Hacking General [Developers Only]] hamed_66:
off lg g4 h818p

hi i flash with salt my mobile lg g4 h818p but i remove bootloader and then reboot my phone and my phone get off and no power on anytime i do this method with salt

please help me to power on my mobile

please

isnt any one to help me ?

are all of you dead ?

whats happen to you?
[Android Software/Hacking General [Developers Only]] Magic Sjeorge:
LG G8X

Can this flash a stock kdz on a LG G8X model LMG850EMW?
[Android Software/Hacking General [Developers Only]] steadfasterX:
no.

.-
[Android Software/Hacking General [Developers Only]] piotr1953:
Got a problem

I use salt to extract LG G5 and V490 firmware. BackupGPT.gpt content;

V490;

############################## 3+half page

G5

�����3D��h��&��z3P��d@�U�d)x΀\########################p#e#r#s#i#s#t#e#n#t#####################################################�����3D��h��&��{�0]�U��#���ssJ########################g#r#o#w#7###############################################################################��#h*�������########�###############l#a#s#t#_#p#a#r#t#i########################

two pages of hashes and end;

#############################################EFI PART####\###�'7T####�#######################�#######2##���K�n+�=#

You think it will work???

gedit show blank page fie size 17 and 26kB

Vale Piot

PS excuse me for Writer shall use MC preview in hex:)
[Android Software/Hacking General [Developers Only]] steadfasterX:
list the partitions by:

gdisk -l BackupGPT.gpt

(why backup btw? usually you want the main one)

.-
[Android Software/Hacking General [Developers Only]] piotr1953:
PrimaryGPT.gpt AS YOU WISH:)

PrimaryGPT.gpt FULL! YOUR OPINIONPLEASE:)

V490

############################################���####����################################################U�EFI PART####\####��#############���#####"#######ޟ�#####2##���K�n+�=#

G5

################################################################################################################################################################���####����################################################U�###############################################EFI PART####\###ڲT�############�###############�#######2##���K�n+�=#

VALE PIOTR

---------- Post added at 10:14 PM ---------- Previous post was at 09:16 PM ----------

piotr@piotr-Ex:~/lg$ gdisk -l PrimaryGPT.gpt

GPT fdisk (gdisk) version 1.0.1

Partition table scan:

MBR: protective

BSD: not present

APM: not present

GPT: not present

Creating new GPT entries.

Disk PrimaryGPT.gpt: 48 sectors, 24.0 KiB

Logical sector size: 512 bytes

Disk identifier (GUID): 571C7499-CAE5-4225-8295-F54986C89584

Partition table holds up to 128 entries

First usable sector is 34, last usable sector is 14

Partitions will be aligned on 2048-sector boundaries

Total free space is 0 sectors (0 bytes)

Number Start (sector) End (sector) Size Code Name

FOR V490

GPT fdisk (gdisk) version 1.0.1

Warning! Disk size is smaller than the main header indicates! Loading

secondary header from the last sector of the disk! You should use 'v' to

verify disk integrity, and perhaps options on the experts' menu to repair

the disk.

Caution: invalid backup GPT header, but valid main header; regenerating

backup header from main header.

Warning! Error 25 reading partition table for CRC check!

Warning! One or more CRCs don't match. You should repair the disk!

piotr@piotr-Ex:~/lg$

ANY IDEA WHAT'S WRONG???

VALE PIOTR
[Android Software/Hacking General [Developers Only]] steadfasterX:
ok first of alll it is a bad idea to paste binary code in a forum. its useless anyways so better remove those.

Other then that the GPT looks fine - there is nothing wrong with it. but what do you want to do with it?

.-
[Android Software/Hacking General [Developers Only]] piotr1953:
thanks to steadfasterX

I see you are expert:)

Is linux driver for	Qualcomm MSM8996 Snapdragon availlable?

Vale Piotr
[Android Software/Hacking General [Developers Only]] piotr1953:
EXCUSE ME I'M NEW ON FORUM:)

I erase al on v490, including four red marked by SALT partitions.

It looks as I get rid of boot IMEI and ARB.

Its now in snapdragon download mode and in my opinon even upploading new ROM don't solve problem?

G5 went in same state laing on table and charging.it

Morning only red charging diode was shining and after attempt of switch on everything went dead.

Win 10 see both like qualcom com 3.

Looks as ubuntu need driver for, is there any???

If you can add it to SALT it make good unbrick tool:)

Other problem v490 have 16 Gb RAM partition in new ROM is 32 Gb.

Thats maybe reason for no updates availlable:)

Nothing for win 10 on LG:(

Vale Piotr

lg means lucky gold****:)
[Android Software/Hacking General [Developers Only]] steadfasterX:
When it's in 9008 EDL/QDL mode you need either a box or windows + qfil and proper unbrick files for your device
[Android Software/Hacking General [Developers Only]] piotr1953:
EDL/QDL

Medusa cost $150 and wouldn't work, it need lg drivers.

Octoplus $50 use it to fix similar value devices not make much sense:)

Qfil need firehoses for snapdragon 400 and 820, any idea how to get them?

Looks as I must write linux driver for snapdragon:(

If you have .inf file for snapdragon it may help.

My last progaming was in Z80 assembler, horror.

I like ALGOL but iit die with buran maybe Fortran I'm used to 45 years ago:(

I shall have backup on sd but lineageos 7.1.2 may make it a mess:(

Vale Piotr
[Android Software/Hacking General [Developers Only]] steadfasterX:
Check the links in the following issue:

https://code.binbash.rocks:8443/FWUL/build_fwul/issues/11
[Android Software/Hacking General [Developers Only]] piotr1953:
SAHARA

TELEPATY???

Looks as I was there first:)

https://xdaforums.com/hd2-ubuntu/general/sahara-installation-ubuntu-16-04-t4151829

I like git:) work perfect:)

You my try add this to Salt:) If you can add in manual a bit about images it may help:) For me it's black magic.

Back to g5, I'm thinking about flashing only boot image, if it succed and boot device I will have plenty of options but at this moment i can't exclude hardware:(

Bad luck come in three my SD reader went dead:( ¢50 + 60 days from China:(

Vale Piotr

ps QDL is security loophole paranoid android is deeper loophole and worst virus is called windows 9/10 PC infected:)
[Android Software/Hacking General [Developers Only]] piotr1953:
Next step next questions

Have adb, fastboot, qdl, and sahara.

Bricked LG G5, extracted primarygpt.gpt and boot.bin.

Task; reload boot partition only.

Question; wich program use for?

May I load boot bin or shall convert file?

Shall I reload aboot.bin too?

piotr@piotr-Ex:~$ adb devices -l

List of devices attached

* daemon not running. starting it now on port 5037 *

* daemon started successfully *

piotr@piotr-Ex:~$ fastboot -p

fastboot: option requires an argument -- 'p'

piotr@piotr-Ex:~$ fastboot devices

piotr@piotr-Ex:~$ qdl

qdl [--debug] [--finalize-provisioning] [--include <PATH>] <prog.mbn> [<program> <patch> ...]

piotr@piotr-Ex:~$

May somebody write exact command for me? Vale Piotr
[Android Software/Hacking General [Developers Only]] steadfasterX:
This thread is just about SALT so you should better ask elsewhere.

I cant help you with your issue and this is not the right place to ask for these tools. check if they have a forum or issue tracker or whatever.

.-
[Android Software/Hacking General [Developers Only]] piotr1953:
You don't reply my questions about SALT:(

Vale Piotr
[Android Software/Hacking General [Developers Only]] steadfasterX:
I replied to all SALT questions... what did I missed?

.-
[Android Software/Hacking General [Developers Only]] piotr1953:
FIREHOSE

Looks as ubuntu need driver for, is there any???

Git firehose is it.

If you can add it to SALT it make good unbrick tool???

Other problem v490 have 16 Gb RAM partition in new ROM is 32 Gb???

Mount in SALT, may you say more about?

Vale Piotr
[Android Software/Hacking General [Developers Only]] steadfasterX:
There is no driver needed. Linux is not windows. Whats your problem? Give error messages, post screenshots, describe what your problem is.

Really no idea what that sentence means. I understand firehose and this is not related to SALT. This is related to the links I provided already. SALT is no EDL/QDL/9008 mode tool. It works in Download mode only.

Feel free to extend SALT if you like. I do not have the time to code from scratch the EDL handling.

So no idea what you are trying here. The partition size of your older device is smaller then the new one? and this is a problem because...? What are you trying to do?

How is this related to SALT?

What do you want to know? You can mount some image partitions like modem / firmware or system. That menu can be found in the advanced menu.

.-
[Android Software/Hacking General [Developers Only]] piotr1953:
SAHARA

THANKS FOR QUICK ANSWER:)
[Android Software/Hacking General [Developers Only]] steadfasterX:
Your device is in EDL/QDL mode. This is nothing SALT can handle. and this is not a driver issue but a protocol one. You need something like SAHARA which can speak in EDL mode.

as said, I have no plans doing so.

What about reading the OP? All sources are there..

RAM is not FLASH. if your device has 16 GB of RAM (Random Access Memory) then this has nothing to do with the STORAGE and touching the GPT will brick your device as checksums are in place.

What about reading the OP? All sources are linked..
[Android Software/Hacking General [Developers Only]] piotr1953:
What's reason for eyes say russian blind man:)

THANKS

Sorry for dusturbing:)

V49020b_00.dz 1.1Gb file, any idea about reason and content?

Vale Piotr
[Android Software/Hacking General [Developers Only]] steadfasterX:
what reason and content? no idea what you mean. you can extract a KDZ with SALT and mount e.g. the system image if u like to.

.-
[Android Software/Hacking General [Developers Only]] piotr1953:
I extracted lg room
[Android Software/Hacking General [Developers Only]] nubla:
I have an md5 mismatch error for cache.img and userdata.img after doing a full backup and verifying, much like the screenshot in this old post: https://xdaforums.com/showpost.php?p=77148994&postcount=436

I redid a custom backup on just cache and userdata, but the md5 verification failed again.

Using SALT 3.22-12:stable in mAid_v2020-09-02_08-13_x86_64_forgetful with a LG G4 H12 stock android 6, pre-UsU.
[Android Software/Hacking General [Developers Only]] steadfasterX:
I can just guess as you didn't shared the log..

Those partitions are extreme big and the laf protocol can easily run into timeouts which is likely what happened to you but as i don't have a log i can't say for sure.
[Android Software/Hacking General [Developers Only]] nubla:
I redid a backup (custom: cache and userdata) a third time, and this time cache.img md5 verification succeeded while userdata.img failed again. I got the log too before closing SALT this time: http://ge.tt/8xaYF073 The preview may take a long time or fail on the 1.6 million lines... so downloading the log may be faster or more reliable. I couldn't find the upload button for the XDA forum. Is it restricted for new accounts?

Is there a way in SALT to do just a md5 verification on an existing backup file?

Also, why did a full backup result in .bin files, while custom backup names them with .img ? I presume the backups are done the same way? I was able to mount and explore both, but I wonder why they are named differently.

Note that the "Browse" button in SALT fails, and the debug terminal shows "open failed: Name "com.deepin.SessionManager" does not exist". I had to navigate to /mnt/salt_mnt myself in a file browser.

Uploading log files from SALT also fails (shown at end of log).
[Android Software/Hacking General [Developers Only]] steadfasterX:
thx for the log! it runs in the timeout.

no and this would not help for that issue. the command for doing the md5 runs on both sites: your local backup and the device. the problematic part is the device one and here we have no real options other then to live with it.

one more word about that though:

backing up cache is useless. Even if for any reason you would need to restore you never would restore that partition. It get filled by android when using it and it can start completely empty. the first boot would just take a bit longer when its empty thats all.

backing up system is usually useless, too. As long as you know your exact STOCK version you can simply extract that file from a KDZ. its a readonly (if not doing nasty stuff) partition anyways so its just a 1:1 copy of what its in a KDZ.

backing up userdata CAN be important though. It contains your files, pics, videos etc. unfortunately thats also the biggest partition and the most likely one where a md5 check fails. but the good news are: when you can mount that partition in SALT you can be usually pretty safe that all is in place. but also look around, check if your important files and folders are there and then its fine.

well bin, img, that does not matter at all (see FAQ #11) but you're right that this should be consistent at least within SALT. I have opened an issue for that (https://github.com/steadfasterX/SALT/issues/35)

thx for reporting. that seems to be an issue on the nightly mAid build. will look into that.

thx for reporting. have opened another issue for that one (https://github.com/steadfasterX/SALT/issues/36)
[Android Software/Hacking General [Developers Only]] nubla:
Thanks for the clarifications.

One other suggestion would be to see if it could be made easier to mount network shared directories in mAid. I had to use pacman to install some packages (I think smbclient and/or cifs-utils) and had to add an entry to /etc/fstab so that I could mount the shared directory as a user and have write permissions.
[Android Software/Hacking General [Developers Only]] steadfasterX:
Never had that requirement before tbh .. Usually the users accessing the local attached windows disks and never over a network ..
[Android Software/Hacking General [Developers Only]] nubla:
I can accept that I'm an unusual user. ;) I find it convenient to store phone backups, tools, ROMs on a NAS so I can have it all accessible from any computer, and it's especially convenient when booting mAid.

Now that I figured out what I need, it's pretty simple anyway:

- install mount.cifs with "pacman -Sy cifs-utils"

- edit /etc/fstab to include a line like

//[SERVER IP]/[SHARE] /home/android/Desktop/share cifs username=[username],password=[password],noauto,rw,users 0 0

to make it user mountable

- then simply mount with

mount.cifs //[SERVER IP]/[SHARE] /home/android/Desktop/share
[Android Software/Hacking General [Developers Only]] milleniumarg:
I using Devuan Linux without systemd (SysV). How can I setup udev-rules?
[Android Software/Hacking General [Developers Only]] steadfasterX:
...ask that in a devuan forum might help?!
[Android Software/Hacking General [Developers Only]] DontReuseUsernames:
So, I presume after all this you all must be reflashing with LGUP via Wine...?
[Android Software/Hacking General [Developers Only]] crocopoco:
Hi guys, trying to flash an old LG G4 using Salt. The original post is quite old but I see this is still active. I have downloaded kdz

when I run salt with the phone in DL mode I click on extract then load the kdz

I get an error saying ERROR occured or aborted by user!

Could you guys help pointing me in the right direction ?

thanks a lot
[Android Software/Hacking General [Developers Only]] steadfasterX:
Reproduce your issue and follow FAQ 1000
[Android Software/Hacking General [Developers Only]] crocopoco:
I believe the issue was a lack of space disk (FWUL doesn't let me access the 64gb of the sd I installed it on....)

is it normal that I don't have an extract + flash button at the bottom right ?
[Android Software/Hacking General [Developers Only]] steadfasterX:
the usb disk / stick where you flashed FWUL on cannot be used by anything else then FWUL boot. at least if using the forgetful option and persistent is deprecated already (as v4.0 will include an installer).

as you do not share the log as suggested I cannot say much but at least you shared a screen (pls remove it though bc it contains your imei).

due to the fact that you are on laf protocol 100001 you can in theory use SALT to flash but as you found out already this is not enabled by default as it is HIGH risk and HIGH experimental.

if you want to still proceed u need to start SALT with "--experimental" but again - even when I have used it a lot it might brick a device for others.
[Android Software/Hacking General [Developers Only]] crocopoco:
It's an old G4 that was going to the trash anyway so I'm willing to take risks. I've tried my luck in all the windows software and nothing. I really want to try and flash a fresh kdz

So in order to start SALT with --experimental I have to run it from command ? Sorry, not used to linux...
[Android Software/Hacking General [Developers Only]] steadfasterX:
EDIT:

!! This is now covered in FAQ 18) - Read that FAQ before proceeding here !!

open a terminal (square black icon in the panel)

type:

sudo ~/programs/SALT/salt --experimental

but beware even when there is a "KDZ flash" button this is not yet fully implemented. you have to use "flash folder" instead. the reason is that when choosing kdz flashing with LGup not all partitions get flashed. e.g.

do not flash:

- misc

- encrypt

- devinfo

- modemstXX

there might be more but I hadnt had the time to look into that.

basically - when unlocked - the only thing needed to upgrade a device's firmware is

- the bootloader stack (read FAQ 27 here for an example of the LG G4 one)

- system

- boot

- modem

when your device is locked then you need to flash laf as well but this might prevent using SALT flashing once rebooted.

so my recommendation is to unlock the device first (if not done already)

1. then take a SALT backup

2. then flash just the bl stack + system + boot + modem as mentioned
[Android Software/Hacking General [Developers Only]] crocopoco:
allright!

will try that