[Guide]How to Compile PAC Rom

Search This thread

iurnait

Inactive Recognized Developer
Jun 21, 2012
869
1,152
Southern California
Can't get it :(

where should I place the pac_CODENAME.mk ?
Then the dependencies?
Suppose, I am building for c1905, then the dependencies must be in /device/sony/c1905/c1905.dependencies?
Then

Is this pac_c1905.mk okay?

Code:
# Check for target product
ifeq (pac_c1905,$(TARGET_PRODUCT))

# OVERLAY_TARGET adds overlay asset source
OVERLAY_TARGET := pa_hdpi

# PAC device overlay
PRODUCT_PACKAGE_OVERLAYS += vendor/pac/overlay/pac/hdpi_480x854

# PAC boot logo
PRODUCT_COPY_FILES += \
    vendor/pac/prebuilt/common/bootlogo/pac_logo_480x854.rle:root/logo.rle

# Copy bootanimation
PRODUCT_COPY_FILES += \
    vendor/pac/prebuilt/480x854/bootanimation.zip:system/media/bootanimation.zip

# include PAC common configuration
include vendor/pac/config/pac_common.mk

# Inherit CM device configuration
$(call inherit-product, device/sony/c1905/cm.mk)

PRODUCT_NAME := pac_c1905

endif

Help Me out. I am trying to build for Xperia M.

Dependencies go in the dependencies folder, the pac_CODENAME.mk goes in the products folder. However, your device's codename is nicki i believe

Device tree: https://github.com/freexperia/android_device_sony_nicki
Kernel: https://github.com/freexperia/android_Kernel_sony_msm8x27
Vendor: Use the extractfiles.sh script to grab the files from your device
 
Last edited:

Dilesh Perera

Senior Member
May 26, 2012
1,802
943
Colombo
Xiaomi Poco F1
Xiaomi Poco F3
hi

can anyone help me

im getting this

Fetching projects: 98% (439/447) Fetching project android_hardware_qcom_media
Fetching projects: 100% (447/447), done.
Syncing work tree: 70% (313/447) error: manifest required for this command -- please run init

i did init and repo sync but same result :(
 
R

raC-A

Guest
Dependencies go in the dependencies folder, the pac_CODENAME.mk goes in the products folder. However, your device's codename is nicki i believe

Device tree: https://github.com/freexperia/android_device_sony_nicki
Kernel: https://github.com/freexperia/android_Kernel_sony_msm8x27
Vendor: Use the extractfiles.sh script to grab the files from your device

I can't see any Dependencies folder :| nor the products folder. Here is the screenshot of working dir. Ya FXP has changed the name to nicki.. I suppose. Till now I built all ROMs as C1905. I am using a build server(my friend has given me access to his). So please help me with the vendor too! :(

Screenshot of Working dir :
16h7pzk.png


EDIT : Got those folders. Will try to build.
 
Last edited:

Lyok0ne

Senior Member
Dec 2, 2011
50
5
Perpignan
I am trying to build PAC for the HTC EVO 3D as this is the best ROM I had when it was supported for Android 4.3 ...

Everything went fine as the HTC EVO 3D (shooteru) has a working unofficial build of Cm11 ... But at the end of the task, I've got the following error :

/home/guillaume/pac/out/target/product/shooteru/pac_shooteru-ota-eng.guillaume.zip doesn't exist!

I don't understand why because it's appear to me normal that the zip that I'm trying to build doesn't exist yet ... Hope anyone could help me ... :D It will be very appreciate :)
 

jerbear294

Inactive Recognized Contributor
Oct 9, 2013
1,757
959
24
Google Pixel 4a
I am trying to build PAC for the HTC EVO 3D as this is the best ROM I had when it was supported for Android 4.3 ...

Everything went fine as the HTC EVO 3D (shooteru) has a working unofficial build of Cm11 ... But at the end of the task, I've got the following error :



I don't understand why because it's appear to me normal that the zip that I'm trying to build doesn't exist yet ... Hope anyone could help me ... :D It will be very appreciate :)

There should be an error above that. Error 1 is what you are looking for.

Sent from my Sero 7 Pro using Tapatalk
 

Lyok0ne

Senior Member
Dec 2, 2011
50
5
Perpignan
There should be an error above that. Error 1 is what you are looking for.

Sent from my Sero 7 Pro using Tapatalk

Thanks a lot :) I found several Error 1 before the script stop ... Is there any of those error that can be explained ?...

make: *** [/home/guillaume/pac/out/target/product/shooteru/obj/SHARED_LIBRARIES/libOmxVenc_intermediates/src/omx_video_base.o] Error 1

hardware/htc/mm-video/vidc/vdec/src/omx_vdec.cpp:8682:133: warning: format '%d' expects argument of type 'int', but argument 4 has type 'OMX_U32 {aka long unsigned int}' [-Wformat]
make: *** [/home/guillaume/pac/out/target/product/shooteru/obj/SHARED_LIBRARIES/libOmxVdec_intermediates/src/omx_vdec.o] Error 1

I will continue to dig in it ;)
 

mind_challenge

Senior Member
Feb 17, 2011
340
42
Rijeka
Thanks, I will! I will do everything in my power to make PAC ROM available for my phone! I used to have your PAC 4.3 ROM, which I loved, and that's the reason I really want a KitKat PAC ROM, because KitKat is optimised for phones with low memory, so it'd be awesome to have PAC 4.4 for the old P990.
I shall try to gather the penguins and port PAC to P990! :)

Sadly enough, P990 isn't on it, but with the help of Metallica and the penguins, maybe we'll be able to make PAC available for the P990 anyway! :)

@DavidLouwers

talk with tonyp and penguin77 if the device repos work PAC 4.4

You can only one use the Kernel/Device/Vendor Tree... (if you planned to run as nightly in jenkins) If tonyp use for her CM11@p990 other modified repos was normally is in PAC or Cyanogenmod... it can build but you must modifing default.xml in .repo/manifests. But then you can not add to nighlys...

if you want help, ask me, i had this device before and maintained PAC for p990

I'm interested in helping.
I have already setup my enviroment.
Yes, I'm a noob when it comes to building roms, but I hope we can do something together.
I just downloaded PAC sources, so can any of you guys pm with what to do next, as I wish to try and build a ROM just for testing.
 

jerbear294

Inactive Recognized Contributor
Oct 9, 2013
1,757
959
24
Google Pixel 4a
Thanks to this tutorial I ported PAC to my Sero 7 Pro, but I have one problem:
How do I enable HALO in this ROM? I can't find it in the settings.

Sent from my Sero 7 Pro using Tapatalk
 

Abhinav1997

Inactive Recognized Developer / Retired Forum Mod
Jul 29, 2012
2,590
5,306
hi

can anyone help me

im getting this

Fetching projects: 98% (439/447) Fetching project android_hardware_qcom_media
Fetching projects: 100% (447/447), done.
Syncing work tree: 70% (313/447) error: manifest required for this command -- please run init

i did init and repo sync but same result :(

Did u stopped sync in between or is there anything in your local_manifest that isn't correct? Also did u manually edited anything in manifest of PAC?

Can we use or make pac rom for spice coolpad mi 496 /coolpad 7268

Sent from my Spice Mi-496 using XDA Premium 4 mobile app

If it has cm11 then you can easily but not, then u might need to to a cm bringup since it uses cm device tree.

I can't see any Dependencies folder :| nor the products folder. Here is the screenshot of working dir. Ya FXP has changed the name to nicki.. I suppose. Till now I built all ROMs as C1905. I am using a build server(my friend has given me access to his). So please help me with the vendor too! :(

Screenshot of Working dir :
16h7pzk.png

vendor/pac

I am trying to build PAC for the HTC EVO 3D as this is the best ROM I had when it was supported for Android 4.3 ...

Everything went fine as the HTC EVO 3D (shooteru) has a working unofficial build of Cm11 ... But at the end of the task, I've got the following error :



I don't understand why because it's appear to me normal that the zip that I'm trying to build doesn't exist yet ... Hope anyone could help me ... :D It will be very appreciate :)

You must have got some error someone.

Thanks a lot :) I found several Error 1 before the script stop ... Is there any of those error that can be explained ?...





I will continue to dig in it ;)

That's not the error, the error that caused build to stop must be further above.

I'm interested in helping.
I have already setup my enviroment.
Yes, I'm a noob when it comes to building roms, but I hope we can do something together.
I just downloaded PAC sources, so can any of you guys pm with what to do next, as I wish to try and build a ROM just for testing.

Now add the files as stated in OP.

Cheers,
AJ
 
  • Like
Reactions: sohanjaryal

Dilesh Perera

Senior Member
May 26, 2012
1,802
943
Colombo
Xiaomi Poco F1
Xiaomi Poco F3
Did u stopped sync in between or is there anything in your local_manifest that isn't correct? Also did u manually edited anything in manifest of PAC?

Cheers,
AJ

my problem solved after i removed roomservice and repo sync

however now i get below error when building the ROm :)

/home/dilesh/android/pac/out/target/product/urushi/pac_urushi-ota-eng.dilesh.zip doesn't exist!
Total time elapsed: 161 minutes 12 seconds
 
  • Like
Reactions: Lyok0ne

Abhinav1997

Inactive Recognized Developer / Retired Forum Mod
Jul 29, 2012
2,590
5,306
my problem solved after i removed roomservice and repo sync

however now i get below error when building the ROm :)

/home/dilesh/android/pac/out/target/product/urushi/pac_urushi-ota-eng.dilesh.zip doesn't exist!
Total time elapsed: 161 minutes 12 seconds

There must be an error above. Check for lines something like this-
Code:
make: *** <CAUSE OF ERROR> error#
make: *** Waiting for unfinished jobs

Cheers,
AJ
 

Abhinav1997

Inactive Recognized Developer / Retired Forum Mod
Jul 29, 2012
2,590
5,306
its my first time doing this. i left build last night. and i close the terminal after i seen the error when i work up :) is there anyway i can get the log now?

No. Sorry I don't think so :( But if you do rebuild(not clean just continue) you will get that error again soon. Just an advice, in build-pac.sh, there should be a line, something like this-

Code:
make -j"$opt_jobs" bacon

Change it to-

Code:
script -q ~/PAC.log -c " make -j"$opt_jobs" bacon "

This will create a log in your home directory of build while also showing it in terminal, so you can trace your build later for errors and stuff :)

Cheers,
AJ
 

Dilesh Perera

Senior Member
May 26, 2012
1,802
943
Colombo
Xiaomi Poco F1
Xiaomi Poco F3
No. Sorry I don't think so :( But if you do rebuild(not clean just continue) you will get that error again soon. Just an advice, in build-pac.sh, there should be a line, something like this-

Code:
make -j"$opt_jobs" bacon

Change it to-

Code:
script -q ~/PAC.log -c " make -j"$opt_jobs" bacon "

This will create a log in your home directory of build while also showing it in terminal, so you can trace your build later for errors and stuff :)

Cheers,
AJ

thanks for the tip. i will do again now :)

./build-pac.sh -cfio3 urushi is the command i did. how to continue without clean build ?? :)
 

Lyok0ne

Senior Member
Dec 2, 2011
50
5
Perpignan
I still got the same error 1 (make: *** [/home/guillaume/pac/out/target/product/shooteru/obj/SHARED_LIBRARIES/libOmxVenc_intermediates/src/omx_video_base.o] Error 1) that keep me from building this ROM ... I search everywhere, ask one from my device' forum but the dependencies seem good so I have no clues from where come this error ...

But I noticed that at the beginning of the script I've got this message :

Code:
Lunching device
Looking for dependencies
Dependencies file not found, bailing out.

Is that normal ??
Thanks anyone for your help :)
 

Dilesh Perera

Senior Member
May 26, 2012
1,802
943
Colombo
Xiaomi Poco F1
Xiaomi Poco F3
I still got the same error 1 (make: *** [/home/guillaume/pac/out/target/product/shooteru/obj/SHARED_LIBRARIES/libOmxVenc_intermediates/src/omx_video_base.o] Error 1) that keep me from building this ROM ... I search everywhere, ask one from my device' forum but the dependencies seem good so I have no clues from where come this error ...

But I noticed that at the beginning of the script I've got this message :

Code:
Lunching device
Looking for dependencies
Dependencies file not found, bailing out.

Is that normal ??
Thanks anyone for your help :)

about the code . i too get that code. and told me that is ok to ignore :)
 
  • Like
Reactions: Lyok0ne

DavidLouwers

New member
Feb 16, 2014
3
1
Utrecht
I'm interested in helping.
I have already setup my enviroment.
Yes, I'm a noob when it comes to building roms, but I hope we can do something together.
I just downloaded PAC sources, so can any of you guys pm with what to do next, as I wish to try and build a ROM just for testing.

I would like to help as much as I can, but I'm a noob as well. The experts on this are:
- Metallica (old P990 PAC dev)
- tonyp (P990 dev, made a CM11 ROM)
- EvilSniper (P990 dev, made a CM11 ROM)
- Pengus77 (kernel)
I would like to help as much as I can, test the ROMs, help with ideas, stuff like that, but that's about it I'm afraid :/

Sent from my LG P990 running CM11 (thnx tonyp) via xda-developers app

---------- Post added at 04:34 PM ---------- Previous post was at 04:29 PM ----------

Also, this forum (by Metallica) might help:
http://xdaforums.com/showthread.php?t=2644910

Sent from my LG P990 running CM11 (thnx tonyp) via xda-developers app
 
  • Like
Reactions: mind_challenge

mind_challenge

Senior Member
Feb 17, 2011
340
42
Rijeka
I would like to help as much as I can, but I'm a noob as well. The experts on this are:
- Metallica (old P990 PAC dev)
- tonyp (P990 dev, made a CM11 ROM)
- EvilSniper (P990 dev, made a CM11 ROM)
- Pengus77 (kernel)
I would like to help as much as I can, test the ROMs, help with ideas, stuff like that, but that's about it I'm afraid :/

Sent from my LG P990 running CM11 (thnx tonyp) via xda-developers app

---------- Post added at 04:34 PM ---------- Previous post was at 04:29 PM ----------

Also, this forum (by Metallica) might help:
http://xdaforums.com/showthread.php?t=2644910

Sent from my LG P990 running CM11 (thnx tonyp) via xda-developers app

Maybe we should ask them for some guidelines.
 

Top Liked Posts

  • There are no posts matching your filters.
  • 49
    Hey guys, so a lot of you have be eagerly anticipating the release of PAC-4.4. Others of you may be seeking pac for a device that is not supported at this moment. So I thought I would take this opportunity to write a guide on how to compile PAC.

    In order to compile Android, I recommend that you use a Linux distro. For the purposes of this guide, I shall be using Ubuntu 13.10. It is pretty easy to set up, even as a dual boot with windows.

    The first thing you need to do, once you have installed Ubuntu, is to set it up to be able to compile Android. There are a lot of guides that show you how to do this, and this guide has pretty clear instructions. Follow all of his directions until you reach the point where he tells you to initialize the repository (The command he has as an example there is repo init -u git://github.com/AOKP/platform_manifest.git -b jb-mr2. Do not run this command or you will have downloaded the AOKP sources instead of the PAC sources)

    To download the pac sources, we need to initialize the repository first. For this guide, I will be downloading the pac source to ~/android/pac. Run:
    Code:
    mkdir -p ~/android/pac
    cd ~/android/pac
    repo init -u git://github.com/PAC-man/pacman.git -b pac-4.4

    Now it is time to download the source itself. Keep in mind that the source is rather large (~10+ GB), so you might want to make yourself a cup of tea (or 10 cups if you have a crappy isp) while waiting. Run:
    Code:
    repo sync

    Now, it is time to do the actually compiling. If your device is already supported by PAC, please skip directly to post 3. Else, go to post 2.
    28
    Adding Support for a device

    To add support for your device, the first thing you need to do is to hunt down your device tree. If you are not sure where your device tree is located, google it or ask in your device's subforum. Now, it is time to add the files required to build.

    From the root of directory where you have downloaded the pac source (~/android/pac), go to the vendor/pac directory. This is where we will be making the changes necessary to build for your device. Here are the files that need to be modified/added. Obviously, substitute your devices codename for CODENAME.

    1. dependencies/CODENAME.dependencies
    This file grabs your device and kernel tree. Look at the dependencies file of a device that is similar to yours to figure out what you need to place in here. A list of all the devices we support and their respective codenames can be found here. Again, if you are unsure about what to place here, you may want to ask for help in your devices subforum. Whenever possible, try to use the CM device tree. For the vendor files, keep the account name as "Pinky-Inky-and-Clyde" but change the repository to the appropriate OEM (check here for repos). Do not worry if the vendor files for your device are not in that repository. We will be adding them later.

    Here is a sample CODENAME.dependencies file for a Samsung device (note that the account names are case sensitive):
    Code:
    [
      {
        "account":      "Pinky-Inky-and-Clyde",
        "repository":   "proprietary_vendor_samsung",
        "target_path":  "vendor/samsung",
        "revision":     "cm-11.0"
        },
      {
        "account":      "CyanogenMod",
        "repository":   "android_device_samsung_CODENAME",
        "target_path":  "device/samsung/CODENAME",
        "revision":     "cm-11.0"
      },
      {
        "account":      "CyanogenMod",
        "repository":   "android_kernel_samsung_CODENAME",
        "target_path":  "kernel/samsung/CODENAME",
        "revision":     "master"
      },
      {
        "account":      "CyanogenMod",
        "repository":   "android_hardware_samsung",
        "target_path":  "hardware/samsung",
        "revision":     "cm-11.0"
      }
    ]

    Once you have done this, go to the root of your pac source (~/android/pac for this guide), and run
    Code:
    ./vendor/pac/tools/getdependencies.py CODENAME
    This will attempt to create the file .repo/local_manifests/roomservice.xml and then sync up the sources. If you have to make changes to your dependencies, please remove the roomservice.xml file and re-run the script again to ensure that no incorrect repositories are left lingering.
    Go to the vendor files directory (~/android/pac/vendor/YOUR_OEM), and search for the vendor files of your device. If they are not there, you will have to search for them online and copy them into the folder.
    Alternatively, if your device has an extract-files.sh script, in the device tree (located in device/OEM/CODENAME), you can hook up your device via usb and run that command to grab the vendor files directly from your device. In this case, connect your device and run:
    Code:
    cd device/OEM/CODENAME
    ./extract-files.sh

    2. products/pac_CODENAME.mk
    Again, look at the same file for a device that is similar to yours and make the appropriate changes for your device.

    Here is a sample pac_CODENAME.mk file for a hdpi device:
    Code:
    # Check for target product
    ifeq (pac_CODENAME,$(TARGET_PRODUCT))
    
    # OVERLAY_TARGET adds overlay asset source
    OVERLAY_TARGET := pa_hdpi
    
    # PAC device overlay
    PRODUCT_PACKAGE_OVERLAYS += vendor/pac/overlay/pac/hdpi_480x800
    
    # PAC boot logo
    PRODUCT_COPY_FILES += \
        vendor/pac/prebuilt/common/bootlogo/pac_logo_480x800.rle:root/logo.rle
    
    # Copy bootanimation
    PRODUCT_COPY_FILES += \
        vendor/pac/prebuilt/480x800/bootanimation.zip:system/media/bootanimation.zip
    
    # include PAC common configuration
    include vendor/pac/config/pac_common.mk
    
    # Inherit CM device configuration
    $(call inherit-product, device/samsung/CODENAME/cm.mk)
    
    PRODUCT_NAME := pac_CODENAME
    
    endif
    Note: for the PAC device overlay, look inside vendor/pac/overlay/pac for the available overlays. Likewise, for the bootanimation and boot logo, look in their respective directories for the available sizes.

    3. vendorsetup.sh
    Add a line that looks something like this in the appropriate area of this file (under the appropriate OEM, and in alphabetical order, please).
    Code:
    add_lunch_combo pac_CODENAME-userbebug

    --- The below files are not necessary for successful compilation, but are required if you submit your device for official PAC support. ---
    4. Contributors
    5. Nightly.xml
    6. XDAThreads
    7. devices-breakdown.xml

    For these files, follow the format of the other devices.
    26
    Building PAC

    Now that we got all of the housekeeping out of the way, it is time to build the rom!

    Open up a terminal and change directory to the base of where you downloaded the PAC source to begin compiling. Run (substitute your device's codename for CODENAME):
    Code:
    ./build-pac.sh CODENAME

    There are some additional options available in the build script. To see them all, simply run:
    Code:
    ./build-pac.sh
    If everything goes well, your build should be starting. Go take a walk or something while it is building. This may take a while if you have a computer with weak specs.
    16
    Submitting your device for official support

    Once you have successfully built PAC for your device and tested it, you can submit your changes to our gerrit for official support and automatic nightly builds.

    In order to do this, you need to first sign up on our gerrit and get your ssh keys set up. So head on over to http://review.pac-rom.com/ to register for an account. Next, we need to generate an ssh key pair in order to push changes to gerrit. To check if you already have a key pair generated, run
    Code:
    ls ~/.ssh
    If it shows a id_rsa.pub, you already have your keys generated and you can skip to the adding your ssh key to gerrit part.

    On the other hand, if there is nothing in your .ssh folder, run
    Code:
    ssh-keygen -t rsa -C "your_email@example.com"
    When you run this command, it will ask you where you want to save this file. Just hit enter. Next, it will ask you for a passphrase for your private key. Enter a passphrase here that you can remember.

    Now, it is time to add your public key to our gerrit. To copy your public key over, run:
    Code:
    sudo apt-get install xclip
    xclip -sel clip < ~/.ssh/id_rsa.pub
    (Alternatively, you can cat the file and just copy it, but the above mentioned way avoids any missing characters while copying.)

    Now, login to our gerrit and go to your account settings > ssh public keys. Click on add, and paste the key and save.

    It is time to upload your changes. We have a script to make this process easier. To grab the script, run:
    Code:
    cd ~/bin
    wget http://pac-rom.com/downloads/pac-review
    chmod a+x pac-review

    Now, run:
    Code:
    cd ~/android/pac
    cd vendor/pac
    git add -A
    git commit

    This should open up a text editor (probably nano) where you can put a commit message. For our purposes, just write something along the lines of "Add support for ___." To save the file, hit Ctrl + o. To exit, hit Ctrl + x. Then, run:
    Code:
    pac-review -p

    Follow the prompts and your changes should be automatically pushed and a link will show to your change on gerrit.

    If you realize that you made a mistake in your commit, DO NOT submit a new change. Instead, make your changes, then run:
    Code:
    git add -A
    git commit --amend

    Update your commit message if necessary and then push with the pac-review script. This will create a new patchset on our gerrit instead of creating a new commit.

    And that is all! If you have any questions, dont hesitate to ask them here. Ill try to get back to you as soon as possible
    6
    Hey iurnait, I didn't find any instructions on pac's github on how to clone the entire trees. Please help.

    cd into the directory where you are working, and then run
    Code:
    repo init -u git://github.com/PAC-man/pacman.git -b pac-4.4

    then run
    Code:
    repo sync