How to reflash Htc Desire 628 properly?


Question

I tried to reflash my Htc Desire 628 using fastboot, but got following log:


PS D:\platform-tools> fastboot oem rebootRUU
OKAY [ 0.042s]
Finished. Total time: 0.043s
PS D:\platform-tools> fastboot flash zip firm.zip
Invalid sparse file format at header magic
error: write_sparse_skip_chunk: don't care size 915918919 is not a multiple of the block size 4096
error: write_sparse_skip_chunk: don't care size 115920967 is not a multiple of the block size 4096
Sending sparse 'zip' 1/3 (781249 KB) error: write_sparse_skip_chunk: don't care size 915918919 is not a multiple of the block size 4096
error: write_sparse_skip_chunk: don't care size 915918919 is not a multiple of the block size 4096
OKAY [ 36.254s]
Writing 'zip' (bootloader) HOSD CL#788931
(bootloader) ERR lzipv2_init : Cannot open file /dev/fastboot_download_U
(bootloader) aJ4Bc
(bootloader) ERR [SD_UPDATE_ERR] update_fb_ZIP_buf: can not find ZIP hea
(bootloader) der
(bootloader) ERR [SD_UPDATE_ERR] sddownload failed: 22
(bootloader) ERR Update zip file failed.
(bootloader) ERR ZIP ERROR, exit read zip loop
(bootloader) ERR ZIP signature checking failed...
(bootloader) Update zip file OK
(bootloader) ERR ZIP ERROR CODE, 22
(bootloader) end@Done
FAILED (remote: '22: fail to flash via downloadzip')
fastboot: error: Command failed
PS D:\platform-tools> fastboot reboot
Rebooting OKAY [ 0.001s]
Finished. Total time: 0.008s

I took 2PVGIMG_V36BML_UHL_L51_DESIRE_SENSE70_HTC_Europe_1.16.401.1_Radio_0.1524V28P45.0504.0422_1_release_483251_signed_2_4_masud.zip


firmware from there:
http://forum.gsmdevelopers.com/htc-firmware-unified/11239-htc-desire-628-2pvgimg-v36bml-official-stock-roms-18-03-2017-updated.html


in download mode:


*** UNLOCKED ***
htc_v36bml_uhl PVT S-ON
LK-1.01.0000
RADIO-UNKNOWN
OpenDSP-UNKNOWN
OS-1.16.401.1
Aug 2 2016, 19:11:15(788931)

bootloader and OEM unlocked, usb debugging enabled, is there something else missing or it is a matter of firmware?


Update:


adb log:


PS D:\platform-tools> adb sideload firm.zip
Total xfer: 0.00x
PS D:\platform-tools>

in twrp:


Updating partition details...
...done
Full SELinux support is present.
MTP Enabled
Starting ADB sideload feature...
Installing zip file '/sideload/package.zip'
Invalid zip file format!

Update 2:


Updating partition details...
...done
Full SELinux support is present.
MTP Enabled
Installing zip file '/sdcard/firm.zip'
Checking for Digest file...
Skipping Digest check: no Digest file found
Zip file is corrupt!
Error installing zip file '/sdcard/firm.zip'
Updating partition details...
...done

Update 3:


handle_cota_install: install cwpkg to /ota/cwpg.zip
handle_cota_install: install cwprop to cota/cw.prop
Write host_mode error
handle_cota_install: Can't mount /sdcar, 1 times
handle_cota_install: Can't mount /sdcar, 2 times

Answer

HTC update.zip is encrypted and does not respect the standard file layout. META-INF is missing, content is:


info.bin
zip_0.zip
zip_1.zip
zip_2.zip
zip_3.zip
zip_4.zip
zip_5.zip
zip_6.zip

Therefore this file can only flashed from stock recovery.


Topics


2D Engines   3D Engines   9-Patch   Action Bars   Activities   ADB   Advertisements   Analytics   Animations   ANR   AOP   API   APK   APT   Architecture   Audio   Autocomplete   Background Processing   Backward Compatibility   Badges   Bar Codes   Benchmarking   Bitmaps   Bluetooth   Blur Effects   Bread Crumbs   BRMS   Browser Extensions   Build Systems   Bundles   Buttons   Caching   Camera   Canvas   Cards   Carousels   Changelog   Checkboxes   Cloud Storages   Color Analysis   Color Pickers   Colors   Comet/Push   Compass Sensors   Conferences   Content Providers   Continuous Integration   Crash Reports   Credit Cards   Credits   CSV   Curl/Flip   Data Binding   Data Generators   Data Structures   Database   Database Browsers   Date &   Debugging   Decompilers   Deep Links   Dependency Injections   Design   Design Patterns   Dex   Dialogs   Distributed Computing   Distribution Platforms   Download Managers   Drawables   Emoji   Emulators   EPUB   Equalizers &   Event Buses   Exception Handling   Face Recognition   Feedback &   File System   File/Directory   Fingerprint   Floating Action   Fonts   Forms   Fragments   FRP   FSM   Functional Programming   Gamepads   Games   Geocaching   Gestures   GIF   Glow Pad   Gradle Plugins   Graphics   Grid Views   Highlighting   HTML   HTTP Mocking   Icons   IDE   IDE Plugins   Image Croppers   Image Loaders   Image Pickers   Image Processing   Image Views   Instrumentation   Intents   Job Schedulers   JSON   Keyboard   Kotlin   Layouts   Library Demos   List View   List Views   Localization   Location   Lock Patterns   Logcat   Logging   Mails   Maps   Markdown   Mathematics   Maven Plugins   MBaaS   Media   Menus   Messaging   MIME   Mobile Web   Native Image   Navigation   NDK   Networking   NFC   NoSQL   Number Pickers   OAuth   Object Mocking   OCR Engines   OpenGL   ORM   Other Pickers   Parallax List   Parcelables   Particle Systems   Password Inputs   PDF   Permissions   Physics Engines   Platforms   Plugin Frameworks   Preferences   Progress Indicators   ProGuard   Properties   Protocol Buffer   Pull To   Purchases   Push/Pull   QR Codes   Quick Return   Radio Buttons   Range Bars   Ratings   Recycler Views   Resources   REST   Ripple Effects   RSS   Screenshots   Scripting   Scroll Views   SDK   Search Inputs   Security   Sensors   Services   Showcase Views   Signatures   Sliding Panels   Snackbars   SOAP   Social Networks   Spannable   Spinners   Splash Screens   SSH   Static Analysis   Status Bars   Styling   SVG   System   Tags   Task Managers   TDD &   Template Engines   Testing   Testing Tools   Text Formatting   Text Views   Text Watchers   Text-to   Toasts   Toolkits For   Tools   Tooltips   Trainings   TV   Twitter   Updaters   USB   User Stories   Utils   Validation   Video   View Adapters   View Pagers   Views   Watch Face   Wearable Data   Wearables   Weather   Web Tools   Web Views   WebRTC   WebSockets   Wheel Widgets   Wi-Fi   Widgets   Windows   Wizards   XML   XMPP   YAML   ZIP Codes