Formatting your phone book to work with facebook sync - Windows Mobile Apps and Games

In the spirit of xmas, i figured i'd try & contribute something to the community
I just upgraded to the new Energyrom with sense 2.5, and noticed that it will search your facebook for people that match contacts, and give you the option to sync certain info with your phone, ie, pictures.
Problem is, if you're anything like me, your contacts aren't exactly in WinMo-friendly format. Specifically, it'll only sync contacts where the first & last name are in separate fields. Having just imported my contacts from an old phone via sim card to my raphael, this was not the case.
Anyway, here's how to fix it (note that if you do this, it will overwrite any photos you may have on contacts with their facebook photos. The solution to this is to, when your phone asks if you want to link facebook profiles with contacts, deselect the names of people whose pictures you'd like to keep.
Step 1: Sync your contacts with outlook, then go to Contacts in outlook
Step 2: In outlook, go to file->import/export
Step 3: Click Export to a File and click next
Step 4: Click Microsoft Excel 97-2003, click next
Step 5: click contacts, click next
Step 6:Select a destination file and click next until that process is finished
Now open Excel
Step 1: highlight the column with your full names
Step 2: Click the Data tab, click Text to Clumns
Step 3: Click next
Step 4: Deselect all delimiters except Space
Step 5: Click next until finished
This will split off all of your last names into the next column. Do any necessary tidying up by hand until you have two clear columns with first/last name. This might be a good time to remove duplicates, the function right next to the Text to Columns function in the data tab.
Save your excel file.
Now back to Outlook
Step 1: Go to contacts, delete all of your contacts
Step 2: File -> import/export
Step 3: Import from another program or file, click next
Step 4: select Microsoft Excel 97-2003
Step 5: make sure "File to Import" is the file you just finished
Step 6: Your call on duplicates, shouldn't matter. Click through until finished
Okay, now just resynch with your phone.
If your having the problem of all your contacts filed as Last, First, follow these steps:
(note: i didn't write this code, but i forgot at what site i found it, so i'm not giving credit where it's due... if you're curious, just google it)
Step 1: Press alt+f11
Step 2: In projects window, go to ThisOutlookSession
Step 3: Paste the code below
Step 4: Uncomment the strFileAs line that you want to format your contacts as
Step 5: close VB editor
Step 6: Go to tools -> macros -> macros
Step 7: Run your new macro. voila.
Code:
Public Sub ChangeFileAs()
Dim objOL As Outlook.Application
Dim objNS As Outlook.NameSpace
Dim objContact As Outlook.ContactItem
Dim objItems As Outlook.Items
Dim objContactsFolder As Outlook.MAPIFolder
Dim obj As Object
Dim strFirstName As String
Dim strLastName As String
Dim strFileAs As String
On Error Resume Next
Set objOL = CreateObject("Outlook.Application")
Set objNS = objOL.GetNamespace("MAPI")
Set objContactsFolder = objNS.GetDefaultFolder(olFolderContacts)
Set objItems = objContactsFolder.Items
For Each obj In objItems
'Test for contact and not distribution list
If obj.Class = olContact Then
Set objContact = obj
With objContact
' Uncomment the strFileAs line for the desired format
'Lastname, Firstname (Company) format
' strFileAs = .FullNameAndCompany
'Firstname Lastname format
' strFileAs = .FullName
'Lastname, Firstname format
' strFileAs = .LastNameAndFirstName
'Company name only
' strFileAs = .CompanyName
'Companyname (Lastname, Firstname)
' strFileAs = .CompanyAndFullName
.FileAs = strFileAs
.Save
End With
End If
Err.Clear
Next
Set objOL = Nothing
Set objNS = Nothing
Set obj = Nothing
Set objContact = Nothing
Set objItems = Nothing
Set objContactsFolder = Nothing
End Sub

Great POST and clearly layed out.
After reading this I dicided to do this but then found out how terribly I name my contacts, nick names etc.
After I had sorted out all the contacts with there right name and re-synced my contacts back to my phone (you might want to mention this in your first POST) that you will loose any pictures you had associated with the contacts (other than the facebook ones), but this is ok because they will be replaced by the new facebook ones but there are still some people in this world that dont have a Facebook account (cave dwellers etc (Joking)) that I had photo's attached to that are now gone&I dont have a seperate copy (its ok I did backup before I attempted this so I could get them back if I wanted).
After I have sync back I remebered why I never did this before, thats because if you put the names in the right sections then in your contacts on your phone you get the lastname first e.g instead of 'John Smith' you get 'Smith, John' which is a horrible way to view them.
I will continue to find a solution and let you know here if I find an answer.
Thank you again

Install and run this on your PPC and it will convert all your contacts to First, Last format.
Shubaroo Contact Changer

jab1a said:
Great POST and clearly layed out.
(you might want to mention this in your first POST) that you will loose any pictures you had associated with the contacts (other than the facebook ones),
Click to expand...
Click to collapse
Added, thanks
jab1a said:
After I have sync back I remebered why I never did this before, thats because if you put the names in the right sections then in your contacts on your phone you get the lastname first e.g instead of 'John Smith' you get 'Smith, John' which is a horrible way to view them.
Click to expand...
Click to collapse
This is covered by the last portion of my post. If you can convert all contacts to "file as:" in the first last format, they will sync to your phone that way. How it displays is contingent upon a setting in each contact, not your phone or anything. Running that VB macro will convert each contact to the format you're looking for, let me know if you have a problem!

Related

ArcsoftMMS for WM5

Does anyone have try this ArcsoftMMS MMS for magneto BY NCRUZ ON XDA-DEV?
1. Download AMmsC_XDAII_WM2k5 here
http://tofclok.free.fr/WM2005/AMmsC_XDAII_WM2k5.rar
2. soft reset my device
3. copy .dll to windows folder
4. install cab file
5. soft reset again
6. at this step I look in inbox --> no MMS)
7. go to menu > new account
8. step 1: set email to [email protected]
9. step 2: check the connection(I skip it)
10. step 3: name e ; user e ; password e
11. step 4: change to MMS account
12. step 5: INcoming mail ??? ; outgoing mail ??? ; domain ???
13. and then I check my inbox there is still no MMS account
14. Try to send and receive MMS & please tell me what the result... :?: :?:
for me:
Send MMS:
"Unable to send your message(s). Your Message(s) will remain in the outbox"
Receive MMS :
- Bubble Receiving MMS header in the Inbox appear but when i download MMS....
"Unable to Receive your message(s). Your Message(s) will remain in the inbox"
There is nothing wrong with my MMS setting but :twisted: :twisted: :evil: :twisted:
I have the same problem
the 1st time i setup a new mms account was a failure too, so i created another one. this time it worked & i have two mms accounts?
anyway, i did a clean install of 1.60c & followed the steps you mentioned (except 12. step 5, i placed "e" not sure if it matters at all?), mms account created the 1st time! i tried to send to my own cell number & received/download alright.
btw, i'm in indonesia too & using satelindo matrix. just for info if it would be of any help.
cheers!
rhmartin said:
the 1st time i setup a new mms account was a failure too, so i created another one. this time it worked & i have two mms accounts?
anyway, i did a clean install of 1.60c & followed the steps you mentioned (except 12. step 5, i placed "e" not sure if it matters at all?), mms account created the 1st time! i tried to send to my own cell number & received/download alright.
btw, i'm in indonesia too & using satelindo matrix. just for info if it would be of any help.
cheers!
Click to expand...
Click to collapse
well i will try with my Satelindo Matrix ASAP... i hope it works... :roll:
audio
I got the ArcSoft MMS Composer 3.0.0.25 to work in principal. However, it appears that the audio objects are not properly imbedded. Everything seems OK until the message is really sent. After sending, when the message is moved to the "Sent Items" folder, the audio object still appears under objects, but there is no sound when I play the entire message. Message received do not show any audio objects under objects, but the tex field includes a string <<sound.wav>> if the name of the audio object was sound.wav? Any idea?
help
Will somebody please explain to me...
I can make the MMS account and that but nothing is sent or received.
Please
Be sure to configure the server correctly.
Menu -> MMS Configuration ->Servers
You should get the data from your provider.
For my provider A1 in Austria I use
Server name: A1.net
Gateway: 194.48.124.71
Port number: 9201
Server address: http://mmsc.a1.net
Connect via: My ISP
Sending size limitations: 250K
WAP Version: WAP 1.2
Thanks!!
amazing!
thanks a lot. I just test sending myself a message and it works!!
But... (damn, why?)
I sent myself a message with a picture and the picture didnt came with the message, I just see a blank message and nothing more.
Did you receive this same thing?

[Q] Can someone make an app for me?

Hello,
I need an app and wanted to know if there is someone who has the "know how", the time and the willingness to make it for me.
The app shall ask me where 'the' folder of pictures is,
where I want to save the new pictures,
what the name the folder new folder is,
then for each picture in that folder it shall make 3 versions (jpg compression and picture size would be different),
save them "optimized for the web" and
write a a two dimensional Java-array with informations which are based on the height and width of each version and the filename (it would be awesome if I could configure that output via settings).
Code:
var bilder = new Array();
bilder[0] = new Array();
bilder[0][0] ="Bild-1"; //filename
bilder[0][1] =64; //hight of small version
bilder[0][2] =45; //width of small version
bilder[0][3] =512; //height of medium version
bilder[0][4] =362; //width of medium version
bilder[0][5] =864; //height of big version
bilder[0][6] =611; //width of big version
bilder[0][7] =35; //position in the gallery (to configure this would be awesome)
bilder[0][8] =7; //position in the mini-gallery (to configure this would be awesome)
bilder[0][9] =false; //loading state
bilder[1] = new Array();
bilder[1][0] ="Bild-2";
bilder[1][1] =45;
bilder[1][2] =64;
bilder[1][3] =356;
bilder[1][4] =512;
bilder[1][5] =802;
bilder[1][6] =1152;
bilder[1][7] =432;
bilder[1][8] =59;
bilder[1][9] =false;
...
Thanks for reading and helping me!?
Snorfes

[GUIDE] Removing Duplicate Media Entries with root/adb/sqlite3

STD DISCLAIMER: I am not responsible for you screwing up your phone. Make BACKUPS!
I have the ever-present problem with the media files on my phone showing up as duplicates. I see from around the forums that several other users experience this regularly on CM9/CM10/AOKP based roms. I'm not sure why this is happening, but it seems to be a side-effect of the mediascanner re-indexing media it shouldn't. In this guide I show you what is going on with your data and how to remove the duplicates.
REQUIREMENTS
Your phone must be rooted to access the sqlite3 database.
You must have debugging turned on your phone
You must have access to adb and ideally have used it in the past. This thread is not about adb/driver setup!
PROCEDURE
Connect your phone via USB and make sure your adb server is started.
Code:
[[email protected] ~]$ adb start-server
* daemon not running. starting it now on port 5037 *
* daemon started successfully *
Run 'adb shell' and become superuser (run 'su')
Code:
[[email protected] ~]$ adb shell
[email protected]:/ $
255|[email protected]:/ $ su
su
[email protected]:/ #
cd to /data/data/com.android.providers.media/databases/
Code:
[email protected]:/ # cd /data/data/com.android.providers.media/databases/
cd /data/data/com.android.providers.media/databases/
[email protected]:/data/data/com.android.providers.media/databases # ls
ls
external.db
external.db-shm
external.db-wal
internal.db
internal.db-shm
internal.db-wal
Attach to the external.db database with sqlite3
Code:
[email protected]:/data/data/com.android.providers.media/databases # sqlite3 external.db
external.db <
SQLite version 3.7.4
Enter ".help" for instructions
Enter SQL statements terminated with a ";"
sqlite>
view the avaible tables (.tables). Now almost every table here, except for the 'files' table is a view based on the files table. What happens is that some data is in 'files' is blanked out and the views create duplicates of the data with seemingly good filenames. However since the primary piece of data in 'files' is missing, all the media players relying on this database freak out.
Code:
sqlite> .tables
.tables
album_art audio files
album_info audio_genres images
albums audio_genres_map search
android_metadata audio_genres_map_noid searchhelpertitle
artist_info audio_meta thumbnails
artists audio_playlists video
artists_albums_map audio_playlists_map videothumbnails
sqlite>
look at the files table sql schema and find an example (.schema files). With the duplicate problem bad data is created with the '_data' field blanked out, but a valid media_type=2, since views rely on the media_type=2 but merges other fields with the file name, etc. you get a media entry that looks good but no entry to pull off the file system. See the _data section of the single entry I queried below to see what a good record looks like. A bad record will have a different '_id' and blank '_data'
Code:
sqlite> .schema files
.schema files
CREATE TABLE files (_id INTEGER PRIMARY KEY AUTOINCREMENT,_data TEXT,_size INTEGER,format INTEGER,parent INTEGER,date_added INTEGER,date_modified INTEGER,mime_type TEXT,title TEXT,description TEXT,_display_name TEXT,picasa_id TEXT,orientation INTEGER,latitude DOUBLE,longitude DOUBLE,datetaken INTEGER,mini_thumb_magic INTEGER,bucket_id TEXT,bucket_display_name TEXT,isprivate INTEGER,title_key TEXT,artist_id INTEGER,album_id INTEGER,composer TEXT,track INTEGER,year INTEGER CHECK(year!=0),is_ringtone INTEGER,is_music INTEGER,is_alarm INTEGER,is_notification INTEGER,is_podcast INTEGER,album_artist TEXT,duration INTEGER,bookmark INTEGER,artist TEXT,album TEXT,resolution TEXT,tags TEXT,category TEXT,language TEXT,mini_thumb_data TEXT,name TEXT,media_type INTEGER,old_id INTEGER, storage_id INTEGER, is_drm INTEGER, width INTEGER, height INTEGER);
CREATE INDEX album_id_idx ON files(album_id);
CREATE INDEX artist_id_idx ON files(artist_id);
CREATE INDEX bucket_index on files(bucket_id, media_type, datetaken, _id);
CREATE INDEX bucket_name on files(bucket_id, media_type, bucket_display_name);
CREATE INDEX format_index ON files(format);
CREATE INDEX media_type_index ON files(media_type);
CREATE INDEX parent_index ON files(parent);
CREATE INDEX path_index ON files(_data);
CREATE INDEX sort_index ON files(datetaken ASC, _id ASC);
CREATE INDEX title_idx ON files(title);
CREATE INDEX titlekey_index ON files(title_key);
CREATE TRIGGER audio_meta_cleanup DELETE ON files WHEN old.media_type = 2 BEGIN DELETE FROM audio_genres_map WHERE audio_id = old._id;DELETE FROM audio_playlists_map WHERE audio_id = old._id;END;
CREATE TRIGGER audio_playlists_cleanup DELETE ON files WHEN old.media_type = 4 BEGIN DELETE FROM audio_playlists_map WHERE playlist_id = old._id;SELECT _DELETE_FILE(old._data);END;
CREATE TRIGGER files_cleanup DELETE ON files BEGIN SELECT _OBJECT_REMOVED(old._id);END;
CREATE TRIGGER images_cleanup DELETE ON files WHEN old.media_type = 1 BEGIN DELETE FROM thumbnails WHERE image_id = old._id;SELECT _DELETE_FILE(old._data);END;
CREATE TRIGGER video_cleanup DELETE ON files WHEN old.media_type = 3 BEGIN SELECT _DELETE_FILE(old._data);END;
sqlite>
sqlite> select * from files where _data like '%Unhuman%';
select * from files where _data like '%Unhuman%';
16566|/mnt/emmc/mp3/Architect - 2010 - Consume Adapt Create/Architect - 04 - Unhuman.ogg|8176842|47362|16559|1345650424|1337460350|application/ogg|Unhuman||Architect - 04 - Unhuman.ogg|||||||-1041554543|Architect - 2010 - Consume Adapt Create|| O A 5 O ? ' A |5|7||4||0|1|0|0|0||338973||||||||||2||131073|0||
query the duplicates in the files tables. Here I look at just one example... This is from a later date than the earlier section. You can see how the one media file id = 16566 has been re-indexed again. 16566 and 19522 have been blanked and new record 22822 has been indexed with the complete record.
Code:
sqlite> select _id,_data,_display_name from files WHERE _data = '' AND media_type = 2;
select _id,_data,_display_name from files WHERE _data = '' AND media_type = 2;
19518||Architect - 13 - Wachsmuth.ogg
19519||Architect - 01 - The ***** is Back.ogg
19520||Architect - 02 - The Shadow of Eve.ogg
19521||Architect - 03 - Fast Lane (Freeze Frame).ogg
19522||Architect - 04 - Unhuman.ogg
19523||Architect - 05 - For You.ogg
19524||Architect - 06 - So I Went Out.ogg
19525||Architect - 08 - Attack Ships on Fire.ogg
19526||Architect - 09 - Pure.ogg
19527||Architect - 10 - I Lost my 808 on a Rainy Day.ogg
19528||Architect - 11 - Awake (Album Version).ogg
19529||Architect - 12 - The Beauty and the Beat (Rokka).ogg
<<more bad entries>>
sqlite> select * from files where _display_name like '%Unhuman%';
select * from files where _display_name like '%Unhuman%';
16566||8176842|47362|16559|1345650424|1337460350|application/ogg|Unhuman||Architect - 04 - Unhuman.ogg|||||||-1041554543|Architect - 2010 - Consume Adapt Create|| O A 5 O ? 'A |5|7||4||0|1|0|0|0||338973||||||||||2||131073|0||
19522||8176842|47362|19515|1345728924|1337460350|application/ogg|Unhuman||Architect - 04 - Unhuman.ogg|||||||-1041554543|Architect - 2010 - Consume Adapt Create|| O A 5 O ? 'A |5|7||4||0|1|0|0|0||338973||||||||||2||131073|0||
22822|/mnt/emmc/mp3/Architect - 2010 - Consume Adapt Create/Architect - 04 - Unhuman.ogg|8176842|47362|22815|1346073675|1337460350|application/ogg|Unhuman||Architect - 04 - Unhuman.ogg|||||||-1041554543|Architect - 2010 - Consume Adapt Create|| O A 5 O ? ' A |5|7||4||0|1|0|0|0||338973||||||||||2||131073|0||
delete all the duplicates. Note we won't be able to delete until we temporarily remove any triggers referring to api functions. If you look at '.schema' again you'll note a trigger refer to _OBJECT_REMOVED, we'll need to remove them. So STEP1. List schema -- cut and paste this to notepad or something. STEP2. DROP TRIGGER on anything referencing _OBJECT_REMOVED. STEP 3. delete our duplicates. STEP 4. re-create all triggers.
Code:
sqlite> drop TRIGGER files_cleanup;
drop TRIGGER files_cleanup;
sqlite> DELETE FROM files WHERE _data = '' and media_type = 2;
DELETE FROM files WHERE _data = '' and media_type = 2;
sqlite> CREATE TRIGGER files_cleanup DELETE ON files BEGIN SELECT _OBJECT_REMOVED(old._id);END;
(optional) Add a trigger to nuke duplicates. So maybe I'd like sqlite3 to remove dupes for me anytime it re-indexes, say for a deletion? Some other events might be too expensive to have this triggering all the time, but I've tested it with a file delete and it works.
Code:
CREATE TRIGGER duplicates_cleanup DELETE ON files WHEN old.media_type = 2 BEGIN DELETE FROM files WHERE _data = '' and media_type = 2;END;
That's IT.
Code:
sqlite> .quit
.quit
Takes about 2-5 minutes to clean up manually, vs waiting 14-30 minutes to re-index a huge collection. This could also be automated if you were so inclined with a better trigger or an app.
UPDATE: 10/26/2012
One clarification: media_type = 2 is audio files -- mp3, ogg, wav and the like. If you have issues with other media you can simple use that media type, or leave the qualifier off for all media types.
I was 'trying out' this trigger, but now have gone for months without any duplicates. I think it works. Basically, you can skip doing any other sql work in the above guide -- just creating this trigger and adding a media audio file. Adding a media file should launch this trigger and clear out any duplicates (may have to reboot once).
Code:
sqlite> create trigger duplicates_cleanup AFTER UPDATE OF _data ON files BEGIN DELETE FROM files WHERE _data = '' and media_type = 2;END;
create trigger duplicates_cleanup AFTER UPDATE OF _data ON files BEGIN DELETE FROM files WHERE _data = '' and media_type = 2;END;
Interesting.
Where do you see duplicates show up? I'm not running aosp.
The reason this caught my eye is because I've always had the issue of duplicate entries in ringtone and notification sounds lists, while there are not duplicate files in /system/media/audio/*. I don't think this is the same issue you are adressing, is it?
creepyncrawly said:
Interesting.
Where do you see duplicates show up? I'm not running aosp.
The reason this caught my eye is because I've always had the issue of duplicate entries in ringtone and notification sounds lists, while there are not duplicate files in /system/media/audio/*. I don't think this is the same issue you are adressing, is it?
Click to expand...
Click to collapse
It's a similar issue. Note the following items in the schema:
is_ringtone INTEGER,is_music INTEGER,is_alarm INTEGER,is_notification INTEGER,is_podcast INTEGER
The same thing could very well be happening where you have two records with mostly the same records but a blank '_data'.
othermark said:
It's a similar issue. Note the following items in the schema:
is_ringtone INTEGER,is_music INTEGER,is_alarm INTEGER,is_notification INTEGER,is_podcast INTEGER
The same thing could very well be happening where you have two records with mostly the same records but a blank '_data'.
Click to expand...
Click to collapse
Meaning it would be the same database?
creepyncrawly said:
Meaning it would be the same database?
Click to expand...
Click to collapse
If the duplicates are all on external media, yes, however, if it's on the internal media then it will be in the internal.db instead of the external.db as posted in my guide.
So if you're seeing duplicates with 'Whistle' showing up twice in notifications, there's probably a problem with internal.db.
Had a little time to play around with this today. First, I was surprised that I didn't have sqlite3 on my phone. I had to install it, using a market app called SQLite Installer for Root by ptSoft. (SHOstock2 v4.1.3)
I ran the query "select _id,_data from files WHERE _data = '' and media_type = 2;" on both the external.db and internal.db but in both cases no entries were found. So no joy finding duplicate entries in notifications and ringtones with this method.
creepyncrawly said:
Had a little time to play around with this today. First, I was surprised that I didn't have sqlite3 on my phone. I had to install it, using a market app called SQLite Installer for Root by ptSoft. (SHOstock2 v4.1.3)
I ran the query "select _id,_data from files WHERE _data = '' and media_type = 2;" on both the external.db and internal.db but in both cases no entries were found. So no joy finding duplicate entries in notifications and ringtones with this method.
Click to expand...
Click to collapse
The schema is maybe different in samsung based roms? How I originally found this was to pick a duplicate and look at the various tables and work backwards through the views and matching up fields.
You can always start with a select * from files and see if you can find where it lists the same name or file name twice. This should be easy to do on the internal.db with it's limited number of entries.
for the past year that i've had my sgs2, i've constantly had this issue with my phone and it's been a constant annoyance. i honestly want to say thank you for this but the problem is i got to step 1 and i went full retard. for some reason, i already have adb on my comp and i guess i used it for something at some point, possibly when i was rooting my phone a while back but i have no clue how to use it that well. i would love to try and get this to work on my phone but can you really dumb it down for those not really familiar with how to do all this? if not, i thank you for putting this up in the first place, i'll try to give it another go.
I tried the fix and it seemed to work until I pulled up ringtones a second time and there were the doubles and even triples. Frustrated that it didn't take I delved deeper into my files and discovered a couple unzipped (but not installed) ROMs that I had extracted just to look at. Deleted them and problem solved. Did I mention I'm a noob, lol?
bandit1210 said:
I tried the fix and it seemed to work until I pulled up ringtones a second time and there were the doubles and even triples. Frustrated that it didn't take I delved deeper into my files and discovered a couple unzipped (but not installed) ROMs that I had extracted just to look at. Deleted them and problem solved. Did I mention I'm a noob, lol?
Click to expand...
Click to collapse
Cool
ok, is there anyway to undo all of this because i have a feeling this might have caused my phone to delete all my pictures i've taken and when i try to flash a new rom, it sends me into a boot loop and i can't reflash anything.
ender127 said:
ok, is there anyway to undo all of this because i have a feeling this might have caused my phone to delete all my pictures i've taken and when i try to flash a new rom, it sends me into a boot loop and i can't reflash anything.
Click to expand...
Click to collapse
Flash to stock?
ender127 said:
ok, is there anyway to undo all of this because i have a feeling this might have caused my phone to delete all my pictures i've taken and when i try to flash a new rom, it sends me into a boot loop and i can't reflash anything.
Click to expand...
Click to collapse
You can "Clear Data" on the "Media Storage" app, this has the same effect as removing the db files.
However a boot loop is already beyond all this... You need to get into recovery to fix that.
well, i figured it was one of two things. after i did this on saturday, i tried to flash new firmwarm (10.31 task) but i got stuck in a boot loop. i can flash to another rom (super nexus) without problems and i can get to a really old nandroid backup. but basically you're telling me if i do a clear data on media storage, it'll wipe anything i did on adb? i really appreciate the responses by the way, i literally just flew out of the country for vacation and luckily i brought a laptop to fix this, but i can't function without my phone running.
ender127 said:
basically you're telling me if i do a clear data on media storage, it'll wipe anything i did on adb.
Click to expand...
Click to collapse
I believe so, yes. At least that is my experience.
How do delete duplicates if the _data is NOT empty
If you have root and can put sqlite3 on your device, this works without scanning and all that silliness:
http://forum.xda-developers.com/showthread.php?t=1847586
---------- Post added at 02:09 PM ---------- Previous post was at 01:49 PM ----------
Sweet, thank you so much for this. I found that on my Galaxy S3, Zedge creates a mess of things. I had up to 5 of each notification and ringtone, all with the same valid info aside from _id. Here's what I did to pick the first entry and clean things up:
sqlite3 external.db
FROM files WHERE _id not in (select MIN(_id) FROM files GROUP BY _data);
You can choose to keep the LAST entry for each by changing MIN to MAX, which might be a better idea if you trust recent modifications over earlier ones. If they all have valid _data it probably does not matter.

AndroModding

Requirements:
1) Have the .apk file you want to hack.
2) Have WinRar installed on your PC. (*Download WinRar 32bit*|*Download WinRar 64bit*)
3) Have .NET Reflector. (*Download .NET Reflector 9.0*)
4) Have "Reflexil", a required Plugin to hack files with .NET Reflector. (*Download Reflexil Plugin for .NET Reflector*)
5) Have an APK SIGNER. I personally use the one-click signer. (*Download one click apk signer*)
Get Ready
Let's prepare our workspace:
1) The first step is to look inside our .apk file, in order to be sure it can be hacked with this method. What we will do is to rename the apk from .apk to .zip;
2) Double click on the .zip file and you should be able to open it with WinRar. If not, make right-click and select "Open With..." and then chose "WinRar";
3) Try to go to the following location: assets/bin/Data/Managed/. If you reached it succesfully, and if you see lots of .dll files inside it then YES, you can hack this game (or you can TRY hacking it) using .NET Reflector!
4) Now, extract the whole "Managed" folder wherever you like (I personally have a folder on my Desktop I exclusively use to hack games, where I put all the softwares I need to hack them).
5) Open ".NET Reflector", move ALL THE .DLL FILES from the "Managed" folder inside it (move them in the LEFT box of Reflector).
6) Press F3, then press Ctrl+M. This will enable the Search box and set it properly for our scopes. Please note this must be done EVERY TIME you open .NET Reflector.
7) Launch Reflector (if you read the "ReadMe.txt" into the Reflexil folder of my download link above, you already know how to launch it. Otherwise, well, click on the Gear icon or go to Tools -> Reflexil and click on it)
Ok, we managed to set up everything properly and we can finally start hacking!
Let's start
So, let's read what I'll write below very carefully, since it's easy to understand if you spend enough time reading, ok?
1) The first step, after you grabbed your .apk file is to open it with WinRar (I personally rename the extension to .zip in order to open it automatically with WinRar, but you can simply do Right Click on the .apk file and select "Open With..." -> WinRar).
2) Browse to the following path, inside the WinRar window: assets/bin/data/Managed/, like the screenshot below:

3) Extract (you can simply drag them) all the .dll files of this archive into your desired folder (or, to be faster, just drag the entire "Managed" folder of the archive out of it.
4) Now, Open NET Reflector, press F3 and Ctrl+M (this must be done every time, to quickly set up NET Reflector for our usage), load the "Reflexil" plugin by clicking on the Gear icon and move all the .dll files inside .NET Reflector's window (at the left, like in the screenshot below):

Now we're ready to search, so input your desired keyword in the Search Box and edit the desired code, like in the Screenshot below. Watch it carefully:

6) To edit the code, you need to right-click on the desired instruction you want to modify and select "Edit". When you're done with edits, click on Update, like in the screenshot below:

7) Now, let's save our code. To do this, in the Left panel of .NET Reflector, scroll up until you find the name of the Assembly you modified, then do Right Click -> Reflexil -> Save, like in the screenshot below:

8) It'll add ".Patched" to the original name the of the .dll file, so you know which one is the modified and which one is the original .dll file. Now, to be sure we modified the right code, let's load again the Assembly into .NET Reflector, to see how it does look now. (this step is optional, but recommended if you're not 100% sure the hack is properly coded:

9) Ok, in my example the codes were right so we can proceed adding the modified .dll file to our original .apk file. So we open the .apk file again with WinRar and replace the original "Assembly-Csharp.dll" (or any other .dll files you modified) with the one containing ".Patched", but of course, you need to rename the file to its original name, or the game will not load. So, in my example, I renamed Assembly-Csharp.Patched.dll to Assembly-Csharp.dll in order to restore its original name.
10) Now it's time to sign it (or you can add*toast*before singning apk if you want, before signing the .apk file). So we move the modified .apk file in the same folder of the "one_click_signer.cmd" file (or, if you use another apk signer, use your method to sign it), then we open it by double-clicking it and a Command Prompt window will appear.
All we need to do is to type:
"name of the apk file.apk"
and press Enter, like in the screenshot below (don't forget the "" symbols, they are part of the code you need to write!):

11) That's it! Our MOD APK file is ready! You'll find a new .apk file in this folder, starting with "signed-". This is the signed .apk file you can finally share! But first, of course, test the game and ensure it does properly work. If yes, it means you're a good hacker and you can finally upload the .apk file to share it with everyone! If the .apk file is not properly working, or if the codes you made aren't showing, well, don't lose hope! Just try again, modifying some other offsets! Good luck!
FAQs:
If you need help, as always, reply below and I'll be glad to add further details or to give you an helping hand!*
Do you have an Int32?
You can return a value this way:
ldc.i4 -> Int32 -> Your_Value (no limits)
ret
or
ldc.i4.s -> SByte -> Your_Value (max 128)
ret
Do you have an Int64?
You can return a value this way:
ldc.i8 -> Int64 -> Your_Value
ret
Do you have a Single?
You can return a value this way:
ldc.r4 -> Single -> Your_Value
ret
Do you have a Double?
You can return a value this way:
ldc.r8 -> Double -> Your_Value
ret
Do you have a "Boolean"?
I'm used to compare "Boolean" with a question. Basically, it "asks" something to the game, and the game will answer with True (yes) or False (no).
For example: get_isVip will "ask" the game if the user is a VIP, and the game will probably answer "No, he's not a VIP!!!", so what can we do here?
We have two ways. The first (easier, but you will not learn much..) is about returning always True (yes), while the second (not alwasy applicable, but it's the "pros" way) is about making the game thing you're a VIP for real.
But first, let's explain how to return "True" or "False" in the game.
True = ldc.i4.1 (or ldc.i4 -> Int32 -> 1)*
False = ldc.i4.0 (or ldc.i4 -> Int32 -> 0)
Beware that you must always use ldc.i4 (and not ldc.r4, ldc.i8 and so on..) or the game will crash.
So, the easiest way to always return True (or False) to a Boolean is to replace the whole function with:
[TRUE]
ldc.i4.1
ret
[FALSE]
ldc.i4.0
ret
Now, let's talk about the pros' method. As we said above, it's all about making the game think you're a VIP for real, so the Boolean will naturally return a true value, even if we both know you're not a VIP for real in the game (of course I talk about VIP to make an example, you can replace the word "VIP" with anything. For example, "get_isUnlocked" or simply "IsUnlocked" is a boolean to unlock stuff in the game and so on.. it's up to you to find the right keyword to hack a value).
Sometimes, there are some "checks" to ensure if you're a VIP or not. For example, the game checks you VIP level and, if it's equal to 0 returns a false, while if it's higher than 0, it returns true.
It should look like this (very basic example) in NET Reflector decompilation window:
get_isVip {
if (this.Player.get_vipLevel) > 0*
{
return true
}
return false
}
And, in Reflexil (the plugin's window you have at the bottom) you should see something like:
0 ldarg.0
1 ldfld Player.get_vipLevel
2 ldc.i4 0
3 bge (6 -> ldc.i4.1)
4 ldc.i4.0
5 br (7 -> ret)
6 ldc.i4.1
7 ret
Now, it's not that hard to understand what Reflexil says. Let's compare the text with the NET Reflector's decompiled code:
ldarg.0 -> "this."
ldfld -> loads the value, in particular, the one about the Player's vip Level
ldc.i4 0 -> it means 0, referring to the player's vip level
bge (6 -> ldc.i4.1) -> it means "branch if greather than". This means, if the Player's vip Level (ldarg.0 + ldfld) is greather than 0 (ldc.i4 0), the function will jump to the sixth function (ldc.i4.1 which means true)
ldc.i4.0 -> which means false. If the function didn't jump to the ldc.i4.1, the game will return this value (false) so the player will not be a VIP
br (7 -> ret) -> this will jump to the 7th function, which is the "ret". Of course, after returning the false, the function needs to close itself, so it'll jump to the "ret" at the end of it.
ldc.i4.1 -> this means true and it's called by the "bge" we've seen above. This is the only way this value is called so, if the player value is higher than 0, this will be the next value returned = the Player IS a VIP.
ret -> You know better than me that "ret" ends the function. Remember EVERY function in the game must end with "ret" or the game will not work properly.
So, after this long and boring lesson, what's the pros' way to hack this?
The answer is in your brain. If the player vip level is higher than 0, the player will be a VIP so what will we do? Of course, we'll hack the player vip level! How? Simply look for "get_vipLevel" (please note this is just an example, it doesn't apply to any particular games and the keyword could change) and it'll probably be an Int32 so you'll simply replace its whole function to:
ldc.i4 -> Int32 -> 15 (for example, as most games with the VIP interface caps the VIP level at 15, while some other have got 10 as VIP level's cap)
ret
This will not only automatically enable your VIP membership, but it will also give you a VIP level = 15.
Please note, even if we manage to hack the VIP level in particular, some online games will still NOT give you the privileges of the VIP membership, or you will get only some of them. Why? Because sometimes the vip level in online games is managed by the server, so you could be the only one seeing you're a VIP member, while all the other people will see you're NOT a VIP member, because you're not a VIP for the server. So, if this value is server-sided, you may still not be able to get your vip privileges with this hack.
How to multiply a value?
Easy, you have to add the number you want to multiply the value with followed by "mul", before the "ret" or, to be more precise, after the function returns the value you want to hack.
Example:
ldarg.0 (which means "this.")
ldfld Player::get_money
ldc.i4 (or ldc.i8, or ldc.r4, or ldc.r8. Which one? See my above examples) -> Int32 (or Int64, or Single, or Double. Which one? See my above examples) -> Your_Value
mul
ret
Sometimes the function returns different values if different events occur, so it could be necessary to multiply more values.
How to divide/subtract/add a value?
It's the same as before, you just need to use "div" (or "sub" or "add") and not "mul" (div = divide, mul = multiply, sub = subtract, add = add).
What's the difference between multiplying something and simply returning 9999999?
The main difference is that returning 9999999 will give a STATIC value. It will never decrease/increase, while multiplying (or adding) a value will give a DYNAMIC value, so you can run out of money, but you theorically also have a lower ban chance. Don't think about 9999999 only when talking about money. This could be HP or Damage or XP and so on..
We are Cracker.
Help
Hey I’m new to this. I was wondering if there is another method to this because my game doesn’t have the dll files there. It has some folders such as meta data. Thanks
So i modded a dll from a multiplatform .NET app and it works fine when using it on PC. But when placing it in the app, all i get is a black screen.

[HOWTO] Sync Activities with ANY service and even get VO2max for ANY watch

Requirements:
AmazeBackup: https://forum.xda-developers.com/smartwatch/amazfit/utility-amazebackup-backup-tool-pace-t3801165
FitnessSyncer.com account;
DropBox / GoogleDrive / OneDrive account (it will be used by FitnessSyncer to automatically sync new data when it is extracted from watch);
Runalyze.com account: it will get data from FitnessSyncer and calculate VO2max (run activities only), it's optional;
Know how to read and install/configure simple software on computer.
It works with ANY watch (Pace/Stratos/Verge), ANY firmware (unlocked or not) and ANY computer (macOS/Linux/Windows).
Download and install AmazeBackup, connect watch to computer and run option #12 (export data), it should create a folder named "export" inside its main folder;
Install and login to DropBox/GDrive/OneDrive, configure it to sync data from the "export" folder above (here you have to know how to do it by yourself, it varies from software to software, computer to computer, user your brain and tutorials from help pages and the internet);
Login to FitnessSyncer, open your account page and add a new *Source* (image 03);
Add your online service (DropBox/GoogleDrive/OneDrive) as "Maps", set "File Type" as GPX, grant permission and point to the folder in your online storage service that will sync the "export/gpx" folder (image 04 - standard Advanced Options settings should work, but you may want to change them if you find any problems with multiple data sources later);
OPTIONAL: Do the same for the TCX folder if you also want to sync non-GPS data, obviously setting "File Type" as TCX and pointing to "export/tcx" in your online storage;
In order to get VO2max calculation, you must sync to Runalyze, then go to Account page and add a new *Destination*, then fill the data and grant permissions accordingly (image 05);
OPTIONAL: If you want to sync data with other services like Endomondo or whatever you use, go back to you Account page and add new Destination, then fill the required fields in "Synchronize with Service" (image 06).
Both FitnessSyncer and Runalyze have an extensive help, read them before asking questions. I like the way Runalyze shows data, but if you just want to concentrate all your activities in one place, FitnessSyncer may be enough, it even has a phone app for both Android and iOS.
That's it, every now and then, after new activities, connect the watch to computer and run AmazeBackup option #12 again, new data should be uploaded to your online service and synced automatically via FitnessSyncer and your preferred online storage service.
All services and AmazeBackup are free, please donate to keep then running and their developers happy.
https://ko-fi.com/lfomartins
Or use XDA's donate link under my username. Thanks!

Categories

Resources