1. Download our Official Android App: Forums for Android!

Root Custom MTD

Discussion in 'Android Devices' started by ducky1979, Apr 23, 2011.

  1. ducky1979

    ducky1979 Android Expert
    Thread Starter
    Rank:
    None
    Points:
    98
    Posts:
    910
    Joined:
    Dec 16, 2010

    Dec 16, 2010
    910
    96
    98
    Male
    conductor
    Buxton, Derbyshire
    Just wondering if someone can tell me the optimal sizes for a custom MTD running GV 2.1 and also the easiest/best way to do it. Cheers. Lots of love from Talula!
     

    Advertisement

  2. porter_james

    porter_james Well-Known Member
    Rank:
    None
    Points:
    16
    Posts:
    98
    Joined:
    Feb 7, 2011

    Feb 7, 2011
    98
    9
    16
    Not sure how much gv 1.5 and 2.1 differ in size, but you could check out the size of your current system and data partition using root explorer.
    And where is Talula?
     
  3. ducky1979

    ducky1979 Android Expert
    Thread Starter
    Rank:
    None
    Points:
    98
    Posts:
    910
    Joined:
    Dec 16, 2010

    Dec 16, 2010
    910
    96
    98
    Male
    conductor
    Buxton, Derbyshire
    If you mean location? I'm in a small town that's famous for its water!
     
  4. Kibbster

    Kibbster Android Expert
    Rank:
    None
    Points:
    98
    Posts:
    772
    Joined:
    Mar 5, 2011

    Mar 5, 2011
    772
    55
    98
    Male
    Bristol, UK
    My town has water too!
     
  5. SUroot

    SUroot Android Expert
    Rank:
    None
    Points:
    1,123
    Posts:
    23,925
    Joined:
    May 25, 2010

    May 25, 2010
    23,925
    5,307
    1,123
    UK Technical Lead; Desktop Support
    Riddlesden, West Yorkshire, UK
    25-30MB cache. Check current sizes with quick system info for system. Then leave about 5MB extra to play with
     
  6. ducky1979

    ducky1979 Android Expert
    Thread Starter
    Rank:
    None
    Points:
    98
    Posts:
    910
    Joined:
    Dec 16, 2010

    Dec 16, 2010
    910
    96
    98
    Male
    conductor
    Buxton, Derbyshire
    Ahhh but is it famous? Mine is :p. Lol
     
  7. ducky1979

    ducky1979 Android Expert
    Thread Starter
    Rank:
    None
    Points:
    98
    Posts:
    910
    Joined:
    Dec 16, 2010

    Dec 16, 2010
    910
    96
    98
    Male
    conductor
    Buxton, Derbyshire

    Cheers, can you tell me how I write a custom script or recommend a pre written one.
     
  8. kewlbuddy

    kewlbuddy Android Enthusiast
    Rank:
    None
    Points:
    43
    Posts:
    272
    Joined:
    Jan 11, 2011

    Jan 11, 2011
    272
    33
    43
    Germany
  9. ducky1979

    ducky1979 Android Expert
    Thread Starter
    Rank:
    None
    Points:
    98
    Posts:
    910
    Joined:
    Dec 16, 2010

    Dec 16, 2010
    910
    96
    98
    Male
    conductor
    Buxton, Derbyshire
    Had a look at that, so do you do this through adb? And what's the script it refers to? Do you have to write your own? Sorry for all the questions but this is verging onto the very technical for me.
     
  10. kewlbuddy

    kewlbuddy Android Enthusiast
    Rank:
    None
    Points:
    43
    Posts:
    272
    Joined:
    Jan 11, 2011

    Jan 11, 2011
    272
    33
    43
    Germany
    script is already there, those 2 zip files. you need to have the txt file mentioned in 5th step in sdcard. you do all this stuff from recovery.

    if you dont understand that thread clearly, I suggest you not to go further.

    may be you can try alpharev tables at first for some experience
     
  11. ducky1979

    ducky1979 Android Expert
    Thread Starter
    Rank:
    None
    Points:
    98
    Posts:
    910
    Joined:
    Dec 16, 2010

    Dec 16, 2010
    910
    96
    98
    Male
    conductor
    Buxton, Derbyshire
    I understand 90% of it, it was the txt file that confused me. Did you just use the one on the thread? Or did you modify it? Does the txt file just tell it what size to make the partition. Oh and thanks for the recommendation, I might just play with the alpharev ones first. I can't believe how much stuff there is to learn to all this.
     
  12. kewlbuddy

    kewlbuddy Android Enthusiast
    Rank:
    None
    Points:
    43
    Posts:
    272
    Joined:
    Jan 11, 2011

    Jan 11, 2011
    272
    33
    43
    Germany
    I didnt try custom tables till now as I change roms too often :D
    yes, text file will tell the partition sizes to phone.

    may be Suroot can give you more knowledge on this
     
  13. SUroot

    SUroot Android Expert
    Rank:
    None
    Points:
    1,123
    Posts:
    23,925
    Joined:
    May 25, 2010

    May 25, 2010
    23,925
    5,307
    1,123
    UK Technical Lead; Desktop Support
    Riddlesden, West Yorkshire, UK
    Its quite simple but the thread on XDA isn't really clear.

    You have a file on the sd card called "mtdpartmap.txt"

    This contains your layout like below:

    "mtd 130 25" (without quotations). Thats it. That gives 130MB system and 25MB cache. Everything else goes to data.

    Then you have 2 patch files. One to patch recovery and one to patch boot. You only need to use the recovery patch the first time you use a layout (but if you change the layout, you patch recovery again).

    Every time you flash a rom (update included) you patch boot so the boot.img of teh rom knows the same layout as recovery.

    The patches read the text file (so it must always remain in place) and patch recovery or boot with that layout information

    So this is how to do it.

    Set up your mtdpartmap.txt on SD
    Nandroid backup.
    Format system, cache and data
    Install the recovery patch zip
    Reboot recovery
    format system, cache and data to make sure
    Nandroid restore
    Patch boot

    After patching boot, its worth taking a nandroid so you have a backup thats good to go straight away. Obviously the last backup was pre boot patch

    Hope that helps
     
  14. ducky1979

    ducky1979 Android Expert
    Thread Starter
    Rank:
    None
    Points:
    98
    Posts:
    910
    Joined:
    Dec 16, 2010

    Dec 16, 2010
    910
    96
    98
    Male
    conductor
    Buxton, Derbyshire
    So when I was to flash an update or new Rom I take it that it undoes all this back to stock?
     
  15. ducky1979

    ducky1979 Android Expert
    Thread Starter
    Rank:
    None
    Points:
    98
    Posts:
    910
    Joined:
    Dec 16, 2010

    Dec 16, 2010
    910
    96
    98
    Male
    conductor
    Buxton, Derbyshire
    And is that all the txt file needs to say? Simply mtd 130 25
     
  16. SUroot

    SUroot Android Expert
    Rank:
    None
    Points:
    1,123
    Posts:
    23,925
    Joined:
    May 25, 2010

    May 25, 2010
    23,925
    5,307
    1,123
    UK Technical Lead; Desktop Support
    Riddlesden, West Yorkshire, UK
    Sorry when I say an update, I mean a new rom like from GV 2.1 to GV 2.2, you need to repatch boot. Flashing kernels, themes etc, nothing needs to be done.

    If you dont paqtch boot, the rom wont boot.

    Yes the file literally has the word mtd a space, the size of system, space, size of cache

    eg

    mtd 130 25
     
  17. ducky1979

    ducky1979 Android Expert
    Thread Starter
    Rank:
    None
    Points:
    98
    Posts:
    910
    Joined:
    Dec 16, 2010

    Dec 16, 2010
    910
    96
    98
    Male
    conductor
    Buxton, Derbyshire
    How easy is it to return it back to stock if I ever needed to, and does the phone still run as fast with the custom MTD?
    Also, so I would have to create the txt file using notepad? Flash the zip's and that's it, but would need to flash the boot zip on every install?
     
  18. Usta

    Usta Android Expert
    Rank:
     #60
    Points:
    433
    Posts:
    2,585
    Joined:
    Jul 8, 2010

    Jul 8, 2010
    2,585
    1,375
    433
    The Netherlands
    I'm running GV v2.1, and it is using (nothing modified from the original ROM) 142MB space.
    So, it would be safe to keep at least 150MB in System partition.
     
  19. SUroot

    SUroot Android Expert
    Rank:
    None
    Points:
    1,123
    Posts:
    23,925
    Joined:
    May 25, 2010

    May 25, 2010
    23,925
    5,307
    1,123
    UK Technical Lead; Desktop Support
    Riddlesden, West Yorkshire, UK
    Fastboot flash an unmodified (unpatched) clockwork mod ro replace the patched one, then format cache, system and data again.

    Not sure about putting a nandroid back on. But once you have it, you have it. Even if you're not using it to run a custom layout, may aswell keep it.

    Yes

    Yes (or create it on your phone), flash the zips but dont forget about the format and backup / restore and finally - yes. Every time you flash a rom.
     
    ducky1979 likes this.
Tags:

Share This Page

Loading...