FORUMS
Remove All Ads from XDA
H10 Turbo
Thread Deleted Email Thread
Prev Previous Post   Next Post Next

INTRODUCING

Hello XDA Community
I just want to share TIPS how to port OEM/VENDOR Apps to your current ROM

Requirement :

1. Knowledge in decompile/recompile/sign/zipalign apk file (apps)
- If you don't know how to do this, visit this thread http://forum.xda-developers.com/show....php?t=2195680

2. Knowledge to find library file (*.so file) and framework file (*.jar) whats needed from apps
3. You should understand MANAGING APPLICTAIONS it help on making update into system like porting APPS
- if you don't know how to do this, visit this post http://forum.xda-developers.com/show...42&postcount=2
4. Knowledge to use LogCat
- if you don't know how to do this, visit this thread http://forum.xda-developers.com/show....php?t=2274119

What should i do now? :

1. First times you need download Full ROM is there already deodexed so you can take some file you need to ported or you make it by yourself
2. If you already understand what i said above, lets start to final section
3. If you already take all file what you need to port, collect all the files, and prepare update.zip updater, add the file to zip with right folder

*.Apk file must be in system>app or priv-app
*.So file must be in system>lib
*.jar file must be in system>framework
*.xml file permissions framework must be in system>etc>permissions

How can I know what's library is needed? :

1. Knowledge is in need if the library doesn't exist in apk file, locate the name of the library file (*.so file) that may be related to the application (the file name may be a bit the same with the application) you can search in system>lib or use using a logcat after installing apps, you will see a missing library like :
FATAL error can't find class blablabla something like that

2. If library file already exist in apk file /folder lib>armeabi (You just need to extract it from apk file and take the file *.so)


(Taking *.so files)
Example for all applications

NOTE For Lollipop : Google has change structure of an applications in system that every applications having lib folder itself, it make more easy to locate lib files

Quote:

- Open SemcAlbum.apk using winrar/rar and extract folder lib then remove folder lib from that app


- Rename com.sonyericsson.album.apk to SemcAlbum.apk
- Create folder with same name with apk name (SemcAlbum)
- Under that folder create folder lib
- Under lib folder create folder arm
- navigate to the extracted lib before, move *.so files from armeabi-v7a if exist or armeabi into SemcAlbum/lib/arm/

3. To see what's apps required library framework file :
- Decompile apps with using file framework-res.apk from that ROM apps (Also maybe need framework 2 like SemcGenericUxpRes.apk etc)
- Open AndroidManifest.xml using Text Editor (Like NotePad++) and see like this line

Quote:

<uses-library android:name="com.sony.device" android:required="true" />

Quote:

<uses-library android:name="com.sony.device" android:required="false" />

Leave file has been decompiled and Take it file name (In list AndroidManifest) from the ROM file that you want to ported from system>framework also take permission framework file (*.xml) from system>etc>permissions

Example :
com.sonyericsson.navigationbar < it mean jar file, so you should take the file from system/framework

framework files need xml file permissions
com.sonyericsson.navigationbar.xml file, so you should take the file from system/etc/permissions


Explaination :
What The different true & false?
true : the application is required that framework to work
false : the application is still required that framework but without that framework the application can still work but some feature that need framework files will not work.

This section is not modified the apps, first you can try flash it with Recovery and see its working or not, if not working (FC) you need to see whats wrong in logcat (FATAL ERROR)

Or the problem apps parsing error because your Android Version is lower (e.g apps JB to ICS)

Now you need to decompile that apps

Go to smali folder and search whats wrong in logcat, if you already fix it (I will explain how to fix it in next post)

Then open AndroidManifest.xml try to change minimal sdk version from Android_manifest or in apktool.yml
Code:
minSdkVersion: '16'
targetSdkVersion: '17'
Change to this number
Code:
minSdkVersion: '14'
targetSdkVersion: '17'
save all changes
then recompile, sign and zipalign

NOTE :
1. Not any apps can be ported to lower Android Version by change minimal sdk
The Following 142 Users Say Thank You to Rizal Lovins For This Useful Post: [ View ]
Subscribe to Thread

Guest Quick Reply (no urls or BBcode)
Message:
Previous Thread Next Thread
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes