[Q] MTK (Mediatek) Repartitioning 101 gone wrong - General Questions and Answers

Hello guys, for the previous year I would say, I have read about repartitioning MTK phones, starting with my old Cubot MTK6572 (Rest In Peace) to my current Doogee MTK6582.
I have tried countless times to repartition using the EBRTweak utility, or changing the EBR1 & EBR2 files myself but it never, ever works.. I always manage to get in the first initial boot and have a false victory where I see that I have re partitioned successfully, but after I reboot after, I always get a boot loop after that initial boot.
For editing the EBR files, I have tried:
-Using EBRTweak
-Editing myself by changing the values from scratch by making calculations with sectors, bytes and addresses
-Editing myself by
First adding a value in the /data partition length, adding that value
Second adding that same value to the start address of the FAT partition
Third removing that same value to the length of the FAT partition
For flashing the EBR files, I have tried:
-Flashing all the patitions with SP flash tools with the new EBR files (without changing the Scatter file)
-Flashing all the patitions with SP flash tools with the new EBR files (changing the Scatter file)
-Flashing only the EBR partitionsa on a working ROM
-Flashing the EBR files using an updater-script via a custom recovery
With each of these methods, all my calculations were exact when I verified everything (to the byte), including using "disktype" command in Linux.
So after one year of failure, I finally decided to post on XDA to ask for help... please, please, does anyone know why the first boot works but the second boot always ends up in a boot loop? :silly:

I emailed Doogee engineers and they told me that u cant re-partition it
NaturalBornCamper said:
Hello guys, for the previous year I would say, I have read about repartitioning MTK phones, starting with my old Cubot MTK6572 (Rest In Peace) to my current Doogee MTK6582.
I have tried countless times to repartition using the EBRTweak utility, or changing the EBR1 & EBR2 files myself but it never, ever works.. I always manage to get in the first initial boot and have a false victory where I see that I have re partitioned successfully, but after I reboot after, I always get a boot loop after that initial boot.
For editing the EBR files, I have tried:
-Using EBRTweak
-Editing myself by changing the values from scratch by making calculations with sectors, bytes and addresses
-Editing myself by
First adding a value in the /data partition length, adding that value
Second adding that same value to the start address of the FAT partition
Third removing that same value to the length of the FAT partition
For flashing the EBR files, I have tried:
-Flashing all the patitions with SP flash tools with the new EBR files (without changing the Scatter file)
-Flashing all the patitions with SP flash tools with the new EBR files (changing the Scatter file)
-Flashing only the EBR partitionsa on a working ROM
-Flashing the EBR files using an updater-script via a custom recovery
With each of these methods, all my calculations were exact when I verified everything (to the byte), including using "disktype" command in Linux.
So after one year of failure, I finally decided to post on XDA to ask for help... please, please, does anyone know why the first boot works but the second boot always ends up in a boot loop? :silly:
Click to expand...
Click to collapse
I dont know whats the purpose of the repartition...

bestmedever said:
I dont know whats the purpose of the repartition...
Click to expand...
Click to collapse
Some phones (Notably the Mediatek "MTK" phones) are known to have a very small internal storage for your applications.
This is because the storage usually attributed to applications 6GB on the MTK6582 is split in two parts:
1- 1.3gb for applications
2- 4.7gb for an internal sd-card to put music and movies
But nobody uses internal sd-card much, because we all have external sd cards of 32gb or more. This means that you have a 4.7GB that is completely unused and an internal storage for applications of 1.3gb that gets full as soon as you install a few applications like Facebook, Youtube (that use a LOT of space nowadays), or update your system apps.
All this is completely ridiculous so a few people and I are trying to make repartition and have more space for application, while getting rid of that useless "internal sd-card"

exactly
NaturalBornCamper said:
Some phones (Notably the Mediatek "MTK" phones) are known to have a very small internal storage for your applications.
This is because the storage usually attributed to applications 6GB on the MTK6582 is split in two parts:
1- 1.3gb for applications
2- 4.7gb for an internal sd-card to put music and movies
But nobody uses internal sd-card much, because we all have external sd cards of 32gb or more. This means that you have a 4.7GB that is completely unused and an internal storage for applications of 1.3gb that gets full as soon as you install a few applications like Facebook, Youtube (that use a LOT of space nowadays), or update your system apps.
All this is completely ridiculous so a few people and I are trying to make repartition and have more space for application, while getting rid of that useless "internal sd-card"
Click to expand...
Click to collapse
yeah that's what I'm saying, I talked with MTK engineers but they just replay with "if you re-partition your phone, it will brick" over and over, I told them to just give me a solution, like changing EBR files or something, and I know how to unbrick MTK phones, but they didn't care at all, the problem is: why they just put all the storage as an internal storage instead of phone storage and internal storage, it's pathetic to put phone storage and SD card storage at same time...

WOW! You actually managed to talk to them? That is awesome, we could have a lead here, don't let that go, friend!
I'm happy that you agree with me however and all the thousands of people with the same problem. Maybe if you tell them that you don't care about bricking your phone and the warranty, that you just like to play around and you have a backup phone anyways (to convince them to answer).
You could tell them that the repartitioning works on the first initial boot, but ends up in a boot loop after you reboot a second time. If they don't want to tell us how to fix it, they could at least tell us why this is happening so we could research on the subject.
Thanks for your help, I'll hit "thanks" on your post!

Related

[Q] Replace Internal Data Partition for External SD

Let me start with: I know that there have been many posts on this, but before you get mad, I was unable to find an answer to what I specifically want to do.
For reference: I am a software developer and sysadmin with a decent amount of Linux experience, but not a lot of android specific experience.
Now that the introduction is out of the way:
What I would like to do is completely remove the "USERDATA" partition (the "Internal SD card"), grow the "SYSTEM" partition to fill that space, and then mount my SD Card (external) as the SD Card that the system sees.
I'm currently on Cyanogenmod 10.1 but want to upgrade to 11 soon.
The reason I want to do this is because:
I have all if my apps that I can set to install to SD Card
Both "internal" partitions are full (only about 200MB is available for pictures/etc. and I can no longer update apps)
Camera (and pretty much everything else as well) stores to the Internal SD card by default
If the system partition was 1.1+1.4=2.5GB and all of my apps were "installed" to a real SD card, it would be a lot more comfortable.
So, here's what I am thinking *might* work (maybe not in the right order, though?):
Point the fstab entry for the internal SD card to the external SD card
I have the PIT file. I will delete the "USERDATA " and grow "SYSTEM" to fill the space
When I write it out in steps, it seems pretty simple...
My concerns:
Will a ROM update (to CM11) re-partition back to the old way (and, in the process, break a bunch of stuff)?
I don't ever plan to go back to stock android or change to another ROM (other than upgrades).
Thanks for reading this long post and for any insight you may be able to provide.
--mobrien118
It's a wonderful idea if it works.
Sent from my SAMSUNG-SGH-T769 using xda app-developers app
Modifying partitions is a bit dangerous.
But I have to ask you why do you need another GB of /system storage?
There was a line you can put in the build.prop that flips your ext. SD with the internal one on cm10 I believe.
This'd interest me if I could get rid of usbdisk and sdcard0 merged.
It would need the phone to be repartitioned though, causing issues with the backups and ROMs.
You may even have to compile cm from source.
Its a lot of trouble
Sent from my SAMSUNG-SGH-T769 using Tapatalk
I just did so on S4 Mini with cm-11 Android 4.4.
First I was thinking of using symlinks and/or bind mounts to redirect to the the external sdcard, but that's a bit of a hassle because
1) Since 4.2: both emulated and external storage is mounted with a fuse layer on top not supporting symlinks
2) Since 4.4: no more global write access on external storage
So moving data was the simplest solution. Besides providing (much) more space my sdcard is also around 20% faster in sequential writes: 8.5 MB/s internal vs 10.5 MB/s external. Is it really 2014?
I haven't yet decided what to do with the original data partition, so for the moment I left it unused. Hence I haven't touched the internal partition table.
Quick summary
partition sdcard (gdisk)
I recommend using GPT, this lets you work with partition names rather than numbers. For the sake of still having an "official" external sdcard I made two partitions. Keep in mind that it's usually the first partition which gets automatically mounted as external sdcard. So I made the 2nd partition the new home for data. This partition however has to be manually specified in the ramdisks fstab which involves flashing the boot partition.
format the new partitions (mkfs.ext4)
copy the original /data directory tree to the new data partition
extract initrd from boot.img (abootimg)
extract files from initrd (gunzip & cpio)
replace the /data entry in fstab pointing at your new data partition
re-pack initrd and boot.img (gzip, cpio & abootimg)
flash boot.img onto the boot partition (dd)
If you use recovery, you also have to edit it's fstab (analog to boot.img mentioned above)
done
Alternatively has anyone tried an init.d script? I see those scripts get executed before the mounting of data & sdcard
Meanwhile the original userdata partition got replaced by 3 new partitions: system2, cache2 & userdata2 which are now used for a dual boot ROM.
I've only changed GPT, not PIT. ROMs and Recovery don't use PIT, so as long as Heimdall/Odin isn't involved it should not cause any issues.
Hey guys,
So after read all that, I am also vry interested in what the OP has suggested. I get that the pit doesn't need to be affected, but as the OP asked, when flashing a new rom or updating an existing, would the partition be reformatted back to the way android handles it, ie; back to the system and data seperate and the sdcard not being used as the internal partition?
I am no developer and only have minimal knowledge in linux and android programing, but I am a quick study and any guide to help me sort this would be greatly appreciated.
Also I am about to get a second S4 mini specifcally for doing things like this so if I brick I don't care?
My next question is could it be possible to code the PIT file to do this for you so that you can just flash that through odin, but again would flashing roms affect this.
Cheers,
Sora.
aguaz said:
I just did so on S4 Mini with cm-11 Android 4.4.
First I was thinking of using symlinks and/or bind mounts to redirect to the the external sdcard, but that's a bit of a hassle because
1) Since 4.2: both emulated and external storage is mounted with a fuse layer on top not supporting symlinks
2) Since 4.4: no more global write access on external storage
So moving data was the simplest solution. Besides providing (much) more space my sdcard is also around 20% faster in sequential writes: 8.5 MB/s internal vs 10.5 MB/s external. Is it really 2014?
I haven't yet decided what to do with the original data partition, so for the moment I left it unused. Hence I haven't touched the internal partition table.
Quick summary
partition sdcard (gdisk)
I recommend using GPT, this lets you work with partition names rather than numbers. For the sake of still having an "official" external sdcard I made two partitions. Keep in mind that it's usually the first partition which gets automatically mounted as external sdcard. So I made the 2nd partition the new home for data. This partition however has to be manually specified in the ramdisks fstab which involves flashing the boot partition.
format the new partitions (mkfs.ext4)
copy the original /data directory tree to the new data partition
extract initrd from boot.img (abootimg)
extract files from initrd (gunzip & cpio)
replace the /data entry in fstab pointing at your new data partition
re-pack initrd and boot.img (gzip, cpio & abootimg)
flash boot.img onto the boot partition (dd)
If you use recovery, you also have to edit it's fstab (analog to boot.img mentioned above)
done
Alternatively has anyone tried an init.d script? I see those scripts get executed before the mounting of data & sdcard
Click to expand...
Click to collapse
I just managed to replace my internal sd with the external sd following your ruff guide. thank you very much! At first I struggled a bit getting it to work, because I had encrypted my data partition before -.- this seems to change something in the fstab / mounting / boot-up process, I couldn't get my S4 mini to boot with just changing the fstab.qcom in boot.img. With my recovery (TWRP) it worked from the start editing recovery.img's fstab.twrp /data mount point.
After decrypting(formatting) /data and re-editing fstab.qcom in boot.img it finally works I'm so happy! Enjoying a lot of space on my sdcard now!
usefull threads / information I learnt from:
Partition structure of S4 Mini
Encryption of ExtSD & some fstab information
Editing initrd
abootimg ReadMe
(Links last tried 28.05.2015)

[Q] What happens when you flash?

I'm a noob. I have 1 phone that can't go down. I have searched XDA, Google, Bing, and YouTube but can't find an answer.
What happens to all the files, folders, and data on a phone when you flash it?
I know there are files on the phone that ID it to the provider. I think it's in the EFS folder, but in all the guides I've read and YouTubes I've watch, not one of them mentions copying anything first nor does it say anything about putting a file back.
Some of the guides I've read make it sound like you wipe everything down to basic hardware before flashing a ROM and kernel back onto the phone.
Does anybody know of a really, really basic guide to what happens?
Most of the time I learn by trial and error. I take it apart and see how it works. I have 4 laptops in varies stages of repair to prove it. But like I said, I only have one phone and I can't spend another $300 just to have another phone to tear down.
On another note...is there a way to set up a sig on this forum?
Firstly, know your hardware as most phones now are using NAND chips for (as it would be) your HDD (Hard Disc Drive) writing files/data/folders/etc is not done the same as a standard HDD.
The NAND chip when being written to copies out (in a size dictated by the chip manufacturer) the Original data, erases the data once copied then writes in your data, verifies it's written correctly, erases the Copied data, moves onto next block/page/sector/etc of data and repeats the process.
If verification fails, the original block/etc of data is written back from the copied location.
Bashing away at my HTC Desire C
---------- Post added at 11:33 PM ---------- Previous post was at 11:26 PM ----------
I don't think there is a 'basic' guide that could cover all the intricacies of how different manufacturers work around the hardware and software also allowing for the proprietary software Dev's are trying to figure out how it works just to make (sometimes) the simplest things work.
Bashing away at my HTC Desire C
RackMonkey said:
What happens to all the files, folders, and data on a phone when you flash it?
Click to expand...
Click to collapse
If you wanna see what would happen when you flash CM11 you can read our upgrader.sh script that tells the phone the steps needed to back up or wipe certain partitions.
https://github.com/teamacid/android_device_samsung_galaxys4gmtd/blob/cm-11.0/updater.sh
If you're flashing from Gingerbread (BML), your EFS partition gets backed up to the SD card, the kernel/bootimage gets overwritten, then the phone reboots.
After it reboots it will copy the modem file into the /radio partition, then the system partition gets wiped, then it will flash the bootimage again with using a new method.
After this the cache and data partitions get wiped, and your EFS backup that was restored to the sd card gets put on the newly created /efs partition.
After all this is done, the script ends and the recovery will continue instlaling the CM11 files to the /system partition
Any other data doesn't get wiped/erased, only what I mentioned.
Thanks FB. That's the first explanation that I could really understand.
I'm asking friends if they have an old phone I can destroy. Then the fun really begins.
FBis251 said:
If you wanna see what would happen when you flash CM11 you can read our upgrader.sh script that tells the phone the steps needed to back up or wipe certain partitions.
https://github.com/teamacid/android_device_samsung_galaxys4gmtd/blob/cm-11.0/updater.sh
If you're flashing from Gingerbread (BML), your EFS partition gets backed up to the SD card, the kernel/bootimage gets overwritten, then the phone reboots....
Click to expand...
Click to collapse
Thanks for posting that file, it was interesting to see. I would also like to know, how the 1 GB ROM of the phone is partitioned.
llinkll said:
Thanks for posting that file, it was interesting to see. I would also like to know, how the 1 GB ROM of the phone is partitioned.
Click to expand...
Click to collapse
Here's the file that defines the partition layout for CM11:
https://github.com/teamacid/niltmt_kernel/blob/cm-11.0/drivers/mtd/onenand/samsung_galaxys4g.h
It starts at around line 31, as an example:
Code:
.name = "boot",
.offset = (72*SZ_256K),
.size = (40*SZ_256K), //101
The offset will tell you how many bytes into the flash chip the particular partition is, this one is at 72 * 256kB blocks which is at 18432kB.
The size of it is 40 256kB blocks. 40 * 256kB = 10,240kB. So the boot partition is starts around 18mB after the first block, and is a size of 10mB.
Once you scroll to the bottom we find the reservoir partition, you can read the description in the comment on that file (line 67).
It ends at (4012 + 84) * 256kB = 1,048,576 kB
FBis251 said:
Here's the file that defines the partition layout for CM11:
https://github.com/teamacid/niltmt_kernel/blob/cm-11.0/drivers/mtd/onenand/samsung_galaxys4g.h
It starts at around line 31, ....
Click to expand...
Click to collapse
Thanks a lot for the help, it's really appreciated.

My Explorer A310e Queries

Hello everyone, albeit I have a substantial experience with Samsung Galaxy and Sony (Ericsson) Xperia devices, I am new to the HTC line of devices in the Android universe.
:silly:
A colleague from my workplace has entrusted with me her HTC Explorer A310e, to eventually root the device and consequently flash a compatible custom firmware of my choice, if I so choose to.
I intend on discussing my queries related to the aforementioned device within this single thread, rather than create separate threads for multiple queries.
I am all set to root, unlock the bootloader and subsequently flash a custom recovery on to the device by following this tutorial, http://forum.xda-developers.com/showthread.php?t=1415223 by @jaggyjags.
After the said processes have been completed, I am aware it is imperative to perform a NANDroid backup via the custom recovery, which I would be able to save to the external SD (memory card).
:good:
My queries, after performing the required procedures are -
When is it required to partition the SD?
Is it the internal SD, or the external SD, or both that require(s) partitioning?
How do I partition the required SD? Please point me to an appropriate guide/tutorial.
I intend on using Titanium Backup to perform a backup of the device's contents. I reckon restoring system data such as Phonebook, Messages, Calendar, etcetera should not cause any issues, right?
Some of the device's Software Information is
Android version
2.3.5
HTC Sense version
3.5
Software number
1.31.720.3
Baseband version
10.35d.80.09H_1.11.82.17
Build number
1.31.720.3 CL214721 release-keys
Click to expand...
Click to collapse
I await your knowledgeable responses, and I thank you for your patience with my naivety!
YLNdroid said:
Hello everyone, albeit I have a substantial experience with Samsung Galaxy and Sony (Ericsson) Xperia devices, I am new to the HTC line of devices in the Android universe.
:silly:
A colleague from my workplace has entrusted with me her HTC Explorer A310e, to eventually root the device and consequently flash a compatible custom firmware of my choice, if I so choose to.
I intend on discussing my queries related to the aforementioned device within this single thread, rather than create separate threads for multiple queries.
I am all set to root, unlock the bootloader and subsequently flash a custom recovery on to the device by following this tutorial, http://forum.xda-developers.com/showthread.php?t=1415223 by @jaggyjags.
After the said processes have been completed, I am aware it is imperative to perform a NANDroid backup via the custom recovery, which I would be able to save to the external SD (memory card).
:good:
My queries, after performing the required procedures are -
When is it required to partition the SD?
Is it the internal SD, or the external SD, or both that require(s) partitioning?
How do I partition the required SD? Please point me to an appropriate guide/tutorial.
I intend on using Titanium Backup to perform a backup of the device's contents. I reckon restoring system data such as Phonebook, Messages, Calendar, etcetera should not cause any issues, right?
Some of the device's Software Information is
I await your knowledgeable responses, and I thank you for your patience with my naivety!
Click to expand...
Click to collapse
1. You need to partition your SD card if you want to expand your internal memory, or some ROMs cannot be flashed without SD partition because our PICO has a limited internal storage.
2. there is nothing like internal SD card in PICO. you need to partition your SD card(external).
3. you can partition your SD card by using mini tool partition wizard.
hit thanks if it helped :good:
Bootloader Unlock
Is it compulsory to unlock the bootloader via the HTC Dev portal, or can it be done through another alternative?
:fingers-crossed:
Understandably, since it is necessary to have the Google Android SDK installed, which package should I download - the ADT Bundle, or the SDK Tools Only from http://developer.android.com/sdk/index.html?
YLNdroid said:
Is it compulsory to unlock the bootloader via the HTC Dev portal, or can it be done through another alternative?
:fingers-crossed:
Understandably, since it is necessary to have the Google Android SDK installed, which package should I download - the ADT Bundle, or the SDK Tools Only from http://developer.android.com/sdk/index.html?
Click to expand...
Click to collapse
1. Its mandatory to unlock bootloader via HTC Dev portal because the identifier token will only be provided by that portal
2. I had Android SDK, HTC Sync, Java Runtime Environment(All Provided in HTC Dev portal) in my system for the unlocking process...
Hit like if it helped :good:
Bootloader Unlock
aashking said:
1. Its mandatory to unlock bootloader via HTC Dev portal because the identifier token will only be provided by that portal
2. I had Android SDK, HTC Sync, Java Runtime Environment(All Provided in HTC Dev portal) in my system for the unlocking process...
Hit like if it helped :good:
Click to expand...
Click to collapse
@aashking, thank you for informing me that the bootloader unlock process is mandatory via HTC Dev.
:good:
As for the Google Android SDK, which package would you suggest I download and consequently install - the ADT Bundle or the SDK Tools Only, available at http://developer.android.com/sdk/index.html?
Download the one Android SDK zip provided in HTC Dev portal, you need not install it, HTC sync should be installed to connect your phone and to read commands, and follow the procedure given in HTC Dev its the simplest one
Hit thanks if it helped :good:
Sent from my HTC Explorer A310e using xda premium
Bootloader Unlock
aashking said:
Download the one Android SDK zip provided in HTC Dev portal, you need not install it, HTC sync should be installed to connect your phone and to read commands, and follow the procedure given in HTC Dev its the simplest one
Click to expand...
Click to collapse
@aashking, I have already installed HTC Sync on my computer. I believe the Android SDK zip file link provided at HTC Dev, which you are referring to, is the one mentioned within the Unlocking Bootloader Instructions procedural guide, http://www.htcdev.com/bootloader/unlock-instructions, right?
:fingers-crossed:
Absolutely mate, good luck let's hear for success :good:
Hit thanks if it helped :good:
Sent from my HTC Explorer A310e using xda premium
Bootloader Unlock
aashking said:
Absolutely mate, good luck let's hear for success :good:
Click to expand...
Click to collapse
@aashking, the link provided at http://www.htcdev.com/bootloader/unlock-instructions, redirects to http://developer.android.com/sdk/index.html, and hence the confusion over the package to be downloaded!
:silly:
Go with "android-sdk_r23.0.2-windows.zip" hoping that you are in windows,
Hit thanks if it helped :good:
Sent from my HTC Explorer A310e using xda premium
Partitioning the SD card
Now that my colleague's Explorer A310e has an unlocked bootloader, a custom recovery and root access, I am very keen on flashing a custom firmware and am inclined towards MiniCM9, http://forum.xda-developers.com/showthread.php?t=2169776, whose thread author is @thewisenerd.
Considering the limited internal storage capacity of the HTC Explorer, I understand it is rhetorically imperative to partition the external memory card (read as external SD, or plainly, SD card), and before I proceed with flashing the aforementioned custom Ice Cream Sandwich AOSP firmware, I would like to know what methodology should I apply, keeping in mind my colleague's primary/initial storage concern is with respect to using WhatsApp Messenger, an instant messaging app that is fixed to the internal storage.
My colleague's device came bundled with a 2GB microSD memory card. But, I have strongly suggested her to get a higher capacity memory card, perhaps an 8GB one.
:silly:
As usual, I await your valuable responses.
YLNdroid said:
Now that my colleague's Explorer A310e has an unlocked bootloader, a custom recovery and root access, I am very keen on flashing a custom firmware and am inclined towards MiniCM9, http://forum.xda-developers.com/showthread.php?t=2169776, whose thread author is @thewisenerd.
Considering the limited internal storage capacity of the HTC Explorer, I understand it is rhetorically imperative to partition the external memory card (read as external SD, or plainly, SD card), and before I proceed with flashing the aforementioned custom Ice Cream Sandwich AOSP firmware, I would like to know what methodology should I apply, keeping in mind my colleague's primary/initial storage concern is with respect to using WhatsApp Messenger, an instant messaging app that is fixed to the internal storage.
My colleague's device came bundled with a 2GB microSD memory card. But, I have strongly suggested her to get a higher capacity memory card, perhaps an 8GB one.
:silly:
As usual, I await your valuable responses.
Click to expand...
Click to collapse
As to partitioning your SDCard, I am assuming your objective is to "expand" you internal memory using "memory increasing scripts". This isn't a complex deal (I've explained how these work here), and mostly just involves one partition for reverse mounting the userdata (/data) partition.
You do not need to make two partitions, one would suffice. Also, you can make this partition before/after flashing the ROM. It makes not much difference. You could just flash the ROM, and then use an init.d script (explained here) to increse your memory (i personally recommend "int2ext", and not "int2ext+" or any other variants).
Since it is a 2 gB memory card, I am pretty sure it would be (<=) class 2. I would strongly recommend buying an SD Card that's atleast class 4, but a class 2 would splendidly do but performance would be slightly affected as it wouldn't be fast.
As far as Whatsapp is concerned, it has the option to backup messages to the SD Card. Since flashing an ICS ROM (coming from stock, I'm guessing), you would need to 'factory reset' the device (i.e. format the userdata + cache) partitions. You can safely restore the Whatsapp messages from the sdcard after flashing the ROM.
Partitioning the SD card
thewisenerd said:
As to partitioning your SDCard, I am assuming your objective is to "expand" you internal memory using "memory increasing scripts". This isn't a complex deal (I've explained how these work here), and mostly just involves one partition for reverse mounting the userdata (/data) partition.
You do not need to make two partitions, one would suffice. Also, you can make this partition before/after flashing the ROM. It makes not much difference. You could just flash the ROM, and then use an init.d script (explained here) to increse your memory (i personally recommend "int2ext", and not "int2ext+" or any other variants).
Since it is a 2 gB memory card, I am pretty sure it would be (<=) class 2. I would strongly recommend buying an SD Card that's atleast class 4, but a class 2 would splendidly do but performance would be slightly affected as it wouldn't be fast.
As far as Whatsapp is concerned, it has the option to backup messages to the SD Card. Since flashing an ICS ROM (coming from stock, I'm guessing), you would need to 'factory reset' the device (i.e. format the userdata + cache) partitions. You can safely restore the Whatsapp messages from the sdcard after flashing the ROM.
Click to expand...
Click to collapse
@thewisenerd, thank you very much for addressing my queries and providing links which further explain aspects relevant to the subject topics in question. I have exhausted my '8 thanks per day' quota, but nonetheless, I will definitely hit the thanks button once the quota has been renewed.
:good:
Keeping aside the default limited internal storage of the device, is it possible to have one desirable partition dedicated to installing apps, and another to store the end user's data such as images, videos, audio files, etcetera? Would this be an ideal scenario for the daily usage of the device?
Currently being on a stock Gingerbread firmware, I am gearing up to flash the MiniCM9 Build#7 custom Ice Cream Sandwich firmware, and once I have done that, I will need your assistance with partitioning/expanding the existing 2GB microSD memory card. I have suggested my colleague to purchase a higher capacity Class 4 memory card, perhaps an 8GB one, which she should do so by next week.
:silly:
After rooting the device, I have taken a backup of all user apps + system data. I am aware you have, in your thread http://forum.xda-developers.com/showthread.php?t=2169776, priorly suggested to refrain from restoring apps and data as they may lead to Force Closes, but is it absolutely compulsory to avoid restoring even contacts, text messages and calendar entries, as well as, apps (and their data) downloaded from the Google Play Store?
:fingers-crossed:
Keeping aside the default limited internal storage of the device, is it possible to have one desirable partition dedicated to installing apps, and another to store the end user's data such as images, videos, audio files, etcetera? Would this be an ideal scenario for the daily usage of the device?
Click to expand...
Click to collapse
er, you need to create two partitions (i.e. one fat32 (for files), and one ext4 (for installing apps)). You can easily create an ext partition by using the option in your recovery (usually found in the 'advanced' subcategory).
Currently being on a stock Gingerbread firmware, I am gearing up to flash the MiniCM9 Build#7 custom Ice Cream Sandwich firmware, and once I have done that, I will need your assistance with partitioning/expanding the existing 2GB microSD memory card. I have suggested my colleague to purchase a higher capacity Class 4 memory card, perhaps an 8GB one, which she should do so by next week.
:silly:
Click to expand...
Click to collapse
For partitioning, as said, the recovery can be used.
After rooting the device, I have taken a backup of all user apps + system data. I am aware you have, in your thread http://forum.xda-developers.com/showthread.php?t=2169776, priorly suggested to refrain from restoring apps and data as they may lead to Force Closes, but is it absolutely compulsory to avoid restoring even contacts, text messages and calendar entries, as well as, apps (and their data) downloaded from the Google Play Store?
:fingers-crossed:
Click to expand...
Click to collapse
for contacts, there's an "import/export from/to storage" option in the "people" app. For messages, I ain't sure. For Calendar entries, Google syncs it? Even otherwise, only contacts have been very 'important' to me, so I just export them to SDCard, and import them later.
NOTE: partitioning the sdcard WILL remove all data. In case you are backing up data on the sdcard, backup all the data on your SDCard on your PC too.
Partitioning the SD card
thewisenerd said:
You can easily create an ext partition by using the option in your recovery (usually found in the 'advanced' subcategory).
Click to expand...
Click to collapse
@thewisenerd, admittedly I am still quite confused about the partitioning business. The following is what I did -
Booted into the custom recovery (Yannou90 CWM-Based Recovery v5.0.2.).
Navigated to advanced and then to Partition SD Card.
Chose 1024M as the Ext Size and 0M as the Swap Size.
Pressed the power button to initiate the partitioning process.
After the partitioning process completed, I connected the device to my laptop and navigated to the Computer Management console under the Microsoft Windows platform. Within the Disk Management sub console, two partitions were listed for the removable storage, and while one partition had a drive letter assigned and file system denoted, the other partition did not. The partition which had a drive letter assigned and whose file system was denoted, displayed its capacity as nearly about 908MB, whereas the remaining 980-oddMB was displayed for the other partition.
I redid the partitioning process from the custom recovery, setting 2048M as the Ext Size and 0M as the Swap Size to go back to the memory card's initial state.
thewisenerd said:
er, you need to create two partitions (i.e. one fat32 (for files), and one ext4 (for installing apps)).
Click to expand...
Click to collapse
I implore you to kindly assist me with this.
:fingers-crossed:
YLNdroid said:
@thewisenerd, admittedly I am still quite confused about the partitioning business. The following is what I did -
Booted into the custom recovery (Yannou90 CWM-Based Recovery v5.0.2.).
Navigated to advanced and then to Partition SD Card.
Chose 1024M as the Ext Size and 0M as the Swap Size.
Pressed the power button to initiate the partitioning process.
After the partitioning process completed, I connected the device to my laptop and navigated to the Computer Management console under the Microsoft Windows platform. Within the Disk Management sub console, two partitions were listed for the removable storage, and while one partition had a drive letter assigned and file system denoted, the other partition did not. The partition which had a drive letter assigned and whose file system was denoted, displayed its capacity as nearly about 908MB, whereas the remaining 980-oddMB was displayed for the other partition.
I redid the partitioning process from the custom recovery, setting 2048M as the Ext Size and 0M as the Swap Size to go back to the memory card's initial state.
I implore you to kindly assist me with this.
:fingers-crossed:
Click to expand...
Click to collapse
The first 'process' was correct. why did you repartition with 2048 mB as the ext size?
the first 1024 mB (with a letter assigned) was the fat32 partition and the 'other' 1024 mB drive was the ext3/4 drive (not supported by windows) which is to be used for the reverse mounting process.
Partitioning the SD card
thewisenerd said:
The first 'process' was correct. why did you repartition with 2048 mB as the ext size?
the first 1024 mB (with a letter assigned) was the fat32 partition and the 'other' 1024 mB drive was the ext3/4 drive (not supported by windows) which is to be used for the reverse mounting process.
Click to expand...
Click to collapse
@thewisenerd, I appreciate your patience and guidance. I reckon I will go through the partitioning process again, create the 1024MB FAT32 partition, flash my preferred custom firmware and then, get to enabling the 'other' 1024MB ext3/4 drive. Which method would you suggest/recommend for the reverse mounting process?
:silly:
YLNdroid said:
@thewisenerd, I appreciate your patience and guidance. I reckon I will go through the partitioning process again, create the 1024MB FAT32 partition, flash my preferred custom firmware and then, get to enabling the 'other' 1024MB ext3/4 drive. Which method would you suggest/recommend for the reverse mounting process?
:silly:
Click to expand...
Click to collapse
"int2ext(4)", nothing more, nothing less.
Reverse Mount
thewisenerd said:
"int2ext(4)", nothing more, nothing less.
Click to expand...
Click to collapse
@thewisenerd, I downloaded, extracted and placed the 40int2ext script file, provided as an attachment within this thread http://forum.xda-developers.com/showthread.php?t=2389501 by @<Engine/>, to the root of the SD card, and following the consequent instructions, copied the said script file to /system/etc/init.d and set the permissions to all, as instructed within the aforementioned thread's guide.
However, when I navigate to Settings > Applications > Manage applications, the Internal storage at the bottom of the screen still displays 130MB free.
:silly:
Prior to copying the 40int2ext script file, I noticed the init.d folder has three pre-existing files, namely, 10mounts2sd, 33ng_tweaks and S70zipalign.
Should I try the CronMod-INT2EXT4_signed.zip file, provided by @croniccorey within the http://forum.xda-developers.com/showthread.php?t=1716124 thread?
:fingers-crossed:
I thank you for your continued assistance.
PS:
I forgot to mention the device is currently running on NExtGen 1.6 custom Gingerbread {Sense} firmware.
YLNdroid said:
@thewisenerd, I downloaded, extracted and placed the 40int2ext script file, provided as an attachment within this thread http://forum.xda-developers.com/showthread.php?t=2389501 by @<Engine/>, to the root of the SD card, and following the consequent instructions, copied the said script file to /system/etc/init.d and set the permissions to all, as instructed within the aforementioned thread's guide.
However, when I navigate to Settings > Applications > Manage applications, the Internal storage at the bottom of the screen still displays 130MB free.
:silly:
Prior to copying the 40int2ext script file, I noticed the init.d folder has three pre-existing files, namely, 10mounts2sd, 33ng_tweaks and S70zipalign.
Should I try the CronMod-INT2EXT4_signed.zip file, provided by @croniccorey within the http://forum.xda-developers.com/showthread.php?t=1716124 thread?
:fingers-crossed:
I thank you for your continued assistance.
PS:
I forgot to mention the device is currently running on NExtGen 1.6 custom Gingerbread {Sense} firmware.
Click to expand...
Click to collapse
you need to copy the script *after* flashing the ROM, and booting it. Also, you need to set the permissions (tick all the boxes!).

Little customization ROM for MK802IV

Hi, everyone!
I'm trying to customize a little bit the 4.4.2 ROM for the MK802IV, just to get two things done, re-size the userdata partition to use the full space (8gb) and remove the emulated SD card.
I want to use a real SD card (32gb), and get the option to move the apps to the real SD card instead of the emulated one, I tried link2sd, but every reboot some apps show up, some others doesn't, so I decided to go deep and get involved with Android customization.
About the emulated SD, I messed up with the files inside the boot.img:
init.rk30board.rc (github.com/flingone/device-rockchip-rksdk/blob/flingone-kk/init.rk30board.rc)
fstab.rk30board.bootmode.emmc (github.com/flingone/device-rockchip-rksdk/blob/flingone-kk/fstab.rk30board.bootmode.emmc)
fstab.rk30board.bootmode.unknown (github.com/flingone/device-rockchip-rksdk/blob/flingone-kk/fstab.rk30board.bootmode.unknown)
(Github repo is not mine, I just found it searching for the content of my files, also you can see the rest of the files inside my boot.img on this repo)
I tried to get close to the conf here: source.android.com/devices/storage/config-example.html "Physical primary only"
But after the changes, I tested the ROM in the stick, and going to "Settings>Storage" it still shows "NAND FLASH" mounted, but not showing information, and the "Settings" app closes when I go to "apps", so I assume that I did it wrong, and I'm not sure it the "Physical primary only" configuration is the one I'm looking for.
Also I don't understand the reason for bootmode.emmc and bootmode.unknown, but is the less important question.
About the parameter file (partitions), I've tested some changes but when I'm installing the firmware, is not passing the "checking" stage.
I tried 8GB minus the sizes of the partitions next to the "userdata" in the file, but the question is, the last partition is "user" and it have no space assigned, how much space this last one needs to work right? I think that the "user" partition without space may be the problem, but not sure anyway.
Any explanation/help would be thankfully received.
Thanks!
Martin.

twpr backup from a nexus to another nexus

Hi guys,
I own a Nexus 5 16gb with purenexus 6.01 I'm buying another 32gb and to speed things up I would like to transfer the Nandroid backup of the first on thesecond.it can do? there would be stability problems?
i will use the 32gb as main phone and the 16gb for "home experiments" about rom, kernels and another...
thank you
It is possible to restotre it, but HELL DONT EVER RESTORE EFS!!!! it will mess up the imei and you will loose conectivity
aciupapa said:
It is possible to restotre it, but HELL DONT EVER RESTORE EFS!!!! it will mess up the imei and you will loose conectivity
Click to expand...
Click to collapse
of course, just boot, system and data (cache?).
I'm just afraid that in the boot.img is saved some serial number [phone, or a wifi mac address] that do not meet on the other device, can lead to malfunctions or brick
Luca TIR said:
of course, just boot, system and data (cache?).
I'm just afraid that in the boot.img is saved some serial number [phone, or a wifi mac address] that do not meet on the other device, can lead to malfunctions or brick
Click to expand...
Click to collapse
I have been restoring all of my partitions with twrp for a long time, no problems. TeamWin had informed users that restoring the EFS partition on a specific device (nexus 5x, 6, don't remember exactly) would brick the device. But restoring your 16gb backup to a 32gb device might have other problems such as not seeing your entire memory.
Judging by the fact that if you flash your 32gb nexus 5 with the google factory image then you have to manually "wipe data/factory reset" via recovery to get it to recognize 32gb (or else it says you have only 16, small heart attack there), then that means that the memory capacity is defined somewhere in the software (obviously). Also, the partitions would be of different sizes. You'd have no problem transferring backups between identical devices, though when you have a different memory storage, you need to reinstall everything.
Hardware information such as MAC adresses are not saved anywhere, they are retrieved at runtime. Consider that you can even change a MAC address on the fly and the device would have no problem with it as long as you turn it off and on again (ifconfig wlan0 down && ifconfig wlan0 up) (as far as the OS is concerned, because you can't truly change it, I think it's hardware defined). Same goes for IMEI etc. But the flash memory consists of many partitions that need to be of specific size. If you restore a partition with different size than it's original one, you might soft brick it.
In conclusion, no, don't transfer your backup. Unlock the device, flash recovery, flash zips, setup your device again...
chrisk44 said:
I have been restoring all of my partitions with twrp for a long time, no problems. TeamWin had informed users that restoring the EFS partition on a specific device (nexus 5x, 6, don't remember exactly) would brick the device. But restoring your 16gb backup to a 32gb device might have other problems such as not seeing your entire memory.
Judging by the fact that if you flash your 32gb nexus 5 with the google factory image then you have to manually "wipe data/factory reset" via recovery to get it to recognize 32gb (or else it says you have only 16, small heart attack there), then that means that the memory capacity is defined somewhere in the software (obviously). Also, the partitions would be of different sizes. You'd have no problem transferring backups between identical devices, though when you have a different memory storage, you need to reinstall everything.
Hardware information such as MAC adresses are not saved anywhere, they are retrieved at runtime. Consider that you can even change a MAC address on the fly and the device would have no problem with it as long as you turn it off and on again (ifconfig wlan0 down && ifconfig wlan0 up) (as far as the OS is concerned, because you can't truly change it, I think it's hardware defined). Same goes for IMEI etc. But the flash memory consists of many partitions that need to be of specific size. If you restore a partition with different size than it's original one, you might soft brick it.
In conclusion, no, don't transfer your backup. Unlock the device, flash recovery, flash zips, setup your device again...
Click to expand...
Click to collapse
clear, precise and convincing ... you're right .especially different partitioning and memory size did not convince me, you have confirmed to me. I try suffered some rom nougat when I get the device
p.s.:no small heart attack please, i'm an ambulance driver :laugh: (really)
many thanks
The emulated sdcard is not backed up by twrp anyway. I would just adb pull that partition and then push all the files back on the knew device. Data and system should be fine with twrp.
(apparently) it's working!!!
Today, I received the "twin"
just out of curiosity I tried to restore the backup on the 16gb and 32gb [purenexus 6.01] and all seems to work.but I have yet to test it.
Now I go to work tomorrow I put the sim card and use it normally to confirm that everything is ok.
p.s.:the data on the free / busy sd internal memory are righteous

Categories

Resources