[Q]How to remove&add apps before build from CM source - Android Q&A, Help & Troubleshooting

1.How to remove and add apps before build from CM source,and when it's done,the zip files have everything just what i want.
2.How to add Google apps before build form CM source,so i can have a zip include all google apps.
And ofcause not rebuild the zip.

I add and remove apk on system/app before package the rom.

ripclawrings said:
I add and remove apk on system/app before package the rom.
Click to expand...
Click to collapse
Do you mean dsixda's kichen?
There is no folder system/app in the CM source project.

When you are working with source, its not called system/app
all apps that are going to be baked into the ROM will be in the folder /packages/apps.
So here are the basic steps:
1.Place your app source code in /packages/apps (just drop the source folder in)
2.Create 'Android.mk' file for the app (if the app was made in eclipse, its likely to have res/R.java which is autogenerated by eclipse. This needs to be removed as the system will not recognize it.)
3.Edit /build/target/product/core.mk (or similar) and add your application in the list of PRODUCT_PACKAGES. (if you dont add it to the main make files, the app wont be compiled and it wont be in the update.zip when it is finished.
4.Run make.
IF you feel this is too complicated. create the update.zip and use dsixda's kitchen to edit the zip, add the apk manually and then resign it.
Hope this helps!

demoneyes905 said:
When you are working with source, its not called system/app
all apps that are going to be baked into the ROM will be in the folder /packages/apps.
So here are the basic steps:
1.Place your app source code in /packages/apps (just drop the source folder in)
2.Create 'Android.mk' file for the app (if the app was made in eclipse, its likely to have res/R.java which is autogenerated by eclipse. This needs to be removed as the system will not recognize it.)
3.Edit /build/target/product/core.mk (or similar) and add your application in the list of PRODUCT_PACKAGES. (if you dont add it to the main make files, the app wont be compiled and it wont be in the update.zip when it is finished.
4.Run make.
Click to expand...
Click to collapse
Thanks for the reply. However, could you elaborate on PRODUCT_PACKAGES. Where is it? And what is it?

Related

APK Manager v4.9 (Easy way to edit APKs)

Hey guys...heres the APK manager v4.9 by daneshm90.....its an easy way to edit apks......​
So i have written a simple script to ease the process of editing apks. Got a lot of downloads so thought its in demand
Whether you're doing basic image editing or editing the smali or xml files, on average u have to use (Brut.all or JF's smali/baksmali) awesome tool to extract the apk, edit it, then sign the apk and then adb push/install it. This process is quite tiresome if you are testing a method that needs fine tweaking.
This script should make the process a LOT smoother.
Theres an option of compiling/signing/installing all in one step
Thanks:
Goes to Brut.all for his awesome tool.
Goes to JF for ofcourse, smali/baksmali
Goes to farmatito for porting this script to linux
Features:
- Extract, Zip apk's.
- Optimize pngs (ignores .9.pngs)
- Zipalign apks
- Sign apks
- Push to specific location on phone
- Incorporates brut.all's apktool
- Pull apk from phone into modding environment.
- Batch optimize apk (Zipalign,optipng,or both)
- Quick sign an apk (Batch mode supported)
- Batch Ogg optimization
- Compression level selector (monitor status above menu)
- Batch install apk from script (option 16)
- Logging on/off has been removed. Instead a log.txt is created which logs the activities of the script organized using time/date headers
- User can change the max java heap size (only use if certain large apks get stuck when decompiling/compiling apks) (Option 19)
- Improved syntax of questions/answers
- Error detection. Checks if error occured anytime u perform a task, and reports it
- Read log (Option 20)
- U can now set this script as ur default application for apks. When u do, if u double click any apk it will install it for u.
- Supports batch installation, so if u drag multiple apks into the script (not while its running) it will install them all for u. U can ofcourse drag a single apk as well
- Added framework dependent decompiling (For non propietary rom apks). (Option 10). Checks whether the dependee apk u selected is correct.
- Allows multiple projects to be modified, switch to and from.
- Allows to modify system apk's using apktool but ensures maximum compatibility in terms of signature / manifest.xml
- Stuff i forgot i guess
Instructions (Windows):
- Place apk in appropriate folder (Any filename will work, if running for first time folders will not be there, you must run and then the folders will be created)
- Run script
- Minimize the script
- Edit files inside the project folder
- Maximize the script
Instructions (Linux):
- Place apk in appropriate folder (Any filename will work, if running for first time folders will not be there, you must run and then the folders will be created)
- Open terminal and change-directory to apkmanager (Easiest way is to type "cd ")
- Chmod 755 Script.sh
- Chmod 755 all files apps inside other folder (thanks for the tip bkmo )
- Run script by typing ./Script.sh
- Minimize the script
- Edit files inside the out folder
- Maximize the script
Requirements:
Java
Adb
Future Improvements:
- Manage multiple simultaneous apk edits (choose which apk to extract/build)
- Option to optimize the apks
- Option to adb push to user defined location
- Other stuff i dont know yet.
Windows (v4.9): Download Here
Linux (v4.3): Download Here
Here's the video!!
Got problems ?
1. Make sure your path has no spaces
2. Your filename has no wierd characters
3. Java/adb are in your path
4. It's not a proprietary rom's apk (aka Sense,Motorola,Samsung) (If u are, then use option 11 and drag the required framework, eg com.htc.resources, twframework-res...etc)
5. It's not a themed apk (if it is, expect .9 png errors, use as close to stock as possible)
6. Look at the log to know whats happening
7. If all else fails, post as much info as possible and we will try to assist you.
If U like my post, press the Thumbs Up button, i.e, Thank Me!
Bad download link. Please fix?
Please download to mediafire or multiupload
thanks
actually its not death214 link or project..and all thread he started was project by others and he just copy and paste..i remember u've been scolded by owain becoz of this,right death?=)
please upload files to other site.i cant download from rapidshare.
change link
Please click here:
http://lmgtfy.com/?q=apk+manager+xda
Nice. Rapidshare link working flawless.

[Tool][TLC]UpdatezipCreator

The Team Lambent Corrosion member presents:
UpdatezipCreator​
Some of you remember my old app UpdateThemeCreator. I've found some time to build a new app that can create updates (as zip archive flashable via recovery).
Changes/Improvements since the last version of ThemeUpdateCreator:
-new interface
-adding files to other folders than system/framework and system/app
-new algorythms
-editing update-script (saving, loading, making default etc)
-saving settings
I hope that app will work without any bugs
Changelog:
1.0.0.1
-adding update-binary to edify scripts (possibility of choosing own update-binary)
-added default scripts for edify scripts
-settings not stored in my documents
1.0.0.2
-Adding folders
-Drag&Drop
-Signing single zip archive
1.0.0.3
-Fixed bug with the wrong name of edify scripts
1.0.0.4
-Not signed archive is kept in temporary directory
-Functions library (inserting functions)
1.0.0.5
-Problem with update_ont_signed path solved (I hope so)
1.0.0.6
-Log mode
1.0.0.7
-Signing bug fixed
1.0.0.8
-Handling linux newline character in scripts
DOWNLOAD:
Rar archive - about 500 kb
Source code - about 1,3 MB - Visual Studio C#
Windows installer (source included) - about 830 kb
I'll use it tomorow for my theme
Sent from my GT-I5800 using CM 6.2 Cyanbread themed
Looks cool
Maybe you can add an option to switch between amend (all cwm versions before 3.x - what we currently use ) and edify (3.x + - like in cm7 and apollo's dual/tri boot kernel)
Then it'ld be universal
Thank you.
cdesai said:
Looks cool
Maybe you can add an option to switch between amend (all cwm versions before 3.x - what we currently use ) and edify (3.x + - like in cm7 and apollo's dual/tri boot kernel)
Then it'ld be universal
Click to expand...
Click to collapse
Yeah, it's already done
Waiting for a permission for use update-binary.
I haven't made phone databes for mounting points, I think that everyone who will be using edify scripts will change it manually in script-editor.
benzyniarz1 said:
Yeah, it's already done
Waiting for a permission for use update-binary.
I haven't made phone databes for mounting points, I think that everyone who will be using edify scripts will change it manually in script-editor.
Click to expand...
Click to collapse
I replied to your email... (same link as the email contained)
Also if you'd like to utilize the database xml from my amend2edify project, feel free to (someone is already using it in a market app).
Your tool looks nice and simple, I've considered doing something similar in the past, never got around to doing it, and now looks like I don't have to. Good work.
Also, maybe this could be moved to a more general section, as it's not restricted to Galaxy 3 devices. (Suggestion, you could add in zip signing to better support more devices.)
=]
nubecoder said:
I replied to your email... (same link as the email contained)
Also if you'd like to utilize the database xml from my amend2edify project, feel free to (someone is already using it in a market app).
Your tool looks nice and simple, I've considered doing something similar in the past, never got around to doing it, and now looks like I don't have to. Good work.
Also, maybe this could be moved to a more general section, as it's not restricted to Galaxy 3 devices. (Suggestion, you could add in zip signing to better support more devices.)
=]
Click to expand...
Click to collapse
Thanks a lot!
Zip signing is available and it's executed automatically (unless JRE is not available)
I'll post the thread in General Android Development and try to impelement your PhoneDatabase
So, app updated. Changes:
-adding update-binary to edify scripts (possibility of choosing own update-binary)
-added default scripts for edify scripts
-settings not stored in my documents
Thanks so much
Ability to sign already made update.zips(with some other tool or manually) would be nice!
EDIT:
Just tried it with folders and it wont work
aka
i can manually add all files and add path(bt tat'ld be a pain)
So how about selecting whole folders?
Drag and drop would be a nice option!
Version 1.0.0.2, changelog:
-Adding folders
-Drag&Drop
-Signing single zip archive
benzyniarz1 said:
Version 1.0.0.2, changelog:
-Adding folders
-Drag&Drop
-Signing single zip archive
Click to expand...
Click to collapse
Very nice (and fast) improvements.
I'll be sure to test this on Ubuntu under Mono sometime and lat ya know how it goes.
=]
Nice app ......nice share
nubecoder said:
Very nice (and fast) improvements.
I'll be sure to test this on Ubuntu under Mono sometime and lat ya know how it goes.
=]
Click to expand...
Click to collapse
It'd be nice, but I think that there are some changes in code neccessary.. the main: replacing executting "cmd.exe" to "adb", in ProccesStartInfo variables, so also parameteres are need to be changed (it's necessay to remove "adb" from parameters). I will probably install Linux in a few weeks on the virtual machine, so I'll have the environment to testing the code.
In the meantime, new version - fixed the wrong name of update-script for edify (changed to "updater-script" for edify, and left "update-script" for amend)
benzyniarz1 said:
In the meantime, new version - fixed the wrong name of update-script for edify (changed to "updater-script" for edify, and left "update-script" for amend)
Click to expand...
Click to collapse
aah, good update
benzyniarz1 said:
It'd be nice, but I think that there are some changes in code neccessary.. the main: replacing executting "cmd.exe" to "adb", in ProccesStartInfo variables, so also parameteres are need to be changed (it's necessay to remove "adb" from parameters). I will probably install Linux in a few weeks on the virtual machine, so I'll have the environment to testing the code.
Click to expand...
Click to collapse
What are you using adb for this app? It's just flash-able zip creation correct?
I can't think of a reason you would need to use adb for this (or how adb would be useful for this other than pushing to the phone's SD card).
Just curious, I haven't bothered to look at the sources.
=]
nubecoder said:
What are you using adb for this app? It's just flash-able zip creation correct?
I can't think of a reason you would need to use adb for this (or how adb would be useful for this other than pushing to the phone's SD card).
Just curious, I haven't bothered to look at the sources.
=]
Click to expand...
Click to collapse
ADB is used only for pushing created file to SD card, nothing more.
thanx a lot..... it helped me very much and saved me from full rom flash.....
Updated to new version. Changelong in the 1st post. Enjoy
awesome!thnx a lot!!! its really easy
edit:not tha easy as i thought can someone tell me the script i need to use to copy and maybe replace system apps?
edit1:figured it out

Files to Make the DI4GLTE compatible with the kitchen

Here is the compatibility file to add in to the kitchen. Here is also the new updated SU files to give root to the ROM. Here is also a plugin to add "Ad Free Hosts"
Unpack the folders withing the "Kitchen" folder to your root folder. Allow it to overwrite the files. It will add the stuff I specified.
Hopefully it all works and you guys can get started!
Credits to:
dsixda for making the kitchen
Chainfire - for his SuperSU files

[ODEX][SCRIPT/TOOL][SHARE] Odexer Tool 1.1.1 (8/12/13)

Note: I'm just sharing the work of the XDA Member MatrixDJ96.
MatrixDJ96 said:
Would you like to speed up your rom, more stability, more battery life, no lag to open system app and better ram utilization? Now you can! (Only For Rooted Phone And Deodexed Rom)
This is possible with my Odexer Tool created myself.
I worked a lot of time to create this script.
What is ODEX and DEODEX?
In Android file system, applications come in packages with the extension .apk. These application packages, or APKs contain certain .odex files whose supposed function is to save space. These odex files are actually collections of parts of an application that are optimized before booting. Doing so speeds up the boot process, as it preloads part of an application. On the other hand, it also makes hacking those applicationsdifficult because a part of the coding has already been extracted to another location before execution.
THEN COMES DEODEX
Deodexing is basically repackaging of these APKs in a certain way, such that they are reassembled into classes.dex files. By doing that, all pieces of an application package are put together back in one place, thus eliminating theworry of a modified APK conflicting with some separate odexed parts.
In summary, Deodexed ROMs (or APKs) have all their application packages put back together in one place, allowing for easy modification such as theming. Since no pieces of code are coming from any external location, custom ROMs or APKs are always deodexed to ensure integrity.
Another explanation is this:
If you odex the rom, you'll have also more space in data (this is important because if you don't have partition ext4 in sdcard, you won't have too free space), increase battery life, more stability and increase perfomance( the Rom is more faster to load system and app) but you can't modifie apk after odex (you can't mod program with classes.dex).
Infact ODEX is an OPTIMIZED-DEX and Android load system and app faster than deodexed (DEOPTIMIZED-DEX) app and system.
When you have a deodex file (a lot of roms are deodexed) you have File.apk in system/app and in data/dalvik-cache/[email protected]@[email protected], but with odex file you have File.apk in system/app and File.odex in system/app
With these explanation you can understand that:
Odexed Rom = +fast -difficult_customization +more_battery_life +better_stability +less_ram_utilization
Deodexed Rom = -slow +customization -less_battery_life -less_stability -worse_ram_manager
If you run my script with remove classes.dex and zipalign disabled your rom will be odexed without "-difficult_customization"
My script does (it depends by option):
- odex framework
- odex app in system/app
- odex app in system/priv-app (if you have android kitkat)
- remove classes.dex and zipalign from jar/apk (if you enable this option)
All commands of my script:
+ frame [odex all framework]
+ sysapp [odex all system apps]
+ all [odex framework and system apps]
+ set [change settings of the script];
> 1 [enable/disable remove classes.dex and zipalign]
> 2 [back]
+ exit [exit from the script]
WORKING IN ALL ROM (Froyo, GingerBread, IceCreamSandwich, JellBean And KitKat)
AOSP - AOKP - CM - MIUI - PA - PAC - BASE STOCK - ALL!
Credits:
- @MatrixDJ96 (Me)
- MrTony68 (Beta Tester)
- @Thyrus (Beta Tester)
- @angel.sea (For Support)
To Devs
If you want to use this script to odex your ROM, please give me credit in your ROM thread.
Thanks for the cooperation
For More Info Contact Me By Email: [email protected]
ENJOY WITH MORE STABILITY, SPEED AND BATTERY LIFE!!!
Please, give me a thanks if you like my script
By MatrixDJ96
Click to expand...
Click to collapse
MatrixDJ96 said:
IMPORTANT TO ODEX YOUR ROM:
To Odex Framework (Command 'dexo -fr') You Must Have At Least 16% Of Free Space In System.
To Odex System Apps (Command 'dexo -sys') You Must Have At Least 26% Of Free Space In System.
How to odex:
- download file
- go to recovery
- install zip
- reboot
- open terminal emulator (will be installed automaticaly)
- setting terminal type "Linux"
- type su to obtain root permission
- type odex and enjoy!
IF YOU HAVE ENABLED "REMOVE CLASSES.DEX & ZIPALIGN", A FLASHABLE ZIP BY RECOVERY WILL BE CREATED WITH OPTIMIZED SYSTEM SO REBUILD IN RECOVERY AND FLASH THIS FILE (You find it in sdcard and it's called "Optimized-System_NAMEOFYOURDEVICE.zip")
I hope that all are clear
+++++++++++++++++++++++++++++++++
Download link:
Odexer Tool
+++++++++++++++++++++++++++++++++
Click to expand...
Click to collapse
Nice thread bro:thumbdown::thumbdown::thumbdown::thumbdown::thumbup::thumbup::thumbup:
This is awesome tool.
But, i cant install ver beta 5.5 via cwm. Error: install abort...:banghead:
Send from USS Enterprise CVN-65 using Tomahawk
tuan.cse06 said:
This is awesome tool.
But, i cant install ver beta 5.5 via cwm. Error: install abort...:banghead:
Send from USS Enterprise CVN-65 using Tomahawk
Click to expand...
Click to collapse
Change the updater-script with any of the other CWM flashable zip.
aniket.lamba said:
Note: I'm just sharing the work of the XDA Member MatrixDJ96.
Click to expand...
Click to collapse
UPDATE
MatrixDJ96 said:
UPDATE
Click to expand...
Click to collapse
Will update it in evening
MatrixDJ96 said:
UPDATE
Click to expand...
Click to collapse
Does not work
Sent from my Galaxy Nexus
nice one bro

[HELP][DEVs] Adding flashable zip contents to the aosp build

I want to add flashable zip contents to my aosp build. It contains some folders (check below image) with framework and build.prop addons. I don't know where to place these files. Although I've placed priv-app folder contents to packages/apps/here with each .mk file in it. Can any Developer help!
http://i63.tinypic.com/b6syyr.png
You place the folders normally like you place it in an existing rom using root explorer.
Basics:
What your updater script does is move the complete system folder to system partition
There is nothing such in the script which copies files individually from a given folder to destination
So if you want to copy something inside priv-app , place desired apk's in priv-app
If you want to do some symlinking or change permission , head to updater-script and edit it using Notepad++ only..
Good Luck Dev ,
Cheers

Categories

Resources