HELP PLEASE Lg L2 Lost memory 32 go after bad flash 16go kdz - G2 Q&A, Help & Troubleshooting

After flashing a 16go kdz in my lg g2 d802 I lost my 32go memory, I followed this tuto http://forum.xda-developers.com/showthread.php?t=2470207&page=3
What I did ; used lg flash tools 2014 to flash 32 go kdz [doesn't solve the problem, just 10.7go] then I rooted my phone with iroot25,check root with root checker, copy files and overwrite by Total Commander to system/bin after making it RW, but when I set permissions to 755 and apply doesn't saved check again and found 602 so I can't use ADB to modify partitions and got permissions denied also I lose my root.
if I reboot phone I lose network
where is the problem??
I really appreciate your help, thank you very much
Microsoft Windows [Version 6.3.9600]
(c) 2013 Microsoft Corporation. All rights reserved.
C:\Program Files (x86)\Minimal ADB and Fastboot>adb devices
List of devices attached
07459cead6cc4ddf device
C:\Program Files (x86)\Minimal ADB and Fastboot>adb shell
/system/bin/sh: /system/etc/mkshrc[9]: getprop: can't execute: Permission denied
/system/bin/sh: /system/etc/mkshrc[10]: id: can't execute: Permission denied
@ANDROID:/ $ su
su
sh: /system/etc/mkshrc[9]: getprop: can't execute: Permission denied
sh: /system/etc/mkshrc[10]: id: can't execute: Permission denied
@ANDROID:/ # su
su
sh: /system/etc/mkshrc[9]: getprop: can't execute: Permission denied
sh: /system/etc/mkshrc[10]: id: can't execute: Permission denied
@ANDROID:/ # adb devices
adb devices
List of devices attached
@ANDROID:/ # cd /system
cd /system
@ANDROID:/system # parted /dev/block/mmcblk0
parted /dev/block/mmcblk0
GNU Parted 1.8.8.1.179-aef3
Using /dev/block/mmcblk0
Welcome to GNU Parted! Type 'help' to view a list of commands.
(parted) print
print
print
Model: MMC 032G96 (sd/mmc)
Disk /dev/block/mmcblk0: 31.3GB
Sector size (logical/physical): 512B/512B
Partition Table: gpt
Number Start End Size File system Name Flags
1 16.8MB 83.9MB 67.1MB fat16 modem
2 83.9MB 84.9MB 1049kB sbl1
3 84.9MB 85.5MB 524kB dbi
4 101MB 101MB 524kB DDR
5 117MB 118MB 1049kB aboot
6 118MB 120MB 1049kB rpm
7 134MB 151MB 16.8MB boot
8 151MB 152MB 1049kB tz
9 152MB 152MB 1024B pad
10 168MB 171MB 3146kB modemst1
11 171MB 174MB 3146kB modemst2
12 174MB 174MB 1024B pad1
13 185MB 201MB 16.8MB misc
14 201MB 235MB 33.6MB ext4 persist
15 235MB 252MB 16.8MB recovery
16 252MB 255MB 3146kB fsg
17 268MB 269MB 524kB fsc
18 269MB 269MB 524kB ssd
19 269MB 269MB 1024B pad2
20 269MB 270MB 524kB encrypt
21 285MB 294MB 8389kB ext4 drm
22 294MB 302MB 8389kB ext4 sns
23 302MB 336MB 33.6MB laf
24 336MB 369MB 33.6MB fota
25 369MB 403MB 33.6MB ext4 mpt
26 403MB 403MB 524kB dbibak
27 403MB 404MB 1049kB rpmbak
28 404MB 405MB 1049kB tzbak
29 405MB 405MB 8192B rct
30 419MB 3322MB 2902MB ext4 system
31 3322MB 3959MB 638MB ext4 cache
32 3959MB 4043MB 83.9MB tombstones
33 4043MB 4060MB 16.8MB spare
34 4060MB 4110MB 50.3MB ext4 cust
35 4110MB 15.7GB 11.6GB ext4 userdata
36 15.7GB 15.8GB 37.7MB grow
(parted) quit
quit
quit
@ANDROID:/system # quit
quit
sh: quit: not found
127 @ANDROID:/system # ./dd if=/system/sgpt32g.img of=/dev/block/mmcblk0 bs=512
seek=61071327 conv=notrunc
of=/dev/block/mmcblk0 bs=512 seek=61071327 conv=notrunc <
sh: ./dd: not found
127 @ANDROID:/system # dd if=/system/sgpt32g.img of=/dev/block/mmcblk0 bs=512 se
ek=61071327 conv=notrunc
=/dev/block/mmcblk0 bs=512 seek=61071327 conv=notrunc <
sh: dd: can't execute: Permission denied
126 @ANDROID:/system # /dd if=/system/sgpt32g.img of=/dev/block/mmcblk0 bs=512 s
eek=61071327 conv=notrunc
f=/dev/block/mmcblk0 bs=512 seek=61071327 conv=notrunc <
sh: /dd: not found
127 @ANDROID:/system #
C:\Program Files (x86)\Minimal ADB and Fastboot>adb shell
/system/bin/sh: /system/etc/mkshrc[9]: getprop: can't execute: Permission denied
/system/bin/sh: /system/etc/mkshrc[10]: id: can't execute: Permission denied
@ANDROID:/ $ su
su
sh: /system/etc/mkshrc[9]: getprop: can't execute: Permission denied
sh: /system/etc/mkshrc[10]: id: can't execute: Permission denied
@ANDROID:/ # cd /system
cd /system
@ANDROID:/system # parted /dev/block/mmcblk0
parted /dev/block/mmcblk0
GNU Parted 1.8.8.1.179-aef3
Using /dev/block/mmcblk0
Welcome to GNU Parted! Type 'help' to view a list of commands.
(parted) print

Unfortunately, it sounds like you've just learned a hard lesson about flashing the wrong tot/kdz files.
If you can't re-flash a kdz/tot of the right size and fix it, there's probably not much anyone's going to be able to do fix it.

Goona work hhh
Yoinx said:
Unfortunately, it sounds like you've just learned a hard lesson about flashing the wrong tot/kdz files.
If you can't re-flash a kdz/tot of the right size and fix it, there's probably not much anyone's going to be able to do fix it.
Click to expand...
Click to collapse
Yes very true I learned a lot but this solution works for a lot of users, im just struggling with system/bin permissions, I know something wrong with SU or root or kdz or lg tools 2014, so im looking for the generosity of experts or people who had the same issue, im very sure its gonna work, in the same time, im trying to be familiar with android/Linux, lol, thank you for your reply

Yoinx said:
Unfortunately, it sounds like you've just learned a hard lesson about flashing the wrong tot/kdz files.
If you can't re-flash a kdz/tot of the right size and fix it, there's probably not much anyone's going to be able to do fix it.
Click to expand...
Click to collapse
Everything is possible with Linux, you may learn something new from this thread too, lol

thequietman1979 said:
Everything is possible with Linux, you may learn something new from this thread too, lol
Click to expand...
Click to collapse
Yeah, it's possible.
Tbh... it looks like you're either on the stock rom without busybox installed. Or your permissions are hosed as you suspect.
If you type busybox while in your adb shell, what do you get?

RE
Yoinx said:
Yeah, it's possible.
Tbh... it looks like you're either on the stock rom without busybox installed. Or your permissions are hosed as you suspect.
If you type busybox while in your adb shell, what do you get?
Click to expand...
Click to collapse
Yes right, im in stock coz this solution doesn't work for others roms, rooted and busybox, when I type it in adb it gives me busybox 1.20.0 installed and all the commands and functions but when I make changes in system/bin I lose adb access and lose also root.
thank u man

thequietman1979 said:
Everything is possible with Linux, you may learn something new from this thread too, lol
Click to expand...
Click to collapse
thequietman1979 said:
Yes right, im in stock coz this solution doesn't work for others roms, rooted and busybox, when I type it in adb it gives me busybox 1.20.0 installed and all the commands and functions but when I make changes in system/bin I lose adb access and lose also root.
thank u man
Click to expand...
Click to collapse
make sure that you're allowing root access for adb in your phone's developer options and/or the security settings for your phone.
restart adb as root: adb root
remount your system as r/w: adb remount
see if that makes a difference.

Solved
Yoinx said:
make sure that you're allowing root access for adb in your phone's developer options and/or the security settings for your phone.
restart adb as root: adb root
remount your system as r/w: adb remount
see if that makes a difference.
Click to expand...
Click to collapse
Thank you very much, I solved the problem, was very easy, had to copy files to xbin where my su is installed, and then change the 2 last commands, some root app install su in bin and other is xbin both folders are executables, so mine had to choose xbin and got my memory back 25go
im happy
thank you again for your support, any info im here

thequietman1979 said:
Thank you very much, I solved the problem, was very easy, had to copy files to xbin where my su is installed, and then change the 2 last commands, some root app install su in bin and other is xbin both folders are executables, so mine had to choose xbin and got my memory back 25go
im happy
thank you again for your support, any info im here
Click to expand...
Click to collapse
Yes Thanks for mentioning that : su in folder xbin and not system/bin
kindly try with this last 2 commands
2.
adb shell
su
cd /system
./dd if=/system/xbin/sgpt32g.img of=/dev/block/mmcblk0 bs=512 seek=61071327 conv=notrunc
./dd if=/system/xbin/pgpt32g.img of=/dev/block/mmcblk0 bs=512 seek=0 conv=notrunc

where can i find the files to download?

http://www.droidviews.com/your-32gb-lg-g2-shows-only-16gb-storage-space-heres-the-fix/

Hello! Please help!!! I try to paste the last two lines
./dd if=/system/sgpt32g.img of=/dev/block/mmcblk0 bs=512 seek=61071327 conv=notrunc
./dd if=/system/pgpt32g.img of=/dev/block/mmcblk0 bs=512 seek=0 conv=notrunc
and when press enter it says : sh: ./dd: not found
I also try and these :
./dd if=/system/xbin/sgpt32g.img of=/dev/block/mmcblk0 bs=512 seek=61071327 conv=notrunc
./dd if=/system/xbin/pgpt32g.img of=/dev/block/mmcblk0 bs=512 seek=0 conv=notrunc
but with the same results!!

Which link process is the final? And where is a link with the finally sdparted-recovery-all-files?
Which firmware can i use before process? 4.2.2 or 4.4.2?
Which root i can use? With SuperSU or Superuser?
Which programe to use? Total commander or Root explorer??
PLease help me!

if i flash the correct kdz without doing anything else does it fix the problem ??

Please explain
thequietman1979 said:
Thank you very much, I solved the problem, was very easy, had to copy files to xbin where my su is installed, and then change the 2 last commands, some root app install su in bin and other is xbin both folders are executables, so mine had to choose xbin and got my memory back 25go
im happy
thank you again for your support, any info im here
Click to expand...
Click to collapse
Please explain me what you done? I've same problem for month
---------- Post added at 09:34 PM ---------- Previous post was at 09:25 PM ----------
thequietman1979 said:
Thank you very much, I solved the problem, was very easy, had to copy files to xbin where my su is installed, and then change the 2 last commands, some root app install su in bin and other is xbin both folders are executables, so mine had to choose xbin and got my memory back 25go
im happy
thank you again for your support, any info im here
Click to expand...
Click to collapse
How you root your phon, thats my biggest problem

Ebaharloo said:
Please explain me what you done? I've same problem for month
---------- Post added at 09:34 PM ---------- Previous post was at 09:25 PM ----------
How you root your phon, thats my biggest problem
Click to expand...
Click to collapse
You need to root it before following the tutorial to get back 32go
http://forum.xda-developers.com/showthread.php?t=2470207&goto=newpost
To root your phone use iroot

Ebaharloo said:
Please explain me what you done? I've same problem for month
---------- Post added at 09:34 PM ---------- Previous post was at 09:25 PM ----------
How you root your phon, thats my biggest problem
Click to expand...
Click to collapse
http://forum.xda-developers.com/showthread.php?t=2448887

thequietman1979 said:
http://forum.xda-developers.com/showthread.php?t=2448887
Click to expand...
Click to collapse
I tired many methods, iroot, towelroot,... But no result.
After flashing my g2 to stock lollipop i lost root and recovery also 32 gb phon become 10gb.
So i tried many method to root and try methods which is available to solve 10gb problem but all if them need root.
You wrote you had same problem.please help me

Ebaharloo said:
I tired many methods, iroot, towelroot,... But no result.
After flashing my g2 to stock lollipop i lost root and recovery also 32 gb phon become 10gb.
So i tried many method to root and try methods which is available to solve 10gb problem but all if them need root.
You wrote you had same problem.please help me
Click to expand...
Click to collapse
What s the model of your lg g2?
If its d802 try to flash it back to kitkat using lg flash tool 2014 than root it using iroot or iroot 10, than follow the tuto, u gonna restore your memory
Root lg g2 d802 : http://forum.xda-developers.com/lg-...ols-how-to-install-twrp-bump-d80230a-t3072186.
Manual method: http://forum.xda-developers.com/android/development/guide-root-method-lg-devices-t3049772

Related

[HACK] Grow your data partition

>>> Please note that Vashiru reworked this guide for reliability and alternate values, so I recommend you check his various posts in this thread starting with this one. <<<
Click to expand...
Click to collapse
THE PROBLEM
As many of us have noticed, it is fairly easy to get an "Out of space" message when installing apps on our phones because, for some weird reason, Oppo decided that the storage part of the device should linger in the dark ages, when /userdata and /sdcard were separate partitions and you only had 2GB of data storage, even if your phone was a 32GB model.
Now, imagine that you are running KitKat and would like to try ART. This may be a bad idea as, if your data partition is more than 30% full, you will find that while converting your apps to this new format, Android will run out of space.
At OppoForums, a few bright people started looking into the issue and, of course, there is a way to improve the situation.
WARNING!
If you follow the steps below correctly, you should not run in any trouble. If you do not, however, you may end up spending much more time fixing your phone.
FIRST, THE THANKS SECTION
Anders tinkered with his device’s partition table until he got to where he had grown the /userdata partition to something useable. Yes, it’s some people’s definition of “play”
Jousa11 is the first person trying to put a guide together explaining the steps to reproduce Anders’ work. WARNING: I did no get to see said guide as Jousa quickly deleted it due to the risks involved. So, take that in account!
Rockman for providing the last resort rescue tools in case you brick your phone
Lucky for providing the WiFi fix
Please let me know if you are not on this list and I forgot to give you credit!
YOU WILL NEED
The hardware:
An Oppo Find5 phone(!)
A computer (Windows/Linux/Mac) with adb installed and working
A USB cable
On your computer:
adb
[Optional] fastboot
On your phone (SDCard):
parted + mke2fs + tune2fs
mmcblk0p21_persist_ext4.img
openrecovery-twrp-2.6.3.0-find5-TP-patch.img
[Optional] gdisk
You will use parted to work on your partition table; mke2fs and tune2fs to create ext4 filesystems on some of these partitions (parted does not know how to create ext4 partitions)
mmcblk0p21_persist_ext4.img is an image that you need to restore your /persist partition and avoid issues such as non-working WiFi.
openrecovery-twrp-2.6.3.0-find5-TP-patch.img is a patched recovery image. I know: you already have a recovery image if you are going through these steps. However, we are going to wipe it so you want to install this guy before rebooting. Note that if you forget, you can always flash it later using fastboot.
On your computer:
adb to access your phone recovery, push files to SDCard, reboot...
[Optional] fastboot. You will only need fastboot if you mess up your recovery partition.
WHAT IF SOMETHING GOES AWFULLY WRONG?
You may “brick” your phone. Apparently it’s near impossible to hard brick your Find5, though. See below.
First, Anders recommends making a backup of your partition table. I didn’t because I felt that if I messed something up, it would be a partitions’ content rather than the partition table but that’s not the wisest approach.
Furthermore, if you are really worried about what stilly error your fat fingers will cause (I know I should be!) you can also backup your partitions.
Backing up your partition table:
On your phone:
Code:
gdisk -b /sdcard/gpt.bin /dev/block/mmcblk0
Backing up a single partition:
On your phone:
Code:
dd if=/dev/block/mmcblk0p<partition id> of=/sdcard/backup-<partition id>.bin
On your computer:
Code:
adb pull /sdcard/gpt.bin
adb pull /sdcard/backup-<partition id>.bin
LAST RESORT
OK. So, you've bricked your phone. Now what?
First, you will need Windows. So if you're on a Mac or Linux and have no access to a Windows machine/VM, er..don't brick your phone.
- Download drivers and tools
- Download and follow the instructions
READY ? LET'S GET STARTED
>>>>>>>>>>>> First, Download The Files <<<<<<<<<<<<
Then...
On your computer:
UPDATE As dixxa pointed out, mke2fs and tune2fs may already be present on your device. It was not the case for me but you should check first; it seems like a good idea to use existing binaries.
Code:
adb reboot recovery
adb push parted /sbin
adb push mke2fs /sbin
adb push tune2fs /sbin
On your phone:
Code:
chmod 755 /sbin/parted /sbin/mke2fs /sbin/tune2fs
umount /cache
umount /sdcard
umount /emmc
umount /data
parted /dev/block/mmcblk0
You are now in the parted shell.
CAREFUL! Do not delete any partition below 20 or you will enter "Big Oops" territory. I recommend typing carefully and, yes, staying away from copy/paste operations that may swallow a character like, say, the '2' in '20'
Note that the size value I am using here is '4GB' for /userdata (rather than 2GB). I guess you could make /userdata bigger than 4GB, in which case you would have to recompute all the offsets in the commands below(!)
Code:
# rm sdcard
rm 29
# 28 thru 23 are reserved
rm 28
rm 27
rm 26
rm 25
# rm recovery
rm 24
# rm misc
rm 23
# rm cache
rm 22
# rm persist
rm 21
# rm data/emmc
rm 20
# now, re-create partitions but data is bigger
mkpart primary 1325 5421
name 20 userdata
mkpart primary 5421 5430
name 21 persist
mkpart primary 5430 5967
name 22 cache
mkpart primary 5967 5968
name 23 misc
mkpart primary 5968 5979
name 24 recovery
mkpart primary 5979 6012
name 25 reserve1
mkpart primary 6012 6019
name 26 reserve2
mkpart primary 6019 6028
name 27 reserve3
mkpart primary 6028 6062
name 28 reserve4
mkpart primary 6062MB 100%
name 29 sdcard
# exit parted shell
q
Let's create a file system on the partitions that require one. Note that I am formatting the SDCard using VFAT as, yes, EXT4 is a better FS, but it is also incompatible with Oppo's ROM and some apps may not require the proper permissions etc.
Code:
# Notes:
# -m 0: no reserved blocks
# -c 0: no max mount count
# -C -1: no mount count
# -i -1: max_int interval between checks
mke2fs -t ext4 -m 0 -L userdata /dev/block/mmcblk0p20
tune2fs -c 0 -i -1 -C -1 /dev/block/mmcblk0p20
mke2fs -t ext4 -m 0 -L persist /dev/block/mmcblk0p21
tune2fs -c 0 -i -1 -C -1 /dev/block/mmcblk0p21
mke2fs -t ext4 -m 0 -L cache /dev/block/mmcblk0p22
tune2fs -c 0 -i -1 -C -1 /dev/block/mmcblk0p22
# Hey look it’s an ext4 SDCard!
mke2fs -t ext4 -m 0 -L sdcard /dev/block/mmcblk0p29
tune2fs -c 0 -i -1 -C -1 /dev/block/mmcblk0p29
# Actually to avoid errors like unable to write to root of sdcard:
mkdosfs -n sdcard -F 32 /dev/block/mmcblk0p29
mount -t vfat /dev/block/mmcblk0p29 /sdcard
At this point, we have clobbered the /persist partition and this could cause issues as mentioned earlier. Let's restore it.
Code:
# Restore /persist partition
mount -t ext4 /dev/block/mmcblk0p29 /sdcard
# On computer
adb push mmcblk0p21_persist_ext4.img /sdcard/
# On phone
dd if=mmcblk0p21_persist_ext4.img of=/dev/block/mmcblk0p21
IMPORTANT! Flash your recovery partition now. If you wait until after rebooting, you will need to use fastboot instead.
Code:
# Recovery partition: on computer
adb push openrecovery-twrp-2.6.3.0-find5-TP-patch.img /sdcard/
# On phone
dd if=openrecovery-twrp-2.6.3.0-find5-TP-patch.img of=/dev/block/mmcblk0p24
Admire your work
Code:
parted /dev/block/mmcblk0 print
Reboot into your new recovery and install your favorite ROM
FAQ
Q: Is this dangerous?
A: Yes. Yes, it is.
Q: Any tip?
A: Yes. Follow these instructions carefully and if something wrong happens, unless you know what you are doing, leave your device alone and come here to ask for help.
Q: Can I hold you responsible for any damage to my phone/etc?
A: As usual, the answer is 'No'
Q: I found an error in your write-up!
A: Please let me know immediately.
-Chris.
You should probably use the latest TWRP 2.6.3.1 found here: http://techerrata.com/file/twrp2/find5/openrecovery-twrp-2.6.3.1-find5.img
Looks good to me. Just be very carefully doing this.
Sent from my Find 5 using xda app-developers app
gdisk -b /sdcard/gpt.bin /dev/block/mmcblk0
those commands need to be typed in recovery even that one ?
Yes although I imagine this particular command should also work when booting system.
Sent from my Find 5 using Tapatalk
This thread is fine the only problem here is with those 2 binaries: mke2fs and tune2fs
You don't need to push them or chmod them since they are already in the recovery
Except that that thread is perfect.
Since we're at toying with partition, can't we merge the partitions in some way ?
Just wondering is there any way to build a script to do this in an automated way thus avoiding user errors and typos?
There is a thread on the oppo forums
http://www.oppoforums.com/threads/guide-resizing-internal-storage-on-find-5-32gb.8361/
Hello everyone,
is the guide for the 32 or 16 gb model?
I have 16 gb Oppo find 5.
Thanks.
PS: what "on your phone" is supposed to mean"?
Click to expand...
Click to collapse
If you don't know what does that mean don't do it you'll screw your phone.
hi
Please would you make something like this for oppo find 7a x9006?
thanks
Anyone willing to recompute all the offsets dor just one 16gb partition?
Scribed henceforth from thy G pad.
Hi all, I am trying to do this mod and I am half way through it with a problem
I am stuck on the new file system, I cannot use mke2fs or tune2fs, i get
Code:
mke2fs: not found
like it doesn't even exist, but it does I can see it. I get the same error for tune2fs. but parted and gdisk work fine.
Yes I did push them and chmod 755 them.. and I have tried running it from the /sbin directory.
Help!
Hello!
I'm getting the same error over and over again creating /dev/block/mmcblk0p21 to /dev/block/mmcblk0p22:
tune2fs -c 0 -i -1 -C -1 /dev/block/mmcblk0p21
"Bad magic number in super-block while trying to open /dev/block/mmcblk0p21"
"Couldn't find valid filesystem superblock"
So i can't create a file system on the created partitions. I have been looking everywhere for an answer. Somebody have an idea?
U should just wait. Andrew dodd found a way to make find7a have unified partition and he claims he can make it work on find5 as well. Let's give him a bit to figure it out tho.
Scribed henceforth from thy G pad.
Gdisk not working...
Ok guys sort of a noob here... Firstly, totally appreciate what you guys are doing here... I wants it bad, thass why i'm here.
So far... I have i have done...
"adb reboot recovery"
"adb push gdisk /sbin"
I figured that's how you are supposed to install it ... hope i'm not wrong, but i guess it pushed through fine
But after rebooting to system in TWRP , i opened terminal emulator and when i use the command
"gdisk -b /sdcard/gpt.bin /dev/block/mmcblk0"
I get ...
"/system/bin/sh: gdisk: not found"
now i'm too scared to proceed without backing up the partition tables... so please help...
edit - FYI , i'm running the last build of Asylum Carbon... should i just go back to latest oopo stable stock rom and then root my device again and then try all this again... would that help... ???
Directly from Andrew Dodds g+ " IT HAS BEGUN.
The first phase of Find 7a/7s LVM testing is here.* See linked post for details.* (Sorry to disappoint, but the first phase is "make sure we don't break existing configurations")
Once this phase is complete, the remaining list is:
Fix up the remaining TWRP issues (make RECOVERY_SDCARD_ON_DATA runtime instead of compile-time)
Make user-friendly conversion processes
Once things are solid on Find 7, I'll work on Find 5 and N1."
Stay thirsty my friends. Good things ahead
Sent from my A0001 using Tapatalk
Does this work for the 16gb model?
Can someone help please?
I'm trying to do this, but after enter in parted [parted /dev/block/mmcblk0] when i try to do "rm 29", i get "can't remove 29: no such file or directory
I'm doing the "on your phone" commands in TWRP command line., is that correct?
I'm running stable colorOS 1.0.9i
Finally I finish the process.
My notes:
Goal:
Keep my current system intact (stable colorOS 1.0.9i , because i have no patience to format, install a new ROM and reinstall/recofigure everything
So I backup everything on phone with TWRP and I push sdcard content (wich include the system backup i made) with ADB
1 - If I push mke2fs and tune2fs IT WILL NOT WORK. I flash the last find 5 recovery (openrecovery-twrp-2.8.1.0-find5.img) and I dont push or chmod anyting, parted, mke2fs, tune2fs are all already in the recover and that's the only way I could run mke2fs and tune2fs
edit: 1.5 - The phone commands had to be enter via ADB shell. In TWRP command line, after you enter in parted it will not accept commands.
2 - To "rm 29", i had to "umount /dev/block/mmcblk0", otherwise "rm 29" fail due to partition in use
3 - after this instruction:
mount -t vfat /dev/block/mmcblk0p29 /sdcard
(the last one on the 4 block of code)
We have this:
# Restore /persist partition
mount -t ext4 /dev/block/mmcblk0p29 /sdcard
This instruction was the only one that give me a error, so I move to the next ones.
The error was that the partition was busy, what makes senses because in the last instruction we mount the same partition on the same folder but with different file system!!??
So I move to the next instruction. I have no idea if it's a instructions mistake but it looks like, because it says "# Restore /persist partition" but the command has nothing to do with /persist
4 - FINISH
5 - Reboot in recovery. Push sdcard backup to /sdcard. restore system backup with TWRP restore
Voila, my phone exactly as before but with 3,76GB for APPS. Finally!!! The "running out of space" message on a flagship quad-core 2GB RAM phone!!!!!!?????? Was driving me CRAZYYYYY
Thanks Fickx for the up to date information, I just did my re-partition successfully, here's what I did:
- Use Rashr update the recovery to twrp-2.8.1.0
- reboot into recovery
- connect to PC (Make sure adb works, "adb devices")
- on PC:
> adb shell
> umount /cache
> umount /sdcard
> umount /emmc
> umount /data
> umount /dev/block/mmcblk0p29
> parted /dev/block/mmcblk0
> rm 29
>...
> rm 20
> mkpart primary 1325 5421
> name 20 userdata
> ...
> name 29 sdcard
> q
> mke2fs ...
> ...
> mount -t -vfat /dev/block/mmcblk0p29 /sdcard
Open another PC command terminal
> adb push mmcblk0p21_persist_ext4.img /sdcard/
> adb push openrecovery-twrp-2.8.1.0-find5.img /sdcard/
Back to original terminal in "adb shell".
> dd if=/sdcard/mmcblk0p21_persist_ext4.img of=/dev/block/mmcblk0p21
> dd if=/sdcard/openrecovery-twrp-2.8.1.0-find5.img of=/dev/block/mmcblk0p24
> exit
> adb reboot recovery
Flash the rom.

Galaxy S5 Root (verizon) boot loader

I am trying to understand where the boot loader is exactly? Heres a 'ls' in the root directoy. Can anyone point me in the right direction here?
jasons-mbp-5latform-tools mmartinez$ ./adb shell
[email protected]:/ $ ls
acct
cache
config
d
data
default.prop
dev
efs
etc
file_contexts
firmware
firmware-modem
fstab.qcom
init
init.carrier.rc
init.container.rc
init.environ.rc
init.mdm.sh
init.qcom.class_core.sh
init.qcom.early_boot.sh
init.qcom.factory.sh
init.qcom.rc
init.qcom.ril.sh
init.qcom.sh
init.qcom.ssr.sh
init.qcom.syspart_fixup.sh
init.qcom.usb.rc
init.qcom.usb.sh
init.rc
init.ril.rc
init.ril.sh
init.target.rc
init.trace.rc
init.usb.rc
mnt
persdata
persist
proc
property_contexts
publiccert.pem
root
sbin
sdcard
seapp_contexts
sepolicy
sepolicy_version
storage
sys
system
tombstones
ueventd.qcom.rc
ueventd.rc
vendor
[email protected]:/ $
Here is the folder containing vendor binaries.
[email protected]:/vendor/lib $ ls
C16QL_libchromatix_s5k2p2xx_common.so
C16QL_libchromatix_s5k2p2xx_common_res0.so
C16QL_libchromatix_s5k2p2xx_common_res1.so
C16QL_libchromatix_s5k2p2xx_common_res2.so
C16QL_libchromatix_s5k2p2xx_common_res3.so
F16QL_libchromatix_s5k2p2xx_common.so
F16QL_libchromatix_s5k2p2xx_common_res0.so
F16QL_libchromatix_s5k2p2xx_common_res1.so
F16QL_libchromatix_s5k2p2xx_common_res2.so
F16QL_libchromatix_s5k2p2xx_common_res3.so
F16QS_libchromatix_imx240_common.so
F16QS_libchromatix_imx240_common_res0.so
F16QS_libchromatix_imx240_common_res1.so
F16QS_libchromatix_imx240_common_res2.so
F16QS_libchromatix_imx240_common_res3.so
egl
hw
lib-dplmedia.so
lib-imsSDP.so
lib-imscamera.so
lib-imsdpl.so
lib-imsqimf.so
lib-imsrcs.so
lib-imss.so
lib-imsvt.so
lib-imsxml.so
lib-rcsimssjni.so
lib-rcsjni.so
lib-rtpcommon.so
lib-rtpcore.so
lib-rtpdaemoninterface.so
lib-rtpsl.so
libC2D2.so
libCB.so
libCommandSvc.so
libDiagService.so
libDivxDrm.so
libExtendedExtractor.so
libFileMux.so
libHevcSwDecoder.so
libI420colorconvert.so
libNimsWrap.so
libOmxAacDec.so
libOmxAmrwbplusDec.so
libOmxEvrcDec.so
libOmxMux.so
libOmxQcelp13Dec.so
libOmxWmaDec.so
libOpenCL.so
libOpenVG.so
libP11Notify.so
libQSEEComAPI.so
libSHIMDivxDrm.so
libSSEPKCS11.so
libStDrvInt.so
libSubSystemShutdown.so
libTimeService.so
libWVStreamControlAPI_L1.so
libacdbloader.so
libacdbmapper.so
libacdbrtac.so
libactuator_ak7345_camcorder.so
libactuator_ak7345_camera.so
libactuator_dw9714_camcorder.so
libactuator_dw9714_camera.so
libactuator_dw9716_camcorder.so
libactuator_dw9716_camera.so
libactuator_wv560_camcorder.so
libactuator_wv560_camera.so
libadiertac.so
libadreno_utils.so
libadsprpc.so
libaudcal.so
libaudioalsa.so
libbt-vendor.so
libbtnv.so
libc2d2_z180.so
libc2d30-a3xx.so
libc2d30-a4xx.so
libc2d30.so
libchromatix_s5k8b1yx_common.so
libchromatix_s5k8b1yx_pip.so
libchromatix_s5k8b1yx_preview.so
libchromatix_s5k8b1yx_smart_stay.so
libchromatix_s5k8b1yx_snapshot.so
libchromatix_s5k8b1yx_video.so
libchromatix_s5k8b1yx_vt.so
libchromatix_s5k8b1yx_vt_beauty.so
libchromatix_s5k8b1yx_vt_hd.so
libchromatix_s5k8b1yx_zslshot.so
libcneapiclient.so
libcneconn.so
libcneqmiutils.so
libcneutils.so
libconfigdb.so
libcsd-client.so
libdiag.so
libdisp-aba.so
libdrmdiag.so
libdrmfs.so
libdrmtime.so
libdsnetutils.so
libdsucsd.so
libdsutils.so
libepdsp.so
libfastcvadsp_stub.so
libfastcvopt.so
libgeofence.so
libgsl.so
libidl.so
libizat_core.so
liblbs_core.so
liblistensoundmodel.so
libllvm-qcom.so
liblocationservice.so
libmm-abl-oem.so
libmm-abl.so
libmm-color-convertor.so
libmm-hdcpmgr.so
libmmQSM.so
libmmQTA.so
libmmcamera2_c2d_module.so
libmmcamera2_companion_imx240.so
libmmcamera2_companion_s5k2p2xx.so
libmmcamera2_cpp_module.so
libmmcamera2_iface_modules.so
libmmcamera2_imglib_modules.so
libmmcamera2_isp_modules.so
libmmcamera2_pproc_modules.so
libmmcamera2_sensor_modules.so
libmmcamera2_stats_modules.so
libmmcamera2_vpe_module.so
libmmcamera2_wnr_module.so
libmmcamera_faceproc.so
libmmcamera_image_stab.so
libmmcamera_imglib.so
libmmcamera_imglib_faceproc_adspstub.so
libmmcamera_imx240.so
libmmcamera_s5k2p2xx.so
libmmcamera_s5k8b1yx.so
libmmhttpstack.so
libmmiipstreammmihttp.so
libmmipstreamaal.so
libmmipstreamnetwork.so
libmmipstreamsourcehttp.so
libmmipstreamutils.so
libmmosal.so
libmmparser.so
libmmrtpdecoder.so
libmmrtpencoder.so
libmmwfdinterface.so
libmmwfdsinkinterface.so
libmmwfdsrcinterface.so
liboemcamera.so
liboemcrypto.so
liboi_sbc_decoder.so
libprdrmdecrypt.so
libprofiler_msmadc.so
libqc-opt.so
libqcci_legacy.so
libqcgesture.so
libqmi.so
libqmi_cci.so
libqmi_client_qmux.so
libqmi_common_so.so
libqmi_csi.so
libqmi_csvt_srvc.so
libqmi_encdec.so
libqmiservices.so
libril-qcril-hook-oem.so
librmp.so
librpmb.so
libsc-a2xx.so
libsc-a3xx.so
libscale.so
libscve.so
libscve_stub.so
libsensor1.so
libssd.so
libsubsystem_control.so
libthermalclient.so
libthermalioctl.so
libtime_genoff.so
libtzdrmgenprov.so
libtzplayready.so
libwfdcommonutils.so
libwfdhdcpcp.so
libwfdmmsink.so
libwfdmmsrc.so
libwfdmmutils.so
libwfdnative.so
libwfdrtsp.so
libwfdsm.so
libwfduibcinterface.so
libwfduibcsink.so
libwfduibcsinkinterface.so
libwfduibcsrc.so
libwfduibcsrcinterface.so
libwvdrm_L1.so
libxml.so
mediadrm
rfsa
jasons-mbp-5latform-tools mmartinez$ ./adb pull /system/framework/com.verizon.net.jar
120 KB/s (2480 bytes in 0.020s)
jasons-mbp-5latform-tools mmartinez$
jasons-mbp-5latform-tools mmartinez$
jasons-mbp-5latform-tools mmartinez$ ./adb pull /system/framework/com.verizon.net.odex
293 KB/s (5912 bytes in 0.019s)
jasons-mbp-5latform-tools mmartinez$ jar tf com.verizon.net.jar
META-INF/
META-INF/MANIFEST.MF
classes.dex
I'm not a programmer but from what i understand, the bootloader is a separate partition and does not show up in the Android filesystem. If anyone with better skills than mine can explain this better, please feel free.You'd need to have the boot.img file extracted. Look here:
http://k.japko.eu/boot-img-manipulation.html

[Q&A] [HACK] Grow your data partition

Q&A for [HACK] Grow your data partition
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 [HACK] Grow your data partition. 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!
killerskincanoe said:
Directly from Andrew Dodds g+ " IT HAS BEGUN.
The first phase of Find 7a/7s LVM testing is here.* See linked post for details.* (Sorry to disappoint, but the first phase is "make sure we don't break existing configurations")
Once this phase is complete, the remaining list is:
Fix up the remaining TWRP issues (make RECOVERY_SDCARD_ON_DATA runtime instead of compile-time)
Make user-friendly conversion processes
Once things are solid on Find 7, I'll work on Find 5 and N1."
Stay thirsty my friends. Good things ahead
Sent from my A0001 using Tapatalk
Click to expand...
Click to collapse
Any update ?
abuthabet87 said:
Any update ?
Click to expand...
Click to collapse
I'm working on it, got a base for the find5 on the omni gerrit already. Though far from usable
Sent from my One X+
2 questions
Is this Hack [suficient] safe, or should I wait for LVM?
If i do a full backup of my current system (colorOS 1.0.9i Stable) and after the hack, restore the ROM, will my phone be exactly the same than before but with 4GB for apps?
Thanks for the great work
LVM needs ALOT of work right now :/
I'm trying to do this, but after enter in parted [parted /dev/block/mmcblk0] when i try to do "rm 29", i get "can't remove 29: no such file or directory
I'm doing the "on your phone" commands in TWRP command line., is that correct?
I'm running stable colorOS 1.0.9i
Guys, After I exit parted shell, I can't execute mke2fs/tune2fs commands! I get:
/sbin/sh: mke2fs: not found
though I can find them (mke2fs and tune2fs) inside /sbin/ after I cd into it!
How can I solve this ?
Edit:
Solved ... I just rebooted into recovery again.
I did it It works hehehe
Thank you very much for this amazing instructions.
I had some difficulties while executing some of the instructions, but I did some search and tried unplugging then plugging the cable or rebooting into recovery again when the shell was giving me a hard time, and everything is back as it was except now I have 4GB internal storage !!
Does this have to be done while the phone is running ColorOS? I started the procedure on my 16GB phone, running CM11, but didn't get too far.
There is no /sbin. Found tune2fs and mke2fs in /system/bin. No parted there.
From PC over USB, copied parted to Download directory.
On phone, opened a Terminal, then 'su root'.
Remounted /system/bin rw: 'mount -o rw,remount /dev/block/platform/msm_sdcc.1/by-name/system /system'
Copied parted from Download to system/bin.
chmod 755 /system/bin/parted
Most of the umount commands fail.
Started 'parted /dev/block/mmcblk0'
Fails on first 'rm 29' because it is not unmounted.
I gave up there.
Interesting, automated repartioning:
www <dot> youtube <dot> com / watch?v=2CoTIojZGlI
Shame it doesn't have a 4GB option.
@Redfoox (in dev thread), did you push mke2fs and tune2fs at the beginning of the procedure or did you use the ones already included in TWRP?
I got this error?
Code:
/sbin # mke2fs -t ext4 -m 0 -L userdata /dev/block/mmcblk0p20
/sbin/sh: mke2fs: not found
The command also does not work in TWRP!
Anyone any idea what I should do now?
---------- Post added at 02:40 PM ---------- Previous post was at 02:36 PM ----------
Vashiru said:
@Redfoox (in dev thread), did you push mke2fs and tune2fs at the beginning of the procedure or did you use the ones already included in TWRP?
Click to expand...
Click to collapse
I did push the mke2fs and tune2fs at the beginning. Probably shouldn't have done that?
I have to wait each post for 4 minutes to post a new one
I've tried doing that during my second attempt, but got stuck at exactly the same point.
The fact that it shows mke2fs: not found tells me that you have both pushed it and CHModded it.
Push the files again, this time don't CHMod them and try it from the TWRP Terminal Emulator (from ADB shell just gives you permission denied but I didn't try it from TWRP that time).
If that doesn't work try CHModding them from TWRP. If that also doesn't work I'm out of a clue. All you could do at that point is use the last resort method (saved my device 2 times) and try the procedure again without pushing the files first.
Tried it and it gives the same errors. Cannot even chmod it through the terminal emulator.
I will go for the last resort method than
Too bad. Alright, feel free to ask questions if you run into trouble when you try again.
It worked i have 4GB now!
The only thing now is that my wifi does not work and I did do the following:
Code:
# Restore /persist partition
mount -t ext4 /dev/block/mmcblk0p29 /sdcard
# On computer
adb push mmcblk0p21_persist_ext4.img /sdcard/
# On phone
dd if=mmcblk0p21_persist_ext4.img of=/dev/block/mmcblk0p21
output of terminal:
Code:
/sdcard # dd if=mmcblk0p21_persist_ext4.img of=/dev/block/mmcblk0p21
16384+0 records in
16384+0 records out
8388608 bytes (8.0MB) copied, 3.260498 seconds, 2.5MB/s
Any idea how to restore this? I even redid this step without succes.
---------- Post added at 07:21 PM ---------- Previous post was at 06:27 PM ----------
Got it working now. I had tot install modem 4.2.
Nice, enjoy the 4 GB!
Please help guys this is turning out to be a really frustrating experience...T___T
How are you guys even pulling this off... T___T
My adb works when the phone is booted but after "adb reboot recovery" and once in TWRP it cant see the device... and hence i cant proceed with the commands in Adb shell when the phone is connected and in twrp. i am running Liquidsmooth rom but i went back to the original rom to try this.
I'm able to execute
" chmod 755 /sbin/parted /sbin/mke2fs /sbin/tune2fs
umount /cache
umount /sdcard"
But not these ...
"umount /emmc
umount /data"
It says file or Directory not found.
then when i enter parted with the next command "parted /dev/block/mmcblk0"
I enter into parted, but cant see any of the following
"# rm sdcard
rm 29
# 28 thru 23 are reserved
rm 28
rm 27
rm 26
rm 25
# rm recovery
rm 24
# rm misc
rm 23
# rm cache
rm 22
# rm persist
rm 21
# rm data/emmc
rm 20
# now, re-create partitions but data is bigger
mkpart primary 1325 5421
name 20 userdata
mkpart primary 5421 5430
name 21 persist
mkpart primary 5430 5967
name 22 cache
mkpart primary 5967 5968
name 23 misc
mkpart primary 5968 5979
name 24 recovery
mkpart primary 5979 6012
name 25 reserve1
mkpart primary 6012 6019
name 26 reserve2
mkpart primary 6019 6028
name 27 reserve3
mkpart primary 6028 6062
name 28 reserve4
mkpart primary 6062MB 100%
name 29 sdcard
# exit parted shell
q"
Now i'm totally clueless on how to proceed further... Would appreciate if you guys can shed a bit more clarity... This is really turning out to be a frustrating experience. Please guys...
Going back to Liquidsmooth to use my phone ... will again reinstall original os tomorrow and try again. :crying:
OK, so I got TWRP running sweet and now following the improved descriptions in main thread post #34.
Got stuck here, all before has been ok:
mke2fs -t ext4 -m 0 -L persist /dev/block/mmcblk0p21
Message back is:
Could not stat /dev/block/mmcblk0p21 --- no such file or directory
The device apparently does not exist; did you specify it correctly?
Now what?
EDIT - think I have it sorted. I didn't scroll down enough in the post #34 windows and missed some 'parted' commands!
EDIT - 'adb shell' had quit, and it wouldn't connect again. Tried to reboot TWRP to recovery, but it didn't recover, now stuck at Oppo text logo, can't connect by adb, doesn't respond to power button. Bricked.
EDIT - was able to access the phone by fastboot only, not adb. Flashed TWRP recovery again, it rebooted and took quite a while, now it is stuck at the cyanogenmod 12 boot up spinning arrow for 10+ minutes, maybe it will recover eventually. If not, I'll try to reflash CM12 too.
Hello
Today was the third try to get this thing working ^^
But somehow i cant get past the first command.
Every time i try to unmount things like /cache or /dev umount only returns "invalid argument.
I never pushed the files from the zip. TWRP 2.8.3.0 is used.
I tried to attach a screenshot to help, but im too new to do that -.-
Thanks in advance

[Z00T] Possible corrupted /firmware file(s)

Hi,
A little while back, my Z00T stopped booting (would bootloop shortly after the splash screen). Even with stock.
Looks like logcat line 187 is kicking my butt.
I can get in TWRP with no issue, so I have been tracking down the problem from there, and now suspect a corrupt /firmware partition (or a few files within).
Can a Z00T owner with the MM bootloader (preferably June 2nd 2016 update, can verify with first command below), go into TWRP, mount the firmware partition (under Mounts) and run the following two commands?:
Code:
~ # ls -l /firmware/image/keymaste.*
__bionic_open_tzdata: couldn't find any tzdata when looking for localtime!
__bionic_open_tzdata: couldn't find any tzdata when looking for GMT!
__bionic_open_tzdata: couldn't find any tzdata when looking for posixrules!
-rwxrwxrwx 1 root root 180 Jun 2 2016 /firmware/image/keymaste.b00
-rwxrwxrwx 1 root root 6568 Jun 2 2016 /firmware/image/keymaste.b01
-rwxrwxrwx 1 root root 126672 Jun 2 2016 /firmware/image/keymaste.b02
-rwxrwxrwx 1 root root 8132 Jun 2 2016 /firmware/image/keymaste.b03
-rwxrwxrwx 1 root root 6748 Jun 2 2016 /firmware/image/keymaste.mdt
~ # md5sum /firmware/image/keymaste.*
ccaf75b641f15b9b8b33cefc836f29e0 /firmware/image/keymaste.b00
0a446b039708f600cebf1cba89865cd8 /firmware/image/keymaste.b01
8749be39e11338cf5a7998b57da4549c /firmware/image/keymaste.b02
f10be3e59e81f92243166b5e92fb4e47 /firmware/image/keymaste.b03
af9f26f61a4f12b82e99f028867174ea /firmware/image/keymaste.mdt
~ #
Please paste your results in a reply with the CODE tags for comparison (feel free to give me a mention or have a partial QUOTE in your reply).
Bonus points for (if you have the right date but a different hash)...
I will probably need a new firmware partition, and hope my internal SD is not dying.
If noone knows where I can find an official one, you can make one by first verifying the partition number (should be 41):
Code:
adb shell cat /proc/mounts | grep firmware
Then make an image copy to file with dd* to the external sd (using partition 41), download to PC:
Code:
adb shell dd if=/dev/block/mmcblk0p41 of=/sdcard1/firmware.img
adb pull /sdcard1/firmware.img
* Issue the command verbatim, or don't issue at all if not familiar with dd. If used incorrectly, dd can do some serious damage. Been there, done that, always check your work.
This will help me out in continuing to use this device for development purposes.
ZD551KL Selfi / Z00T. ROM CM13 for Z00T
Code:
C:\adb>adb shell ls -l /firmware/image/keymaste.*
-r--r--r-- root root 180 2016-08-05 04:59 keymaste
-r--r--r-- root root 6568 2016-08-05 04:59 keymaste
-r--r--r-- root root 126672 2016-08-05 04:59 keymaste
-r--r--r-- root root 8132 2016-08-05 04:59 keymaste
-r--r--r-- root root 6748 2016-08-05 04:59 keymaste
C:\adb>adb shell md5sum /firmware/image/keymaste.*
ccaf75b641f15b9b8b33cefc836f29e0 /firmware/image/keymaste.b00
0a446b039708f600cebf1cba89865cd8 /firmware/image/keymaste.b01
8749be39e11338cf5a7998b57da4549c /firmware/image/keymaste.b02
f10be3e59e81f92243166b5e92fb4e47 /firmware/image/keymaste.b03
af9f26f61a4f12b82e99f028867174ea /firmware/image/keymaste.mdt
Well then...that blows that out of the water - the hashes match even with a different model num and OTA date.
Unless the partition is only readable under certain circumstances (system boot not being one of them but TWRP seems more forgiving), then I will need a replacement ZE551KL firmware.img. If it is still something else, I will then be unsure how to proceed since this is a problem across multiple boot.img's so it's not a kernel or ramdisk issue yet still prevents /vendor from getting set up before /vendor symlinks to /system/vendor.
Here is md5sum of my z00t ze601kl
Code:
ccaf75b641f15b9b8b33cefc836f29e0 /firmware/image/keymaste.b00
0a446b039708f600cebf1cba89865cd8 /firmware/image/keymaste.b01
8749be39e11338cf5a7998b57da4549c /firmware/image/keymaste.b02
f10be3e59e81f92243166b5e92fb4e47 /firmware/image/keymaste.b03
af9f26f61a4f12b82e99f028867174ea /firmware/image/keymaste.mdt
Code:
-r--r--r-- system system 180 2016-08-03 00:38 keymaste.b00
-r--r--r-- system system 6568 2016-08-03 00:38 keymaste.b01
-r--r--r-- system system 126672 2016-08-03 00:38 keymaste.b02
-r--r--r-- system system 8132 2016-08-03 00:38 keymaste.b03
-r--r--r-- system system 6748 2016-08-03 00:38 keymaste.mdt

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.

Categories

Resources