sonyxperiadev / device-sony-maple

39 stars 33 forks source link

add logic to set TARGET_BOOTLOADER_BOARD_NAME #46

Closed jamuir closed 6 years ago

jamuir commented 6 years ago

Set TARGET_BOOTLOADER_BOARD_NAME to the variant-specific board-name (e.g. G8141, G8142). This causes the "board" variable in "android-info.txt" to be set correctly, which fixes updatepackage zips.

jamuir commented 6 years ago

here is an example of the error when you try to flash an updatepackage zip:

$ fastboot -w update aosp_g8141-img-4242.zip 
extracting android-info.txt (0 MB) to RAM...
extracting boot.img (13 MB) to disk... took 0.040s
target reported max download size of 536870912 bytes
archive does not contain 'boot.sig'
archive does not contain 'dtbo.img'
archive does not contain 'dt.img'
extracting recovery.img (18 MB) to disk... took 0.050s
archive does not contain 'recovery.sig'
extracting system.img (1848 MB) to disk... took 8.384s
archive does not contain 'system.sig'
archive does not contain 'vbmeta.img'
archive does not contain 'vendor.img'
wiping userdata...
mke2fs 1.43.3 (04-Sep-2016)
Creating filesystem with 13327090 4k blocks and 3334144 inodes
Filesystem UUID: 012e09da-22a6-4751-bb7b-85be8cb79368
Superblock backups stored on blocks: 
        32768, 98304, 163840, 229376, 294912, 819200, 884736, 1605632, 2654208, 
        4096000, 7962624, 11239424

Allocating group tables: done                            
Writing inode tables: done                            
Creating journal (65536 blocks): done
Writing superblocks and filesystem accounting information: done   

wiping cache...
mke2fs 1.43.3 (04-Sep-2016)
Creating filesystem with 97280 4k blocks and 97344 inodes
Filesystem UUID: 93eb63ee-7025-4d8b-b333-fd2ced48d528
Superblock backups stored on blocks: 
        32768

Allocating group tables: done                            
Writing inode tables: done                            
Creating journal (4096 blocks): done
Writing superblocks and filesystem accounting information: done

--------------------------------------------
Bootloader Version...: 1306-5035_X_Boot_MSM8998_LA1.1_O_79
Baseband Version.....: 1306-8499_47.1.A.12.119
Serial Number........: CB512EXPVY
--------------------------------------------
checking product...
FAILED

Device product is 'G8141'.
Update requires 'yoshino'.
jamuir commented 6 years ago

fastboot compares the bootloader variable "product" with the android-info.txt variable "board":

$ fastboot getvar product
product: G8141                                                                                                                                                                                                    
finished. total time: 0.000s
$ unzip -p aosp_g8141-img-4242.zip android-info.txt
board=yoshino
jamuir commented 6 years ago

the current PR is dependent on changes in another PR:

https://github.com/sonyxperiadev/vendor-sony-oss-fingerprint/pull/27

the vendor-sony-oss-fingerprint PR must be merged before this one (otherwise building for maple will fail).

jerpelea commented 6 years ago

please push the same change to all other devices

abioteau commented 6 years ago

@jerpelea Should you also add it on n-mr1 branch

jerpelea commented 6 years ago

i did all yoshino devices please push the others

jamuir commented 6 years ago

sure. I can push to the other projects.

jamuir commented 6 years ago

@jerpelea : I've opened 8 new PRs:

discovery, pioneer, keyaki, kagura, dora blanc, kugo, suzu

jerpelea commented 6 years ago

thanks we miss akari and apollo:)

jamuir commented 6 years ago

ahh... the new XZ2 devices. I'll open two more PRs :-)

jerpelea commented 6 years ago

thanks