Adapting Calendar.apk - missing resources? - Nexus One Q&A, Help & Troubleshooting

Let's say I'm trying to pull Calendar.apk from Enomther's 2.11.3 and put it into 2.12.2. Though theoretically they should be similar, they aren't - and the older one force-closes. Looking at the logcat till the end shows that the reason at the bottom is:
E/AndroidRuntime( 1592): Caused by: java.io.FileNotFoundException: res/drawable-hdpi/common_icon_overlay_1y.png
Looks like it can't find a resource file. Should be easy - pull a file from 2.11.3 and put it into 2.12.2. But there is a small problem - I can't find this file in framework.res, nor in Calendar's own .
So, where does it look for the file? How do I know? Do I need to decode resources.arsc in the Calendar.apk for that?

Oh well, while I was looking for the way to do it, Enomther solved my problem But I'd still like to know how to do it.

Related

Launcher.apk not being installed in He-aero theme

Can someone help me figure out why the Launcher.apk does not get installed to the phone when applying the zip? Everything else seems to get installed fine.
http://forum.xda-developers.com/showthread.php?t=538762
FYI - It installs fine on my G1, but getting reports from some users that the Launcher.apk is not changing for them.
Its probably the user
I'ma dl and flash. and edit this post with my findings
EDIT: no idea why but it did not install on mine either
only thing i see in the logcat regarding launcher (which is probably a bad thing)
11-10 13:44:58.401: WARN/WindowManager(142): Force clearing freeze: AppWindowToken{439374a0 token=HistoryRecord{438d2338 com.android.launcher/.Launcher}}
Will investigate more and see what I can do. I took a quick look at the scripts but they seem fine.
Ok so something is messing with the launcher because the stock launcher doesnt have cyans settings (they only have 4 icons across)
pushing the launcher.apk works fine
Also, its not just launcher.apk
I dont have the themed power bar or google search bar. powerbar is in settings.apk
EDIT: None of the system apk's installed
everything is stock with the exception of framework-res.apk
there is something wrong with the install script
EDIT2: changing install script to copy_dir PACKAGE:app SYSTEM:app
EDIT3: worked on replacing launcher and dialer...but the search and power widget are still unthemed. they dont appear to be themed in the apks however
so just go to META-INF>com>google>android and open update-script in notepad++
and change the last line to
copy_dir PACKAGE:app SYSTEM:app
wow...thanks for the good info...what I plan on trying next is just taking someone else theme and using theirs as a template(since there is no generic template). The only issue I'm seeing is that the directory structures are different in a lot of different themes. So I don't really know which one to use.
Well its very easy to edit that script so I can help you out with it if you like.
basically
copy_dir PACKAGE:app SYSTEM:app
tells the recovery to open the package (the update.zip) and copy everything in the app folder in the .zip to the SYSTEM partition, app folder
You can just mess around with that and get it to work with whatever structure the base template has. If you need anymore help, just pm me

combine same jar files

hi guys,
i am looking for way to easily "combine" multiple same jar files.
one example: i want to use 2-3 mods which are in services.jar but when i overwrite this file with another services.jar in /system/framework i always have only one mod logically.
so i can't use "trackball notification", "battery percent" and "browser mod" together.
i found way how to do but it's not easy. i unpacked jar and got classes.dex which i dedexed with baksmali and got many smali files then i combine the changed files from all mods and combine them via smali back to dex file and pack them back in jar file.
is there easier way to do it?
Use the diff command, using logical attributes (otherwise as soon as you see some new code, the rest that follows may make you believe there is something new)
And write your own Jar file
then post it back up here for us all to use; including the mods you've installed...
Mostly, though, I would say this belongs in a different forum
houmles said:
hi guys,
i am looking for way to easily "combine" multiple same jar files.
one example: i want to use 2-3 mods which are in services.jar but when i overwrite this file with another services.jar in /system/framework i always have only one mod logically.
so i can't use "trackball notification", "battery percent" and "browser mod" together.
i found way how to do but it's not easy. i unpacked jar and got classes.dex which i dedexed with baksmali and got many smali files then i combine the changed files from all mods and combine them via smali back to dex file and pack them back in jar file.
is there easier way to do it?
Click to expand...
Click to collapse
Your only other option would be to download the aosp source and compile the changes in yourself. Most of these changes are already in cyanogen's latest github.
The browser one is the only one i'm not sure of

Which xml file has the color for the default status bar notification text?

Which xml file has the color for the default status bar notification text?
Examples: the "usb connected", "application installed successfully" messages on the status bar.
I have tried all 9 options available in colorchangev3.jar and none of them change the color from back.
[ticker] - ARGB color for ticker notifications on the status bar
[clock] - ARGB color for the clock text
[date] - ARGB color for the date
[ongoing] - ARGB color for "Ongoing" Label
[latest] - ARGB color for "Notifications" Label
[none] - ARGB color for "No Notifications" Label
[clear] - ARGB color for text on Clear Notifications button
[network] - ARGB color for network name (T-Mobile usually)
[roam] - Not sure where this color shows up, possibly network name when roaming
Click to expand...
Click to collapse
edit: I suspect its in another jar/apk other than framework* OR services.jar.... (for example the music notification text color is in Music.apk)
lol, well I found it last night but couldn't install the apk after changing it... now interestingly I knew you posted to the thread here about resigning framework-res and I was looking through your posts to find that thread when I found this question.
So, I'll share with you if you can collaborate with me and between us we can get a modded one completed (I want ffd3d3d3 for most of my colours).
Indeed, the notification ticker, last and ongoing are all in the same xml so it's real easy.
BUT - I followed your steps in the other thread (to sign update.zip) and I got a boot loop...
Here's what I did:
using this framework
move classes.dex from framework.jar to framework-res.apk
apktool -d framework-res.apk - success
change xml
apktool -b framework-res.apk - success
move classes.dex from framework-res.apk to framework.jar
sign neither files
make update.zip
sign update.zip
install update.zip
boot loop - it's not because of the xml changes, they were small.
Note how in all of that I didn't tell you what xml... I'm not being mean I just need to trade... can we collaborate to get this thing working? I need it for Kang-o-rama...
OR - should we just create a Morph for the xml, would that work?
I dont get this step: framework-res.apk does not have a classes.dex right?
move classes.dex from framework-res.apk to framework.jar
Click to expand...
Click to collapse
britoso said:
I dont get this step: framework-res.apk does not have a classes.dex right?
Click to expand...
Click to collapse
No... but it wont backsmali (apktool decode) without the java classes which are in framework.jar (at least they are in the one linked above) so I took that out of that file and dumped it in framework-res.apk (.jar and .apk are only containers). Perhaps with apktool there's a command line to point to an external class file but I'm not aware of it.
I don't actually know if the other dependencies will work with classes.dex contained in framework-res.apk so I moved it back to framework.jar after rebuilding the apk.
But now I don't know (trial and all error so far) if I need to sign all of the dependencies with the same sig, the zip file or what.
I'm confused by the advice in the other thread (if I understood it correctly) to not sign the framework-res.apk and only the .zip - because an unsigned manifest will get rejected by the system at boot (even if not at installation). lol - I have boot loop logs to prove it...
Code:
E/ActivityThread( 526): Failed to find provider info for settings
W/dalvikvm( 526): threadid=31: thread exiting with uncaught exception (group=0x4001b1d0)
E/AndroidRuntime( 526): Uncaught handler: thread PowerManagerService exiting due to uncaught exception
E/AndroidRuntime( 526): *** EXCEPTION IN SYSTEM PROCESS. System will crash.
java -jar apktool.jar b framework-res.apk-decoded
where framework-res.apk-decoded is a folder, works fine for me.
are you referring to the instructions at http://forum.xda-developers.com/showpost.php?p=6334671&postcount=11 ?
britoso said:
java -jar apktool.jar b framework-res.apk-decoded
where framework-res.apk-decoded is a folder, works fine for me.
are you referring to the instructions at http://forum.xda-developers.com/showpost.php?p=6334671&postcount=11 ?
Click to expand...
Click to collapse
Different thread, same instructions... using those instructions the AndroidManifest.xml file in framework-res.apk doesn't get signed so I can't see how it's ever loaded by the system...
Oh, I can build the file okay... but apktool can't decode the one I'm using properly unless I add the classes.dex file to it...
INFO: Baksmaling...
Exception in thread "main" org.jf.dexlib.DexFile$NoClassesDexException: zip file framework-res.apk does not contain a classes.dex file
Click to expand...
Click to collapse
Oh, and the file you're looking for is status_bar.xml in /res/layout/ <- this is only for the main notification ticker (in the status bar).
Although, I've just hex edited the colours and flashed a new rom with it and it did nothing at all. I'll verify my work but this leads me to suspect that the new spare parts is overwriting these defaults with it's own defaults... which could make this a painful tracing exercise. I might need to try and trace the source code which I'd like to avoid.
djmcnz said:
apktool can't decode the one I'm using properly unless I add the classes.dex file to it...
Click to expand...
Click to collapse
use the -s option, it will work
d[ecode] [-s|--no-src] [-r|--no-res] <file.apk> <dir>
Decode <file.apk> to <dir>.
-s, --no-src
Do not decode sources.
-r, --no-res
Do not decode resources.
Click to expand...
Click to collapse
Thanks for the tip, will be interested to see it working.
britoso said:
use the -s option, it will work
Thanks for the tip, will be interested to see it working.
Click to expand...
Click to collapse
lol, so simple.
Okay, I've verified that I did patch the file correctly (I pulled it from my phone, decoded it and checked the xml). My hex edits were made correctly to the xml but they had no effect whatsoever. This, I assume, means that the way the new Spare Parts (with the colour picker) works is different and status_bar.xml is no longer the primary source of the default colours. This means existing morphs, hex edits, colorchange.jar and themes may apply but have no effect. Since there's a track record of Wysie's Spare Parts code being rolled into Cyanogen's source it seems that this might be a long term consideration.
So, I'm going to try and trace the replacement defaults (and I don't think it will simply be in spareparts.apk)... I might ping Wysie...
If you're using an older framework then I imagine you'll have more positive results.
In some respects this may be good because the date is set to:
Code:
android:textColor="?textColorPrimaryInverse"
Which would be impossible to hex edit.
Thanks for the tip on apktool!
britoso said:
Which xml file has the color for the default status bar notification text?
Examples: the "usb connected", "application installed successfully" messages on the status bar.
Click to expand...
Click to collapse
Okay mate, I've got it working thanks to some pointers from wysie.
It's all changed, the xml is no longer used. No more simple morphs but I expect that this will just mean two version float around in the wild.
Key defaults are now in the code, services.jar - specifically StatusBarService.java. Two constants are established "blackcolor" and "whitecolor" and simply inserted where needed. You can change the value of the constants or simply change how they're inserted (which is the approach I took).
For a "complete" change, you need to also modify the Spare Parts app so that the "Reset UI Tweaks" defaults to the new order of things as implemented in services.jar.
Hopefully I'll be releasing a version of Kang-o-rama today that will include these mods, feel free to kang them if you want to save some effort!
cool, will be nice to finally have this missing piece

APK Tool - Modifying Rosie.apk

Wasssup fellas! Ok so I'm no themer but I've started to delve into your world a little bit. I'm looking to draw on the experience of any of you that have successfully modified the Rosie. So here's my set up
I've got Apktool set up in Ubuntu before you ask I downloaded 1.3.1 not 1.3.2
I have all the dependencies in place
I've installed the framework (apktool if com.htc.resources.apk)
Rosie.apk decompiles with no errors (apktool d Rosie.apk out)
I've modified /res/values/colors.xml to add transparency to the app drawer? (This may be my issue)
Compiled (cd out/ .......apktool b) compiles with no errors
I've tried this signing Rosie.apk, Not signing it, Copying out the "Res" and "Resource" file and going into the original Rosie.apk with Ark Manager without extracting the archive and dropped in the "Res and "Resource" files.
Same result each time when I push the file via ADB or put it in a flashable zip the phone boots goes through the animation capacitive keys light up then the phone gets stuck on the last frame of the boot animation and just hangs there forever no boot loops just hangs there?
Any help would be more than appreciated, thanks guys!
Lou
(Bumping this)
After you've pushed the .apk - Type "adb logcat" and post it here.
I have been struggling with her too but I think I cracked her Just compile it again then use WinRAR (or whatever you're using) and take classes.dex from the newly compiled Rosie.apk and put the new classes.dex in the old Rosie.apk and then you should be fine. Ofc if you had modified some PNGs you would just take the res folder too
BTW could you tell me what to edit to get the transparent app drawer?
Bump. Did you ever get this working. I have been missing with Rosie.apk for about a week now. I am able to decompile, recompile and push without any errors. But non of my changes seem to take place.
sednafx said:
Bump. Did you ever get this working. I have been missing with Rosie.apk for about a week now. I am able to decompile, recompile and push without any errors. But non of my changes seem to take place.
Click to expand...
Click to collapse
I read somewhere that you also have to apply some changes to fusion.apk
If I can find the guide for this, I'll link it.

firmware 23.5.A.1.291

I deleted the system app Radio3 in the firmware for D5803 23.5.A.1.291.
When I tried to put it back by recreating /system/app/Radio3 and I put in it:
Radio3.apk
and also created
/system/app/Radio3/oat/arm/
with a symlink to
/system/odex.app/arm/Radio3.odex
All files owned and group of "root" and with permissions 644, yet when I try to open Radio3 I get:
Code:
11-21 18:39:25.233 1384 1384 E AndroidRuntime: Caused by: java.lang.ClassNotFoundException: Didn't find class "com.sonyericsson.fmradio.ui.FmRadioActivity" on path: DexPathList[[zip file "/system/app/Radio3/Radio3.apk"],nativeLibraryDirectories=[/system/app/Radio3/lib/arm, /vendor/lib, /system/lib]]
11-21 18:39:25.233 1384 1384 E AndroidRuntime: at dalvik.system.BaseDexClassLoader.findClass(BaseDexClassLoader.java:56)
This makes me think that I'm supposed to also have /system/app/Radio3/lib/arm, but in my download of 23.5.A.1.291, I can't seem to find any lib directory in /system/app/Radio3. Can anyone here running 23.5.A.1.291 confirm that there is supposed to be some libs in /system/app/Radio3/lib/arm, and what those files are and where I might find them?
Cheers!
------------
EDIT: over 100 people have viewed this thread and no replies. Comeon folks. This is an easy one. Surely one of the 100 people is running 23.5.A.1.291. All you have to do is open up your file explorer app and look in /system/app/Radio3/ and tell me if there's a lib/ directory in there. Pretty please!
apexofservice said:
I deleted the system app Radio3 in the firmware for D5803 23.5.A.1.291.
When I tried to put it back by recreating /system/app/Radio3 and I put in it:
Radio3.apk
and also created
/system/app/Radio3/oat/arm/
with a symlink to
/system/odex.app/arm/Radio3.odex
All files owned and group of "root" and with permissions 644, yet when I try to open Radio3 I get:
Code:
11-21 18:39:25.233 1384 1384 E AndroidRuntime: Caused by: java.lang.ClassNotFoundException: Didn't find class "com.sonyericsson.fmradio.ui.FmRadioActivity" on path: DexPathList[[zip file "/system/app/Radio3/Radio3.apk"],nativeLibraryDirectories=[/system/app/Radio3/lib/arm, /vendor/lib, /system/lib]]
11-21 18:39:25.233 1384 1384 E AndroidRuntime: at dalvik.system.BaseDexClassLoader.findClass(BaseDexClassLoader.java:56)
This makes me think that I'm supposed to also have /system/app/Radio3/lib/arm, but in my download of 23.5.A.1.291, I can't seem to find any lib directory in /system/app/Radio3. Can anyone here running 23.5.A.1.291 confirm that there is supposed to be some libs in /system/app/Radio3/lib/arm, and what those files are and where I might find them?
Cheers!
------------
EDIT: over 100 people have viewed this thread and no replies. Comeon folks. This is an easy one. Surely one of the 100 people is running 23.5.A.1.291. All you have to do is open up your file explorer app and look in /system/app/Radio3/ and tell me if there's a lib/ directory in there. Pretty please!
Click to expand...
Click to collapse
So this is what happened,since your system is odexed it will have its lib folder with the odex file inside it,probably the reason it isn't working is because you have only copied the apk and not the lib folder,causing the app not to launch since its odex file is missing.
The way you can make it work is:
1. Reflash the firmware of your device
2. The complicated route,extract the system files of a firmware file from 23.5.A.1.291,find folder Radio3 and copy it to your device.
Hope that will clear some things up!
Dinkec27 said:
So this is what happened,since your system is odexed it will have its lib folder with the odex file inside it,probably the reason it isn't working is because you have only copied the apk and not the lib folder,causing the app not to launch since its odex file is missing.
The way you can make it work is:
1. Reflash the firmware of your device
2. The complicated route,extract the system files of a firmware file from 23.5.A.1.291,find folder Radio3 and copy it to your device.
Hope that will clear some things up!
Click to expand...
Click to collapse
Thanks for the reply, but what you're saying doesn't match with what I'm observing.
1st, I don't find any odex files inside the lib folders, what I *do* see is symlinks inside oat/arm/ (for each system app) which point to ../../../odex.app/APPNAME.odex.
2nd, I have already done what you're calling the "complicated route", I extracted the system.ext4 from 23.A.1.5.291 and I mounted it and looked inside app/Radio3, but I don't see any lib/ directory there.
So, if you look at the error message I posted, you'll see that something is providing paths for libraries /vendor/lib, /system/lib, and /system/app/Radio3/lib. Well, I do see libradio...so in /system/lib, but I suppose this is a shared object for the cellular radio for the phone, not the FM Radio. Since /system/app/Radio3/lib doesn't exist, I wonder if it *should* exist. Like I said, I don't see any such folder in the firmware system partition that I extracted, but I supposed that it was also possible that something else was part of the install process that I'm missing. I'm basically looking for a sanity check here. Can someone who's running this firmware please tell me what you see inside /system/lib/Radio3. Pretty please?
In terms of your solution 1, it's not feasible for me since I spent a lot of time removing bloatware from my system partition (a lot of google apps, a lot of sony apps and other stuff that I don't want and don't use), so I don't want to reflash the whole partition and have to go back through and remove all that stuff again.
Surely someone on this forum is running 23.5.A.1.291 and can just tell me what you see in /system/app/Radio3. Puh-leez.
------------
EDIT: maybe when you say "it will have it's lib folder with its odex file inside it" you mean that instead of Radio3/oat/arm/Radio3.odex that I should have Radio3/lib/oat/arm/Radio3.odex? If so, that would be curious since it's not the same structure I see in the other apps in the /system dir and it's not what I see in the system partition I extracted, but I can try it. However, what would be really helpful is if someone running this firmware can confirm the file structure on their device.
apexofservice said:
Thanks for the reply, but what you're saying doesn't match with what I'm observing.
1st, I don't find any odex files inside the lib folders, what I *do* see is symlinks inside oat/arm/ (for each system app) which point to ../../../odex.app/APPNAME.odex.
2nd, I have already done what you're calling the "complicated route", I extracted the system.ext4 from 23.A.1.5.291 and I mounted it and looked inside app/Radio3, but I don't see any lib/ directory there.
So, if you look at the error message I posted, you'll see that something is providing paths for libraries /vendor/lib, /system/lib, and /system/app/Radio3/lib. Well, I do see libradio...so in /system/lib, but I suppose this is a shared object for the cellular radio for the phone, not the FM Radio. Since /system/app/Radio3/lib doesn't exist, I wonder if it *should* exist. Like I said, I don't see any such folder in the firmware system partition that I extracted, but I supposed that it was also possible that something else was part of the install process that I'm missing. I'm basically looking for a sanity check here. Can someone who's running this firmware please tell me what you see inside /system/lib/Radio3. Pretty please?
In terms of your solution 1, it's not feasible for me since I spent a lot of time removing bloatware from my system partition (a lot of google apps, a lot of sony apps and other stuff that I don't want and don't use), so I don't want to reflash the whole partition and have to go back through and remove all that stuff again.
Surely someone on this forum is running 23.5.A.1.291 and can just tell me what you see in /system/app/Radio3. Puh-leez.
------------
EDIT: maybe when you say "it will have it's lib folder with its odex file inside it" you mean that instead of Radio3/oat/arm/Radio3.odex that I should have Radio3/lib/oat/arm/Radio3.odex? If so, that would be curious since it's not the same structure I see in the other apps in the /system dir and it's not what I see in the system partition I extracted, but I can try it. However, what would be really helpful is if someone running this firmware can confirm the file structure on their device.
Click to expand...
Click to collapse
I don't have the lib folder there,only the apk,but not sure if there is a difference between SLiMM ROM and the stock firmware.
If you want I can send you my Radio3.apk and you can try that
Dinkec27 said:
I don't have the lib folder there,only the apk,but not sure if there is a difference between SLiMM ROM and the stock firmware.
If you want I can send you my Radio3.apk and you can try that
Click to expand...
Click to collapse
Thanks so much for checking. To me, this suggests that perhaps I have the permissions wrong (or something along those lines). I'm wondering if that's supposed to be a regular link to the odex file instead of a symlink. I'd be happy to check out your Radio3.apk to see if its any different than the one I've got. I'll just diff it first.
apexofservice said:
Thanks so much for checking. To me, this suggests that perhaps I have the permissions wrong (or something along those lines). I'm wondering if that's supposed to be a regular link to the odex file instead of a symlink. I'd be happy to check out your Radio3.apk to see if its any different than the one I've got. I'll just diff it first.
Click to expand...
Click to collapse
And it's solved! I double-checked the permissions on the oat/arm dirs I had made and they were at 744 instead of 755, changed that and now I'm working.
Cheers

Categories

Resources