[Q] question about update.zip file - Galaxy S II Q&A, Help & Troubleshooting

hello there,
i have a GT-I9100 phone best known as the Galaxy S II International, and i'm very fond of messing around with the custom firmwares and stuff. i like to test every nightly that comes out from CyanogenMod, so i'm almost always installing new firmwares, and i'd like to carry on some small updates that i do to each firmware.
however, there is a problem. an update.zip would be useful for static files such as replacing the bootanimation.zip and adding the init.d scripts i want. however, i also like to edit the build.prop files, that are changed each nightly, to show the correct date and other minimum details.
following that, i'd like to know if there's a way to not replace the build.prop file, but just edit/add some lines into it through some script that could go inside the update.zip.
thank you.

Related

[Q] Missing files for deodexing stock ROM?

So i started to look around for a new ROM when i saw that stock defaults are odexed, Which means i cannot apply the standard RTL framework fixes i usually did before on other phones. These are critical for me.
I looked around and found no stock deodexed ROMs, only modified ones with a lot of modifications i didn't need. So i decided to try and deodex the stock one myself.
I took the same version i have on the device (XWKE7) and tried deodexing the framework folder odex files with baksmali.
However, I cannot get a couple of them to work no matter what. They keep complaining about a missing TestCase superclass.
I've googled around and found that that resides in android.jar from the SDK, so i took that, But i can't get baksmali to recognize it. If i include it in the boot class path that it looks for, It always says it cannot locate the path i give it, even if its in the same directory.
Can anyone who deodexed this version before offer some help?
Was missing core-junit.jar in the boot classes path. I was pretty sure i included it before (thought it was part of the default path), but oh well.
I'll leave the thread be for now, might help others.

[Q] (Solved?) Change DEFAULT Homepage on Cooked Rom

Ok, got a bit of a problem here... I need to change the default homepage of the browser in a Rom I'm cooking... that means the homepage you get after a full factory reset, not that you set in the menu.... Please don't tell me how to set it in the browser menu....
A bit of background... I'm using a leaked Rom to build from. It was leaked from a Tracfone "LG-L95G" which is identical in every way to the LG-P999 aka T-Mobile G2X. Everything is working 100%. The only problem left from the "porting" is removing Tracfone as the default browser homepage.
This has turned out to be harder than I expected.
What I have done:
Browser.apk - the xml lists Google as the homepage. The word "tracfone" appears NOWHERE in the entire structure of the decompiled xml or values or even in the smali code.
SystemUI & framework-res - I've seen suggestions the homepage hides here. Can't find anything suggesting a setting to "tracfone"
flexdb - I really thought I had it kicked here. /system/etc/flex.db listed m.tracfone.com as the homepage for T-Mobile US. I changed all occurrences here to about:blank. I have also tried simply copying the flex.db from a P999 itself. Ie, removed ALL references to tracfone service and made it identical to a P999 in every way.
Ran grep -R tracfone * on the entire ROM.
Dug through tons of files by hand looking for any clue.
Unfortunately, even with all of that, do a wipe, open the browser, and you GET M.TRACFONE.COM again!
The word "tracfone" does not appear in build.prop, it does not appear in any init scripts, not even in the kernel scripts! Yet it comes back like Christine...
Does anyone have a clue where I could look next? Or failing that, even some way from an init.d script that I can overwrite the setting myself?
EDIT
Okay, I hate giving myself clues like this, but maybe this will help others (if I'm on the right track)...
Instead of doing a grep on the ROM from my PC, pre-install, I decided to actually hit up the RUNNING copy... so from adb into a Bash prompt on the phone itself, I ran a grep -r tracfone * and got the following result:
Code:
data/data/com.android.browser/databases/browser.db:Web page not availablehttp://m.tracfone.com/
data/data/com.android.browser/shared_prefs/com.android.browser_preferences.xml:<string name="homepage">http://m.tracfone.com</string>
data/data/com.lge.providers.flex/databases/flex.db:M77BRW_SETTINGDB_CURRENT_HOME_URL_Ihttp://m.tracfone.comhttp://m.tracfone.comI#
data/data/com.lge.providers.flex/databases/flex.db:=77BRW_SETTINGDB_HOME_URL_Ihttp://m.tracfone.comhttp://m.tracfone.como"
data/data/com.lge.providers.flex/databases/flex.db:=;;DATACOM_ACCOUNT_MMSC_0_Ihttp://mms.tracfone.comhttp://[email protected]
data/data/com.lge.providers.flex/databases/flex.db:;%%DATACOM_ACCOUNT_APN_0_Iwap.tracfonewap.tracfone:?
data/data/com.lge.providers.flex/databases/flex.db:M77BRW_SETTINGDB_CURRENT_HOME_URL_Ihttp://m.tracfone.comhttp://m.tracfone.comI
data/data/com.lge.providers.flex/databases/flex.db:=77BRW_SETTINGDB_HOME_URL_Ihttp://m.tracfone.comhttp://m.tracfone.como
data/data/com.lge.providers.flex/databases/flex.db:=;;DATACOM_ACCOUNT_MMSC_0_Ihttp://mms.tracfone.comhttp://mms.tracfone.com6%
data/data/com.lge.providers.flex/databases/flex.db:;%%DATACOM_ACCOUNT_APN_0_Iwap.tracfonewap.tracfone:$
Which is very odd.... considering that is NOT the content of the actual flex.db that was flashed to the phone. That leads to 1 question: Why isn't the phone respecting the flex.db? I've noticed other edits to the file (such as bookmarks) do not apply either. So it is being ignored at somepoint. FlexProvider.apk maybe? Or is something in the ROM still identifying the phone to T-Mobile as an MVNO device and they're pushing out an OTA flex update?
EDIT 2:
AHA! There's a flex.db *INSIDE* the FlexProvider.apk file! So it *IS* ignoring the one placed in /system/etc/flex/! Editing this should solve it - but I'm going to test test test to make sure.
lotherius said:
Ok, got a bit of a problem here... I need to change the default homepage of the browser in a Rom I'm cooking... that means the homepage you get after a full factory reset, not that you set in the menu.... Please don't tell me how to set it in the browser menu....
Click to expand...
Click to collapse
firstly to say interesting question!!
but I think it it not possible to change programmatically default homepage
this is a system app so will be signed by your provider let us suppose you find homepage location in code (could by result of a script parsing) by modifying source of that apk package how to solve signature problem ?!
if in .db file ...this file is created after flashing as a result of script parsing
not framework-res.apk better browser-res.apk if you have one
ruscan.calin said:
firstly to say interesting question!!
but I think it it not possible to change programmatically default homepage
this is a system app so will be signed by your provider let us suppose you find homepage location in code (could by result of a script parsing) by modifying source of that apk package how to solve signature problem ?!
if in .db file ...this file is created after flashing as a result of script parsing
not framework-res.apk better browser-res.apk if you have one
Click to expand...
Click to collapse
man use a ... editor...I can show you for fifty bucks
I was just curious about this tricky change (from your post) so thinking about Google motto don't be bad finally I have found but should recognize that I am bad at this time
here is solution
Actually, you can use an sqlite editor to change the values in the flex.db file... the problem I was having in the OP is that on an LG phone (maybe others?) the flex.db file is ignored and the one inside FlexProvider is used instead, so you have to edit both. You can add new locales the same way. No need to use a hex editor, as that would be much more difficult.
lotherius said:
Actually, you can use an sqlite editor to change the values in the flex.db file... the problem I was having in the OP is that on an LG phone (maybe others?) the flex.db file is ignored and the one inside FlexProvider is used instead, so you have to edit both. You can add new locales the same way. No need to use a hex editor, as that would be much more difficult.
Click to expand...
Click to collapse
maybe you are right regarding your phone... but also I prepare a custom rom for Alcatel ot-908 also to change default homepage was a problem for me but I did and simply works !

[Q] question on removing a2sd scripts

Thanks to the limits on new accounts, I cant post this in the relevant thread, so...
I recently used http://forum.xda-developers.com/showthread.php?t=1716124&page=73 on a new rom flash for the admire.
I found I had no gps, so I reflashed my phone then installed the gps fix script. Seemed like it worked, so I went about spending 6 hours tweaking my phone over the day.
Gps is gone again - not sure if maybe cell phone tower setting was turned on in locations tab and maybe got apps to work without it, but whatever the reason this script doesnt work for me.
The thread states that to flash one of the scripts in that doesnt have a gos issue, i need to uninstall the prior script.
How do I go about that without flashing my phone again and losing tons of work?
Do I have to look at the script and manually go in and delete every file it created and unalter every script it changed then reflash the new script?
Help?
Asking in your devices forum could be better.
But in general, yes, take a look at the zip you flashed. Inside META-INF/com/google/android you'll find an updater-script file that can be opened as text and tells you where everything inside the zip got flashed to.
Generally, scripts that run at boot get flashed to system/etc/init.d
Use a root explorer to locate the init.d address, or the name of the files that you saw inside the zip.

[Q] Wifi Problem with Korean Tab (SHW-M380W) after 7510 conversion

Hi Everyone!
I'm posting this here since I don't have posting privileges in the development area.
I have converted my Korean Galaxy Tab 10.1 as explained in the development section in this thread:
http://forum.xda-developers.com/showthread.php?t=1360588&page=5
to a 7510.
Everything worked fine.
Just one tiny problem I am experiencing:
My Wifi reception has greatly decreased after the conversion.
I noticed this imediately after the conversion but hoped it would "go away" once I had rooted the Tab an installed a modded ROM.
Unfortunately this was not the case.
Does anyone of you other "converters" have any experience with this problem or am I the only one?
best regards an looking forward to your answers
Krügge
Happy new year to everyone!
Well, since noone seems to have my problem I looked into the files myself.
The wifi drivers and their configuration files are located in /etc/wifi of the system image.
I flashed the korean shw-m380w original version and did a backup using CWM. I then did the same with the original gt-p7510 version.
When I compared the filesizes I noticed differences and the content of the configuration files were different as well.
So I just replaced the contents of the european wifi folder with the contents of the korean one. I had to use a linux shell, since the file permissions need to be saved.
I copied the newly created system tar file into the CWM backup directory of the european version, adapted the the md5 hash in the same directory for the new system tar file and went into CWM and did a restore.
Worked like charm. I'm back to my old, much better, wifi reception performance.
I don't know if this is the fastest an easiest method but it worked....
best regards
kruegge99
kruegge99 said:
Happy new year to everyone!
Well, since noone seems to have my problem I looked into the files myself.
The wifi drivers and their configuration files are located in /etc/wifi of the system image.
I flashed the korean shw-m380w original version and did a backup using CWM. I then did the same with the original gt-p7510 version.
When I compared the filesizes I noticed differences and the content of the configuration files were different as well.
So I just replaced the contents of the european wifi folder with the contents of the korean one. I had to use a linux shell, since the file permissions need to be saved.
I copied the newly created system tar file into the CWM backup directory of the european version, adapted the the md5 hash in the same directory for the new system tar file and went into CWM and did a restore.
Worked like charm. I'm back to my old, much better, wifi reception performance.
I don't know if this is the fastest an easiest method but it worked....
best regards
kruegge99
Click to expand...
Click to collapse
i have same problem with you. can you please explain to me step by step how to fix the wifi like you did?
Hi Everyone!
I have done some more experimenting.
Since I wanted to install different Android Versions and different Kernels and the fact that the Kernel Drivers are always compiled to work with only one particualer Kernel, I needed to find a way to improve Wifi reception without having the korean drivers.
I acomplished this by just pasting the config file nvram_net.txt from the korean Android into the directory /system/etc/wifi.
I renamed the original file to nvram_net.txt.orig and pasted, Afterwards I adjusted the permissions to be the same as the ones of the original file and rebooted.
This has worked with every Android Version I installed so far.
I have attached a Screenshot of the directory and the nvram_net.txt file of the korean tab.
I hope I can help somone with this.
To me it seems that the korean tab has just a slightly different Wifi Hardware than the P7510.
best regards
Krügge

[Q] Modifying smilies in LatinImeGoogle.apk

I've seen previously that you can modify 'more_keys_for_smiley' in LatinIME.apk to modify the predefined smilies in the keyboard ( http://forum.xda-developers.com/showthread.php?p=23362533 ).
I'm trying to do this for LatinImeGoogle.apk.
I've got it decompiled with apktool, but I can't seem to find where 'more_keys_for_smiley' is defined to change it. The only reference to it inside of that apk is in key_styles_common.xml where it has:
<key-style latin:moreKeys="!text/more_keys_for_smiley" latin:backgroundType="functional" latin:keyOutputText=" " latin:keyLabel="" latin:keyLabelFlags="hasPopupHint" latin:styleName="enterKeyStyle" />
Can anyone help me locate more_keys_for_smiley so I can modify it? Does the "!text" refer to a different package?
Thanks in advance for any help.
Ok, thanks to someone's help I was able to figure out that the string is now located in the odex file for the keyboard. I was able to deodex LatinImeGoogle.odex using baksmali and edited the file com/android/inputmethod/keyboard/internal/KeyboardTextsSet.smali. I then used smali to recreate the odex file, but pushing it to my device and rebooting causes the keyboard to not load. Do I need to do anything special with this new odex file?
I tried following tutorials ( http://forum.xda-developers.com/showthread.php?t=1208320 ) and using automatic batch scripts ( http://forum.xda-developers.com/showthread.php?p=31360029 ) for recreating the new odex file and copying the signature from the old one, but I could not get it to work. At best I got the keyboard to load and instantly crash, at worst it wouldn't even load the keyboard upon boot.
Anyone want to offer some advice or take a stab at this?
Seems like your doing exactly what i'm trying to accomplish, and had success, so i'm gonna ask a couple questions, but first some background info.
I'm using a (Verizon) Galaxy Nexus, CM10.1 Clockwork Recovery, GAPPS. (no custom Kernels, etc)
I'm a windows guy, definitely a noob to linux, i'm comfortable following the more complicated instructionals, but traveling off the beaten path is difficult for me.
I was able to use apktool tool to decompile Latinime.apk, and i found KeyboardTextsSet.smali, and the smileys i want modified.
Is it as simple as recompiling and installing it? (remove/uninstall keyboard via TitaniumBackup first?)
You refer to a LatinImeGoogle.odex, is this only relevant to someone using an odexed rom?
I appreciate greatly any assistance you are able to provide!:good:
PrettyPistol555 said:
Seems like your doing exactly what i'm trying to accomplish, and had success, so i'm gonna ask a couple questions, but first some background info.
I'm using a (Verizon) Galaxy Nexus, CM10.1 Clockwork Recovery, GAPPS. (no custom Kernels, etc)
I'm a windows guy, definitely a noob to linux, i'm comfortable following the more complicated instructionals, but traveling off the beaten path is difficult for me.
I was able to use apktool tool to decompile Latinime.apk, and i found KeyboardTextsSet.smali, and the smileys i want modified.
Is it as simple as recompiling and installing it? (remove/uninstall keyboard via TitaniumBackup first?)
You refer to a LatinImeGoogle.odex, is this only relevant to someone using an odexed rom?
I appreciate greatly any assistance you are able to provide!:good:
Click to expand...
Click to collapse
Yes, you should be able to modify KeyboardTextsSet.smali and then recompile and install the keyboard. I never achieved any success because I'm on an odexed ROM and couldn't get reodexing to work properly.
Tried but no joy, then realized it could be because the apk was from a previous nightly (couple days) than the one currently installed. Crossing my fingers that it's the reason it didn't work.
I'll try again.
sent from my vzw Galaxy Nexus / CM10.1 (nightlies)

Categories

Resources