makefile changes for custom apps - Android

Hi
I want to have some prebuilt apk installed on the rom, so that when user installs the Rom the apks are automatically installed.
I do not want these apps to be system apps. i.e in /system/apps folder.
These apps needs to be uninstallable by normal user.
Can some please guide me though the method for doing so.
I am not able to figure out where to put this apk and changes to make files.
Thanks in advance
-Ak

Make them flash a data zip if you want I will make you one
Phone:HTC Evo 3D CMDA
HTC Sense:3.6
Software number:Trib's OTA 2 Root v1.5
Kernel version:[he who should not be named]Kernel
Baseband version:1.06.00.1216
Build number:1.13.662.2_RC
HBOOT:1.50 S-off (juopunutbear)
Recovery:4EXT Recovery Touch v1.0.0.5

Can't AOSP ROM's use the data/app folder like Sense ROM's? Or is that a feature of Sense?
Edit: Using ES File exporer on CM9, I enabled root explorer and found the data/app folder. All user apps are installed in there, so in theory you could just make a data/app folder in your ROM to place the user un-installable apps. Might be best to wait for confirmation from someone more experienced than myself though.
Here's where you would need to add the data/app folder if I'm correct about it's location and that it's the folder than installs user apps. You open your ROM.zip and see the following folders (Well this is how ROM's look for my Incredible S) -
/META-INF
/system
boot.img
In theory, all you need to do is add the following -
/META-INF
/system
/data/app
boot.img
Someone please confirm if my information is correct, and I will edit my post accordingly.

ZaySk said:
Can't AOSP ROM's use the data/app folder like Sense ROM's? Or is that a feature of Sense?
Edit: Using ES File exporer on CM9, I enabled root explorer and found the data/app folder. All user apps are installed in there, so in theory you could just make a data/app folder in your ROM to place the user un-installable apps. Might be best to wait for confirmation from someone more experienced than myself though.
Here's where you would need to add the data/app folder if I'm correct about it's location and that it's the folder than installs user apps. You open your ROM.zip and see the following folders (Well this is how ROM's look for my Incredible S) -
/META-INF
/system
boot.img
In theory, all you need to do is add the following -
/META-INF
/system
/data/app
boot.img
Someone please confirm if my information is correct, and I will edit my post accordingly.
Click to expand...
Click to collapse
It looks right but make one with the /data/app and copy the original folder to safe location so you will have one to test and your original one you backed up
Phone:HTC Evo 3D CMDA
HTC Sense:3.6
Software number:Trib's OTA 2 Root v1.5
Kernel version:[he who should not be named]Kernel
Baseband version:1.06.00.1216
Build number:1.13.662.2_RC
HBOOT:1.50 S-off (juopunutbear)
Recovery:4EXT Recovery Touch v1.0.0.5

use titanium backup to delete/move the system apps to user apps it will help u a lot.....

First you will need to update a few files:
edify_generator.py
add something like this:
Code:
def RunDataApps(self, command):
self.script.append('package_extract_dir("data-app", "/data/app");')
self.script.append('set_perm_recursive(0, 0, 0771, 0644 "/data/app");')
ota_from_target_files
add something like this under "script.Mount("/system")":
Code:
script.Mount("/data")
add something like this under "script.UnpackPackageDir("system", "/system")":
Code:
script.RunDataApps()
You will still need to write a method so that the OTA package includes a /data-app folder, need to create a makefile to product copy those files as well. Let me know if you need more guidance.

Related

[Q]How to remove&add apps before build from CM source

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?

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

[Mini-Howto] Layers Management via Init.d script

Like many of you, I like to keep my Android system rootless and true to stock as much as possible. However, I like to be able to enjoy the native support of layers for better look n feel. I wrote the script attached to help me with it however, it doesn't come easy without root access. There are some work cut out for you, read below.
Prerequisites:
Have extracted theme from layers theme app from Play Store. No, I'm not talking about the main theme app which is used by Layers Manager. Rather, it's the apks that go into the /vendor/overlay. I tried to extract respective apks out of the main one without using Layers Manager. However, my attempts yielded no success as I'm getting FCs all over, so I must be missing something. I current have a Nexus 9 which is rooted with Layers Manager, I use N9 for testing out and bring the /vendor/overlay/*.apk onto my N6P under /sdcard for my script to process. If you know of a better way, by all means share.
Of course, kernel which support INIT.D.
TWRP installed for root access via recovery, a MUST.
Busybox installed via flashable zip
Install:
- Download the script attached
- Rename .txt to .sh
- Have all extracted themed apks in one directory. For instance, I like fa and art layers, so my directory on sdcard as such /sdcard/0flash/layers/fa/fa_*.apk
- Change up the first few lines to match your environment
- Boot into twrp, mount /system if needed
- Drop the script into /system/etc/init.d
- chmod 755 /system/etc/init.d/01layersmanager.sh
- Create a file named ".current_theme" in /sdcard/
- In the above file (.current_theme), put the name of theme you want init.d to install. Example, if I want to install "fa" then I'll just have a line of text fa in it (same goes to art, coalesce,etc). IMPORTANT: no trailing new line.
- Reboot and test it out
- If theme successfully installed, you'll see it.
- Also, the /sdcard/.current_theme file will be updated with "current" to avoid theme installation on next reboot if you don't want to install new themes.
Troubleshoot:
See /sdcard/debug.txt for info. If you want additional information dumped, edit the init.d script to echo out more.
O bio hnki
vboyz103 said:
Like many of you, I like to keep my Android system rootless and true to stock as much as possible. However, I like to be able to enjoy the native support of layers for better look n feel. I wrote the script attached to help me with it however, it doesn't come easy without root access. There are some work cut out for you, read below.
Prerequisites:
Have extracted theme from layers theme app from Play Store. No, I'm not talking about the main theme app which is used by Layers Manager. Rather, it's the apks that go into the /vendor/overlay. I tried to extract respective apks out of the main one without using Layers Manager. However, my attempts yielded no success as I'm getting FCs all over, so I must be missing something. I current have a Nexus 9 which is rooted with Layers Manager, I use N9 for testing out and bring the /vendor/overlay/*.apk onto my N6P under /sdcard for my script to process. If you know of a better way, by all means share.
Of course, kernel which support INIT.D.
TWRP installed for root access via recovery, a MUST.
Busybox installed via flashable zip
Install:
- Download the script attached
- Rename .txt to .sh
- Have all extracted themed apks in one directory. For instance, I like fa and art layers, so my directory on sdcard as such /sdcard/0flash/layers/fa/fa_*.apk
- Change up the first few lines to match your environment
- Boot into twrp, mount /system if needed
- Drop the script into /system/etc/init.d
- chmod 755 /system/etc/init.d/01layersmanager.sh
- Create a file named ".current_theme" in /sdcard/
- In the above file (.current_theme), put the name of theme you want init.d to install. Example, if I want to install "fa" then I'll just have a line of text fa in it (same goes to art, coalesce,etc). IMPORTANT: no trailing new line.
- Reboot and test it out
- If theme successfully installed, you'll see it.
- Also, the /sdcard/.current_theme file will be updated with "current" to avoid theme installation on next reboot if you don't want to install new themes.
Troubleshoot:
See /sdcard/debug.txt for info. If you want additional information dumped, edit the init.d script to echo out more.
Click to expand...
Click to collapse
Yt? Bird :
Sent from my Nexus 6P using XDA-Developers mobile app

[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