[GUIDE + HELP]Rom Making, Stock and Compiled, With Emphasis on Moto MSM8960

Search This thread

CWGSM3VO

Senior Member
Jan 4, 2012
2,151
1,294
Damn, I thought that you flashed xt926 based zip... Why you don't have LTE then?

Maybe they don't have LTE in France? The base ROM necessary for the upgrade is a french based build.

EDIT: Found this:

Code:
Country     900/1800/1900/850/3G                                                               4G (live LTE, WiMAX, HSPA+, test, license)
Canada	 	 	 1900	 850	3G 850/2100, 3G 850/1900, 3G 1700	4G LTE Bell Canada; Rogers LTE; Rogers 4G HSPA+
France	 900	 1800	 	 	3G 900/2100	                                4G LTE SFR, 4G LTE Orange; DC HSPA+ (H+); 4G LTE Bouygues Telecom

From here:

http://www.worldtimezone.com/4g.html
 
Last edited:

Zeljko1234

Senior Member
May 7, 2010
5,898
2,766
Stockholm
They have LTE but maybe on different band...what lead us again to possibility that radio hardware could be programed. Actually that's the point of firmware. Only question is does it support frequencies we need.
 

CWGSM3VO

Senior Member
Jan 4, 2012
2,151
1,294
They have LTE but maybe on different band...what lead us again to possibility that radio hardware could be programed. Actually that's the point of firmware. Only question is does it support frequencies we need.

Makes me wonder if the JB radio file/partition could be flashed or if it's build-specific.
 

Zeljko1234

Senior Member
May 7, 2010
5,898
2,766
Stockholm
Should be possible but I think that Motorola repartitioned internal memory with KK.

Actually you can check that. I can check mine.
 
Last edited:

idless

Senior Member
Jul 5, 2012
195
47
Just a note that may or may not be helpful: I'm on the same french KK soak leak but located in North Europe. I do have LTE working here but bad battery drain from 'Android OS'. Yes, Maybe radio frequencies are not suitable for us, even if LTE does happen to work here.
 

madmonkey57

Senior Member
Oct 21, 2012
735
340
They have LTE but maybe on different band...
Yes, we have LTE on a few bands (800mhz, 2600mhz, and 1800mhz as well I think).

What lead us again to possibility that radio hardware could be programed. Actually that's the point of firmware.
I think that the radio chip supports plenty of frequencies, but not all of them at the same time (hardware constraint I think). That's why there are different radio firmware depending on the region/country.

Only question is does it support frequencies we need.
I would say the only question is: what radio frequencies are supported by the soak test zip file? Considering that it applies on top of retail cee, one can assume that the radio firmware supports all countries in central and eastern europe.
 
Last edited:

Orphee

Senior Member
Jan 31, 2008
1,726
791
Google Pixel 8
I can confirm LTE is working with soak test ROM in France, at least on my provider : Orange.

Didn't try with CM11 new bootloader.
 

Zeljko1234

Senior Member
May 7, 2010
5,898
2,766
Stockholm
I think that the radio chip supports plenty of frequencies, but not all of them at the same time (hardware constraint I think). That's why there are different radio firmware depending on the region/country.

Agree!

I would say the only question is: what radio frequencies are supported by the soak test zip file? Considering that it applies on top of retail cee, one can assume that the radio firmware supports all countries in central and eastern europe.

Agree again. So we need brave heart who's going to try XT925 radio on XT926.

Here is the list of partitions on my XT926. Could someone post for XT925?
Code:
shell@vanquish:/ $ cat /proc/partitions
cat /proc/partitions
major minor  #blocks  name

   7        0       3072 loop0
   7        1       7308 loop1
   7        2      15624 loop2
   7        3      12506 loop3
   7        4       2111 loop4
   7        5      59283 loop5
   7        6       9387 loop6
   7        7       2111 loop7
 179        0   30535680 mmcblk0
 179        1     102400 mmcblk0p1
 179        2       1500 mmcblk0p2
 179        3       1500 mmcblk0p3
 179        4        512 mmcblk0p4
 179        5        256 mmcblk0p5
 179        6        140 mmcblk0p6
 179        7        192 mmcblk0p7
 179        8        512 mmcblk0p8
 179        9          4 mmcblk0p9
 179       10       1500 mmcblk0p10
 179       11       2048 mmcblk0p11
 179       12       1500 mmcblk0p12
 179       13        500 mmcblk0p13
 179       14        500 mmcblk0p14
 179       15        512 mmcblk0p15
 179       16       1632 mmcblk0p16
 179       17       3072 mmcblk0p17
 179       18       3072 mmcblk0p18
 179       19       2048 mmcblk0p19
 179       20        640 mmcblk0p20
 179       21          8 mmcblk0p21
 179       22       8192 mmcblk0p22
 179       23          8 mmcblk0p23
 179       24       3072 mmcblk0p24
 179       25       1024 mmcblk0p25
 179       26        512 mmcblk0p26
 179       27       3072 mmcblk0p27
 179       28        128 mmcblk0p28
 179       29       4096 mmcblk0p29
 179       30        512 mmcblk0p30
 179       31      10240 mmcblk0p31
 259        0      10240 mmcblk0p32
 259        1       8192 mmcblk0p33
 259        2     138754 mmcblk0p34
 259        3     786432 mmcblk0p35
 259        4    1523712 mmcblk0p36
 259        5     153600 mmcblk0p37
 259        6   27755759 mmcblk0p38
 179       64       4096 mmcblk0boot1
 179       32       4096 mmcblk0boot0
 179       96   30657536 mmcblk1
 179       97   30653440 mmcblk1p1
 254        0       7308 dm-0
 254        1      15624 dm-1
 254        2      12505 dm-2
 254        3       2110 dm-3
 254        4      59283 dm-4
 254        5       9387 dm-5
 254        6       2110 dm-6
   7        8      27059 loop8
 254        7      27058 dm-7
shell@vanquish:/ $ ls -al /dev/block/platform/msm_sdcc.1/by-name/
ls -al /dev/block/platform/msm_sdcc.1/by-name/
lrwxrwxrwx root     root              2014-06-30 13:31 aboot -> /dev/block/mmcblk0p5
lrwxrwxrwx root     root              2014-06-30 13:31 abootBackup -> /dev/block/mmcblk0p12
lrwxrwxrwx root     root              2014-06-30 13:31 boot -> /dev/block/mmcblk0p31
lrwxrwxrwx root     root              2014-06-30 13:31 cache -> /dev/block/mmcblk0p35
lrwxrwxrwx root     root              2014-06-30 13:31 cdrom -> /dev/block/mmcblk0p37
lrwxrwxrwx root     root              2014-06-30 13:31 cid -> /dev/block/mmcblk0p28
lrwxrwxrwx root     root              2014-06-30 13:31 devtree -> /dev/block/mmcblk0p30
lrwxrwxrwx root     root              2014-06-30 13:31 dhob -> /dev/block/mmcblk0p21
lrwxrwxrwx root     root              2014-06-30 13:31 fsg -> /dev/block/mmcblk0p24
lrwxrwxrwx root     root              2014-06-30 13:31 hob -> /dev/block/mmcblk0p20
lrwxrwxrwx root     root              2014-06-30 13:31 kpan -> /dev/block/mmcblk0p33
lrwxrwxrwx root     root              2014-06-30 13:31 logo -> /dev/block/mmcblk0p29
lrwxrwxrwx root     root              2014-06-30 13:31 mbl -> /dev/block/mmcblk0p19
lrwxrwxrwx root     root              2014-06-30 13:31 misc -> /dev/block/mmcblk0p26
lrwxrwxrwx root     root              2014-06-30 13:31 modem -> /dev/block/mmcblk0p1
lrwxrwxrwx root     root              2014-06-30 13:31 modemst1 -> /dev/block/mmcblk0p17
lrwxrwxrwx root     root              2014-06-30 13:31 modemst2 -> /dev/block/mmcblk0p18
lrwxrwxrwx root     root              2014-06-30 13:31 padA -> /dev/block/mmcblk0p9
lrwxrwxrwx root     root              2014-06-30 13:31 padB -> /dev/block/mmcblk0p16
lrwxrwxrwx root     root              2014-06-30 13:31 pds -> /dev/block/mmcblk0p27
lrwxrwxrwx root     root              2014-06-30 13:31 persist -> /dev/block/mmcblk0p22
lrwxrwxrwx root     root              2014-06-30 13:31 recovery -> /dev/block/mmcblk0p32
lrwxrwxrwx root     root              2014-06-30 13:31 rpm -> /dev/block/mmcblk0p6
lrwxrwxrwx root     root              2014-06-30 13:31 rpmBackup -> /dev/block/mmcblk0p13
lrwxrwxrwx root     root              2014-06-30 13:31 sbl1 -> /dev/block/mmcblk0p2
lrwxrwxrwx root     root              2014-06-30 13:31 sbl2 -> /dev/block/mmcblk0p3
lrwxrwxrwx root     root              2014-06-30 13:31 sbl2Backup -> /dev/block/mmcblk0p10
lrwxrwxrwx root     root              2014-06-30 13:31 sbl3 -> /dev/block/mmcblk0p4
lrwxrwxrwx root     root              2014-06-30 13:31 sbl3Backup -> /dev/block/mmcblk0p11
lrwxrwxrwx root     root              2014-06-30 13:31 sp -> /dev/block/mmcblk0p25
lrwxrwxrwx root     root              2014-06-30 13:31 ssd -> /dev/block/mmcblk0p23
lrwxrwxrwx root     root              2014-06-30 13:31 system -> /dev/block/mmcblk0p36
lrwxrwxrwx root     root              2014-06-30 13:31 tombstones -> /dev/block/mmcblk0p34
lrwxrwxrwx root     root              2014-06-30 13:31 tz -> /dev/block/mmcblk0p7
lrwxrwxrwx root     root              2014-06-30 13:31 tzBackup -> /dev/block/mmcblk0p14
lrwxrwxrwx root     root              2014-06-30 13:31 userdata -> /dev/block/mmcblk0p38
lrwxrwxrwx root     root              2014-06-30 13:31 utags -> /dev/block/mmcblk0p8
lrwxrwxrwx root     root              2014-06-30 13:31 utagsBackup -> /dev/block/mmcblk0p15
shell@vanquish:/ $
 
Last edited:

CWGSM3VO

Senior Member
Jan 4, 2012
2,151
1,294
Here's mine:

Code:
root@vanquish_u:/ # cat /proc/partitions
cat /proc/partitions
major minor  #blocks  name

   7        0       3072 loop0
 179        0   15552512 mmcblk0
 179        1     102400 mmcblk0p1
 179        2       1500 mmcblk0p2
 179        3       1500 mmcblk0p3
 179        4        512 mmcblk0p4
 179        5        256 mmcblk0p5
 179        6        140 mmcblk0p6
 179        7        210 mmcblk0p7
 179        8        512 mmcblk0p8
 179        9          4 mmcblk0p9
 179       10       1500 mmcblk0p10
 179       11       2048 mmcblk0p11
 179       12       1500 mmcblk0p12
 179       13        500 mmcblk0p13
 179       14        500 mmcblk0p14
 179       15        512 mmcblk0p15
 179       16       1632 mmcblk0p16
 179       17       3072 mmcblk0p17
 179       18       3072 mmcblk0p18
 179       19       2048 mmcblk0p19
 179       20        640 mmcblk0p20
 179       21          8 mmcblk0p21
 179       22       8192 mmcblk0p22
 179       23          8 mmcblk0p23
 179       24       3072 mmcblk0p24
 179       25       1024 mmcblk0p25
 179       26        512 mmcblk0p26
 179       27       3072 mmcblk0p27
 179       28        128 mmcblk0p28
 179       29       4096 mmcblk0p29
 179       30        512 mmcblk0p30
 179       31      10240 mmcblk0p31
 259        0      10240 mmcblk0p32
 259        1       8192 mmcblk0p33
 259        2     138754 mmcblk0p34
 259        3     786432 mmcblk0p35
 259        4    1523712 mmcblk0p36
 259        5     153600 mmcblk0p37
 259        6   12772591 mmcblk0p38
 179       32   31166976 mmcblk1
 179       33   31165952 mmcblk1p1
 
root@vanquish_u:/ # ls -al /dev/block/platform/msm_sdcc.1/by-name/
ls -al /dev/block/platform/msm_sdcc.1/by-name/
lrwxrwxrwx root     root              2014-07-02 10:12 aboot -> /dev/block/mmcblk0p5
lrwxrwxrwx root     root              2014-07-02 10:12 abootBackup -> /dev/block/mmcblk0p12
lrwxrwxrwx root     root              2014-07-02 10:12 boot -> /dev/block/mmcblk0p31
lrwxrwxrwx root     root              2014-07-02 10:12 cache -> /dev/block/mmcblk0p35
lrwxrwxrwx root     root              2014-07-02 10:12 cdrom -> /dev/block/mmcblk0p37
lrwxrwxrwx root     root              2014-07-02 10:12 cid -> /dev/block/mmcblk0p28
lrwxrwxrwx root     root              2014-07-02 10:12 devtree -> /dev/block/mmcblk0p30
lrwxrwxrwx root     root              2014-07-02 10:12 dhob -> /dev/block/mmcblk0p21
lrwxrwxrwx root     root              2014-07-02 10:12 fsg -> /dev/block/mmcblk0p24
lrwxrwxrwx root     root              2014-07-02 10:12 hob -> /dev/block/mmcblk0p20
lrwxrwxrwx root     root              2014-07-02 10:12 kpan -> /dev/block/mmcblk0p33
lrwxrwxrwx root     root              2014-07-02 10:12 logo -> /dev/block/mmcblk0p29
lrwxrwxrwx root     root              2014-07-02 10:12 mbl -> /dev/block/mmcblk0p19
lrwxrwxrwx root     root              2014-07-02 10:12 misc -> /dev/block/mmcblk0p26
lrwxrwxrwx root     root              2014-07-02 10:12 modem -> /dev/block/mmcblk0p1
lrwxrwxrwx root     root              2014-07-02 10:12 modemst1 -> /dev/block/mmcblk0p17
lrwxrwxrwx root     root              2014-07-02 10:12 modemst2 -> /dev/block/mmcblk0p18
lrwxrwxrwx root     root              2014-07-02 10:12 padA -> /dev/block/mmcblk0p9
lrwxrwxrwx root     root              2014-07-02 10:12 padB -> /dev/block/mmcblk0p16
lrwxrwxrwx root     root              2014-07-02 10:12 pds -> /dev/block/mmcblk0p27
lrwxrwxrwx root     root              2014-07-02 10:12 persist -> /dev/block/mmcblk0p22
lrwxrwxrwx root     root              2014-07-02 10:12 recovery -> /dev/block/mmcblk0p32
lrwxrwxrwx root     root              2014-07-02 10:12 rpm -> /dev/block/mmcblk0p6
lrwxrwxrwx root     root              2014-07-02 10:12 rpmBackup -> /dev/block/mmcblk0p13
lrwxrwxrwx root     root              2014-07-02 10:12 sbl1 -> /dev/block/mmcblk0p2
lrwxrwxrwx root     root              2014-07-02 10:12 sbl2 -> /dev/block/mmcblk0p3
lrwxrwxrwx root     root              2014-07-02 10:12 sbl2Backup -> /dev/block/mmcblk0p10
lrwxrwxrwx root     root              2014-07-02 10:12 sbl3 -> /dev/block/mmcblk0p4
lrwxrwxrwx root     root              2014-07-02 10:12 sbl3Backup -> /dev/block/mmcblk0p11
lrwxrwxrwx root     root              2014-07-02 10:12 sp -> /dev/block/mmcblk0p25
lrwxrwxrwx root     root              2014-07-02 10:12 ssd -> /dev/block/mmcblk0p23
lrwxrwxrwx root     root              2014-07-02 10:12 system -> /dev/block/mmcblk0p36
lrwxrwxrwx root     root              2014-07-02 10:12 tombstones -> /dev/block/mmcblk0p34
lrwxrwxrwx root     root              2014-07-02 10:12 tz -> /dev/block/mmcblk0p7
lrwxrwxrwx root     root              2014-07-02 10:12 tzBackup -> /dev/block/mmcblk0p14
lrwxrwxrwx root     root              2014-07-02 10:12 userdata -> /dev/block/mmcblk0p38
lrwxrwxrwx root     root              2014-07-02 10:12 utags -> /dev/block/mmcblk0p8
lrwxrwxrwx root     root              2014-07-02 10:12 utagsBackup -> /dev/block/mmcblk0p15
 

CWGSM3VO

Senior Member
Jan 4, 2012
2,151
1,294
Quick comparison shows that modem (if that is radio) partitions have the same size.

OK, that sounds good I'm guessing. Now what's the next step? I'm not sure how well flashing the JB radio for my phone will work. Not too worried about bricking it as much as I am spending the time RSD'ing and the like. Installing a XT926 KK radio *might* work however, maybe? Dunno.
 

thewraith420

Senior Member
Sep 3, 2011
395
79
Google Pixel 6
Out of curiosity I just checked and my XT907 and it's also the same size modem partition

Tapatalk'n it from my XT907 (MoKee 4.4.4) on Page Plus Cellular.
 

Zeljko1234

Senior Member
May 7, 2010
5,898
2,766
Stockholm
OK, that sounds good I'm guessing. Now what's the next step? I'm not sure how well flashing the JB radio for my phone will work. Not too worried about bricking it as much as I am spending the time RSD'ing and the like. Installing a XT926 KK radio *might* work however, maybe? Dunno.

Next step would me flash the radio but I don't wish that someone brick his phone.

Anyway, I just had awake state with your latest build. Reboot solved it. I couldn't find what was causing it.
 

Orphee

Senior Member
Jan 31, 2008
1,726
791
Google Pixel 8
If I were you I wouldn't play with radio (/firmware) between xt925 and 926...
I think it won't work.

But you can always flash back original radio with fastboot...
 

CWGSM3VO

Senior Member
Jan 4, 2012
2,151
1,294
I'm going to start building the new nightlies (3.4 based) but it looks like dhacker's kernel git is newer than CM's so I may sync his kernel source instead for these builds.
 
  • Like
Reactions: idless

CWGSM3VO

Senior Member
Jan 4, 2012
2,151
1,294
Haven't forgotten about this thread -- just trying to get life straightened out and then I have some free time to play again.
 

Top Liked Posts

  • There are no posts matching your filters.
  • 17
    Please don't quote this post.
    Nobody likes an OPs Wall of Text in the middle of page 3.

    One of the best things about Android is the ability to make roms, whether it be from source or stock. A lot of guides go into details about how to get your Linux system set up and running, this one won't. I expect that you already have a running Linux system and have followed one of the many guides around to have all the required software installed.

    If you don't have Linux installed, preferably Debian or Debian based (I use Debian Testing) and set up for compiling an Android rom, stop reading this, install Linux, and follow one of the Android guides below Everything in this guide requires Linux, I might add in some Windows tools in the future. Ask for Linux install help in what ever disto you choose's forums, not here.

    Required Tools
    Attached is a zip containing a lot of tools that I use, and sadly, I've acquired them at different times over the years and I don't remember where I got them all at, so giving proper credit isn't possible. If you developed a tool I used here, please know that you have my thanks and gratitude, and if you let me know, I'll remove it or add proper credit.

    Some of the included tools I won't even discuss because they're not relevant to this platfore (like sbf_flash...Linux tool for flashing old school moto firmware to the Bravo, Defy, and other omap3 based moto phones), but they're included because I've added all the things I have installed in my local Android $PATH. They are only 1.9mb extracted, so it's not like they take up a lot of space...anyways...

    • Just extract all the tools into $HOME/bin, or any other preferred location in your $PATH
    • Ensure they have the proper permissions; run "chmod 755 +x $HOME/bin/*", change $HOME/bin to where ever you installed the tools at
    • log out
    • log back in
    and you're done with the tool installation part (there's also a source /blah/blah command that can be used, but log out and log in is universal). I keep all my sources and tools on their own hard drive, located on /android, so nothing is lost if I ever change Linux distros -- All I have to do is add /android/bin to my $PATH and I'm good to go (once I've copy/pasted the commands in one of the above guides :p)

    Some Linux terms/commands
    • $HOME -- The current users home directory. I'm logged in as skeevy420, so my $HOME is /home/skeevy420, $HOME/bin is /home/skeevy420/bin
    • $PATH -- all the directoies your system will look for executable files....Google it or check Arch Linux's guides, they're great
    • su -- you should really know this one....shame on you if you don't
    • sudo -i -- similar to sudo, only it opens an interactive sudo shell where every command is done as sudo

    Converting a Fastboot into a flashable zip
    This is pretty straight forward and only requires dumpperms.pl and simg2img.py (in the zip you should have already installed)
    To make things easier all the terminal commands are colored blue

    First Step -- Converting system.img into a mountable format
    • Download and Extract a fastboot zip file
    • Open a terminal in the folder you extracted the zip to
    • run "simg2img.py ./system.img ./system.img.raw" (it's system.img.ext4, not system.img, if you're converting an ICS fastboot image)

    Second Step -- Mount the converted image
    • Obtain a root shell, use "sudo -i" or "su" depending on how your system handles regular users accessing superuser privileges ***$PATH HINT***
    • Every single command in every step done after this will be as su/sudo -i
    • cd back to the folder with the converted image, if necessary
    • mkdir -p /mnt/tmp/zip/system
    • mount -o loop system.img.raw /mnt/tmp/zip/system

    Thrid Step -- Get file permissions
    • dumpperms.pl /mnt/tmp/zip/system > /mnt/tmp/perms

    Fourth Step -- Add in META-INF (this is from Gummy Rom June 02, 2014)
    • Download the attached META-INF.zip
    • unzip META-INF.zip -d /mnt/tmp/zip

    Fifth Step -- Modify Updater Script
    • Open /mnt/tmp/perms with a text editor
    • Select everything and copy it
    • Open /mnt/tmp/zip/META-INF/com/google/android/updater-script with a text editor
    • Select the marked line, highlighted blue in the template below
    • Paste in the permissions
    • Save it as /mnt/tmp/zip/META-INF/com/google/android/updater-script

    Sixth Step -- Add in kernel/boot.img
    • cd into extracted fastboot folder if necessary
    • cp boot.img /mnt/tmp/zip

    Seventh Step -- Pack it all up
    • zip -r /mnt/tmp/zip/rom.zip /mnt/tmp/zip

    Eight Step -- Flash it
    • You should really know how to get a rom on your phone at this point in the game....
    • If you don't, we're all gonna laugh at you.

    Updater Script Template
    Code:
    assert(getprop("ro.product.device") == "moto_msm8960" || getprop("ro.build.product") == "moto_msm8960" || 
           getprop("ro.product.device") == "xt901" || getprop("ro.build.product") == "xt901" || 
           getprop("ro.product.device") == "solstice" || getprop("ro.build.product") == "solstice" || 
           getprop("ro.product.device") == "xt905" || getprop("ro.build.product") == "xt905" || 
           getprop("ro.product.device") == "smq_u" || getprop("ro.build.product") == "smq_u" || 
           getprop("ro.product.device") == "scorpion_mini_u" || getprop("ro.build.product") == "scorpion_mini_u" || 
           getprop("ro.product.device") == "xt907" || getprop("ro.build.product") == "xt907" || 
           getprop("ro.product.device") == "scorpion_mini" || getprop("ro.build.product") == "scorpion_mini" || 
           getprop("ro.product.device") == "xt925" || getprop("ro.build.product") == "xt925" || 
           getprop("ro.product.device") == "vanquish_u" || getprop("ro.build.product") == "vanquish_u" || 
           getprop("ro.product.device") == "xt926" || getprop("ro.build.product") == "xt926" || 
           getprop("ro.product.device") == "vanquish" || getprop("ro.build.product") == "vanquish" || 
           getprop("ro.product.device") == "mb886" || getprop("ro.build.product") == "mb886" || 
           getprop("ro.product.device") == "qinara" || getprop("ro.build.product") == "qinara" || 
           getprop("ro.product.device") == "xt897" || getprop("ro.build.product") == "xt897" || 
           getprop("ro.product.device") == "asanti" || getprop("ro.build.product") == "asanti" || 
           getprop("ro.product.device") == "xt897c" || getprop("ro.build.product") == "xt897c" || 
           getprop("ro.product.device") == "asanti_c" || getprop("ro.build.product") == "asanti_c" || abort("This package is for \"moto_msm8960,xt901,solstice,xt905,smq_u,scorpion_mini_u,xt907,scorpion_mini,xt925,vanquish_u,xt926,vanquish,mb886,qinara,xt897,asanti,xt897c,asanti_c\" devices; this is a \"" + getprop("ro.product.device") + "\"."););
    show_progress(0.500000, 0);
    format("ext4", "EMMC", "/dev/block/platform/msm_sdcc.1/by-name/system", "0", "/system");
    mount("ext4", "EMMC", "/dev/block/platform/msm_sdcc.1/by-name/system", "/system");
    show_progress(0.500000, 40);
    ui_print("{x}...Installing System...");
    ui_print("");
    package_extract_dir("system", "/system");
    ui_print("{x}...Creating Symlinks...");
    ui_print("");
    ui_print("{x}...Setting Permissions...");
    ui_print("");
    [B][COLOR="MediumTurquoise"]HIGHLIGHT THIS LINE AND PASTE YOUR PERMISSIONS HERE[/COLOR][/B]
    show_progress(0.200000, 0);
    show_progress(0.200000, 10);
    ui_print("{x}...Flashing Kernel...");
    ui_print("");
    package_extract_file("boot.img", "/dev/block/platform/msm_sdcc.1/by-name/boot");
    show_progress(0.100000, 0);
    ui_print("{x}...Installation Complete!");
    ui_print("");

    Amended Hints
    • ***$PATH HINT*** Make sure root/sudo has access to the primary users $HOME/bin or where every you installed the tools to, It's that or you'll have to figure out your own workarounds and do a lot of jumping between user and su.

    THIS IS A WIP, I'LL BE ADDING MORE THINGS IN THE FUTURE. I'M HUNGRY AND I WANT A BREAK FROM TYPING
    5
    Please don't quote this post either. Thank you.

    Introduction
    One of the reasons people download rom sources is to just compile them, but the nostalgia from that wears of pretty fast and you're left thinking -- What Next??? There's plenty of things that can be done, you can add in things like Archidroid's Optimizations, take an AOKP feature and port it to Gummy, you could optimize the build with Linaro or a different GCC version, you might want to try your hand at compiling an optimized toolchain to optimize the rom's compile even further, you could do bug fixes and submit them to CM or your rom of choice's developer..the possibilities are endless, but where to start? How to start?

    The example below is based on adding Archidroid's Optimizations to PAC and will be on my GitHub page for anyone to see and use. I'm using Archidroid's Optimizations because they're well documented, they don't cleanly pick with PAC, and they're a neat thing that can be done to nearly any rom -- all that makes it a good candidate for a basic first source based mod tutorial. I'll also be adding in Arrrghhh's kernel because why not.

    First thing you need to do is get a Github account.
    You're gonna want this. It's free and it gives you a place push your modified sources to; so when you sync, you get your changes. It also serves as a good backup for the projects you're working on. I'll go into remotes and pushing when the time comes.


    Now, Archidroid and PAC...where to start?
    I'm gonna assume that you've already synced PAC's sources as well as initialized a PAC build to create roomservice.xml and sync the device sources. If you haven't synced yet, but you already have, say, CM or AOSP synced, you can add --reference=/path/to/your/CM/sources and your PAC sync will use your local CM files if they're the same as what PAC needs. --reference is one of my favorite repo commands.

    Well, you start by forking all the projects PAC has that are modified by Archidroid's Optimizations, which are android_build, android_art, & for PAC, android_vendor_pac to incorporate it properly into PAC's build script. See, PAC's build script already allows defining the GCC O Level which is a big part of what Archidroid's Optimizations target, but if done right, they can be integrated in a way that allows defining Os, O2, O3, Oa (O Archidroid), and Of (his Ofast commit that he's testing). I might even get around give PAC's build script a way to define GCC version and Google or Linaro GCC...

    You're gonna want to open PAC's manifest, located here, and determine from where you fork the 3 projects. You'll see that android_art is from CM, so fork it from Cyanogenmod. To Fork, sign in to Github, go to where the project is located, and click the fork button in the upper right hand corner...simple. android_build and android_vendor_pac are PAC repos, so fork them from PAC.

    Thought you were done forking? Nope, you have one more to fork IF you plan on submitting this to PAC's Gerrit like I plan on doing. That fork is PAC-man/pacman because Archidroids GCC repos and (a forked) android_art will have to be added to PAC's manifest.

    I'm also going to go into detail and write the guide from the perspective view of using a local manifest, removals, and whatnot -- IMHO, Forking and updating manifests is better if you plan on contributing to a project/submit for Gerrit review, local manifests are better for personal projects, testing, and preparing to do a proper, correct submission to Gerrit review.


    Create Local Manifests
    Probably the easiest part of AO is adding GCC 4.8. This is done by simply making a file named (pretty much anything except roomservice.xml) linaro.xml. It'll be a standard repo xml file that looks like this

    Code:
    <?xml version="1.0" encoding="UTF-8"?>
    <manifest>
      <!-- Generic Github remote -->
      <remote  name="github"
               fetch="https://github.com" />
    
      <!-- LINARO TOOLCHAIN -->
      <project name="JustArchi/Linaro" path="prebuilts/gcc/linux-x86/arm/arm-eabi-4.8" remote="github" revision="4.8-eabi" />
      <project name="JustArchi/Linaro" path="prebuilts/gcc/linux-x86/arm/arm-linux-androideabi-4.8" remote="github" revision="4.8-androideabi" />
    </manifest>

    The only problem with that is, for us, Linaro GCC 4.8 built roms seem a bit more error prone, but we can't just add in Linaro GCC 4.7 like above because we'll get sync errors since PAC already has Google GCC 4.7...so we'll add some project removal lines in the xml...sources in local manifests take precedent.

    Code:
    <?xml version="1.0" encoding="UTF-8"?>
    <manifest>
      <!-- AOSP remote -->
      <remote  name="aosp"
               fetch="https://android.googlesource.com" />
    
      <!-- Generic Github remote -->
      <remote  name="github"
               fetch="https://github.com" />
    
      <!-- Removals -->
      <remove-project name="platform/prebuilts/gcc/linux-x86/arm/arm-eabi-4.7" />
      <remove-project name="platform/prebuilts/gcc/linux-x86/arm/arm-linux-androideabi-4.7" />
    
      <!-- ADDS -->
      <!-- LINARO TOOLCHAIN -->
      <project name="JustArchi/Linaro" path="prebuilts/gcc/linux-x86/arm/arm-eabi-4.7" remote="github" revision="4.7-eabi" />
      <project name="JustArchi/Linaro" path="prebuilts/gcc/linux-x86/arm/arm-linux-androideabi-4.7" remote="github" revision="4.7-androideabi" />
      <project name="JustArchi/Linaro" path="prebuilts/gcc/linux-x86/arm/arm-eabi-4.8" remote="github" revision="4.8-eabi" />
      <project name="JustArchi/Linaro" path="prebuilts/gcc/linux-x86/arm/arm-linux-androideabi-4.8" remote="github" revision="4.8-androideabi" />
      <!-- Google 4.8 TOOLCHAIN -->
      <!-- Uncomment the two lines, comment out both Linaro 4.8s, then repo sync to change toolchains -->
      <!-- <project name="platform/prebuilts/gcc/linux-x86/arm/arm-eabi-4.8" path="prebuilts/gcc/linux-x86/arm/arm-eabi-4.8" remote="aosp" revision="master" />
      <project name="platform/prebuilts/gcc/linux-x86/arm/arm-linux-androideabi-4.8" path="prebuilts/gcc/linux-x86/arm/arm-linux-androideabi-4.8" remote="aosp" revision="master" /> -->
    </manifest>

    NOTE: The remote lines aren't needed here. They're already in PAC's manifest and I only included them above to get you thinking about your remotes when you're setting up a manifest. If you wanna compile PAC following this guides instructions, before you click save after you copy and paste the above xml, delete lines 3 to 11, making the new line the be the Removals line. You should also check the remotes before you use this with other roms, because this is pretty rom independent; the removal lines may not be necessary on some roms.

    Now that we have an xml file that handles our toolchain, I'll break it down and explain where the different things come from.

    The first thing you'll notice is the remotes. In the xml files, the remote is the website or location you're getting your sources from. They can also be used to use less characters in the xml -- I could have added a remote named Archi with fetch="https://github.com/JustArchi", then I'd change the remote to Archi and the name to just "Linaro". While the 4 repos here isn't that big of a deal, imagine having 300 name="CyanogenMod/blah" projects, name="blah" remote="cm" seems like a better idea doesn't it?.

    Below the remotes are the removals, and they're determined by the name= part of a project line of your main manifest.xml or roomservice.xml. Adding in more removals is simply copy/pasting the name= line of a project and having it formatted like you see above.

    The Adds....those are just your standard lines of a manifest containing the stuff you want to add to your project or use now that the crap you don't want to use is removed.


    Side Project -- Adding in a Arrrghhh's Custom Kernel to the Local Manifest
    This part here is generic and geared towards CyanogenMod. I won't be using this with the rest of the Archidroid tutorial.
    Simple two line mod
    Code:
      <remove-project name="CyanogenMod/android_kernel_motorola_msm8960-common" />
      <project name="arrrghhh/android_kernel_motorola_msm8960-common" path="kernel/motorola/msm8960-common" remote="github" revision="cm-11.0_mod" />


    Adding Arrrghhh's Kernel to PAC Vendor
    While the Dev Team's kernel is nice and stable, it just doesn't have all that many tweaks. That's where Arrrghh's kernel comes into play. It's the Dev Team's kernel with both higher and lower frequencies to use, more governors and schedulers, adjustable voltage table, and more.

    Before I go on, there are two programs I use that help with merge conflicts, and those are Meld and Git-Cola. I'll be using them below, but if you have a preferred way of dealing with merge conflicts, then by all means use that (I like SmartGit HG too). For most Debian/Ubuntu distros, they can be installed with the following terminal command.

    Code:
    [COLOR="Blue"]sudo apt-get install meld git-cola[/COLOR]

    IMPORTANT: I'll be using my own personal repos and directories below. I'll try to point them out, but for general note, /android/pac is my sources' root directory and remotes created named skeevy are mine, you need to create them with a different name and have the URL set to your github account, not mine.

    Now that that's out of the way, fire up the terminal and go to your sources root directory, for me it's cd /android/pac, and do a repo sync. Once the sources update, we start.

    Code:
    Go to vendor/pac -- [COLOR="Blue"]cd vendor/pac[/COLOR]
    Add your remote -- [COLOR="blue"]git remote add [/COLOR][COLOR="SeaGreen"]skeevy [/COLOR][COLOR="Blue"]https://github.com/[/COLOR][COLOR="SeaGreen"]skeevy420[/COLOR][COLOR="Blue"]/android_vendor_pac.git[/COLOR]
    fetch remotes -- [COLOR="Blue"]git fetch --all[/COLOR]  (or git fetch [I]name_of_remote[/I] to only fetch a single remote)
    Add a new branch and switch to it -- [COLOR="Blue"]git checkout -b pac-4.4[/COLOR] [COLOR="green"]***BRANCH NOTE***[/COLOR]

    Fire up your text editor, I use gedit, and use that to open up our pac device dependencies file
    Code:
    /android/pac/vendro/pac/dependencies/moto_msm8960.dependencies

    Code:
    [
        {
            "remote": "github",
            "account": "PAC-Motorola",
            "repository": "android_device_motorola_moto_msm8960",
            "target_path": "device/motorola/moto_msm8960",
            "revision": "cm-11.0"
        },
        {
            "remote": "github",
            "account": "CyanogenMod",
            "repository": "android_device_motorola_qcom-common",
            "target_path": "device/motorola/qcom-common",
            "revision": "cm-11.0"
        },
        {
            "remote": "github",
            "account": "CyanogenMod",
            "repository": "android_device_qcom_common",
            "target_path": "device/qcom/common",
            "revision": "cm-11.0"
        },
        {
            "remote": "github",
            "account": "CyanogenMod",
            "repository": "android_kernel_motorola_msm8960-common",
            "target_path": "kernel/motorola/msm8960-common",
            "revision": "cm-11.0"
        },
        {
            "remote": "github",
            "account": "Pinky-Inky-and-Clyde",
            "repository": "proprietary_vendor_motorola",
            "target_path": "vendor/motorola",
            "revision": "cm-11.0"
        }
    ]

    And modify the kernel part so it looks like this

    Code:
            "remote": "github",
            "account": "arrrghhh",
            "repository": "android_kernel_motorola_msm8960-common",
            "target_path": "kernel/motorola/msm8960-common",
            "revision": "cm-11.0_mod"

    Save it. Gedit, by default, saves a backup file in the same directory as the file you saved, make sure you delete that file if it did. And back to the terminal.

    Code:
    Commit the change -- [COLOR="Blue"]git commit -a -m "Change moto_msm8960 kernel to arrrghhh's kernel"[/COLOR]
    Push and set remote as upstream -- [COLOR="blue"]git push --set-upstream [/COLOR][COLOR="SeaGreen"]skeevy[/COLOR][COLOR="Blue"] pac-4.4[/COLOR]

    Now that Arrrghhhs kernel has been added to PAC, we'll move on to adding Archidroid to android_art....just kidding, we gotta play with removals and local manifests again...remove PAC's vendor and use your forked one.

    Code:
      <remove-project name="android_vendor_pac" />
      <project name="[COLOR="SeaGreen"]skeevy420[/COLOR]/android_vendor_pac" path="vendor/pac" remote="github" revision="pac-4.4" />

    Android Art
    Finally, actually doing something related to Archidroid's Optimizations. Yay.

    JUST A TEMP SAVE. I'M STILL WORKING ON THIS
    Art -- Remote
    Art -- Branch
    Art -- Pick
    Art -- Push

    Build -- Remote
    Build -- Branch
    Build -- Pick
    Build -- Fix\Build Script Integration
    Build -- Push

    Vendor -- Almost same as above
    Vendor -- Archidroid into Pac Build Script
    Vendor -- Add Arrrghhh kernel

    Pac Compile 0a
    Pac Compile 0f
    This part of the guide will take me 5 or 6 hours....but you'll get some cool builds out of it

    Submitting to PAC's Gerrit if builds are successful, doesn't actually have to boot or work...I'll explain...

    Wait a for anything above's upstream to be updated, and an update my forked stuff with master guide.

    ***BRANCH NOTE*** pac-4.4 (the branch name) can be whatever you want it to be, but if it's something you'll submit for a gerrit review, use the branch the project you're committing to is using. There's also using a temp branch then cherry-picking in the changes when your done...but we're not going into gerrit strategies here.
    3
    and a third just in case

    EDIT: Feel free to post rom tweaking and compile questions and advise while I'm finishing the guide up. There's quite a bit of content and I'd like to make sure it's correct and working before posting.
    3
    So I've done some testing with the Linaro toolchain and the HD. General consensus (and source) seems to indicate the S4 Plus in the device is closer to the Cortex-A9 than the Cortex-A15 but has some extra goodies that "kind of make up for it".

    Testing against both the A9 and A15 optimized toolchains, the A9 feels "better" but the A15 works just fine too. Main problem is the razrqcom source in CM11 defaults to A15 so there lies a problem. I will probably have to bite the bullet and compile my own optimized A9 toolchain with VFPv4 (vs VFPv3) and see how it turns out.

    Either way, the performance benefit is clearly there. Benchmarks somewhat reflect it but "real world use" it shines vs non-optimized. Once I'm happy, I'll post my findings so others can try their hand at it.

    EDIT: I'll make two builds available and update this post. Both are identical except for the toolchain + arch related opts applied. One is Cortex-A15 tuned and one is Cortex-A9 tuned. You decide from there. Keep in mind I'm still using the default GCC (4.7) with no special optimizations applied to it other than for ARM (under build/); everything else is stock and I'm not using my own toolchain yet.
    3
    Here we go: http://www.filedropper.com/cm-11-20140630-unofficial-motomsm8960

    This is still based on 6-27 source. Not quite where I want it to be but I need to make diffs of my changes before I repo sync now. ART is working. Seems plenty fast/smooth once it settles. I'll be working on my diffs for a while and then producing a newer, hopefully faster build next build. This build is mostly -O3 now but some areas need some tweaking.

    EDIT: Sorry Z, no GDrive links yet :)