Attend XDA's Second Annual Developer Conference, XDA:DevCon 2014!
5,805,829 Members 42,616 Now Online
XDA Developers Android and Mobile Development Forum

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

Tip us?
 
Rizal Lovins
Old
(Last edited by Rizal Lovins; 16th July 2014 at 12:32 AM.)
#1  
Rizal Lovins's Avatar
Recognized Developer / Recognized Themer / Recognized Contributor - OP
Thanks Meter 14,792
Posts: 1,453
Join Date: May 2012
Location: Bandung - One ring to rule them all, one ring to find them, one ring to bring them all
Default [GUIDE/TIPS] How to Port OEM Apps / Vendor Apps to Your Current ROM

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


Closer to me? everything about me and my work!!!
DON'T PM me for any question regarding my work, please post in specific thread, anyone can help you, I WON'T respond
Lead Developer of LOVINS DEV : The 2 Brothers - Rizal Lovins & ibanez7
The Following 93 Users Say Thank You to Rizal Lovins For This Useful Post: [ Click to Expand ]
 
Rizal Lovins
Old
(Last edited by Rizal Lovins; 11th January 2014 at 01:31 AM.)
#2  
Rizal Lovins's Avatar
Recognized Developer / Recognized Themer / Recognized Contributor - OP
Thanks Meter 14,792
Posts: 1,453
Join Date: May 2012
Location: Bandung - One ring to rule them all, one ring to find them, one ring to bring them all
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!!!


Closer to me? everything about me and my work!!!
DON'T PM me for any question regarding my work, please post in specific thread, anyone can help you, I WON'T respond
Lead Developer of LOVINS DEV : The 2 Brothers - Rizal Lovins & ibanez7
The Following 20 Users Say Thank You to Rizal Lovins For This Useful Post: [ Click to Expand ]
 
Rizal Lovins
Old
(Last edited by Rizal Lovins; 16th July 2014 at 12:33 AM.)
#3  
Rizal Lovins's Avatar
Recognized Developer / Recognized Themer / Recognized Contributor - OP
Thanks Meter 14,792
Posts: 1,453
Join Date: May 2012
Location: Bandung - One ring to rule them all, one ring to find them, one ring to bring them all
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


Closer to me? everything about me and my work!!!
DON'T PM me for any question regarding my work, please post in specific thread, anyone can help you, I WON'T respond
Lead Developer of LOVINS DEV : The 2 Brothers - Rizal Lovins & ibanez7
The Following 22 Users Say Thank You to Rizal Lovins For This Useful Post: [ Click to Expand ]
 
vanitea
Old
#4  
vanitea's Avatar
Senior Member
Thanks Meter 59
Posts: 214
Join Date: Jan 2012
Location: bandung
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: [ Click to Expand ]
 
Rizal Lovins
Old
#5  
Rizal Lovins's Avatar
Recognized Developer / Recognized Themer / Recognized Contributor - OP
Thanks Meter 14,792
Posts: 1,453
Join Date: May 2012
Location: Bandung - One ring to rule them all, one ring to find them, one ring to bring them all
Quote:
Originally Posted by vanitea View Post
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


Closer to me? everything about me and my work!!!
DON'T PM me for any question regarding my work, please post in specific thread, anyone can help you, I WON'T respond
Lead Developer of LOVINS DEV : The 2 Brothers - Rizal Lovins & ibanez7
The Following 4 Users Say Thank You to Rizal Lovins For This Useful Post: [ Click to Expand ]
 
vanitea
Old
#6  
vanitea's Avatar
Senior Member
Thanks Meter 59
Posts: 214
Join Date: Jan 2012
Location: bandung
Talking nice update

Quote:
Originally Posted by Rizal Lovins View Post
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
 
TitaniumZERO
Old
#7  
TitaniumZERO's Avatar
Senior Member
Thanks Meter 90
Posts: 215
Join Date: Jan 2013
Location: Johor Bahru
Quote:
Originally Posted by Rizal Lovins View Post
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?
MY DEVICE
Sony Xperia™ S LT26i
Android 4.1.2
Build 6.2.B.1.96 | rooted | deodexed


 
Rizal Lovins
Old
#8  
Rizal Lovins's Avatar
Recognized Developer / Recognized Themer / Recognized Contributor - OP
Thanks Meter 14,792
Posts: 1,453
Join Date: May 2012
Location: Bandung - One ring to rule them all, one ring to find them, one ring to bring them all
Quote:
Originally Posted by TitaniumZERO View Post
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


Closer to me? everything about me and my work!!!
DON'T PM me for any question regarding my work, please post in specific thread, anyone can help you, I WON'T respond
Lead Developer of LOVINS DEV : The 2 Brothers - Rizal Lovins & ibanez7
The Following User Says Thank You to Rizal Lovins For This Useful Post: [ Click to Expand ]
 
Cehesto
Old
#9  
Junior Member
Thanks Meter 0
Posts: 1
Join Date: Jan 2013
Thanks!
 
hard91
Old
#10  
Senior Member
Thanks Meter 87
Posts: 238
Join Date: Nov 2012
Location: PATIALA
Any tutorial for round switches in settings like homani framework
And xperia u phone book port to tipo ????
HIT THANKS IF YOU LIKE MY WORK & I HELPED YOU.......

I HAVE SONY XPERIA TIPO DUAL
BUILD : 11.0.A.6.8(INDIA)
MY WORK
XPERIA Z PHONE APK FOR TIPO AND J
TUTORIAL TO PORT XPERIA Z PHONE.APK
MY WORK FOR TIPO DUAL

1.XPERIA Z PHONE APK
2.REBOOT OPTION AND NXT FRAMEWORK(beta)

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes