{"id":477,"date":"2024-06-26T23:21:12","date_gmt":"2024-06-26T11:21:12","guid":{"rendered":"https:\/\/rayssite.ddns.net\/?p=477"},"modified":"2024-06-27T21:41:54","modified_gmt":"2024-06-27T09:41:54","slug":"flashing-unofficial-lineageos-20-on-a-11-year-old-tablet-google-nexus-7-2013","status":"publish","type":"post","link":"https:\/\/rayssite.ddns.net\/index.php\/2024\/06\/26\/flashing-unofficial-lineageos-20-on-a-11-year-old-tablet-google-nexus-7-2013\/","title":{"rendered":"Flashing (unofficial) LineageOS 20 on a 11-year old tablet (Google Nexus 7 2013)"},"content":{"rendered":"\n<p>Recently I discovered how handy a small and inexpensive tablet can be for stuff like reading e-books or connecting to Bluetooth serial for debugging embedded applications. Not quite sure how much I actually needed it and didn&#8217;t want to spend much on a new tablet, I came across a bulk listing of 10 faulty Google Nexus 7 tablets only for $100. These have 2GB of RAM, 16GB internal storage and a quad-core CPU at 1.5GHz. Not flashy by today&#8217;s standards, but my requirements are also not demanding, so it could work. The seller didn&#8217;t check the conditions of the tablets (likely got them decommissioned from a business) and said they should all be treated as faulty.<\/p>\n\n\n\n<p>Before this, I got a non-working 2012 version of the tablet for $1, and the problem turned out to be just bad connections in the internal FPC cable for charging (the overall resistance was about 3 ohms if I remember correctly). This made charging really slow, and I managed to fix it by just soldering an AWG 30 wire between the motherboard and the charging board to bypass the FPC power connection (scrubbing the FPC contacts with an eraser didn&#8217;t help much). Since Nexus 7 is easy to pull apart, and my experience using the stock Android on an even older version of the tablet (1G RAM, 16G Flash) had been positive enough, I thought I could give it a go at getting at least some working devices out of 10 broken ones.<\/p>\n\n\n\n<figure data-wp-context=\"{&quot;imageId&quot;:&quot;69e68d864188e&quot;}\" data-wp-interactive=\"core\/image\" class=\"wp-block-image size-large wp-lightbox-container\"><img decoding=\"async\" width=\"766\" height=\"1024\" data-wp-class--hide=\"state.isContentHidden\" data-wp-class--show=\"state.isContentVisible\" data-wp-init=\"callbacks.setButtonStyles\" data-wp-on-async--click=\"actions.showLightbox\" data-wp-on-async--load=\"callbacks.setButtonStyles\" data-wp-on-async-window--resize=\"callbacks.setButtonStyles\" data-src=\"https:\/\/rayssite.ddns.net\/wp-content\/uploads\/2024\/06\/Nexus-7-repaired-766x1024.jpg\" alt=\"\" class=\"wp-image-492 lazyload\" data-srcset=\"https:\/\/rayssite.ddns.net\/wp-content\/uploads\/2024\/06\/Nexus-7-repaired-766x1024.jpg 766w, https:\/\/rayssite.ddns.net\/wp-content\/uploads\/2024\/06\/Nexus-7-repaired-224x300.jpg 224w, https:\/\/rayssite.ddns.net\/wp-content\/uploads\/2024\/06\/Nexus-7-repaired-768x1027.jpg 768w, https:\/\/rayssite.ddns.net\/wp-content\/uploads\/2024\/06\/Nexus-7-repaired-1149x1536.jpg 1149w, https:\/\/rayssite.ddns.net\/wp-content\/uploads\/2024\/06\/Nexus-7-repaired-1532x2048.jpg 1532w, https:\/\/rayssite.ddns.net\/wp-content\/uploads\/2024\/06\/Nexus-7-repaired-1568x2096.jpg 1568w, https:\/\/rayssite.ddns.net\/wp-content\/uploads\/2024\/06\/Nexus-7-repaired-scaled.jpg 1915w\" data-sizes=\"(max-width: 766px) 100vw, 766px\" src=\"data:image\/svg+xml;base64,PHN2ZyB3aWR0aD0iMSIgaGVpZ2h0PSIxIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPjwvc3ZnPg==\" style=\"--smush-placeholder-width: 766px; --smush-placeholder-aspect-ratio: 766\/1024;\" \/><button\n\t\t\tclass=\"lightbox-trigger\"\n\t\t\ttype=\"button\"\n\t\t\taria-haspopup=\"dialog\"\n\t\t\taria-label=\"Enlarge image\"\n\t\t\tdata-wp-init=\"callbacks.initTriggerButton\"\n\t\t\tdata-wp-on-async--click=\"actions.showLightbox\"\n\t\t\tdata-wp-style--right=\"state.imageButtonRight\"\n\t\t\tdata-wp-style--top=\"state.imageButtonTop\"\n\t\t>\n\t\t\t<svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" width=\"12\" height=\"12\" fill=\"none\" viewBox=\"0 0 12 12\">\n\t\t\t\t<path fill=\"#fff\" d=\"M2 0a2 2 0 0 0-2 2v2h1.5V2a.5.5 0 0 1 .5-.5h2V0H2Zm2 10.5H2a.5.5 0 0 1-.5-.5V8H0v2a2 2 0 0 0 2 2h2v-1.5ZM8 12v-1.5h2a.5.5 0 0 0 .5-.5V8H12v2a2 2 0 0 1-2 2H8Zm2-12a2 2 0 0 1 2 2v2h-1.5V2a.5.5 0 0 0-.5-.5H8V0h2Z\" \/>\n\t\t\t<\/svg>\n\t\t<\/button><figcaption class=\"wp-element-caption\">My fix for the slow charging problem of a Nexus 7 (2012)<\/figcaption><\/figure>\n\n\n\n<p>So I placed the order, checked them, and ended up with 2 tablets that actually didn&#8217;t need any fixing (although some had cracked screen glass, that&#8217;s cosmetic), that&#8217;s a good start! They were still running the stock Android 6 (marshmallow) as that&#8217;s the latest official system, and I would like to have a more modern system running on them. From a quick search, it didn&#8217;t seem that hard, so in this post I record the steps I took, both for my future reference and hopefully be useful for someone else. I flashed an unofficial build of LineageOS 20, which is based on Android 13, before installing Google Apps using the MindTheGapps package.<\/p>\n\n\n\n<div id=\"ez-toc-container\" class=\"ez-toc-v2_0_81 ez-toc-wrap-left counter-hierarchy ez-toc-counter ez-toc-grey ez-toc-container-direction\">\n<div class=\"ez-toc-title-container\">\n<p class=\"ez-toc-title\" style=\"cursor:inherit\">Table of Contents<\/p>\n<span class=\"ez-toc-title-toggle\"><a href=\"#\" class=\"ez-toc-pull-right ez-toc-btn ez-toc-btn-xs ez-toc-btn-default ez-toc-toggle\" aria-label=\"Toggle Table of Content\"><span class=\"ez-toc-js-icon-con\"><span class=\"\"><span class=\"eztoc-hide\" style=\"display:none;\">Toggle<\/span><span class=\"ez-toc-icon-toggle-span\"><svg style=\"fill: #999;color:#999\" xmlns=\"http:\/\/www.w3.org\/2000\/svg\" class=\"list-377408\" width=\"20px\" height=\"20px\" viewBox=\"0 0 24 24\" fill=\"none\"><path d=\"M6 6H4v2h2V6zm14 0H8v2h12V6zM4 11h2v2H4v-2zm16 0H8v2h12v-2zM4 16h2v2H4v-2zm16 0H8v2h12v-2z\" fill=\"currentColor\"><\/path><\/svg><svg style=\"fill: #999;color:#999\" class=\"arrow-unsorted-368013\" xmlns=\"http:\/\/www.w3.org\/2000\/svg\" width=\"10px\" height=\"10px\" viewBox=\"0 0 24 24\" version=\"1.2\" baseProfile=\"tiny\"><path d=\"M18.2 9.3l-6.2-6.3-6.2 6.3c-.2.2-.3.4-.3.7s.1.5.3.7c.2.2.4.3.7.3h11c.3 0 .5-.1.7-.3.2-.2.3-.5.3-.7s-.1-.5-.3-.7zM5.8 14.7l6.2 6.3 6.2-6.3c.2-.2.3-.5.3-.7s-.1-.5-.3-.7c-.2-.2-.4-.3-.7-.3h-11c-.3 0-.5.1-.7.3-.2.2-.3.5-.3.7s.1.5.3.7z\"\/><\/svg><\/span><\/span><\/span><\/a><\/span><\/div>\n<nav><ul class='ez-toc-list ez-toc-list-level-1 ' ><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-1\" href=\"https:\/\/rayssite.ddns.net\/index.php\/2024\/06\/26\/flashing-unofficial-lineageos-20-on-a-11-year-old-tablet-google-nexus-7-2013\/#Disclaimer\" >Disclaimer<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-2\" href=\"https:\/\/rayssite.ddns.net\/index.php\/2024\/06\/26\/flashing-unofficial-lineageos-20-on-a-11-year-old-tablet-google-nexus-7-2013\/#Setup\" >Setup<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-3\" href=\"https:\/\/rayssite.ddns.net\/index.php\/2024\/06\/26\/flashing-unofficial-lineageos-20-on-a-11-year-old-tablet-google-nexus-7-2013\/#Required_files_and_tools\" >Required files and tools<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-4\" href=\"https:\/\/rayssite.ddns.net\/index.php\/2024\/06\/26\/flashing-unofficial-lineageos-20-on-a-11-year-old-tablet-google-nexus-7-2013\/#Flashing_LineageOS\" >Flashing LineageOS<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-5\" href=\"https:\/\/rayssite.ddns.net\/index.php\/2024\/06\/26\/flashing-unofficial-lineageos-20-on-a-11-year-old-tablet-google-nexus-7-2013\/#Installing_GApps_MindTheGapps\" >Installing GApps (MindTheGapps)<\/a><\/li><\/ul><\/nav><\/div>\n<h2 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"Disclaimer\"><\/span>Disclaimer<span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<p>The official support for this device, both from Google and LineageOS, ended years ago. Wrong operations during the flashing process could potentially brick the device. If you want to follow the steps here, do it at your own risk. Backup any important data before beginning, as the process will wipe everything on the device.<\/p>\n\n\n\n<p>The steps listed here may contain incorrect details or have unknown implications in the future, but that&#8217;s what worked for me (and a week of normal usage without problems). It&#8217;s also my first time touching custom Android ROMs in about 10 years (funnily enough, the last time was flashing my Nexus 5 to unlock 4G bands), so I&#8217;m probably a lot less experienced in this stuff compared to an average XDA forum user.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"Setup\"><\/span>Setup<span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<p>As mentioned before, the device I used was the 2013 version, without cellular connectivity (the &#8220;flo&#8221; variant). Much of the steps I took are based on <a href=\"https:\/\/blog.wxm.be\/2024\/05\/01\/install-lineageos-20-on-nexus-7.html\" target=\"_blank\" rel=\"noreferrer noopener\">this great blog post<\/a>, which used the images built by forum user &#8220;followmsi&#8221; at <a href=\"https:\/\/xdaforums.com\/t\/rom-flo-deb-unofficial-lineageos-20-0.3569067\/\" target=\"_blank\" rel=\"noreferrer noopener\">this XDA forum thread<\/a>.<\/p>\n\n\n\n<p>For the <code>adb<\/code> and <code>fastboot<\/code> tools, I used an HP T610 under my desk running Ubuntu 22.04. I chose this largely because I can easily install both tools using apt with one command and not worry about getting them set up on Windows, which involves a few more steps. I just uploaded the required image files to the T610 using FileZilla over SSH and ran the commands in an SSH window.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"Required_files_and_tools\"><\/span>Required files and tools<span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<p>As mentioned before, the files I used were built by &#8220;followmsi&#8221; and can be downloaded from the Google Drive folders shared in the XDA forum thread. The files I used include:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>lineage-20.0-20230830-UNOFFICIAL-flo.zip<\/li>\n\n\n\n<li>MindTheGapps-13.0.0-arm-20230401_160426.zip<\/li>\n\n\n\n<li>sysrepart_1380_20.zip<\/li>\n\n\n\n<li>twrp-3.7.0_9-1-flo_followmsi.img<\/li>\n<\/ul>\n\n\n\n<p>The Google Drive shared folder also contained the SHA256 and MD5 checksum for the images. They can be checked using <code>sha256sum<\/code> and <code>md5sum<\/code> tools included in Ubuntu.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"Flashing_LineageOS\"><\/span>Flashing LineageOS<span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<p>Just to reiterate, all important data on the Nexus 7 should be backed up at this point. The first step (unlocking the bootloader) will wipe everything on it.<\/p>\n\n\n\n<p>To unlock the bootloader of the device, turn it off and hold down both the Power and Volume Down buttons. Plug in the tablet to the PC that will be running the <code>adb<\/code> and <code>fastboot<\/code> tools. This will place the device into fastboot mode, ready to accept commands over USB. Run this command from the PC:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>fastboot oem unlock<\/code><\/pre>\n\n\n\n<p>If the PC says &#8220;waiting for any device&#8221;, stop the program using Ctrl+C, unplug the USB cable, reboot the tablet into the bootloader, plug the cable back in and rerun the <code>fastboot<\/code> command.<\/p>\n\n\n\n<p>The tablet will prompt for a confirmation of the bootloader unlock, as this will wipe all data and potentially introduce instabilities. Press the Volume Up\/Down button and then the power button to confirm.<\/p>\n\n\n\n<figure data-wp-context=\"{&quot;imageId&quot;:&quot;69e68d8641fc2&quot;}\" data-wp-interactive=\"core\/image\" class=\"wp-block-image size-large wp-lightbox-container\"><img decoding=\"async\" width=\"766\" height=\"1024\" data-wp-class--hide=\"state.isContentHidden\" data-wp-class--show=\"state.isContentVisible\" data-wp-init=\"callbacks.setButtonStyles\" data-wp-on-async--click=\"actions.showLightbox\" data-wp-on-async--load=\"callbacks.setButtonStyles\" data-wp-on-async-window--resize=\"callbacks.setButtonStyles\" data-src=\"https:\/\/rayssite.ddns.net\/wp-content\/uploads\/2024\/06\/Unlocking-bootloader-766x1024.jpg\" alt=\"\" class=\"wp-image-495 lazyload\" data-srcset=\"https:\/\/rayssite.ddns.net\/wp-content\/uploads\/2024\/06\/Unlocking-bootloader-766x1024.jpg 766w, https:\/\/rayssite.ddns.net\/wp-content\/uploads\/2024\/06\/Unlocking-bootloader-224x300.jpg 224w, https:\/\/rayssite.ddns.net\/wp-content\/uploads\/2024\/06\/Unlocking-bootloader-768x1027.jpg 768w, https:\/\/rayssite.ddns.net\/wp-content\/uploads\/2024\/06\/Unlocking-bootloader-1149x1536.jpg 1149w, https:\/\/rayssite.ddns.net\/wp-content\/uploads\/2024\/06\/Unlocking-bootloader-1532x2048.jpg 1532w, https:\/\/rayssite.ddns.net\/wp-content\/uploads\/2024\/06\/Unlocking-bootloader-1568x2096.jpg 1568w, https:\/\/rayssite.ddns.net\/wp-content\/uploads\/2024\/06\/Unlocking-bootloader-scaled.jpg 1915w\" data-sizes=\"(max-width: 766px) 100vw, 766px\" src=\"data:image\/svg+xml;base64,PHN2ZyB3aWR0aD0iMSIgaGVpZ2h0PSIxIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPjwvc3ZnPg==\" style=\"--smush-placeholder-width: 766px; --smush-placeholder-aspect-ratio: 766\/1024;\" \/><button\n\t\t\tclass=\"lightbox-trigger\"\n\t\t\ttype=\"button\"\n\t\t\taria-haspopup=\"dialog\"\n\t\t\taria-label=\"Enlarge image\"\n\t\t\tdata-wp-init=\"callbacks.initTriggerButton\"\n\t\t\tdata-wp-on-async--click=\"actions.showLightbox\"\n\t\t\tdata-wp-style--right=\"state.imageButtonRight\"\n\t\t\tdata-wp-style--top=\"state.imageButtonTop\"\n\t\t>\n\t\t\t<svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" width=\"12\" height=\"12\" fill=\"none\" viewBox=\"0 0 12 12\">\n\t\t\t\t<path fill=\"#fff\" d=\"M2 0a2 2 0 0 0-2 2v2h1.5V2a.5.5 0 0 1 .5-.5h2V0H2Zm2 10.5H2a.5.5 0 0 1-.5-.5V8H0v2a2 2 0 0 0 2 2h2v-1.5ZM8 12v-1.5h2a.5.5 0 0 0 .5-.5V8H12v2a2 2 0 0 1-2 2H8Zm2-12a2 2 0 0 1 2 2v2h-1.5V2a.5.5 0 0 0-.5-.5H8V0h2Z\" \/>\n\t\t\t<\/svg>\n\t\t<\/button><figcaption class=\"wp-element-caption\">Prompt to confirm bootloader unlock<\/figcaption><\/figure>\n\n\n\n<p>After a brief moment, the bootloader will be unlocked and the device will return to the bootloader, ready to accept more commands. The last line on the screen should now say &#8220;LOCK STATE &#8211; unlocked&#8221; instead of &#8220;LOCK STATE &#8211; locked&#8221; as previously. Now boot into TWRP using <code>fastboot<\/code>:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>fastboot boot twrp-3.7.0_9-1-flo_followmsi.img<\/code><\/pre>\n\n\n\n<p>A few moments later, the TWRP screen will appear, it&#8217;ll switch to a terminal view briefly with some lines of red text (some mounting errors), and then the tablet will reboot. Now the tablet will boot into the Android system and take a few minutes, possibly setting up the stock system after a factory reset. After that&#8217;s done, power off the tablet and enter the bootloader again by holding the Volume Down and the power buttons. Re-run the above command to try again. This time, it should get into the TWRP screen asking about write access. Swipe to allow write access to the system partition.<\/p>\n\n\n\n<figure data-wp-context=\"{&quot;imageId&quot;:&quot;69e68d864251f&quot;}\" data-wp-interactive=\"core\/image\" class=\"wp-block-image size-large wp-lightbox-container\"><img decoding=\"async\" width=\"766\" height=\"1024\" data-wp-class--hide=\"state.isContentHidden\" data-wp-class--show=\"state.isContentVisible\" data-wp-init=\"callbacks.setButtonStyles\" data-wp-on-async--click=\"actions.showLightbox\" data-wp-on-async--load=\"callbacks.setButtonStyles\" data-wp-on-async-window--resize=\"callbacks.setButtonStyles\" data-src=\"https:\/\/rayssite.ddns.net\/wp-content\/uploads\/2024\/06\/TWRP-confirm-write-access-766x1024.jpg\" alt=\"\" class=\"wp-image-498 lazyload\" data-srcset=\"https:\/\/rayssite.ddns.net\/wp-content\/uploads\/2024\/06\/TWRP-confirm-write-access-766x1024.jpg 766w, https:\/\/rayssite.ddns.net\/wp-content\/uploads\/2024\/06\/TWRP-confirm-write-access-224x300.jpg 224w, https:\/\/rayssite.ddns.net\/wp-content\/uploads\/2024\/06\/TWRP-confirm-write-access-768x1027.jpg 768w, https:\/\/rayssite.ddns.net\/wp-content\/uploads\/2024\/06\/TWRP-confirm-write-access-1149x1536.jpg 1149w, https:\/\/rayssite.ddns.net\/wp-content\/uploads\/2024\/06\/TWRP-confirm-write-access-1532x2048.jpg 1532w, https:\/\/rayssite.ddns.net\/wp-content\/uploads\/2024\/06\/TWRP-confirm-write-access-1568x2096.jpg 1568w, https:\/\/rayssite.ddns.net\/wp-content\/uploads\/2024\/06\/TWRP-confirm-write-access-scaled.jpg 1915w\" data-sizes=\"(max-width: 766px) 100vw, 766px\" src=\"data:image\/svg+xml;base64,PHN2ZyB3aWR0aD0iMSIgaGVpZ2h0PSIxIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPjwvc3ZnPg==\" style=\"--smush-placeholder-width: 766px; --smush-placeholder-aspect-ratio: 766\/1024;\" \/><button\n\t\t\tclass=\"lightbox-trigger\"\n\t\t\ttype=\"button\"\n\t\t\taria-haspopup=\"dialog\"\n\t\t\taria-label=\"Enlarge image\"\n\t\t\tdata-wp-init=\"callbacks.initTriggerButton\"\n\t\t\tdata-wp-on-async--click=\"actions.showLightbox\"\n\t\t\tdata-wp-style--right=\"state.imageButtonRight\"\n\t\t\tdata-wp-style--top=\"state.imageButtonTop\"\n\t\t>\n\t\t\t<svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" width=\"12\" height=\"12\" fill=\"none\" viewBox=\"0 0 12 12\">\n\t\t\t\t<path fill=\"#fff\" d=\"M2 0a2 2 0 0 0-2 2v2h1.5V2a.5.5 0 0 1 .5-.5h2V0H2Zm2 10.5H2a.5.5 0 0 1-.5-.5V8H0v2a2 2 0 0 0 2 2h2v-1.5ZM8 12v-1.5h2a.5.5 0 0 0 .5-.5V8H12v2a2 2 0 0 1-2 2H8Zm2-12a2 2 0 0 1 2 2v2h-1.5V2a.5.5 0 0 0-.5-.5H8V0h2Z\" \/>\n\t\t\t<\/svg>\n\t\t<\/button><figcaption class=\"wp-element-caption\">Prompt from TWRP about allowing write access to the system partition<\/figcaption><\/figure>\n\n\n\n<p>After that, the tablet should be on the main menu screen of TWRP. Select &#8220;Wipe&#8221;, then swipe to run a factory reset. This clears the Data, Cache, and Dalvik partitions. Then tap &#8220;Advanced Wipe&#8221;, check the &#8220;System&#8221; option and swipe again to also wipe the system partition. Now, return to the main menu, tap &#8220;Advanced&#8221;, then &#8220;ADB Sideload&#8221;, then swipe to make the tablet ready to receive sideload packages. On the PC, run the following to resize the partitions (this is required to fit the newer, bigger system):<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>adb sideload sysrepart_1380_20.zip<\/code><\/pre>\n\n\n\n<p>After that&#8217;s done, reboot into the bootloader (fastboot mode). Boot TWRP again by running this on the PC:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>fastboot boot twrp-3.7.0_9-1-flo_followmsi.img<\/code><\/pre>\n\n\n\n<p>Repeat the process in TWRP (tap &#8220;Advanced&#8221; then &#8220;ADB Sideload&#8221; then swipe) to get into ADB Sideload mode again and run the following:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>adb sideload lineage-20.0-20230830-UNOFFICIAL-flo.zip<\/code><\/pre>\n\n\n\n<p>Now the tablet will start installing the LineageOS build in TWRP. If it fails halfway (this can happen due to bad cable connections), try wiping the system partition and running the sideload process again.<\/p>\n\n\n\n<p>Now LineageOS should be successfully installed!<\/p>\n\n\n\n<h2 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"Installing_GApps_MindTheGapps\"><\/span>Installing GApps (MindTheGapps)<span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<p>If you don&#8217;t need Google Apps, then this is all done. If you are like me who did need Google Apps, then read on. To flash the MindTheGapps package, go back into ADB Sideload mode again and run:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>adb sideload MindTheGapps-13.0.0-arm-20230401_160426.zip<\/code><\/pre>\n\n\n\n<p>When trying to flash the GApps package after flashing the LineageOS, I was faced with this error:<\/p>\n\n\n\n<figure data-wp-context=\"{&quot;imageId&quot;:&quot;69e68d8642a04&quot;}\" data-wp-interactive=\"core\/image\" class=\"wp-block-image size-large wp-lightbox-container\"><img decoding=\"async\" width=\"766\" height=\"1024\" data-wp-class--hide=\"state.isContentHidden\" data-wp-class--show=\"state.isContentVisible\" data-wp-init=\"callbacks.setButtonStyles\" data-wp-on-async--click=\"actions.showLightbox\" data-wp-on-async--load=\"callbacks.setButtonStyles\" data-wp-on-async-window--resize=\"callbacks.setButtonStyles\" data-src=\"https:\/\/rayssite.ddns.net\/wp-content\/uploads\/2024\/06\/MindTheGapps-installation-error-766x1024.jpg\" alt=\"\" class=\"wp-image-500 lazyload\" data-srcset=\"https:\/\/rayssite.ddns.net\/wp-content\/uploads\/2024\/06\/MindTheGapps-installation-error-766x1024.jpg 766w, https:\/\/rayssite.ddns.net\/wp-content\/uploads\/2024\/06\/MindTheGapps-installation-error-224x300.jpg 224w, https:\/\/rayssite.ddns.net\/wp-content\/uploads\/2024\/06\/MindTheGapps-installation-error-768x1027.jpg 768w, https:\/\/rayssite.ddns.net\/wp-content\/uploads\/2024\/06\/MindTheGapps-installation-error-1149x1536.jpg 1149w, https:\/\/rayssite.ddns.net\/wp-content\/uploads\/2024\/06\/MindTheGapps-installation-error-1532x2048.jpg 1532w, https:\/\/rayssite.ddns.net\/wp-content\/uploads\/2024\/06\/MindTheGapps-installation-error-1568x2096.jpg 1568w, https:\/\/rayssite.ddns.net\/wp-content\/uploads\/2024\/06\/MindTheGapps-installation-error-scaled.jpg 1915w\" data-sizes=\"(max-width: 766px) 100vw, 766px\" src=\"data:image\/svg+xml;base64,PHN2ZyB3aWR0aD0iMSIgaGVpZ2h0PSIxIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPjwvc3ZnPg==\" style=\"--smush-placeholder-width: 766px; --smush-placeholder-aspect-ratio: 766\/1024;\" \/><button\n\t\t\tclass=\"lightbox-trigger\"\n\t\t\ttype=\"button\"\n\t\t\taria-haspopup=\"dialog\"\n\t\t\taria-label=\"Enlarge image\"\n\t\t\tdata-wp-init=\"callbacks.initTriggerButton\"\n\t\t\tdata-wp-on-async--click=\"actions.showLightbox\"\n\t\t\tdata-wp-style--right=\"state.imageButtonRight\"\n\t\t\tdata-wp-style--top=\"state.imageButtonTop\"\n\t\t>\n\t\t\t<svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" width=\"12\" height=\"12\" fill=\"none\" viewBox=\"0 0 12 12\">\n\t\t\t\t<path fill=\"#fff\" d=\"M2 0a2 2 0 0 0-2 2v2h1.5V2a.5.5 0 0 1 .5-.5h2V0H2Zm2 10.5H2a.5.5 0 0 1-.5-.5V8H0v2a2 2 0 0 0 2 2h2v-1.5ZM8 12v-1.5h2a.5.5 0 0 0 .5-.5V8H12v2a2 2 0 0 1-2 2H8Zm2-12a2 2 0 0 1 2 2v2h-1.5V2a.5.5 0 0 0-.5-.5H8V0h2Z\" \/>\n\t\t\t<\/svg>\n\t\t<\/button><figcaption class=\"wp-element-caption\">Installing the MindTheGapps package will result in an error<\/figcaption><\/figure>\n\n\n\n<p>After some digging involving the terminal in TWRP and inspecting the contents of the zip file, I confirmed there was indeed not enough space, at least according to the MindTheGapps installation script&#8217;s calculations (found in the zip, at <code>META-INF\/com\/google\/android\/update-binary<\/code>). However, the size difference was only a few megabytes so I tried to look at apps to manually remove (either from the MindTheGapps package or LineageOS) and free up space. That was when I noticed there&#8217;s a variable called <code>STORAGE_BUFFER<\/code> in that script that was used for calculating the remaining space:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>...\nerror_no_space() {\n  error \"Not enough space for GApps! Aborting\"\n}\n...\n\n...\ncompute_apps_size() {\n  NEEDED_STORAGE_SYSTEM=$(expr $(du -cs `find -maxdepth 1 -mindepth 1 ! -name product ! -name system_ext` | tail -n1 | cut -f1) + $STORAGE_BUFFER)\n...\n\n...\nSTORAGE_BUFFER=10240\n\ncd system\ncompute_apps_size\n\nif &#91; \"$SYSTEM_STORAGE\" -lt \"$NEEDED_STORAGE_SYSTEM\" ]; then\n  remove_big_optional_apps\n  compute_apps_size\n  if &#91; \"$SYSTEM_STORAGE\" -lt \"$NEEDED_STORAGE_SYSTEM\" ]; then\n    error_no_space\n  fi\nfi\n...<\/code><\/pre>\n\n\n\n<p>I&#8217;m not familiar with shell scripts, but I could tell the logic was that the remaining space of the device was calculated with this storage buffer included, and a buffer space of 10 MB seemed rather arbitrary to me. My understanding of the system partition in modern Android systems is that it&#8217;s typically mounted as read-only, so having little headroom should be acceptable. I then tried changing this variable to 5120 (5MB), packaged the files back into a zip, and repeated the ADB Sideload process to install the (slightly modified) MindTheGapps package. This time it worked!<\/p>\n\n\n\n<figure data-wp-context=\"{&quot;imageId&quot;:&quot;69e68d8642d90&quot;}\" data-wp-interactive=\"core\/image\" class=\"wp-block-image size-large wp-lightbox-container\"><img decoding=\"async\" width=\"766\" height=\"1024\" data-wp-class--hide=\"state.isContentHidden\" data-wp-class--show=\"state.isContentVisible\" data-wp-init=\"callbacks.setButtonStyles\" data-wp-on-async--click=\"actions.showLightbox\" data-wp-on-async--load=\"callbacks.setButtonStyles\" data-wp-on-async-window--resize=\"callbacks.setButtonStyles\" data-src=\"https:\/\/rayssite.ddns.net\/wp-content\/uploads\/2024\/06\/Successful-flashing-of-MindTheGapps-766x1024.jpg\" alt=\"\" class=\"wp-image-502 lazyload\" data-srcset=\"https:\/\/rayssite.ddns.net\/wp-content\/uploads\/2024\/06\/Successful-flashing-of-MindTheGapps-766x1024.jpg 766w, https:\/\/rayssite.ddns.net\/wp-content\/uploads\/2024\/06\/Successful-flashing-of-MindTheGapps-224x300.jpg 224w, https:\/\/rayssite.ddns.net\/wp-content\/uploads\/2024\/06\/Successful-flashing-of-MindTheGapps-768x1027.jpg 768w, https:\/\/rayssite.ddns.net\/wp-content\/uploads\/2024\/06\/Successful-flashing-of-MindTheGapps-1149x1536.jpg 1149w, https:\/\/rayssite.ddns.net\/wp-content\/uploads\/2024\/06\/Successful-flashing-of-MindTheGapps-1532x2048.jpg 1532w, https:\/\/rayssite.ddns.net\/wp-content\/uploads\/2024\/06\/Successful-flashing-of-MindTheGapps-1568x2096.jpg 1568w, https:\/\/rayssite.ddns.net\/wp-content\/uploads\/2024\/06\/Successful-flashing-of-MindTheGapps-scaled.jpg 1915w\" data-sizes=\"(max-width: 766px) 100vw, 766px\" src=\"data:image\/svg+xml;base64,PHN2ZyB3aWR0aD0iMSIgaGVpZ2h0PSIxIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPjwvc3ZnPg==\" style=\"--smush-placeholder-width: 766px; --smush-placeholder-aspect-ratio: 766\/1024;\" \/><button\n\t\t\tclass=\"lightbox-trigger\"\n\t\t\ttype=\"button\"\n\t\t\taria-haspopup=\"dialog\"\n\t\t\taria-label=\"Enlarge image\"\n\t\t\tdata-wp-init=\"callbacks.initTriggerButton\"\n\t\t\tdata-wp-on-async--click=\"actions.showLightbox\"\n\t\t\tdata-wp-style--right=\"state.imageButtonRight\"\n\t\t\tdata-wp-style--top=\"state.imageButtonTop\"\n\t\t>\n\t\t\t<svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" width=\"12\" height=\"12\" fill=\"none\" viewBox=\"0 0 12 12\">\n\t\t\t\t<path fill=\"#fff\" d=\"M2 0a2 2 0 0 0-2 2v2h1.5V2a.5.5 0 0 1 .5-.5h2V0H2Zm2 10.5H2a.5.5 0 0 1-.5-.5V8H0v2a2 2 0 0 0 2 2h2v-1.5ZM8 12v-1.5h2a.5.5 0 0 0 .5-.5V8H12v2a2 2 0 0 1-2 2H8Zm2-12a2 2 0 0 1 2 2v2h-1.5V2a.5.5 0 0 0-.5-.5H8V0h2Z\" \/>\n\t\t\t<\/svg>\n\t\t<\/button><figcaption class=\"wp-element-caption\">Successful installation of the MindTheGapps package. The error line was from the previous run<\/figcaption><\/figure>\n\n\n\n<p>After that, reboot the system. TWRP will warn that there&#8217;s no OS installed, simply ignore it and proceed. Now the tablet will boot into LineageOS to show the setup screen. All done!<\/p>\n\n\n\n<figure data-wp-context=\"{&quot;imageId&quot;:&quot;69e68d8643160&quot;}\" data-wp-interactive=\"core\/image\" class=\"wp-block-image size-large wp-lightbox-container\"><img decoding=\"async\" width=\"766\" height=\"1024\" data-wp-class--hide=\"state.isContentHidden\" data-wp-class--show=\"state.isContentVisible\" data-wp-init=\"callbacks.setButtonStyles\" data-wp-on-async--click=\"actions.showLightbox\" data-wp-on-async--load=\"callbacks.setButtonStyles\" data-wp-on-async-window--resize=\"callbacks.setButtonStyles\" data-src=\"https:\/\/rayssite.ddns.net\/wp-content\/uploads\/2024\/06\/LineageOS-greeting-screen-766x1024.jpg\" alt=\"\" class=\"wp-image-503 lazyload\" data-srcset=\"https:\/\/rayssite.ddns.net\/wp-content\/uploads\/2024\/06\/LineageOS-greeting-screen-766x1024.jpg 766w, https:\/\/rayssite.ddns.net\/wp-content\/uploads\/2024\/06\/LineageOS-greeting-screen-224x300.jpg 224w, https:\/\/rayssite.ddns.net\/wp-content\/uploads\/2024\/06\/LineageOS-greeting-screen-768x1027.jpg 768w, https:\/\/rayssite.ddns.net\/wp-content\/uploads\/2024\/06\/LineageOS-greeting-screen-1149x1536.jpg 1149w, https:\/\/rayssite.ddns.net\/wp-content\/uploads\/2024\/06\/LineageOS-greeting-screen-1532x2048.jpg 1532w, https:\/\/rayssite.ddns.net\/wp-content\/uploads\/2024\/06\/LineageOS-greeting-screen-1568x2096.jpg 1568w, https:\/\/rayssite.ddns.net\/wp-content\/uploads\/2024\/06\/LineageOS-greeting-screen-scaled.jpg 1915w\" data-sizes=\"(max-width: 766px) 100vw, 766px\" src=\"data:image\/svg+xml;base64,PHN2ZyB3aWR0aD0iMSIgaGVpZ2h0PSIxIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPjwvc3ZnPg==\" style=\"--smush-placeholder-width: 766px; --smush-placeholder-aspect-ratio: 766\/1024;\" \/><button\n\t\t\tclass=\"lightbox-trigger\"\n\t\t\ttype=\"button\"\n\t\t\taria-haspopup=\"dialog\"\n\t\t\taria-label=\"Enlarge image\"\n\t\t\tdata-wp-init=\"callbacks.initTriggerButton\"\n\t\t\tdata-wp-on-async--click=\"actions.showLightbox\"\n\t\t\tdata-wp-style--right=\"state.imageButtonRight\"\n\t\t\tdata-wp-style--top=\"state.imageButtonTop\"\n\t\t>\n\t\t\t<svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" width=\"12\" height=\"12\" fill=\"none\" viewBox=\"0 0 12 12\">\n\t\t\t\t<path fill=\"#fff\" d=\"M2 0a2 2 0 0 0-2 2v2h1.5V2a.5.5 0 0 1 .5-.5h2V0H2Zm2 10.5H2a.5.5 0 0 1-.5-.5V8H0v2a2 2 0 0 0 2 2h2v-1.5ZM8 12v-1.5h2a.5.5 0 0 0 .5-.5V8H12v2a2 2 0 0 1-2 2H8Zm2-12a2 2 0 0 1 2 2v2h-1.5V2a.5.5 0 0 0-.5-.5H8V0h2Z\" \/>\n\t\t\t<\/svg>\n\t\t<\/button><figcaption class=\"wp-element-caption\">LineageOS greeting screen<\/figcaption><\/figure>\n","protected":false},"excerpt":{"rendered":"<p>Recently I discovered how handy a small and inexpensive tablet can be for stuff like reading e-books or connecting to Bluetooth serial for debugging embedded applications. Not quite sure how much I actually needed it and didn&#8217;t want to spend much on a new tablet, I came across a bulk listing of 10 faulty Google&hellip; <a class=\"more-link\" href=\"https:\/\/rayssite.ddns.net\/index.php\/2024\/06\/26\/flashing-unofficial-lineageos-20-on-a-11-year-old-tablet-google-nexus-7-2013\/\">Continue reading <span class=\"screen-reader-text\">Flashing (unofficial) LineageOS 20 on a 11-year old tablet (Google Nexus 7 2013)<\/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":[36],"tags":[38,39,37],"class_list":["post-477","post","type-post","status-publish","format-standard","hentry","category-android-mod","tag-lineageos","tag-mindthegapps","tag-nexus-7","entry"],"_links":{"self":[{"href":"https:\/\/rayssite.ddns.net\/index.php\/wp-json\/wp\/v2\/posts\/477","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/rayssite.ddns.net\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/rayssite.ddns.net\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/rayssite.ddns.net\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/rayssite.ddns.net\/index.php\/wp-json\/wp\/v2\/comments?post=477"}],"version-history":[{"count":24,"href":"https:\/\/rayssite.ddns.net\/index.php\/wp-json\/wp\/v2\/posts\/477\/revisions"}],"predecessor-version":[{"id":508,"href":"https:\/\/rayssite.ddns.net\/index.php\/wp-json\/wp\/v2\/posts\/477\/revisions\/508"}],"wp:attachment":[{"href":"https:\/\/rayssite.ddns.net\/index.php\/wp-json\/wp\/v2\/media?parent=477"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/rayssite.ddns.net\/index.php\/wp-json\/wp\/v2\/categories?post=477"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/rayssite.ddns.net\/index.php\/wp-json\/wp\/v2\/tags?post=477"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}