Welcome to XDA

Search to go directly to your device's forum

Register an account

Unlock full posting privileges

Ask a question

No registration required
Post Reply

[GUIDE/TIPS] How to Port OEM Apps / Vendor Apps to Your Current ROM

OP Rizal Lovins

9th October 2013, 04:23 AM   |  #1  
Rizal Lovins's Avatar
OP Recognized Developer / Recognized Themer / Recognized Contributor
Flag Bandung - The Girl Next Door
Thanks Meter: 14,990
 
1,469 posts
Join Date:Joined: May 2012
More
ABOUT ME

WHO IS MASTER RIZAL LOVINS ???

JUST FOLLOW ME OR ADD ME AS YOUR FRIEND ON SOCIAL NETWORKS



Hi girls and boys

I just wanted to share a little tips/guide/info to port apps from the platform, this is doesn't mean all the applications of the platform can be ported!!!

This is just example

Ok Let's start!!!


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. 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

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 NDK tool for Linux users

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)



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 or twframework-res.apk etc)



- Open AndroidManifest.xml using Text Editor (Like NotePad++) and see like this line



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>permission


What should i do know? :

1. First times you need download Full ROM is there already deodexed so you can take some file you need to ported
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 cwm zip updater, add the file to zip with right folder

*.Apk file must be in system>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



This section is not modified the apps, first you can try flash it with CWM 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

Then open AndroidManifest.xml try to change minimal sdk version from Android_manifest and 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 changed minimal sdk
Last edited by Rizal Lovins; 16th July 2014 at 01:32 AM.
The Following 95 Users Say Thank You to Rizal Lovins For This Useful Post: [ View ]
9th October 2013, 04:24 AM   |  #2  
Rizal Lovins's Avatar
OP Recognized Developer / Recognized Themer / Recognized Contributor
Flag Bandung - The Girl Next Door
Thanks Meter: 14,990
 
1,469 posts
Join Date:Joined: May 2012
More
GUIDE HOW TO PORT SOCIALIFE TO WORK ON ALL DEVICES

Here is guide for you to port Socialife, this guide is for new Socialife, this guide just little different with old Socialife

Step 1 :

- Decompile Socialife using apktool with framework from Xperia 2013 Devices
- Open Android_manifest using notepad++ then remove this line and save
Code:
<uses-library android:name="com.sony.device" android:required="true" />
Step 2 :

- Go to folder smali\com\sony\nfx\app\sfrc\scp
- Open c.smali using notepad++ then find this line

Code:
sget-object v3, Landroid/os/Build;->MODEL:Ljava/lang/String;
Replace with this line and save

Code:
const-string v3, "C6603"
Step 3 :

New Socialife doesn't support ICS ROM so you need to change sdk version from Android_manifest or apktool.yml

Code:
minSdkVersion: '16'
targetSdkVersion: '17'
Change to this number

Code:
minSdkVersion: '14'
targetSdkVersion: '17'
Save all change, then recompile
Don't forget to sign and zipalign again

That's it, Enjoy!!!
Last edited by Rizal Lovins; 11th January 2014 at 02:31 AM.
The Following 20 Users Say Thank You to Rizal Lovins For This Useful Post: [ View ]
9th October 2013, 04:25 AM   |  #3  
Rizal Lovins's Avatar
OP Recognized Developer / Recognized Themer / Recognized Contributor
Flag Bandung - The Girl Next Door
Thanks Meter: 14,990
 
1,469 posts
Join Date:Joined: May 2012
More
How to Fix FC (Example)

First you need to see the logs if logs is FATAL Error e.g :

Code:
error getstring com.sonyericsson.semmetadatcleanup java 407 in com/sonyericsson/mediaextra/mediaifstorage.java
decompile that app FC, and see the log and go to

Code:
smali/sonyericsson/mediaextra/mediaifstorage.smali and see line 407
if the line like this

Code:
>getString(Landroid/content/res/Resources;Ljava/lang/String;)Ljava/lang/String;
Remove it, it's just checked string

Than see other code in line 407 something like called

Code:
const-string v2, "NAME_STRING"
Replace it with this id's public, example

Code:
const v2, 0x07XXXXX
save all changes, and recompile!!!

If the error is more than one just use this trick for only error getString

Thanks to Lasan for the trick
Last edited by Rizal Lovins; 16th July 2014 at 01:33 AM.
The Following 22 Users Say Thank You to Rizal Lovins For This Useful Post: [ View ]
9th October 2013, 05:37 AM   |  #4  
vanitea's Avatar
Senior Member
Flag bandung
Thanks Meter: 59
 
214 posts
Join Date:Joined: Jan 2012
More
Thumbs up nice thread
Thanks for it......
but still waiting for more detil tuttor, give some example to port apk from sony to all android device
because i wana be RC-RD like you

you are realy great RC-RD here
The Following User Says Thank You to vanitea For This Useful Post: [ View ]
12th October 2013, 11:28 AM   |  #5  
Rizal Lovins's Avatar
OP Recognized Developer / Recognized Themer / Recognized Contributor
Flag Bandung - The Girl Next Door
Thanks Meter: 14,990
 
1,469 posts
Join Date:Joined: May 2012
More
Quote:
Originally Posted by vanitea

Thanks for it......
but still waiting for more detil tuttor, give some example to port apk from sony to all android device
because i wana be RC-RD like you

you are realy great RC-RD here

you are welcome my friend

Yeah i will post with all detail later, now just uploaded some screenshots

No!!! i'm not developer
The Following 4 Users Say Thank You to Rizal Lovins For This Useful Post: [ View ]
15th October 2013, 05:28 PM   |  #6  
vanitea's Avatar
Senior Member
Flag bandung
Thanks Meter: 59
 
214 posts
Join Date:Joined: Jan 2012
More
Talking nice update
Quote:
Originally Posted by Rizal Lovins

you are welcome my friend

Yeah i will post with all detail later, now just uploaded some screenshots

No!!! i'm not developer


yeah more understod with screenshot, thanks my bro

and i'm sorry about RD-RC........
i should write RT-RC
21st October 2013, 07:36 AM   |  #7  
TitaniumZERO's Avatar
Senior Member
Flag Johor Bahru
Thanks Meter: 90
 
215 posts
Join Date:Joined: Jan 2013
More
Quote:
Originally Posted by Rizal Lovins

1. You must be right with signing the apps, because some apps from platform can't be sign with TESKEYS, you will get FC if you wrong signing mode

There is some signing key ;
- Auto testkey
- Platform
- Media
- Testkeys
- etc i forgot

Choose right signing with apps you want to ported

Sorry to ask, how do I determine the signing key?
22nd October 2013, 01:26 AM   |  #8  
Rizal Lovins's Avatar
OP Recognized Developer / Recognized Themer / Recognized Contributor
Flag Bandung - The Girl Next Door
Thanks Meter: 14,990
 
1,469 posts
Join Date:Joined: May 2012
More
Quote:
Originally Posted by TitaniumZERO

Sorry to ask, how do I determine the signing key?

just try all signed tool for PC, like signing with private key etc, search at google to xda, or you can download zip signer in google play store in your phone, it's easy to use
The Following User Says Thank You to Rizal Lovins For This Useful Post: [ View ]
22nd October 2013, 10:39 AM   |  #9  
Junior Member
Thanks Meter: 0
 
1 posts
Join Date:Joined: Jan 2013
Thanks!
25th October 2013, 06:52 PM   |  #10  
hard91's Avatar
Senior Member
Flag PATIALA
Thanks Meter: 167
 
355 posts
Join Date:Joined: Nov 2012
More
Any tutorial for round switches in settings like homani framework
And xperia u phone book port to tipo ????

Post Reply Subscribe to Thread
Previous Thread Next Thread
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes