{"id":999,"date":"2020-09-10T16:28:33","date_gmt":"2020-09-10T13:28:33","guid":{"rendered":"https:\/\/blog.andresgomez.org\/?p=999"},"modified":"2020-09-10T16:28:35","modified_gmt":"2020-09-10T13:28:35","slug":"installing-lineageos-in-the-sony-xperia-xz2-compact-dual-in-gnu-linux-4-5-bringing-back-sonys-stock-camera-app","status":"publish","type":"post","link":"https:\/\/blog.andresgomez.org\/es\/2020\/09\/10\/installing-lineageos-in-the-sony-xperia-xz2-compact-dual-in-gnu-linux-4-5-bringing-back-sonys-stock-camera-app\/","title":{"rendered":"Installing LineageOS in the Sony Xperia XZ2 Compact Dual (in GNU\/Linux) 4\/5: Bringing back Sony&#8217;s stock camera app"},"content":{"rendered":"\n<h2 class=\"wp-block-heading\">WARNING<\/h2>\n\n\n\n<p id=\"block-844cbb9d-6a9b-42c2-af0f-47413109a455\">I have no responsibility whatsoever if this guideline causes any harm to your device. The intention of these posts are solely as personal notes for myself. Follow them at your own risk.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"block-724b3fc2-3e5a-46ef-b848-499216ea70cd\">WARNING<\/h2>\n\n\n\n<p id=\"block-8e371c05-6d94-443b-a00f-0d4e7cbee63b\">Through these steps I will unlock the phone&#8217;s bootloader, erasing all data. This includes the DRM keys stored in the Trim Area (TA) partition. I&#8217;ll attempt backing them up but, as of today, there is no way of restoring them to the previous state nor knowing if the actual backup is usable at all.<\/p>\n\n\n\n<p id=\"block-cb099134-61fe-429f-8fed-22311456ad32\">Without these DRM keys, several audio and video proprietary functionality provided by Sony <a rel=\"noreferrer noopener\" href=\"https:\/\/developer.sony.com\/develop\/open-devices\/get-started\/unlock-bootloader\" target=\"_blank\">won&#8217;t be available<\/a> <strong>including some camera post-processing features<\/strong>, color gamut profiles, white balance, noise reduction, X-Reality Video Enhancement, DSEE HX, ClearAudio+, and Widevine L1 support for HD Netflix.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"block-88e56069-cc80-415e-b18d-68ba487ab252\">Bringing back the stock camera<\/h2>\n\n\n\n<p id=\"block-6c6cd6e6-9536-4e57-8a6d-4c4374914e8b\">In the previous posts we have <a rel=\"noreferrer noopener\" href=\"https:\/\/blog.andresgomez.org\/2020\/09\/07\/installing-lineageos-in-the-sony-xperia-xz2-compact-dual-in-gnu-linux-1-5-downgrading-sonys-stock-firmware\" target=\"_blank\">downgraded the stock firmware from Sony<\/a>, <a rel=\"noreferrer noopener\" href=\"https:\/\/blog.andresgomez.org\/2020\/09\/08\/installing-lineageos-in-the-sony-xperia-xz2-compact-dual-in-gnu-linux-2-5-backing-up-the-trim-area-ta-partition\/\" target=\"_blank\">backed up the Trim Area (TA) partition<\/a> and <a href=\"https:\/\/blog.andresgomez.org\/2020\/09\/09\/installing-lineageos-in-the-sony-xperia-xz2-compact-dual-in-gnu-linux-3-5-installing-lineageos\/\" data-type=\"URL\" data-id=\"https:\/\/blog.andresgomez.org\/2020\/09\/09\/installing-lineageos-in-the-sony-xperia-xz2-compact-dual-in-gnu-linux-3-5-installing-lineageos\/\" target=\"_blank\" rel=\"noreferrer noopener\">installed LineageOS<\/a>.<\/p>\n\n\n\n<p id=\"block-f0801e4c-a8e3-4de1-b558-8c1a56da8159\">Thanks to the great people from the <a rel=\"noreferrer noopener\" href=\"https:\/\/forum.xda-developers.com\/xperia-xz2-compact\/development\/rom-lineageos-17-1-t4090071\" data-type=\"URL\" data-id=\"https:\/\/forum.xda-developers.com\/xperia-xz2-compact\/development\/rom-lineageos-17-1-t4090071\" target=\"_blank\">xda-developers forum<\/a> we have the chance to <a href=\"https:\/\/forum.xda-developers.com\/showpost.php?p=82633037&amp;postcount=39\" data-type=\"URL\" data-id=\"https:\/\/forum.xda-developers.com\/showpost.php?p=82633037&amp;postcount=39\" target=\"_blank\" rel=\"noreferrer noopener\">add Sony&#8217;s stock camera app<\/a>. We will <code>adb sideload<\/code> it the same way we installed Magisk in the <a rel=\"noreferrer noopener\" href=\"https:\/\/blog.andresgomez.org\/2020\/09\/09\/installing-lineageos-in-the-sony-xperia-xz2-compact-dual-in-gnu-linux-3-5-installing-lineageos\/\" data-type=\"URL\" data-id=\"https:\/\/blog.andresgomez.org\/2020\/09\/09\/installing-lineageos-in-the-sony-xperia-xz2-compact-dual-in-gnu-linux-3-5-installing-lineageos\/\" target=\"_blank\">previous post<\/a>, for example<\/p>\n\n\n\n<p>First, the zip is called <strong>SemcCamera<\/strong> (<a rel=\"noreferrer noopener\" href=\"https:\/\/androidfilehost.com\/?w=files&amp;flid=312775\" data-type=\"URL\" data-id=\"https:\/\/androidfilehost.com\/?w=files&amp;flid=312775\" target=\"_blank\">SemcCamera-xz2c-52.1.A.2.1.zip<\/a> at the moment of writing this) and it is, currently, the only <strong>add-on<\/strong> available for the Official LineageOS 17.1 image for the xz2c phone.<\/p>\n\n\n\n<p>We download the file, reboot into Recovery Mode and plug the phone to the computer with the USB cable. Select <em>Apply Update<\/em> -&gt; <em>Apply from ADB<\/em>:<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">root$ adb sideload SemcCamera-xz2c-52.1.A.2.1.zip\nTotal xfer: 1.00x<\/pre>\n\n\n\n<p>Now, <em>Go back<\/em> -&gt; <em>Reboot system now<\/em>.<\/p>\n\n\n\n<p>Currently, the stock camera won&#8217;t work out of the box. It needs to disable <em>SELinux<\/em> or set as <em>Permissive<\/em>. Luckly, since we have Magisk installed and we can grant root privileges, we can install <a rel=\"noreferrer noopener\" href=\"https:\/\/f-droid.org\/en\/packages\/com.mrbimc.selinux\/\" data-type=\"URL\" data-id=\"https:\/\/f-droid.org\/en\/packages\/com.mrbimc.selinux\/\" target=\"_blank\">SELinuxModeChanger<\/a> and do so.<\/p>\n\n\n\n<p>That&#8217;s it, now you should be able to use Sony&#8217;s stock camera!<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Extra treat: add Sony&#8217;s Bokeh app<\/h2>\n\n\n\n<p>Sony also provides a nice application for taking fancy photos: <a rel=\"noreferrer noopener\" href=\"https:\/\/play.google.com\/store\/apps\/details?id=com.sonymobile.backgrounddefocus&amp;hl=en_US\" data-type=\"URL\" data-id=\"https:\/\/play.google.com\/store\/apps\/details?id=com.sonymobile.backgrounddefocus&amp;hl=en_US\" target=\"_blank\">Bokeh (Background defocus)<\/a>.<\/p>\n\n\n\n<p>Unfortunately, we cannot install it just from Google&#8217;s Play Store since it claims that the app is not compatible with this phone.<\/p>\n\n\n\n<p>However, we can force the installation, for example, using the <a rel=\"noreferrer noopener\" href=\"https:\/\/auroraoss.com\/app_info.php?app_id=1\" data-type=\"URL\" data-id=\"https:\/\/auroraoss.com\/app_info.php?app_id=1\" target=\"_blank\">Aurora Store<\/a>.<\/p>\n\n\n\n<p>Finally, if you want to know about some bumps I got during the road, continue to the <a href=\"https:\/\/blog.andresgomez.org\/2020\/09\/11\/installing-lineageos-in-the-sony-xperia-xz2-compact-dual-in-gnu-linux-5-5-appendixes\/\" data-type=\"URL\" data-id=\"https:\/\/blog.andresgomez.org\/2020\/09\/11\/installing-lineageos-in-the-sony-xperia-xz2-compact-dual-in-gnu-linux-5-5-appendixes\/\" target=\"_blank\" rel=\"noreferrer noopener\">Appendixes<\/a>.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>WARNING I have no responsibility whatsoever if this guideline causes any harm to your device. The intention of these posts are solely as personal notes for myself. Follow them at your own risk. WARNING Through these steps I will unlock &hellip; <a href=\"https:\/\/blog.andresgomez.org\/es\/2020\/09\/10\/installing-lineageos-in-the-sony-xperia-xz2-compact-dual-in-gnu-linux-4-5-bringing-back-sonys-stock-camera-app\/\">Sigue leyendo <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[4,6,7,20,23],"tags":[],"class_list":["post-999","post","type-post","status-publish","format-standard","hentry","category-english","category-free-software","category-general","category-mobile","category-multimedia"],"_links":{"self":[{"href":"https:\/\/blog.andresgomez.org\/es\/wp-json\/wp\/v2\/posts\/999"}],"collection":[{"href":"https:\/\/blog.andresgomez.org\/es\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/blog.andresgomez.org\/es\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/blog.andresgomez.org\/es\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/blog.andresgomez.org\/es\/wp-json\/wp\/v2\/comments?post=999"}],"version-history":[{"count":3,"href":"https:\/\/blog.andresgomez.org\/es\/wp-json\/wp\/v2\/posts\/999\/revisions"}],"predecessor-version":[{"id":1008,"href":"https:\/\/blog.andresgomez.org\/es\/wp-json\/wp\/v2\/posts\/999\/revisions\/1008"}],"wp:attachment":[{"href":"https:\/\/blog.andresgomez.org\/es\/wp-json\/wp\/v2\/media?parent=999"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blog.andresgomez.org\/es\/wp-json\/wp\/v2\/categories?post=999"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blog.andresgomez.org\/es\/wp-json\/wp\/v2\/tags?post=999"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}