I using odex rom, and i can't find the xml file which is required in my app (uses permission) Do i need a deodex rom to do it?
Sent from my K00C using XDA Free mobile app
Sent from my K00C using XDA Free mobile app
I’ve been researching this and trying to learn how to port an app. Little by little it is making more sense. However, before I get too far into it I am wondering if the app I want to port is even possible. I have a Samsung Galaxy Light (T399) and I really like the messaging app. It allows the font to be adjusted bigger or smaller with the volume keys. The phone utilizes the TouchWIz interface so before I put too much effort into this does anyone with experience porting apps have any other tips or advice? My newer phone is a LG F6. Your feedback is appreciated.
Thanks,
Porting different variants such as TouchWiz to LG..to Sense..doesn't really work out well.. I'm not saying it is impossible but A LOT of the apps, especially system apps like SecMms..are tied into the framework.. so essentially you would have to port bits of touchwiz framework..
You can port this app nokia XL's not, it's 2 of this file Gallery2.apk, Gallery2.odex , thaks !!!
Hi girls and boys :laugh:
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://xdaforums.com/showthread.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://xdaforums.com/showthread.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: '[COLOR="Red"]16[/COLOR]' targetSdkVersion: '17'
Change to this number
Code:minSdkVersion: '[COLOR="Red"]14[/COLOR]' 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
A bunch load of changes has to be done
- 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/
<uses-library android:name="com.sony.device" android:required="true" />
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<uses-library android:name="com.sony.device" android:required="false" />
minSdkVersion: '[COLOR="Red"]16[/COLOR]'
targetSdkVersion: '17'
minSdkVersion: '[COLOR="Red"]14[/COLOR]'
targetSdkVersion: '17'
1. Missing library framework
2. Missing *.so files
3. Java Method or function that do not match with your current ROM
You should look at AndroidManifest.xml what app needed framework files, see screenshots!
take the file name like on AndroidManifest.xml in system/framework and take xml permissions files from system/etc/permissions
This is really confused how to find what app is need *.so files
The solution is install the app and take a logcat!
The log will say something like this :
example (can't find class libUXVisualizer blablabla)
then you just search on system/lib for libUXVisualizer.so from the ROM you want to port and take it!
There is many factors that make app force close, but in SONY Apps usually only error "GetString". if you are trying to port SONY Apps to your current ROM (E.g. CM Based ROM) you will face same issue like this.
What should i do now after i see this log?
Ok let's start!!!
1. Decompile apps with using file framework-res.apk from that ROM apps (Also maybe need framework 2 like SemcGenericUxpRes.apk etc)
2. Go to folder smali/com/sonyericsson/metadatacleanup/util/
3. Open StorageManagerIf.smali using text editor
- Find .line 262 and see like this!
4. Decompile your framework-res.apk
- Go to folder res/value/
- Open Public.xml using text editor
- Following StorageManagerIf.smali in .line 262 there is code look like this
RIGHT?Code:const-string v2, "[COLOR="Red"]storage_internal[/COLOR]"
- SO Search storage_internal in Public.xml in your framework-res.apk
copy the code and change the code look like this!
Shrink code toCode:const-string v2, "[COLOR="Red"]storage_internal[/COLOR]" invoke-direct {p0, v1, v2}, Lcom/sonyericsson/metadatacleanup/util/StorageManagerIf;->getString(Landroid/content/res/Resources;Ljava/lang/String;)Ljava/lang/String; move-result-object v2 invoke-virtual {v2, v0}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z move-result v2 if-eqz v2, :cond_0
So it will look like thisCode:const v2, [COLOR="Red"]0x10405ad[/COLOR]
Code:.line 262 .local v0, "description":Ljava/lang/String; const v2, 0x10405ad if-eqz v2, :cond_0
Thanks for it...... :good::good::good::good:
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:silly:
you are realy great RC-RD here