Sunday, February 1, 2015

How To: Find a proper firmware variant for the HTC device


This guide is related to the previously published article - How To: Flash firmware package on the HTC device. The goal of this guide is to expose the problem of a matching firmware version for the particular HTC device. Please read it carefully and in case of any questions leave a proper comment in the comments section at the end of this article.

Every firmware.zip has 2 main attributes: modelid (MID) and cidnum (CID).

  • MID contains a codename of your device. For example the "0P6B1000" is the international version of the HTC One M8, while the "0P6B13000" is the T-Mobile U.S. version of the HTC One M8.
  • CID is the carrier software codename. For example the "HTC__J15" code represents the unbranded international version of the HTC One M8, while the "T-MOB010" code represents the T-Mobile U.S. software. Different CID numbers are usually used for mobile operators to include different regional settings, languages or to include some extra software (Wi-Fi Calling, Visual Voice Mail etc.).

Both MID and CID can be found in the android-info.txt inside each firmware.zip. This is how android-info.txt looks like (as an example I used firmware.zip from the international version of the HTC One M8):


Once you know the version of the firmware you have, you need to check if your device can be safely flashed with that particular firmware.zip. To check that:
  1. Download this mini-sdk package and extract it to c:\mini-sdk
  2. Connect your device to the PC
  3. Boot your device in fastboot mode (vol down + power ===> fastboot)
  4. Open a command prompt on the PC (cmd.exe), type and confirm each command with ENTER:
  5. cd /d c:\mini-sdk
  6. fastboot getvar all

This is an example output from the international version of the HTC One M8:


What you are looking for is the "modelid" and "cidnum".
  • If your device is S-ON then both modelid and cidnum must match.
  • If your device is S-OFF then modelid is critical to match, but cidnum can be changed either by changing CID of your device or by editing android-info.txt.
  • Edited firmware.zip can't be flashed on the S-ON device.
  • If your device is S-ON then you can't downgrade your current firmware version.
If both CID and MID numbers match you can safely flash the firmware.zip package - How To: Flash firmware package on the HTC device.

Do you have any questions or comments? Feel free to share! Also, if you like this article, please use media sharing buttons (Twitter, G+, Facebook) below this post!


For latest news follow Android Revolution HD on popular social platforms:

How To: Flash firmware package on the HTC device


Flashing so called "firmware" is as popular these days as flashing "custom ROM". For HTC old-boys it's nothing complicated, but some fresh Android users might find it difficult to understand the differences between "firmware" and a "custom ROM". As a result they might be afraid to upgrade OS on their device or even accidentally hard/soft brick it. Before continuing please read this article: How To: Find the proper firmware variant on the HTC device.


First of all let’s make some definitions clear. Both "Firmware" and "ROM" has their own dictionary definitions, but in this guide we need to use the same context of these words as you can find on popular articles and forums.

Your device is equipped with eMMC memory (embedded MultiMediaCard) - a place where every kind of data is stored. This eMMC memory in Android OS is called mmcblk0. But for a various reasons this memory space has to be divided into several smaller parts (f.g. not every kind of data can be stored on the same type of a filesystem). As a result, the eMMC memory is separated into different partitions (RAW, EXT3, EXT4) - smaller or bigger. To indicate the correct partition, each of them has it's own number - p1, p2, p3, p(...) etc. The whole partition name indicates also the eMMC number it's located in - mmcblk0p1, mmcblk0p2, mmcblk0p3, mmcblk0p(...) etc.

To see a lit of all the partitions on your device just type cat /proc/emmc in the adb.exe command shell.

Doing that you can also see the original name of each partition. The list you can see above is what we call "firmware", and what "custom ROM" is made of is usually just "boot" and "system" partitions. In other words - custom ROM represents "system", "boot" (sometimes "userdata" too) and everything else you can see on the list is a "firmware".


Important: Every signed and official firmware.zip can be flashed on a particular device only. Information about the device and its variant can be found inside android-info.txt in the firmware.zip package.

Question: Where firmware comes from? There are 2 ways: official and non-official. Usually firmware package comes together with the OTA (.zip) update. Inside the OTA package you can find firmware.zip archive (always signed). The non-official way is based on decrypting and extracting content of the RUU (.exe)

Question: Is everything from the list above always included in the official firmware.zip? No. HTC updates only these components (partitions) where there were changes in the code, usually related to the Android OS update or security changes in the bootloader (hboot). That means firmware.zip might have "adsp", "boot", "radio" inside and weigh 10 MB or it might contain a lot more and weight even 50 MB.


Signed (official) firmware packages can be flashed on both S-ON and S-OFF device. Once modified (unsigned) firmware.zip can't be flashed on the S-ON device. If your device is S-ON then you have to re-lock the bootloader. As long as your device is S-ON you also can't downgrade the firmware version.


Important: Make sure you have a correct MID (Model ID) and CID (Carrier ID). To check that use fastboot getvar all command. Everything you do, including following this guide, you do at your own risk!



Flashing Process
  1. Download this mini-sdk package and extract it to c:\mini-sdk
  2. Copy firmware (.zip) package to c:\mini-sdk and rename it to "firmware.zip"
  3. Connect your device to the PC
  4. Boot your device in fastboot mode (vol down + power ===> fastboot)
  5. Open a command prompt on the PC (cmd.exe), type and confirm each command with ENTER:
  6. cd /d c:\mini-sdk
  7. fastboot getvar all (open android-info.txt inside firmware.zip and check if MID and CID matches)
  8. <optionally> fastboot oem lock (if your device is not yet re-locked)
  9. fastboot oem rebootRUU
  10. fastboot flash zip firmware.zip and wait for the process to be completed. Sometimes flashing firmware once doesn't work, so flash firmware.zip again using the same command.
  11. fastboot reboot

In case of further questions I prepared a little Q&A part:
  • What is firmware.zip?
Firmware.zip is a part of Over The Air (OTA) update from the HTC. It contains important parts of the firmware like radio, bootloader, recovery, kernel etc.
  • Why it's important to flash firmware.zip and when should I flash it?
It is recommended to have the latest firmware on your device for the best modem performance and overall system stability. Sometimes it's necessary to have the latest bootloader too, because otherwise your device might not work well with the new system update.
  • Why it's important to flash it before flashing custom ROM?
Because firmware.zip contains boot.img (ramdisk and kernel) that will replace custom boot.img from any custom ROM you already have. That's why you have to flash firmware.zip first, because otherwise boot.img will be overwritten with the stock one. If you already flashed firmware.zip after flashing custom ROM, just flash this particular custom ROM again.
  • Does firmware.zip contain recovery?
Yes, it does contain recovery image, that's why after flashing firmware.zip you will have to flash custom recovery again to be able to flash custom ROM afterwards.
  • Can I flash any firmware.zip on my device?
Not if your device is S-ON. To be able to flash firmware.zip on the S-ON device, your MID number (example: PN0710000) and CID number (example: HTC__001) must match the firmware.zip version you are about to flash.
  • If my MID or CID doesn't match, can I brick my device if I try to flash firmware.zip anyway?
As long as your device is S-ON flashing firmware.zip with non matching MID or CID will result in error and nothing will be flashed, so there is no risk of brick.
  • Do I need to have locked, unlocked or relocked bootloader to be able to flash firmware.zip?
Your bootloader needs to be relocked.
  • If I can't flash newest firmware.zip because of wrong modeid (MID) or cidnum (CID) does it mean I can't use custom ROM based on the latest HTC update?
In most cases you should be able to use any custom ROM as long as hboot update is not mandatory.
  • What if there is no firmware.zip for my MID/CID?
Try to find latest OTA update for your original stock ROM and extract it. Firmware.zip should be inside.

Do you have any questions or comments? Feel free to share! Also, if you like this article, please use media sharing buttons (Twitter, G+, Facebook) below this post!


For latest news follow Android Revolution HD on popular social platforms:

Friday, January 30, 2015

HTC Sense 6.0 UI - Lollipop vs KitKat comparison


Earlier this month HTC has released Android 5.0 for the HTC One M8 together with the HTC Sense 6.0. New Over The Air (OTA) update started rolling out for WWE unbranded devices on Wednesday (28.01.2015), so during these few days I had a chance to look closely at the user interface changes after the update. I didn't expect many, because HTC Sense version is still the same, but Android Lollipop is quite a big platform upgrade, so some major and some little visual changes are all over the place.

I hope you'll enjoy reading!

Something I couldn't really capture and compare are new Android 5.0 animations. The effect of the touched button is really nice. There are more improvements and changes in this area, but it's not my intention here to describe Android L animations or transition effects. Below is just en example of how the new Android L touched button animation works.

Source: www.goo.gl/W59bHJ

Below you can find a side-by-side comparison of a different UI components from the HTC Sense 6.0 before and after the upgrade to Android 5.0 (KitkKat vs Lollipop). Picture on the left always represents Android 5.0.1 Lollipop with the HTC Sense 6.0, while the picture on the right shows Android 4.4.4 KitKat with the HTC Sense 6.0 on board too. Have fun!

Main screen - nothing has really changed here. Also the widgets screen where you can configure different widgets and a number of desktops remains unchanged.


Lock Screen - one of the most changed element of the HTC user interface. The notification system in Android 5.0 Lollipop has been significantly updated and this has an important impact to the Sense Lock Screen too.

First of all, the notifications are no longer visible on the status bar, but when the device is locked they appear on the lock screen in a form of a list with a content preview. You can dismiss any of them the same was as before - by sliding it left or right.


The bottom arrow pointing to slide a finger up to unlock the device is also gone. The "Charging" icon has been moved to the bottom of the screen and the look of the "locker" icon is also slightly different. In case of too many notifications on the Lock Screen you can expand the hidden ones by clicking on the "+1" button at the end of the list.


The animation to unlock the device is also different. It seems that now it makes no difference whether you move your finger up, left or right. No matter what direction you choose, the locker will only go up and unlock the device.


Pull down menu - that one is also related to the extended notifications system in the Android Lollipop. The pull down menu is now semi-transparent and it looks much different. The "X" icon works the same as before and you can use it to dismiss all notifications at once. There is also a "Settings" icon that takes you directly to the Settings menu. The Quick Settings icon is gone, because the flipping animation is also gone, and to enter the Quick Settings menu user has to swipe down again while being in the pull down menu.



You can also tap and hold your finger on the particular notification to see more details about the app that sent the notification.


Quick Settings - works pretty much the same, only the background is different due to the previously mentioned changes in the notifications system. I think even the icons are the same.


Task Manager - one of the greatest changes I've noticed so far. The list of the applications you can run from the Tasks Manager is pretty impressive and it's not gone even after device reboot. It works very fast too. This is a true multitasking, finally!


Keyboard selection - the keyboard icon to select different input method is moved from the notification bar to the navigation bar. You no longer need to pull down the menu and tap on the keyboard icon to change the input method. Just click on the keyboard icon on the very right side of the navigation bar.


The menu window to select a different keyboard type is also slightly different. Now it's using Material Design framework.


Power menu - the only change in the Settings ---> Power menu is removed "Fast boot" mode. I have no clue why HTC decided to remove it but personally I wasn't even using it, so I don't cry :)


Security - there are quite a lot of changes in this system component. You can't add any lock screen widgets any more. As far as I know not many used that feature, but maybe HTC will bring it back in the HTC Sense 7.0 update. There is also a new feature called "Smart Lock" - a new tool to make unlocking your phone easier. You can set it to keep your phone unlocked when you have a trusted Bluetooth device connected to it, when it's in a familiar location like your home or work or when it recognises your face. HTC also decided to remove the "Notification settings" and "Unlock Music Automatically" from the Security screen.


Settings menu - only 2 changes here - new search icon that allows you to find settings components fast and easy. However it doesn't have many key words yet. Also "Sound" changed to "Sound & Notifications" (more details about that change below).


App notification - one of the reasons why "Sounds" changed to "Sounds & notifications". You can now go to Settings ---> Sounds & Notifications ---> App notifications and scroll down to see a list of all apps installed on your device.


Just select and tap of the app to enter new menu where you can prevent the app from sending you any kind of notifications ("Block") or set the priority of the app notifications to be shown at the top of the list ("Priority").


Apps manager - slightly re-designed with a new cool "Material Design style" device RAM memory bar. Now it also separates system apps from user apps.


Another cool feature is a new "Disabled" tab in the Settings ---> Apps menu, where you can see a list of all disabled (frozen) apps. By taping on the app and entering App info screen you can enable the app.


Display & Gesture - a few little updates here too. "Brightness" changed to "Brightness level". The "NOTIFICATION LIGHT" sub-menu is moved to Settings ---> Sound & notification section.


Sound & Notifications - this place is quite re-organized. After the Android Lollipop update the "NOTIFICATIONS & ALARMS" sub-menu is gone and its content ("Notification sound" and "Alarm") is moved to "GENERAL" sub-menu.


There is also a new "NOTIFICATION" sub-menu with a possibility to configure Flash notificationsApp light notifications, previously described App notifications, notifications content (when device is locked) and Notification access.




That's all I've spotted so far. My conclusion? Android 5.0 Lollipop update for the HTC One M8 is a huge improvement, yet most important changes are under the hood (like ART). However, regular user shouldn't be sad because there are quite a lot of UI changes too. The new notifications system works very well and I'm sure HTC will bring us even more amazing stuff with the HTC Sense 7.0 update.

Do you have any questions or comments? Feel free to share! Also, if you like this article, please use media sharing buttons (Twitter, G+, Facebook) below this post!


For latest news follow Android Revolution HD on popular social platforms:

Wednesday, January 28, 2015

HTC One M8 receives official Lollipop OTA update [WWE & T-Mobile]

If you were waiting for the official Lollipop OTA updates for your HTC One M8 – wait no more! Today HTC has started rolling out update for the .401 WWE (World Wide English) devices and - which is surprising - for the T-Mobile carrier in various European countries (f.g. 118 - PL, 111 - DE).

Android 5.0 Lollipop is available for the HTC One M8 since few days already - we wrote about it here: HTC One M7 & HTC One M8 Android Lollipop stock system dumps and here: HTC One M8 received Android 5.0.1 Lollipop with the HTC Sense 6 UI but since today the gates are open for owners of the unbranded WWE devices too! Previously OTA was available only for  the M8 Developer Edition variant.

OTA package for WWE devices is 782MB (4.16.401.10) and can be downloaded from here.

If you are looking for an optimized stock ROM with ROOT access just navigate to this thread and download latest Android Revolution HD for the HTC One M8.




Do you have any questions or comments? Feel free to share! Also, if you like this article, please use media sharing buttons (Twitter, G+, Facebook) below this post!


For latest news follow Android Revolution HD on popular social platforms:

Tuesday, January 27, 2015

HTC One M7 & HTC One M8 Android Lollipop stock system dumps


Android 5.0 "Lollipop" has been unveiled on June 25, 2014 and it’s the latest version of the Android mobile operating system developed by Google. Only few months later the HTC One M7 - the best smartphone of the 2013 and the HTC One M8 - the best smartphone of the 2014 are already running Android Lollipop together with the most powerful Android custom UI - HTC Sense 6.0.

HTC One M8

Software version: 4.16.401.10 CL448934 | Status: Official
Android version: Android Lollipop 5.0.1 | LRX22C | SDK: 21
Kernel version: 3.4.0-g6af28ec
Radio version: 1.25.214500021.06G_20.68.4196t.01_F
HTC SDK API: 6.55
HTC Sense version: official 6.0 / 6.5

HTC One M7

Software version: 7.15.401.1 CL456114 | Status: Official
Android version: Android Lollipop 5.0.2 | LRX22F | SDK: 21
Kernel version: 3.4.10-g1d6af31
Radio version: 4T.33.3218.15_10.33N.1718.01L
HTC SDK API: 6.55
HTC Sense version: official 6.0 / 6.5

As you can see the HTC One M7 is running slightly newer Lollipop version with a higher kernel version. Worry not - HTC will soon bring us another update based on the Android 5.0.2 and few weeks after HTC One M9 (?) is released HTC will update HTC One M8 with the latest HTC Sense 7.0 UI.

Downloads

Together with the new official system updates for the HTC One M7 and the HTC One M8 we've also updated the Android Revolution HD custom ROM.

HTC One M7 - Android Revolution HD 90.0

Stock system dumps of these updates can be found on our site, under "Downloads" section or directly from the Android File Host site:

HTC One M8 stock system dumps collection - Android File Host
HTC One M7 stock system dumps collection - Android File Host

You can find the download links in the "Downloads" section or just click this link.

Do you have any questions or comments? Feel free to share! Also, if you like this article, please use media sharing buttons (Twitter, G+, Facebook) below this post!


For latest news follow Android Revolution HD on popular social platforms:

Monday, January 26, 2015

How to: Unlock external SD Card writing for all apps in Android 4.4 and 5.0

In Android 4.4 "Kitkat" (API 19) Google has changed the default permissions for the external SD Card (usually microSD). Since that Android OS version third-party apps have no more access to write on the SD Card. It's a bit problematic, because now you might not be able to use your favourite Files Manager to move or copy files on the external storage.

Some time ago I wrote a comprehensive guide about the differences between external storage (microSD Card), internal storage (virtual SD Card) as a part of the userdata partition and internal storage (virtual SD Card) as a separate eMMC partition - Virtual SD card on Android.

Now let's get back to our R/W (Read/Write) permission "problem" on the external storage. There are 3 things you need to know before going any further:
  1. This change was made by Google for a security reason. Keep that in mind!
  2. Root access is required to make proper changes on your device.
  3. This method might break OTA updates on your device if you're running stock operating system. I wrote "might" because this trick is based on modifying the /system/etc/permissions/platform.xml file, which isn't frequently updated by phone manufacturers, but most likely it will be updated when next major system update arrives (f.g. KitKat ---> Lollipop).

Procedure
Note: root required!
  1. Start up your device normally and wait for the system to be fully loaded.
  2. Open any files manager of your choice (Root Explorer, ES File Explorer, Total Commander) and make sure it runs with superuser permissions.
  3. Mount your system partition as R/W (Read/Write) to perform any changes.
  4. Navigate to the /system/etc/permissions/ folder and look for the platform.xml.
  5. Copy the platform.xml file into the same location as platform.xml.bak file.
  6. Open the platform.xml file with any text editor on your device and search for the following line:
  7. <permission name="android.permission.WRITE_EXTERNAL_STORAGE">

    It should look like on the picture below:

  8. Now you need to add a 3rd GID (Group ID): <group gid="media_rw" /> and you need to make it looks exactly like on the picture below:
  9. Using Root Explorer or any other Files Manager of your choice make sure that the platform.xml file has proper permissions: Owner R-W | Group R | Others R (0644 rw-r--r--). You can also use adb shell to set permissions with a chmod 0644 /system/etc/permissions/platform.xml command.
  10. Reboot your device and enjoy!
  11. In case of problems with OTA update just remove modified platform.xml and rename platform.xml.bak to its original name.
Do you have any questions or comments? Feel free to share! Also, if you like this article, please use media sharing buttons (Twitter, G+, Facebook) below this post!


For latest news follow Android Revolution HD on popular social platforms: