Attend XDA's Second Annual Developer Conference, XDA:DevCon 2014!
5,741,443 Members 39,483 Now Online
XDA Developers Android and Mobile Development Forum

Prevent apps from building

Tip us?
 
bud77
Old
#1  
bud77's Avatar
Senior Member - OP
Thanks Meter 189
Posts: 616
Join Date: Jun 2011
Location: Near Paris

 
DONATE TO ME
Default Prevent apps from building

Hello,

I'm building my own version for my hammerhead

I'm trying to figure out if it would be possible to prevent some apps to compile

For instance, MMS, email, and around 10 others apps I have to remove every time I flash

I also have a modified NFC apk (which allows tags while screen is off), can I also auto include this file in the build ? (instead of the "normal" one)

Thanks for any hint
Feeling happy ? There's a thanks button for that
 
Langes
Old
#2  
Langes's Avatar
Senior Member
Thanks Meter 1975
Posts: 1,296
Join Date: Sep 2012
Location: Sweet Spot

 
DONATE TO ME
Quote:
Originally Posted by bud77 View Post
Hello,

I'm building my own version for my hammerhead

I'm trying to figure out if it would be possible to prevent some apps to compile

For instance, MMS, email, and around 10 others apps I have to remove every time I flash

I also have a modified NFC apk (which allows tags while screen is off), can I also auto include this file in the build ? (instead of the "normal" one)

Thanks for any hint
look in your android source tree: .repo/local_manifests/roomservice.xml
In this file you can add and remove projects, so if you want to remove Browser from the build, you add this line to the others:

Code:
Select Code
 <remove-project name="android_packages_apps_Browser" />


Device Honami (C6903) | ROM PAC 4.4.4 | Kernel CyanogenMod
Device Urushi (ST18a) | ROM PAC 4.4.4 | Kernel LegacyXperia
The Following User Says Thank You to Langes For This Useful Post: [ Click to Expand ]
 
bud77
Old
#3  
bud77's Avatar
Senior Member - OP
Thanks Meter 189
Posts: 616
Join Date: Jun 2011
Location: Near Paris

 
DONATE TO ME
Quote:
Originally Posted by Langes View Post
look in your android source tree: .repo/local_manifests/roomservice.xml
In this file you can add and remove projects, so if you want to remove Browser from the build, you add this line to the others:

Code:
Select Code
 <remove-project name="android_packages_apps_Browser" />
Awesome ! Thousands thanks !!!

Will try that as soon as the active display fixes are merged

One last question tho, the case is sensitive ? Sould I copy/paste the project names from the git to be more accurate ?
Feeling happy ? There's a thanks button for that
 
Langes
Old
#4  
Langes's Avatar
Senior Member
Thanks Meter 1975
Posts: 1,296
Join Date: Sep 2012
Location: Sweet Spot

 
DONATE TO ME
Quote:
Originally Posted by bud77 View Post
Awesome ! Thousands thanks !!!

Will try that as soon as the active display fixes are merged

One last question tho, the case is sensitive ? Sould I copy/paste the project names from the git to be more accurate ?
Yes, you will get errors on incorrect case ... like most thing linux


Device Honami (C6903) | ROM PAC 4.4.4 | Kernel CyanogenMod
Device Urushi (ST18a) | ROM PAC 4.4.4 | Kernel LegacyXperia
 
bud77
Old
#5  
bud77's Avatar
Senior Member - OP
Thanks Meter 189
Posts: 616
Join Date: Jun 2011
Location: Near Paris

 
DONATE TO ME
Of course, that was a stupid question

First build try failed, as I removed the email app, but it seems to be needed by bluetooth (???)
After removing the project removal, it's now building

Thanks again !

And for added/replaced apk, is there any best practice ?

Sent from my Nexus 5
Feeling happy ? There's a thanks button for that
 
iurnait
Old
#6  
Recognized Developer
Thanks Meter 1061
Posts: 852
Join Date: Jun 2012
Location: Southern California
To remove packages from being built, just remove the corresponding line from the product packages in the vendor makefiles. Check you device/lge/hammerhead/cm.mk to see what makefiles it is referencing.
The Following User Says Thank You to iurnait For This Useful Post: [ Click to Expand ]
 
bud77
Old
#7  
bud77's Avatar
Senior Member - OP
Thanks Meter 189
Posts: 616
Join Date: Jun 2011
Location: Near Paris

 
DONATE TO ME
Quote:
Originally Posted by iurnait View Post
To remove packages from being built, just remove the corresponding line from the product packages in the vendor makefiles. Check you device/lge/hammerhead/cm.mk to see what makefiles it is referencing.
Won't this file be overwritten on each repo sync ?

And FYI, I managed to replace the NFC apk, by my modified one. I just added it in the folder where the SuperUser.apk is, and it got included in the final zip (replacing the one which has been compiled)
Feeling happy ? There's a thanks button for that
 
iurnait
Old
#8  
Recognized Developer
Thanks Meter 1061
Posts: 852
Join Date: Jun 2012
Location: Southern California
Quote:
Originally Posted by bud77 View Post
Won't this file be overwritten on each repo sync ?
As long as you do not commit the file, it will not get overwritten upon repo sync. How every, if cm decides to change something in that file, then you will have to stash your changes before syncing or it will give you a checkout error.

Quote:
And FYI, I managed to replace the NFC apk, by my modified one. I just added it in the folder where the SuperUser.apk is, and it got included in the final zip (replacing the one which has been compiled)
You are talking about placing it in the output directory right? This is not a good idea generally as it will be deleted if you do a clean build. If you need a modified NFC app it as best to remove the current packages/apps/NFC directory vial the local manifest and add a repo that has whatever changes you need


Sent from my Nexus 7 using Tapatalk
 
bud77
Old
(Last edited by bud77; 21st March 2014 at 07:44 PM.)
#9  
bud77's Avatar
Senior Member - OP
Thanks Meter 189
Posts: 616
Join Date: Jun 2011
Location: Near Paris

 
DONATE TO ME
Quote:
Originally Posted by iurnait View Post
As long as you do not commit the file, it will not get overwritten upon repo sync. How every, if cm decides to change something in that file, then you will have to stash your changes before syncing or it will give you a checkout error.
Got it, thanks !

But the local manifest seems to be a more viable option (long term speaking)

Quote:
You are talking about placing it in the output directory right? This is not a good idea generally as it will be deleted if you do a clean build. If you need a modified NFC app it as best to remove the current packages/apps/NFC directory vial the local manifest and add a repo that has whatever changes you need
Sent from my Nexus 7 using Tapatalk
Problem is, there is no repo for it. Someone posted the modified APK in the hammerhead forum
(He decompiled the app, modified a value, and recompiled it)

And I've done already 2 clean builds, and the modified APK is still there (weird right ?)

Edit : Misread 2nd post. No, not in output dir, but in "builddir"/vendor/pa/prebuilt/apk, and it stays after clean build
Feeling happy ? There's a thanks button for that
 
iurnait
Old
#10  
Recognized Developer
Thanks Meter 1061
Posts: 852
Join Date: Jun 2012
Location: Southern California
Quote:
Originally Posted by bud77 View Post
Got it, thanks !

But the local manifest seems to be a more viable option (long term speaking)



Problem is, there is no repo for it. Someone posted the modified APK in the hammerhead forum
(He decompiled the app, modified a value, and recompiled it)

And I've done already 2 clean builds, and the modified APK is still there (weird right ?)

Edit : Misread 2nd post. No, not in output dir, but in "builddir"/vendor/pa/prebuilt/apk, and it stays after clean build
Well, since you placed it as a prebuilt, it gets copied over to your out directory when you build the rom, so you are fine.

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

Advanced Search
Display Modes