{
"lightbox_close": "Close",
"lightbox_next": "Next",
"lightbox_previous": "Previous",
"lightbox_error": "The requested content cannot be loaded. Please try again later.",
"lightbox_start_slideshow": "Start slideshow",
"lightbox_stop_slideshow": "Stop slideshow",
"lightbox_full_screen": "Full screen",
"lightbox_thumbnails": "Thumbnails",
"lightbox_download": "Download",
"lightbox_share": "Share",
"lightbox_zoom": "Zoom",
"lightbox_new_window": "New window",
"lightbox_toggle_sidebar": "Toggle sidebar"
}
DISCLAIMER!
Operations on phone’s partition could be EXTREMALY dangerous.
As You surely expect - I take no resposibility if something will go... not as it supposed to. The responsibility for potential damages caused by using this guide is Yours, and Yours only!
New system partition scheme is “designed” for custom ROMs NOT based on original Samsung firmwares (because of it’s size and using /preload partition, which we intend to extremely resize), to name just a few reasons).
The method of modification is created by @Tesla-MADAL93 from Galaxy Advance sub-forum, all credits should go to him!!! He spend many hours using trials and errors method to achieve final success.
Part ONE: Preparations / theory.
1.Procedure requires any Linux distro with usb connection configured (tested on Ubuntu 12.04 LTS).
2.Working ADB (android debug bridge) – you don’t need to install whole ADK, just adb file with correct path added.
[EDIT/CAUTION]You can use Windows with adb configured, as proven by @maxprzemo, but I wasn’t tested by author of this guide!
3.It is strongly recommended to make a backup of your apps and data before start (using titanium backup or simipar app) Restoring nandroid backup will destroy your new partitions, so don’t use it!!!
4.With this method “safe partiotions” of phone’s eMMC memory are being removed and recreated „safe” using „parted” command in adb shell mode. Some partitions are extremely decreased, one is totally deleted. And the most important – partition of your choice will be expanded. Example displayed below sets internal (DATA) partition as large as possible (almost).
5.You will need external micro SD card after remodelling partitions)
6.Memory swap (SD0 and SD1) required BEFORE first start of your chosen ROM!!!
7.You can restore original partition scheme using Heimdall or Odin (not tested by me, problems with Odin reported by the author of whole modification) with repartition selected.
8.Partition numbers and names are very important (crucial), so we need to create them correctly, setting beginning and the end of each one very carefully.
9.Last important thing! I use minimal gapps pack for every ROM. I didn’t tested if full gapss fit on new /system partition! You’ll have to check it by yourself!
Default partitions and sizes are displayed here:
With this guide you will achieve something like this:
[Side Note: this is just an example – you can make internal card (UMS partition) bigger, leaving /DATA partition intact, just to install bigger games – you’ll have to calculate your own values]
Part TWO: Repartition
OK., let’s do it! You have to perform all steps EXACTLY in described order!
1.Turn phone on in recovery mode, connect it to computer using usb cable.
2.Open terminal / console (Ctrl+Alt+T)
2a. Enter command:
Code:
adb devices
You should see device connected (some numbers and letters)
3.Write (press enter after each command):
Code:
adb shell
su
parted /dev/block/mmcblk0
unit kb
print
You should see default partition scheme (just as one first screen above)
OK., say goodbye to your old partitions. Deleting other partitions could (and probably – will) have irreversible consequences!!
Now we will delete partitions, starting from the last one:
Code:
rm 8
rm 11
rm 9
rm 4
Now you will encounter some error – despite of the unmounting partitions before abovementioned procedure - /cache partition is now mounted. Do not unplug phone, just enter “mount and storage” submenu in recovery, and unmount cache partition)
So let’s continue:
Code:
rm 4
rm 5
rm 3
You just deleted all “safe” partitions, enter to check this:
Code:
print
OK., it’s time to (re)create!
(SYSTEM, partition 3)
Code:
mkpart primary 105906 525906
(CACHEFS, partition 4)
Code:
mkpart primary 3848809 3948809
(DATAFS, partition 5)
Code:
mkpart primary 525906 3848809
(UMS, partition 8)
Code:
mkpart primary 3948873 3948937
(HIDDEN, partition 9)
Code:
mkpart primary 3948809 3948873
Let’s rename them properly (probably you can do it in one mkpart command, but it doesn’t matter):
Code:
name 3 SYSTEM
name 4 CACHEFS
name 5 DATAFS
name 8 UMS
name 9 HIDDEN
Almost done, let’s check:
Code:
print
Nice? Of course it’s nice!!! )
One last thing – we have to make our magic /preload (HIDDEN) partition visible for phone [it won’t boot without it!!] Because recovery won’t format it properly, lets use parted command for a last time (wait after each command):
Code:
mkfs
y
9
ext2
Now you can unplug the phone and format (in recovery) partitions:
/system
/data
/cache
OK, as I said before – you’ll have to switch storages BEFORE using phone again.
For now – you will have to manage it by yourself, just to make it short:
-for 4.2.x ROMs you can use modified vold.fstab file
-for 4.3.x ROMs – you have to manually modify build.prop, or use available zip package that will do it for you (that method is supposed to work with 4.2.x ROMs, but I didn’t test it!)
-I never used any of 4.4.x ROMs, but as I heard, there is method for switching memories too.
WARNING!
I didn’t test the way back to original partition sizes! It was tested by tesla-Madal93 though…
Sometimes (when transfer ring from one android version ROM to other, or using some old version where /preload partition was set as SWAP) you will need manualny format HIDDEN partition, just as shown above:
in adb shell mode:
Code:
parted /dev/block/mmcblk0
Code:
mkfs
y
9
ext2
FINAL WORD: If you are not sure – DON’T DO IT!!!
Screenshots are broken... I assume this deletes the "USB storage"? If then, you and the OP are bosses :good:
I can see the pictures (but are linked from other forum, i'll switch them in future), but yes - it deletes usb storage (ok, not really - new usb storage has 64KB and doesn't have to be even formatted)
Good job !:good:
Personaly i wont do it ever because 1,2 GB is enough, and if i get over that surely i have something on phone that i need to delete because i am not using it
Great post.
I would love to see the same mkpart commands to recover the preload partition space and allocate it to the data partition.
I'll do the full repartitioning thing when the team canjica CM11 major bugs have been solved. I'm not too confident about the other cm11's memory swap sustainability over time
Sent from my GT-I8160 using Tapatalk
I suggest you making script for this, and one script to revert everything like it was before
Rox said:
I suggest you making script for this, and one script to revert everything like it was before
Click to expand...
Click to collapse
I don't know if I can make something as a simple script for recovery (maybe with busybox), but for Linux yes (to automate repartition process). In every case, I will tell/send it to @judas1977 that will provide to update this guide.
@judas1977: Nice work
My new system partition
Made under windows 7
Well done judas77 and Tesla-MADAL93 :laugh:
I'll try to make (semi)automate script for linux terminal in couple of days (unless @Tesla-MADAL93 make this) - then we can have/prepare separate scripts for various partition sizes:
- bigger /DATA
- bigger /UMS (like @maxprzemo did)
- etc...
My partition table (actual formatted sizes 602M /system, 28M /cache, 2150M /data, 761M /sdcard -- no need to swap storage)
3 105906kB 747635kB 641729kB ext4 SYSTEM
4 747636kB 777636kB 30001kB ext4 CACHEFS
5 777636kB 3118935kB 2341299kB ext4 DATAFS
8 3118935kB 3918936kB 800001kB fat32 UMS
9 3918936kB 3948937kB 30001kB ext2 HIDDEN
Original partitions:
Model: MMC SEM04G (sd/mmc)
Disk /dev/block/mmcblk0: 3959423kB
Sector size (logical/physical): 512B/512B
Partition Table: gpt
Number Start End Size File system Name Flags
10 524kB 1573kB 1049kB PIT
6 1573kB 3146kB 1573kB CSPSA FS
7 4194kB 14680kB 10486kB ext4 EFS
2 14680kB 31457kB 16777kB ext4 Modem FS
14 32506kB 34603kB 2097kB SBL
16 34603kB 36700kB 2097kB SBL_2
1 36700kB 53477kB 16777kB PARAM
12 53477kB 55575kB 2097kB IPL Modem
13 55575kB 72352kB 16777kB Modem
15 72352kB 89129kB 16777kB Kernel
17 89129kB 105906kB 16777kB Kernel2
3 105906kB 747635kB 641729kB ext4 SYSTEM
5 747635kB 2056258kB 1308623kB ext4 DATAFS
4 2056258kB 2377122kB 320864kB ext4 CACHEFS
9 2377122kB 2712666kB 335544kB ext4 HIDDEN
11 2712666kB 2765095kB 52429kB Fota
8 2765095kB 3948937kB 1183842kB fat32 UMS
Minimum sizes and warnings
/system 530M (approximate value, calculated for CM10.2 + my gApps) (10MB margin)
/cache 8M (assuming dalvik.vm.dexopt-data-only=1 && dalvik.vm.dexopt-cache-only=0) (2MB margin)
/data 350M (assuming about 100M of actual usable app space) (20MB margin) -- in practice less than 600 will be quite tight
/sdcard 1M (depends on apps again and FAT fragments easily by design, avoid less than 100M)
Now what should be nice having are ROM variants with internal storage disabled, so that we can remove partition 8 and both bypass the need for storage swapping but also avoid some apps not desiged for 2 "SDs" getting partially broken
I just repartitioned my phone, but acidentally I partitioned partition 2 instead of 3 :/
Now when I try to rename the partition 2 again in "Modem FS" with the name command, it only names the partition as "Modem". Can someone explain me please how to rename it to the original name again?
Thank you
S.AMU said:
I just repartitioned my phone, but acidentally I partitioned partition 2 instead of 3 :/
Now when I try to rename the partition 2 again in "Modem FS" with the name command, it only names the partition as "Modem". Can someone explain me please how to rename it to the original name again?
Thank you
Click to expand...
Click to collapse
Try "Modem FS" with quotes, or maybe Modem\ FS
Ryccardo said:
Try "Modem FS" with quotes, or maybe Modem\ FS
Click to expand...
Click to collapse
renaming worked with the quotes. Thanks
I restored my old nv_backup and now the device is booting... Let's see if it will work. I'm just confused, because in recovery the partition is called modemfs and when restoring nv backup it is called Modemfs....
botid said:
Great post.
I would love to see the same mkpart commands to recover the preload partition space and allocate it to the data partition.
Click to expand...
Click to collapse
Impossible (well, without LVM or something) because there's USB storage in the middle... but with 10 minutes and a calculator you can create your partition sizes relatively easily
If I'll make the following changes in partitions: UMS resize to 400MB, CACHEFS resize to 30MB, DATAFS resize to 2,313GB, Fota 0 MB and I'll leave SYSTEM and HIDDEN to default sizes can I restore CWM Recovery backup or flash stock rom with Odin?
The HIDDEN partition will have the same size, but the location on mmc is different, as you can see below.
3 105906kB 747635kB 641729 kB ext4 SYSTEM
5 747635kB 3173073kB 2425438kB ext4 DATAFS
4 3173073kB 3203793kB 30720 kB ext4 CACHEFS
9 3203793kB 3539337kB 335544kB ext2 HIDDEN
8 3539337kB 3948937kB 409600KB fat32 UMS
Sorry for my english.
powermetza said:
If I'll make the following changes in partitions: UMS resize to 400MB, CACHEFS resize to 30MB, DATAFS resize to 2,313GB, Fota 0 MB and I'll leave SYSTEM and HIDDEN to default sizes can I restore CWM Recovery backup or flash stock rom with Odin?
The HIDDEN partition will have the same size, but the location on mmc is different, as you can see below.
3 105906kB 747635kB 641729 kB ext4 SYSTEM
5 747635kB 3173073kB 2425438kB ext4 DATAFS
4 3173073kB 3203793kB 30720 kB ext4 CACHEFS
9 3203793kB 3539337kB 335544kB ext2 HIDDEN
8 3539337kB 3948937kB 409600KB fat32 UMS
Sorry for my english.
Click to expand...
Click to collapse
Nandroid: I wouldn't personally do it but it should work
Odin: definitely repartition with PIT and full image first
And be sure to input the partitions in numerical order!
You can make a script? For linux and winzozz?
Sent from my GT-I8160 using XDA Premium 4 mobile app
Don't make CACHEFS partition under a minimum 100 MB!!!
In this partition is stored system apps' dalvik cache on all CM and CM-based ROMs, if available space is insufficient to store dalvik cache of all system apps the ROM isn't stable and has lot of FCs depending on what caches are not stored. If you want to go under 100 MB (that I advice) first check actual used space on this partition with Partition Table (available on Play Store) on your ROM, remember that every ROM has its system-dalvik cache size depending from apps' classes.dex
Inviato dal mio GT-I9070
Tesla-MADAL93 said:
Don't make CACHEFS partition under a minimum 100 MB!!!
Click to expand...
Click to collapse
And why?
I've had zero problems in Android with 10 MB as long as you keep dalvik-cache away from it ( dalvik.vm.dexopt-data-only=1 and …cache-only=0)
Recovery probably uses it more though...
Ryccardo said:
And why?
I've had zero problems in Android with 10 MB as long as you keep dalvik-cache away from it ( dalvik.vm.dexopt-data-only=1 and …cache-only=0)
Recovery probably uses it more though...
Click to expand...
Click to collapse
In this way is okay, but not all people know this I think. Should be added to first post @judas1977
Inviato dal mio GT-I9070
Related
You NO larger need GParted or a Linux/Unix distro in order to make your own data.img! You NO longer need a command prompt either. However, you can use the command prompt still as an alternative option since this supports the commands in Windows. But this is an application.
With this Application you can create a brand NEW data.img or Add/Subtract space from an existing data.img. Example: You can take a 256MB data.img & make it convert to a 1GB data.img or take a 1GB data.img & make it 256MB data.img. Maximum space possible shown is based on the HDD or SD space left. So you could create a 150GB data.img if the drive had 150GB free space. It is completely safe & wont do anything to damage an existing data.img.
You will need WinRar or 7zip to extract the .RAR for this download.
WARNING!: DO NOT MAKE YOUR DATA.IMG Larger than 2GB because Android will not recognize the SD Card after. I will test this later.
1024 = 1GB
2048 = 2GB
4096 = 4GB
8192 = 8GB
Just double the #!
Screenshot:
{
"lightbox_close": "Close",
"lightbox_next": "Next",
"lightbox_previous": "Previous",
"lightbox_error": "The requested content cannot be loaded. Please try again later.",
"lightbox_start_slideshow": "Start slideshow",
"lightbox_stop_slideshow": "Stop slideshow",
"lightbox_full_screen": "Full screen",
"lightbox_thumbnails": "Thumbnails",
"lightbox_download": "Download",
"lightbox_share": "Share",
"lightbox_zoom": "Zoom",
"lightbox_new_window": "New window",
"lightbox_toggle_sidebar": "Toggle sidebar"
}
How to make a NEW(Fresh) Data.img:
NOTE: In order to start NEW you must have wiped your SD card or removed every file or folder such as: .REC, Cache, Android, OLD Data.img & any apps that took a folder on the card.
1. Open TopoResize
2. Select "Create New"
3. Select Save destination such as the SD Card & name it data
4. Select "Create File"
5. Select ext2 or ext3
6. Hit Ok & it will autorun.
DONE!
How to add space to an existing Data.img:
1. Open TopoResize
2. Select "Find File"
3. Locate file & select it
4. Use the size slider to select the extra space
5. Select "Resize File"
6. It will autorun
DONE!
How to subtract space to an existing Data.img:
Same instructions apply to add space just use the slider to go down & select resize file.
How to read the system.ext2 & transfer it over to the desktop:
1. Open Ext2explore
2. Select File & Open Image
3. Goto the system.ext2 & select it
4. Select Save
5. Select a destination to save it to. (Save it to a folder is preferred, so make one.)
INSTRUCTIONS TO CREATE A NEW or MODIFY EXISTING DATA.IMG via Command Prompt:
1. Open Command Prompt
2. Goto the directory of Data.img Maker
3. Enter dd if=/dev/zero bs=1M count=XXX >> data.img (XXX = Amount of Space for NEW such as 256MB is 256. Also if file is 256 already add 256 to make modified data.img = 512MB)
Alternative method! Instead of dd. You can use the following (only for new data.img):
Enter tfile data.img XXX (XXX = Size of MB ex. 1024 = 1GB. For new data.img only)
Alternative method! Instead of dd. You can use the following (only for modify data.img):
Enter Resize2fs -p data.img XXXXXX (1024*512MB=524288, always use 1024 times amount of space like 1024MB=1GB, so 1024*1024MB=1048576 for modify data.img only, can skip dd & just run this command for modify!)
4. Enter Mke2fs data.img (This will actually partition it so it doesnt come out as a bad read, MODIFY DATA IMAGE DOES NOT APPLY TO THIS STEP!)
5. Enter Resize2fs -f data.img (This will resize it for MODIFY ONLY! NOTE: can skip if you did the alternative method for existing!)
6. Enter E2fsck -f data.img (This checks to make everything is correct)
DONE!
Creating NEW Example:
d:\Software\DATA.IMG Maker\DATA.IMG Maker>dd if=/dev/zero bs=1M count=512 >> dat
a.img
rawwrite dd for windows version 0.6beta3.
Written by John Newbigin <[email protected]>
This program is covered by terms of the GPL Version 2.
512+0 records in
512+0 records out
d:\Software\DATA.IMG Maker\DATA.IMG Maker>mke2fs data.img
mke2fs 1.40.6 (09-Feb-2008)
data.img is not a block special device.
Proceed anyway? (y,n) y
Filesystem label=
OS type: Linux
Block size=1024 (log=0)
Fragment size=1024 (log=0)
131072 inodes, 524288 blocks
26214 blocks (5.00%) reserved for the super user
First data block=1
Maximum filesystem blocks=67633152
64 block groups
8192 blocks per group, 8192 fragments per group
2048 inodes per group
Superblock backups stored on blocks:
8193, 24577, 40961, 57345, 73729, 204801, 221185, 401409
Writing inode tables: done
Writing superblocks and filesystem accounting information: done
This filesystem will be automatically checked every 25 mounts or
180 days, whichever comes first. Use tune2fs -c or -i to override.
d:\Software\DATA.IMG Maker\DATA.IMG Maker>e2fsck -f data.img
e2fsck 1.40.6 (09-Feb-2008)
Pass 1: Checking inodes, blocks, and sizes
Pass 2: Checking directory structure
Pass 3: Checking directory connectivity
Pass 4: Checking reference counts
Pass 5: Checking group summary information
data.img: 11/131072 files (9.1% non-contiguous), 18858/524288 blocks
Alternative examples:
Using tfile to create fresh data.img instead:
D:\Software\DATA.IMG Maker\DATA.IMG Maker>tfile data.img 512
data.img
sizeMB= 512
Using resize2fs only to resize w/o anything else:
D:\Software\DATA.IMG Maker\DATA.IMG Maker>resize2fs -p data.img 524288
resize2fs 1.40.6 (09-Feb-2008)
Resizing the filesystem on data.img to 524288 (1k) blocks.
Begin pass 1 (max = 30)
Extending the inode table XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
The filesystem on data.img is now 524288 blocks long.
Download HERE! (Alternate)
NEED HELP? Comment here.
FINALLY! Thanks. I'm sure this will definitely come in useful. Downloading now... Testing later.
Yeah, really appreciated! Downloaded and will try out and report back (expanding standard 256MB data .img months old to 512MB or 1GB).
Nice App
I tried this out a few days ago to see how easy it was to use and how well. It was surprisingly simple. Good app. Worked like a charm.
OK. First of all a big thanks Viper.
But -yes it IS a stupid question but i don't get it - what does this application do beside from making a data.img with various sizes. I use android now for -i think it is- a long(er) time and just want to know what i can do to explore the System .
Cheers Bieka
Bieka said:
But -yes it IS a stupid question but i don't get it - what does this application do beside from making a data.img with various sizes. I use android now for -i think it is- a long(er) time and just want to know what i can do to explore the System .
Click to expand...
Click to collapse
That's all it does... Other questions?
arrrghhh said:
That's all it does... Other questions?
Click to expand...
Click to collapse
Uhm am i kickin' myself out if i ask what this (making various sizes of a data.img file) means?! Is this the storage size android gets?
That's all it does... Other questions?
Click to expand...
Click to collapse
Uhm am i kickin' myself out if i ask what this (making various sizes of a data.img file) means?! Is this the storage size android get?
Click to expand...
Click to collapse
You kno the way if you had an android device you would have sd storage and phone storage? and phone storage would be used for apps? well this data.img is lik a virtual phone memory, When you install apps they are stored on the data.img. And for alot of of ppl 256mb isnt enough, but unlike physical harware phone memory the data.img can be made bigger. understand?
Also a big tanks viper matrix, i was looking for a way to do this a couple weeks ago, i got it sorted by using someones modified rootfs to create a new data.img but this application will probly still come in handy
Aaaaah. Thanks a lot. Now i get it Simple and obvious .
Now i can say Thanks Viper for this aplication ^^ Great Job
Worked GREAT expanding trusty months-old data.img from nearly filled up 256MB to glorious 1GB. Now Android reports memory is over 990MB!
Dead simple: run the .bat, point to data.img on SD, move slider to expand size and go. Recognized errors, corrected them, then set to it's task which took a few minutes. Done.
Superb tool, waaay too unknown to group.
Open ext2explore & goto your system.ext2 & open it & then youll be able to save it to your desktop.
Use it on the desktop & make sure its extracted into a folder.
hi!
i linked my thread to your tool if you don't mind.
posting this app in the hd2 forums would bring it a LOT of attention.
@Viper
Excellent work on these apps! I was easily able to resize my data.img. I also tried ext2explore, which works well extract items from a system.ext2. A few questions:
- Would it be possible to have the data.img resizer use standard sizes, like 524288 for 512MB, 786432 for 768MB, 1048576 for 1GB (I think you get the idea). It seems like the resizing sizes are a bit arbitrary - or is there some sort of correlation between the standard sizes and the ones selectable in the app? Or, is there a way to put these values in manually?
- In the ext2explore app, will the possibly to Copy/Cut/Paste ever be added (or drag & drop from Explorer)?
I would love to see these apps developed further .
Again, great work!
P.S. I was hoping to be able to use ext2explore to add the BLAZN theme to the FRX03 build (see this thread) - that's when I realized I couldn't copy/paste.
Viper Matrix Wireless said:
You NO larger need GParted or a Linux/Unix distro in order to make your own data.img! You NO longer need a command prompt either. However, you can use the command prompt still as an alternative option since this supports the commands in Windows. But this is an application.
With this Application you can create a brand NEW data.img or Add/Subtract space from an existing data.img. Example: You can take a 256MB data.img & make it convert to a 1GB data.img or take a 1GB data.img & make it 256MB data.img. Maximum space possible shown is based on the HDD or SD space left. So you could create a 150GB data.img if the drive had 150GB free space. It is completely safe & wont do anything to damage an existing data.img.
You will need WinRar or 7zip to extract the .RAR for this download.
WARNING!: THIS HAS NOT BEEN TESTED, DO NOT MAKE YOUR DATA.IMG Larger than 2GB because Android may not recognize the SD Card after. I will test this later.
1024 = 1GB
2048 = 2GB
4096 = 4GB
8192 = 8GB
Just double the #!
Screenshot:
How to make a NEW(Fresh) Data.img:
NOTE: In order to start NEW you must have wiped your SD card or removed every file or folder such as: .REC, Cache, Android, OLD Data.img & any apps that took a folder on the card.
1. Open TopoResize
2. Select "Create New"
3. Select Save destination such as the SD Card & name it data
4. Select "Create File"
5. Select ext2 or ext3
6. Hit Ok & it will autorun.
DONE!
How to add space to an existing Data.img:
1. Open TopoResize
2. Select "Find File"
3. Locate file & select it
4. Use the size slider to select the extra space
5. Select "Resize File"
6. It will autorun
DONE!
How to subtract space to an existing Data.img:
Same instructions apply to add space just use the slider to go down & select resize file.
How to read the system.ext2 & transfer it over to the desktop:
1. Open Ext2explore
2. Select File & Open Image
3. Goto the system.ext2 & select it
4. Select Save
5. Select a destination to save it to. (Save it to a folder is preferred, so make one.)
Download HERE!
NEED HELP? Comment here.
Click to expand...
Click to collapse
Or you just install linux and make that all with one or two mouse clicks by your self
d0nate110 said:
Or you just install linux and make that all with one or two mouse clicks by your self
Click to expand...
Click to collapse
That's not an option for everyone , so Viper's tool is very useful for those people (like me) .
Captain_Throwback said:
That's not an option for everyone , so Viper's tool is very useful for those people (like me) .
Click to expand...
Click to collapse
For me it is ONLY option, cuz with linux I can apply my lovely BLAZN theme to any Froyo etc. Release what I want
Jandyman said:
You kno the way if you had an android device you would have sd storage and phone storage? and phone storage would be used for apps? well this data.img is lik a virtual phone memory, When you install apps they are stored on the data.img. And for alot of of ppl 256mb isnt enough, but unlike physical harware phone memory the data.img can be made bigger. understand?
Also a big tanks viper matrix, i was looking for a way to do this a couple weeks ago, i got it sorted by using someones modified rootfs to create a new data.img but this application will probly still come in handy
Click to expand...
Click to collapse
making sure I understand, under sd card in settings....phone free space, this is what it does...makes that free space bigger? more storage.?
Resized the img file from 512MB to 2 gigs, but I'm using the HD2 Nexus ROM, and it doesn't report the correct disk space usage. It still shows like 65MB free as it did before resizing. The file resized properly, but the phone doesn't report that.
Normal? If not, did I do something wrong? I followed the directions...
This is an idea to make the HD2 faster and fancy, I worked with Xylograph to make it more usable and easy to implement by common users.
Index
Post 1 Introduction
Post 2 ROMs, Scripts, Installer template for Devs by Xylograph
Post 3 Q&A
Introduction
We have SD ROMs for very long time, but I think most of the people should agree with me that the SD ROMs are slower than NAND ROMs. because the SD ROMs use system.ext4 and data.ext4 files to store all the ROM contant on the FAT partition, the IO access is the bottleneck.
My Class10 SD card has 10MB/s R/W speed, but the NAND flash R/W speed is only about 4MB/s. so if we can directly install the ROMs to SDCARD and boot from SDCARD we will get lots of benifits:
Faster Read/Write speed than NAND ROMs
Bigger data partition for user space (depends on how big the ext4 partition on SDCARD)
Install servel ROMs at the same time. and each ROM share the same space
Muilt-boot support, easy to switch between the ROMs been installed.
The NativeSD Rom is a new kind of ROM it needs an ext4 partition on your SDCARD.
This thread will tell you how to install a ROM to SDCARD and give some script templates for ROM Devs to make the ROM installer which can support install the ROM to NAND flash or SD/EXT4.
Install the ROM to SD/EXT4 will not effact the ROM(WM or Android) on NAND flash, NativeSD should support run from MAGLDR CLK or WM6.5(need test).
Important Notes:
Backup all the SDCARD content to PC before you create the ext4 partition on SDCARD.
Change Log:
05-09-2012 @2nd Post [05-09-2012] NativeSD Dual Installer v2 [nand/sdext][wip]
10-09-2012 Add NativeSD CM7 script template
13-09-2012 nativeSDMultiBoot Version4 Credits to datagr
20-09-2012 nativeSDMultiBoot Version5 Credits to datagr
26-09-2012 nativeSDMultiBoot Version6 Credits to datagr
30-10-2012 nativeSDMultiBoot Version9 Credits to datagr
30-10-2012 New initrd mod for NativeSD Credits to marco.palumbi
[05-09-2012] NativeSD Dual Installer v2 [nand/sdext][wip]
{
"lightbox_close": "Close",
"lightbox_next": "Next",
"lightbox_previous": "Previous",
"lightbox_error": "The requested content cannot be loaded. Please try again later.",
"lightbox_start_slideshow": "Start slideshow",
"lightbox_stop_slideshow": "Stop slideshow",
"lightbox_full_screen": "Full screen",
"lightbox_thumbnails": "Thumbnails",
"lightbox_download": "Download",
"lightbox_share": "Share",
"lightbox_zoom": "Zoom",
"lightbox_new_window": "New window",
"lightbox_toggle_sidebar": "Toggle sidebar"
}
NativeSD Dual Installer v2
Keep in mind that this is a work in progress featuring a possibility to run a full nand rom on a SD-EXT partition..
Please check my current AOKP & PA jellybean ROMS or CM9ight ICS ROM for some 'NativeSD functionality' in action
Features:
Compatible with every bootloader and stock OS
Recovery package for users without Android on nand
Pre-Installation Requirements and recommendations:
HTC HD2 Phone
Sdcard with enough free space (performance may differ based on the quality of your card)
4EXT Recovery (Highly recommended)
Primary Fat32 partition and Primary EXT4 partition
Downloads : (Please do not mirror stuff)
Download 4EXT Recovery from here.
Pick the SD version if you would like to boot 4EXT Recovery from SD (unpack to your sdcard)
Pick the NAND version if you would like to flash the 4EXT Recovery on your NAND (flashable via recovery)
Users with non-working hardware keys can try the various touch recoveries I've ported , though I highly recommend 4EXT recovery..
Dual_Installer_v2_example.zip (only for advanced users, unpack the contents to your computer)
Contents :
4EXTRecoverySD for users with no or a different recovery on nand:
Code:
- Contains 4EXT Recovery ported for SD users.
- Unpack to the root of your sdcard
- Set your SD Boot to the Recovery folder or use clcad/haret to boot
4EXTRecoveryNAND for users who would like this recovery on nand:
Code:
- Contains 4EXT Recovery for android NAND users
- Flash it using DAF.exe (Magldr) cLK users can flash it using the HD2 toolkit
Dual Installer example Package (advanced users) :
Code:
- Contains an example (not flashable!) of how I use this for my roms.
- You can check all the stuff, folder structure and scripts.
- I've tried to make the updater-script and aroma-config 'easy to read'
- Placeholders with text on what to put where when porting stuff to NativeSD.
Installation Steps & Instructions:
Sdcard for NativeSD:
Code:
1. First make sure you have at least 1 Fat32 partition and 1 EXT4 partition on your sdcard
2. If you don't have these partitions ?? [B]backup your sdcard[/B][COLOR="Red"][B] , because everything will be wiped from your sdcard when you create partitions and format them ![/B][/COLOR]
3a Use the [URL="http://goo.im/devs/Xylograph/Various/Recoveries"]provided 4EXT recovery (NAND or SD version)[/URL] to create the partitions and format them.
3b If you rather use a computer for creating and formatting partitions keep in mind that both partitions [B]must[/B] be primary partitions (not logical)
4. The recommended size of your EXT4 partition is depending on how many roms and apps you are going to install.. 512M is the minimal size..
5. Restore/move the sdcard contents back to the Fat32 partition
6. (WP7 users) make sure the EXT4 partition is located @ /dev/block/mmcblk0p2
To check this mount your sd-ext partition in 4EXT recovery and use adb shell or QtADB shell and type [B]df[/B]
7. Your sdcard is now ready for NativeSD usage..
NativeSD Installation for Magldr NAND Android & WP7 users :
Code:
1. WP7 and SD users set your SD BOOT directory to the 'Recovery' folder by choosing '10.services' , '1. Bootsettings' , 3. AD SD Dir in the Magldr menu.
2. Boot into (NAND or SD) 4EXT recovery.
3. Flash the ROM.zip package and follow instructions
4. Set your SD BOOT directory to the 'NativeSD' folder after flashing the ROM (see step 1)
5. Boot into the ROM and have fun..
NativeSD Installation for cLK NAND Android users : (thanks clio94)
Code:
1. Copy the [URL="http://www.mediafire.com/?nhyausx0p5whu"]flash_bootv2.zip[/URL] to your sdcard.
2. Boot into cLK and make a sboot partition.Be aware that only clk from kokotas allows to make a sboot partition directly from device
3. Boot into recovery (4EXT recovery = recommended) and install rom by choosing sd-ext method
4. After installation finishes,dont reboot, but install flash_sbootv2.zip and then reboot to cLK
5. In cLK choose to boot from sboot and wait for the ROM to boot.
6. If you are stuck on the boot animation,try to wipe your ext partition and install the ROM again.
NativeSD Installation for Windows Mobile and other OS users :
Code:
1. Boot into recovery by executing the usual clcad and haret stuff inside the Recovery folder.
2. Flash the ROM.zip package and follow instructions
3. Reboot and boot the ROM by executing the usual clcad and haret stuff inside the NativeSD folder.
RMNET or PPP ??? summary :
Code:
- as of dual installer v2 you can choose your data connection during ROM installation
- For Magldr users I recommend using the RMNET connection
- For all other users I recommend using the PPP connection (default)
- PPP connection should work for all users !
Switch between different NativeSD ROMS ?
Code:
- If you want to use a previously installed/other NativeSD ROM ?
- Copy the contents of that roms folder found inside the NativeSD folder to the root of the NativeSD folder (overwriting the kernel+ramdisk)
- Boot to sd and that ROM will boot !
- Repeat the above steps when you want to switch again
- In the future we want to make the above steps easier and possible with either a 'gscript' or an 'android app'
Previous Roms (Examples) featuring NativeSD and Dual Installer :
Code:
- [URL="http://d-h.st/pFR"]PA_v1.992se_dual_installer_v2.zip[/URL] - [B][URL="http://tinyw.in/Xhft"]mirror[/URL][/B] (Flash via recovery) - md5: ce2138748c6b2cbc62848272acf92600
- [URL="http://d-h.st/p33"]AOKP_N2408se_dual_installer.zip (Magldr only!)[/URL] - [B][URL="http://tinyw.in/clMS"]mirror[/URL][/B] (Flash via recovery) - md5: 6a116ad3eebb0f92729af6954f0a9217
*** all flashing is at your own risk ! Always make backups in recovery and/or titanium backup ! ***
*** This is a NativeSD thread ! Please, Keep this thread NativeSD related and report issues with roms in the rom thread !!! ***
Thanks & Credits to : securecrt, Phoenix, clio94, LNE team and everybody I forgot !
Q&A
How is the NativeSD ROM work?
To boot the Android from SD card, the old SD ROMs mount the system.ext4 and data.ext4 before the init(rename to init.android) thread is start. I changed the initrd.gz to make it mount the ext4 partition before the android init.android start. here is the main code for the init script
Code:
echo "mount system and data partition on sdcard"
# change the rom_name TO PA MIUI CM7 will support
# to boot other system on SD/EXT4
# the system layout :
# /NativeSD/NexusHD2/
# /system
# /data
# /PA/
# /system
# /data
# /MIUI/
# /system
# /data
# /app
# the app dir is shared for all ROMs
#
# set the name of the rom to boot
rom_name="PA"
# mount the 1st (NativeSD) SD-EXT partition
mkdir -p /NativeSD
mount -t ext4 -o rw,noatime,nodiratime,barrier=0 /dev/block/mmcblk0p2 /NativeSD
# mount the system data app dir
mount --bind /NativeSD/$rom_name/system /system
mount --bind /NativeSD/$rom_name/data /data
# create app data/app dir
mkdir -p /NativeSD/app
mkdir -p /data/app
mount --bind /NativeSD/app /data/app
So for the ROM Devs should create new initrd.gz which is different with the NAND version, use different rom_name distinguish with others the whole templete is in 2nd post by Xylograph
How is the multi-boot works on NativeSD ROM?
Set the SD boot dir /sdcard/NativeSD in Magldr or CLK,the dir structure is
/sdcard/NativeSD/NexusHD2/zImage
/sdcard/NativeSD/NexusHD2/initrd.gz
/sdcard/NativeSD/PA/zImage
/sdcard/NativeSD/PA/initrd.gz
/sdcard/NativeSD/zImage
/sdcard/NativeSD/initrd.gz
The Magldr& CLK always read the /sdcard/NativeSD/zImage /sdcard/NativeSD/initrd.gz files to boot, so if you want to switch from PA to NexusHD2 just only need to copy the zImage & initrd.gz to the up layer dir, use the NativeSD ROM switch app made by datagr
How to convert the NAND ROM to NativeSD ROM?
HOWTO port NAND ROM to NATIVESD STEP-BY-STEP Credits to c1cl0n
This is for Devs and advanced users only. For example if we got the NAND version of the NexusHD2 extract the zip file and replace 2 files and add 1 file will finish the convert.
/kernel/boot/initrd.gz
the initrd.gz is similar with the SD ROMs but need to change the init script to mount the ext4 partition
/META-INF/com/google/android/updater-script
the updater-script is used for CWM to execute the install process; execute install.sh before copy the system content to the ext4, here is the sample code
Code:
package_extract_file("install.sh", "/tmp/install.sh");
set_perm(0,0, 0777, "/tmp/install.sh");
run_program("/tmp/install.sh");
show_progress(0.8, 80);
if file_getprop("/tmp/nfo.prop","NativeSD") == "true"
then
package_extract_dir("kernel/boot", "/boot");
package_extract_dir("kernel/boot", "/boot_dir");
package_extract_dir("system", "/system");
......
else
ui_print("can't find ext4 partition on your SDcard");
ui_print("install failed");
endif;
/install.sh
Code:
#!/sbin/sh
# Set the ROM name
ROM_NAME=NexusHD2
export ROM_NAME
mmcblk0p2=`ls /dev/block/mmcblk0p2`
# Mount the ext4 partition
if [ $mmcblk0p2 == "/dev/block/mmcblk0p2" ]
then
mkdir -p /ext4p
mkdir -p /sdcard/NativeSD/$ROM_NAME
mkdir -p /boot /boot_dir
mount -t ext4 /dev/block/mmcblk0p2 /ext4p
mkdir -p /ext4p/$ROM_NAME/system /ext4p/$ROM_NAME/data
mount --bind /ext4p/$ROM_NAME/system /system
mount --bind /ext4p/$ROM_NAME/data /data
mount --bind /sdcard/NativeSD/$ROM_NAME /boot
mount --bind /sdcard/NativeSD /boot_dir
#delete the old system
rm -rf /system/*
#clean the dalvik-cache
rm -rf /data/dalvik-cache/*
#all the dir has ready write some info for updater-script
echo "NativeSD=true" >> /tmp/nfo.prop
else
#no ext4 partition found
echo "NativeSD=false" >> /tmp/nfo.prop
fi
How to make ext4 partition on my SDCARD?
http://forum.xda-developers.com/showthread.php?p=31414628#post31414628
Spaqin said:
You just posted it, but I have a couple of questions - what is it really? How SD builds will be faster because of that? What can we expect? How will it work? Any details?
Click to expand...
Click to collapse
Securecrt will explain everything.. give the man some time to create the first post..
Expect the same/similar or even better performance compared to android on NAND with a descent SD card.
I will post an example ROM which I am working on so people can check it out @ 2nd post when I am done with it..
Spaqin said:
You just posted it, but I have a couple of questions - what is it really? How SD builds will be faster because of that? What can we expect? How will it work? Any details?
Click to expand...
Click to collapse
:laugh: Just be patient. I am updating the post.
Wow man! I can hardly wait!
securecrt said:
[coming soon] ...
This is an idea to make the HD2 more faster, I worked with Xylograph to make it more usable and easy to implement by common users.
Click to expand...
Click to collapse
Xylograph said:
Securecrt will explain everything.. give the man some time to create the first post..
Expect the same/similar or even better performance compared to android on NAND with a descent SD card.
I will post an example ROM which I am working on so people can check it out @ 2nd post when I am done with it..
Click to expand...
Click to collapse
Looking forward to trying this
Sent from my GT-I9100 using Tapatalk 2
Well everybody (especially sd rom users) waiting to test this stuff can already start by making sure they have an SD-EXT (EXT4 if possible) partition on their sd-card..
Make a big one for future use
Xylograph said:
Well everybody (especially sd rom users) waiting to test this stuff can already start by making sure they have an SD-EXT (EXT4 if possible) partition on their sd-card..
Make a big one for future use
Click to expand...
Click to collapse
ready - steady ...
dimdimdim said:
ready - steady ...
Click to expand...
Click to collapse
GO GO GO !!!
ext4 partition can be made from windows using minitool partition wizard home edition http://www.partitionwizard.com/download.html
I assume FAT32 partition should be first and ext4 partition second.
Robbie P said:
ext4 partition can be made from windows using minitool partition wizard home edition http://www.partitionwizard.com/download.html
I assume FAT32 partition should be first and ext4 partition second.
Click to expand...
Click to collapse
What size partition should I create?
I usually use partitions of 1 or 2 GB on 16 or 32 GB cards
hi..
my phone's hardware button (green button) is not working.. so i can not make any changes to magldr..
currently, my boot folder is set to ICS..
I was just wondering if its possible to edit the initrd.gz as mentioned in post 3 in such a way that it would reflect my folder (ICS) instead of NativeSD?
should i just replace all places which have NativeSD with my folder that is ICS? or is it just some specific places?
jjblaster3 said:
hi..
my phone's hardware button (green button) is not working.. so i can not make any changes to magldr..
currently, my boot folder is set to ICS..
I was just wondering if its possible to edit the initrd.gz as mentioned in post 3 in such a way that it would reflect my folder (ICS) instead of NativeSD?
should i just replace all places which have NativeSD with my folder that is ICS? or is it just some specific places?
Click to expand...
Click to collapse
I did not consider this case... let me think how to solve it.
Robbie P said:
ext4 partition can be made from windows using minitool partition wizard home edition http://www.partitionwizard.com/download.html
I assume FAT32 partition should be first and ext4 partition second.
Click to expand...
Click to collapse
Yes sir, or use recovery for partitioning your sdcard.. I recommend 4EXT recovery for the job.
aldai2 said:
What size partition should I create?
I usually use partitions of 1 or 2 GB on 16 or 32 GB cards
Click to expand...
Click to collapse
Depends on how many roms you are going to install...
I think 2 GB is a nice start.. especially when apps will be shared in future updates you won't have to install all apps over and over again.
securecrt said:
I did not consider this case... let me think how to solve it.
Click to expand...
Click to collapse
much appreciated friend, keeping my hopes up
Great work guys, have installed on a class 6, speed seems fine (personally I haven't found there to be any noticeable lag with SD builds).
Have just run some benchmarks; would attach if i could find a screenshot button. And will see how it performs for a day or two and report back before messing with it.
Just a suggestion, but with future builds are you considering adding an option to choose which ext to install to? So that you can have multiple sd-ext builds and/or a NAND build with a sd-ext and a separate sdext rom.
Likin' the installer as well, haven't used aroma too often, but you've customised this one and made it your own.
Nice Work.
Can't find screenshot, so. Using a class 6 card in:
Code:
System Test = 3398 ; SD card read/write = 13.6/8.0 MB/s
PassMark Performance = 816 ; Internal Storage read/write = 14.7/13.1 MB/s External Storage r/w = 15.1/8.27 MB/s
AnTuTu = 2741 (typical SDROM score) SD card r/w = 9.7/7.4 MB/s
jjblaster3 said:
hi..
my phone's hardware button (green button) is not working..
Click to expand...
Click to collapse
So besides changing the folder are you actually able to enter recovery without a working green key?
You'll need that 2
Xylograph said:
So besides changing the folder are you actually able to enter recovery without a working green key?
You'll need that 2
Click to expand...
Click to collapse
Couldn't he copy the files into the partition on the desktop? Using ubuntu for example, or while in a running nand build? Or would that be likely to cause issues?
Xylograph said:
So besides changing the folder are you actually able to enter recovery without a working green key?
You'll need that 2
Click to expand...
Click to collapse
well to b honest when i read on the first post that wm6.5 users and magldr users using wp7 in nand are also to be supported in the future, i never considered that recovery was a must.. guess i was wrong
#include <std_disclaimer.h>
/*
* Your warranty is now void.
*
* I am not responsible for bricked devices, dead SD cards,
* thermonuclear war, or you getting fired because the alarm app failed. Please
* do some research if you have any concerns about features included in this ROM
* before flashing it! YOU are choosing to make these modifications, and if
* you point the finger at me for messing up your device, I will laugh at you.
*
*/
Click to expand...
Click to collapse
WARNING : MESSING WITH KERNEL AND RECOVERY PARTITIONS IS VERY DANGEROUS FOLLOW THIS GUIDE AT YOUR OWN RISK
In this guide you will learn how to increase the size of kernel and recovery partitions. the method should work for other samsung devices.
So it will be something like that .....
Before
{
"lightbox_close": "Close",
"lightbox_next": "Next",
"lightbox_previous": "Previous",
"lightbox_error": "The requested content cannot be loaded. Please try again later.",
"lightbox_start_slideshow": "Start slideshow",
"lightbox_stop_slideshow": "Stop slideshow",
"lightbox_full_screen": "Full screen",
"lightbox_thumbnails": "Thumbnails",
"lightbox_download": "Download",
"lightbox_share": "Share",
"lightbox_zoom": "Zoom",
"lightbox_new_window": "New window",
"lightbox_toggle_sidebar": "Toggle sidebar"
}
After
The way we are going to increase the size of the partitions is to repartition the partition so first you must read this guide here and understand it well as we will need it .
Steps to do this are :
Repartition device memory.
Edit pit file for the device.
BEFORE DOING ANYTHING YOU SHOULD TAKE BACKUP OF THE PARTITION WE WILL WORK ON
First we will start with kernel partition and please don't touch recovery partition until you make sure that you have done all the steps correctly and your system is working then go for recovery partition
Tools will be used :
Parted : Here .
PIT editor : Here .
This method can work if you want to repartition any other partitions like data or whatever you want .
If you find anything wrong, typo, broken links or even flying elephant please let me know.
One last thing if you did like this guide or you didn't you can push that thanks button
Repartitioning device storage .
Repartitioning device storage
After you read the thread I've mentioned before... start repartitioning your device,but actually I won't write every steps of repartitioning but I'll clear some points and give you important tips when you repartition the device .
Let me clear something, the way we are going to use is that we will cut some space from any unimportant partitions and glue it to kernel or recovery partition .
Tip 1 :
So what are the unimportant and important partitions ?
Important and dangerous partitions :
PIT , MD5HDR , Product info , DSP , Modem , odin reserved , EFS , ......
Unimportant and safe partitions :
System , User data , Cache partitions
This doesn't mean that you can mess up with those partitions, it's just mean that you can only take space from those partitions without any worries of break phone functions .
Tip2 :
when you repartition the device you must know where you are and specify your situation ....
There are two situation :
Lucky one .
Unlucky one .
Lucky situation :
the lucky situation is that when your recovery and kernel partitions aren't next to any dangerous partitions.you will just cut some space of the unimportant partitions and glue it to kernel and recovery partition
like those ones ....
Unlucky situation :
the lucky situation is that when your recovery and kernel partitions are next to any dangerous partitions. so in this situation you will have to change and rearrange places of kernel and recovery partitions.
this is unlucky situation....
Tip3 :
If kernel and recovery partitions are next to each other and you're in the unlucky situation you will just need to move one partition from its place then give its space to the other partition and you should move the kernel partition and give its space for recovery partition as it's safer than moving recovery partition. In case you're in the lucky situation you will just cut the space of unimportant partition and glue it to the partition... look here :
This is unlucky situation : kernel and recovery partitions are next to each other so I'll just delete kernel partition, cut some space of system partition, make that space for kernel partition and give old kernel partition space for recovery partition .
Before :
After :
This is the lucky situation : You will remove kernel partition and safe_partition then make new kernel partition and new safe_partition, but leave some free space before kernel partition because you will add this space to recovery partition later when you make sure that you have done the steps correctly and the kernel is loaded.
Before :
After :
Tip4 :
If kernel and recovery partitions aren't next to each other and you are in lucky situation. You will cut some space and glue it to the partition you want .
And if you are in the unlucky situation you will just move the partition from its place, then cut some space from any safe partition and make this space for the kernel/recovery partition.
Tip 5 :
How much space should you make for kernel and recovery partitions ?
It's good to make each of them about 20~25 MG and don't go too high like 40 or more unless you really this much of space and keep in mind that you take this space from other partitions like system , user data or cache partitions .Also it's good to take the space from your system or cache partitions as you will not need them a lot like user-data partition .
Tip 6 :
Be organized and do everything in order So If you have to remove system and kernel partitions and you will make anything like formate or anything do it in order so first start with removing system partition and recreate it in smaller size then remove kernel partition and recreate it in the new size. WHY ? as if you just removed kernel and system partitions at the same time when you recreate them again you will end up with wrong partition number and your phone won't boot .
Tip 7 :
While you're repartitioning you will find free space at the beginning and end of your device do mess up with them they are related to bootloader and other stuff ... just act like you don't see them at all \.
Let's get started :
-What I will do is remove system partition, cut some space of it, recreate it again in new size, make new kernel partition then assign old kernel space to recovery partition. (I am in unlucky situation) .
You will need parted program to do all partitioning stuff .
-I do recommend using TWRP recovery as it's so powerful .
-Make sure to put parted program in safe place away from the partitions you will take space from it
Put parted in you internal storage .
Boot to recovery .
Plug your device to your pc .
Give parted execution permission ... open a new terminal/console and type "adb shell" then type "chmod a+x /sdcard/parted"
From current shell type "/sdcard/parted /dev/block/mmcblk0p" or "/sdcard/parted /dev/mmcblk0" if your device uses /dev/mmcblk0*" then type "unit mb" then "print". you should see some thing like that .
Then open new terminal/console , type "/sdcard/parted /dev/block/mmcblk0" or "/sdcard/parted /dev/mmcblk0" . then type "unit s" then "print". you should see some thing like that .
Remove system partition "rm 21 " . then type "print free"
Recreate system partition in the new size . "mkpart partition_name start_sector end_sector"
-I'll take 26MB from system partition so new partition size will be ( old size in sectors - the amount of space I want in sectors[(26*1024*1024)/sector_size] )
so new size will be 1,835,008 - [(26*1024*1024)/512]=1781760-To get end sector: ( start sector + partition size in sectors ) so mine will be ( 1252864 + 1781760 )=3034623
finally the command is "mkpart system 1252864 3034623"
Put a name for system partition "name partition_number new_name" the name should be like old partition name so if it was system then name it system and if it was KERNEL name it KERNEL
so mine should be "name 21 system"
Make new kernel partition and name it . "mkpart KERNEL 3034624 3087871 " -> "name 5 KERNEL" .
Also make partition instead at old kernel partition space and just name it anything then formate it as fat16 .
this steps just to make us sure that the phone is using new kernel partition not the old one .
so for me I'll do... "mkpart dummy 64512 84992" -> "name 28 dummy" -> "mkfs" -> "yes"->"28"->"fat16"
Now you will have to formate system , kernel partitions as fat16/fat32 ...type "mkfs" then type "Yes" then type partition number then type fat16 or fat32 .
-But , why ? Let's say that system partition was 1000 sectors and I made it 900 sectors only the device will still read last 100 sectors as the old filesystem type which will make errors because those 100 sectors will be kernel partition and it will be a mess .Don't worry they will be back to their old filesystem types when we restore system and kernel again .
-Why fat16 and fat32 ? Because parted only supports fat16/fat32/ext2 , and ext2 cause recovery not to mount system and kernel partitions .
-OK , which one to use fat16 or fat32 ? fat16 for small partitions like kernel and fat32 for large partitions like system .
-Now it will be like that .
I won't add the space of old kernel partition to recovery until I make sure that everything is okay.
Now I will edit pit map for my device.
After that restore kernel and system and see if the system is booting or not .
If the system booted with the new kernel partition I'll remove recovery partition so it will be merged with the old kernel space then I'll recreate recovery partition again then formate it to fat16 after that I'll edit pit file again then push it to device then put it back to its partition.
Now you can either use heimdall or odin to flash the recovery and make sure that it works well.
Edit PIT file .
Edit PIT
After you repartition kernel/recovery partition you will have to edit pit file to finish up working and make new partitions useable and make your phone work .
There is some points I should clear out first .
What is PIT file ?
It is a file contains a lot of informations about all partitions in your phone .
What is PIT used for ?
This file is used by device bootloader to know where is kernel/recovery partition to load it .
Heimdall and ODIN , they use this file to know what goes where so they know where to put kernel,recovery,system,modem and everything else .
What I'll edit in PIT file ?
You will have to edit all information for partitions you have changed them .
Let's get started :
Get pit file for your device . How ?
from parted type print and look for the partition with contains pit file . for me the file is in partition number 26 .
Copy that pit file to your sdcard or external card .
open another terminal/console then type "adb shell" then the copy command "dd if=/dev/block/block_that_contains_pit of=where_ever_you_want_to_put_pit_in/any_name.pit"
so for me I'll type "dd if=/dev/block/mmcblk0p26 of=/sdcard/mint.pit"
Pull pit file from the phone through this command . "adb pull /sdcard/mint.pit"
Open pit editor and choose "PIT file analysis" then open your pit file .
Click on "Copy to clipboard" and paste in any new text file as you will need some of those information later in case you messed anything up .
Now go to "PIT file editor tab" and open your PIT file.
PIT entry list choose the entries you will edit .
if you have edited system and kernel partitions so you will need to modify 2 entries ,but which two ?
let's say that system partition number is 15 and kernel is 9 so you will edit entries number 15 & 9 .
For my I'll edit entries number 5 and 21 .
You only will edit two values "Block size " and "Block Count" .
In "Block size" you will enter start sector of your block . and in "Block count" you will enter the size of your partition in sectors .
To get those values open new terminal/console then type "adb shell" then "/sdcard/parted /dev/block/mmcblk0" or "/sdcard/parted /dev/mmcblk0" then "unit s" then "print"
So for my system partition : block size = 1,252,864 and block count = 1,781,760
and for my kernel partition : block size = 3,034,624 and block count = 53,248
Then hit save and go to "PIT file analysis" then open your pit file . and make sure that your changes have been saved .
Now push that PIT file to your device storage and copy it back to it's own partition "adb push pit_name.pit /sdcard/mint.pit" but for you should copy it back with it's original name. to find it go to "PIT file editor " and select the entry number for pit partition . it will be the same as your pit partition number so for me my partition number is 26 so I'll select entry number 26 . then look at "Flash file name" . so for me my pit file name is mint.pit
Now copy pit file back to its partition "dd if=/sdcard/mint.pit of=/dev/block/mmcblk0p26"
Finally I'll restore kernel and system and reboot and see if the system boots or not .
For devs:If you've changed partitions sizes (cut space of them) and you're going to port a ROM or build on from source, make sure to change partitions size in BoardConfing.mk or them ROM won't boot and you'll need to reformat the partitions again. After you finished working and the ROM is stable enough to release or you just want to publish it for testing purpose make sure that you rebuild ROM with the original partitions sizes again.
Oh He left me
Cool I'll ask for divorce
one more for the future (Maybe)
Nexus 7 (2013) Repartition
No one is responsible for your actions except yourself. Everything written further may potentially brick your device, although risk is reduced to minimum.
This repartition package offers 1.5G /system; a /vendor partition and it is fully backward compatible with any ROM (including stock system.img).
Known-issues
HTML:
- If repartition pack says that device isn't correct,
than, if partition table wasn't modified before,
congrats! your device has different memory chip
that those I worked with. No worry, PM me and
I'll add support for it.
DO THE BACKUPs. Repartition will erase all your data
USB connection to PC is MANDATORY else you will not have opportunity to push ROM to your device
Backup
# Before processing further we highly recommend you backup persist and EFS using adb
# Or you might lose your IMEI/WIFI + BT mac addresses
Code:
adb root
adb shell
dd if=/dev/block/mmcblk0p2 of=/sdcard/modemst1.img
dd if=/dev/block/mmcblk0p3 of=/sdcard/modemst2.img
dd if=/dev/block/mmcblk0p4 of=/sdcard/persist.img
Now you can find 3 *.img files at path /sdcard. Copy them to your PC since internal memory will be erased.
Installation
HTML:
# This mod is backwards compatible with any ROM so we highly recommend NOT to reverse it if repartition went well.
# You should use ONLY recovery from this thread since other don't support all benefits of this mod.
# When installing ROM just after you flashed zip and before installing GAPPs you MUST make a resize in TWRP since all roms are build for ~800M system.
# Package is unified for flo and deb. To restore stock layout use same zip and steps as for repartition.
1. Boot into recovery (You need to allow system partition modification to be able resize /system in recovery).
2. Backup your data & Move your files from flash to your PC.
3. Flash repartition pack zip.
4. Do the actions asked by repartition pack (go to Terminal in ordinary recovery and input word that pack will tell you. Everything else will be done automatically).
5. Phone will reboot into recovery.
6. Install TWRP from below (it is build with support of new partitions layout and sizes. It can be differed from official TWRP by next format 3.x.x-1 UA).
7. Format everything. (mount errors will not affect formatting!)
- In TWRP: Wipe > Format data
- Type yes
- Once this completes go to: Wipe > Advanced Wipe
- Tick all the boxes and wipe. There should be no further mount errors. (Thanks [user=7694808]@mr_rubbish[/user] for corrections in formatting).
8. Install ROM which you like.
9. Enjoy better flash partition layout.
If something gone wrong - we recommend you NOT to do anything by yourself. Write here for help, else you may do only worse.
Downloads:
Repartitioning package: GitHub
Credits:
Special thanks to
- Unlegacy-Android team;
- Sudokamikaze;
- rlw6534 for Kingston MMC layout;
- surfrock66 for his gide for Nexus 5;
As usual, feedback is appreciated
XDA:DevDB Information
Nexus 7 (2013) Repartition, Tool/Utility for the Nexus 7 (2013)
Contributors
Clamor
Source Code: https://github.com/clamor95/android_device_unlegacy_recovery
Version Information
Status: Stable
Created 2018-09-19
Last Updated 2019-01-18
Common issues and F. A. Q.
Repartition pack should be safe for most devices. Common mistakes, issues and their solution will be published here.
1. You shouldn't flash any internal parts of repartition pack (*.sh files) only flash whole zip using TWRP. You may use my scripts for personal use or projects but authorship should to be kept.
2. If something isn't mounting after repartition try to format partitions that don't mount using Wipe -> Advanced Wipe in TWPR. Ideally you should format in that way all partitions in Advanced Wipe menu (see 5-th step of installation guide).
3. If you want to be sure that repartition went well I enclose loging zip. Flash it after repartition (when device reboots into TWRP). It won't modify anything only generates a partition.log in root of internal storage and outputs your current partition layout to screen. You should check if your layout is same as those fragments I provide under spoiler (file systems doesn't matter). If there are any differences you have to describe what you did and enclose partition.log to your post.
FLO/DEB STOCK
Code:
22 671088640B 1551892479B 880803840B system
23 1551892480B 2139095039B 587202560B cache
FLO/DEB MODIFIED
Code:
22 614429696B 2187293695B 1572864000B system
23 2187293696B 2270167039B 82873344B cache
...
30 2348843008B 2610987007B 262144000B vendor
4. After flashing most ROMs system size will reduce to stock, you need to resize /system in TWRP or use flashable resize zip for ROMs that support addon.d (automatic resize when dirty flashing updates).
5. After returning to stock partition table you won't be able to get into the Recovery from the bootloader anymore, but when you start the tablet normally it goes straight in the Recovery. It is normal state. New partition table proposes larger /recovery size (16MB) while stock gives only 10MB. During restoring stock process, it is impossible to restore larger recovery backup into new smaller partition. Whether not to leave user without recovery excess, recovery backup restores into /boot partition. Just flash ordinary TWRP and install ROMs from it.
6. Don't install the zip file from the USB OTG. Copy them into the /sdcard. Else you will get message after flashing repartition pack.
Code:
"Can not extract updater-script. Do you have it in package?
Updating partition details...
...done"
Link not working for the repartitioning package...
@rlw6534 should be fine now
Any chance you give details on backing up persist and EFS with dd command? I'm not really a noob but I also don't want to mess up my tab...
@rlw6534 You actually should't brake anything. Added an instruction how to backup EFS and persist.
OK. Tried to flash on a clean, freshly wiped system (Flo 32G), all stock, ext4 on cache and Data, TWRP 3.2.3-0. Got the following:
******Applying dark magic******
This is not a Nexus 7 (2013)
Updater process ended with ERROR: 1
How to restore files, that we copied from our tablet using dd command ? (I haven't done anything yet. Just asking)
Sent from my whyred using XDA Labs
@rlw6534 your partition table was modified.
@MikiGry same commands, just switch paths.
Clamor said:
@rlw6534 your partition table was modified.
@MikiGry same commands, just switch paths.
Click to expand...
Click to collapse
Do you mean that despite this error message:
******Applying dark magic******
This is not a Nexus 7 (2013)
Updater process ended with ERROR: 1
The partition table has been modified correctly?
@lollyjay No it wasnt. Package has 2 step security system. It checks if partition table was modified and in what way (by package itself, by user or it is stock). Second step is that package itself doesn't modify anything, it needs manual confirmation in terminal, else no changes will be applied.
Clamor said:
@lollyjay No it wasnt. Package has 2 step security system. It checks if partition table was modified and in what way (by package itself, by user or it is stock). Second step is that package itself doesn't modify anything, it needs manual confirmation in terminal, else no changes will be applied.
Click to expand...
Click to collapse
Thanks
So do I NOT flash the modded twrp first?
Your instructions said to flash it after reboot to recovery
@lollyjay actually it shouldn't metter, but after would be better
Clamor said:
@lollyjay actually it shouldn't metter, but after would be better
Click to expand...
Click to collapse
I'm going to do this when I get home. This might mean that flo/deb will get Android 9 Pie
@lollyjay look through UA ROM thread I wrote there about P on flo/deb
Clamor said:
@lollyjay look through UA ROM thread I wrote there about P on flo/deb
Click to expand...
Click to collapse
Sorry but can you give me a link?
Clamor said:
@rlw6534 your partition table was modified.
@MikiGry same commands, just switch paths.
Click to expand...
Click to collapse
I have previously used sysrepart.zip and sysrepartundo.zip from this thread, although not recently:
https://forum.xda-developers.com/showpost.php?p=76278047&postcount=19
I returned it to stock a while back (827MB). Perhaps I need to sgdisk a stock partition table?
@rlw6534 Every manual repartition or repartition made not by my pack needs an individual look and partition table restore.
@lollyjay here
Clamor said:
@rlw6534 Every manual repartition or repartition made not by my pack needs an individual look and partition table restore.
@lollyjay here
Click to expand...
Click to collapse
OK. Here is my partition layout. My userdata appears to be smaller than stock, but there isn't enough room on mmcblk0 to increase it to the size that your script is looking for. I have no idea how that could have been changed without bricking the tab. Everything else looks normal. Ideas?
Code:
Model: MMC MMC32G (sd/mmc)
Disk /dev/block/mmcblk0: 30937186304B
Sector size (logical/physical): 512B/512B
Partition Table: gpt
Number Start End Size File system Name Flags
1 67108864B 156745727B 89636864B fat16 radio
2 201326592B 204472319B 3145728B modemst1
3 204472320B 207618047B 3145728B modemst2
4 268435456B 283795455B 15360000B ext4 persist
5 335544320B 336343039B 798720B m9kefs1
6 336343040B 337141759B 798720B m9kefs2
7 402653184B 403451903B 798720B m9kefs3
8 403451904B 406597631B 3145728B fsg
9 469762048B 471298047B 1536000B sbl1
10 471298048B 472834047B 1536000B sbl2
11 472834048B 474931199B 2097152B sbl3
12 474931200B 480174079B 5242880B aboot
13 480174080B 480698367B 524288B rpm
14 536870912B 553648127B 16777216B boot
15 603979776B 604504063B 524288B tz
16 604504064B 604505087B 1024B pad
17 604505088B 606041087B 1536000B sbl2b
18 606041088B 608138239B 2097152B sbl3b
19 608138240B 613381119B 5242880B abootb
20 613381120B 613905407B 524288B rpmb
21 613905408B 614429695B 524288B tzb
22 671088640B 1551892479B 880803840B ext4 system
23 1551892480B 2139095039B 587202560B ext4 cache
24 2147483648B 2148532223B 1048576B misc
25 2214592512B 2225078271B 10485760B recovery
26 2281701376B 2281709567B 8192B DDR
27 2281709568B 2281717759B 8192B ssd
28 2281717760B 2281718783B 1024B m9kefsc
29 2348810240B 2348843007B 32768B metadata
30 2415919104B 30937169407B 28521250304B ext4 userdata
@rlw6534 Thanks!
If you want to make something like this for your device, check out this guide here
Since I no longer have an OP 7 series device, this mod is now deprecated and won't be receiving any more updates. @invernomut0 has made a continuation of this mod using orangefox recovery. Check it out here!
Team Win Recovery Project 3.x, or twrp3 for short, is a custom recovery built with ease of use and customization in mind. Its a fully touch driven user interface no more volume rocker or power buttons to mash. The GUI is also fully XML driven and completely theme-able. You can change just about every aspect of the look and feel.
Code:
#include <std_disclaimer.h>
/*
*
* We are not responsible for bricked devices, dead SD cards,
* thermonuclear war, or you getting fired because the alarm app failed. Please
* do some research if you have any concerns about features included in this ROM
* before flashing it! YOU are choosing to make these modifications, and if
* you point the finger at us for messing up your device, we will laugh at you.
*
*/
Compatibility
This has only been tested by me on Oxygen OS Stable - Android Q.
Disclaimer
This is a DANGEROUS mod. Anything involving repartitioning is. If you fail to read and bad things happen, that's on you. Although I thoroughly tested this (managed to brick my phone once), there's always the possibility that something could go wrong with the worst case scenario resulting in a brick.
YOU'VE BEEN WARNED - Use at your own risk
What is this?
This is @mauronofrio's TWRP (see official thread here) that's been modified for true dual booting by splitting userdata into a/b slots (also does the same for metadata for encryption support). The installer script repartitions userdata for dualboot or stock based on your input.
Limitations
See the section in the github readme. MAKE SURE YOU READ THIS!
Features:
Same as mauronofrio's TWRP
Can choose between stock layout, a/b userdata, or a/b/c userdata where 'c' is a common data partition that'll show up in both roms - it's quite handy
Option to choose between ext4 and f2fs
Disables verity - fstabs are modified for dual boot and so this is a must unless you choose stock layout in which case it's optional
Option to disable forced encryption
Option to install magisk
Common Data
I recommend the a/b/c layout which includes this common data partition
If you choose a/b/c layout - you'll have a/b userdata, but you'll also get a 3rd userdata partition I call 'Common Data'
The name 'Common Data' gives away its purpose - to store files that you'll access on both slots/roms. So stuff like zips, pictures, music, TWRP backups, etc.
In TWRP, this shows up as another storage option for backup/restore and on your pc as well - your phone will have 'Common Storage' and 'Internal Storage'
In order to be accessible when booted, some parts of the system are modified so that the it'll be accessible WITHOUT root by the following mechanisms:
- The common data partition is mounted to /sdcard/CommonData
- .nomedia file is placed in CommonData so files in it won't be picked up twice if you decide to mount over internal storage as outlined below
- Furthermore, if your use case is like mine where my music files are in common data, you can make 'mounts.txt' file in /datacommon containing a list of every FOLDER to mount directly over top of sdcard. So for example:
/datacommon/Music -> /sdcard/Music
+ This of course mounts over anything there (overwrites it for as long as it's mounted) so make sure that you don't have the same folder in both datacommon and regular data
+ Note that there are 3 exceptions to this folder mounting rule:
1) All - if this is the FIRST line, ALL folders in datacommon will be mounted
2 )Android
3) lost+found
+ The reasoning should be obvious - lost+found isn't something you should need to mess with and Android is for regular data partition only - that's OS specific and should be on separate slots
+ Note that you should have 1 folder listed on every line, for example:
Code:
DCIM
Music
Pictures
ViPER4AndroidFX
Flashing Instructions
You MUST be booted into TWRP already when flashing this zip. You can grab a bootable twrp img from here
Since this modifies data - the zip CANNOT be on sdcard or data at all UNLESS you do not want to repartition/format
- If you flash from data, the zip will copy itself to /tmp and instruct you to flash it from there OR you can just install twrp/magisk/disver-fec
- You could do the above or copy it to a place like /dev or /tmp and flash it from there
- Alternatively, you can adb sideload it
Read through ALL the prompts - there's lots of options
Note that if you change partition layout, THIS WILL WIPE ALL DATA INCLUDING INTERNAL STORAGE
How to Flash Roms - If you're NOT stock layout
Nothing changes here except ONLY FLASH IN TWRP
- Roms always flash to the opposite slot. Keep that in mind and you'll be fine
- So don't take an OTA while booted - boot into twrp, switch slots, reboot into twrp, flash rom
Normal flash procedure:
1) Boot into twrp
2) reboot into twrp selecting slot you do NOT want rom installed to
3) Flash rom
4) Flash this zip
5) Reboot into twrp
6) Flash everything else
Help! I Can't Boot!
Usually this is because you switched roms without formatting data first. This should be flashing 101 but we all forget sometimes. Plus this slot stuff can get confusing
If it only happens with a/b/c and not any other layout, there's a good chance it's selinux related. Try setting selinux to permissive at kernel level with this mod(source here). If this doesn't fix it, it could be because selinux can't be set to enforcing even with the mod depending on the rom
How to Manually Repartition Back to Stock
In the event any step in the repartioning fails, the entire installer aborts. The good news is that this prevents a potential brick. The bad is that you need to manually revert back. See the README on github for the procedure. Note that if the install went fine and you want to switch back to stock later, just flash the installer again and choose stock layout
Download
Source Code
Credits
Mauronofrio
Teamwin
CosmicDan
TopJohnWu
Very ****ing badass. ?
Wow, this is cool. Always wondered if something like this would be possible on AB partitioned devices.
Looking forward to testing it out
Does the dual boot mean I can boot two roms?
jaggillararla said:
Does the dual boot mean I can boot two roms?
Click to expand...
Click to collapse
Ya. You can have a different rom on each slot
Will it impact on my original data partition if I flashed this TWRP.( I means whether my original data being splitted into 2-individual-parition + 1-common-partition and I need to reinstall my data after entering system ?)
Kris Chen said:
Will it impact on my original data partition if I flashed this TWRP.( I means whether my original data being splitted into 2-individual-parition + 1-common-partition and I need to reinstall my data after entering system ?)
Click to expand...
Click to collapse
The installer will tell you if it'll wipe internal storage or not.
Basically, if you choose to change the partition layout, data will all be wiped since it'll be repartitioned. If you choose to keep your partition layout at the beginning of the install, your data will be fine.
You could just use this zip as twrp, magisk, verity/fec modifer/installer to save you the extra steps and keep with stock layout
This is super cool. Will be testing soon. Just to confirm, this means I can have a custom rom on one slot and oxygen os on the other? Also f2fs should work fine with common data right?
f41lbl0g said:
This is super cool. Will be testing soon. Just to confirm, this means I can have a custom rom on one slot and oxygen os on the other? Also f2fs should work fine with common data right?
Click to expand...
Click to collapse
Yup. You can do whatever you want with either slot. This mod formats all data partitions as ext4 since that's what oneplus does. You can always reformat userdata to f2fs in twrp gui later if you want though. Same goes for common data although I don't think there's a gui option for that
How does this zip to allocate the each size of userdata ? Can be customized by ourself or automated by zip itself ?
Kris Chen said:
How does this zip to allocate the each size of userdata ? Can be customized by ourself or automated by zip itself ?
Click to expand...
Click to collapse
From what I see it can not be customized through the flasher (may be possible by editing values in the zip). In case you were wondering the size of the partitions, they are 96.7gb for the common storage and 62.4gb each for the individual storages.
Kris Chen said:
How does this zip to allocate the each size of userdata ? Can be customized by ourself or automated by zip itself ?
Click to expand...
Click to collapse
f41lbl0g said:
From what I see it can not be customized through the flasher (may be possible by editing values in the zip). In case you were wondering the size of the partitions, they are 96.7gb for the common storage and 62.4gb each for the individual storages.
Click to expand...
Click to collapse
It's automated by installer. If you have a 128gb device:
32gb for each userdata slot, commondata gets what's left
256gb device:
Everything's doubled from above
Thank you for this work I have screwed up all of my partitions on my Oneplus and could use a pointer on how to restore all of the correct partitions... :-0
I must have screwed up one of the commands on restoring my original partitions here is what I have now
C:\Users\The Family>adb shell
OnePlus7Pro:/ # sgdisk /dev/block/sda --print
Creating new GPT entries.
Disk /dev/block/sda: 61409280 sectors, 234.3 GiB
Logical sector size: 4096 bytes
Disk identifier (GUID): B0281E2A-8376-4F4B-98C6-BF5221AD8A20
Partition table holds up to 128 entries
First usable sector is 6, last usable sector is 61409274
Partitions will be aligned on 256-sector boundaries
Total free space is 61409269 sectors (234.3 GiB)
Number Start (sector) End (sector) Size Code Name
OnePlus7Pro:/ #
What commands do I need to fix this. I can still get into adb shell
edit: msmtool cannot restore from this because the partitions are not correct from the way it looks when I try it. when in recovery touch does not work.
eyespunker said:
Thank you for this work I have screwed up all of my partitions on my Oneplus and could use a pointer on how to restore all of the correct partitions... :-0
I must have screwed up one of the commands on restoring my original partitions here is what I have now
C:\Users\The Family>adb shell
OnePlus7Pro:/ # sgdisk /dev/block/sda --print
Creating new GPT entries.
Disk /dev/block/sda: 61409280 sectors, 234.3 GiB
Logical sector size: 4096 bytes
Disk identifier (GUID): B0281E2A-8376-4F4B-98C6-BF5221AD8A20
Partition table holds up to 128 entries
First usable sector is 6, last usable sector is 61409274
Partitions will be aligned on 256-sector boundaries
Total free space is 61409269 sectors (234.3 GiB)
Number Start (sector) End (sector) Size Code Name
OnePlus7Pro:/ #
What commands do I need to fix this. I can still get into adb shell
edit: msmtool cannot restore from this because the partitions are not correct from the way it looks when I try it. when in recovery touch does not work.
Click to expand...
Click to collapse
I have the steps outlined here: https://github.com/Zackptg5/TWRP-DualBoot-Guac-Unified/#how-to-manually-repartition-back-to-stock
But what did you do? It looks like you formatted all of /dev/block/sda which is essentially a brick. You are able to restore that with msmtool btw but there will still be some device specific data that is lost and you'll likely need to file warranty claim
Zackptg5 said:
I have the steps outlined here: https://github.com/Zackptg5/TWRP-DualBoot-Guac-Unified/#how-to-manually-repartition-back-to-stock
But what did you do? It looks like you formatted all of /dev/block/sda which is essentially a brick. You are able to restore that with msmtool btw but there will still be some device specific data that is lost and you'll likely need to file warranty claim
Click to expand...
Click to collapse
It was this step that I really messed up
Final step is to format the new userdata partition: mke2fs -t ext4 -b 4096 /dev/block/sda$userdata_num $userdata_size - where userdata_size can be calculated with this shell command: sgdisk /dev/block/sda --print | grep "^ *$userdata_num" | awk '{print $3-$2+1}'
with this step I used the result from sgdisk /dev/block/sda --print | grep "^ *$userdata_num" | awk '{print $3-$2+1}' I do not remember the value into the spot where userdata_size was
It looks like have been able to flash partitions manually in fastboot but the two partitions that are no longer recognized are the system_a and system_b the reason I say that is because vendor and boot flash fine on both a and b partitions. and when I send the commands to flash system a or b the reply is partition not found?! I am not sure if it would fix my problem but if I could get help to restore system partitions maybe I can get this thing to boot up.
eyespunker said:
It was this step that I really messed up
Final step is to format the new userdata partition: mke2fs -t ext4 -b 4096 /dev/block/sda$userdata_num $userdata_size - where userdata_size can be calculated with this shell command: sgdisk /dev/block/sda --print | grep "^ *$userdata_num" | awk '{print $3-$2+1}'
with this step I used the result from sgdisk /dev/block/sda --print | grep "^ *$userdata_num" | awk '{print $3-$2+1}' I do not remember the value into the spot where userdata_size was
It looks like have been able to flash partitions manually in fastboot but the two partitions that are no longer recognized are the system_a and system_b the reason I say that is because vendor and boot flash fine on both a and b partitions. I am not sure if it would fix my problem but if I could get help to restore system partitions maybe I can get this thing to boot up.
Click to expand...
Click to collapse
The formatting steps is how I initially bricked my phone when I was figuring this stuff out - I since fixed that issue and made sure it'd never happen again in the zip :/
Why were you manually restoring? Did the zip cut off with partition error?
You'll need to use msmtool in this case. Even if your partition block is completely toast, it's able to bring it all back. You can grab the latest one from here: https://androidfilehost.com/?w=files&flid=296306
And here's the guide for it: https://forum.xda-developers.com/oneplus-7-pro/how-to/msm-tool-guac-t3934691
Zackptg5 said:
The formatting steps is how I initially bricked my phone when I was figuring this stuff out - I since fixed that issue and made sure it'd never happen again in the zip :/
Why were you manually restoring? Did the zip cut off with partition error?
You'll need to use msmtool in this case. Even if your partition block is completely toast, it's able to bring it all back. You can grab the latest one from here: https://androidfilehost.com/?w=files&flid=296306
And here's the guide for it: https://forum.xda-developers.com/oneplus-7-pro/how-to/msm-tool-guac-t3934691
Click to expand...
Click to collapse
When I run the latest 10.4 global I get "device does not match image" and then under status I loose connection. I have also tried the 10.31 file with no luck either.
eyespunker said:
When I run the latest 10.4 global I get "device does not match image" and then under status I loose connection. I have also tried the 10.31 file with no luck either.
Click to expand...
Click to collapse
In msmtool? Do you have the right variant?
Latest global: https://androidfilehost.com/?fid=4349826312261732245
Latest europe: https://androidfilehost.com/?fid=4349826312261732244
Download mode is really tricky too. It times out after several seconds so you pretty much have to keep holding down the key combo until msmtool picks it up and then you can release them
Zackptg5 said:
In msmtool? Do you have the right variant?
Latest global: https://androidfilehost.com/?fid=4349826312261732245
Latest europe: https://androidfilehost.com/?fid=4349826312261732244
Download mode is really tricky too. It times out after several seconds so you pretty much have to keep holding down the key combo until msmtool picks it up and then you can release them
Click to expand...
Click to collapse
I have now tried the latest two and have come up with the same results on the update when the device param load the result of the last communication is device does not match image.
eyespunker said:
I have now tried the latest two and have come up with the same results on the update when the device param load the result of the last communication is device does not match image.
Click to expand...
Click to collapse
Sounds like you may need to file a warranty claim then :/