Downgrade firmware: How to force? (G7X2, 116b -> 110b, says "already updated".) - General Discussion and Assistance - CHDK Forum

Downgrade firmware: How to force? (G7X2, 116b -> 110b, says "already updated".)

  • 8 Replies
  • 3347 Views
Advertisements
Hey there,
OK, I have a G7X Mark II with 116b firmware (1.1.0.0 from 2020-10-08 according to Canon, 116b according to ACID).
I see that CHDK is for this camera available only for 101a and 110b firmware. So I need to downgrade.
There is an official "1.0.1.0" version at Canon's website (this might be 110b, I need to check after downgrade).
How can I force my camera to downgrade? If I put the "1.0.1.0"-version-file on the SD card and select the upgrade function, the camera says already updated. Can I force it to downgrade?
Regards!
« Last Edit: 24 / November / 2022, 13:13:08 by oid_maps »
My cameras:
* Canon PowerShot:
  - G7X Mark II (Firmware 1.10b)
* Other manufacturers:
  - Pentax K10D (Firmware 1.31)

*

Offline philmoz

  • *****
  • 3450
    • Photos
The firmware dump you uploaded is 1.10B.


If it came from your camera then you can use the 1.10B version of CHDK for the G7X2.

CHDK ports:
  sx30is (1.00c, 1.00h, 1.00l, 1.00n & 1.00p)
  g12 (1.00c, 1.00e, 1.00f & 1.00g)
  sx130is (1.01d & 1.01f)
  ixus310hs (1.00a & 1.01a)
  sx40hs (1.00d, 1.00g & 1.00i)
  g1x (1.00e, 1.00f & 1.00g)
  g5x (1.00c, 1.01a, 1.01b)
  g7x2 (1.01a, 1.01b, 1.10b)

How do you see it is 1.10B? ACID says 116b, how comes? sha256sums differ.
« Reply #2 on: 24 / November / 2022, 17:04:31 »
The firmware dump you uploaded is 1.10B.
You mean this one?

OK.
How do you see that it is 1.10B? Why does ACID then say it is 116b?
Attached the screenshot of ACID and the sample image.
If it really is 1.10B then this is happy news :-).
I did make a sha256sum check, and I see differences:
Code: [Select]
82b6e282d7c031183703fab98ec881140d12d3ed3aeb4dab3e968d90e022d966  g7x2_101b.BIN
397c68896313a7189c91ad86566e860b87d30b6e939c6cef13ca2c2342e96bef  g7x2_110b.BIN
76961c0c2d8f404423b2aae3653643de6cd4d5d83dc936bdb23ac5aad9597008  g7x2_116b.BIN
where `g7x2_101b.BIN` is the `PRIMARY.BIN` from `g7xm2_101b.7z` and `g7x2_110b.BIN` is the `PRIMARY.BIN` from `g7x2_110b.7z` from this page, and `g7x2_116b.BIN` is the `PRIMARY.BIN` from this dump.
So I see that it differs. How do you see that it is the same?
Regards!
« Last Edit: 24 / November / 2022, 17:46:19 by oid_maps »
My cameras:
* Canon PowerShot:
  - G7X Mark II (Firmware 1.10b)
* Other manufacturers:
  - Pentax K10D (Firmware 1.31)

*

Offline reyalp

  • ******
  • 14126
Re: How do you see it is 1.10B? ACID says 116b, how comes? sha256sums differ.
« Reply #3 on: 24 / November / 2022, 20:29:08 »
How do you see that it is 1.10B?
If you look in the dump, you will find "Firmware Ver GM1.10B"
Quote
Why does ACID then say it is 116b?
Attached the screenshot of ACID and the sample image.
This is a very good question  :blink:

ACID uses information from the EXIF to determine the firmware version. If your camera is actually putting 116b in the EXIF, that would be something new and worth investigating.

However, the sample image appears to be missing EXIF entirely. If you used a different image with ACID, please post it here (use a file sharing site if it's too big for the forum)

Quote
If it really is 1.10B then this is happy news :-).
The code portions of the ROM dump are at least equivalent:
Code: [Select]
$ tools/make-fw-crc.py -d ../dumps -v g7x2 116b
Loading stubs g7x2 116b D:/chdk/trunk/platform/g7x2/sub/116b/stubs_entry.S
g7x2 116b ../dumps/g7x2/sub/116b/PRIMARY.BIN
start_adr  offset     size    crc32      name
0xe0020000 0x00020000 5997088 0xa2bc6204 ROMCODE
0xe0e79d54 0x00e79d54  921112 0xf81ac2c9 zico_0, zico_1, zico_2
0xe0fd37b8 0x00fd37b8  334260 0x26b85e07 RAM data, RAM code, TCM code
3 blocks 7252444 bytes 21%
WARNING: Version string GM1.16B does not match dump b'GM1.10B'
ERROR: no valid subs processed, exiting

$ tools/make-fw-crc.py -d ../dumps -v g7x2 110b
Loading stubs g7x2 110b D:/chdk/trunk/platform/g7x2/sub/110b/stubs_entry.S
g7x2 110b ../dumps/g7x2/sub/110b/PRIMARY.BIN
start_adr  offset     size    crc32      name
0xe0020000 0x00020000 5997088 0xa2bc6204 ROMCODE
0xe0e79d54 0x00e79d54  921112 0xf81ac2c9 zico_0, zico_1, zico_2
0xe0fd37b8 0x00fd37b8  334260 0x26b85e07 RAM data, RAM code, TCM code
3 blocks 7252444 bytes 21%
e0020000 5b8220 a2bc6204
e0e79d54 e0e18 f81ac2c9
e0fd37b8 519b4 26b85e07
This means that the 110b build should almost certainly work on your cam.

Quote
I did make a sha256sum check, and I see differences:
Code: [Select]
82b6e282d7c031183703fab98ec881140d12d3ed3aeb4dab3e968d90e022d966  g7x2_101b.BIN
397c68896313a7189c91ad86566e860b87d30b6e939c6cef13ca2c2342e96bef  g7x2_110b.BIN
76961c0c2d8f404423b2aae3653643de6cd4d5d83dc936bdb23ac5aad9597008  g7x2_116b.BIN
Firmware dumps of the exact same model and firmware version are expected to differ, because the onboard flash that contains the firmware also includes calibration, settings, serial numbers, crash logs and so on. However, the sections that contain code should be identical, as they appear to be in the make-fw-crc output above.

Don't forget what the H stands for.

Ahoj,

How do you see that it is 1.10B?
If you look in the dump, you will find "Firmware Ver GM1.10B"
Quote
Why does ACID then say it is 116b?
Attached the screenshot of ACID and the sample image.
This is a very good question
STICK shows 110b, but ACID continues to show 116b.

ACID uses information from the EXIF to determine the firmware version. If your camera is actually putting 116b in the EXIF, that would be something new and worth investigating.
It seems that it is worth investigating what ACID gets wrong what STICK gets right.

However, the sample image appears to be missing EXIF entirely.
Strange.

Here I dump the output of `exif sample_image.jpg`:
Code: [Select]
EXIF tags in 'sample_image.jpg' ('Intel' byte order):
--------------------+----------------------------------------------------------
Tag                 |Value
--------------------+----------------------------------------------------------
Image Description   |                               
Manufacturer        |Canon
Model               |Canon PowerShot G7 X Mark II
Orientation         |Top-left
X-Resolution        |180
Y-Resolution        |180
Resolution Unit     |Inch
Date and Time       |2022:11:24 23:00:58
Artist              |dreieck
YCbCr Positioning   |Co-sited
Copyright           |Copyright: All rights reserved to the photographer. (Photo
Compression         |JPEG compression
X-Resolution        |180
Y-Resolution        |180
Resolution Unit     |Inch
Exposure Time       |1/6 sec.
F-Number            |f/6.3
Exposure Program    |Aperture priority
ISO Speed Ratings   |320
Sensitivity Type    |Recommended exposure index (REI)
Recommended Exposure|320
Exif Version        |Exif Version 2.3
Date and Time (Origi|2022:11:24 23:00:58
Date and Time (Digit|2022:11:24 23:00:58
Components Configura|Y Cb Cr -
Compressed Bits per | 2
Shutter Speed       |2.59 EV (1/6 sec.)
Aperture            |5.31 EV (f/6.3)
Exposure Bias       |0.00 EV
Maximum Aperture Val|1.69 EV (f/1.8)
Metering Mode       |Pattern
Flash               |Flash did not fire, compulsory flash mode
Focal Length        |8.8 mm
Maker Note          |15056 bytes undefined data
User Comment        |
Sub-second Time     |42
Sub-second Time (Ori|42
Sub-second Time (Dig|42
FlashPixVersion     |FlashPix Version 1.0
Color Space         |sRGB
Pixel X Dimension   |1824
Pixel Y Dimension   |1824
Focal Plane X-Resolu|5292.070
Focal Plane Y-Resolu|5286.957
Focal Plane Resoluti|Inch
Sensing Method      |One-chip color area sensor
File Source         |DSC
Custom Rendered     |Normal process
Exposure Mode       |Auto exposure
White Balance       |Auto white balance
Digital Zoom Ratio  |1.0000
Scene Capture Type  |Standard
Camera Owner Name   |
Body Serial Number  |308052000543
GPS Tag Version     |2.3.0.0
Interoperability Ind|R98
Interoperability Ver|0100
RelatedImageWidth   |1824
RelatedImageLength  |1824
--------------------+----------------------------------------------------------
EXIF data contains a thumbnail (2632 bytes).

And here I dump the output of `exiv2 -ub -p a sample_image.jpg`: 
(Too big for this forum, see here or the attached file `exif_tags.txt`.)

And here the `sample_image.jpg` uploaded to an external hosting site: https://i.imgur.com/aB3WwsR.jpg (I also have it attached once more.)

I hope this helps to track down what is happening here, and maybe fixing ACID. I initially did not want to use STICK, because I just wanted detection. It would be great if there would be a simple Unix command line tool for that.
My cameras:
* Canon PowerShot:
  - G7X Mark II (Firmware 1.10b)
* Other manufacturers:
  - Pentax K10D (Firmware 1.31)

*

Offline reyalp

  • ******
  • 14126
And here I dump the output of `exiv2 -ub -p a sample_image.jpg`: 
(Too big for this forum, see here or the attached file `exif_tags.txt`.)
With the image attached in your last post, I get
Code: [Select]
exiv2-ub -p a sample_image.jpg
sample_image.jpg: (No XMP data found in the file)
Similarly, exiftool only outputs basic, mostly non-exif information
Code: [Select]
exiftool -H sample_image.jpg
     - ExifTool Version Number         : 12.25
     - File Name                       : sample_image.jpg
     - Directory                       : .
     - File Size                       : 331 KiB
     - File Modification Date/Time     : 2023:01:06 16:42:16-08:00
     - File Access Date/Time           : 2023:01:06 16:42:24-08:00
     - File Creation Date/Time         : 2023:01:06 16:42:16-08:00
     - File Permissions                : -rw-rw-rw-
     - File Type                       : JPEG
     - File Type Extension             : jpg
     - MIME Type                       : image/jpeg
0x0000 JFIF Version                    : 1.01
0x0002 Resolution Unit                 : inches
0x0003 X Resolution                    : 96
0x0005 Y Resolution                    : 96
     - Comment                         : CREATOR: gd-jpeg v1.0 (using IJG JPEG v62), default quality.
     - Image Width                     : 1824
     - Image Height                    : 1824
     - Encoding Process                : Baseline DCT, Huffman coding
     - Bits Per Sample                 : 8
     - Color Components                : 3
     - Y Cb Cr Sub Sampling            : YCbCr4:2:0 (2 2)
     - Image Size                      : 1824x1824
     - Megapixels                      : 3.3


Quote
And here the `sample_image.jpg` uploaded to an external hosting site: https://i.imgur.com/aB3WwsR.jpg (I also have it attached once more.)
Like most image sharing sites, imgur appears to strip exif (possibly there's an options somewhere not to). A file hosting site like dropbox, google drive, box.com etc should not.

To diagnose this, it's best to have an original, unmodified, out of camera jpeg.

Quote
I initially did not want to use STICK, because I just wanted detection. It would be great if there would be a simple Unix command line tool for that.
Yes, that's understandable. If you look at the exif of an original image, you should see something like (exiftool -H output, others might name and format differently)
Code: [Select]
0x001e Firmware Revision               : 1.01 rev 1.00
This is firmware 101a. 101b would be rev 2 etc.

There is another tag that exiftool calls "0x0007 Canon Firmware Version" which is not what you want.
Don't forget what the H stands for.

And here I dump the output of `exiv2 -ub -p a sample_image.jpg`: 
(Too big for this forum, see here or the attached file `exif_tags.txt`.)
With the image attached in your last post, I get
Code: [Select]
exiv2 -ub -p a sample_image.jpg
sample_image.jpg: (No XMP data found in the file)

Hm, strange. By the way, thre should be no XMP data, but EXIF data (I don't really know what the difference is but I know from gimp that it can separately store XMP and EXIF metadata.) Can it be that this forum also strips away EXIF metadata?

Similarly, exiftool only outputs basic, mostly non-exif information
For me: `exiftool -H sample_image.jpg`: 
(too long for this post; attached as file `exiftool_out.txt`, or see →here.)

Quote
And here the `sample_image.jpg` uploaded to an external hosting site: https://i.imgur.com/aB3WwsR.jpg (I also have it attached once more.)
Like most image sharing sites, imgur appears to strip exif (possibly there's an options somewhere not to). A file hosting site like dropbox, google drive, box.com etc should not.

To diagnose this, it's best to have an original, unmodified, out of camera jpeg.
OK, try this: → cryptpad.fr. Does this help? 
After downloading it again from there, `exiftool -H` shows a lot of information from there, including the 
`0x001e Firmware Revision               : 1.10 rev 2.00` 
tag.

Btw., it is unmodified out of camera jpeg; I just have set low resolution in the camera settings.

Quote
I initially did not want to use STICK, because I just wanted detection. It would be great if there would be a simple Unix command line tool for that.
Yes, that's understandable. If you look at the exif of an original image, you should see something like (exiftool -H output, others might name and format differently)
Code: [Select]
0x001e Firmware Revision               : 1.01 rev 1.00
This is firmware 101a. 101b would be rev 2 etc.
`exiftool -H sample_image.jpg | grep -i firmware`:
Code: [Select]
0x0007 Canon Firmware Version          : Firmware Version 1.10
0x001e Firmware Revision               : 1.10 rev 2.00

`exiv2 -ub -p a sample_image.jpg | grep -i firmware`:
Code: [Select]
Exif.Canon.FirmwareVersion                   Ascii      22  Firmware Version 1.10
Exif.Canon.FirmwareRevision                  Long        1  17826304

And as a test: both
`exiv2 -ub -p a sample_image.jpg | grep -i '1\.16'` 
and 
`exiftool -H sample_image.jpg | grep -i '1\.16'` 
output nothing. 
And still (I just re-checked), ACID says '116b' as firmware version. The log area within the ACID window shows
Code: [Select]

Downloading build information from http://mighty-hoernsche.de/
Downloading build information from http://mighty-hoernsche.de/trunk/
Downloading build information from http://autobuild.akalab.de/release_full.txt
Downloading build information from http://autobuild.akalab.de/trunk_full.txt
Downloading build information from http://stereo.jpn.org/eng/sdm/download.htm
Downloading build information from http://zenoshrdlu.com/assist/sdm/download.htm
SDM Additions table failed to load
tables loaded successfully
sample_image.jpg dropped
/home/[...]/download/Cameras/Canon/Power_Shot_G7X_Mark_II/sample_pictures/sample_image.jpg is being processed
Downloading http://zenoshrdlu.com/acid/acidchdk.properties
Stable CHDK - no build found for Canon PowerShot G7 X Mark II 116b
Downloading http://zenoshrdlu.com/acid/acidchdkt.properties
Trunk CHDK - no build found for Canon PowerShot G7 X Mark II 116b
Downloading http://zenoshrdlu.com/acid/acidchdes.properties
Stabiles CHDK-DE - no build found for Canon PowerShot G7 X Mark II 116b
Downloading http://zenoshrdlu.com/acid/acidchdet.properties
Experimentelles CHDK_DE - no build found for Canon PowerShot G7 X Mark II 116b
Downloading http://zenoshrdlu.com/acid/acidsdm.properties
Downloading http://zenoshrdlu.com/acid/assistsdmx.properties
assistsdmx.properties not found
SDM - no build found for Canon PowerShot G7 X Mark II 116b
Processing completed
« Last Edit: 07 / January / 2023, 06:27:23 by oid_maps »
My cameras:
* Canon PowerShot:
  - G7X Mark II (Firmware 1.10b)
* Other manufacturers:
  - Pentax K10D (Firmware 1.31)

*

Offline reyalp

  • ******
  • 14126
Hm, strange. By the way, thre should be no XMP data, but EXIF data (I don't really know what the difference is but I know from gimp that it can separately store XMP and EXIF metadata.) Can it be that this forum also strips away EXIF metadata?
It does not. In fact, it shows you a few of the typical items, like shutter speed and focal length

Quote
OK, try this: → cryptpad.fr. Does this help?
That does appear to have full exif, and like what you posted, shows the exif specifying 1.10b. I'm not clear how ACID could get an incorrect, but seemingly valid version like that  :blink:

Downloading ACID (version 1.16  :-[) from http://www.zenoshrdlu.com/acid/acid.html and running it on windows with your most recently uploaded sample, it correctly identifies 110b:
Code: [Select]
g7x2-116b-sample_image3.jpg dropped
D:\chdk\temp\g7x2-116b-sample_image3.jpg is being processed
fm=17826304 hex=1100200
Downloading http://zenoshrdlu.com/acid/acidchdk.properties
Stable CHDK - searching for build for g7x2-110b
Stable CHDK - build found - bins/g7x2-110b-1.6.1-6216-full_BETA.zip
Stable CHDK - build found - bins/g7x2-110b-1.6.1-6216_BETA.zip
Downloading http://zenoshrdlu.com/acid/acidchdkt.properties
Trunk CHDK - searching for build for g7x2-110b
Trunk CHDK - build found - bins/g7x2-110b-1.7.0-6218-full_BETA.zip
Trunk CHDK - build found - bins/g7x2-110b-1.7.0-6218_BETA.zip
Downloading http://zenoshrdlu.com/acid/acidchdes.properties
Stabiles CHDK-DE - searching for build for g7x2-110b
Stabiles CHDK-DE - build found - CHDK_DE_g7x2-110b-1.6.1-6216-full_BETA.zip
Stabiles CHDK-DE - build found - CHDK_DE_g7x2-110b-1.6.1-6216_BETA.zip
:blink: :blink:

Using the exif stripped versions posted earlier fails completely, as expected:
Code: [Select]
D:\chdk\temp\g7x2-116b-sample_image2.jpg is being processed
fm=-1 hex=ffffffff
No firmware revision present, but EXIF says '?'
Processing completed
Don't forget what the H stands for.

ACID .tar.gz download is outdated.
« Reply #8 on: 07 / January / 2023, 17:54:46 »
Hm, strange. By the way, thre should be no XMP data, but EXIF data (I don't really know what the difference is but I know from gimp that it can separately store XMP and EXIF metadata.) Can it be that this forum also strips away EXIF metadata?
It does not. In fact, it shows you a few of the typical items, like shutter speed and focal length

Quote
OK, try this: → cryptpad.fr. Does this help?
That does appear to have full exif, and like what you posted,
Why then is the fotograph I have attached here stripped off of it's EXIF information?
Downloading ACID (version 1.16  :-[ ) from http://www.zenoshrdlu.com/acid/acid.html and running it on windows with your most recently uploaded sample, it correctly identifies 110b:
I have downloaded this ACID: http://www.zenoshrdlu.com/acid/acid.tar.gz -- But in the windo title it says it is version 1.14, despite that http://www.zenoshrdlu.com/acid/acid.html tells it is 1.16 (in detail: I package it as an Arch Linux package according to https://aur.archlinux.org/packages/chdk-acid-bin]this recipe).
I have just tried the http://www.zenoshrdlu.com/acid/acid.zip -- this says it is version 1.16, and it correctly reports the sample image as 110b. So it seems the http://www.zenoshrdlu.com/acid/acid.tar.gz, which is linked at http://www.zenoshrdlu.com/acid/acid.html, is outdated. (I have now updated my https://aur.archlinux.org/packages/chdk-acid-bin]Arch Linux package recipe to use the .zip variant.)

So, somewhere should write the author that something is maybe wrong at his side? -- I already wrote to the email Dave(at)zenoshrdlu.com a few months ago (asking what the license of this work is), but got no reply. Do you have a better contact? Can you ping the author? (I have just emailed the author about this issue, anyway.)

Regards!
« Last Edit: 07 / January / 2023, 18:13:21 by oid_maps »
My cameras:
* Canon PowerShot:
  - G7X Mark II (Firmware 1.10b)
* Other manufacturers:
  - Pentax K10D (Firmware 1.31)

 

Related Topics


SimplePortal © 2008-2014, SimplePortal