K1 Install firmware on Nvidia Tablet - Shield Tablet General

To install the firmware K1 need to increase system partition size to 2,097,152 . For this we need to change the partition table mmcblk0p25.
That altered the table and now the firmware running on the K1. you want to copy in the recovery from the adb file mmcblk0p25 art created by me.
in the recovery
unmount system
unmount cashe
ADB
adb shell
dd if=/sdcard/mmcblk0p25 of=/dev/block/mmcblk0p25
in the recovery
advanced Wipe >Sytem
Cache
Advanced > Terminal Command cat /proc/partitions
fayloobmennik.net/6244128 here be art created by me file mmcblk0p25

Or just remove some of the bloatware from system

Related

[HOWTO] Repair the Userdata Partition

I just had an issue where my /data partition would only mount read-only because of some EXT4 filesystem errors, which was causing a boat-load of force closes which would not allow me to do a whole lot. To fix this, here are the steps that I used...
Requirements:
ClockworkMod Recovery
USB Cable
Machine running Linux with 30GB of free space
A couple hours of time
Directions:
Boot into recovery.
Pull the partition to your hard drive.
Code:
$ adb pull /dev/block/mmcblk1p10 ./data.img
Repair the file system.
Code:
# fsck.ext4 ./data.img
Push it back to the Xoom.
Code:
$ adb push ./data.img /dev/block/mmcblk1p10
Reboot.
At this point, everything should be back to normal.

[Q&A] [ROOT][CWM] Root Nexus 4 & Install Official ClockworkMod Recovery

Q&A for [ROOT][CWM] Root Nexus 4 & Install Official ClockworkMod Recovery
Some developers prefer that questions remain separate from their main development thread to help keep things organized. Placing your question within this thread will increase its chances of being answered by a member of the community or by the developer.
Before posting, please use the forum search and read through the discussion thread for [ROOT][CWM] Root Nexus 4 & Install Official ClockworkMod Recovery. If you can't find an answer, post it here, being sure to give as much information as possible (firmware version, steps to reproduce, logcat if available) so that you can get help.
Thanks for understanding and for helping to keep XDA neat and tidy!
Booting with insecure boot image has broken all my sensors in my Nexus 4 / Android 5
I have been using a boot insecure image made for Nexus 4 / Android 4.2 downloaded from here :
http://forum.xda-developers.com/nexus-4/development/boot-img-obsolete-please-lock-t1990170
to boot my phone to have root access through adb by doing:
$ fastboot boot bootinsecure.img
But after upgrading to Android 5 the process of booting with this image was ruining all my sensors and my wifi.
My wifi was fixed by deleting the content in /data/misc/wifi but leaving wpa_supplicant.conf to keep my saved wifis.
But I cannot fix the sensors. I tried this fix for Nexus 5 but it didn't work:
http://forum.xda-developers.com/google-nexus-5/general/sensors-fix-nexus-5-t2704915
If I delete the user data the problem is solved but I don't want to remove all my data.
There is something in that boot image that brakes my sensors by changing something in the userdata partition
For testing purposes, I deleted the user data. Booted again and the problem was fixed. I saved a image of the userdata partition by doing as root:
$ adb pull /dev/block/mmcblk0 mmcblk0.img
and mounting the userdata partition in my linux as root to keep al the original permissions
# sudo mount -o loop,offset=1627389952,defaults,ro,noload mmcblk0.img mnt/userdata
I booted from my boot insecure image and reboot normally and all the sensors where ruined as expected
So I created another image and I mounted the userdata in another folder
and then I compared all the files that where changed using rsync after and before the boot with the insecure image.
I found a few extra files in the "after" image so I deleted them but the problem was not fixed.
I think that maybe the problem is related to folder/files permissions, attributes or extended attributes (like SElinux) that were changed and cannot be detected when comparing using rsync
Any ideas what might have been and what to do to fix it?
SOLVED:
Solution:
Apparently the problem was not in the userdata partition was in the persist partition. I solved by cloning a working persist partition from another Nexus 4.
I realized that something was wrong in the probably extended attributes in the file /persist/sensors/sns.reg since a
$ adb logcat
was giving this error:
W/sensors.qcom( 282): type=1400 audit(0.0:5): avc: denied { getattr } for path="/persist/sensors/sns.reg" dev="mmcblk0p20" ino=15 scontext=u:r:sensors:s0 tcontext=ubject_r:unlabeled:s0 tclass=file
So I fixed in this way:
First I downloaded a modified busybox dd from:
http://d-h.st/cFA
Don't use the default one it will ruin your partition:
I downloaded recovery-clockwork-touch-6.0.4.7-mako.img from:
http://download2.clockworkmod.com/recoveries/recovery-clockwork-6.0.4.7-mako.img
1) Then I booted from a recovery image like ClockWorkMod. With the phone in the bootloader:
$ fastboot boot recovery-clockwork-touch-6.0.4.7-mako.img
2) Created a ramdisk in the phone
$ adb shell mkdir /dev/ramdisk
$ adb shell mount -o size=1536M -t tmpfs tmpfs /dev/ramdisk
3) Copied dd to the phone
$ adb push dd /
$ adb shell chmod 755 /dd
4) Extract persist from the working phone
$ adb shell /dd if=/dev/block/mmcblk0 of=/dev/ramdisk/persist.img bs=4096 skip=34816 count=4096
5) Pull file to our PC
$ adb pull /dev/ramdisk/persist.img
6) Reboot working phone
$ adb reboot-bootloader
With our not working Nexus 4
Repeat steps 1 to 3
7) Push your persist image to the phone
$ adb push persist.img /dev/ramdisk/
8) Overwrite image
$ adb shell /dd if=/dev/ramdisk/persist.img of=/dev/block/mmcblk0 bs=4096 seek=34816 conv=notrunc
9) Wipe cache and dalvik cache
10) Reboot
Should be fixed if that was the problem

Flashing and repartitioning Xiaomi MI2S running MIUI6

After upgrading from MIUIv4 to v6, I've discovered that the new version comes with a bootloader that
reflashes the recovery partition each time it's run with the stock recovery, which makes it impossible to use a custom recovery in order to install unsigned .zip patches,
doesn't support download mode, which makes it impossible to connect the phone to a computer as a block device and repartition it.
Since resolving this wasn't completely trivial (to me) and required a bit of research, I took some notes for future reference. I later decided to publish these notes, since someone might find them useful. Keep in mind that, while I do have technical background, I'm not intimately acquainted with the inner workings of Android and there was some trial and error involved. As a result, certain steps may be too heavy-handed or even unnecessary and I encourage comments on that.
Prerequisites
The guide presumes one has the adb, fastboot and parted binaries installed on an OS that enables access to connected block devices via the filesystem. For most users, that means a linux box.
Download mode
Booting into download mode appears to be disabled in MIUI6 v5.8.6. You will therefore need to boot into a custom recovery (see Booting into a custom recovery mode) and flash an alternative ROM (it would likely suffice to flash only certain partitions?):
Code:
$ adb push cm-11-20150802-NIGHTLY-aries.zip /storage/sdcard0
To boot into the download mode with an alternative ROM, consult [3] or run adb reboot dload against the phone in the system or in the recovery mode.
Repartitioning the internal flash memory
In my experience, the default size of the /system partition is insufficient to accommodate all the system applications along with the ever-growing Google Apps. The original inspiration came from [4]. To adjust the partition sizes, I used the parted command-line tool, since it comes with full support for GPT partitions and labels. Gparted used, but (as of v0.19.0-2) appeared to be much slower compared to parted and didn't seem to fully support GPT partition labels. Keep in mind that, unlike gparted, parted applies the changes to the block device immediately. Proceed with caution.
Before starting, it's best to backup the current partition table for a reference:
Code:
# gparted /dev/sdc
GNU Parted 3.2
Using /dev/sdc
Welcome to GNU Parted! Type 'help' to view a list of commands.
(parted) unit MiB
(parted) print
Number Start End Size File system Name Flags
1 0,02MiB 85,0MiB 85,0MiB fat16 modem msftdata
2 85,0MiB 170MiB 85,0MiB fat16 modem1 msftdata
3 170MiB 171MiB 0,50MiB sbl1
4 171MiB 171MiB 0,50MiB sbl2
5 171MiB 172MiB 1,00MiB sbl3
6 172MiB 173MiB 1,00MiB rpm
7 173MiB 174MiB 1,00MiB tz
8 174MiB 175MiB 0,50MiB DDR
9 175MiB 179MiB 4,00MiB aboot
10 179MiB 180MiB 1,00MiB misc
11 180MiB 182MiB 2,85MiB logo
12 182MiB 183MiB 0,76MiB m9kefs1
13 183MiB 184MiB 0,76MiB m9kefs2
14 184MiB 184MiB 0,00MiB m9kefsc
15 184MiB 192MiB 8,11MiB bk1
16 192MiB 193MiB 0,76MiB m9kefs3
17 193MiB 256MiB 63,2MiB bk2
18 256MiB 271MiB 15,0MiB boot
19 271MiB 286MiB 15,0MiB boot1
20 286MiB 301MiB 15,0MiB recovery
21 301MiB 312MiB 11,0MiB bk3
22 312MiB 320MiB 8,00MiB ext4 persist
23 320MiB 832MiB 512MiB ext4 system
24 832MiB 1344MiB 512MiB ext2 system1
25 1344MiB 1728MiB 384MiB ext4 cache
26 1728MiB 5312MiB 3584MiB ext4 userdata
27 5312MiB 29820MiB 24509MiB ext4 storage
Mind that /dev/sdc refers to the block device of my phone and will differ on your system depending on the amount of other block devices connected and the type of your system. It's also best to backup either the entire block device (/dev/sdc) or at last the specific partitions you are going to be messing with (/dev/sdcXY) – this is doubly important for partitions <= 22, the correct content of which may be difficult to retrieve when damaged. Labels (most likely) aren't important, the partition numbers are, so make sure you keep the order of the partitions when fiddling with them.
After finishing, reconnect the phone to make the kernel recognize the new partition structure and create the filesystem (mkfs.ext4) for any partitions you have created. The following example makes the system and system1 partitions 1GiB each and the userdata partition 4GiB at the expense of the storage partition:
Code:
# parted /dev/sdc
GNU Parted 3.2
Using /dev/sdc
Welcome to GNU Parted! Type 'help' to view a list of commands.
(parted) rm 23
(parted) rm 24
(parted) rm 25
(parted) rm 26
(parted) rm 27
(parted) mkpart physical ext4 320MiB 1344MiB
(parted) mkpart physical ext4 1344MiB 2368MiB
(parted) mkpart physical ext4 2368MiB 2752MiB
(parted) mkpart physical ext4 2752MiB 6848MiB
(parted) mkpart physical ext4 6848MiB 29819MiB
(parted) name 23 system
(parted) name 24 system1
(parted) name 25 cache
(parted) name 26 userdata
(parted) name 27 storage
(parted) quit
# sync
And then, after reattaching the phone to the computer:
Code:
# for i in /dev/sdc2[34567]; do mkfs.ext4 $i; done
# sync
Recovery mode
For booting into recovery, consult [3].
Booting into a custom recovery
Use the process described at [2], with steps 7-8 interchanged with 9-10. I used the emms_appsboot.mbm and recovery-clockwork-6.0.5.0-aries-20140718.img files (see List of files) from the fastboot mode as follows:
Code:
$ fastboot flash recovery recovery-clockwork-6.0.5.0-aries-20140718.img
$ fastboot flash aboot emmc_appsboot.mbn
$ fastboot boot recovery-clockwork-6.0.5.0-aries-20140718.img
If the phone gets stuck at booting during the last step, restart the phone and try again.
You should now be in the custom recovery. For me, this only lasted until a reboot. Then, the recovery was replaced with the stock one and it became impossible to boot into the system, effectively softbricking the phone. To fix this, flash the stock emmc_appsboot.mbm bootloader image extracted from the .zip of the MIUI ROM you are using and flash it from the fastboot mode:
Code:
$ fastboot flash aboot ./the/original/emmc_appsboot.mbn
$ fastboot continue
Fastboot mode
To boot into the fastboot mode, either:
Reboot the phone while holding the volume down button.
Run adb reboot bootloader against the phone in the system or in the recovery mode.
List of files
You don't need these files, it's only what I used, which should enable the reproducibility of my results.
xiaomi.eu_multi_aries_5.8.6_v6-5.0.zip – The MIUI6 v5.8.6 Czech ROM. Downloaded from [5].
emms_appsboot.mbm – A fixed bootloader for MIUI6 v5.8.6, which allows for the installation of recoveries other than the
built-in one (see Reinstalling the recovery). Downloaded from [2].
recovery-clockwork-6.0.5.0-aries-20140718.img – A recovery image of a custom version of the clockworkmod. Extracted from the archive downloaded from [1].
cm-11-20150802-NIGHTLY-aries.zip – An alternative ROM (Cyanogenmod 11). downloaded from [6].
Links
[2014-07-08] ClockworkMod Recovery 6.0.5.0
[Tools, Tips & Tutorials] [Device Team] How to get Custom Recoveries working again on Mi 2/2S with MIUI 6
[Tips & Tutorials] [Mods' Insight] Understanding Recovery mode & Download Mode
[SCRIPT] Fix partition table for Android 4.4
MIUIV6 OFFICIAL RELEASE
Browse Files for Samsung Galaxy S - aries
Hi, I updated partitioning tutorial to install Android 10: https://forum.xda-developers.com/t/guide-tutorial-howto-xiaomi-mi-2-2s-stock-to-android-10.4391775/

Nexus 10 Gapps fix with Pie

I have made a workaround/guide for the Nexus 10 Pie/Gapps problem (modified Nexus 4; Tnx to bmg1001).
Modified and corrected , for installation of Pie (Android 9.0) with Gapps.
Source: https://forum.xda-developers.com/nexus-4/general/guide-increase-nexus-4s-partition-space-t3800264
Big thanks to bmg1001 on XDA-Dev!
REQUIREMENTS:
parted (in the ZIP-file on mega.nz or link above)
adb and fastboot, and preferably knowledge on how they work
Step 1: Install TWRP onto your Nexus 10 and reboot into it.
Step 2: Open up command prompt / terminal (Right mouse click) in the folder were the "parted-script" is located and check to see if your Nexus 10 is connected properly with the command "adb devices".
Step 3: Once you've confirmed that adb is fully working and your Nexus 10 is properly connected to your PC, download parted and use adb to push it to your Nexus 10 using the command: "adb push parted /"
(Without the " )!!!
Step 4: Now enter the following command: adb shell
and then the command: chmod +x parted (This will enter adb shell and make the "parted" binary you pushed to your device earlier executable.)
Step 5: Now run the command: ./parted /dev/block/mmcblk0 p ( You should see a long list with a bunch of numbers and names in your terminal. These are the partitions on your device. parted will give you the partition number, the "start" and "end" of the partition, the size, and the name.
This is the partition layout on my device. It will probably be the same on your device, though the size of userdata may vary depending on whether you have the 32gb or 16gb Nexus 10). It should look a bit like the table below:
Number Start End Size File system Name Flags
1 4194kB 25.2MB 21.0MB ext4 efs
2 25.2MB 33.6MB 8389kB param
3 33.6MB 50.3MB 16.8MB boot
4 50.3MB 83.8MB 33.5MB recovery
5 83.8MB 83.9MB 65.5kB metadata
6 83.9MB 88.1MB 4194kB misc
7 88.1MB 612MB 523MB ext4 cache
8 612MB 1481MB 869MB ext2 system
9 1481MB 15.8GB 14.3GB ext4 userdata
Step 6: Now run the following three commands: umount /data umount /sdcard umount /cache
Step 7: So, on my Nexus 10, the system partition is number 8, and cache is 7. We're kinda lucky in the fact that system and cache are right next to each other, meaning we don't have to touch any other partition.
You'll want to run these two next commands. These commands will essentially "remove" the two partitions: ./parted /dev/block/mmcblk0 rm 7 ./parted /dev/block/mmcblk0 rm 8
Step 8: Now it is time to recreate these two partitions, however, when recreating them, we will make system bigger and the cache smaller. From the partitions list we got in Step 5, we can see that cache starts at 88.1 and ends at 612, while system starts at 612 and ends at 1481. The following two commands will rebuild /system starting at 88.1, but ending at 400, while rebuilding cache at 400, and ending at 1481. We are essentially stealing a large chunk from cache, since we don't really need that anymore on newer ROMs. I choose the "system-/cache-size" randomly, so you may size it, the way you like!
Command: ./parted /dev/block/mmcblk0 mkpart primary 88.1 400 and ./parted /dev/block/mmcblk0 mkpart primary 400 1481
Step 9: Now run this command: ./parted /dev/block/mmcblk0 p
(This will bring up the partitions list, or table, again. This time, however, we'll see the new partitions where system and cache were, however, they have no names! The following two commands will name the two partitions again): ./parted /dev/block/mmcblk0 name 8 system and ./parted /dev/block/mmcblk0 name 7 cache
Step 10: Great! Now the partitions should be named again! Now, we still have to format the partitions as ext4 so that we can actually use them. The following two commands will do that for you.
mke2fs -b 4096 -T ext4 /dev/block/mmcblk0p7
mke2fs -b 4096 -T ext2 /dev/block/mmcblk0p8
If you run ./parted /dev/block/mmcblk0 p It will show you the list, as shown below:
Number Start End Size File system Name Flags
1 4194kB 25.2MB 21.0MB ext4 efs
2 25.2MB 33.6MB 8389kB param
3 33.6MB 50.3MB 16.8MB boot
4 50.3MB 83.8MB 33.5MB recovery
5 83.8MB 83.9MB 65.5kB metadata
6 83.9MB 88.1MB 4194kB misc
7 88.1MB 400MB 312MB ext4 cache
8 400MB 1481MB 1081MB ext2 system
9 1481MB 15.8GB 14.3GB ext4 userdata
Step 11: Now run the command: mount -a (This command didn't work for me. Gave me errors. I rebooted from TWRP in to Recovery mode again) and then type exit.
Now you can follow your guide to flash your custom rom with GAPPS. Enjoy!!!!
Biomus
https://mega.nz/#!Rk0VCKrY!E84TJmMa9_MD5a8Wn9V7KMGgF-_SCCmXKbLahPneqKg
Thank you man, it works perfectly!
biomus said:
I have made a workaround/guide for the Nexus 10 Pie/Gapps problem (modified Nexus 4; Tnx to bmg1001).
Modified and corrected , for installation of Pie (Android 9.0) with Gapps.
Source: https://forum.xda-developers.com/nexus-4/general/guide-increase-nexus-4s-partition-space-t3800264
Big thanks to bmg1001 on XDA-Dev!
REQUIREMENTS:
parted (in the ZIP-file on mega.nz or link above)
adb and fastboot, and preferably knowledge on how they work
Step 1: Install TWRP onto your Nexus 10 and reboot into it.
Step 2: Open up command prompt / terminal (Right mouse click) in the folder were the "parted-script" is located and check to see if your Nexus 10 is connected properly with the command "adb devices".
Step 3: Once you've confirmed that adb is fully working and your Nexus 10 is properly connected to your PC, download parted and use adb to push it to your Nexus 10 using the command: "adb push parted /"
(Without the " )!!!
Step 4: Now enter the following command: adb shell
and then the command: chmod +x parted (This will enter adb shell and make the "parted" binary you pushed to your device earlier executable.)
Step 5: Now run the command: ./parted /dev/block/mmcblk0 p ( You should see a long list with a bunch of numbers and names in your terminal. These are the partitions on your device. parted will give you the partition number, the "start" and "end" of the partition, the size, and the name.
This is the partition layout on my device. It will probably be the same on your device, though the size of userdata may vary depending on whether you have the 32gb or 16gb Nexus 10). It should look a bit like the table below:
Number Start End Size File system Name Flags
1 4194kB 25.2MB 21.0MB ext4 efs
2 25.2MB 33.6MB 8389kB param
3 33.6MB 50.3MB 16.8MB boot
4 50.3MB 83.8MB 33.5MB recovery
5 83.8MB 83.9MB 65.5kB metadata
6 83.9MB 88.1MB 4194kB misc
7 88.1MB 612MB 523MB ext4 cache
8 612MB 1481MB 869MB ext2 system
9 1481MB 15.8GB 14.3GB ext4 userdata
Step 6: Now run the following three commands: umount /data umount /sdcard umount /cache
Step 7: So, on my Nexus 10, the system partition is number 8, and cache is 7. We're kinda lucky in the fact that system and cache are right next to each other, meaning we don't have to touch any other partition.
You'll want to run these two next commands. These commands will essentially "remove" the two partitions: ./parted /dev/block/mmcblk0 rm 7 ./parted /dev/block/mmcblk0 rm 8
Step 8: Now it is time to recreate these two partitions, however, when recreating them, we will make system bigger and the cache smaller. From the partitions list we got in Step 5, we can see that cache starts at 88.1 and ends at 612, while system starts at 612 and ends at 1481. The following two commands will rebuild /system starting at 88.1, but ending at 400, while rebuilding cache at 400, and ending at 1481. We are essentially stealing a large chunk from cache, since we don't really need that anymore on newer ROMs. I choose the "system-/cache-size" randomly, so you may size it, the way you like!
Command: ./parted /dev/block/mmcblk0 mkpart primary 88.1 400 and ./parted /dev/block/mmcblk0 mkpart primary 400 1481
Step 9: Now run this command: ./parted /dev/block/mmcblk0 p
(This will bring up the partitions list, or table, again. This time, however, we'll see the new partitions where system and cache were, however, they have no names! The following two commands will name the two partitions again): ./parted /dev/block/mmcblk0 name 8 system and ./parted /dev/block/mmcblk0 name 7 cache
Step 10: Great! Now the partitions should be named again! Now, we still have to format the partitions as ext4 so that we can actually use them. The following two commands will do that for you.
mke2fs -b 4096 -T ext4 /dev/block/mmcblk0p7
mke2fs -b 4096 -T ext2 /dev/block/mmcblk0p8
If you run ./parted /dev/block/mmcblk0 p It will show you the list, as shown below:
Number Start End Size File system Name Flags
1 4194kB 25.2MB 21.0MB ext4 efs
2 25.2MB 33.6MB 8389kB param
3 33.6MB 50.3MB 16.8MB boot
4 50.3MB 83.8MB 33.5MB recovery
5 83.8MB 83.9MB 65.5kB metadata
6 83.9MB 88.1MB 4194kB misc
7 88.1MB 400MB 312MB ext4 cache
8 400MB 1481MB 1081MB ext2 system
9 1481MB 15.8GB 14.3GB ext4 userdata
Step 11: Now run the command: mount -a (This command didn't work for me. Gave me errors. I rebooted from TWRP in to Recovery mode again) and then type exit.
Now you can follow your guide to flash your custom rom with GAPPS. Enjoy!!!!
Biomus
Hi,
Click to expand...
Click to collapse
Thanks for this article,
I am having problems.
I have opened a terminal in the folder where the parted script is ( I am using linux )
The command adb push parted, returns the error ''usage requires an argument''
I regularly push files to my nexus 10 , but use the argument adb push xxxx /sdcard.
This pushes it to the sd card.
Consequently, I cannot go beyond the first part of this tutorial :-(
If I can push parted to sdcard, I am not sure how to chmod it from the sdcard.
many Thanks
Pootler
biomus said:
https://mega.nz/#!Rk0VCKrY!E84TJmMa9_MD5a8Wn9V7KMGgF-_SCCmXKbLahPneqKg
Click to expand...
Click to collapse
pootler said:
Thanks for this article,
I am having problems.
I have opened a terminal in the folder where the parted script is ( I am using linux )
The command adb push parted, returns the error ''usage requires an argument''
I regularly push files to my nexus 10 , but use the argument adb push xxxx /sdcard.
This pushes it to the sd card.
Consequently, I cannot go beyond the first part of this tutorial :-(
If I can push parted to sdcard, I am not sure how to chmod it from the sdcard.
many Thanks
Pootler
Click to expand...
Click to collapse
I just followed the instructions (I am using a Windows 10 PC and Nexus 10).
Step 1 - just follow the instructions
Step 2 - in TWRP open terminal (Advanced->Terminal) and then on your PC open a command prompt where you have adb installed and enter "adb devices" (without the quotes) and expect to get a line printed with your device number and "recovery" in the text. From what you said I guess you are familiar with this bit.
Step 3 - from the downloaded ZIP file (from mega.nz or the link provided) extract the "parted" file to somewhere on your PC, e.g. c:\users\me\desktop\parted and then in the PC command prompt enter "adb push c:\users\me\desktop\parted /" (without the quotes)
Step 4 - I originally did this in the PC command window "adb shell" and "chmod +x parted"
Steps 5-11 - these are done in the TWRP terminal. I too got an error when doing "mount -a" (couldn't mount 3 things) but I then entered "mount -a" again and then it only failed to mount the USB-OTG which was to be expected.
IMPORTANT
I used these instructions to resize the /system to install the following 3 files
lineage-16.0-20210620-UNOFFICIAL-manta.zip
Magisk-v23.0.apk
open_gapps-arm-9.0-pico-20210717.zip
from https://forum.xda-developers.com/t/rom-unofficial-9-lineage-16-0-manta-nexus-10.4175477/ but found the 400 value still left too small a /system so changed it to 330 (the GApps log file, at bottom, said I needed an additional 56712 bytes [approx 55.4KB] so I increased the system size by 70KB by changing 400 to 330). Remember you need to use the 330 in both of the 2 "mkpart" commands. After doing that all 3 files were installed OK, I then chose the "Wipe Cache/Dalvik" button (on the Install Zip page) and then "Reboot System" button to start the initial ROM setup.
I hope that helps.

[TUTORIAL] How to resize system partition on Galaxy S3 for larger GAPPS

On newer Android versions, the system occupies more of the system partition and with GAPPS upgrades, larger GAPPS packages (such as stock and mini) cannot fit on the system partition of the 2012 Galaxy S3. You can just use pico or nano, but sometimes you want the full GAPPS, the real deal. This is also necessary for upcoming ROMs that come with GAPPS preinstalled, such as Pixel Experience. To do this, you must resize the system partition. You can do this by taking some of the space from the cache partition and giving it to the system partition.
PLEASE NOTE: This process is not risk-free! If you do not know what you are doing, I strongly advise against this procedure. I am not responsible for any bricked devices or issues you may face. You have been warned.
Requirements:
A Samsung Galaxy S3. I have the i9300 model, where I have tested it.
parted, downloadable from here. If it downloads as a txt file, delete the extension by renaming it without the txt.
TWRP installed on your device (available for i9300 from here.)
A computer with ADB installed and relevant drivers.
First of all, you must boot TWRP. Once booted, wipe all partitions in TWRP, including system. Reboot back into recovery. Then go into mount and deselect all devices, and uncheck the box saying "Mount system partition as read-only"
Secondly, connect your S3 and send parted to the device with the following command:
Code:
adb push <path_to_parted> /
Thirdly, enter the ADB shell with the following command:
Code:
adb shell
Now, give executable permission to the parted file with the following command:
Code:
chmod +x parted
Now run:
Code:
./parted /dev/block/mmcblk0
Run the print command and you will get a list of partitions. It should look something like:
Code:
Model: MMC VTU00M (sd/mmc)
Disk /dev/block/mmcblk0: 15.8GB
Sector size (logical/physical): 512B/512B
Partition Table: gpt
Number Start End Size File system Name Flags
1 4194kB 8389kB 4194kB BOTA0
2 8389kB 12.6MB 4194kB BOTA1
3 12.6MB 33.6MB 21.0MB ext4 EFS
4 33.6MB 41.9MB 8389kB PARAM
5 41.9MB 50.3MB 8389kB BOOT
6 50.3MB 58.7MB 8389kB RECOVERY
7 58.7MB 92.3MB 33.6MB RADIO
8 92.3MB 1166MB 1074MB ext4 CACHE
9 1166MB 2777MB 1611MB ext4 SYSTEM
10 2777MB 3364MB 587MB ext4 HIDDEN
11 3364MB 3372MB 8389kB OTA
12 3372MB 15.8GB 12.4GB ext4 USERDATA
Make a note of the Start and End points for partitions 8 and 9 (CACHE and SYSTEM). In my case, the start and end points for partition 8 are 92.3 and 1166 and the start and end points for partition 9 are 1166 and 2777.
What we're going to do is delete these two partitions, then recreate them, but make the new partition 8 (Cache) smaller and allocate the space left to partition 9 (System).
Remove them with the following commands in parted:
Code:
./parted /dev/block/mmcblk0 rm 8
./parted /dev/block/mmcblk0 rm 9
Now recreate them with the following commands:
Code:
./parted /dev/block/mmcblk0 mkpart primary <cache_start> <cache_start+200>
./parted /dev/block/mmcblk0 mkpart primary <cache_end> <system_end>
Replace <cache_start> with the start of the former cache petition. In my case, it would be:
Code:
./parted /dev/block/mmcblk0 mkpart primary 92.3 292
./parted /dev/block/mmcblk0 mkpart primary 292 2777
Now name the partitions.
Code:
./parted /dev/block/mmcblk0 name 8 CACHE
./parted /dev/block/mmcblk0 name 9 SYSTEM
Then format them as ext4:
Code:
mke2fs -T ext4 /dev/block/mmcblk0p8
mke2fs -T ext4 /dev/block/mmcblk0p9
Run ./parted, followed by print, to check if the changes have been applied. If so, well done! You have successfully enlarged the system partition. Exit parted with the quit command.
Now configure and exit:
Code:
mount -a
exit
Reboot back into recovery and install any ROM of your choice. Once you've installed the ROM, reboot into recovery once again, and navigate to wipe --> advanced wipe, select system, tap repair or change filesystem, then resize.
You can now install any GAPPS of your choice. I've gotten LineageOS 16.0 working with mini gapps (Google Play Store + some Google apps) and it is working fine. You could make the system partition bigger by borrowing some more MB from the cache partition, or experimenting further by taking some from the HIDDEN partition. Remember, I am NOT responsible for any damage done when doing this. You assume full responsibility for any problems with the device. I hope this tutorial did help you, feel free to post here if it did or ask for help if you need it.
Did you experiment this process for a long time ? With so small a cache what could be the consequences ?
A finally do you know what is the use of HIDDEN partition ?
Great tutorial anyway.
barbe31 said:
Did you experiment this process for a long time ? With so small a cache what could be the consequences ?
Click to expand...
Click to collapse
Newer Android versions don't use up as much in the cache partition. If you're on say stock ICS or JB you may encounter some issues but if you're using LOS 15 or 16 it should work fine. I've used LOS 16 with GAPPS using this method for a while on my S3 and it's been fine.
ChasTechProjects said:
parted, downloadable from here.
Click to expand...
Click to collapse
Link says file doesn't exist.
petera703 said:
Link says file doesn't exist.
Click to expand...
Click to collapse
parted
drive.google.com
Cheers for that. I've been trying for some time to do the same thing on a Galaxy S4 Mini, working from a few variations of this process that I've found here and there, but never with any success. All appears to go well, with no errors, but it doesn't stick--the device just reverts to the previous partition sizes on reboot..
I've been using parted 3.2. I wondered if it would work with the parted you were using, but the one from your new link is 1.8 and doesn't even get as far for me (tried that one previously and it gets errors on my device).
If anyone know how to overcome the issue of resized partitions not surviving a reboot on Android, please help! I've been unable to solve it.
If it was plain Linux, it would be something to do with fstab, but fstab is never mentioned in the posts where people succeed in resizing Android partitions, so I think it must be something else, and perhaps something that varies from one device to another. Looking forward to any suggestions--thanks!
Can this idea/technique be applied to other *droid based devices
like Nook HD ?
[ Having same 'not enough space for the gaps' issue]

Categories

Resources