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

Hp service pack compatibility #53

Open
wants to merge 5 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@
This tool attempts to extract a VBIOS from a bios update
Laptops with NVIDIA Optimus graphics often have the dGPU VBIOS integrated in their system BIOS, this makes extracting the VBIOS a complicated process. Provided you have a BIOS Update for your laptop, this tool might be able to automagically extract all available VBIOS from it.

This version adds the ability to extract from HP Service Pack executable files. HP Service Packs contain embedded BIOS and VBIOS for HP laptops. Replacement graphics cards for HP laptops are usually shipped "bare" without any VBIOS installed.

## Dependencies
- Ruby
- bundler **(a ruby gem)**
Expand All @@ -18,6 +20,8 @@ Some dependencies might not offer a package for your linux distribution **(like
## Usage
- Run `bundle install --path=vendor/bundle` to install the required ruby modules **(once)**
- Run `./vbiosfinder extract /path/to/bios_update.exe` to attempt an extraction
- NOTE: /path/to/bios_update.exe **MUST** be a fully qualified path. Do **not** use relative path names
- NOTE: /path/to/bios_update.exe can be an HP Service Pack exe file, e.g. /home/user/sp012345.exe
- A temporary working dir is created at `./tmp-vbiosfinder` which can be removed inbetween runs
- Extracted VBIOS roms will be placed in `./output`

Expand All @@ -31,6 +35,7 @@ Some dependencies might not offer a package for your linux distribution **(like
- [ThinkPad T440p](https://github.com/coderobe/VBiosFinder/issues/21)
- [ThinkPad T530](https://github.com/coderobe/VBiosFinder/issues/34)
- [TravelMate P645-SG](https://github.com/coderobe/VBiosFinder/issues/9)
- HP Service Packs

- **note: if your device isn't listed here, feel free to try this tool and report your results!**

Expand Down
14 changes: 11 additions & 3 deletions src/extract-7z.rb
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,18 @@ def self.p7zip file
begin
line = Terrapin::CommandLine.new("7z", "l :file | grep 'Type = 7z'")
line.run(file: file)
true
result_7Z = true
rescue Terrapin::ExitStatusError => e
false
result_7Z = false
end
begin
line = Terrapin::CommandLine.new("7z", "l :file | grep 'Type = Cab'")
line.run(file: file)
result_Cab = true
rescue Terrapin::ExitStatusError => e
result_Cab = false
end
return result_Cab || result_7Z
end
end
end
end