5,605,835 Members 47,550 Now Online
XDA Developers Android and Mobile Development Forum

Merging HALO code?

Tip us?
 
ZacksBuilds
Old
#1  
ZacksBuilds's Avatar
Senior Member - OP
Thanks Meter 410
Posts: 1,582
Join Date: Dec 2012
Default Merging HALO code?

How do I merge HALO into my ROM? I'm a little lost here lol

Device: Nexus 5 16GB Black
ROM: PABETA3 (ZacksBuild) w/ Franco r32
 
jabza
Old
(Last edited by jabza; 21st January 2014 at 02:34 AM.)
#2  
Senior Member
Thanks Meter 389
Posts: 440
Join Date: Aug 2012

 
DONATE TO ME
Open a terminal and cd to the directory that you set up your repo. Then, in your browser, open up [1/2] Settings: HALO and [2/2] Frameworks: HALO from the gerrit.

Because it's titled [1/2], we'll start with the settings entry.

See where it says "Project AOSPA/android_packages_apps_Settings"? That's important. It says that this change is in packages/apps/Settings. So, in terminal:
Code:
cd packages/apps/Settings
Now, in the top right of the page, there's a download button. Click that, then choose "anonymous http" from the dropdown, instead of "repo". Click the clipboard button next to the one titled "cherry pick". It will copy the command to your clipboard, then paste it in terminal. It should look like this:

Code:
git fetch https://gerrit.paranoidandroid.co/AOSPA/android_packages_apps_Settings refs/changes/39/239/13 && git cherry-pick FETCH_HEAD
Press enter, and it'll download the changes. If all goes well, you'll see a message saying it's done. If not, you'll need to fix the errors. I'll get to that later.

Now, bring your terminal back to the top of your build directory with

Code:
cd ../../..
Now that you've put the settings entry for Halo in, now you need to add the frameworks. Go to the second gerrit entry, [2/2] Fameworks HALO.

You'll notice on the build page that, under project, it says AOSPA/android_frameworks_base. This means you have to go to the frameworks/base folder.

Code:
cd frameworks/base
Again, go to the download tab and copy the cherry-pick

Code:
git fetch https://gerrit.paranoidandroid.co/AOSPA/android_frameworks_base refs/changes/44/244/21 && git cherry-pick FETCH_HEAD
Press enter, and it'll try to merge. Chances are, this is where it doesn't work. The terminal output will tell you if it didn't work. If it didn't work, enter this command to check the problem:

Code:
git status
The terminal will then output all the changes to files this cherry pick consists of. In green are the files that work, and in red are the problem files. Here is the trickiest part.

Usually, for the frameworks cherry pick, my "git status" output tells me the problem is in packages/SystemUI/res/values/pa_strings.xml. So, in terminal:

Code:
gedit packages/SystemUI/res/values/pa_strings.xml
This will open up the file in question in a text editor. Now, on the gerrit entry for the Halo frameworks, there's a list of changed files. Click on the entry for pa_strings.xml (it's toward the bottom) (or here's a link). It'll show you the difference in the base file and the file needed for Halo frameworks. Everything in green is added, and everything in red is removed. So check this against your file, and make sure the changes are done. Frequently when you run into cherry picking errors, all you need to do is remove the line "<<<<< HEAD" that gets mistakenly put into the file.

Once you've edited the problem file, in this case pa_strings.xml, you need to tell your terminal you've fixed the problem. So save and exit the text editor, and type this in terminal:

Code:
git add packages/SystemUI/res/values/pa_strings.xml
Once again, check for any errors.

Code:
git status
If everything turns up green, you're good to go. Commit these changes to your build.

Code:
git commit
Now, go back to the base of your build in terminal.

Code:
cd ../..
From here, you just have to build to see if it works.

Code:
./rom-build.sh hammerhead
Wait for it to do its thing. If it compiles and tells you where the output file is, congratulations! You have a build with halo! If not, look at the output and do your best to fix the error that stopped it from building.

Then, at the end of the day, when you want to get rid of whatever cherry picking you've done, sync with the PA source code and it'll wipe out all cherry picks.

Code:
repo sync
This reverts it to a clean build, using the latest code from PA and all the commits from the "merged" section of the gerrit.
Nexus 5: Personal Paranoid Android nightly build
HTC One: Paranoid Android official beta
Samsung Infuse 4g: Beanstalk
====================================
My personal nightly builds from Paranoid Android source

With Halo: Nightly folder
Without Halo: Nightly folder

Also, you can check out the thread for updates and info.
Donate Bitcoins
The Following 11 Users Say Thank You to jabza For This Useful Post: [ Click to Expand ]
 
ZacksBuilds
Old
#3  
ZacksBuilds's Avatar
Senior Member - OP
Thanks Meter 410
Posts: 1,582
Join Date: Dec 2012
My build failed with 20 errors lol. I'm going to repo sync and try again using only HALO

Device: Nexus 5 16GB Black
ROM: PABETA3 (ZacksBuild) w/ Franco r32
 
micr0g
Old
#4  
micr0g's Avatar
Senior Member
Thanks Meter 32
Posts: 195
Join Date: Sep 2013
Location: Kalamata
jabza is a great guy,maybe the best one i have meet here.
Thanks for your help pal.
The Following 2 Users Say Thank You to micr0g For This Useful Post: [ Click to Expand ]
 
Galaxysm
Old
#5  
Galaxysm's Avatar
Senior Member
Thanks Meter 538
Posts: 2,880
Join Date: Sep 2012
Location: Mission
Quote:
Originally Posted by micr0g View Post
jabza is a great guy,maybe the best one i have meet here.
Thanks for your help pal.
+1 bro. Be is good!! He has helped me out a lot!!!

Sent from my Nexus5™. On PA™.
" Nothing's ever locked..."
Current Device:Nexus 5 Rooted-PA4+ ROM.
Current Device:Galaxy Note 2 (T-Mobile) Rooted.
History Of Phones...
Galaxy S2 (T-Mobile)-Rooted.
ZTE Warp (Boost Mobile)-Rooted.
Htc Inspire(AT&T)-Rooted/S-Off.
Optimus Elite(Virgin Mobile)-Rooted.
Htc Amaze 4G(T-Mobile)-Rooted.-SOLD.
Tablet: Galaxy Tab 2 10.1-Rooted.
The Following 2 Users Say Thank You to Galaxysm For This Useful Post: [ Click to Expand ]
 
Crostantin
Old
#6  
Crostantin's Avatar
Senior Member
Thanks Meter 27
Posts: 183
Join Date: Dec 2012
Location: Rome
@jabza, sorry but I am trying to add to my PA whitout success...are there new tricks to do??
Flying on my Mako with:
Recovey = TWRP
ROM = PA (Saber,XJ,Paranoid)
Kernel = Semaphore, Franco
 
jabza
Old
#7  
Senior Member
Thanks Meter 389
Posts: 440
Join Date: Aug 2012

 
DONATE TO ME
Quote:
Originally Posted by Crostantin View Post
@jabza, sorry but I am trying to add to my PA whitout success...are there new tricks to do??
Well it depends. What are the errors you're getting?

Sent from my Nexus 5
Nexus 5: Personal Paranoid Android nightly build
HTC One: Paranoid Android official beta
Samsung Infuse 4g: Beanstalk
====================================
My personal nightly builds from Paranoid Android source

With Halo: Nightly folder
Without Halo: Nightly folder

Also, you can check out the thread for updates and info.
Donate Bitcoins
 
Crostantin
Old
(Last edited by Crostantin; 22nd March 2014 at 03:18 PM.)
#8  
Crostantin's Avatar
Senior Member
Thanks Meter 27
Posts: 183
Join Date: Dec 2012
Location: Rome
Quote:
Originally Posted by jabza View Post
Well it depends. What are the errors you're getting?

Sent from my Nexus 5
@jabza
target R.java/Manifest.java: SystemUI (/home/crostantin/AOSPA/out/target/common/obj/APPS/SystemUI_intermediates/src/R.stamp)
frameworks/base/packages/SystemUI/res/values/pa_strings.xml:74: error: Error parsing XML: not well-formed (invalid token)
frameworks/base/packages/SystemUI/res/layout/status_bar_expanded_header.xml:91: error: Error: No resource found that matches the given name (at 'contentDescription' with value '@string/accessibility_halo').
make: *** [/home/crostantin/AOSPA/out/target/common/obj/APPS/SystemUI_intermediates/src/R.stamp] Errore 1
Flying on my Mako with:
Recovey = TWRP
ROM = PA (Saber,XJ,Paranoid)
Kernel = Semaphore, Franco
 
jabza
Old
(Last edited by jabza; 22nd March 2014 at 09:20 PM.)
#9  
Senior Member
Thanks Meter 389
Posts: 440
Join Date: Aug 2012

 
DONATE TO ME
Quote:
Originally Posted by Crostantin View Post
@jabza
target R.java/Manifest.java: SystemUI (/home/crostantin/AOSPA/out/target/common/obj/APPS/SystemUI_intermediates/src/R.stamp)
frameworks/base/packages/SystemUI/res/values/pa_strings.xml:74: error: Error parsing XML: not well-formed (invalid token)
frameworks/base/packages/SystemUI/res/layout/status_bar_expanded_header.xml:91: error: Error: No resource found that matches the given name (at 'contentDescription' with value '@string/accessibility_halo').
make: *** [/home/crostantin/AOSPA/out/target/common/obj/APPS/SystemUI_intermediates/src/R.stamp] Errore 1
That doesn't look too hard to fix. Edit frameworks/base/packages/SystemUI/res/values/pa_strings.xml

The terminal says there's an error at line 74 of pa_strings.xml, so I'd start there. Chances are it's something as simple as a missing "/ >". If you can't figure it out just by looking at it, you can check it with the pa_strings.xml listed under the android_frameworks_base gerrit entry and see what's different.

Edit: Also, the error you're getting about status_bar_expanded_header.xml is because of an error in the pa_strings.xml, so you don't have to worry about that.

Sent from my Nexus 5
Nexus 5: Personal Paranoid Android nightly build
HTC One: Paranoid Android official beta
Samsung Infuse 4g: Beanstalk
====================================
My personal nightly builds from Paranoid Android source

With Halo: Nightly folder
Without Halo: Nightly folder

Also, you can check out the thread for updates and info.
Donate Bitcoins
 
Crostantin
Old
#10  
Crostantin's Avatar
Senior Member
Thanks Meter 27
Posts: 183
Join Date: Dec 2012
Location: Rome
Quote:
Originally Posted by jabza View Post
That doesn't look too hard to fix. Edit frameworks/base/packages/SystemUI/res/values/pa_strings.xml

The terminal says there's an error at line 74 of pa_strings.xml, so I'd start there. Chances are it's something as simple as a missing "/ >". If you can't figure it out just by looking at it, you can check it with the pa_strings.xml listed under the android_frameworks_base gerrit entry and see what's different.

Edit: Also, the error you're getting about status_bar_expanded_header.xml is because of an error in the pa_strings.xml, so you don't have to worry about that.

Sent from my Nexus 5
did it...everything fine...
Thx

Inviato dal mio Nexus 4 utilizzando Tapatalk
Flying on my Mako with:
Recovey = TWRP
ROM = PA (Saber,XJ,Paranoid)
Kernel = Semaphore, Franco

The Following User Says Thank You to Crostantin For This Useful Post: [ Click to Expand ]
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes