[RECOVERY] [WIP] CWM Recovery - G Pad 8.3 General

Just thought I'd create a place to pool our knowledge and try to get a custom recovery going.
So far I've been able to piece together the partition table using an app from the Play Store. I don't know if it's accurate or not since I'm new at this, so if someone else knows that something is wrong please let me know.
BLOCK- MOUNT- DEVICE NO- LABEL- FILESYSTEM- SIZE (MB)
MMCBLK0 179/0 15028
MMCBLK0P1 /FIRMWARE 179/1 MODEM VFAT 13.5 / 64.0
MMCBLK0P2 179/2 SBL1 0.5
MMCBLK0P3 179/3 SBL2 0.5
MMCBLK0P4 179/4 SBL3 2
MMCBLK0P5 179/5 ABOOT 0.5
MMCBLK0P6 179/6 RPM 0.5
MMCBLK0P7 179/7 BOOT 24
MMCBLK0P8 179/8 TZ 0.5
MMCBLK0P9 179/9 PAD 0
MMCBLK0P10 179/10 MODEMST1 3
MMCBLK0P11 179/11 MODEMST2 3
MMCBLK0P12 179/12 M9KEFS1 0.8
MMCBLK0P13 179/13 M9KEFS2 0.8
MMCBLK0P14 179/14 M9KEFS3 0.8
MMCBLK0P15 /PERSIST-LG 179/15 DRM EXT4 4.3 / 7.9
MMCBLK0P16 /SNS 179/16 SNS EXT4 4.1 / 7.9
MMCBLK0P17 179/17 SSD 0
MMCBLK0P18 179/18 MISC 16
MMCBLK0P19 /FACTORY 179/19 FACTORY EXT4 4.1 / 15.8
MMCBLK0P20 179/20 BNR EXT4 8
MMCBLK0P21 179/21 ENCRYPT 0.5
MMCBLK0P22 179/22 EKSST 0.5
MMCBLK0P23 /SYSTEM 179/23 SYSTEM EXT4 1853.8 / 2113.8
MMCBLK0P24 /CACHE 179/24 CACHE EXT4 14.4 / 788.4
MMCBLK0P25 /PERSIST 179/25 PERSIST EXT4 4.1 / 7.9
MMCBLK0P26 179/26 TOMBSTONES 256
MMCBLK0P27 179/27 RECOVERY 24
MMCBLK0P28 179/28 FSG 3
MMCBLK0P29 179/29 DDR 0
MMCBLK0P30 179/30 FOTA 32
MMCBLK0P31 /MPT 179/31 MPT EXT4 11.5 / 31.5
MMCBLK0P32 259/0 TZBAK 0.5
MMCBLK0P33 259/1 RPMBAK 0.5
MMCBLK0P34 259/2 RCT 0
MMCBLK0P35 259/3 RESERVED 16
MMCBLK0P36 /DATA 259/4 USERDATA EXT4 2260.3 / 11304.5
MMCBLK0P37 259/5 GROW 4
/DEV/FUSE /STORAGE/EMULATED/LEGACY NA/NA EMULATED STORAGE AT /DATA/MEDIA ? FUSE 2260.3 / 11304.5
/DEV/FUSE /STORAGE/EMULATED/0 NA/NA EMULATED STORAGE AT /DATA/MEDIA ? FUSE 2260.3 / 11304.5
/DEV/FUSE /STORAGE/EMULATED/0/ANDROID/OBB NA/NA EMULATED STORAGE AT /DATA/MEDIA ? FUSE 2260.3 / 11304.5
/DEV/FUSE /STORAGE/EMULATED/LEGACY NA/NA EMULATED STORAGE AT /DATA/MEDIA ? FUSE 2260.3 / 11304.5
/DEV/FUSE /STORAGE/EMULATED/LEGACY/ANDROID/OBB NA/NA EMULATED STORAGE AT /DATA/MEDIA ? FUSE 2260.3 / 11304.5
The last bit there is a bit of a head scratcher to me.
I've also extracted the recovery.img from the mmcblk0p27.
https://www.dropbox.com/s/4u9v9dqfzrj5100/recovery.img

Thanks for your effort man, i wouldn't know where to begin with something like this.

Endlessillusion said:
Thanks for your effort man, i wouldn't know where to begin with something like this.
Click to expand...
Click to collapse
Trust me, I didn't either. Just taking it one step at a time. We've got a way to restore to stock, so it's relatively safe if you're patient and don't rush.

mustbepbs said:
Trust me, I didn't either. Just taking it one step at a time. We've got a way to restore to stock, so it's relatively safe if you're patient and don't rush.
Click to expand...
Click to collapse
I don't have my pad yet shipment was delayed until tomorrow. I am going to wait around, will take it nice and slow just happy to see some progress.

This is the working recovery?, you can get root access?

hello e thanks @mustbepbs
can you use this site to create a recovery cwm? builder(dot)clockworkmod(dot)com <--upload recovery image & build the recovery.. we can try to obtain the recovery without attend the job of "team CWM"
edit:
I apologize, I missed the link reading the first post..I saw now.
I now see what we get by loading the recovery image on the site.

Palux said:
hello e thanks @mustbepbs
can you use this site to create a recovery cwm? builder(dot)clockworkmod(dot)com <--upload recovery image & build the recovery.. we can try to obtain the recovery without attend the job of "team CWM"
edit:
I apologize, I missed the link reading the first post..I saw now.
I now see what we get by loading the recovery image on the site.
Click to expand...
Click to collapse
Yeah it doesn't work. A lot of builds are failing on there so I don't know if it's the IMG or their build server.
I synced the CM10.2 repo last night so I'm gonna get started on trying to build from scratch today. Can't make any promises.

Okay, so I got CWM to build and I think I've gotten it right. Basically at this point I've got an update.zip for future reference and a recovery.img from the build. I've got to work in LOKI and see what happens.

Okay, so I patched LOKI and flashed it successfully.
When I adb reboot recovery, I get:
https://www.dropbox.com/s/591cd1a349nqfq0/bootingimage.jpg
It just boots normally after that. I suppose it's progress.

yeah ... thanks for the tests and the work you're doing :highfive:

It remains to unlock the tablet?

Not really sure what went wrong.
CWM built, so I think if there was a problem it wouldn't have built. Loki patched and flashed successfully because of that error message I got.
If something flashed to the wrong place, I wouldn't think I'd be able to boot like I can.
I guess I don't fully understand LOKI. Trying to do as much digging around as I can.

mustbepbs said:
Not really sure what went wrong.
CWM built, so I think if there was a problem it wouldn't have built. Loki patched and flashed successfully because of that error message I got.
If something flashed to the wrong place, I wouldn't think I'd be able to boot like I can.
I guess I don't fully understand LOKI. Trying to do as much digging around as I can.
Click to expand...
Click to collapse
Hi,
It seems we have got the same error. Being new to compiling android i can't be sure my initial configuration (recovery.fstab BoardConfig.mk) were correct. The problem could also be that LG has changed its bootloader and Loki doesn't work anymore as i haven't seen anybody having succesfully tested it on the G Pad.

obiwan86300 said:
Hi,
It seems we have got the same error. Being new to compiling android i can't be sure my initial configuration (recovery.fstab BoardConfig.mk) were correct. The problem could also be that LG has changed its bootloader and Loki doesn't work anymore as i haven't seen anybody having succesfully tested it on the G Pad.
Click to expand...
Click to collapse
From what I've read, getting that error means that LOKI is working. I pulled the recovery.fstab from the stock img so I know that's correct. I may have mucked up a few things in the BoardConfig.mk, I fixed them but was so tired last night that I couldn't focus. Gonna try again today and tomorrow.

has anyone tried this http://www.xda-developers.com/android/compile-twrp-for-your-device/

I haven't tried TWRP yet.

mustbepbs said:
I haven't tried TWRP yet.
Click to expand...
Click to collapse
I don;t know much about development but it looks like they made it easier?

joshuadjohnson22 said:
I don;t know much about development but it looks like they made it easier?
Click to expand...
Click to collapse
I'll take a look if my revised CWM build doesn't work.

Hi, how's it going?. Recently brought a tablet, I would like to recovery

well we should have something soon
just need some time to test

Related

[WIP][Testing]Possible Ubuntu On our Tab Native (Not Phone ver)

To: Admin/Mods
Even Though I did not Develop this I chose not to Put it in DEV section due to that fact... However if it is DEV section Worthy I will Gladly Mantain it. If it is DEV section worthy Please Feel Free to Move it there Thank You.
-----------------------------------------------------------------------------
Prelude
Hi Fellow XDAers I had decided to start Start a Project to Adapt The Ubuntu Nexus 7 Installer For The Tab 2 10.1" and 7" but seeing as the tab does not support fastboot the installer and possibly the OS image would have to be recoded so i decide to post pone the conversion of the installer program and Research if there was a more "Manual" Method...
-----------------------------------------------------------------------------
Now:
After Researching I came across a section on the Ubuntu Site Label as ARM/OMAP Server Pre-installed-Build Images For ARM and OMAP CPU's.
Supported OMAP CPU's were as follows
OMAP 3 - Server / Desktop (Limited SGX Drivers) Image
OMAP 4 - Server / Desktop Images :victory:
Now the issue is Not Sure If Your Device recovery will be lost.. if a total device format and or repartion is needed or what Simple because the site states:
With the Ubuntu 12.10, ARM desktop images are now standard Ubuntu live images as known from other architectures. To install these images you should have a USB disk as target device.
dd omap4 image on to sd-card
plugin sd-card & usb-stick
boot & install on to usb-stick
-----------------------------------
Writing the image
You should write the raw image to a blank SD card. Make sure you're using at least a 4G SD card (desktop image is 2G uncompressed).
Linux
Steps:
Place the SD card at your host computer.
Make sure the SD card is not mounted (just umount it if needed)
Identify the correct raw device name (like /dev/sde - not /dev/sde1)
Run the following command to write it:
--(Removed Until I fully test it)--
(replacing omap4 and sde with the right values i.e. just omap for a beagle image.)
-----------------------------------------------------------------------------
Second Instructions were for server based install but may easier for our device:
Copy the image to SD card
You should write the raw image to a blank SD card. Make sure you're using at least a 2 Gig SD card so that you have enough room for the image.
Steps:
Insert the SD card in your host computer's SD card reader.
Make sure the SD card is not mounted (just umount it if needed).
Identify the correct device name (like /dev/mmcblk0 or /dev/sdb).
Run the following command to write it:
---------------------------------------------------------------------------
Like I said I dont know where the block is that has the recovery in it or the download mode as if this will overwrite it not sure if we can revert it back to android so atm the project no is at a stand still if anyone has info on the block mapping and where recovery and download mode is it would help greatly.
UPDATE: because i am not as familiar with the android/device block and file structure aside from whats visible i will post all the links i have at my current disposal hopefully someone can make heads or tails of it and get us ubuntu native
Link 1: "Graphics" https://wiki.ubuntu.com/ARM/OMAP/Graphics
Link 2: "Desktop Install" https://wiki.ubuntu.com/ARM/OmapDesktopInstall
Link 3: "Server Install" https://wiki.ubuntu.com/ARM/Server/Install?action=show&redirect=ARM%2FOMAPHeadlessInstall
I suggest reading info in all 3 links as there is some key info in all three
samsung recovery fstab, if was that what you were looking for
# mount point fstype device device2
/system ext4 /dev/block/platform/omap/omap_hsmmc.1/by-name/FACTORYFS
/cache ext4 /dev/block/platform/omap/omap_hsmmc.1/by-name/CACHE
/data ext4 /dev/block/platform/omap/omap_hsmmc.1/by-name/DATAFS length=-16384
/efs ext4 /dev/block/platform/omap/omap_hsmmc.1/by-name/EFS
/misc emmc misc
/boot emmc /dev/block/platform/omap/omap_hsmmc.1/by-name/KERNEL
/recovery emmc /dev/block/platform/omap/omap_hsmmc.1/by-name/RECOVERY
/bootloader emmc /dev/block/platform/omap/omap_hsmmc.1/by-name/SBL1
/preload ext4 /dev/block/platform/omap/omap_hsmmc.1/by-name/HIDDEN
/sdcard vfat /dev/block/mmcblk1p1 /dev/block/mmcblk1
ps: I tryied too these images on my 5110, but it didn't boot (i dont know if the images FS was different from Android)
---------- Post added at 03:11 PM ---------- Previous post was at 03:00 PM ----------
I tried these by extracting the images for OMAP4, and
making a boot.img with kernel+ramdisk
making a system.img with the rootfs
flashed them and no booting (doesn't work ???) the bootloader left a blackscreen without executing the kernel
(maybe the image format is not supported and I had to use the android one)
http://forum.xda-developers.com/showthread.php?t=2691477
Hi, I would be interested in the developing of a ubuntu/other_linux versions for the galaxy-tab2
<*spoiler*>
Like I said I dont know where the block is that has the recovery in it or the download mode as if this will overwrite it not sure if we can revert it back to android so atm the project no is at a stand still if anyone has info on the block mapping and where recovery and download mode is it would help greatly.
<*/spoiler*>
On my Italian gt-p5110 I use heimdall to flash directly the images ( recovery.img, boot.img, factory.img data ..etc) w/o the necessity to make a zip, everything is redoable and restore it to android is very easy unless you brick the 2 bootloaders, (only boot and system.img), I don't know about your american models
2. I have the mappings
major minor #blocks name
(emmc)
179 0 15388672 mmcblk0
179 1 20480 mmcblk0p1
179 2 2048 mmcblk0p2
179 3 2048 mmcblk0p3
179 4 8192 mmcblk0p4
179 5 8192 mmcblk0p5
179 6 8192 mmcblk0p6
179 7 716800 mmcblk0p7
259 0 20480 mmcblk0p8
259 1 1433600 mmcblk0p9
259 2 12640239 mmcblk0p10
259 3 524288 mmcblk0p11
179 16 2048 mmcblk0boot1
179 8 2048 mmcblk0boot0
(sd)
179 24 31166976 mmcblk1
179 25 31165440 mmcblk1p1

Corrupt Cache Partition - help needed

Hello,
my setup:
- CM 11 unofficial Build3 by vertigo running with ART and the whatsapp fix ( http://forum.xda-developers.com/showthread.php?t=2498084 )
- latest banks gapps
- latest TWRP (2.6.3.2)
What I wanted to do
I simply wanted to install the new official CM11 nightly, booted into TWRP, installed the rom and the gapps without wiping, which shouldnt be a problem - i didn't revert to dalvik for this, if that makes any difference.
I suspect there was an error while downloading the new nightly rom, it gave me an error msg while updating. (ill use MD5 from now on...)
So i just reflashed the build3 from vertigo with the gapps - but now i have the problem that the phone doesnt boot.
It shows the LG Logo unusually long and then shows the CM Boot Logo forever.
Whats the situation now:
i can mount every partition, except cache - wiping also fails obviously
i can enter TWRP and flash stuff
i have made a backup before my update attempt
i also have every file needed for a clean flash on my sdcard
What I tried already:
Wiping everything but the internal sdcard - clean install - still wont boot
restoring the backup works aswell, but still doesnt boot
help gladly appreciated, i think i only need to fix my cache partition and then restore everything and it should work again...
nfin1te said:
Hello,
my setup:
- CM 11 unofficial Build3 by vertigo running with ART and the whatsapp fix ( http://forum.xda-developers.com/showthread.php?t=2498084 )
- latest banks gapps
- latest TWRP (2.6.3.2)
What I wanted to do
I simply wanted to install the new official CM11 nightly, booted into TWRP, installed the rom and the gapps without wiping, which shouldnt be a problem - i didn't revert to dalvik for this, if that makes any difference.
I suspect there was an error while downloading the new nightly rom, it gave me an error msg while updating. (ill use MD5 from now on...)
So i just reflashed the build3 from vertigo with the gapps - but now i have the problem that the phone doesnt boot.
It shows the LG Logo unusually long and then shows the CM Boot Logo forever.
Whats the situation now:
i can mount every partition, except cache - wiping also fails obviously
i can enter TWRP and flash stuff
i have made a backup before my update attempt
i also have every file needed for a clean flash on my sdcard
What I tried already:
Wiping everything but the internal sdcard - clean install - still wont boot
restoring the backup works aswell, but still doesnt boot
help gladly appreciated, i think i only need to fix my cache partition and then restore everything and it should work again...
Click to expand...
Click to collapse
Can you clear it the slow way? Untick -rm rf option in settings, then clear cache. The partition itself shouldn't have been changed by installing a ROM, it must be some kind of problematic content.
Incep said:
Can you clear it the slow way? Untick -rm rf option in settings, then clear cache. The partition itself shouldn't have been changed by installing a ROM, it must be some kind of problematic content.
Click to expand...
Click to collapse
Nope, as I can't mount it, none of those 2 ways is possible.
Just says
At the beginning:
updating partition details
then:
E:unable to mount /cache
several times,
and somwhere inbetween
Running boot script...
and
Finished running boot script
nfin1te said:
Nope, as I can't mount it, none of those 2 ways is possible.
Just says
At the beginning:
updating partition details
then:
E:unable to mount /cache
several times,
and somwhere inbetween
Running boot script...
and
Finished running boot script
Click to expand...
Click to collapse
I didn't think it needed to be mounted in order to be cleared the normal way.
It sounds like it must be repartitioned, or fixed with some kind of disk scan before it can be normally mounted. Maybe there is a way to ssh into the phone and run fsck on the disk?
(ssh is a remote shell for unix, fsck is the linux "scan disk" tool for recovering errors, you can connect to your phone if it has an ssh server running by downloading Putty for windows or through the terminal on mac)
I'm not an expert on android partitions, so maybe someone else want to chime in on this.
Incep said:
It sounds like it must be repartitioned, or fixed with some kind of disk scan before it can be normally mounted. Maybe there is a way to ssh into the phone and run fsck on the disk?
(ssh is a remote shell for unix, fsck is the linux "scan disk" tool for recovering errors, you can connect to your phone if it has an ssh server running by downloading Putty for windows or through the terminal on mac)
Click to expand...
Click to collapse
I'm more than willing to try, but i'd need some sort of instructions, i have no experience with this.
thanks!
What i want to avoid, if somehow possible, is to reflash a stock rom, reroot and reinstall TWRP and go thru the whole procedure again.
nfin1te said:
I'm more than willing to try, but i'd need some sort of instructions, i have no experience with this.
thanks!
What i want to avoid, if somehow possible, is to reflash a stock rom, reroot and reinstall TWRP and go thru the whole procedure again.
Click to expand...
Click to collapse
I'm not sure if my method works, but atleast you have a running adb server on your phone when in TWRP, which is the android debugging protocol. It has a lot of tools, some which might be useful. You should google a bit around on the subject.
Incep said:
I'm not sure if my method works, but atleast you have a running adb server on your phone when in TWRP, which is the android debugging protocol. It has a lot of tools, some which might be useful. You should google a bit around on the subject.
Click to expand...
Click to collapse
Yeah, thats what im doing atm... but i didn't have success finding someone with a similar problem so far.
All i ever have done in ADB is enable/disable fastboot on my old nexus and sideload some images.
nfin1te said:
Yeah, thats what im doing atm... but i didn't have success finding someone with a similar problem so far.
All i ever have done in ADB is enable/disable fastboot on my old nexus and sideload some images.
Click to expand...
Click to collapse
Me too, I'm not really an android developer, just worked a lot with Linux earlier, and it's conceptually the same thing! Hopefully I pointed you in the right direction.
ok i entered adb shell alrdy, but when i try to use the parted command, it says
~ # parted /dev/block/mmcblk0
/sbin/sh: parted: not found
~ #
Edit:
Apparently, i need to push parted first.
Im currently trying this: http://www.droidforums.net/forum/htc-droid-eris/78650-internal-storage-partitions-screwed-up.html
nfin1te said:
ok i entered adb shell alrdy, but when i try to use the parted command, it says
~ # parted /dev/block/mmcblk0
/sbin/sh: parted: not found
~ #
Click to expand...
Click to collapse
Maybe you don't have parted installed on your phone. Each command is actually it's own program, which lies in a folder which is either /bin for normal apps, and /sbin for system-changing apps. So probably check /sbin if there is a binary file called 'parted' there. But be careful of this program… It can be very destructive.
Incep said:
Maybe you don't have parted installed on your phone. Each command is actually it's own program, which lies in a folder which is either /bin for normal apps, and /sbin for system-changing apps. So probably check /sbin if there is a binary file called 'parted' there. But be careful of this program… It can be very destructive.
Click to expand...
Click to collapse
Yeah thx, i just managed to push the necessary files.
Ok, now im looking at this partition table:
(parted) 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 cache
32 3959MB 4043MB 83.9MB tombstones
33 4043MB 4060MB 16.8MB spare
34 4060MB 4110MB 50.3MB ext4 cust
35 4110MB 31.2GB 27.1GB ext4 userdata
36 31.2GB 31.3GB 62.9MB grow
(parted)
I assume, the problem is, that cache seems screwed as it doesn't show any filesystem right?
So if i make this partition ext4, it should work again?
If i check pt31/cache, it says:
(parted) check 31
check 31
Error: Could not detect file system.
(parted)
So, im assuming, im right.
lol, man this is frustrating
(parted) mkfs ext4
mkfs ext4
Warning: The existing file system will be destroyed and all data on the
partition will be lost. Do you want to continue?
parted: invalid token: ext4
Yes/No? yes
yes
Partition number? 31
31
File system type? [ext2]? ext4
ext4
No Implementation: Support for creating ext4 file systems is not implemented
yet.
(parted)
It's alive again!
ext2 worked aswell, as i/we thought - the problem was the cache partition got f'ed up. Making a new FS using parted solved the problem.
THANKS bro for pointing me in the right direction.
Edit: restored backup and everythings fine again
I have the same issue , i am running on ubuntu i but i dont quite get the instrations ?
emrexcem said:
I have the same issue , i am running on ubuntu i but i dont quite get the instrations ?
Click to expand...
Click to collapse
Hi mate i had the same problem and after a long struggling i got this working again.
-Use a Windows computer and install the SDK tools
-Check OP's link to find the "parted" file
-Connect phone in recovery
-Open cmd in windows and type adb shell, you'll get a new console with a #
-Push your parted file to /sbin using adb push command:
In my case i had the parted file in E: drive so i used adb push E:\parted /sbin/parted
-If you try to execute parted you'll get a "permission denied" error, so after pushing the file you need to fix the permissions so type "chmod 777 /sbin/parted"
-Execute parted and just follow OP's steps and you'll be fine.
Hope it helps
Don't use parted to create a filesystem
nfin1te said:
It's alive again!
ext2 worked aswell, as i/we thought - the problem was the cache partition got f'ed up. Making a new FS using parted solved the problem.
THANKS bro for pointing me in the right direction.
Edit: restored backup and everythings fine again
Click to expand...
Click to collapse
You saved my but but as far as I know it is not recomended to use parted to create a filesystem.
Use
mke2fs -T ext4 [partition]
instead
nfin1te said:
It's alive again!
ext2 worked aswell, as i/we thought - the problem was the cache partition got f'ed up. Making a new FS using parted solved the problem.
THANKS bro for pointing me in the right direction.
Edit: restored backup and everythings fine again
Click to expand...
Click to collapse
Can you please provide more detailed instruction please, i have apparently the same problem, i not familiar with adb, i have now pushed all necessary parts to phone what should i do now.
I am stuck please please help.
pingwinpower said:
You saved my but but as far as I know it is not recomended to use parted to create a filesystem.
Use
mke2fs -T ext4 [partition]
instead
Click to expand...
Click to collapse
Can you please provide more detailed instruction please, i have apparently the same problem, i not familiar with adb, i have now pushed all necessary parts to phone what should i do now.
I am stuck please please help.
redkib said:
Can you please provide more detailed instruction please, i have apparently the same problem, i not familiar with adb, i have now pushed all necessary parts to phone what should i do now.
I am stuck please please help.
Click to expand...
Click to collapse
I cant really provide any more information than this, please be more specific with your problem.
Since apparently you have pushed all the files via adb already, you just need to use the "mkfs" command to create a news filesystem, just be sure to select the right partition number (the corrupted one). You can find the correct command via google or take a look at my post
(parted) mkfs ext2
Warning: The existing file system will be destroyed and all data on the
partition will be lost. Do you want to continue?
Yes/No? yes
yes
Partition number? 31
31
File system type? [ext2]?
ext2
(parted)
Click to expand...
Click to collapse

How can I Create a byte-for-byte image of my Internal Memory (from Recovery or ADB)

I am looking for a way to create a perfect, byte for byte, image of my internal memory so that I can recover data from the image in a safer way and from a copy where I cant destroy the original. I am really just looking to recover files I had under the /sdcard (USERDATA mount) however, since my partitions are messed up, I want to broaden the scope and capture everything. Can anyone point me in the right direction?
Help is greatly appreciated.
re: byte for byte
waypoint.delta said:
I am looking for a way to create a perfect, byte for byte, image of my internal memory so that I can recover data from the image in a safer way and from a copy where I cant destroy the original. I am really just looking to recover files I had under the /sdcard (USERDATA mount) however, since my partitions are messed up, I want to broaden the scope and capture everything. Can anyone point me in the right direction?
Help is greatly appreciated.
Click to expand...
Click to collapse
You would need to develop or find a developer who knows
how to create a very specific & special application to do that.
At the present time there is no applications that can do it.
You would be way better off to simply copy whatever good
files are in your internal memory to your computer because
any other way would result in many unusable files since
you said that the partition is all messed up.
By creating a byte for byte image of your internal memory
you would simply end up with a lot of unusable files since
your partitions are messed up.
Good luck, have a great day!
Thanks for the response Mr Junky. I can tell you I am fairly determined, short of hopping the NSA fence and demanding justice. Anyways, The partitions only matter so much since they do not define the files, the 1's and 0's do. There's tons of recovery software already, so no need to go that far, just need to get the data off my phone so it can be analysed. Square one is I grabbing a quality snapshot of the Internal Memory and putting it on my PC. At that point I can rebuild my phone without concern.
Misterjunky said:
. . .
Click to expand...
Click to collapse
Does anyone know if the partition/sector offsets ever change, or are they static? I ask because I ran "Repair or Change File System" on /data which shares a mount with /sdcard (i think). If they are static, it wont matter that the partition table was rebuilt, the lost data should still reside there. I can simply use DD to capture /dev/block/sda18 to a file. As a side note, I'm really glad i had busybox installed.
Code:
~ # ←[6n[COLOR="DarkGreen"][B]busybox fdisk -l /dev/block/sda[/B][/COLOR]
Note: sector size is 4096 (not 512)
Found valid GPT with protective MBR; using GPT
Disk /dev/block/sda: 62464000 sectors, 2336M
Logical sector size: 4096
Disk identifier (GUID): 52444e41-494f-2044-4d4d-43204449534b
Partition table holds up to 128 entries
First usable sector is 6, last usable sector is 7807994
Number Start (sector) End (sector) Size Code Name
1 1024 2047 4096K 0700 BOTA0
2 2048 3071 4096K 0700 BOTA1
3 3072 8191 20.0M 0700 EFS
4 8192 10239 8192K 0700 PARAM
5 10240 20479 40.0M 0700 BOOT
6 20480 32255 46.0M 0700 RECOVERY
7 32256 34303 8192K 0700 OTA
8 34304 45055 42.0M 0700 RADIO
9 45056 45311 1024K 0700 TOMBSTONES
10 45312 45567 1024K 0700 DNT
11 45568 45759 768K 0700 PERSISTENT
12 45760 45823 256K 0700 STEADY
13 45824 48127 9216K 0700 PERSDATA
14 48128 1148927 4300M 0700 SYSTEM
15 1148928 1200127 200M 0700 CACHE
16 1200128 1238527 150M 0700 HIDDEN
17 1238528 1239807 5120K 0700 CP_DEBUG
[COLOR="Red"][B] 18 1239808 7806719 25.0G 0700 USERDATA[/B][/COLOR]
~ # ←[6n
C:\adb>
C:\adb>adb shell
/dev/block/platform/155a0000.ufs/by-name # ?[6n[COLOR="darkgreen"][B]ls -l[/B][/COLOR]
__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!
lrwxrwxrwx 1 root root 15 Jan 2 12:45 BOOT -> /dev/block/sda5
lrwxrwxrwx 1 root root 15 Jan 2 12:45 BOTA0 -> /dev/block/sda1
lrwxrwxrwx 1 root root 15 Jan 2 12:45 BOTA1 -> /dev/block/sda2
lrwxrwxrwx 1 root root 16 Jan 2 12:45 CACHE -> /dev/block/sda15
lrwxrwxrwx 1 root root 15 Jan 2 12:45 CPEFS -> /dev/block/sdd1
lrwxrwxrwx 1 root root 16 Jan 2 12:45 CP_DEBUG -> /dev/block/sda17
lrwxrwxrwx 1 root root 16 Jan 2 12:45 DNT -> /dev/block/sda10
lrwxrwxrwx 1 root root 15 Jan 2 12:45 EFS -> /dev/block/sda3
lrwxrwxrwx 1 root root 16 Jan 2 12:45 HIDDEN -> /dev/block/sda16
lrwxrwxrwx 1 root root 15 Jan 2 12:45 OTA -> /dev/block/sda7
lrwxrwxrwx 1 root root 15 Jan 2 12:45 PARAM -> /dev/block/sda4
lrwxrwxrwx 1 root root 16 Jan 2 12:45 PERSDATA -> /dev/block/sda13
lrwxrwxrwx 1 root root 16 Jan 2 12:45 PERSISTENT -> /dev/block/sda11
lrwxrwxrwx 1 root root 15 Jan 2 12:45 RADIO -> /dev/block/sda8
lrwxrwxrwx 1 root root 15 Jan 2 12:45 RECOVERY -> /dev/block/sda6
lrwxrwxrwx 1 root root 16 Jan 2 12:45 STEADY -> /dev/block/sda12
lrwxrwxrwx 1 root root 16 Jan 2 12:45 SYSTEM -> /dev/block/sda14
lrwxrwxrwx 1 root root 15 Jan 2 12:45 TOMBSTONES -> /dev/block/sda9
[COLOR="Red"][B]lrwxrwxrwx 1 root root 16 Jan 2 12:45 USERDATA -> /dev/block/sda18[/B][/COLOR]
/dev/block/platform/155a0000.ufs/by-name # ?[6n
I created the dd image of the USERDATA partition and saved it to the external SD card using the following command
Code:
dd if=/dev/block/sda18 of=/external_sd/dev/block/sda18.dd bs=4096
I then ran it against photorec which only returned 2 elf files. I will run it against testdisk as well, but I'm thinking either the data is gone or I did not use DD correctly.
In TWRP, when you go to "Wipe" -> "Advanced Wipe" you see a list of partitions, among them are "Data" and "Internal Storage". I wiped the "Data" partition as I thought "Internal Storage" would be untouched (since it was listed seperatly). Nope. Apparently they map to the exact same partition
Code:
/dev/block/sda18 on /data type ext4 (rw,seclabel,relatime,data=ordered)
/dev/block/sda18 on /sdcard type ext4 (rw,seclabel,relatime,data=ordered)
I used "Change File System" on "Data" in order to make it usable again, I must have destroyed all the data I was trying to recover. Had I build the image before I fixed the data partition, I would probably have recovered most everything.
Thanks go out to Samsung for enabling auto update by default and for thoroughly testing the update which blew up my phone! Great job guys : )
waypoint.delta said:
I am looking for a way to create a perfect, byte for byte, image of my internal memory so that I can recover data from the image in a safer way and from a copy where I cant destroy the original. I am really just looking to recover files I had under the /sdcard (USERDATA mount) however, since my partitions are messed up, I want to broaden the scope and capture everything. Can anyone point me in the right direction?
Help is greatly appreciated.
Click to expand...
Click to collapse
You need to use photorec directly on the block device, not a copy. Copies don't copy detached inodes, even with dd.
Sent from my SM-G935T using Tapatalk
Everything I've read online negates that statement. however, I've yet to recover anything from the images I've copied, but I believe it may be due to hardware error. As a test, I put an photo on my /system mount and deleted the image. then I cloned the system block device and attempted recovery using photorec. this test failed to recover the file. so either DD is not copying the raw bytes or I am doing something incorrectly. I will try the same test using scalpel and also on another android phone.
toastido said:
You need to use photorec directly on the block device, not a copy. Copies don't copy detached inodes, even with dd.
Sent from my SM-G935T using Tapatalk
Click to expand...
Click to collapse

p9 lite soft bricked

So I finaly soft bricked my p9 lite trying to dual sim it.
I think the situation is not that bad.
Quick recap :
- My phone is VNS-L31 (europe)
- I have access to twrp (venus version)
- My phone is unlocked and FRP unlock
- I have access to Fastboot rescue mode (and fasboot devices -l show it)
So what the best way ? I'm a bit lost with terminology.
I suppose I have to download a full stock firmware (but from where and what version ??)
I suppose I also have to complety wipe my old system ? (twrp make error on this ?)
Should I try an update.app with erecovery or flash directly partition by partition ?
ut0mt8 said:
So I finaly soft bricked my p9 lite trying to dual sim it.
I think the situation is not that bad.
Quick recap :
- My phone is VNS-L31 (europe)
- I have access to twrp (venus version)
- My phone is unlocked and FRP unlock
- I have access to Fastboot rescue mode (and fasboot devices -l show it)
So what the best way ? I'm a bit lost with terminology.
I suppose I have to download a full stock firmware (but from where and what version ??)
I suppose I also have to complety wipe my old system ? (twrp make error on this ?)
Should I try an update.app with erecovery or flash directly partition by partition ?
Click to expand...
Click to collapse
Heyho,
if u have a system which can boot into the TWRP recovery:
1) make sure which Android version u currently run (MM / N)
2) get u a oeminfo matching to the version u want end in (for example: L31C432B130_DS)
3) flash the oeminfo via TWRP u can use my toolkit to do so
4) boot into the bootloader (fastboot mode)
5) flash the stock recovery matching to ur current kernel (MM / N)
(the recovery is included in my toolkit packages, otherwise u need to get u the "Huawei Update Extractor" here on XDA and extract the recovery from the update.app)
6) copy the FULL-L31C432Bxxx update.app on ur sdcard/internal storage (dload folder)
(!IMPORTANT! - The oeminfo must match to the update! This means, u can flash a B130 oeminfo and a B160 rom. But, u can't flash a B130 rom over an B160 oeminfo!)
7) turn the device off and disconnect it from any USB connection
8) turn the device on with the following combination:
Press and hold [Vol+ Vol- Power] until u see the huawei recovery
9) wait until the update is done
If u can't boot into TWRP:
1) turn ur device off - plug the USB cable in
2) press and hold [Vol- Power]
3) unlock ur device with my toolkit, the code can be requested by huawei (a link is in my toolkit)
4) flash the TWRP recovery matching to ur current kernel (MM / N)
5) follow the previous steps above from (1)
Hope i could help u
Regards,
Sebastian
k1ll3r8e said:
Heyho,
if u have a system which can boot into the TWRP recovery:
1) make sure which Android version u currently run (MM / N)
Click to expand...
Click to collapse
Thanks for your patience. Note that I am currently on a MacBook and I cannot use directly your toolkit (my Windows is doing weird thing with usb, as constantly disconnect/reconnect my phone, not very usable)
Yes I can boot on TWRP recovery (I ve installed this one TWRP 3.1.0 Data and Restore Fixed by HassanMirza01).
The good news is I can connect on my phone via adb shell.
1) I try flashing different roms (the last one was Elite by Hassan, but didn't work); the last working was stock Emui 5 Nougat.
I don't understand how I have an android version again as I wipe almost everything ? How to be sure ? (kernel in /boot ? )
k1ll3r8e said:
2) get u a oeminfo matching to the version u want end in (for example: L31C432B130_DS)
3) flash the oeminfo via TWRP u can use my toolkit to do so
Click to expand...
Click to collapse
2) OK
3) Something like this ?
Code:
adb shell su -c "dd bs=32768 if=/sdcard/oeminfo of=/dev/block/platform/hi_mci.0/by-name/oeminfo"
k1ll3r8e said:
4) boot into the bootloader (fastboot mode)
5) flash the stock recovery matching to ur current kernel (MM / N)
(the recovery is included in my toolkit packages, otherwise u need to get u the "Huawei Update Extractor" here on XDA and extract the recovery from the update.app)
Click to expand...
Click to collapse
4) OK
5) You mean only replace twrp with the stock recovery ? What are the command line ? adb+dd or just flashboot recovery ?
I notice in your toolkit we can flash boot/recovery/system/cust partition. Helpful or not ?
(Another question : did you known a tool like huawai update extractor for mac/linux ?
OK just find it in php perfect. => https://github.com/scue/unpacker_huawei. )
k1ll3r8e said:
6) copy the FULL-L31C432Bxxx update.app on ur sdcard/internal storage (dload folder)
(!IMPORTANT! - The oeminfo must match to the update! This means, u can flash a B130 oeminfo and a B160 rom. But, u can't flash a B130 rom over an B160 oeminfo!)
7) turn the device off and disconnect it from any USB connection
8) turn the device on with the following combination:
Press and hold [Vol+ Vol- Power] until u see the huawei recovery
9) wait until the update is done
Click to expand...
Click to collapse
6) Ok so let's use a B130 oeminfo.
OK this part at the end is to let the official huawei recovery do his job.
Another side question : on adb shell , if I try to mount vendor and product the partition didn't exist.
Confirmed by doing a ls on /dev/ or fdisk.
Code:
~ # mount -a
mount: mounting /vendor on ext4 failed: No such file or directory
mount: mounting /product on ext4 failed: No such file or directory
Command (m for help): p
Disk /dev/block/mmcblk0: 30777344 sectors, 2740M
Logical sector size: 512
Disk identifier (GUID): f9f21fff-a8d4-5f0e-9746-594869aec34e
Partition table holds up to 128 entries
First usable sector is 34, last usable sector is 30777343
Number Start (sector) End (sector) Size Code Name
1 1024 1535 256K 0700 vrl
2 1536 2047 256K 0700 vrl_backup
3 2048 2559 256K 0700 fw_lpm3
4 2560 4095 768K 0700 frp
5 4096 12287 4096K 0700 fastboot
6 12288 20479 4096K 0700 modemnvm_factory
7 20480 32767 6144K 0700 nvme
8 32768 163839 64.0M 0700 oeminfo
9 163840 172031 4096K 0700 reserved3
10 172032 180223 4096K 0700 modemnvm_backup
11 180224 196607 8192K 0700 modemnvm_img
12 196608 204799 4096K 0700 modemnvm_system
13 204800 270335 32.0M 0700 secure_storage
14 270336 274431 2048K 0700 reserved4
15 274432 278527 2048K 0700 reserved5
16 278528 282623 2048K 0700 persist
17 282624 311295 14.0M 0700 reserved1
18 311296 376831 32.0M 0700 modem_om
19 376832 507903 64.0M 0700 splash2
20 507904 511999 2048K 0700 misc
21 512000 561151 24.0M 0700 modemnvm_update
22 561152 692223 64.0M 0700 recovery2
23 692224 815103 60.0M 0700 reserved2
24 815104 823295 4096K 0700 teeos
25 823296 827391 2048K 0700 trustfirmware
26 827392 860159 16.0M 0700 sensorhub
27 860160 884735 12.0M 0700 fw_hifi
28 884736 950271 32.0M 0700 boot
29 950272 1081343 64.0M 0700 recovery
30 1081344 1146879 32.0M 0700 dts
31 1146880 1343487 96.0M 0700 modem_fw
32 1343488 1347583 2048K 0700 reserved7
33 1347584 1351679 2048K 0700 reserved8
34 1351680 1384447 16.0M 0700 dfx
35 1384448 1392639 4096K 0700 reserved6
36 1392640 1916927 256M 0700 cache
37 1916928 1921023 2048K 0700 hisitest0
38 1921024 1925119 2048K 0700 hisitest1
39 1925120 1933311 4096K 0700 hisitest2
40 1933312 7176191 2560M 0700 system
41 7176192 8224767 512M 0700 cust
42 8224768 30777343 10.7G 0700 userdata
Normal ? or very wrong ? if someone can check on a working device
Again thanks for your patience and flooding you with questions ; I slowly learn, but I will definitively try to make a post with my note.
Best,
So I flash the oeminfo with dd found on your google drive.
It seems it relock my phone. So I suppose I have to unlock it again with ./fastboot oem unlock xxxxx ?
I put a stock B160 on root on the sdcard (/sdcard/dload/UPDATE.APP). VNS-L31C432B160.zip.
In fact I cannot go to huawei recovery (hold power +UP+Down) nor Twrp ; I always finish on erecovey (which it not very helpful)
Heyho,
ut0mt8 said:
Thanks for your patience. Note that I am currently on a MacBook and I cannot use directly your toolkit (my Windows is doing weird thing with usb, as constantly disconnect/reconnect my phone, not very usable)
Yes I can boot on TWRP recovery (I ve installed this one TWRP 3.1.0 Data and Restore Fixed by HassanMirza01).
The good news is I can connect on my phone via adb shell.
Click to expand...
Click to collapse
Np
-
About the recovery, u should use the TWRP from @OldDroid from my signature, i can confirm that this recovery will work as it should.
ut0mt8 said:
1) I try flashing different roms (the last one was Elite by Hassan, but didn't work); the last working was stock Emui 5 Nougat.
I don't understand how I have an android version again as I wipe almost everything ? How to be sure ? (kernel in /boot ? )
Click to expand...
Click to collapse
Hehe, u "only" wiped the system, data not the boot partition, the boot.img contains the kernel and ram-disk. But, an N kernel can't boot an MM recovery, also the MM kernel can't boot an N recovery.
ut0mt8 said:
3) Something like this ?
Code:
adb shell su -c "dd bs=32768 if=/sdcard/oeminfo of=/dev/block/platform/hi_mci.0/by-name/oeminfo"
Click to expand...
Click to collapse
Yes and no, the oeminfo is 64 mb not 32 mb!
Just use:
Code:
adb shell su -c "dd if=/sdcard/oeminfo of=/dev/block/platform/hi_mci.0/by-name/oeminfo"
Because, each oeminfo dump will be exactly 64 mb so there is no need to set the size.
ut0mt8 said:
5) You mean only replace twrp with the stock recovery ? What are the command line ? adb+dd or just flashboot recovery ?
Click to expand...
Click to collapse
To flash the recovery u should use fastboot...
Code:
fastboot flash recovery /path/to/the/recovery/image
ut0mt8 said:
I notice in your toolkit we can flash boot/recovery/system/cust partition. Helpful or not ?
Click to expand...
Click to collapse
As described in the preparation, this is only to get the device back to work, that u can boot into the TWRP and do all the stuff i just tell u...
ut0mt8 said:
Another side question : on adb shell , if I try to mount vendor and product the partition didn't exist.
Confirmed by doing a ls on /dev/ or fdisk.
Code:
~ # mount -a
mount: mounting /vendor on ext4 failed: No such file or directory
mount: mounting /product on ext4 failed: No such file or directory
Command (m for help): p
Disk /dev/block/mmcblk0: 30777344 sectors, 2740M
Logical sector size: 512
Disk identifier (GUID): f9f21fff-a8d4-5f0e-9746-594869aec34e
Partition table holds up to 128 entries
First usable sector is 34, last usable sector is 30777343
Number Start (sector) End (sector) Size Code Name
1 1024 1535 256K 0700 vrl
2 1536 2047 256K 0700 vrl_backup
3 2048 2559 256K 0700 fw_lpm3
4 2560 4095 768K 0700 frp
5 4096 12287 4096K 0700 fastboot
6 12288 20479 4096K 0700 modemnvm_factory
7 20480 32767 6144K 0700 nvme
8 32768 163839 64.0M 0700 oeminfo
9 163840 172031 4096K 0700 reserved3
10 172032 180223 4096K 0700 modemnvm_backup
11 180224 196607 8192K 0700 modemnvm_img
12 196608 204799 4096K 0700 modemnvm_system
13 204800 270335 32.0M 0700 secure_storage
14 270336 274431 2048K 0700 reserved4
15 274432 278527 2048K 0700 reserved5
16 278528 282623 2048K 0700 persist
17 282624 311295 14.0M 0700 reserved1
18 311296 376831 32.0M 0700 modem_om
19 376832 507903 64.0M 0700 splash2
20 507904 511999 2048K 0700 misc
21 512000 561151 24.0M 0700 modemnvm_update
22 561152 692223 64.0M 0700 recovery2
23 692224 815103 60.0M 0700 reserved2
24 815104 823295 4096K 0700 teeos
25 823296 827391 2048K 0700 trustfirmware
26 827392 860159 16.0M 0700 sensorhub
27 860160 884735 12.0M 0700 fw_hifi
28 884736 950271 32.0M 0700 boot
29 950272 1081343 64.0M 0700 recovery
30 1081344 1146879 32.0M 0700 dts
31 1146880 1343487 96.0M 0700 modem_fw
32 1343488 1347583 2048K 0700 reserved7
33 1347584 1351679 2048K 0700 reserved8
34 1351680 1384447 16.0M 0700 dfx
35 1384448 1392639 4096K 0700 reserved6
36 1392640 1916927 256M 0700 cache
37 1916928 1921023 2048K 0700 hisitest0
38 1921024 1925119 2048K 0700 hisitest1
39 1925120 1933311 4096K 0700 hisitest2
40 1933312 7176191 2560M 0700 system
41 7176192 8224767 512M 0700 cust
42 8224768 30777343 10.7G 0700 userdata
Normal ? or very wrong ? if someone can check on a working device
Click to expand...
Click to collapse
I don't use the TWRP u mentioned, maybe there is an issue... I had a look on my device with the TWRP from OldDroid, there are those block-devices... But i had a look under "/dev/block/platform/hi_mci.0/by-name". I think, if u have a look at this path, u'll find the block-devices also on ur device.
ut0mt8 said:
So I flash the oeminfo with dd found on your google drive.
It seems it relock my phone. So I suppose I have to unlock it again with ./fastboot oem unlock xxxxx ?
I put a stock B160 on root on the sdcard (/sdcard/dload/UPDATE.APP). VNS-L31C432B160.zip.
In fact I cannot go to huawei recovery (hold power +UP+Down) nor Twrp ; I always finish on erecovey (which it not very helpful)
Click to expand...
Click to collapse
Yup, if u saw a PW-prompt where u entered a random or ur last known PW, the device will normally do a factory-reset.
As u mentioned, u can unlock it with
Code:
fastboot oem unlock UR_UNLOCK_CODE
again.
About the recovery, which recovery u flashed? (The L31C432B130? it's MM and can't boot with an N kernel...)
Just download the "pkg.L31C432B380.zip" from my g-drive and flash the stock recovery from this package, it's an N recovery.
Hope everything is now working for u
Regards,
Sebastian
k1ll3r8e said:
Heyho,
Np
-
About the recovery, u should use the TWRP from @OldDroid from my signature, i can confirm that this recovery will work as it should.
Hehe, u "only" wiped the system, data not the boot partition, the boot.img contains the kernel and ram-disk. But, an N kernel can't boot an MM recovery, also the MM kernel can't boot an N recovery.
Yes and no, the oeminfo is 64 mb not 32 mb!
Just use:
Code:
adb shell su -c "dd if=/sdcard/oeminfo of=/dev/block/platform/hi_mci.0/by-name/oeminfo"
Because, each oeminfo dump will be exactly 64 mb so there is no need to set the size.
To flash the recovery u should use fastboot...
Code:
fastboot flash recovery /path/to/the/recovery/image
As described in the preparation, this is only to get the device back to work, that u can boot into the TWRP and do all the stuff i just tell u...
I don't use the TWRP u mentioned, maybe there is an issue... I had a look on my device with the TWRP from OldDroid, there are those block-devices... But i had a look under "/dev/block/platform/hi_mci.0/by-name". I think, if u have a look at this path, u'll find the block-devices also on ur device.
Yup, if u saw a PW-prompt where u entered a random or ur last known PW, the device will normally do a factory-reset.
As u mentioned, u can unlock it with
Code:
fastboot oem unlock UR_UNLOCK_CODE
again.
About the recovery, which recovery u flashed? (The L31C432B130? it's MM and can't boot with an N kernel...)
Just download the "pkg.L31C432B380.zip" from my g-drive and flash the stock recovery from this package, it's an N recovery.
Hope everything is now working for u
Regards,
Sebastian
Click to expand...
Click to collapse
OK so I ve re unlock my phone, and flash the recovery with your twrp version. Still have the problem with
Code:
mount: mounting /vendor on ext4 failed: No such file or directory
mount: mounting /product on ext4 failed: No such file or directory
mount: mounting /usbotg on auto failed: No such file or directory
but let's move on.
If I understand correctly I have now a good oeminfo, a boot with nougat kernel and initramfs/initrd.
I have to flash the recovery with stock recovery nougat in order to flash an old B130 update.app.
Let's try.
PS : bs paramater in dd mean how much data your write at each pass (it's an optimisation parameter don't needed here)
ut0mt8 said:
OK so I ve re unlock my phone, and flash the recovery with your twrp version. Still have the problem with
Code:
mount: mounting /vendor on ext4 failed: No such file or directory
mount: mounting /product on ext4 failed: No such file or directory
mount: mounting /usbotg on auto failed: No such file or directory
but let's move on.
If I understand correctly I have now a good oeminfo, a boot with nougat kernel and initramfs/initrd.
I have to flash the recovery with stock recovery nougat in order to flash an old B130 update.app.
Let's try.
PS : bs paramater in dd mean how much data your write at each pass (it's an optimisation parameter don't needed here)
Click to expand...
Click to collapse
Heyho,
hmm, maybe the partitions are not formatted... - Just proceed with the update, normally it will flash those partitions. I had a similar issue a while ago.
About the "bs", it's meant as "block-size"? If so, the normal block-size for the oeminfo will be "4096"
Regards,
Sebastian
k1ll3r8e said:
Heyho,
hmm, maybe the partitions are not formatted... - Just proceed with the update, normally it will flash those partitions. I had a similar issue a while ago.
About the "bs", it's meant as "block-size"? If so, the normal block-size for the oeminfo will be "4096"
Regards,
Sebastian
Click to expand...
Click to collapse
Yep It means blocksize but in fact it is just pass to the read/write system call ; so you can virtually pass every value (even a size greater than the image file; in that case dd/system will try to read it in one pass). This is no alignement related.
Another quick question : did you know a method to break the boot loop and enter fastboot mode ?
Normally you have to shutdown your device but in that configuration I have no option (unless draining the battery).
I think I succeed one time with a precise timing but not sure.
ut0mt8 said:
Yep It means blocksize but in fact it is just pass to the read/write system call ; so you can virtually pass every value (even a size greater than the image file; in that case dd/system will try to read it in one pass). This is no alignement related.
Another quick question : did you know a method to break the boot loop and enter fastboot mode ?
Normally you have to shutdown your device but in that configuration I have no option (unless draining the battery).
I think I succeed one time with a precise timing but not sure.
Click to expand...
Click to collapse
Heyho,
thx for the info
-
About the boot-loop, u can try to long press Power until it turn off and on again.
Just hold the device connected to USB, that's important to enter fastboot!
Just try to:
1) power off
2) and when it's off, hold Vol-
that should be enough to enter fastboot.
Regards,
Sebastian
k1ll3r8e said:
Heyho,
thx for the info
-
About the boot-loop, u can try to long press Power until it turn off and on again.
Just hold the device connected to USB, that's important to enter fastboot!
Just try to:
1) power off
2) and when it's off, hold Vol-
that should be enough to enter fastboot.
Regards,
Sebastian
Click to expand...
Click to collapse
Effectively with phone connected to usb it work much better
So I correctly install the stock recovery , and push an UPDATE.APP, the recovery launch and found the package but it hold at 5% and does nothing more.
I think I had to flash all partition more violently. Let's try.
What really help was if something can look at a correct partition scheme for /vendor an /product; coz I think my problem came from here.
Thks.
ut0mt8 said:
Effectively with phone connected to usb it work much better
So I correctly install the stock recovery , and push an UPDATE.APP, the recovery launch and found the package but it hold at 5% and does nothing more.
I think I had to flash all partition more violently. Let's try.
What really help was if something can look at a correct partition scheme for /vendor an /product; coz I think my problem came from here.
Thks.
Click to expand...
Click to collapse
Heyho,
just disconnect the device while the update... This is normal and mentioned a lot of times... That when the device is connected to USB the update will fail at 5%, why ever.^^
-
I wiped my device yesterday ~20++ times and flashed all the time back to B130 so i can promise u that this will work...
oeminfo + stock recovery + update = 100% B130
Regards,
Sebastian
k1ll3r8e said:
Heyho,
just disconnect the device while the update... This is normal and mentioned a lot of times... That when the device is connected to USB the update will fail at 5%, why ever.^^
-
I wiped my device yesterday ~20++ times and flashed all the time back to B130 so i can promise u that this will work...
oeminfo + stock recovery + update = 100% B130
Regards,
Sebastian
Click to expand...
Click to collapse
OMG it's finally working ! and dual simed !!
Big thks for your patiente with noob like me.
There still a lot of things I had to dig/understand (I will try to flash twrp again and check for my partition issue)
I will now try to make a quick howto with my notes.

[GUIDE][WORK IN PROGRESS]Oneplus one - resize system partition and maybe even more

WARNING!!!​Everyone is responsible for the proper functioning of their device. This guide is the result of personal experiments and I'm not responsible for any damage caused to your device as a result of improper use of its contents.
Introduction
Stock partitions layout has a 1.3Gb /system partition that is too small for users that flash modern custom roms + some kinds of google apps.
This is a step by step guide to change the layout of the partitions table with a bigger /system partition.
How
On OnePlus One, stock partition table looks like the following
Code:
... ... ...
/dev/block/mmcblk0p14 : start= 294912, name="system"
/dev/block/mmcblk0p15 : start= 3006464, name="persist"
/dev/block/mmcblk0p16 : start= 3072000, name="cache"
... ... ...
/dev/block/mmcblk0p28 : start= 4521984, name="userdata"
/dev/block/mmcblk0p29 : start= 121552896, name="grow"
With this layout, resizing the /system partition may seem difficult because it's close to other very important partitions.
So I've experimented with another approach. By resizing userdata partition, and relocate the /system partition at the beginning of the resulting free space, other partitions are left untouched.
There are mainly two (little) issues
almost all custom roms out of there assume that /system partition is 1.3gb of size
on internal storage the old area of /system partition are unused.
For the first point, the solution is to resize the filesystem when you first flash a custom rom. To automatically resize filesystem at every update there is an addon.d script.
For the second point the new free space available (the old 1.3G /system partition) can be used as a new /cache partition.
And, again, the new free space available (the old /cache partition) can be the famous /vendor partition (that is out of the scope of this guide).
This guide uses the sfdisk tool from util-linux. In my opinion, it's more powerful than parted and it's easy to use via script.
IMPORTANT - Before you start
Obviously, this method is destructive regarding userdata partition, so make a full backup of your data.
Manually resizing filesystem of /system partition is needed only once because the addon.d script will ensure that everything works as expected. The only exception is when you wipe /system and flash a new rom
Prerequisites
a working TWRP recovery installed on device
knowledge of adb tools
a statically cross compiled sfdisk tool (you can self compile, or use the one attached below)
this addon.d script (thanks to @osmosis)
flashable zip of a custom rom (and optionally gapps, magisk etc etc etc)
flashable zip bacon-resize-system.zip (attached on this post)
Let's go
enter TWRP recovery and connect phone on a PC
push sfdisk into a temporary dir and ensure is executable
Code:
adb push sfdisk-arm /tmp
adb shell
cd /tmp
chmod 755 sfdisk-arm
make and pull a backup of your partition table (there is also the 64Gb stock layout in attachments)
Code:
./sfdisk-arm -d /dev/block/mmcblk0 > bacon.gpt
exit
adb pull /tmp/bacon.gpt
looking into the partition table you see that userdata partition starts at sector 4521984.
So in order to resize partition (for example 53G instead of 55,8G).
Code:
adb shell
cd /tmp
umount /data
umount /sdcard
echo "4521984,53G" | ./sfdisk-arm --no-reread -N 28 /dev/block/mmcblk0
. Scrolling down the output of this command the new userdata partition is
Code:
Device Start End Sectors Size Type
/dev/block/mmcblk0p28 4521984 115671039 111149056 53G unknown
so the start sector of /system partition will be 115671040 (115671039+1)
relocating system partition at the end of the new userdata partition(size now will be 2,8G)
Code:
echo "115671040,+" | ./sfdisk-arm --no-reread -N 14 /dev/block/mmcblk0
reboot recovery (kernel need to reload partition table)
Code:
reboot recovery
format userdata with TWRP(no wipe... full format)
push custom rom with adb and flash with TWRP (without rebooting)
flash bacon-resize-system.zip
finish.. you can now reboot or continue with flashing gapps, magisk etc etc (but now with a bigger system partition)
Rollback
TODO
Nice to have
flashable zip for addon.d script (WIP)(DONE)
[*] looking into the partition table you see that userdata partition starts at sector 4521984.
So in order to resize partition (for example 53G instead of 55,8G).
Code:
adb shell
cd /tmp
umount /data
umount /sdcard
echo "4521984,53G" | ./sfdisk-arm --no-reread -N 28 /dev/block/mmcblk0
Click to expand...
Click to collapse
If I understand correctly, the system partition will now be 2.8 GB larger. So it will have a total of about 4.1 GB. Is that so?
BTW this is very good work. :good::good::good::good:
BoquinhaSK said:
If I understand correctly, the system partition will now be 2.8 GB larger. So it will have a total of about 4.1 GB. Is that so?
Click to expand...
Click to collapse
the /system partition are 'moved' at the end of the resized userdata partition.. so it's only 2.8G
I've made this decision for two reasons
no needs to move critical partitions
the unused space (the old /system partition) can be used in another way(for example a larger cache partition or a vendor partition)
BoquinhaSK said:
BTW this is very good work.
Click to expand...
Click to collapse
Thanks a lot
Michele
EDIT: another reason for this method is that almost all custom roms works
I have one small problem. Internal storage (/sdcard) I haven't defined. Is it defined as "Invalid partition selection." Full storage is for /data.
How I can mount /sdcard?
Edit: I mean this: /sdcard, /storage/emulated/0, /data/media/0
I changed partition system to ext2 in TWRP.
And system partition si bigger. This works.
Edit2:
I have problem with flash new ROM. Flashing change filesystem from ext2 to ext4 always with smaller previous value. I have problem maybe with script. But I try it again tomorrow.
BoquinhaSK said:
I have one small problem. Internal storage (/sdcard) I haven't defined. Is it defined as "Invalid partition selection." Full storage is for /data.
How I can mount /sdcard?
Edit: I mean this: /sdcard, /storage/emulated/0, /data/media/0
Click to expand...
Click to collapse
after formatting /data the filesystem is empty.. these directories are created when you first start android(if not found)
BoquinhaSK said:
Edit2:
I have problem with flash new ROM. Flashing change filesystem from ext2 to ext4 always with smaller previous value.
Click to expand...
Click to collapse
This is normal. Starting from nougat/oreo the building process of an android system creates a block-based flashable zip.
This means that the system partition is preformatted in ext4 and (for Oneplus One) with a size of 1.3G (the original /system partition). So you cannot change the type of filesystem.
BoquinhaSK said:
I have problem maybe with script. But I try it again tomorrow.
Click to expand...
Click to collapse
Check if the script has the right permission (I'll update the guide).
Also keep in mind that, like others addon.d scrips, it works only with the OTA updater.
If you flash directly from recovery (changing rom, or dirty flash) you need to manually repeat the steps described for resizing partition and installing the script.
I've planned to create a flashable zip to automate these steps.
Thanks
Michele
little update... I've uploaded a simple flashable zip that resize filesystem of /system partition and install the addon.d script.
The procedure now is more simpler.
ilmich said:
little update... I've uploaded a simple flashable zip that resize filesystem of /system partition and install the addon.d script.
The procedure now is more simpler.
Click to expand...
Click to collapse
Hi ilmich, I followed your guide while flashing LOS 17.1 on my OPO and this allowed me to have a /system partition large enough to be able to have a large GApps installation, so cheers for that! However, I installed an OTA update on LOS 17.1 today (29/10 update) and that rebooted to TWRP which seemed to have installed the zip, but then entered a boot loop with several "Could not find x for ctl.interface_start" on the dmesg log. I can see the resizesystem script in the addon.d folder but something must've gone wrong because the partitions seem to have been restored to its default and /system seems to be 1.3GB again in TWRP. I will pull the partition table and post it here.
Update:
I was wrong, /system seems to be the same size on running sfdisk. The cause of the update fail must be somewhere else. Here's the /system partition from sfdisk:
Code:
/dev/block/mmcblk0p14 : start= 115671040, size= 5881856, type=EBD0A0A2-B9E5-4433-87C0-68B6B72699C7, uuid=B17FA16F-3B1D-8D12-329D-88B49B096554, name="system", attrs="GUID:60"
I still don't understand why TWRP displays /system as 1303MB again though. Any idea?
Still working...?
Are you still working on this guide?
I'ld love to try it, but I'm a little frightened since there seem to be issues about future udates of Lineage (see previous post).
Zyndstoff said:
Are you still working on this guide?
I'ld love to try it, but I'm a little frightened since there seem to be issues about future udates of Lineage (see previous post).
Click to expand...
Click to collapse
Sorry for the late reply. For sure, but for now, I don't have with me my opo.
But if I understand correctly
BoquinhaSK said:
Update:
I was wrong, /system seems to be the same size on running sfdisk. The cause of the update fail must be somewhere else.
Click to expand...
Click to collapse
update problems are not the repartition procedure.
BoquinhaSK said:
I still don't understand why TWRP displays /system as 1303MB again though. Any idea?
Click to expand...
Click to collapse
I suppose that TWRP is built with 1.3Gb size limit (like everything that is based on opo device tree) and without mounting the filesystem show this static value.
But the power of this procedure (and the resize script) is that you can safely install your preferred rom. The filesystem is expanded in order to fill the 'new' partition size.
During my experiments, I've updated a lineage os (also simulating OTA by pushing a recovery command into the /cache partition), with and without GAPPS.
This guide, if executed step by step, should be safe.
I'm testing again my procedure. This is my situation
Code:
bacon:/ $ df -h
Filesystem Size Used Avail Use% Mounted on
/dev/block/mmcblk0p14 2.7G 1.0G 1.7G 38% /
/dev/block/mmcblk0p28 52G 15G 37G 30% /data
I've latest official lineageos with some Gapps.
Now I'm waiting for an official OTA to see if anything goes wrong.
Hi all,
I've uploaded a new bacon-resize-system.zip that fixes the issue with OTA (wrong escape sequence when creating survival script in the updater binary).
Thanks all for the bug report.
Cheers
Michele
ilmich said:
Hi all,
I've uploaded a new bacon-resize-system.zip that fixes the issue with OTA (wrong escape sequence when creating survival script in the updater binary).
Thanks all for the bug report.
Cheers
Michele
Click to expand...
Click to collapse
Hello sir,
I am still using OPO in 2021 and i want 5gb system partition.. What will be start and end sectors for that changes? I am really confused so can you please recreate your post for 5gb and will you post it in reply?
Another one question if i flashed stock rom via fastboot then it will restore partition size to default or changes still remain which we did?
Thank You.
pbankar7 said:
Hello sir,
I am still using OPO in 2021 and i want 5gb system partition.. What will be start and end sectors for that changes? I am really confused so can you please recreate your post for 5gb and will you post it in reply?
Another one question if i flashed stock rom via fastboot then it will restore partition size to default or changes still remain which we did?
Thank You.
Click to expand...
Click to collapse
Code:
adb shell
cd /tmp
umount /data
umount /sdcard
echo "4521984,51G" | ./sfdisk-arm --no-reread -N 28 /dev/block/mmcblk0
After that
Code:
Device Start End Sectors Size Type
/dev/block/mmcblk0p28 4521984 111476735 106954752 51G unknown
After this
Code:
echo "111476736,+" | ./sfdisk-arm --no-reread -N 14 /dev/block/mmcblk0
Am I right for 4.8gb??
Please answer of this 2 questions
1. If i flashed stock rom via fastboot then it will restore partition size to default or changes still remains which we did?
2. It is necessary to flash bacon-resize-system.zip everytime whenever we flash new custom rom or after ota updates?
Thank You.
ilmich said:
WARNING!!!​Everyone is responsible for the proper functioning of their device. This guide is the result of personal experiments and I'm not responsible for any damage caused to your device as a result of improper use of its contents.
Introduction
Stock partitions layout has a 1.3Gb /system partition that is too small for users that flash modern custom roms + some kinds of google apps.
This is a step by step guide to change the layout of the partitions table with a bigger /system partition.
How
On OnePlus One, stock partition table looks like the following
Code:
... ... ...
/dev/block/mmcblk0p14 : start= 294912, name="system"
/dev/block/mmcblk0p15 : start= 3006464, name="persist"
/dev/block/mmcblk0p16 : start= 3072000, name="cache"
... ... ...
/dev/block/mmcblk0p28 : start= 4521984, name="userdata"
/dev/block/mmcblk0p29 : start= 121552896, name="grow"
With this layout, resizing the /system partition may seem difficult because it's close to other very important partitions.
So I've experimented with another approach. By resizing userdata partition, and relocate the /system partition at the beginning of the resulting free space, other partitions are left untouched.
There are mainly two (little) issues
almost all custom roms out of there assume that /system partition is 1.3gb of size
on internal storage the old area of /system partition are unused.
For the first point, the solution is to resize the filesystem when you first flash a custom rom. To automatically resize filesystem at every update there is an addon.d script.
For the second point the new free space available (the old 1.3G /system partition) can be used as a new /cache partition.
And, again, the new free space available (the old /cache partition) can be the famous /vendor partition (that is out of the scope of this guide).
This guide uses the sfdisk tool from util-linux. In my opinion, it's more powerful than parted and it's easy to use via script.
IMPORTANT - Before you start
Obviously, this method is destructive regarding userdata partition, so make a full backup of your data.
Manually resizing filesystem of /system partition is needed only once because the addon.d script will ensure that everything works as expected. The only exception is when you wipe /system and flash a new rom
Prerequisites
a working TWRP recovery installed on device
knowledge of adb tools
a statically cross compiled sfdisk tool (you can self compile, or use the one attached below)
this addon.d script (thanks to @osmosis)
flashable zip of a custom rom (and optionally gapps, magisk etc etc etc)
flashable zip bacon-resize-system.zip (attached on this post)
Let's go
enter TWRP recovery and connect phone on a PC
push sfdisk into a temporary dir and ensure is executable
Code:
adb push sfdisk-arm /tmp
adb shell
cd /tmp
chmod 755 sfdisk-arm
make and pull a backup of your partition table (there is also the 64Gb stock layout in attachments)
Code:
./sfdisk-arm -d /dev/block/mmcblk0 > bacon.gpt
exit
adb pull /tmp/bacon.gpt
looking into the partition table you see that userdata partition starts at sector 4521984.
So in order to resize partition (for example 53G instead of 55,8G).
Code:
adb shell
cd /tmp
umount /data
umount /sdcard
echo "4521984,53G" | ./sfdisk-arm --no-reread -N 28 /dev/block/mmcblk0
. Scrolling down the output of this command the new userdata partition is
Code:
Device Start End Sectors Size Type
/dev/block/mmcblk0p28 4521984 115671039 111149056 53G unknown
so the start sector of /system partition will be 115671040 (115671039+1)
relocating system partition at the end of the new userdata partition(size now will be 2,8G)
Code:
echo "115671040,+" | ./sfdisk-arm --no-reread -N 14 /dev/block/mmcblk0
reboot recovery (kernel need to reload partition table)
Code:
reboot recovery
format userdata with TWRP(no wipe... full format)
push custom rom with adb and flash with TWRP (without rebooting)
flash bacon-resize-system.zip
finish.. you can now reboot or continue with flashing gapps, magisk etc etc (but now with a bigger system partition)
Rollback
TODO
Nice to have
flashable zip for addon.d script (WIP)(DONE)
Click to expand...
Click to collapse
I'm interested in installing Ubuntu touch on my OnePlus One but since I used this guide successfully to resize my system partition I don't think I can install it without restoring the partition tables. How can I restore the partitions properly without bricking my phone?
Hi all. Please help.
I ruined my OPO phone.
iI followed the steps correctly.
After reboot the system partition cannot mount.
I see in the log:
Failed to mount '/system' (invalid argument)
My GPT after the change:
/tmp # fdisk -l /dev/block/mmcblk0
Found valid GPT with protective MBR; using GPT
Disk /dev/block/mmcblk0: 122142720 sectors, 2296M
Logical sector size: 512
Disk identifier (GUID): 98101b32-bbe2-4bf2-a06e-2bb33d000c20
Partition table holds up to 32 entries
First usable sector is 34, last usable sector is 122142686
Number Start (sector) End (sector) Size Code Name
1 16384 147455 64.0M 0700 modem
2 147456 148479 512K 0700 sbl1
3 148480 148543 32768 0700 dbi
4 163840 163903 32768 0700 DDR
5 180224 182271 1024K 0700 aboot
6 182272 183271 500K 0700 rpm
7 196608 229375 16.0M 0700 boot
8 229376 230375 500K 0700 tz
9 230376 232423 1024K 0700 pad
10 232424 235495 1536K 0700 modemst1
11 235496 238567 1536K 0700 modemst2
12 238568 259047 10.0M 0700 oppodycnvbk
13 259048 279527 10.0M 0700 oppostanvbk
14 115671040 121552895 2872M 0700 system
15 3006464 3071999 32.0M 0700 persist
16 3072000 4120575 512M 0700 cache
17 4120576 4153343 16.0M 0700 recovery
18 4153344 4156415 1536K 0700 fsg
19 4161536 4161537 1024 0700 fsc
20 4161538 4161553 8192 0700 ssd
21 4161554 4163601 1024K 0700 misc
22 4163602 4196369 16.0M 0700 LOGO
23 4196370 4261905 32.0M 0700 DRIVER
24 4261906 4327441 32.0M 0700 reserve1
25 4327442 4360209 16.0M 0700 reserve2
26 4360210 4376593 8192K 0700 reserve3
27 4376594 4507665 64.0M 0700 reserve4
28 4521984 115671039 53.0G 0700 userdata
29 121552896 122142686 287M 0700 grow
/tmp # cat /etc/fstab
/dev/block/mmcblk0p1 /firmware vfat rw 0 0
/dev/block/mmcblk0p14 /system ext4 rw 0 0
/dev/block/mmcblk0p28 /data ext4 rw 0 0
/dev/block/mmcblk0p16 /cache ext4 rw 0 0
/tmp # df -h
Filesystem Size Used Available Use% Mounted on
tmpfs 1.4G 32.0K 1.4G 0% /dev
tmpfs 1.4G 28.0K 1.4G 0% /tmp
/dev/block/mmcblk0p16
503.9M 8.4M 495.5M 2% /cache
/dev/block/mmcblk0p28
52.2G 180.0M 52.0G 0% /data
/dev/block/mmcblk0p28
52.2G 180.0M 52.0G 0% /sdcard
dimitrios5000 said:
Hi all. Please help.
I ruined my OPO phone.
iI followed the steps correctly.
After reboot the system partition cannot mount.
I see in the log:
Failed to mount '/system' (invalid argument)
My GPT after the change:
/tmp # fdisk -l /dev/block/mmcblk0
Found valid GPT with protective MBR; using GPT
Disk /dev/block/mmcblk0: 122142720 sectors, 2296M
Logical sector size: 512
Disk identifier (GUID): 98101b32-bbe2-4bf2-a06e-2bb33d000c20
Partition table holds up to 32 entries
First usable sector is 34, last usable sector is 122142686
Number Start (sector) End (sector) Size Code Name
1 16384 147455 64.0M 0700 modem
2 147456 148479 512K 0700 sbl1
3 148480 148543 32768 0700 dbi
4 163840 163903 32768 0700 DDR
5 180224 182271 1024K 0700 aboot
6 182272 183271 500K 0700 rpm
7 196608 229375 16.0M 0700 boot
8 229376 230375 500K 0700 tz
9 230376 232423 1024K 0700 pad
10 232424 235495 1536K 0700 modemst1
11 235496 238567 1536K 0700 modemst2
12 238568 259047 10.0M 0700 oppodycnvbk
13 259048 279527 10.0M 0700 oppostanvbk
14 115671040 121552895 2872M 0700 system
15 3006464 3071999 32.0M 0700 persist
16 3072000 4120575 512M 0700 cache
17 4120576 4153343 16.0M 0700 recovery
18 4153344 4156415 1536K 0700 fsg
19 4161536 4161537 1024 0700 fsc
20 4161538 4161553 8192 0700 ssd
21 4161554 4163601 1024K 0700 misc
22 4163602 4196369 16.0M 0700 LOGO
23 4196370 4261905 32.0M 0700 DRIVER
24 4261906 4327441 32.0M 0700 reserve1
25 4327442 4360209 16.0M 0700 reserve2
26 4360210 4376593 8192K 0700 reserve3
27 4376594 4507665 64.0M 0700 reserve4
28 4521984 115671039 53.0G 0700 userdata
29 121552896 122142686 287M 0700 grow
/tmp # cat /etc/fstab
/dev/block/mmcblk0p1 /firmware vfat rw 0 0
/dev/block/mmcblk0p14 /system ext4 rw 0 0
/dev/block/mmcblk0p28 /data ext4 rw 0 0
/dev/block/mmcblk0p16 /cache ext4 rw 0 0
/tmp # df -h
Filesystem Size Used Available Use% Mounted on
tmpfs 1.4G 32.0K 1.4G 0% /dev
tmpfs 1.4G 28.0K 1.4G 0% /tmp
/dev/block/mmcblk0p16
503.9M 8.4M 495.5M 2% /cache
/dev/block/mmcblk0p28
52.2G 180.0M 52.0G 0% /data
/dev/block/mmcblk0p28
52.2G 180.0M 52.0G 0% /sdcard
Click to expand...
Click to collapse
have you figured it out?
i was succeeded, through
Failed to mount '/system' (invalid argument)
i have seen also.
i was able to sideload lineage and boot it.
After rebooting into recovery the error message was away.
After that i sideloaded lienage again, then bacon-resize-system.zip.
After that i was able to sideload Gapps Nano, the required size check was successful
Oh wait, you have OPO Phone, not OnePlus One
you can try to restore your partiotion table from backup created earlier
Bash:
./sfdisk-arm -f /dev/block/mmcblk0 < bacon.gpt
OnePlus One (Bacon) 3/64
twrp-3.6.0_9-0-bacon.img
lineage-18.1-20211223-nightly-bacon-signed.zip
open_gapps-arm-11.0-nano-20220112.zip

Categories

Resources