[Sony Cross-Device Development Themes and Apps] azakosath:
Hello guys,

I need some help from expert modders or themers, as I am just a n00b user.

My device is a Sony Ericsson WT19i running LegacyXperia CM13.0 and I'm using this Walkman port.

I'm trying to mod the latest Sony Music app (9.1.7.A.1.0) downloaded from APKMirror. This app works fine if I sign it with test keys and push it in system or install it as normal app.

I can do simple modifications (like changing the icons, the background picture, removing the red text and changing the name in AndroidManifest.xml). But, I want to change the name from "Music" to "Walkman", not only in launcher and drawer, but also, inside the app in the action bar. So, I assume that I have to edit two values in the res/values/strings.xml.

<string name="music_app_action_bar_title_txt">Music</string>
<string name="music_app_name_txt">Music</string>

I'm using apktool_2.1.0 for decompiling and recompiling. I have tried with framework-res.apk from my ROM and with framework-res.apk and SemcGenericUxpRes.apk extracted from stock MM Sony Z5 firmware (E6653_32.1.A.1.163_TH.ftf) and deoxeded.

From what I have read in several quides here in XDA, the obvious is to extract resources.arsc from the new compiled apk and add it in the orinigal apk (without compression, just store), replacing the orinigal file. In this case, when I push is system and reboot the app does not appearing in drawer (like it's not installed) and if I try to install it from the phone or ADB, I'm getting parse error (even if I resign it).

ADB shows:

adb install music.apk

4298 KB/s (13552346 bytes in 3.078s)
pkg: /data/local/tmp/music.apk
Failure [INSTALL_PARSE_FAILED_MANIFEST_MALFORMED]

and logcat shows:

04-05 21:34:50.198 971 1058 W PackageManager: Failed parse during installPackageLI
04-05 21:34:50.198 971 1058 W PackageManager: android.content.pm.PackageParser$PackageParserException: /data/app/vmdl1428133414.tmp/base.apk (at Binary XML file line #499): <provider> does not include authorities attribute
04-05 21:34:50.198 971 1058 W PackageManager: at android.content.pm.PackageParser.parseBaseApk(PackageParser.java:924)
04-05 21:34:50.198 971 1058 W PackageManager: at android.content.pm.PackageParser.parseClusterPackage(PackageParser.java:822)
04-05 21:34:50.198 971 1058 W PackageManager: at android.content.pm.PackageParser.parsePackage(PackageParser.java:786)
04-05 21:34:50.198 971 1058 W PackageManager: at com.android.server.pm.PackageManagerService.installPackageLI(PackageManagerService.java:12995)
04-05 21:34:50.198 971 1058 W PackageManager: at com.android.server.pm.PackageManagerService.-wrap26(PackageManagerService.java)
04-05 21:34:50.198 971 1058 W PackageManager: at com.android.server.pm.PackageManagerService$8.run(PackageManagerService.java:10907)
04-05 21:34:50.198 971 1058 W PackageManager: at android.os.Handler.handleCallback(Handler.java:739)
04-05 21:34:50.198 971 1058 W PackageManager: at android.os.Handler.dispatchMessage(Handler.java:95)
04-05 21:34:50.198 971 1058 W PackageManager: at android.os.Looper.loop(Looper.java:148)
04-05 21:34:50.198 971 1058 W PackageManager: at android.os.HandlerThread.run(HandlerThread.java:61)
04-05 21:34:50.198 971 1058 W PackageManager: at com.android.server.ServiceThread.run(ServiceThread.java:46)

So, I was pointed here, but this is an over 2-years old issue in apktool and probably is resolved.

If I sign the new compiled apk and push it to system or install it as normal app, then it's force closing.

Even, if I recompile the apk without any changes I'm getting the same results with both procedures.

I have tried and other ways and combinations, like compiling with original keys, or copying META-INF and AndroidManifest.xml from the original apk to the new one, but the results are always the same (parse error or FC).

I can't configure what I'm doing wrong. Do I need some specific framework-res.apk and SemcGenericUxpRes.apk? Is it indeed apktool's problem? Or anything...

So, I ask for help from the community.

Any ideas and advices are appreciated.

Thanks for reading.