GithubHelp home page GithubHelp logo

steadfasterx / salt Goto Github PK

View Code? Open in Web Editor NEW
59.0 8.0 20.0 3.09 MB

SALT - [S]teadfasterX [A]ll-in-one [L]G [T]ool

Home Page: https://forum.xda-developers.com/t/tool-locked-unlocked-salt-the-lg-up-revolution-begins.3717864/

License: GNU Lesser General Public License v2.1

Shell 98.48% Python 1.52%
lg lglaf kdz kdztools yad

salt's Introduction

SALT

SALT - [S]teadfasterX [A]ll-in-one [L]G [T]ool

salt's People

Contributors

steadfasterx avatar thepiguy0 avatar thirstymick avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

salt's Issues

upload log does not work on big files (>10 MB)

example output (useless though) on a 33 MB file:

2020-09-08 22:26:24: Success(#): 1, Warnings(#): 0, Errors(#): 1
2020-09-08 22:59:04: F_ADVMENU: started with LG-H812
2020-09-08 22:59:04: F_ADVMENU: main YAD_PID is 88809
2020-09-08 22:59:08: CR setting: Auto = 
2020-09-08 22:59:08: getlog script started
2020-09-08 23:07:58: F_MSGE: started
2020-09-08 23:08:05: ERROR: Error in module 'haste'  while uploading logfile..
Click EXIT for trying next paste service...


2020-09-08 23:08:05: 0
2020-09-08 23:08:05: F_MSGE: started
2020-09-08 23:08:09: ERROR: Error in module 'ix'  while uploading logfile..
Click EXIT for trying next paste service...


2020-09-08 23:08:09: 0
2020-09-08 23:08:38: CR setting: Auto = 
2020-09-08 23:08:38: getlog script started
2020-09-08 23:09:10: F_MSGE: started
2020-09-08 23:09:14: ERROR: Error in module 'transfer'  while uploading logfile..
Click EXIT for trying next paste service...


2020-09-08 23:09:14: 0

make ARB check more generic (non-G4 devices)

atm SALT checks for: sbl1 and aboot partitions
... and expects all LG models would have them.

As LG changes on every fucking model the partition names it must happen a detection first for a set of known partitions like:


1. get partition list
2. if sbl1; useit; else if foo; useit; else if bar; ....

The known partition names for the comparison above should be added to salt.vars to extend/modify them easily.

on a LG-SP200 the partitions are as follows (atm of writing its unknown which would be aboot and which sbl1 here):

Number of GPT partitions: 49
#   Flags From(#s)   To(#s)     GUID/UID                             Type/Name
1     0   1024       7167       EBD0A0A2-B9E5-4433-87C0-68B6B72699C7 Basic data partition
                                F57AD330-39C2-4488-9BB0-00CB43C9CCD4 proinfo
2     0   7168       23551      EBD0A0A2-B9E5-4433-87C0-68B6B72699C7 Basic data partition
                                FE686D97-3544-4A41-BE21-167E25B61B6F misc2
3     0   23552      39935      EBD0A0A2-B9E5-4433-87C0-68B6B72699C7 Basic data partition
                                1CB143A8-B1A8-4B57-B251-945C5119E8FE ftm
4     0   39936      50175      EBD0A0A2-B9E5-4433-87C0-68B6B72699C7 Basic data partition
                                3B9E343B-CDC8-4D7F-9FA6-B6812E50AB62 nvram
5     0   50176      65535      EBD0A0A2-B9E5-4433-87C0-68B6B72699C7 Basic data partition
                                5F6A2C79-6617-4B85-AC02-C2975A14D2D7 spare1
6     0   65536      81919      EBD0A0A2-B9E5-4433-87C0-68B6B72699C7 Basic data partition
                                4AE2050B-5DB5-4FF7-AAD3-5730534BE63D protect1
7     0   81920      98303      EBD0A0A2-B9E5-4433-87C0-68B6B72699C7 Basic data partition
                                1F9B0939-E16B-4BC9-A5BC-DC2EE969D801 protect2
8     0   98304      100351     EBD0A0A2-B9E5-4433-87C0-68B6B72699C7 Basic data partition
                                D722C721-0DEE-4CB8-8A83-2C63CD1393C7 lk
9     0   100352     102399     EBD0A0A2-B9E5-4433-87C0-68B6B72699C7 Basic data partition
                                E02179A8-CEB5-48A9-8831-4F1C9C5A8695 lk2
10    0   102400     159743     EBD0A0A2-B9E5-4433-87C0-68B6B72699C7 Basic data partition
                                84B09A81-FAD2-41AC-890E-407C24975E74 laf
11    0   159744     217087     EBD0A0A2-B9E5-4433-87C0-68B6B72699C7 Basic data partition
                                E8F0A5EF-8D1B-42EA-9C2A-835CD77DE363 lafbak
12    0   217088     218111     EBD0A0A2-B9E5-4433-87C0-68B6B72699C7 Basic data partition
                                D5F0E175-A6E1-4DB7-94C0-F82AD032950B para
13    0   218112     259071     EBD0A0A2-B9E5-4433-87C0-68B6B72699C7 Basic data partition
                                1D9056E1-E139-4FCA-8C0B-B75FD74D81C6 boot
14    0   259072     302079     EBD0A0A2-B9E5-4433-87C0-68B6B72699C7 Basic data partition
                                7792210B-B6A8-45D5-AD91-3361ED14C608 recovery
15    0   302080     345087     EBD0A0A2-B9E5-4433-87C0-68B6B72699C7 Basic data partition
                                138A6DB9-1032-451D-91E9-0FA38FF94FBB recoverybak
16    0   345088     349183     EBD0A0A2-B9E5-4433-87C0-68B6B72699C7 Basic data partition
                                756D934C-50E3-4C91-AF46-02D824169CA7 logo
17    0   349184     353279     EBD0A0A2-B9E5-4433-87C0-68B6B72699C7 Basic data partition
                                A3F3C267-5521-42DD-A724-3BDEC20C7C6F lo_bak_go
18    0   353280     373759     EBD0A0A2-B9E5-4433-87C0-68B6B72699C7 Basic data partition
                                8C68CD2A-CCC9-4C5D-8B57-34AE9B2DD481 expdb
19    0   373760     376831     EBD0A0A2-B9E5-4433-87C0-68B6B72699C7 Basic data partition
                                6A5CEBF8-54A7-4B89-8D1D-C5EB140B095B spare2
20    0   376832     393215     EBD0A0A2-B9E5-4433-87C0-68B6B72699C7 Basic data partition
                                A0D65BF8-E8DE-4107-9434-1D318C843D37 seccfg
21    0   393216     409599     EBD0A0A2-B9E5-4433-87C0-68B6B72699C7 Basic data partition
                                46F0C0BB-F227-4EB6-B82F-66408E13E36D oemkeystore
22    0   409600     421887     EBD0A0A2-B9E5-4433-87C0-68B6B72699C7 Basic data partition
                                FBC2C131-6392-4217-B51E-548A6EDB03D0 secro
23    0   421888     438271     EBD0A0A2-B9E5-4433-87C0-68B6B72699C7 Basic data partition
                                E195A981-E285-4734-8025-EC323E9589D9 keystore
24    0   438272     448511     EBD0A0A2-B9E5-4433-87C0-68B6B72699C7 Basic data partition
                                E29052F8-5D3A-4E97-ADB5-5F312CE6610A tee1
25    0   448512     458751     EBD0A0A2-B9E5-4433-87C0-68B6B72699C7 Basic data partition
                                9C3CABD7-A35D-4B45-8C57-B80775426B35 tee2
26    0   458752     459775     EBD0A0A2-B9E5-4433-87C0-68B6B72699C7 Basic data partition
                                E7099731-95A6-45A6-A1E5-1B6ABA032CF1 eksst
27    0   459776     460799     EBD0A0A2-B9E5-4433-87C0-68B6B72699C7 Basic data partition
                                8273E1AB-846F-4468-B999-EE2EA8E50A16 encrypt
28    0   460800     477183     EBD0A0A2-B9E5-4433-87C0-68B6B72699C7 Basic data partition
                                D26472F1-9EBC-421D-BA14-311296457C90 persist_lg
29    0   477184     522239     EBD0A0A2-B9E5-4433-87C0-68B6B72699C7 Basic data partition
                                B72CCBE9-2055-46F4-A167-4A069C201738 mpt
30    0   522240     542719     EBD0A0A2-B9E5-4433-87C0-68B6B72699C7 Basic data partition
                                9C1520F3-C2C5-4B89-8242-FE4C61208A9E lgfota
31    0   542720     544767     EBD0A0A2-B9E5-4433-87C0-68B6B72699C7 Basic data partition
                                902D5F3F-434A-4DE7-8988-321E88C9B8AA rct
32    0   544768     659455     EBD0A0A2-B9E5-4433-87C0-68B6B72699C7 Basic data partition
                                BECE74C8-D8E2-4863-9BFE-5B0B66BB920F factory
33    0   659456     757759     EBD0A0A2-B9E5-4433-87C0-68B6B72699C7 Basic data partition
                                FF1342CF-B7BE-44D5-A25E-A435ADDD2702 persist
34    0   757760     758783     EBD0A0A2-B9E5-4433-87C0-68B6B72699C7 Basic data partition
                                A4DA8F1B-FE07-433B-95CB-84A5F23E477B efuse
35    0   758784     775167     EBD0A0A2-B9E5-4433-87C0-68B6B72699C7 Basic data partition
                                C2635E15-61AA-454E-9C40-EBE1BDF19B9B nvcfg
36    0   775168     777215     EBD0A0A2-B9E5-4433-87C0-68B6B72699C7 Basic data partition
                                4D2D1290-36A3-4F5D-AFB4-319F8AB6DCD8 spare4
37    0   777216     842751     EBD0A0A2-B9E5-4433-87C0-68B6B72699C7 Basic data partition
                                FDCE12F0-A7EB-40F7-8350-960972E6CB57 nvdata
38    0   842752     908287     EBD0A0A2-B9E5-4433-87C0-68B6B72699C7 Basic data partition
                                0FBBAFA2-4AA9-4490-8983-5329328505FD metadata
39    0   908288     957439     EBD0A0A2-B9E5-4433-87C0-68B6B72699C7 Basic data partition
                                A76E4B2F-31CB-40BA-826A-C0CB0B73C856 md1img
40    0   957440     965631     EBD0A0A2-B9E5-4433-87C0-68B6B72699C7 Basic data partition
                                F54AC030-7004-4D02-9481-BBF982036807 md1dsp
41    0   965632     971775     EBD0A0A2-B9E5-4433-87C0-68B6B72699C7 Basic data partition
                                08167C43-03B6-0000-0000-0000487C1608 md1arm7
42    0   971776     982015     EBD0A0A2-B9E5-4433-87C0-68B6B72699C7 Basic data partition
                                000004E2-0000-0000-4F7C-1608E3040000 md3img
43    0   982016     1063935    EBD0A0A2-B9E5-4433-87C0-68B6B72699C7 Basic data partition
                                00000000-7C56-0816-E404-000000000000 carrier
44    0   1063936    1064959    EBD0A0A2-B9E5-4433-87C0-68B6B72699C7 Basic data partition
                                08167C5D-04E5-0000-0000-0000647C1608 spare3
45    0   1064960    1081343    EBD0A0A2-B9E5-4433-87C0-68B6B72699C7 Basic data partition
                                000004E6-0000-0000-6B7C-1608E7040000 frp
46    0   1081344    8454143    EBD0A0A2-B9E5-4433-87C0-68B6B72699C7 Basic data partition
                                00000000-7C72-0816-E804-000000000000 system
47    0   8454144    10911743   EBD0A0A2-B9E5-4433-87C0-68B6B72699C7 Basic data partition
                                08167C79-04E9-0000-0000-0000807C1608 cache
48    0   10911744   30751743   EBD0A0A2-B9E5-4433-87C0-68B6B72699C7 Basic data partition
                                0000036A-0000-0000-867C-1608A4030000 userdata
49    0   30751744   30784511   EBD0A0A2-B9E5-4433-87C0-68B6B72699C7 Basic data partition
                                00000000-7C8C-0816-C451-000000000000 flashinfo

Smaller main window

On low display resolutions the SALT main window is too big and so the buttons at the bottom do not fit on the screen.

disable UsU check for non G4 devices

will keep the log clean and its just not needed.

SALT has an G4/non-G4 check already implemented just the UsU check must be included in that result.

support direct flashing (kdz)

SALT should allow flashing a KDZ while in download mode.

Requirements:

  • a secureboot off / unlocked device*

(*)The goal was always to allow flashing for locked devices, too. Flashing will work perfectly fine as long as your LAF protocol version is v100002 or lower but on later versions more work is required to workaround the new implemented protocol checks.

The whole implementation is W.I.P (while there is no one actually working on it atm) and should NOT be used until finished.

The following is required to finish the implementation:

  • pre-check ARB on device
  • extract KDZ + DZ
  • pre-check ARB of the chosen KDZ
  • warn user about any diff between those ARB's
  • detect/get/.. (how ?/ where?) what partitions of the KDZ should be flashed[1]
  • offer option to factory reset (wipe userdata + keystore)
  • flash all good partitions
  • verify flashing + warn if smth failed

[1] The most critical part because it differs between devices and sometimes models. There must be a way to identify which partitions are required or as a workaround flash only known partitions. The latter will require to make known lists of partitions for each device/model and warn / abort if there is none. not very useful but the only way to avoid bricks which can happen very easily if a partition is named slightly different etc.

If you still want to experiment with that (you have been warned) enable flashing support with:

./salt --experimental

then choose Flash (kdz)
note: for Flash (folder) see #17

image

mount: offer a fsck before mounting

when a backup is corrupt SALT cannot mount the image file

  • fsck check before mount (readonly)
  • fsck check before mount (autorepair) - hint that this may destroy the image

Switching to between stable and develop may have issues

looks like (at least in FWUL/mAid) the branch will not get checked out correctly.

workaround (FWUL/mAid):

  1. open the sfX lglaf terminal (Desktop -> LG folder -> lglaf (steadfasterX) )
  2. git pull
  3. git checkout develop
  4. git pull

support direct flashing (single or multiple images)

SALT should allow flashing while in download mode.

Requirements:

  • a secureboot off / unlocked device*

(*)The goal was always to allow flashing for locked devices, too. Flashing will work perfectly fine as long as your LAF protocol version is v100002 or lower but on later versions more work is required to workaround the new implemented protocol checks.

Enable flashing support with:

./salt --experimental

then choose Flash (folder)
note: Flash (kdz) is still WIP - do not use until finished! see #41

image

ROM extract

Requires to finish issue #8 first:

  1. Extract a ROM zip (custom ROM)
  2. Loop mount (convert before) system.dat and others found in there
  3. open file browser on mount point

Image extract / mount options

Extract / mount of any image file which is able to do so:

modem
vendor
system
userdata
...

  1. detect used fs of a selected image
  2. Loop mount accordingly
  3. Open a file browser on mount point

Fix modemst1 and 2 info

modemst1 and modemst2 are not unneeded as they are declared atm. They contain parts of imei stuff and for sure network / SIM unlock.

LM-G710 Connection and multiple errors

Hi,
I've connected the LM-G710 (LG G7 ThinQ) SDM845 based device under the download mode and it somehow connected but there were multiple errors and in the end the feature for full backup did not work and threw more errors.

SALT_Full_Backup
SALT_LM-G710TM
salt.log

window sizes are too small (again)

Examples:

  • List partitions is too big (fixed height?)
  • Main window is too big (fixed height)
  • Wipe partitions window is too big (fixed height?)
    ...

device model detection (detect if G4 model or any other)

To make SALT more compatible with other LG models I wanna see a model detection when SALT starts up.

Example:

If 
H811,H812,H815,H818,H819,LS991,US991,F500,VS986
then = G4

The long term plan is to make this the base for decisions like:

  • offer model specificy LAF link(s) - if needed
  • enable/disable features in SALT

Flashing verify

md5sum check?
The problem: for best performance this should happen remotely but this will be not possible on every device

on the other hand it may take too long time to download those bigger images for doing the md5 check locally..

NOT WORKING Ubuntu 18 64 bit

hello,
wanted to let you know this doesn't work on ubuntu 18
ERROR:
Fatal error missing requirement
python-zstandard (python3)

seems in ubuntu dist. the package has been renamed to Zstd
see info here
https://launchpad.net/ubuntu/bionic/amd64/zstd

not sure where to go from here any idea?
perhaps edit a config file to use zstd instead of python-zstandard???
any help is appreciated

Modify the kdz/dz files

Hi,
not sure where to put this issue (kdztools, lglaf, ...) so I ask here.

Is it possible to modify the kdz files and upload them to the device?

By modification I mean the rootfs and the vbmeta?
Add some data and recalculate the root hash. Or just disable dm-verity itself.

Could I change the boot.img itself?

Do we know how the LGUP works? Does it do checks on the device itself or maybe just on the host?

Does it take into account the Antirollback protection?

CR mode missing on backup

2018-08-07 19:20:58: F_BACKUP: Target directory has enough free space!
usage: extract-partitions.py [-h] [-d OUTDIR] [--max-size kbytes] [--debug]
                             [--batch] [--skip-hello]
extract-partitions.py: error: unrecognized arguments: --cr yes 

G4 & G4C

Hi.
Both in Download mode. Both unrecognized.

overwrite detected auth mode

some firmware versions do not act as expected and here the auto detection of challenge/response is failing.

fix/workaround:
add an option to start/restart SALT with an overwrite for both situations (with and without c/r)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.