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

Search This thread

roxion22

Senior Member
Jan 29, 2015
138
21
Possible to port miui theme app for aosp custom rom? i just need cool wallpapers from that app! themes will not work i know that. don't even need it.
 

Stefke93

Senior Member
Jun 16, 2017
147
89
Belgrade
hi friends

can you pls. try to do porting of entire Nubia Camera application to be used in any other mobile.

FYI..attached is the link to file having Nubia Camera app along with all lib files

https://drive.google.com/open?id=1ELjTFUk0oylSQIpZid6HOs6hrsJt5jBe

FYI im using Huawei Nova 3i (Kirin 710, Android 9)

pls. reply..
thanks
Sam

I found all missing libs so far, but i can't find in dump this file: data/nubiaeffect/water_mark_drawable_white.argb try to find and send me :)

E com.android.camera: [WaterMarkUtil]create water effect file fail!/data/nubiaeffect/water_mark_drawable_white.argb: open failed: ENOENT (No such file or directory)
 

meconfusedthinker

Senior Member
Apr 1, 2014
79
13
Mumbai
I found all missing libs so far, but i can't find in dump this file: data/nubiaeffect/water_mark_drawable_white.argb try to find and send me :)

E com.android.camera: [WaterMarkUtil]create water effect file fail!/data/nubiaeffect/water_mark_drawable_white.argb: open failed: ENOENT (No such file or directory)

thanks for your efforts..but sorry friend..i did not get the this file as well..can you try any other workaround file..keep me posted
 

nicolaimai

Senior Member
Feb 10, 2017
66
29
United States
Styles and Wallpapers app- Pixel Themes

can someone port this app for samsung ? i really like the design of the app , like set color on tiles etc..( i know here on this forum xda there is a port only for Wallpapers 19 with only live wallpaper. here but i really like the application like design. i guess the app we need to port is the new
Code:
Google Wallpapers 10 beta  [URL="https://www.apkmirror.com/apk/google-inc/google-wallpaper-picker/google-wallpaper-picker-10-release/"]here is the  link[/URL]
after installing this app on mobile device you can see the name is different, not only wallpaper but
Code:
Styles and Wallpapers
ok so Styles and Wallpapers app is just ,,Google Wallpapers 10,; i mean install pixel theme on samsung devices - as in the photo below
i took info from here but this is only for google pixel phone . i wish someone can port this app for samsung (s9-s9+,or note 10 or any samsung phone
pixel_themes_1.jpg
 
Last edited:
  • Like
Reactions: HumanBoy23

HumanBoy23

Senior Member
Apr 19, 2015
100
17
India
Xiaomi Redmi Note 6 Pro
Moto G9
I'm getting this error

Does it mean there is some lib file missing or something else?
---- Mar 10, 2020 8:17:24 PM ----

03-10 20:02:11.036 1357 1357 I PackageManager: Un-granting permission android.permission.DEVICE_POWER from package com.android.camera (protectionLevel=2 flags=0x30c9be45)

03-10 20:02:33.318 4778 4778 E AndroidRuntime: Process: com.android.camera, PID: 4778

03-10 20:02:33.318 4778 4778 E AndroidRuntime: at com.android.camera.CameraSettings.<clinit>(CameraSettings.java:304)

03-10 20:02:33.362 1357 3624 I ActivityManager: Process com.android.camera (pid 4778) has died: cch+5 CEM

03-10 20:02:45.569 1357 3593 I ActivityTaskManager: START u0 {act=android.intent.action.MAIN cat=[android.intent.category.LAUNCHER] flg=0x10200000 cmp=com.android.camera/.Camera bnds=[0,1266][199,1487] (has extras)} from uid 10174

03-10 20:02:45.614 1357 1404 I ActivityManager: Start proc 6380:com.android.camera/u0a85 for activity {com.android.camera/com.android.camera.Camera}

03-10 20:02:45.671 6380 6380 W System.err: at com.android.camera.CameraAppImpl.<init>(CameraAppImpl.java:26)

03-10 20:02:45.685 6380 6380 E AndroidRuntime: Process: com.android.camera, PID: 6380

03-10 20:02:45.685 6380 6380 E AndroidRuntime: java.lang.RuntimeException: Unable to instantiate activity ComponentInfo{com.android.camera/com.android.camera.Camera}: java.lang.ClassNotFoundException: Didn't find class "com.android.camera.Camera" on path: DexPathList[[zip file "/system/priv-app/MiuiCamera/MiuiCamera.apk"],nativeLibraryDirectories=[/system/priv-app/MiuiCamera/lib/arm64, /system/lib64, /vendor/lib64, /system/product/lib64, /system/lib64, /vendor/lib64, /system/product/lib64]]



03-10 20:02:45.685 6380 6380 E AndroidRuntime: Caused by: java.lang.ClassNotFoundException: com.android.camera.ActivityBase

03-10 20:02:45.689 1357 2570 W ActivityTaskManager: Force finishing activity com.android.camera/.Camera

03-10 20:02:45.699 1357 1392 I ActivityManager: Showing crash dialog for package com.android.camera u0

03-10 20:02:46.191 1357 1394 W ActivityTaskManager: Activity top resumed state loss timeout for ActivityRecord{aab5e3e u0 com.android.camera/.Camera t172 f}

03-10 20:02:46.191 1357 1394 W ActivityTaskManager: Activity pause timeout for ActivityRecord{aab5e3e u0 com.android.camera/.Camera t172 f}

03-10 20:02:47.663 1357 2570 W ActivityTaskManager: Force finishing activity com.android.camera/.Camera

03-10 20:02:47.676 1357 2570 I ActivityManager: Killing 6380:com.android.camera/u0a85 (adj 900): crash

03-10 20:02:54.822 1357 2729 I ActivityTaskManager: START u0 {act=android.intent.action.MAIN cat=[android.intent.category.LAUNCHER] flg=0x10200000 cmp=com.android.camera/.Camera bnds=[0,1266][199,1487] (has extras)} from uid 10174

03-10 20:02:54.862 1357 1404 I ActivityManager: Start proc 6893:com.android.camera/u0a85 for activity {com.android.camera/com.android.camera.Camera}

03-10 20:02:54.909 6893 6893 W System.err: at com.android.camera.CameraAppImpl.<init>(CameraAppImpl.java:26)

03-10 20:02:54.926 6893 6893 E AndroidRuntime: Process: com.android.camera, PID: 6893

03-10 20:02:54.926 6893 6893 E AndroidRuntime: java.lang.RuntimeException: Unable to instantiate activity ComponentInfo{com.android.camera/com.android.camera.Camera}: java.lang.ClassNotFoundException: Didn't find class "com.android.camera.Camera" on path: DexPathList[[zip file "/system/priv-app/MiuiCamera/MiuiCamera.apk"],nativeLibraryDirectories=[/system/priv-app/MiuiCamera/lib/arm64, /system/lib64, /vendor/lib64, /system/product/lib64, /system/lib64, /vendor/lib64, /system/product/lib64]]

03-10 20:02:54.926 6893 6893 E AndroidRuntime: Caused by: java.lang.ClassNotFoundException: Didn't find class "com.android.camera.Camera" on path: DexPathList[[zip file "/system/priv-app/MiuiCamera/MiuiCamera.apk"],nativeLibraryDirectories=[/system/priv-app/MiuiCamera/lib/arm64, /system/lib64, /vendor/lib64, /system/product/lib64, /system/lib64, /vendor/lib64, /system/product/lib64]]

03-10 20:02:54.926 6893 6893 E AndroidRuntime: Caused by: java.lang.ClassNotFoundException: com.android.camera.ActivityBase

03-10 20:02:54.929 1357 2729 W ActivityTaskManager: Force finishing activity com.android.camera/.Camera

03-10 20:02:54.937 1357 1392 I ActivityManager: Showing crash dialog for package com.android.camera u0

03-10 20:02:55.429 1357 1394 W ActivityTaskManager: Activity top resumed state loss timeout for ActivityRecord{ddafa0 u0 com.android.camera/.Camera t174 f}

03-10 20:02:55.431 1357 1394 W ActivityTaskManager: Activity pause timeout for ActivityRecord{ddafa0 u0 com.android.camera/.Camera t174 f}

03-10 20:02:55.847 1357 2729 W ActivityTaskManager: Force finishing activity com.android.camera/.Camera

03-10 20:02:55.851 1357 2729 I ActivityManager: Killing 6893:com.android.camera/u0a85 (adj 900): crash

03-10 20:04:25.345 1357 3113 I ActivityTaskManager: START u0 {act=android.intent.action.MAIN cat=[android.intent.category.LAUNCHER] flg=0x10200000 cmp=com.android.camera/.Camera bnds=[0,1266][199,1487] (has extras)} from uid 10174

03-10 20:04:25.367 1357 1395 W WindowManager: Token{4d2791d ActivityRecord{4a40df4 u0 com.android.camera/.Camera t183}} failed creating starting window

03-10 20:04:25.394 1357 1404 I ActivityManager: Start proc 7681:com.android.camera/u0a85 for activity {com.android.camera/com.android.camera.Camera}

03-10 20:04:25.441 7681 7681 W System.err: at com.android.camera.CameraAppImpl.<init>(CameraAppImpl.java:26)

03-10 20:04:25.455 7681 7681 E AndroidRuntime: Process: com.android.camera, PID: 7681

03-10 20:04:25.455 7681 7681 E AndroidRuntime: java.lang.RuntimeException: Unable to instantiate activity ComponentInfo{com.android.camera/com.android.camera.Camera}: java.lang.ClassNotFoundException: Didn't find class "com.android.camera.Camera" on path: DexPathList[[zip file "/system/priv-app/MiuiCamera/MiuiCamera.apk"],nativeLibraryDirectories=[/system/priv-app/MiuiCamera/lib/arm64, /system/lib64, /vendor/lib64, /system/product/lib64, /system/lib64, /vendor/lib64, /system/product/lib64]]

03-10 20:04:25.455 7681 7681 E AndroidRuntime: Caused by: java.lang.ClassNotFoundException: Didn't find class "com.android.camera.Camera" on path: DexPathList[[zip file "/system/priv-app/MiuiCamera/MiuiCamera.apk"],nativeLibraryDirectories=[/system/priv-app/MiuiCamera/lib/arm64, /system/lib64, /vendor/lib64, /system/product/lib64, /system/lib64, /vendor/lib64, /system/product/lib64]]

03-10 20:04:25.455 7681 7681 E AndroidRuntime: Caused by: java.lang.ClassNotFoundException: com.android.camera.ActivityBase

03-10 20:04:25.458 1357 3113 W ActivityTaskManager: Force finishing activity com.android.camera/.Camera

03-10 20:04:25.491 1357 3351 I ActivityManager: Process com.android.camera (pid 7681) has died: vis+99 TOP

03-10 20:04:25.960 1357 1394 W ActivityTaskManager: Activity top resumed state loss timeout for ActivityRecord{4a40df4 u0 com.android.camera/.Camera t-1 f}

03-10 20:05:21.569 1357 2709 I ActivityTaskManager: START u0 {act=android.intent.action.MAIN cat=[android.intent.category.LAUNCHER] flg=0x10000000 cmp=com.android.camera/.Camera} from uid 10225

03-10 20:05:21.587 1357 1395 W WindowManager: Token{a3ce2bf ActivityRecord{8a970de u0 com.android.camera/.Camera t186}} failed creating starting window

03-10 20:05:21.619 1357 1404 I ActivityManager: Start proc 8512:com.android.camera/u0a85 for activity {com.android.camera/com.android.camera.Camera}

03-10 20:05:21.670 8512 8512 W System.err: at com.android.camera.CameraAppImpl.<init>(CameraAppImpl.java:26)

03-10 20:05:21.684 8512 8512 E AndroidRuntime: Process: com.android.camera, PID: 8512

03-10 20:05:21.684 8512 8512 E AndroidRuntime: java.lang.RuntimeException: Unable to instantiate activity ComponentInfo{com.android.camera/com.android.camera.Camera}: java.lang.ClassNotFoundException: Didn't find class "com.android.camera.Camera" on path: DexPathList[[zip file "/system/priv-app/MiuiCamera/MiuiCamera.apk"],nativeLibraryDirectories=[/system/priv-app/MiuiCamera/lib/arm64, /system/lib64, /vendor/lib64, /system/product/lib64, /system/lib64, /vendor/lib64, /system/product/lib64]]

03-10 20:05:21.684 8512 8512 E AndroidRuntime: Caused by: java.lang.ClassNotFoundException: Didn't find class "com.android.camera.Camera" on path: DexPathList[[zip file "/system/priv-app/MiuiCamera/MiuiCamera.apk"],nativeLibraryDirectories=[/system/priv-app/MiuiCamera/lib/arm64, /system/lib64, /vendor/lib64, /system/product/lib64, /system/lib64, /vendor/lib64, /system/product/lib64]]

03-10 20:05:21.684 8512 8512 E AndroidRuntime: Caused by: java.lang.ClassNotFoundException: com.android.camera.ActivityBase

03-10 20:05:21.687 1357 2709 W ActivityTaskManager: Force finishing activity com.android.camera/.Camera

03-10 20:05:21.693 1357 1392 I ActivityManager: Showing crash dialog for package com.android.camera u0

03-10 20:05:22.190 1357 1394 W ActivityTaskManager: Activity top resumed state loss timeout for ActivityRecord{8a970de u0 com.android.camera/.Camera t186 f}

03-10 20:05:22.190 1357 1394 W ActivityTaskManager: Activity pause timeout for ActivityRecord{8a970de u0 com.android.camera/.Camera t186 f}

03-10 20:05:23.942 1357 2709 W ActivityTaskManager: Force finishing activity com.android.camera/.Camera

03-10 20:05:23.966 1357 2709 I ActivityManager: Killing 8512:com.android.camera/u0a85 (adj 900): crash

03-10 20:05:23.969 1357 2709 E InputDispatcher: Window handle Window{c1bd4b4 u0 Application Error: com.android.camera} has no registered input channel

---- Mar 10, 2020 8:17:24 PM ----

I will be very thankful for your help
 
Last edited:

meconfusedthinker

Senior Member
Apr 1, 2014
79
13
Mumbai
I found all missing libs so far, but i can't find in dump this file: data/nubiaeffect/water_mark_drawable_white.argb try to find and send me :)

E com.android.camera: [WaterMarkUtil]create water effect file fail!/data/nubiaeffect/water_mark_drawable_white.argb: open failed: ENOENT (No such file or directory)


@Stefke93

friend any luck with it..

may be if you just disable the watermark to see no error in logs

may be it will work..

since this .argb files is embeded in .so file am not able to get it..

u can download below new apk file which has lib files of watermark..

https://drive.google.com/file/d/10x6uYRuO3lcppWYvn6vLL4YybF2A82My/view?usp=drivesdk

awaiting ur reply..
 
Last edited:

LorD IchigO

Member
May 13, 2021
5
0
Xiaomi Poco F1
Analizing app force close and how to fix it

Well in this post i will explain how to fix force close app that you are trying to port
Typically applications that do not work is because several factors:


1. Missing library framework


2. Missing *.so files


3. Java Method or function that do not match with your current ROM


In screenshot logcat say there is many error, you should search similar code like before "storage_sdcard" & "storage_usb" and follow changing code guide like before!!! also search in other smali that same error like that.


If you are done, save all change then recompile apk and sign apk

CONGRATZ YOU ARE DONE.
will this work now?
 

acp Siam

Senior Member
Jan 4, 2018
71
22
Comilla
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

Unfortunately i dont understand what you said above... In the first line. Could you please help?
 
Oct 17, 2020
16
1
Hi there, I'm currently trying to port a system Motorola app, I have successfully fixed some errors but I'm currently stuck with the following error:

Code:
FATAL EXCEPTION: main
Process: com.motorola.systemui.desk, PID: 10993
java.lang.NoSuchMethodError: No interface method registerShortcutKeyByDisplay(JLcom/motorola/internal/policy/IShortcutServiceByDisplay;)V in class Landroid/view/IWindowManager; or its super classes (declaration of 'android.view.IWindowManager' appears in /system/framework/framework.jar!classes3.dex)
    at com.motorola.taskbar.shortcut.ShortcutKeyDispatcher.registerShortcutKey(ShortcutKeyDispatcher.java:79)
    at com.motorola.taskbar.shortcut.ShortcutKeyDispatcher.start(ShortcutKeyDispatcher.java:121)
    at com.motorola.taskbar.TaskBarApplication.onCreate(TaskBarApplication.java:51)
    at android.app.Instrumentation.callApplicationOnCreate(Instrumentation.java:1198)
    at android.app.ActivityThread.handleBindApplication(ActivityThread.java:6721)
    at android.app.ActivityThread.access$1300(ActivityThread.java:238)
    at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1914)
    at android.os.Handler.dispatchMessage(Handler.java:106)
    at android.os.Looper.loop(Looper.java:223)
    at android.app.ActivityThread.main(ActivityThread.java:7666)
    at java.lang.reflect.Method.invoke(Native Method)
    at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:592)
    at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:947)

Any ideas/suggestions?
 

Top Liked Posts

  • There are no posts matching your filters.
  • 153
    2a9zUsv.png

    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://xdaforums.com/showthread.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://xdaforums.com/showpost.php?p=60829642&postcount=2
    4. Knowledge to use LogCat
    - if you don't know how to do this, visit this thread http://xdaforums.com/showthread.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 :D

    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)
    Moawj5V.png


    (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

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

    - 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/
    xiSQsHB.png

    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
    2SZ4pl2.png

    <uses-library android:name="com.sony.device" android:required="true" />
    <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: '[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 change minimal sdk
    59
    Analizing app force close and how to fix it

    Well in this post i will explain how to fix force close app that you are trying to port
    Typically applications that do not work is because several factors:
    1. Missing library framework
    2. Missing *.so files
    3. Java Method or function that do not match with your current ROM

    1. Missing library framework
    You should look at AndroidManifest.xml what app needed framework files, see screenshots!
    2SZ4pl2.png

    take the file name like on AndroidManifest.xml in system/framework and take xml permissions files from system/etc/permissions

    2. Missing *.so files
    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!

    3. Java Method or function that do not match with your current ROM
    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.
    lxIbQpz.jpg


    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!
    tyTiMqL.png

    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
    Code:
    const-string v2, "[COLOR="Red"]storage_internal[/COLOR]"
    RIGHT?
    - SO Search storage_internal in Public.xml in your framework-res.apk
    EqxeMSF.png

    copy the code and change the code look like this!
    Code:
        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
    Shrink code to
    Code:
    const v2, [COLOR="Red"]0x10405ad[/COLOR]
    So it will look like this
    Code:
     .line 262
        .local v0, "description":Ljava/lang/String;
        const v2, 0x10405ad
    
        if-eqz v2, :cond_0

    In screenshot logcat say there is many error, you should search similar code like before "storage_sdcard" & "storage_usb" and follow changing code guide like before!!! also search in other smali that same error like that.

    If you are done, save all change then recompile apk and sign apk

    CONGRATZ YOU ARE DONE.
    39
    CREDITS :

    Thanks to @Lasan for the trick @ibanez7 for always helping me if i stuck
    6
    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:D:silly:

    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 :D
    4
    Any tutorial for round switches in settings like homani framework
    And xperia u phone book port to tipo ????