yashsingh1/xdaforums huggingface dataset:
[Android Software/Hacking General [Developers Only]] steadfasterX:
It depends. As long as your phone is not encrypted you can mount the userdata partition on SALT (advanced menu) and copy what you need. If your device is unlocked you could also use fastboot to flash userdata or if fastboot denies (some versions may reject that) you can use TWRP and a shell command to flash the partition back. Even SALT could be used as long as you are using a laf version on your phone which is supported for flashing.

About the pin question I'm not sure what you mean. Data encryption has nothing to do with a pin/pattern to unlock. You can have an encrypted device with just swipe to unlock the phone. If your data is encrypted you cannot make any use of it when backing it up as the backup will be encrypted as well. Restoring the encrypted backup after a factory reset will 100% require more partitions to be restored then just userdata (at least persist,drm,encrypt partitions for a LG g4 but there might be more)

Correct .

and NTFS will do as well as long as the Linux system supports it (like FWUL does)
[Android Software/Hacking General [Developers Only]] ST Dog:
His ~16% of 24GB is right around 4GB so I suspect he's got a FAT32 formatted device.

Just mentioned exFAT as it's common on removable media. Personally I'd prefer ext3/4 or even a Linux flash specific filesystem like F2FS.
[Android Software/Hacking General [Developers Only]] robles4242:
Just curious if the LG Q Stylo 4 and/or 5 (LM Q710TS or Q720TS) are supported?
[Android Software/Hacking General [Developers Only]] mpbdlc:
Formatting the USB drive with NTFS did the trick. Thanks to all of your help I was able to successfully backup all the partitions now. Tomorrow I will attempt to factory reset and flash the partitions back. Will let you know how it goes.

Thanks again!!!!
[Android Software/Hacking General [Developers Only]] steadfasterX:
glad it works now.

do you have tried to mount (SALT -> advanced menu) the userdata partition?

.-
[Android Software/Hacking General [Developers Only]] mpbdlc:
Hi steadfasterX,

I did try it but with no success:

2019-12-11 06:35:07: F_MOUNTIMG: started with /home/android/USB/userdata.img

2019-12-11 06:35:07: F_MSGE: started

2019-12-11 06:35:14: ERROR: Image could not be mounted to /mnt/salt_mnt.Is this even an mountable image?

I believe this is the result of the partition being encrypted. I performed a factory reset on the phone and bootloop went away this is good since it means it was a software and not a hardware issue as I suspected. I believe the best next step will be to try to flash back some of the partitions to see if with any luck I can gain access to my original data. I am looking into using TWRP but there does not seem to be a version for the H860. There is G5 H850 then jumps to G6 H870. Is it possible to use H850 version at all?

Thanks!
[Android Software/Hacking General [Developers Only]] steadfasterX:
yes that means it is encrypted and so cannot be used to restore without other (unknown) partitions.

when you just flash random partitions back to your phone you can EASILY cause hard bricks!!! so better asking in th G5 forums for help. same for TWRP. I do not own a G5.

I fear that you will not find much help for that though as it took me 100+ hard bricks to find which partitions are e.g. the full bootloader stack on a G4 plus what partitions are used for storing crypt data etc.

So.. Good luck and I would recommend to only flash stuff when you know how to recover from a hard brick (9008/QDL/EDL mode).

things are tied together so flashing just the one partition without the other (and nobody knows which are the right ones or depend on the other) can cause a hard brick. if you have a partition named "encrypt" on the G5 I would start with that, so userdata + encrypt and see what happens. but again .. keep in mind what I said about hard bricks.

.-
[Android Software/Hacking General [Developers Only]] kammy6000:
can anybody please tell me where to get the nightly build of salt

i am not linux educated , but have tried for several hours with errors about zstandard so i need the build with all the data included i cant find any link for the nightly build

(fatal error) missing python-zstandard

after i update with dev options it keeps throwing errors

thanks
[Android Software/Hacking General [Developers Only]] steadfasterX:
I guess you mean the latest FWUL / mAid nightly which includes SALT:

http://leech.binbash.rocks:8008/mAid/

Use etcher to flash it to an usb stick
[Android Software/Hacking General [Developers Only]] kammy6000:
so i tried these options

1) rename your usb device to e.g. "USBDISK" (so remove the space)

2) or switch to develop version of SALT (read the SALT faq on how-to)

fwul nightly used with dev options even tried another usb stick get same error cant mount the img etc in salt

still same results nothing is able to mount or open this raw .img file , any other ideas maybe its encrypted or corrupt in some way its 3gb in size so data is present but cant access it

thanks , and happy new year to you
[Android Software/Hacking General [Developers Only]] steadfasterX:
Share the log...
[Android Software/Hacking General [Developers Only]] steadfasterX:
Ok open a terminal and type:

file /run/media/android/USB1/userdata.img

sudo mkdir /mnt/data

sudo mount /run/media/android/USB1/userdata.img /mnt/data

ls -la /mnt/data

share the output of the above
[Android Software/Hacking General [Developers Only]] kammy6000:
hi here is output thanks

[android@maid ~]$ file /run/media/android/USB1/userdata.img

/run/media/android/USB1/userdata.img: data

[android@maid ~]$ sudo mkdir /mnt/data

We trust you have received the usual lecture from the local System

Administrator. It usually boils down to these three things:

#1) Respect the privacy of others.

#2) Think before you type.

#3) With great power comes great responsibility.

[sudo] password for android:

[android@maid ~]$ sudo mount /run/media/android/USB1/userdata.img /mnt/data

mount: /mnt/data: wrong fs type, bad option, bad superblock on /dev/loop1, missing codepage or helper program, or other error.

[android@maid ~]$ sudo mount /run/media/android/USB1/userdata.img /mnt/data

mount: /mnt/data: wrong fs type, bad option, bad superblock on /dev/loop1, missing codepage or helper program, or other error.

[android@maid ~]$ ls -la /mnt/data

total 0

drwxr-xr-x 2 root root 40 Dec 31 22:02 .

drwxr-xr-x 1 root root 60 Dec 31 22:02 ..
[Android Software/Hacking General [Developers Only]] steadfasterX:
Ok. Data is (likely) encrypted , nothing we can do here sorry . The only other option is a corrupt backup (while I think the chance for that is around 5% due to the above output you got ...) you can try to open qphotorec from the FWUL / mAid desktop and select the userdata img to scan for file types of your choice . If the backup is just corrupted you will be able to restore them otherwise you can be sure it is encrypted .
[Android Software/Hacking General [Developers Only]] kammy6000:
photo rec found 0 , so it must be encrypted , thanks for your support
[Android Software/Hacking General [Developers Only]] P_metheny99:
Full backup failed

Hello steadfasterX,:)

Before to unlock G4 bootloader I ‘ve tried to perform a full backup using SALT, but unfortunately the backup fails with “ERROR: Backup (Full) incomplete! Check the log.”

Here are the logs: bpaste.net/MXJQ

FWUL persistent /SALT 3.21

Smartphone: LG G4 H815 brand TIM;

Rom: V29a Nougat Stock

Bootloader: Locked

Root: NO

TWRP: NO

Hope you can help me

Thx for your time
[Android Software/Hacking General [Developers Only]] steadfasterX:
Well there are 2 possible reasons for this:

The disk space at the target is too small or simply incompatible for files bigger then 4 GB (like a fat32 partition )

There could be other reasons but they are rare.

The problem with filtered logs is they are always missing the important information I need. If bpaste does not allow that big file attach it to your next post here pls.
[Android Software/Hacking General [Developers Only]] P_metheny99:
Full backup failed

If I remember well the disk space (NTFS) was more than free enough to contain full backup, but I’ll recheck again this evening to be sure 100%.

About full backup logs I've tried many times to attach the big log file in this post (7,39 MB) using several browsers, but without success.

So at the end I thought to share with you the full log file by using my google drive at this address, so you can easily download it

//drive.google.com/open?id=1dRg40A3UxGcf70doIZhCSEPP9a7WnZMJ

Thanks again
[Android Software/Hacking General [Developers Only]] P_metheny99:
Full backup failed

Checked, for the backup there were 42 GB free in a NTFS partition.
[Android Software/Hacking General [Developers Only]] steadfasterX:
ok thanks for the full log. Do the following:

1. switch to to the develop version of SALT (see FAQ for how)

2. do a custom backup and select all but

not

userdata and cache (as that one is just useless space)

3. wait until backup has finished

4. do a custom backup again, this time only with userdata

one more thing: do you have encrypted your device? If so backing up userdata is useless as it will backup the encrypted state.

.-
[Android Software/Hacking General [Developers Only]] P_metheny99:
Full backup failed

Dear steadfasterX,

I have no encrypted device, so I tried to switch to develop version of SALT, following your FAQ at point 10).

I’ve launched SALT and done the update (that seemed ok) and at the request to restart SALT I’ve obtained

a windows pop up saying “SALT 3.22.11 : TESTING – ERROR”

“ERROR: FATAL ERROR!! Missing requirement python cryptography module (Python3) Read the SALT thread for how to install and try again !”

After then It was impossible to start again SALT, so I have been constrained to flash again FWUL (FWUL_v3.1_x86_64_8GB.zip)

over the USB pen-drive and I've tried again the same procedure , but obviously the result was the same.

What did i get wrong?

Thanks for you support
[Android Software/Hacking General [Developers Only]] steadfasterX:
you can solve that by flashing mAid (fka as FWUL) --> nightly. it has everything on board already.

If you wanna do the same with FWUL 3.1 pls do the following command in a terminal:

sudo pacman -Sy python-zstandard

only if the above does not solve the issue:

sudo pip3 install cryptography

if none of them solves the issue, install the latest mAid nightly instead (see FWUL OP).

.-
[Android Software/Hacking General [Developers Only]] verbage:
Blah, bitten yet again by the LG G4 boot loop bug... This is the third time, yup... Though the first two times taught me to backup regularly, I was a bit more than two weeks out from my last backup on this newly failed G4 H811. And so I have now lost a series of important recordings, SMS text messages, and other data bits that have accumulated over the last two weeks. Or have I? I am thinking of a scheme to potentially recover it before any physical intervention like hot air reflowing, directed pressure, or whatever. Here is my thought.

With the bootlooping G4 H811, I was able to get into Download mode, and backup all 56 partitions totaling about 29 GB total. And I have available two more identical G4 H811s that are still available and functioning (yeah, what can I say--I am glutton for punishment...). So my thought was to write the 24 GB userdata partition that I salvaged from the now failed G4, and use TWRP to write it to the userdata partition of one of a functional G4.

If I were to do this, on booting the still functional G4, would I essentially be able to grab the two weeks of important data I mentioned above?

I guess I would also clone over the system partition because the G4s are running slightly different versions of steadfasterX's LOS16.

Any other salvaged partition images that I should clone over to the still functional G4 to make this all work?

Many thanks in advance for any guidance you might have!
[Android Software/Hacking General [Developers Only]] verbage:
So I've run into some hiccups in my potential strategy above, but I am hoping they are not insurmountable.

First issue was that my full userdata partition image made by SALT is about 24 GB in size as mentioned above. So it is too big for a FAT32 filesystem on MicroSD or as common on most USB drives (which could be accessed as OTG in TWRP). No problem, I simply prepared a spare MicroSD with an exFAT filesystem to deal with this. And so I went on my merry way to the still functional recipient G4 with this new MicroSD filled with boot, system, and userdata images expecting to be able to flash them via TWRP. But alas, it seems TWRP only allows flashing of boot and recovery partitions, not userdata. So even though I can access the 24 GB image under TWRP, there is no way to flash it. I looked around TWRP for advanced options that might let me override this, but no luck.

But then it occurred to me I could just put the G4 into download/fastboot mode, and use fastboot to flash over the 24 GB userdata partition. Seems logical--of course, I have used fastboot to flash smaller partition images like recovery on other systems, but I have never attempted to flash a huge, 24 GB like this. Any comments about this strategy before I give it a go?

BTW, I have been able to mount the 24 GB userdata partition under FWUL, and I can see the whole contents no problem. So I could directly grab system-level data like SMS and my fitness tracker data (another important thing I forgot about!). I am not talking about normally accessible user stuff under the emulated IntSD user space storage like Downloads, DCIM, etc. Maybe this is a solution, but how would I restore this under a functional G4???
[Android Software/Hacking General [Developers Only]] steadfasterX:
1. Correct you just need system, boot and userdata to "clone" your old device . Any other partition has the potential to brick your working phone

2. You CAN use TWRP to do this but you need a shell and use the dd command

3. fastboot is the easiest way and there is no size limit in pushing files there. So give that a go for all the mentioned partitions of 1. It should work pretty fine.
[Android Software/Hacking General [Developers Only]] verbage:
Thank you, steadfasterX, for the response!

I went into fastboot/bootloader mode on the recipient G4, and using FWUL, attempted to flash these three partitions, but ran into an error with each one at the end of each operation (see below). The phone was definitely in the correct bootloader mode as it was recognized with the "fastboot devices" command as per below. I tried it with Windows version of fastboot after FWUL, but the same error. So close to potential victory, but not quite yet.

To make the three partition images with SALT, I used the Backup option which was pretty straightforward. And as mentioned previously, I was able to mount the userdata partition image to browse it, and is contains seeming good data. So I don't think the images are the problem.

I must be missing something...

[android@fwul ttt]$ fastboot devices
61b3114b	fastboot
[android@fwul ttt]$ fastboot flash boot boot.img
target reported max download size of 536870912 bytes
Sending 'boot' (40960 KB)...
OKAY [ 1.334s]
Writing 'boot'...
FAILED (remote: unknown command)
Finished. Total time: 1.440s
[android@fwul ttt]$ fastboot flash system system.img
target reported max download size of 536870912 bytes
Invalid sparse file format at header magic
Erasing 'system'...
FAILED (remote: unknown command)
Finished. Total time: 4.809s
[android@fwul ttt]$ fastboot flash userdata userdata.img
target reported max download size of 536870912 bytes
Invalid sparse file format at header magic
Erasing 'userdata'...
FAILED (remote: unknown command)
Finished. Total time: 26.277s
[android@fwul ttt]$
[Android Software/Hacking General [Developers Only]] steadfasterX:
Ok your fastboot mode is pretty limited , say thx to tmo. Anyways just switch to TWRP then and assuming you have all 3 partitions directly on your external sdcard these are the cmds to flash them:

adb shell

dd if=/external_sd/boot.img of=/dev/block/bootdevice/by-name/boot

sync

dd if=/external_sd/system.img of=/dev/block/bootdevice/by-name/system bs=512

sync

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

sync

After that reboot and it should be fine.
[Android Software/Hacking General [Developers Only]] verbage:
Thanks so much for your help with this, steadfasterX! In the long run, I might not have to use it because I started some intensive freezer therapy with the wonky G4 last night, and was able to backup the two critical things I wanted, and then restore them to the new surrogate G4. Whatever the case, I am pleased to see how flashing full partition images can be done directly with dd in TWRP since TMo seems to have crippled fastboot mode on the H811 :mad: Indeed, given my luck with the G4, I can certainly see it coming in handy in the future.

By the way, thank you for the FWUL+SALT combo--it works great!
[Android Software/Hacking General [Developers Only]] LuKePicci:
Trying to make my first backup. Running FWUL in virtualbox. I can confirm phone is in Download Mode. SALT is not detecting the phone, even if lsusb shows it. I also updated SALT (it was on latest master already).

Here is the debug log from SALT: https://pastebin.com/PkvAFBSQ

I can't find the info about running FWUL into virtualbox, the link about "doing critical things in virtualbox" is broken. FWUL can see the device in adb shell, USB filter for the VM matches everything from LG. (id 1004)
[Android Software/Hacking General [Developers Only]] steadfasterX:
Do you have USB 2 or 3 configured in VirtualBox ? Try switching to the other. When doing this you might need to set the USB filter again . This is (just) one reason why I recommend usb stick boot..

You can also try to put your phone into Download Mode first and then boot FWUL. for this you need you have Auto USB filtering enabled of course.
[Android Software/Hacking General [Developers Only]] LuKePicci:
Will try, at least I know it should work. It would be a little of a problem to boot FWUL natively on my device as it has secure boot and bit locker enabled on the tpm, so I usually keep all live iso I would need to boot into a secure-boot enabled USB drive with Grub, booting other live ISO in turn. Also my device has no integrated keyboard, if something goes wrong in arch with the mobile keyboard or the touchscreen or the docking station interface it would be quite annoying. AFAIK we have touch-capable bootloaders/recoveries for both windows and Android but not for Linux.
[Android Software/Hacking General [Developers Only]] steadfasterX:
at least for secure boot there are good news if you are using the nightlies: they support that ;)

https://code.binbash.rocks:8443/mAid/build/wiki/Secure-Boot

.-
[Android Software/Hacking General [Developers Only]] LuKePicci:
Rebooting the VM while device connected and in download mode did the trick. Now backing up. ?
[Android Software/Hacking General [Developers Only]] _bobby_tables_:
US991 to H811 to gain VoLTE capabilities?

This is probably a stupid question, but...

I have an LG G4 US991 that is facing obsolescence due to lack of VoLTE support. The H811 model does have VoLTE support. Can I flash my US991 with an H811 ROM to gain VoLTE? Are there physical differences between the LG G4 models that would prevent such a ROM switch? Thanks.
[Android Software/Hacking General [Developers Only]] steadfasterX:
Is VoLTE worth it? Imho no but maybe that's a personal thing.

Anyways converting a device is EXTREMELY risky. Not because of hardware diffs (all g4 models are identical, ok besides the h818 which has a diff panel) but because of the PBL (primary bootloader) which sits in a protected area and verifies the area which can be flashed (i.e. what you flash by kdz). It's all about signatures (we can leave out ARB for the moment) . The thing is without the PBL (which you can't pull) nobody else then the us991 OEM can say if you can convert without a hard brick.

You can though (depends on your ARB): unlock with UsU, flash boot , modem and system of a stock h811 (must match your current ARB!!!) and you might can get VoLTE ( your provider must support that as well, often needs then a manual activation too). No guarantees here as well but the chance for a hard brick are at 1% if you follow the guide . And as you have a fusing model you could even revert UsU so if that didn't worked and you wanna still risk a hard brick you could try a convert then (chance for a hard brick are here 80:20).

You can recover from hard bricks by using qfil but you need proper qfil files for your model and ARB (which could be a real issue for your model )!!! Or by using a box but those work usually only up to ARB 2.
[Android Software/Hacking General [Developers Only]] steadfasterX:
New Release

Checkout FAQ #9 for howto update to this brand new release

Legend for the summary topics:

Fix/New (SALT): Fixes & Enhancements of the SALT main application - what you see and work with

Fix/New (lglaf): Fixes & Enhancements of the USB communication backend which SALT uses under the hood

Fix/New (kdztools): Fixes & Enhancements of the KDZ extraction backend which SALT uses under the hood

v3.22

Released: 2020-03-09

Full changelog (SALT): at github (this version compared with the previous release)

Full changelog (lglaf): at github

Full changelog (kdztools): at github

Summary changelog:

ATTENTION FOR FWUL (v2.x, v3.x) users:

Upgrading to this Version

WILL BREAK

SALT without doing a FULL system upgrade (which can take hours, downloading multiple GB, may even break on low RAM systems)

Instead it is highly recommended to use the new mAid nightlies which are in RC phase already and so reasonable stable.

Fix (kdztools): some fixes for KDZ extractions

Fix (SALT): UsU and ARB detection in rare cases

Fix (SALT): no output for several lglaf based operations

Fix (SALT): backup (custom) progress bars

Fix (SALT): when a folder or filename contained a space SALT failed to parse and extract

Fix (SALT): several things around ARB and ARB detection

Fix (SALT): screwed part listing

Fix (SALT): log upload

New (SALT): added a pre-check after the user selected a directory: when the path exists and containing image files the user get prompted to either retry or continue.

HINT:

Newer devices using UFS storage (e.g. G5, G6, ..) still need to switch to the DEVELOP/TESTING branch (see FAQ)
[Android Software/Hacking General [Developers Only]] hbtariq123:
LG g5 H820n11 att

i upgraded my lg g5 att H820n11 with lgup to oreo 8.0 with a tot file and after completion my phone turned off and then it is dead. and in device manager there is com 18 lge androidnet usb serial port. what i do now...plzz help me.. thanks