[XDA_UC][UC][SASHIMI][S4X] S4X_Auto & S4X_Backup [DEC.02.2010] XDA_UC Mods & Answers

Search This thread
Boy, I hope this isn't a dumb question... I've searched without any luck, but I can't imagine no one has tried this yet: Is there a way to export ActiveSync settings for XDA_UC? I couldn't find anything like that in the Settings Exporter.

there is a script that comes with SASHIMI, called "makisu" that can do that... I was thinking about trying to write my own version of it... but as of yet I haven't even opened that script file to see just how complicated that task may be... at any rate, I used makisu to build my activsync_email_wifi.xml and it works perfectly every time =)
 

ceesheim

Retired Forum Moderator
Jun 11, 2009
3,457
2,288
No Android Fanboys Please !!!
ok next question :

I have a .cab that I want to install and after it is installed I want to change some manila files .

so what I need is , first install the .cab and than copy over some manila files

at this point it first copy the files and than install the .cab and that is wrong ( the copied files are over written by the .cab .)
 
ok next question :

I have a .cab that I want to install and after it is installed I want to change some manila files .

so what I need is , first install the .cab and than copy over some manila files

at this point it first copy the files and than install the .cab and that is wrong ( the copied files are over written by the .cab .)

Code:
If (DirExists( "\Storage Card\XDA_UC\Manual\manMOD" ))
  RegWriteDword("HKLM","\Software\Microsoft\Today\Items\" & ManilaName,"Enabled","0")
    Sleep(500)
    RedrawToday
    Sleep(500)
    While(ProcExists("manila.exe")=TRUE)
	Kill("Manila.exe")
	Sleep(1000)
    EndWhile
    ForEach CABfile in files ( "\Storage Card\XDA_UC\Manual\manMOD\*.cab" )
	Runwait( "\Windows\wceload.exe", "/nodelete /silent " & """" & CABfile & """" )
    EndForEach
    XCopy( "\Storage Card\XDA_UC\Manual\manMOD\manila\*.*", "\Windows", TRUE, TRUE )
    Sleep( 10000 )
    RegWriteDword("HKLM","\Software\Microsoft\Today\Items\" & ManilaName,"Enabled","1")
    Sleep( 500 )
    RedrawToday
Else
  SleepMessage( 5, "There was an error...", "Error:" )
EndIf

see if that does it.
1. stick cab files in \Storage Card\XDA_UC\Manual\manMOD
2. stick manila files in \Storage Card\XDA_UC\Manual\manMOD\manila
 
Last edited:

ceesheim

Retired Forum Moderator
Jun 11, 2009
3,457
2,288
No Android Fanboys Please !!!
can someone confirm that if you use this:


" it will copy a custom Sense background found in \Storage Card\XDA_UC\sense\wallpaper_sense.png to the device and set that wallpaper as default in Sense. So rename your wallpaper as "wallpaper_sense.png" and drop it in \Storage Card\XDA_UC\sense\ and on the next ROM flash that wallpaper will become your wallpaper in Sense. "

xda_uc will crash .
 
Last edited:

really? hmmmm... can you confirm after hard reset? maybe something to do with it already being applied? I dunno... shouldn't matter, let me take a look at that part of the XDAUC script and see what's going on...

edit: well, the only thing I can see that I might do different, is he starts copying everything from the sense folder to the windows folder, before he disables sense... try this:
Code:
If (DirExists( "\Storage Card\XDA_UC" ))
   RegWriteDword( "HKLM","\Software\Microsoft\Today\Items\HTC Sense","Enabled","0" )
   RedrawToday
   Sleep("3000")
   Copy( "\Storage Card\XDA_UC\wallpaper_sense.png", "\Windows\wallpaper_sense.png", TRUE )
      If ( FileExists( "\Storage Card\XDA_UC\wallpaper_sense.png" ) )
          RegWriteString( "HKCU", "Software\HTC\Manila", "HomeBackgroundPath", "\Windows\wallpaper_sense.png" )
          RegWriteString( "HKCU", "Software\HTC\Manila", "DefaultHomeBackgroundPath", "\Windows\wallpaper_sense.png" )
          Copy("\Storage Card\XDA_UC\wallpaper_sense.png","\Windows\HomeBackground.img", TRUE)
      Else
      Endif
   Sleep("15000")
   RegWriteDword( "HKLM","\Software\Microsoft\Today\Items\HTC Sense","Enabled","1" )
   RedrawToday
Else
   SleepMessage( 10, "There was an error...", "Error:" )
Endif
I just noticed as I was editing this part of his XDAUC script that he had two double quotes at the beginning and end of the first parameter for the last Copy() command... maybe that's what caused it, just try this script and see if it works for you, if it does, then it was the two double quotes in the last Copy() command I'm pretty sure and I'll notify him of this...

you need to place your wallpaper_sense.png in the root of XDA_UC folder instead of the \sense\ folder... for my script to work...
 
Last edited:

Ralt

Senior Member
Feb 28, 2009
130
0
Roseville, CA
PIM Back up & Exchange Sync??

are there any known issues with backing up pim and syncing with an exchange server?

I don't know why there would be..but I've always just synced up after a flash vs. backing up and restoring, but that seems to be one of the most time consuming parts of the flash.

Thanks

Ral
 

rmanaka

Senior Member
Jul 15, 2005
705
54
are there any known issues with backing up pim and syncing with an exchange server?

I don't know why there would be..but I've always just synced up after a flash vs. backing up and restoring, but that seems to be one of the most time consuming parts of the flash.

Thanks

Ral

Same here! I've used Exchange for several years through a few different phones and ROMs (although it's really more of a restore of info from the exchange server as opposed to the traditional "backup"). Changes made on the phone sync to Exchange a they are occur, at least within a connection cycle. SMS/MMS saved and restored with MS My Phone service.

Great when you flash a ROM away from home or your phone breaks and you have to start from scratch! This has happened to me when traveling and it was really great to recover on the road.
 

rmanaka

Senior Member
Jul 15, 2005
705
54
So have you used a back up AND exchange without any problems? I'm trying to decide if I can do it...I know I don't have to. but thought it may save time.

thanks

ONLY use MS My Phone, as it will detect the Exchange server and NOT back up your contacts, appointments (calendar), emails and tasks. It will back up your MSM/SMS messages, documents, photos, etc.

DO NOT use another backup program for contacts, etc. EXCEPT for a fail-safe! If you restore from another backup program the contacts, etc. will be DUPLICATED when you re-sync with Exchange server.

I sync about 1400 contacts and it was a real pain when I discovered that any contacts I restored with PIM backup or Sprite Backup were duplicated in Exchange...fortunately I use a pretty good duplicate finder (Cardscan) to remove them, but I then discovered that many of my business card images (from both Cardscan and Neat Office) had been lost in the process.

The one thing I have NOT been able to backup are the contact specific ringtones. I think they are saved in PIM.vol and the Exchange server does not sync the ringtone field. Perhaps others have had more success with contact ringtones. If so, I'm all ears (or eyes)!!!

I have been about 50% successful in restoring Sense Favorites in the correct order when I restore that area from registry. Sometimes the contact pointers get changed when restoring from Exchange and then the wrong people get added to favorites.

About 75% successful in restoring the "favorite" contacts in spb Mobile Shell 3.5.3.

Don't get the wrong idea, ALL of the contacts are correctly restored from Exchange, it's just the "favorite" ones that you choose to display on a Sense or MShell page that may need to be adjusted!

HTH
 
Last edited:

slinkygn

Member
May 5, 2007
31
1
there is a script that comes with SASHIMI, called "makisu" that can do that... I was thinking about trying to write my own version of it... but as of yet I haven't even opened that script file to see just how complicated that task may be... at any rate, I used makisu to build my activsync_email_wifi.xml and it works perfectly every time =)

Awesome. Worked great. Thank you!
 

Ralt

Senior Member
Feb 28, 2009
130
0
Roseville, CA
ONLY use MS My Phone, as it will detect the Exchange server and NOT back up your contacts, appointments (calendar), emails and tasks. It will back up your MSM/SMS messages, documents, photos, etc.

DO NOT use another backup program for contacts, etc. EXCEPT for a fail-safe! If you restore from another backup program the contacts, etc. will be DUPLICATED when you re-sync with Exchange server.

Thanks...that's kinda what I thought but had hoped there was a better way to flash and restore quickly.
 
O.K. been racking my brain for the past few hours and finally got it figured out, this was a *****! (for my small minded self)
Code:
XCopy( XDAUC_FOLDER & "\*.tsk", "\Windows", TRUE, FALSE )
Sleep( 10000 )
tskArray = DirContents( "Windows\*.tsk", DC_FILES )
If ( NOT isEmpty( tskArray ) )
	If ( FileExists( "\Windows\cusTSK.exe" ) = TRUE )
		If ( FileExists( XDAUC_FOLDER & "\choices.mscr" ) = TRUE )
			Delete( XDAUC_FOLDER & "\choices.mscr" )
		Else
		EndIf
		WriteFile( XDAUC_FOLDER & "\choices.mscr", "ChoiceDefault( ""theme picker"", ""choose a theme:"", 0, 30, tskArray ) ^NL^", TRUE )
		ForEach x, file in array( tskArray )
		  write = "    Case(" & x & ") ^NL^      RunWait( ""\Windows\cusTSK.exe"", ""\Windows\" & file & """)^NL^      Sleep( 5000 )^NL^      RedrawToday^NL^"
		  WriteFile( XDAUC_FOLDER & "\choices.mscr", write, TRUE )
		EndForEach
		WriteFile( XDAUC_FOLDER & "\choices.mscr", "EndChoice^NL^", TRUE )
		Sleep( 1000 )
		CallScript( XDAUC_FOLDER & "\choices.mscr" )
	Else
		SleepMessage( 5, "Sorry, cusTSK.exe was ^NL^ not found on device. ^NL^ Please copy cusTSK.exe ^NL^to your \Windows dir ^NL^ and try again.", "Error...", TRUE )
	EndIf
		If ( FileExists( XDAUC_FOLDER & "\choices.mscr" ) )
		  Delete( XDAUC_FOLDER & "\choices.mscr" )
		Else
		EndIf
	SleepMessage( 10, "There were no *.tsk files ^NL^found anywhere on device.", "Error:", TRUE ) 
EndIf
I will be adding this to my script and what it does is copy any *.tsk files you have in XDA_UC root to \Windows then opens a window with choices of all available themes, then it lets you set the theme when you choose OK, if you do nothing, it does nothing... I think I am going to add a couple more lines so that if you want it to be silent you can just name it something like "my.tsk" and it will copy that to \windows and set it as your theme with no interation needed...

hope this will make some of you happy... going to leave the old version of the mod up, and set this one as ver2 or something...

edit: major overhaul... now using autoTSK.ini (if present in XDA_UC folder) to set the theme silently.
Code:
[theme]
file=EnergyROM 2010.tsk [color="red"]NO PATH, JUST FILENAME[/color]

if the file is present and a filename is present in the file it will set that theme silently, and skip the choices menu. otherwise it will pull up a menu of all available choices in \Windows
Code:
errorA = DirContents( XDAUC_FOLDER & "\*.tsk", DC_FILES )
fileTSK = IniRead( XDAUC_FOLDER & "\autotsk.ini", "theme", "file" )
tskArray = DirContents( "\Windows\*.tsk", DC_FILES )

###########################################################
# Copy any/all *.tsk Files to \Windows ####################
###########################################################

	If ( NOT isEmpty( errorA ) )
	  XCopy( XDAUC_FOLDER & "\*.tsk", "\Windows", TRUE, FALSE )
	  Sleep( 10000 )
	EndIf

###########################################################
# Set default silent theme ################################
###########################################################

	If ( NOT isEmpty( fileTSK ) )
	  RunWait( "\Windows\cusTSK.exe", "\Windows\" & fileTSK )
	  Sleep( 5000 )
	  tskArray = "AUTO"
	  RedrawToday
	EndIf

###########################################################
# If no "silent" file, give choices #######################
###########################################################

	If ( isEmpty( tskArray ) )
	  SleepMessage( 5, "There were no *.tsk files ^NL^found anywhere on the device", "Error:", TRUE ) 
	ElseIf ( tskArray eq "AUTO" )
	  SleepMessage( 5, "autoTSK.ini was used^NL^to set theme.", "AUTO:", TRUE )
	Else
	  If ( FileExists( XDAUC_FOLDER & "\temp.mscr" ) = TRUE )
	    Delete( XDAUC_FOLDER & "\temp.mscr" )
	  EndIf
	  WriteFile( XDAUC_FOLDER & "\temp.mscr", "ChoiceDefault( ""theme picker"", ""choose a theme:"", 0, 10, tskArray ) ^NL^", TRUE )
	  ForEach x, file in array( tskArray )
	    write = "    Case(" & x & ") ^NL^      RunWait( ""\Windows\cusTSK.exe"", ""\Windows\" & file & """)^NL^      Sleep( 5000 )^NL^      RedrawToday^NL^"
	    writeFile( XDAUC_FOLDER & "\temp.mscr", write, TRUE )
	  EndForEach
	  WriteFile( XDAUC_FOLDER & "\temp.mscr", "EndChoice^NL^", TRUE )
	  Sleep( 1000 )
	  CallScript( XDAUC_FOLDER & "\temp.mscr" )
	EndIf
	If ( FileExists( XDAUC_FOLDER & "\temp.mscr" ) )
	  Delete( XDAUC_FOLDER & "\temp.mscr" )
	EndIf
 
Last edited:

Mark5

Senior Member
Jan 9, 2007
857
297
Redmi Note 9 Pro
This is great! What a fab mod :)

Quick question - one of the killer functions of Sashimi (in my opinion) is the ability to silently install cabs onto the SD.

I know XDA_UC can do this for the device and can offer you an assisted install in the XDA_UC/SD directory which allows you to manually choose the SD as a destination - but do you know how Sashimi allows for a silent install on the SD card?

If so, it would great to stick some cabs in say, XDA_UC/SDAuto or something like that for those cabs that we know we just want to plain vanilla install on the SD card.

Any thoughts? :)
 

Top Liked Posts

  • There are no posts matching your filters.
  • 2
    benjamminzIS -

    I've been meaning to post for some time to say thanks for your scripts. Appreciate your efforts thus far and understand how family takes priority.

    Also wanted to ask about how you would normally like to handle any possibly code update submissions from other users... I can offer to help maintain the code.

    I've followed most of the thread since the 1.6 release. I've had some problems with the code for certain things I needed done, and have done the following:

    1. fixed pimRestore sub
    * "sourcPIM" to "sourcePIM" (from some prior posts)

    2. refactored sub tskKill
    * exitSub in MortScript 4.3.0.11 is broken and the taskKill sub terminates prematurely depending on the code path
    * eliminated the need to use exitSub
    * this caused items like dialerCAB to fail when it could not kill cprog.exe (for CDMA ROMs) properly. This is probably causing other items to fail as well and folks likely think it is something else not working.

    3. modified sub restoreCHT
    * fails if your filename is not exactly "chtbackup.cht" (default)
    * if default filename is not found, the sub will check for the most recent .cht file in the "filesCHT" directory and use that
    * no longer relies on the "default" filename if not found
    * changes are only for CHT 1.8.5 so far as I stopped using CHT 2.0.0.0 for now

    4. added MortScriptVersion output string to Init messages so we can debug what versions of MortScript is in use

    5. modified checking of xdauc.mscr so that the script works with Energy ROMs from Nov 2010 onwards

    Note stuff like tskKill failing is something that I've had problems with since I stated using v1.6 on a bunch of TP2s regardless of the custom ROM (Energy/Stock/etc). It took me a while to figure out it was the ExitSub function that is broken in MortScript 4.3b11 itself.

    I can post an updated version of S4X_Auto.mscr (eg call it 1.6.1) if that is fine with you and others... or I can provide the diff/patch code.

    In the works:
    a. CHT 2.0.0.0 settings restore as I play with it on a test TP2 unit I have
    b. reviewing customlinks.ini handling
    c. checking on your TO DO of pimbackup via ini or some other automated method
    2
    I just used the code to flash the latest Energy ROM. I used the Full Minus backup first. Most things worked really well. It even seemed to import a lot of the cookie settings. One thing I noticed is that I was suprised to see that the Compact start menu was already loaded. It is what I normally use to save memory. What I found however was that it seemed to be operating on top of the standard start menu; ie no memory was gained. I still had to select the compact menu to get the memory I was expecting. Is there something in this code that tried to load the Compact menu but did not disable the Standard menu?

    have you done any editing of the regexport.ini??? or did you just leave it as it is in the package? if you haven't edited it at all, then you may need to add the lines necessary to backup the compact start menu reg settings... I personally don't know where they are, and I don't have my winmo phone with me right now so I can't really look... but since you did a full minus file backup, and (probably) used just the default regexport.ini then quick menu is one of the things already in the default regexport.ini as I used it myself... but the compact start menu entries are not... sorry I can't be of more help right now, but either ask around in the energy threads if anyone knows what the reg entries are for CSM or do some digging in the registry and I'm sure you'll find it... you could also always do a hard reset, then do a full regexport, then change the compact start menu settings from the app, then do another full regexport and then compare the two regexports with winDiff or similar program (Notepad++ comes with a nice compare plugin too)
    2
    To help out benjamminzIS and other users, I am providing my updates to the scripts where applicable.

    Please see the initial discussions starting at post 282:
    http://xdaforums.com/showpost.php?p=10091804&postcount=282

    Attached is: (Jan.17.2011)
    1. S4X_SDAuto_1.62_[updateONLY].zip = updates to the 1.6/1.61 S4X_Auto.mscr script and this file contains the updated mscr file itself and a changelog text file. No package just yet - when/if I do I will update this post.

    Attached is: (Dec.27.2010)
    1. S4X_SDAuto_1.61_[updateONLY].zip = updates to the 1.6 S4X_Auto.mscr script and this file only contains the updated mscr file itself. No package just yet - when/if I do I will update this post.

    2. diff-1.6-to-1.6.1.patch.txt = patch/diff file from 1.6 to my changes

    Please see the next post for my changelogs and additional information.

    Feel free to test and let me know if there are any issues or other items you'd like me to check/fix/research. No promises on issue items that I do not specifically use or have the ability to simulate/test.
    2
    Changelog for updates by powinmo:

    110117
    Version 1.62

    1. Eliminated extra ProcExists checks around tskKills due to prior sub refactoring in 1.61

    2. fixed "sub tandem" so that tandem installs like .cab+.reg work now
    * the calls to FileInstallMethods never passed the proper fType and sType values to allow the tandem item to run
    ** eg, xyz.cab and xyz.reg never installs the xyz.reg file because it continued to pass the "CABfiles" fType/sType vs "REGfiles"
    * tested and verified at least a few .cab+.reg tandem installs

    3. fixed "Sub cabInteract" for failing on Manual CAB installations
    * the free space check during a Manual CABfiles install would fail because the SpaceFree check did not have a valid InstallDestination to use
    ** as a result CAB files in the filesCAB\Manual would sometimes fail due to insufficient free space on the target (would read 0 bytes free on bogus target)

    4. modified "Sub autoPhase" to add in second install pass on:
    a. registry
    * \Storage Card\XDA_UC\_Mod_\files2REG (localized as needed)
    Runs after filesCHT is processed
    * Allows for a final set of .reg imports prior to exiting S4X
    b. mscr
    * Location \Storage Card\XDA_UC\_Mod_\files2MSCR (localized as needed)
    * Runs after filesCHT and files2REG is processed
    * Allows for a final set of mscr scripts to run prior to exiting S4X

    eg, allows for something like after a CHT Import, you can import a direct registry tweak to override some CHT settings from a file in files2REGfrom a .reg file in files2REG

    5. Expose free space check multipler to target location during CAB file installations
    * Sashimi (and S4X inherited) defaulted to a value of 4
    ** if your target destination does not have 4 x the size of your CAB file free, the CAB will not install
    * exposed in autosettings.ini:
    ! section: [AutoSettings]
    ! key name: "freeSpaceMultipler"
    ! value: 1 to 99
    * default to 3 x CABsize if not defined in autosettings.ini

    5. Expose WaitFor text window during SDAuto CAB installations
    * Sashimi (and S4X inherited) defaulted to a value of 10 to 20
    ** if your target CAB did not load wceload within the timeout period it may cause the script to hang or skip
    * exposed in autosettings.ini:
    ! section: [AutoSettings]
    ! key name: "txtWindowWaitFor"
    ! value: 1 to 99
    * default to 25 seconds to wait for the wceload text window to become active
    * may need longer depending on how slow your device is and how large the CAB installations are

    9. tweaked pretty tabbing/spacing for a few lines here and there

    Other:
    a. CHTE2.0.0.0 importing still has issues with loading all settings. Known issue based on what I've seen in the CHTE2.0.0.0 threads.
    b. CHTE1.8.5.1 importing works fine.
    c. Running subsquent S4X sessions may "lockup" when trying to install SDAuto CABs. Basically any Text Window operation (WaitFor or WndExists) may crash after the first execution of S4X. This leads to the script just hanging there and will require you to manually kill the mortscript process. This looks like an issue with Mortscript b11 that S4X has packaged in, and not any fault of a custom ROM or S4X itself.



    101227:

    0. bumped version to 1.61 temporary so my updates can be differentiated from original author until they merge changes

    1. fixed/modified pimRestore sub
    * corrected: "sourcPIM" to "sourcePIM"
    * corrected: sType for PIMRestore registry write was missing - subsequent S4X executions would apply or miss PIB/PIM restores
    * added ability to execute an auto type script for PIB automation
    - auto-type scripts must be in the filesPIM directory
    - if "pimbackup.restore.mscr" was found, this script is run each time a PIB file is restored
    - if <filename>.mscr is found for a specific <filename>.PIB file, this script is run only for that PIB and overrides running the "pimbackup.restore.mscr" file

    2. refactored sub taskKill
    * exitSub(0) in MortScript 4.3.0.11 is broken and the taskKill sub terminates prematurely
    * eliminated the need to use exitSub
    * this caused items like dialerCAB to fail when it could not kill cprog.exe (for CDMA ROMs) properly
    ! If you have seen very odd behavior with items that required a taskkill, this MAY fix your problems...

    3. modifed sub chtRestore
    * fails if your filename is not exactly "chtbackup.cht" (default)
    * if default filename is not found, the sub will check for the most recent .cht file in the "filesCHT" directory and use that
    * no longer relies on the default filename
    * tested against CHT Editor 2.0.0.0 final and 1.8.5.1 - both work fine

    4. added MortScriptVersion output string to Init messages so we can debug what versions of MortScript is in use

    5. modified checking of xdauc.mscr so that the script works with Energy ROMs from Nov 2010 onwards

    6. tweaked pretty tabbing/spacing for a few lines here and there
    1
    OK, here's the fix for the newer energy ROMs... find the S4X_Auto.mscr in the XDA_UC\_Mod_\_bin folder and edit it as such:
    Code:
    ######################################################
    # PREPARING TO RUN MOD ###############################
    ######################################################
    
    	@backLightSettings
    [color=red]	If( scriptProcExists( "xdauc.mscr" ) )
    		waitForActive( "Reset", 30 )
    		sendRight( "Reset" )
    		sendCR( "Reset" )
    	EndIf[/color]

    delete only that which is in RED. enjoy =)