windows phone sqlite - Windows Phone 7

hi
it works great but after i have made the changes these changes are not shown in file? as long as app is running on emulator it has all those changes but when i open original file it is still same why? how can i save those changes in original file

hamzamanzoor said:
hi
it works great but after i have made the changes these changes are not shown in file? as long as app is running on emulator it has all those changes but when i open original file it is still same why? how can i save those changes in original file
Click to expand...
Click to collapse
It seems the file attribute only can read.
I used sharp-sqlite in my project, but my database have more than 20,000 data,4 fields, need 10 second in my project. At last, I rewrite all the storage, using txt, it seems very fast than before. About 0.2 seconds.

Related

How can I change the package name?

Hi everybody, I'm trying to make a soundboard to put on the android market. I downloaded a soundboard template from http://myandroidsoundboard.com/, and it works great except I don't know how to successfully change the package name from "com.soundboard" to something else without making the project go all "error" crazy.
I click the package name in the the package explorer and click refactor and I change the package name, but then everything becomes an error because the package name is now different. How can I change the package name successfully so I don't get errors everywhere?
Thank you.
You don't need to change package name of Java classes. You must change package name stored in AndroidManifest.xml and maybe some other files.
Brut.all said:
You don't need to change package name of Java classes. You must change package name stored in AndroidManifest.xml and maybe some other files.
Click to expand...
Click to collapse
I've gone through the android manifest file and I've changed everything there, but do you know what other files might need some changing? The only errors I see are coming from anything with the "R" next to it.
PrestoMovie said:
I've gone through the android manifest file and I've changed everything there, but do you know what other files might need some changing? The only errors I see are coming from anything with the "R" next to it.
Click to expand...
Click to collapse
I think it may be caused by the fact that after changing package name R.java file is generated in different Java package, but app code references original one. I see several ways, how to fix this: you could alter ant building process, use some refactoring tools to modify all references to R class or manually move generated R.java to proper place (and modify package declaration in it).
If you know, what I'm talking, then good. If you don't then it probably does not have sense to explain it further - it will take several pages of posting until you will get it.
Brut.all said:
I think it may be caused by the fact that after changing package name R.java file is generated in different Java package, but app code references original one. I see several ways, how to fix this: you could alter ant building process, use some refactoring tools to modify all references to R class or manually move generated R.java to proper place (and modify package declaration in it).
If you know, what I'm talking, then good. If you don't then it probably does not have sense to explain it further - it will take several pages of posting until you will get it.
Click to expand...
Click to collapse
which way would you say is this easiest? And would you be able to point me in the direction of a link that explains any of them well?
For what it's worth - archival value & others reading this thread now - a link to such info would be appreciated
PrestoMovie said:
which way would you say is this easiest? And would you be able to point me in the direction of a link that explains any of them well?
Click to expand...
Click to collapse
Ok, actually this can be done very simply ;-)
I think the best solution is to refactor code. Do you use some good IDE? Eclipse, Netbeans? If so you could use their refactoring tools, but it is also doable by simple find/replace. Just replace all occurrences of "import old.package.name.R;" in all *.java files by "import new.package.name.R;".
These are basics of Java/Android developing: if you know them, then you should have no problems
Brut.all said:
Ok, actually this can be done very simply ;-)
I think the best solution is to refactor code. Do you use some good IDE? Eclipse, Netbeans? If so you could use their refactoring tools, but it is also doable by simple find/replace. Just replace all occurrences of "import old.package.name.R;" in all *.java files by "import new.package.name.R;".
These are basics of Java/Android developing: if you know them, then you should have no problems
Click to expand...
Click to collapse
I'm using Eclipse. And thank you! Hopefully I can get it working now!
K, for some reason I'm only getting one error now in the androidmanifest.xml and it says "class com.soundboard.SoundBoard doesn't exist", but com.soundboard is no longer the package name.
bump bump bump.
bump.
I'm having the same problems. I've been able to create working .apk's but need to share it in the market and the market won't let me if the package name is the same thanks.
agentkalaw said:
bump.
I'm having the same problems. I've been able to create working .apk's but need to share it in the market and the market won't let me if the package name is the same thanks.
Click to expand...
Click to collapse
Advanced tasks require some knowledge. You must know, what is Android's package name and then changing it will be really easy thing to do.
Ahh and there is new "--rename-manifest-package" switch in newest aapt tool. I didn't test it, but it's official Android tool, so this should work.
PrestoMovie said:
K, for some reason I'm only getting one error now in the androidmanifest.xml and it says "class com.soundboard.SoundBoard doesn't exist", but com.soundboard is no longer the package name.
Click to expand...
Click to collapse
thanks for the help! I was actually able to change the package name and I'm having the exact same problem as the OP ^. I basically just need to edit the androidmanifest.xml file and i should be all set I tried searching on how to edit it after changing package names but no luck. any ideas? how do i edit androidmanifest.xml files to recognize the package name change? thanks again
Its been a long time since this post, but if it helps someone:
Issue: You have a source, you want to build 2 different apks from the same source, and be able to install both in the same device at the same time.
General Solution: Use a refactoring tool, like in eclipse, and rename all package names.
Better Solution: use aapt flag --rename-manifest-package. This does not require you change even a single line in the original source. Just this flag, and pass in a different package name, and whoa, you have a new apk with the different package name. I used it as follows, in the Android.mk:
LOCAL_AAPT_FLAGS := --rename-manifest-package new.package.name
Click to expand...
Click to collapse
Cheers

Firefox download folder location

I can't seem to locate the directory folder that the new firefox app downloads to. anyone?
Nevermind, it goes right to the sdcard, no folder. I didn't see the files because the downloads failed...
can't seem to get the download folder to change.
I went into:
about:config
created a new string: browser.download.dir
set the value to: /mnt/extSdCard/Downloads/
Restarted Firefox
But still the downloads go into the sdcard/downloads
I've also tried:
/extSdCard/Downloads/
/sdcard/
/extSdCard/
/mnt/sdcard
none of these have any effect.
Any ideas?
Bump:beer:
Sent from my SGH-I747M using Tapatalk 2
Im also looking for changing my dl directory. It have work once for me when modifying the "browser.download.folderList" after creating the browser.download.dir string. But after reboot of firefox the next dl will go back again to the sdcard.
Wonder if anyone else could tell how to do it
creating a new string is a good step for changing your dl directory. But you should also add this step to make it work.
Modify the value of "browser.download.folderList" from 1 to 2
Thats it!!
Click to expand...
Click to collapse
When editing your old posts, try not to delete the original information that could have been useful to others.
People won't have known what value to put into the string.
Sent from my SGH-I747M using Tapatalk 2
I hate managing folders so now I use directory bind which allows me to bind two folders together. Basically you create another downloads folder on your external sd card and use directory bind to "bind" them. Checkbox to transfer contents and your downloads (source) folder will be dumped into the empty folder you've created automatically (destination must be empty when checking the box). When altering files in either downloads folder, the changes appear in both. When you look at storage, the original source folder is not calculated into your used internal storage amount even though every other app sees files in there (since that would defeat the purpose). I use it for my downloads, camera and several apps and game folders not designed to be pushed to SD. Instead of continuously resetting app download destinations, I sit back and relax knowing every app downloads to the proper place (minus the rogues who think they deserve their own folder lol). When flashing a new ROM, simply unbind everything first and disable autostart, backup with titanium backup, after restore, you should be good (depending on your new version of android in which case you may need to adjust some settings). If setting up from scratch again, assuming your working folder structure is still in tact, you can bind again without ticking the box (since the files are in their proper place and a transfer is no longer necessary).
You can get it here, it looks like it hasn't been updated in a while, but I've tested it from Android 4.0 through 4.2.2 and it's perfect (settings adjustments will likely be required): http://forum.xda-developers.com/showthread.php?t=1410262
Hi everyone, was a solution found to that still issue? I tried to move the default download folder to the ext SD card with settings into about:config, I changed as well the "browser.download.folderList" value to 2 and add a "browser.download.defaultFolder" string, but everything failed, please does someone know what to do? Or is there another setting menu or mod/Exposed module to achieve this..?
Thanks in advance for the help!
May I Taste said:
Hi everyone, was a solution found to that still issue? I tried to move the default download folder to the ext SD card with settings into about:config, I changed as well the "browser.download.folderList" value to 2 and add a "browser.download.defaultFolder" string, but everything failed, please does someone know what to do? Or is there another setting menu or mod/Exposed module to achieve this..?
Thanks in advance for the help!
Click to expand...
Click to collapse
Use this config (I am assuming you're on 4.4 and have used SDFixer)
SeraphSephiroth said:
Use this config (I am assuming you're on 4.4 and have used SDFixer)
Click to expand...
Click to collapse
Hi, thanks for your help, but it still don't work for me. What I don't understand is that the path can be whether
/storage/sdcard1/Download
or
/ext_card/Download
Maybe you know why? I'm running CM11 nightlies (4.4.4) on Xperia Z2
May I Taste said:
Hi, thanks for your help, but it still don't work for me. What I don't understand is that the path can be whether
/storage/sdcard1/Download
or
/ext_card/Download
Maybe you know why? I'm running CM11 nightlies (4.4.4) on Xperia Z2
Click to expand...
Click to collapse
With a r/w sd? Use a root explorer to find the path to the r/w sd
I'm very busy and sorry not to say anything for long but thank you much for your answer and help.
My path is correctly pointing the SD, I checked carefully the settings and got no success. Then suddenly Firefox began to write on ext sd, but still this is only sometimes! I tried to see if the files type or size had something to do with that behavior but it seems to be just erratic..
It actually seems that it's the "Flash Video Downloader" module who sends files into the internal storage regardless of the browser settings..

[Q] 2.1 Bootanimation

Has anyone figured out how to change the boot animation?
It seems it's stored in /system/media/bootanimation.zip
I tried replacing the .PNG images inside the archive and that didn't work, although I might have messed up something. I'm just glad to be rid of that dreadful SE color splash until someone else finds a solution.
finished playing with this a little while ago... when you replace the files you must use no compression, ie store. i've attached one with the android robot waving (cropped from nexus) simple, but at least the splash is gone
toreador514 said:
finished playing with this a little while ago... when you replace the files you must use no compression, ie store. i've attached one with the android robot waving (cropped from nexus) simple, but at least the splash is gone
Click to expand...
Click to collapse
Thanks for this! Looks so sweet!!
strange... I replaced one frame to see if it changed and saw nothing ( i put a big red X across one image ). I did use no compression ( kept the zip open in winrar and saved )
will try again!
morning_wood said:
strange... I replaced one frame to see if it changed and saw nothing ( i put a big red X across one image ). I did use no compression ( kept the zip open in winrar and saved )
will try again!
Click to expand...
Click to collapse
i finally found it for sure...from the zip above extract them all put your images in an then add in a zip file all of them again but you have to rename it as bootanimation.zip and you have to choose at winrar compression method store...its final and you can put anything you want...
Thank you for helping me sort this out.
Here's GLa’DOS "Android Scribble" animation for the x10 mini.
Apparently anim2 lasts a couple of seconds, and anim3 last the longest.
I lost my first x10 mini, so I added a name and telephone number for my animation after posting (and a lock screen for the phone).
if anyone want me to make any anime feel free...
here is my first one and of course greek...
http://i47.photobucket.com/albums/f172/enormous101/Untitled.gif
http://i47.photobucket.com/albums/f172/enormous101/Untitled1.gif
http://www.mediafire.com/?abm54nd13pocn1d
Noice one peeps.
Simplified it a bit down to one folder now though.
Got mine working now (needs 24bit png)
Sent from my E10i using XDA App
Hi Guys.
I've been trying to change the bootanimation, but as
I'm a little slow to understand, I have no doubt
to decompress it and stuff.
Who can explain me the luxuries of details please?
It would be a great help ...
FreddyStark said:
Hi Guys.
I've been trying to change the bootanimation, but as
I'm a little slow to understand, I have no doubt
to decompress it and stuff.
Who can explain me the luxuries of details please?
It would be a great help ...
Click to expand...
Click to collapse
1 root your phone
2 download rootexplorer(<---and install it) & any bootanimation.zip you want
3 open rootexplorer and go to your sdcard hold down your finger and choose copy
4 then go to system/media
5 at the upper of your root explorer its a button that says mount r/w make it says by pushing it mount r/o
6 push the button paste and then when it says ovewrite push yes
7 reboot and you r ready!!!!
if i make it a single file you will not have the option when the first animation is over the second to be anime it will be a still picture if you want that just leave one image in the second folder..because it have 2 phases of animation..!!!!(if you remember first when the colours where mixing and then the still image with sony ericsson logo and letters)
I've been trying to edit the desc.txt file so I can have a little more flexibility but even if I save it without making any changes it stops working.
After a look around the interwebs someone mentioned saving in the UNIX format, so I used Notepad ++ in UNIX and tried editing/saving in that but there's still problems, sometimes it doesn't work at all and sometimes it only shows the first folder.
Also, are there any limitations as to framerate and how many files can go in the part0/part1 folders (revision of enormous101's bootanimation.zip).
Finally, is it ok to add a part2?
do not use compression - use Winrar and select "store"
Mitchio said:
I've been trying to edit the desc.txt file so I can have a little more flexibility but even if I save it without making any changes it stops working.
After a look around the interwebs someone mentioned saving in the UNIX format, so I used Notepad ++ in UNIX and tried editing/saving in that but there's still problems, sometimes it doesn't work at all and sometimes it only shows the first folder.
Also, are there any limitations as to framerate and how many files can go in the part0/part1 folders (revision of enormous101's bootanimation.zip).
Finally, is it ok to add a part2?
Click to expand...
Click to collapse
as i mentioned part 2 is when the bootanimation of sony ericsson stays frozen you can add anything you want and its safe to play with part two.. no limitation except your internal storage!!!!what exactly are you trying to do with desc?may i help you?if you find my preview posts at the first page you will find to download the bootanimation.zip with two parts so unzip it and when you add your images zip it with winrar at store compression mode...
morning_wood said:
do not use compression - use Winrar and select "store"
Click to expand...
Click to collapse
Already doing that.
Maybe a stupid idea, but... has anyone tried to use transparent images?
I want to watch the kernel booting
edit: Forget this.
Nice thread!
I was wondering about the desc.txt file. I am using the Rogers 2.1 firmware and I want to remove the Rogers screen that shows up just before desktop loads. The PNG file for the Rogers screen is located in Anim5 and I was wondering if I just removed the entry for anim5 in the desc file, would that do the trick? I've already moved the original bootanimation.zip file onto my computer so it is backed up but I was just wondering if this would work. I am using a X10 but it seems like the file system is the same which is why I'm asking here. Any help would be appreciated!
hope helped
JDwan said:
Nice thread!
I was wondering about the desc.txt file. I am using the Rogers 2.1 firmware and I want to remove the Rogers screen that shows up just before desktop loads. The PNG file for the Rogers screen is located in Anim5 and I was wondering if I just removed the entry for anim5 in the desc file, would that do the trick? I've already moved the original bootanimation.zip file onto my computer so it is backed up but I was just wondering if this would work. I am using a X10 but it seems like the file system is the same which is why I'm asking here. Any help would be appreciated!
Click to expand...
Click to collapse
if you dont know how to change desc.txt then dont...unzip the bootanimation.zip change the images inside anim5 folder and then zip it but at compression mode use ''store'' instead of everything else and just put it in your phone...i cant change your desc.txt and make it into two folders because i dont own x10...
enormous101 said:
if you dont know how to change desc.txt then dont...unzip the bootanimation.zip change the images inside anim5 folder and then zip it but at compression mode use ''store'' instead of everything else and just put it in your phone...i cant change your desc.txt and make it into two folders because i dont own x10...
Click to expand...
Click to collapse
Thanks for your response! From what I've been reading, it seems that if I remove the entry for anim5 in the desc.txt, that it won't load that animation. It just seems easier to do this than to replace the image in that folder. Though the problem would then be making changes to a UNIX based txt file using a Windows OS and then the phone not recognizing the desc.txt file based on it being in the wrong format.
Anyway, I suppose I could just copy over the last image in anim4 and replace the one in anim5 with that and that would be the easier solution (as per your suggestion).
Here is the thread I was reading where it describes the desc.txt file and how to modify your boot animation.
http://www.droidforums.net/forum/droid-hacks/33932-bootanimation-zip-file-explained.html

[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 !

Change version number in apk

I own a BB Playbook tablet for about a year now (bought it during the when it was about 200$ because I needed a 7'', the hardware was specs were nice at the time and the company promised Android app support). Regardless of the sanity of my decision the device saves me about 2 hours per day (I use it mainly to read pdf and build an xls database).
I've converted many apk to bar in order to sideload them to my device (not all of these work). Recently I tried Firefox on my Xperia mobile and was quite pleased with the ABP plugin So I tried to convert the apk but both the apk2bar and the Blackberry Graphical Aid Tool complain that the version number is too long...
Anyone knows how to shorten it? In what file is it located? Or anyone up for the task.
Keep in mind I'm not a dev.
Thanks in advance
android:versionName is what you need to change.
Thanks for the reply.
Tried the apps from your sig. I managed to edit AndroidManifest.xml. Recompiling (after the changes) doesn't seem to work (the result apk is much smaller... many files/folders from the original FF apk were not in the project folder or compiled apk).
Tried unpacking + zip + sign but this last step is failing. Wanam APK suite keeps giving an error message. My box runs Win7 x64 and at first I only had Java RE x86 7.10... it didn't find Java in my machine and stated signing would not work; after I installed the x64 it gives no preemptive messgae and I progress further but the signing process fails
frmariam said:
Thanks for the reply.
Tried the apps from your sig. I managed to edit AndroidManifest.xml. Recompiling (after the changes) doesn't seem to work (the result apk is much smaller... many files/folders from the original FF apk were not in the project folder or compiled apk).
Click to expand...
Click to collapse
Hi.
Look at the files in the apk before decompiling it and you'll see that all those files and folders aren't there to begin with. All those files and folders are from the decompiled resources.arsc so it's normal for them not to be there when recompiled, and when you add the resources.arsc, manifest and meta folder from the original apk to the recompiled apk, it will become larger.
I noticed yesterday I had put an old apktool in the folder but have corrected it now so download and try again.
I was attempting to do the same so I decompiled and edited the android:versionName and the android:versionCode . After doing that, recompiling and resigning I was able to convert using apktobar and load to the playbook with no issues......except the app opens to an all white page and nothing beyond that will work! Just to be clear I was attempting to convert Firefox as well. Hope someone has some helpful hints that could fix it!

Categories

Resources