Okay, so I've never done any modding before, and thought that correcting something that is annoying would be a good way to start!
I've changed my lcd density, so now on the quick bar the "Sound Vibration" and "Auto Rotation" text oveflows.
Being inquisitive and inspired by others modding SystemUI.apk I thought I'd have a go, and after much trouble (using apktool), I discovered apk manager and using it to decompile the apk I found that the strings appear to be in a strings.xml file.
I changed the file, recompiled it and then pushed it to the phone, but there hasn't been any change at all.
Have I missed something?
My process:
ADB Pull SystemUI.apk
Decompile SystemUI.apk (using apkmanager option 9)
Edit and Save SystemUI.apk/res/values/strings.xml
Compile SystemUI.apk (option 11, answering "y" when prompted)
adb remount
adb push SystemUI.apk to /system/app/SystemUI.apk
adb reboot
Wow, I feel stupid now...I was pushing to /system/apps!
So now I am pushing to /system/app, the problem is that the Notification bar doesn't load at all.
It must be the decompile/compile that's causing the problem, when I extract/zip (changing just a few png images) the file is loaded in and the notification bar runs without a hitch.
Signatures? Watch logcat on boot
Here's what logcat throws up:
Exception reading AndroidManifest.xml in /system/app/SystemUI.apk
W/PackageParser( 2701): java.lang.SecurityException: META-INF/MANIFEST.MF has invalid digest for AndroidManifest.xml in /system/app/SystemUI.apk
W/PackageParser( 2701): at java.util.jar.JarVerifier.invalidDigest(JarVerifier.java:130)
W/PackageParser( 2701): at java.util.jar.JarVerifier.access$100(JarVerifier.java:52)
W/PackageParser( 2701): at java.util.jar.JarVerifier$VerifierEntry.verify(JarVerifier.java:122)
W/PackageParser( 2701): at java.util.jar.JarFile$JarFileInputStream.read(JarFile.java:120)
W/PackageParser( 2701): at java.io.BufferedInputStream.read(BufferedInputStream.java:319)
W/PackageParser( 2701): at android.content.pm.PackageParser.loadCertificates(PackageParser.java:343)
W/PackageParser( 2701): at android.content.pm.PackageParser.collectCertificates(PackageParser.java:485)
W/PackageParser( 2701): at com.android.server.PackageManagerService.collectCertificatesLI(PackageManagerService.java:2789)
W/PackageParser( 2701):
Okay so if I'm reading this correctly then it's saying that the SHA1 digest for AndroidMAnifext.xml is invalid, but AndroidManifest.xml hasn't changed.
Weird...
XDA user iBotPeaches now has a working Apktool 1.4.9. I recommend using this over the Apktool 1.4.4 I posted, as it is no longer necessary to modify XML files to recompile framework-res.apk and other APKs. I may post updated smali/baksmali binaries if anyone is interested, as I still build those frequently from the latest source.
[UTIL][July 28 2012] Apktool v1.4.9 - a tool for reverse engineering apk files
Apktool 1.4.4 with Smali 1.3.4
Version 3.1 is now posted!
Note: 3.1 is a maintenance release containing working aapt binaries. You only need to re-download it if you haven't installed the latest Android SDK Platform-tools rev. 12.
I have been able to decompile / recompile SystemUI.apk, framework-res.apk (with patch), Browser.apk, Swype.apk, com.htc.resources.apk (with patch) without problems.
Changelog:
Code:
07/17/12 - Version 3.1
Added aapt binaries from Android SDK Platform-tools rev. 12 (Both Linux and Windows)
Added README file
Removed patches from the archive (download attached patches / fixed XML as needed)
07/15/12 - Version 3
Compiled apktool 1.4.4 with newest smali 1.3.4-dev (as of 07/15/12)
Attached apktool 1.4.4 and smali 1.3.4-dev build script for Linux (use this to build apktool and smali from source)
Attached all fixed XML files for framework-res.apk (mainly for Windows users, Linux users can use patch)
Attached patch for com.htc.resources.apk
Attached all fixed XML files for com.htc.resources.apk (mainly for Windows users, Linux users can use patch)
07/09/12
Fixed the framework-res_htc.patch file.
Patch file is now posted for those who have already downloaded v2.
Updated archive to include fixed framework-res_htc.patch file.
07/08/12 - Version 2
Modified the build process for apktool so it doesn't compile with outdated brut.apktool.smali and builds exclusively with Smali 1.3.4.
Recompiled apktool 1.4.4
Added aapt binary for Linux
Added apktool.bat file for Windows users
07/07/12 - Initial version
Compiled apktool 1.4.4, compiled Smali 1.3.4, merged into apktool.jar.
Description:
I have compiled the newest apktool 1.4.4 (merged with smali 1.3.4).
In the attached archive are apktool.jar, aapt, and apktool scripts for Linux and Windows.
Also attached are XML patches for some HTC framework files so they will compile with apktool.
I wanted to be able to decompile framework-res.apk (Sense 4.0), and other HTC APKs, with the latest apktool.
Previously, the only way to properly get HTC apks and Sense 4.0 framework-res.apk to decompile was having to use an older apktool 1.4.2 (modded by fernando sor). Now that shouldn't be necessary
Notes:
This was compiled and tested on Linux 64-bit, although the .jar file should work with Linux 32-bit and Windows.
The patch files won't work on Windows because they use unified context (only GNU Patch for Linux supports unified context).
Windows users can use the fixed XML files I attached, or make the necessary XML edits yourself.
For instructions on patching framework-res.apk XML files from Windows, refer to this post:
http://forum.xda-developers.com/showthread.php?t=1601511
Download Instructions
Download attachment apktool-1.4.4_v3.1.tar.bz2
Download attachments containing patches or fixed XML
Extract all files to a folder ~/apktools/apktool is what I personally use.
Make sure you have aapt in your path (check your ~/.bashrc file to make sure).aapt Note: The aapt binary (Linux and Windows) is included in the attachment. You can use this aapt, or you can get aapt by installing android-sdk.
Refer to this excellent tutorial for detailed instructions on setting up android-sdk:
http://wiki.cyanogenmod.com/wiki/Howto:_Install_the_Android_SDK
Code:
chmod a+x aapt
chmod a+x apktool
chmod a+x apktool.jar
Installing Frameworks and Decompiling
Code:
cd ~/apktools/apktool
Copy over com.htc.resources.apk and framework-res.apk from /system/framework either by extracting a ROM .zip or using these adb commands:
Code:
adb pull /system/framework/com.htc.resources.apk
adb pull /system/framework/framework-res.apk
Then to install frameworks and decompile:
Code:
./apktool if com.htc.resources.apk
./apktool if framework-res.apk
./apktool d framework-res.apk
Ignore any warnings about integers being out of range.
Patching XML files and RecompilingLinux users only: Use the patch files I attached. Instructions are below.
Windows or Linux users : Unzip patched XML file(s) into apktool folder and overwrite all files
Code:
patch -p0 -i framework-res_htc.patch
Now you should be able to recompile framework-res using apktool 1.4.4 without any errors:
Code:
./apktool b framework-res
Remember to extract the META-INF and AndroidManifest.xml from the ORIGINAL framework-res.apk to /framework-res/build/apk (signing apk) then build again:
Code:
./apktool b framework-res
Your signed framework-res.apk file will be in /framework-res/dist/.
Pushing Modified APK to Device
There are a few ways of doing this, but I will guide you through the process I use.
Connect your phone to your PC and issue the following command to boot into recovery:
Code:
adb reboot recovery
Once you are in recovery, make sure that /system is mounted.
Now issue these adb/shell commands to delete the existing APK and push the modified APK to your phone:
Code:
adb shell rm /system/framework/framework-res.apk
adb push framework-res.apk /system/framework
adb shell chmod 644 /system/framework/framework-res.apk
Now clear cache and dalvik cache in recovery and reboot system.
If your phone gets stuck in a boot loop or doesn't display the UI properly, then you didn't sign the APK properly.
Credits:
Thank you to fernando sor for providing the original instructions and modded apktool 1.4.2 for decompiling Sense 4.0 framework.
http://forum.xda-developers.com/showthread.php?t=1601511
Thank you to ahecht for posting working aapt from Android SDK Platform-tools rev. 12
Thank you to brut.all for creating apktool
http://code.google.com/p/android-apktool/
Thank you to JesusFreke for creating smali
http://code.google.com/p/smali/
sn0b0ard said:
Attachment back up! I recompiled apktool 1.4.4, compiled smali 1.3.4, and merged it into the apktool.jar file. I have been able to decompile / recompile SystemUI.apk and framework-res.apk without problems. I tried com.htc.resources.apk, and it decompiles without issue, but to recompile it needs XML edits that I don't have time to do at the moment.
I have compiled the newest apktool 1.4.4 (merged with smali 1.3.4) for Linux 64-bit (not tested on 32-bit).
I wanted to be able to decompile framework-res.apk (Sense 4.0), and other HTC APKs, with the latest apktool. Previously, the only way to properly get HTC apks and Sense 4.0 framework-res.apk to decompile was having to use an older apktool 1.4.2 (modded by fernando sor). Now that shouldn't be necessary
Attached is the apktool.jar file, an apktool bash script and a patch file for use in fixing framework-res.apk XML files to compile with apktool.
Download Directions:
Download apktool-1.4.4_smali-1.3.4.tar.bz2
Extract all files to a folder ~/apktools/apktool is what I personally use.
Make sure you have aapt in your path (check your .bashrc file to make sure).
chmod a+x apktool
chmod a+x apktool.jar
Installing Frameworks and Decompiling
cd ~/apktools/apktool
Copy over com.htc.resources.apk and framework-res.apk from /system/framework either by extracting a ROM .zip or using these adb commands:
adb pull /system/framework/com.htc.resources.apk
adb pull /system/framework/framework-res.apk
Then to install frameworks and decompile:
./apktool if com.htc.resources.apk
./apktool if framework-res.apk
./apktool d framework-res.apk
Ignore any warnings about integers being out of range.
Now you need to patch some XML files in /res/values* -- just use the patch file I included.
patch -p0 -i framework-res_htc.patch
Now you should be able to recompile framework-res using apktool 1.4.4 without any errors:
./apktool b framework-res
Remember to extract the META-INF and AndroidManifest.xml to /framework-res/build/apk (signing apk) then build again:
./apktool b framework-res
Your signed framework-res.apk file will be in /framework-res/dist/.
Thank you to fernando sor for providing the original instructions and modded apktool 1.4.2 for decompiling Sense 4.0 framework.
http://forum.xda-developers.com/showthread.php?t=1601511
Thank you to brut.all for creating apktool
http://code.google.com/p/android-apktool/
Thank you to JesusFreke for creating smali
http://code.google.com/p/smali/
Click to expand...
Click to collapse
Now i just gotta learn how to use this, and im in Business. Dieing to get into themeing a bit. THanks for this man.
this is what ive been using
http://forum.xda-developers.com/showthread.php?t=1189971
apkchanger is much easier, no typing of commands or anything
and yes it decompiles sense 4 apks with ease
flex360 said:
this is what ive been using
http://forum.xda-developers.com/showthread.php?t=1189971
apkchanger is much easier, no typing of commands or anything
and yes it decompiles sense 4 apks with ease
Click to expand...
Click to collapse
Yes, there are many scripts out there that automate using apktool. This is the latest version of apktool, which isn't included in most scripts yet. You could probably just use the apktool.jar file from this post and put it into apkchanger if you want. I'm also seeing that most modded apktools that decompile HTC APKs have a modified HeaderItem.java to get past errors when decompiling APKs. The version I posted has the entire Smali 1.3.4 build merged into apktool 1.4.4.
thanks
Can anyone try this to theme the status bar that has quick settings? I get force close
Sent from my EVO using xda app-developers app
Art2Fly said:
Can anyone try this to theme the status bar that has quick settings? I get force close
Sent from my EVO using xda app-developers app
Click to expand...
Click to collapse
Try signing it.
Red.
reverepats said:
Now i just gotta learn how to use this, and im in Business. Dieing to get into themeing a bit. THanks for this man.
Click to expand...
Click to collapse
No problem
This video should help you get started with apktool:
http://www.youtube.com/watch?v=017pMX8otf8
Art2Fly said:
Can anyone try this to theme the status bar that has quick settings? I get force close
Sent from my EVO using xda app-developers app
Click to expand...
Click to collapse
In addition to signing the apk, as stated previously, you could also perform this mod and completely disable signature checking:
http://forum.xda-developers.com/showpost.php?p=27122463&postcount=1
sn0b0ard said:
In addition to signing the apk, as stated previously, you could also perform this mod and completely disable signature checking:
http://forum.xda-developers.com/showpost.php?p=27122463&postcount=1
Click to expand...
Click to collapse
I will definitely be trying this.
Red.
Thanks for this!
Is the following normal though? When I try to apply the patch, I get this error:
Code:
[email protected]:/media/Alpha/Users/Jon/My Docs/Projects/deSensedICS/apktool$ sudo patch -p0 -i framework-res_htc.patch
patching file framework-res/res/values/anims.xml
Hunk #1 FAILED at 1.
1 out of 1 hunk FAILED -- saving rejects to file framework-res/res/values/anims.xml.rej
patching file framework-res/res/values/layouts.xml
Hunk #1 FAILED at 1.
1 out of 1 hunk FAILED -- saving rejects to file framework-res/res/values/layouts.xml.rej
patching file framework-res/res/values/plurals.xml
Hunk #1 FAILED at 76.
1 out of 1 hunk FAILED -- saving rejects to file framework-res/res/values/plurals.xml.rej
patching file framework-res/res/values/raws.xml
Hunk #1 FAILED at 1.
1 out of 1 hunk FAILED -- saving rejects to file framework-res/res/values/raws.xml.rej
patching file framework-res/res/values-af/plurals.xml
Hunk #1 FAILED at 76.
1 out of 1 hunk FAILED -- saving rejects to file framework-res/res/values-af/plurals.xml.rej
patching file framework-res/res/values-am/plurals.xml
Hunk #1 FAILED at 76.
1 out of 1 hunk FAILED -- saving rejects to file framework-res/res/values-am/plurals.xml.rej
patching file framework-res/res/values-ar/plurals.xml
Hunk #1 FAILED at 76.
1 out of 1 hunk FAILED -- saving rejects to file framework-res/res/values-ar/plurals.xml.rej
patching file framework-res/res/values-be/plurals.xml
Hunk #1 FAILED at 76.
1 out of 1 hunk FAILED -- saving rejects to file framework-res/res/values-be/plurals.xml.rej
patching file framework-res/res/values-bg/plurals.xml
Hunk #1 FAILED at 76.
1 out of 1 hunk FAILED -- saving rejects to file framework-res/res/values-bg/plurals.xml.rej
patching file framework-res/res/values-ca/plurals.xml
Hunk #1 FAILED at 76.
1 out of 1 hunk FAILED -- saving rejects to file framework-res/res/values-ca/plurals.xml.rej
patching file framework-res/res/values-cs/plurals.xml
Hunk #1 FAILED at 76.
1 out of 1 hunk FAILED -- saving rejects to file framework-res/res/values-cs/plurals.xml.rej
patching file framework-res/res/values-da/plurals.xml
Hunk #1 FAILED at 76.
1 out of 1 hunk FAILED -- saving rejects to file framework-res/res/values-da/plurals.xml.rej
patching file framework-res/res/values-de/plurals.xml
Hunk #1 FAILED at 76.
1 out of 1 hunk FAILED -- saving rejects to file framework-res/res/values-de/plurals.xml.rej
patching file framework-res/res/values-el/plurals.xml
Hunk #1 FAILED at 76.
1 out of 1 hunk FAILED -- saving rejects to file framework-res/res/values-el/plurals.xml.rej
patching file framework-res/res/values-es/plurals.xml
Hunk #1 FAILED at 76.
1 out of 1 hunk FAILED -- saving rejects to file framework-res/res/values-es/plurals.xml.rej
patching file framework-res/res/values-es-rUS/plurals.xml
Hunk #1 FAILED at 76.
1 out of 1 hunk FAILED -- saving rejects to file framework-res/res/values-es-rUS/plurals.xml.rej
patching file framework-res/res/values-et/plurals.xml
Hunk #1 FAILED at 76.
1 out of 1 hunk FAILED -- saving rejects to file framework-res/res/values-et/plurals.xml.rej
patching file framework-res/res/values-fa/plurals.xml
Hunk #1 FAILED at 76.
1 out of 1 hunk FAILED -- saving rejects to file framework-res/res/values-fa/plurals.xml.rej
patching file framework-res/res/values-fi/plurals.xml
Hunk #1 FAILED at 76.
1 out of 1 hunk FAILED -- saving rejects to file framework-res/res/values-fi/plurals.xml.rej
patching file framework-res/res/values-fr/plurals.xml
Hunk #1 FAILED at 76.
1 out of 1 hunk FAILED -- saving rejects to file framework-res/res/values-fr/plurals.xml.rej
patching file framework-res/res/values-hi/plurals.xml
Hunk #1 FAILED at 76.
1 out of 1 hunk FAILED -- saving rejects to file framework-res/res/values-hi/plurals.xml.rej
patching file framework-res/res/values-hr/plurals.xml
Hunk #1 FAILED at 76.
1 out of 1 hunk FAILED -- saving rejects to file framework-res/res/values-hr/plurals.xml.rej
patching file framework-res/res/values-hu/plurals.xml
Hunk #1 FAILED at 76.
1 out of 1 hunk FAILED -- saving rejects to file framework-res/res/values-hu/plurals.xml.rej
patching file framework-res/res/values-in/plurals.xml
Hunk #1 FAILED at 76.
1 out of 1 hunk FAILED -- saving rejects to file framework-res/res/values-in/plurals.xml.rej
patching file framework-res/res/values-it/plurals.xml
Hunk #1 FAILED at 76.
1 out of 1 hunk FAILED -- saving rejects to file framework-res/res/values-it/plurals.xml.rej
patching file framework-res/res/values-iw/plurals.xml
Hunk #1 FAILED at 76.
1 out of 1 hunk FAILED -- saving rejects to file framework-res/res/values-iw/plurals.xml.rej
patching file framework-res/res/values-ja/plurals.xml
Hunk #1 FAILED at 76.
1 out of 1 hunk FAILED -- saving rejects to file framework-res/res/values-ja/plurals.xml.rej
patching file framework-res/res/values-ko/plurals.xml
Hunk #1 FAILED at 76.
1 out of 1 hunk FAILED -- saving rejects to file framework-res/res/values-ko/plurals.xml.rej
patching file framework-res/res/values-lt/plurals.xml
Hunk #1 FAILED at 76.
1 out of 1 hunk FAILED -- saving rejects to file framework-res/res/values-lt/plurals.xml.rej
patching file framework-res/res/values-lv/plurals.xml
Hunk #1 FAILED at 76.
1 out of 1 hunk FAILED -- saving rejects to file framework-res/res/values-lv/plurals.xml.rej
patching file framework-res/res/values-ms/plurals.xml
Hunk #1 FAILED at 76.
1 out of 1 hunk FAILED -- saving rejects to file framework-res/res/values-ms/plurals.xml.rej
patching file framework-res/res/values-nb/plurals.xml
Hunk #1 FAILED at 76.
1 out of 1 hunk FAILED -- saving rejects to file framework-res/res/values-nb/plurals.xml.rej
patching file framework-res/res/values-nl/plurals.xml
Hunk #1 FAILED at 76.
1 out of 1 hunk FAILED -- saving rejects to file framework-res/res/values-nl/plurals.xml.rej
patching file framework-res/res/values-pl/plurals.xml
Hunk #1 FAILED at 76.
1 out of 1 hunk FAILED -- saving rejects to file framework-res/res/values-pl/plurals.xml.rej
patching file framework-res/res/values-pt/plurals.xml
Hunk #1 FAILED at 76.
1 out of 1 hunk FAILED -- saving rejects to file framework-res/res/values-pt/plurals.xml.rej
patching file framework-res/res/values-pt-rPT/plurals.xml
Hunk #1 FAILED at 76.
1 out of 1 hunk FAILED -- saving rejects to file framework-res/res/values-pt-rPT/plurals.xml.rej
patching file framework-res/res/values-ro/plurals.xml
Hunk #1 FAILED at 76.
1 out of 1 hunk FAILED -- saving rejects to file framework-res/res/values-ro/plurals.xml.rej
patching file framework-res/res/values-ru/plurals.xml
Hunk #1 FAILED at 76.
1 out of 1 hunk FAILED -- saving rejects to file framework-res/res/values-ru/plurals.xml.rej
patching file framework-res/res/values-sk/plurals.xml
Hunk #1 FAILED at 76.
1 out of 1 hunk FAILED -- saving rejects to file framework-res/res/values-sk/plurals.xml.rej
patching file framework-res/res/values-sl/plurals.xml
Hunk #1 FAILED at 76.
1 out of 1 hunk FAILED -- saving rejects to file framework-res/res/values-sl/plurals.xml.rej
patching file framework-res/res/values-sr/plurals.xml
Hunk #1 FAILED at 76.
1 out of 1 hunk FAILED -- saving rejects to file framework-res/res/values-sr/plurals.xml.rej
patching file framework-res/res/values-sv/plurals.xml
Hunk #1 FAILED at 76.
1 out of 1 hunk FAILED -- saving rejects to file framework-res/res/values-sv/plurals.xml.rej
patching file framework-res/res/values-sw/plurals.xml
Hunk #1 FAILED at 76.
1 out of 1 hunk FAILED -- saving rejects to file framework-res/res/values-sw/plurals.xml.rej
patching file framework-res/res/values-th/plurals.xml
Hunk #1 FAILED at 76.
1 out of 1 hunk FAILED -- saving rejects to file framework-res/res/values-th/plurals.xml.rej
patching file framework-res/res/values-tl/plurals.xml
Hunk #1 FAILED at 76.
1 out of 1 hunk FAILED -- saving rejects to file framework-res/res/values-tl/plurals.xml.rej
patching file framework-res/res/values-tr/plurals.xml
Hunk #1 FAILED at 76.
1 out of 1 hunk FAILED -- saving rejects to file framework-res/res/values-tr/plurals.xml.rej
patching file framework-res/res/values-uk/plurals.xml
Hunk #1 FAILED at 76.
1 out of 1 hunk FAILED -- saving rejects to file framework-res/res/values-uk/plurals.xml.rej
patching file framework-res/res/values-vi/plurals.xml
Hunk #1 FAILED at 76.
1 out of 1 hunk FAILED -- saving rejects to file framework-res/res/values-vi/plurals.xml.rej
patching file framework-res/res/values-zh-rCN/plurals.xml
Hunk #1 FAILED at 76.
1 out of 1 hunk FAILED -- saving rejects to file framework-res/res/values-zh-rCN/plurals.xml.rej
patching file framework-res/res/values-zh-rTW/plurals.xml
Hunk #1 FAILED at 76.
1 out of 1 hunk FAILED -- saving rejects to file framework-res/res/values-zh-rTW/plurals.xml.rej
patching file framework-res/res/values-zu/plurals.xml
Hunk #1 FAILED at 76.
1 out of 1 hunk FAILED -- saving rejects to file framework-res/res/values-zu/plurals.xml.rej
EDIT: Just did the manual edits and it worked thanks!
thanks for this! but where is the actual builded apk? couldnt find it
EDIT: dont worry found it! its in dist folder
how to do the manual edits cause it keeps failing for me too....?
Sorry everyone, the patch will work, but you need to rename the framework-res folder to framework-res_compile. I will fix this later today and get a new patch out. For the meantime, just rename the folder. Rename it back to framework-res before you compile with apktool.
Definitely works and is extremely useful....Ran out of Thanks hitting your button....
could you please make a patch for windows too?
I'll see what I can do.
Sent from an EVO 4G LTE using Tapatalk 2.
thnx for that, wats the status on it?
FallenSuisydal said:
thnx for that, wats the status on it?
Click to expand...
Click to collapse
The latest Win32 GNU Patch binary doesn't read the patch file I created properly, so I'll try using Winmerge to generate a patch file that, hopefully, will be compatible with Windows. If not, then we are looking at a .bat file to replace the xml files with the right ones. Either way, it should be possible to do this without having to manually replace the XML files. If time permits, I should be able to work on it more this evening, and hopefully get a patch for framework-res.apk for Windows users this evening (US Pacific time).
1.4.8 is out now
Sent from my EVO using xda premium
Use at your own risk - untested
I am not responsible for bricked devices.
Back up before doing anything
Compiled using the following device tree: https://github.com/CyanogenMod/android_device_sony_z3c
Working:
Nothing, as far as I am concerned which is why you should use at your own risk.Not Working:
Everything, as far as I am concerned which is why you should use at your own risk.
The commands I used to make zip package was:
Code:
. build/envsetup.sh
lunch
make bacon
(Brunch and Breakfast are for official devices only, I believe)
Local Manifest includes:
Code:
<project name="CyanogenMod/android_device_sony_z3c" path="device/sony/z3c" remote="github" />
<project name="CyanogenMod/android_device_sony_shinano-common" path="device/sony/shinano-common" remote="github" />
<project name="CyanogenMod/android_kernel_sony_msm8974" path="kernel/sony/msm8974" remote="github" />
<project name="CyanogenMod/android_device_sony_qcom-common" path="device/sony/qcom-common" remote="github" />
<project name="CyanogenMod/android_device_sony_common" path="device/sony/common" remote="github" />
<project name="CyanogenMod/android_device_sony_msm8974-common" path="device/sony/msm8974-common" remote="github" />
<project name="CyanogenMod/android_device_qcom_common" path="device/qcom/common" remote="github" />
File can be found in Downloads Tab
And,
Mirror: AndroidFileHost
XDA:DevDB Information
ROM compilation, ROM for the Sony Xperia Z3 Compact
Contributors
m0d
Thank you to Kali- and chirayudesai for setting up device tree at: android_device_sony_z3c
And, thank you to the people who spared the time in correcting my silly mistakes, and for responding to my even sillier questions.
ROM OS Version: 5.0.x Lollipop
Version Information
Status: Testing
Created 2014-12-15
Last Updated 2014-12-17
No clue how you managed to build, I've been trying for days!
Anyhow, booted it up and it restarts repeatedly at the 'starting system apps' stage. Here's a logcat:
Code:
https://bpaste.net/show/6aaa730e0985
---------- Post added at 07:42 PM ---------- Previous post was at 07:37 PM ----------
Gairtial said:
No clue how you managed to build, I've been trying for days!
Anyhow, booted it up and it restarts repeatedly at the 'starting system apps' stage. Here's a logcat:
Code:
https://bpaste.net/show/6aaa730e0985
Click to expand...
Click to collapse
I should also mention that the installation initially failed. The device calls itself 'aries', not 'd5803'. Had to modify the script in the ZIP before flashing.
Gairtial said:
No clue how you managed to build, I've been trying for days!
Click to expand...
Click to collapse
Magic!
But, there is no magic.
Send me your build error,
And also the error for show commands and I will try to help.
As that is the secret. In programming I come to find more and more that there is no better place to go than an actual person - not all errors are documented and some strange things happen for no apparent reason, or so one thinks.
Gairtial said:
I should also mention that the installation initially failed. The device calls itself 'aries', not 'd5803'. Had to modify the script in the ZIP before flashing.
Click to expand...
Click to collapse
Yes, someone mentioned that before.
Not sure where to look.
I did find this in BoardConfig.mk,
Code:
# Assert
TARGET_OTA_ASSERT_DEVICE := D5803,D5833,z3c
And, in init.sony.usb.rc - this:
Code:
on boot
write /sys/class/android_usb/android0/iSerial ${ro.serialno}
write /sys/class/android_usb/android0/iManufacturer ${ro.product.manufacturer}
write /sys/class/android_usb/android0/iProduct ${ro.product.model}
The problem is sony calls the device aries, the code for the device is d5803, and the device tree by cm12 is z3c.
I like z3c but if anyone knows where, maybe one of the mk files, to make the changes?
Any help appreciated. I am learning as I go and as I said above:
Thank you to the people who take the time to correct my silly mistakes, and for responding to my even sillier questions
Click to expand...
Click to collapse
I only compiled device tree, no changes as of yet, other than small fixes for compilation.
m0d said:
Magic!
But, there is no magic.
Send me your build error,
And also the error for show commands and I will try to help.
As that is the secret. In programming I come to find more and more that there is no better place to go than an actual person - not all errors are documented and some strange things happen for no apparent reason, or so one thinks.
Click to expand...
Click to collapse
The build errors started with libtime_genoff.so being missing from the output directory so I manually copied it over and it continued on fine.
There were some issues with AAPT but I manually fixed those (and submitted patches for review to Gerrit).
Just waiting for the build to complete now. Are you on IRC/Hangouts or something? Mind if I PM you so we can talk a little more freely?
m0d said:
Magic!
But, there is no magic.
Send me your build error,
And also the error for show commands and I will try to help.
As that is the secret. In programming I come to find more and more that there is no better place to go than an actual person - not all errors are documented and some strange things happen for no apparent reason, or so one thinks.
Yes, someone mentioned that before.
Not sure where to look.
I did find this in BoardConfig.mk,
Code:
# Assert
TARGET_OTA_ASSERT_DEVICE := D5803,D5833,z3c
And, in init.sony.usb.rc - this:
Code:
on boot
write /sys/class/android_usb/android0/iSerial ${ro.serialno}
write /sys/class/android_usb/android0/iManufacturer ${ro.product.manufacturer}
write /sys/class/android_usb/android0/iProduct ${ro.product.model}
The problem is sony calls the device aries, the code for the device is d5803, and the device tree by cm12 is z3c.
I like z3c but if anyone knows where, maybe one of the mk files, to make the changes?
Any help appreciated. I am learning as I go and as I said above:
I only compiled device tree, no changes as of yet, other than small fixes for compilation.
Click to expand...
Click to collapse
Check your build.prop in your compiled build folder (/system) and look for the variables below:
"ro.product.device" "ro.build.product"
If you want to change the values, mount your system.img, make your changes and make new .img
(PM me if you need help with this..)
it's not hard to delect the first sentence in updater-script in zip,then we could get it flashed
Okay, did my own build using similar instructions and came up with the following issues:
libtime_genoff.so wasn't copied during the build process, manually copying required manually copying a second time after the build.
DPI was first set to 480 in build.prop. Reset it to 320 through ADB after booting and it works fine
On the first boot the modem appeared to work (connected to my network), on the second it did not. Nothing I can understand in ADB that's relevant.
Wifi appears to work properly
Camera crashes
GPS error message:
Code:
D/LocSvc_utils_cfg( 5088): D/loc_read_conf: using /etc/gps.conf
D/LocSvc_utils_cfg( 5088): D/loc_set_config_entry: PARAM DEBUG_LEVEL = 2
E/gpsone_dmn( 5088): gpsone_glue_pipeget:46] /data/misc/gsiff_ctrl_q, mode = 2
E/gpsone_dmn( 5088): gpsone_glue_pipeget:50] pipe_name: /data/misc/gsiff_ctrl_q failed: 13
E/gsiff_dmn( 5088): W/gsiff_dmn_init: Unable to initialize Message Queue!
E/gsiff_dmn( 5088): W/gsiff_loc_api_close: Improperly closing Loc API Client!
E/gsiff_dmn( 5088): W/gsiff_dmn_destroy: Could not destroy loc api!
E/gsiff_sp_glue( 5088): W/sp_destroy: Sensor provider not initialized. Sensor provider = 0
E/gsiff_dmn( 5088): W/gsiff_dmn_destroy: Could not destroy sensor provider rc = 0!
E/gpsone_dmn( 5088): gpsone_glue_piperemove:92] fd = -1, /data/misc/gsiff_ctrl_q
E/LocSvc_utils_ll( 5088): W/linked_list_destroy: Invalid list parameter!
F/libc ( 5088): Fatal signal 11 (SIGSEGV), code 1, fault addr 0x8 in tid 5088 (gsiff_daemon)
I/DEBUG ( 263): *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** ***
I/DEBUG ( 263): Build fingerprint: 'Sony/D5803/D5803:4.4.4/23.0.A.2.105/lvf_Rw:user/release-keys'
I/DEBUG ( 263): Revision: '0'
I/DEBUG ( 263): ABI: 'arm'
I/DEBUG ( 263): pid: 5088, tid: 5088, name: gsiff_daemon >>> /system/bin/gsiff_daemon <<<
I/DEBUG ( 263): signal 11 (SIGSEGV), code 1 (SEGV_MAPERR), fault addr 0x8
W/NativeCrashListener( 732): Couldn't find ProcessRecord for pid 5088
I/DEBUG ( 263): r0 00000008 r1 93475f55 r2 93475f55 r3 93475f55
E/DEBUG ( 263): AM write failure (32 / Broken pipe)
I/DEBUG ( 263): r4 00000008 r5 b4f539a4 r6 00000000 r7 b4f539a0
I/DEBUG ( 263): r8 00000003 r9 b6f9a098 sl 00000001 fp b6f94da0
I/DEBUG ( 263): ip b6c5dfbc sp be91f9b8 lr b6f116d1 pc b6f115b6 cpsr 600f0030
I/DEBUG ( 263):
I/DEBUG ( 263): backtrace:
I/DEBUG ( 263): #00 pc 000145b6 /system/lib/libc.so (pthread_mutex_trylock+3)
I/DEBUG ( 263): #01 pc 000146cd /system/lib/libc.so (pthread_mutex_destroy+4)
I/DEBUG ( 263): #02 pc 00002157 /system/lib/libgps.utils.so (msg_q_destroy+66)
I/DEBUG ( 263): #03 pc 00001a85 /system/bin/gsiff_daemon
I/DEBUG ( 263): #04 pc 00002af3 /system/bin/gsiff_daemon
I/DEBUG ( 263): #05 pc 0000fbb9 /system/lib/libc.so (__libc_init+44)
I/DEBUG ( 263): #06 pc 00001968 /system/bin/gsiff_daemon
I/DEBUG ( 263):
I/DEBUG ( 263): Tombstone written to: /data/tombstones/tombstone_
Camera messages:
Code:
E/cacao ( 7380): 1459692 cacao_chokoball.cpp (4914) 9002 E [CKB] ckb preCompile fail. keymgr create credmgr context.
W/cacao ( 7380): 1459761 cacao_chokoball.cpp (4923) 9002 W [CKB] Post process preLoad(0xffffff90)
E/mm-camera-sensor( 297): sony_sensor_power_up:1138,error
E/mm-camera-sensor( 297): sony_sensor_power_up:1145,error
I/Adreno-EGL( 7613): <qeglDrvAPI_eglInitialize:410>: EGL 1.4 QUALCOMM build: RGURRAM_AU_LINUX_ANDROID_LNX.LA.3.5.2.2_RB1.04.04.04.087.030+PATCH[ES]_msm8974_LNX.LA.3.5.2.2_RB1__release_ENGG ()
I/Adreno-EGL( 7613): OpenGL ES Shader Compiler Version: E031.24.00.15
I/Adreno-EGL( 7613): Build Date: 08/12/14 Tue
I/Adreno-EGL( 7613): Local Branch:
I/Adreno-EGL( 7613): Remote Branch: quic/LNX.LA.3.5.2.2_rb1
I/Adreno-EGL( 7613): Local Patches: 8b00bd16f3c1d9d35a2fa902df5e679888d2b2e3 Fixes an llvm crash with mini dEQP apk
I/Adreno-EGL( 7613): 38bad22e162dead4e008444520a0144c78a347bd Fixes a potential dEQP crash.
I/Adreno-EGL( 7613): ce345e1c45c2ae2d1fb2cb125c8d2574f1af5f95 Rev
I/OpenGLRenderer( 7613): Initialized EGL, version 1.4
D/OpenGLRenderer( 7613): Enabling debug mode 0
E/mm-camera( 297): cpp_module_set_clock_freq:1015] clk:133330000, dim:0, stream_type:0,
D/mm-camera( 297): mct_pipeline_process_set:command=800000e
E/cammw ( 7380): E: void* cammw_util_msg_cli_open(const char*, int32_t, cammw_util_msg_callbacks_t, uint32_t, cammw_any_t, uint32_t, cammw_any_t): connect err -1
E/cammw ( 7380): E: cammw_link_isp_cli_open: msg_cli_open fail
E/cammw ( 7380): E: cammw_camera_isp_create: isp create fail
E/cammw ( 7380): E: cammw_camera_open: isp socket create error
E/cammw ( 7380): E: cammw_camera_isp_destroy: invalid arg
E/cammw ( 7380): E: cammw_camera_sensor_destroy: invalid arg
E/cammw ( 7380): E: cammw_link_sensor_cli_close: invalid arg handle = 0x0
E/cammw ( 7380): E: cammw_err_t cammw_util_ashmem_free(cammw_buf_t*): Invalid Arg
E/cammw ( 7380): E: cammw_err_t cammw_util_ashmem_free(cammw_buf_t*): Invalid Arg
D/mm-camera( 297): mct_pipeline_process_set:command=800000b
D/mm-camera-sensor( 297): module_sensor_stop_session:700 session 1
E/cald ( 7380): 1463787 excal_system.cpp (221) 7891 E [EXC] Camera can't open.
E/cald ( 7380): 1463850 excal_system.cpp (447) 7891 E [EXC] system init is failed. General
E/cald ( 7380): 1463930 excal_comp_mgr.cpp (156) 7891 E [EXC] Unregister component: DebugMgr is not found
E/cald ( 7380): 1463984 excal_comp_mgr.cpp (156) 7891 E [EXC] Unregister component: BufMgr is not found
E/cald ( 7380): 1464037 excal_comp_mgr.cpp (156) 7891 E [EXC] Unregister component: DB is not found
I/cacao ( 7380): 1465315 pal.cpp (3383) 7891 I [INF] PAL_Delete
I/cald ( 7380): 1470629 cald_client.c (2051) 7891 I [INF] Cald_Client_Create
E/libcamera( 7380): failed to create Cald instance
E/libcamera( 7380): createInstance: failed startCamera
I/libcamera( 7380): HAL_openCameraHardware: X created hardware=0x0
E/CameraWrapper( 7380): vendor camera open fail
E/CameraClient( 7380): Could not open camera 0: -19
E/CameraClient( 7380): initialize: Camera 0: unable to initialize device: No such device (-19)
I/CameraClient( 7380): Destroying camera 0
D/NuPlayerDriver( 7380): reset(0xb460d040)
D/NuPlayerDriver( 7380): notifyResetComplete(0xb460d040)
D/NuPlayerDriver( 7380): reset(0xb460d1c0)
D/NuPlayerDriver( 7380): notifyResetComplete(0xb460d1c0)
W/CameraManager( 8386): Error querying camera device 0 for listing.
I/CameraService( 7380): getCameraCharacteristics: Switching to HAL1 shim implementation...
I/libcamera( 7380): HAL_getCameraInfo: E cameraId=1
I/libcamera( 7380): HAL_getCameraInfo: X
I/libcamera( 7380): HAL_getCameraInfo: E cameraId=1
I/libcamera( 7380): HAL_getCameraInfo: X
---------- Post added at 06:15 AM ---------- Previous post was at 06:06 AM ----------
Sorry, noticed a few things were out of date. in my tree. Previous post may not be correct. I'll be doing another build tonight after extracting vendor blobs and syncing properly and I'll post with more results.
Uploading new build I made with following:
I added to check for aries as well:
Code:
# Assert
TARGET_OTA_ASSERT_DEVICE := D5803,D5833,z3c,aries
Which updates update script to:
Code:
assert(getprop("ro.product.device") == "D5803" || getprop("ro.build.product") == "D5803" || getprop("ro.product.device") == "D5833" || getprop("ro.build.product") == "D5833" || getprop("ro.product.device") == "z3c" || getprop("ro.build.product") == "z3c" || getprop("ro.product.device") == "aries" || getprop("ro.build.product") == "aries" || abort("This package is for device: D5803,D5833,z3c,aries; this device is " + getprop("ro.product.device") + "."););
nelvinchi said:
Check your build.prop in your compiled build folder (/system) and look for the variables below:
"ro.product.device" "ro.build.product"
If you want to change the values, mount your system.img, make your changes and make new .img
(PM me if you need help with this..)
Click to expand...
Click to collapse
Build prop is not the problem, consistency is.
Code:
ro.product.name=D5803
ro.build.product=z3c
ro.product.device=z3c
CM uses the above. Sony uses aries.
So I guess checking for all three, and the variation(D5833) should work in the end.
jsscx said:
it's not hard to delect the first sentence in updater-script in zip,then we could get it flashed
Click to expand...
Click to collapse
No, but that is not ideal. It should check the for the correct device.
But, the problem is that there is no consistency so I guess checking for all four should do it - D5803,D5833,z3c,aries.
Gairtial said:
Okay, did my own build using similar instructions and came up with the following issues:
libtime_genoff.so wasn't copied during the build process, manually copying required manually copying a second time after the build.
DPI was first set to 480 in build.prop. Reset it to 320 through ADB after booting and it works fine
On the first boot the modem appeared to work (connected to my network), on the second it did not. Nothing I can understand in ADB that's relevant.
Wifi appears to work properly
Camera crashes
---------- Post added at 06:15 AM ---------- Previous post was at 06:06 AM ----------
[/COLOR]Sorry, noticed a few things were out of date. in my tree. Previous post may not be correct. I'll be doing another build tonight after extracting vendor blobs and syncing properly and I'll post with more results.
Click to expand...
Click to collapse
I am not sure if I had any problems with "libtime_genoff.so", I checked the proprietary files list and it is in none of them.
The aapt was fixed in a commit, z3c.mk is now
Code:
PRODUCT_AAPT_CONFIG := normal hdpi xhdpi
PRODUCT_AAPT_PREF_CONFIG := xhdpi
And it compiled fine.
DPI also had a commit to change to 320.
So doing a repo sync should fix those previous issues.
I believe there was an issue with proprietary files as the proprietary-files.txt has been updated.
And now I have no errors when extracting files, so maybe camera files now are getting tranferred.
Review with updated changes just for z3c - http://review.cyanogenmod.org/#/q/status:merged+project:CyanogenMod/android_device_sony_z3c,n,z
Maybe a commit will be needed to fix update script as mentioned above,
Code:
# Assert
TARGET_OTA_ASSERT_DEVICE := D5803,D5833,z3c,aries
I believe there is a pull request with that specific change as well.
Thank you all for responses
Added to OP:
Mirror: AndroidFileHost
Also,
Please submit feedback.
All issues are welcome
so here's quick test:
boot with animation,when the app starting screen lasts a few seconds,then restart.
https://www.dropbox.com/s/nfexgudos3bni87/1.txt?dl=0
jsscx said:
so here's quick test:
boot with animation,when the app starting screen lasts a few seconds,then restart.
https://www.dropbox.com/s/nfexgudos3bni87/1.txt?dl=0
Click to expand...
Click to collapse
The name of the zip package you used will be helpful, i.e. 20141215 or 20141219
19
jsscx said:
so here's quick test:
boot with animation,when the app starting screen lasts a few seconds,then restart.
https://www.dropbox.com/s/nfexgudos3bni87/1.txt?dl=0
Click to expand...
Click to collapse
Maybe @jerpelea could help as more than one person has been encountering this issue.
jsscx said:
19
Click to expand...
Click to collapse
Uploaded new build only on AFH,
Mirror: AndroidFileHostThe repo sync includes these commits,
http://review.cyanogenmod.org/#/c/82475/
http://review.cyanogenmod.org/#/c/82465/
I can confirm the issue with the start loop.
Get a starting apps message, then reverts back to CM bootanimation, does this in a loop, hard to hard shut down phone (Volume up and Power) to get it to turn off.
EDIT
- Also had to delete first line of updater script to get it to install
- The built in recovery still didn't let me install using 'apply' update, i had to use CWM 6.0.5.0 from AndroPlus Kernel to flash it
- Updater script recognized my device as 'Amami' when i don't have any reference to it in my build.prop, all value were D5803
Regards
spida_singh said:
I can confirm the issue with the start loop.
Get a starting apps message, then reverts back to CM bootanimation, does this in a loop, hard to hard shut down phone (Volume up and Power) to get it to turn off.
Regards
Click to expand...
Click to collapse
I had the same problem and I could not test the rom
spida_singh said:
EDIT
- Also had to delete first line of updater script to get it to install
- The built in recovery still didn't let me install using 'apply' update, i had to use CWM 6.0.5.0 from AndroPlus Kernel to flash it
- Updater script recognized my device as 'Amami' when i don't have any reference to it in my build.prop, all value were D5803
Regards
Click to expand...
Click to collapse
Not sure why it is recognizing your device as Amami.
I added 'aries' to the assert so it should work.
I am creating zip packages using "make bacon", by default CM uses CWM so it is not surprising that you must use CWM to flash it.
As for built-in recovery, I am not sure, as it gets created automatically with the build.
Maybe changes are needed.
spida_singh said:
I can confirm the issue with the start loop.
Get a starting apps message, then reverts back to CM bootanimation, does this in a loop, hard to hard shut down phone (Volume up and Power) to get it to turn off.
Click to expand...
Click to collapse
Burakki said:
I had the same problem and I could not test the rom
Click to expand...
Click to collapse
I may have found why 'com.qualcomm.location.apk' was crashing,
It seems devs are trying to move it from 'app' to 'priv-app':
Code:
-app/com.qualcomm.location.apk:priv-app/com.qualcomm.location/com.qualcomm.location.apk
Changing 'proprietary-files.txt' from the above to
Code:
-app/com.qualcomm.location.apk
might fix that issue.
Compiling with change to see if it works.
m0d said:
It seems devs are trying to move it from 'app' to 'priv-app'
Click to expand...
Click to collapse
Any reason behind why this is trying to be done? Hasn't it always been inside app?
someone755 said:
Any reason behind why this is trying to be done? Hasn't it always been inside app?
Click to expand...
Click to collapse
No, not sure.
On Stock ROM it is located in app; however, somewhere along the line CM devs are moving it to priv-app.
The change I made does not seem to make a difference and I can not seem to find where are they moving it to priv-app
Android.mk in 'vendor/sony/shinano-common'
Code:
include $(CLEAR_VARS)
LOCAL_MODULE := com.qualcomm.location
LOCAL_MODULE_OWNER := sony
[COLOR="SeaGreen"]LOCAL_SRC_FILES := proprietary/priv-app/com.qualcomm.location/com.qualcomm.location.apk[/COLOR]
LOCAL_MODULE_TAGS := optional
LOCAL_MODULE_SUFFIX := $(COMMON_ANDROID_PACKAGE_SUFFIX)
LOCAL_MODULE_CLASS := APPS
LOCAL_CERTIFICATE := platform
LOCAL_PRIVILEGED_MODULE := true
include $(BUILD_PREBUILT)
And, it is being copied to: out/target/product/z3c/system/priv-app/com.qualcomm.location
I am not sure if this is of any concern, but from the logs com.qualcomm.location.apk looks like the root of the issue as everything dies after it encounters:
Code:
E/installd( 269): DexInv: --- END '/system/priv-app/com.qualcomm.location/com.qualcomm.location.apk' --- status=0x0100, process failed
D/AndroidRuntime( 4634): Shutting down VM
E/AndroidRuntime( 4634): *** FATAL EXCEPTION IN SYSTEM PROCESS: main
I tested it's working great..
Just a heads up! Cyanogenmod now has an official nightly for the Sony Xperia Z3 compact.
You can download their nighty builds from here:
http://download.cyanogenmod.org/?device=z3c