Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Any Solutions for Surface Laptop Fimware? #30

Open
funk-on-code opened this issue Sep 11, 2023 · 4 comments
Open

Any Solutions for Surface Laptop Fimware? #30

funk-on-code opened this issue Sep 11, 2023 · 4 comments

Comments

@funk-on-code
Copy link

Trying to run this on a new (August 2023) Surface Laptop 5, running Ubuntu 22.04.3 with the linux-surface kernel installed, gives me:

$ bash -x repack.sh -f ../SurfaceLaptop5_Win10_19044_22.102.17126.0.msi -o out
+ set -e
+ FILE=
+ OUTPUT=
+ getopts :hf:o: args
+ case "$args" in
+ FILE=../SurfaceLaptop5_Win10_19044_22.102.17126.0.msi
+ getopts :hf:o: args
+ case "$args" in
+ OUTPUT=out
+ getopts :hf:o: args
+ '[' ../SurfaceLaptop5_Win10_19044_22.102.17126.0.msi = '' ']'
+ '[' out = '' ']'
+ command -v msiextract
+ command -v gcab
+ command -v dos2unix
+ mkdir -p out
+ echo ../SurfaceLaptop5_Win10_19044_22.102.17126.0.msi
+ grep -Eiq '\.msi$'
+ repackmsi ../SurfaceLaptop5_Win10_19044_22.102.17126.0.msi out
+ MSI=../SurfaceLaptop5_Win10_19044_22.102.17126.0.msi
+ OUT=out
+ echo '==> Extracting ../SurfaceLaptop5_Win10_19044_22.102.17126.0.msi'
==> Extracting ../SurfaceLaptop5_Win10_19044_22.102.17126.0.msi
++ mktemp -p . -d
+ TEMP=./tmp.QFsL4rle39
+ msiextract -C ./tmp.QFsL4rle39 ../SurfaceLaptop5_Win10_19044_22.102.17126.0.msi
+ repackdir ./tmp.QFsL4rle39 out
+ DIR=./tmp.QFsL4rle39
+ OUT=out
+ find ./tmp.QFsL4rle39 -iname '*.inf' -exec sh -c 'dos2unix "$0" > /dev/null 2>&1' '{}' ';'
+ grep -lR Firmware_Install,UEFI ./tmp.QFsL4rle39
+ IFS=
+ read -r INF
+ echo '==> Repacking ./tmp.QFsL4rle39/SurfaceUpdate/surfacenullcapsule/SurfaceNullCapsule.inf'
==> Repacking ./tmp.QFsL4rle39/SurfaceUpdate/surfacenullcapsule/SurfaceNullCapsule.inf
+ repackinf ./tmp.QFsL4rle39/SurfaceUpdate/surfacenullcapsule/SurfaceNullCapsule.inf out
+ INF=./tmp.QFsL4rle39/SurfaceUpdate/surfacenullcapsule/SurfaceNullCapsule.inf
+ OUT=out
++ dirname ./tmp.QFsL4rle39/SurfaceUpdate/surfacenullcapsule/SurfaceNullCapsule.inf
+ DIR=./tmp.QFsL4rle39/SurfaceUpdate/surfacenullcapsule
++ basename ./tmp.QFsL4rle39/SurfaceUpdate/surfacenullcapsule
+ FIRMWARE=surfacenullcapsule
++ mktemp -p . -d
+ TEMP=./tmp.nOU8c92zaU
++ find ./tmp.QFsL4rle39/SurfaceUpdate/surfacenullcapsule -iname '*.bin' -or -iname '*.cap'
++ head -n1
+ BINFILE=
++ find ./tmp.QFsL4rle39/SurfaceUpdate/surfacenullcapsule -iname '*.cat'
++ head -n1
+ CATFILE=./tmp.QFsL4rle39/SurfaceUpdate/surfacenullcapsule/SurfaceNullCapsule.cat
++ find ./tmp.QFsL4rle39/SurfaceUpdate/surfacenullcapsule -iname '*.inf'
+ INFFILE=./tmp.QFsL4rle39/SurfaceUpdate/surfacenullcapsule/SurfaceNullCapsule.inf
+ cp '' ./tmp.nOU8c92zaU/firmware.bin
cp: cannot stat '': No such file or directory

Looking through the extracted files, there doesn't appear to be a firmware.bin file in any of the directories though.

@StollD
Copy link
Member

StollD commented Sep 11, 2023

Should be fixed by 2b52472

@funk-on-code
Copy link
Author

Ace! Now does the repack correctly, however, when I try and apply the updates in out/ I receive:

$ fwupdmgr install --allow-older --allow-reinstall --force out/elan_41.0.3723_d19aa234-ae8e-4fea-83b7-d71814fc193c.cab

Decompressing… [***********************************]
firmware signature missing or not trusted; set OnlyTrusted=false in /etc/fwupd/daemon.conf ONLY if you are a firmware developer

Is this a known issue? (ie. should it be in the documentation) Or something I need to work around?

@StollD
Copy link
Member

StollD commented Sep 13, 2023

Yes, its a known issue and yes it should be in the docs. Just set that option, like it tells you to.

@f1yankees
Copy link

f1yankees commented Mar 24, 2024

The change above worked for me on a Surface Laptop 5, thanks for putting this together!

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

No branches or pull requests

3 participants