XenonHD Unofficial AOSP-based ROM for Find 7a

XDA Recognized Contributor uppon2 & Team Horizon are bringing the Oppo … more

Sunshine Compatible with HTC One M9

Two Senior Recognized Developers jcase and beaups officially released a new version of Sunshine. … more

CyanogenMod 12.1 for YU Yureka

YU Yureka recently received an official Cyanogen OS 12S update. If you prefer to use a newer revision of … more

Open War for Open Android: Antitrust for Cyanogen?

Android and openness is something we talk about all the time, but the recent … more
Post Reply Subscribe to Thread Email Thread

MoFo Root for Moto X 2013 4.4.4 is Coming - Need Help Making Rooted system.img file

26th March 2015, 04:14 PM |#1  
OP Senior Member
Thanks Meter: 235
 
762 posts
Join Date:Joined: Aug 2014
More
So the DT 4.4.4 has root now, but it does not turn off write protection. It is a different kind of root in that what it lets you do is flash a pre-rooted system image (system.img). So you have to make any mods to the image BEFORE you flash, which is not something your average joe or joette knows how to do.

But for me at least, the Moto X didn't need much modding, just Xposed with Gravity Box, Root Cloaker and Moto Tether.

I have a Dev Ed so I don't need this exploit but I did pull all of the system images from my rooted Dev Ed. The only thing I don't know how to do is to put those into a flashable image file. Does anyone here know how to do that?

I also have the TWRP ext4 system file if that helps.
Last edited by JulesJam; 28th March 2015 at 07:31 PM.
 
 
26th March 2015, 04:44 PM |#2  
Javajohn's Avatar
Recognized Contributor
Flag Surat
Thanks Meter: 728
 
506 posts
Join Date:Joined: Jun 2006
Donate to Me
More
Quote:
Originally Posted by JulesJam

So the DT 4.4.4 has root now, but it does not turn off write protection. It is a different kind of root in that what it lets you do is flash a pre-rooted system image. So you have to make any mods to the image BEFORE you flash, which is not something your average joe or joette knows how to do.

But for me at least, the Moto X didn't need much modding, just Xposed with Gravity Box, Root Cloaker and Moto Tether.

I have a Dev Ed so I don't need this exploit but I did pull all of the system images from my rooted Dev Ed. The only thing I don't know how to do is to put those into a flashable image file. Does anyone here know how to do that?

I also have the TWRP ext4 system file if that helps.

thats not a boot unlock and not a write protection disable ... its just ability to install rooted custom system img ....... i think
26th March 2015, 04:48 PM |#3  
OP Senior Member
Thanks Meter: 235
 
762 posts
Join Date:Joined: Aug 2014
More
Quote:
Originally Posted by Javajohn

thats not a boot unlock and not a write protection disable

Yes I know what it is.

Quote:
Originally Posted by Javajohn

... its just ability to install rooted custom system img ....... i think

Yes that is what I said it is.


Do you know how I can use the files I have from the system dump and TWRP nandroid ext4 file to create a flashable rooted system.img? That is what I am asking.
26th March 2015, 05:58 PM |#4  
Ctrl-Freak's Avatar
Senior Member
Thanks Meter: 110
 
144 posts
Join Date:Joined: Oct 2013
Quote:
Originally Posted by JulesJam

...
Do you know how I can use the files I have from the system dump and TWRP nandroid ext4 file to create a flashable rooted system.img? That is what I am asking.

edit: I misunderstood the question. Of course a CWM/TWRP flashable .zip is not a fastboot flashable system.img...

I'll 'take a stab at this'. I've done it a few times... (I'm sure there is a better guide, but I didn't attempt to find it...) You asked - please don't blame (or hate) me if I help you brick your phone... If you only modify /system, you should be able to restore using CWM/TWRP.

First, find a CWM/TWPR flashable .zip to use it's /META-INFO/ directory as a template. It's best to use a .zip made for your model (so the system mount and format work), and if you can find one for your android version even better. (Do not use an OTA .zip for this template.)

This template will likely [at least] do the following in the "/META-INFO/com/google/android/updater-script" script:
1) mount /system
2) format /system
3) copy /system directory from .zip (need to replace this directory)
4) create symlinks (might need work)
5) set permissions (probably needs work)
If you are only working on /system, then you should remove all superfluous sections (like flashing boot or the modem.)

So, first you need to prepare your new /system: In linux, take your dumped (or backup) /system and copy it to a new /system directory without symlinks. Now you have the new /system for your new flashable .zip

Then you need to modify the "updater-script" script and handle the creation of the symlinks. The easiest way to find this part of the script is locate a flashable zip (or OTA) that patches to your current model/android version. This will handle the bulk of the symlinks.

Next you need to handle the permissions in the "updater-script" script. The aforementioned .zip will also have the permissions scripted, but the root files may not be handled properly. You can find those script commands in a modern flashable zip with root 'baked in.'

Finally take your new /system and new "updater-script" and dump them in your template.... BACKUP (copy off phone) and test.

Good luck...
Last edited by Ctrl-Freak; 29th March 2015 at 03:39 PM.
The Following User Says Thank You to Ctrl-Freak For This Useful Post: [ View ]
26th March 2015, 07:21 PM |#5  
OP Senior Member
Thanks Meter: 235
 
762 posts
Join Date:Joined: Aug 2014
More
Quote:
Originally Posted by Ctrl-Freak

I'll 'take a stab at this'. I've done it a few times... (I'm sure there is a better guide, but I didn't attempt to find it...) You asked - please don't blame (or hate) me if I help you brick your phone... If you only modify /system, you should be able to restore using CWM/TWRP.

Yeah, I am not worrying about a brick as I can wipe my OS entirely and still get into bootloader and recovery so all is good.

Quote:
Originally Posted by Ctrl-Freak

First, find a CWM/TWPR flashable .zip to use it's /META-INFO/ directory as a template.

My TWRP nandroid of the rooted 4.4.4 system has a meta-info folder with 3 files in it - manifest.mf, cert.sf and cert.rsa.

Quote:
Originally Posted by Ctrl-Freak

/META-INFO/com/google/android/updater-script

What is this?

Quote:
Originally Posted by Ctrl-Freak

So, first you need to prepare your new /system: In linux, take your dumped (or backup) /system and copy it to a new /system directory without symlinks. Now you have the new /system for your new flashable .zip

Guess I need to learn what a symlink is first, lol!
26th March 2015, 08:01 PM |#6  
Ctrl-Freak's Avatar
Senior Member
Thanks Meter: 110
 
144 posts
Join Date:Joined: Oct 2013
Quote:
Originally Posted by JulesJam

My TWRP nandroid of the rooted 4.4.4 system has a meta-info folder with 3 files in it - manifest.mf, cert.sf and cert.rsa. !

I did not mean your nandroid. Find a flashable zip (made for your device/version) by someone to flash a [custom] ROM. If it flashes a ROM for your device/version, it should be a good starting point.

I looked under xda -> droid turbo and this was the only ROM I found: http://forum.xda-developers.com/droi...lease-t3060089 It says it is for a Moto Maxx xt1225, but again it is only a template, and it might be close.

/META-INFO/com/google/android/updater-script is a text based script that controls what/how CWM / TWRP flashes. AFAIK it is within all flashable zips.
26th March 2015, 08:13 PM |#7  
OP Senior Member
Thanks Meter: 235
 
762 posts
Join Date:Joined: Aug 2014
More
Quote:
Originally Posted by Ctrl-Freak

I did not mean your nandroid. Find a flashable zip (made for your device/version) by someone to flash a [custom] ROM. If it flashes a ROM for your device/version, it should be a good starting point.

OK thanks, I am doing this for the Moto X 2013, not DT.


Quote:
Originally Posted by Ctrl-Freak

/META-INFO/com/google/android/updater-script is a text based script that controls what/how CWM / TWRP flashes. AFAIK it is within all flashable zips.

got it.
27th March 2015, 06:14 AM |#8  
hexbox117's Avatar
Member
Thanks Meter: 4
 
39 posts
Join Date:Joined: Dec 2013
If this is successful, would there be a way to do it on the AT&T Moto 2013 running 4.4.4?

Sent from my XT1058 using XDA Free mobile app
27th March 2015, 06:31 AM |#9  
OP Senior Member
Thanks Meter: 235
 
762 posts
Join Date:Joined: Aug 2014
More
Quote:
Originally Posted by hexbox117

If this is successful, would there be a way to do it on the AT&T Moto 2013 running 4.4.4?

yes, if someone has a GSM Moto X Dev Ed. I don't.
27th March 2015, 06:34 AM |#10  
hexbox117's Avatar
Member
Thanks Meter: 4
 
39 posts
Join Date:Joined: Dec 2013
Quote:
Originally Posted by JulesJam

yes, if someone has a GSM Moto X Dev Ed. I don't.

And would we be able to use Xposed?

Sent from my XT1058 using XDA Free mobile app
Post Reply Subscribe to Thread
Previous Thread Next Thread
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes