Attend XDA's Second Annual Developer Conference, XDA:DevCon 2014!
5,806,560 Members 52,812 Now Online
XDA Developers Android and Mobile Development Forum
View Poll Results: My Preferred Method is
1 Full XDA_UC Method, Full XDA_UC without RunCC or SDAutorun 17 51.52%
2 Semi XDA_UC Method, XDA_UC at second boot after RunCC has run at first boot. 7 21.21%
3 Method 3 Legacy Out Of The Box 9 27.27%
Voters: 33. You may not vote on this poll

[UC]XDA_UC V2.RC1, Automated & Silent User & Cook, Configuration Service[14/05/10]

Tip us?
 
FInixNOver
Old
(Last edited by Noonski; 30th March 2010 at 11:18 PM.)
#21  
FInixNOver's Avatar
Senior Member
Thanks Meter 409
Posts: 921
Join Date: Nov 2005
Hi everyone.

I'm gonna post my experience using RunCC.exe and SDAutorun.exe(for diamond).


I have to say a few things before I start:


  • I was going to post this on [REF] RunCC & AutoRun & SDAutorun [12-04-2009], but since the thread has been closed I thought this would probably be the best place to post it (if not, please point me in the right direction please).
  • I have not tried XDA_UC yet
  • I've tried this:
Code:
chk = oem.checkfileexist("\\Internal Storage\\sdconfig.txt")
if chk == 1 then
runcc.addrun("RunExtra", "run", "\\Internal Storage\\sdconfig.txt")
end
but got an error when it was going to install a cab, so I decided to combine the use of RunCC and SDAutorun without the need for Mortscript to start SDAutorun (I still use mortscript for other purposes, just not to start SDAutorun). This way I don't need to figure out how much time Mortscript must pause before launching SDAutorun.exe.

I'm using RunCC 1.0.9.1 (although I don't know if it's official or from a leaked ROM since I got it from a WM6.5 Kitchen in Diamond ROM Development section).

I would like to try that RunCC 1.0.9.0 you are talking about here to see whether it works or not, if someone will be kind enough to attach it here.

So, here's what I did:

Following the tutorial in
[REF] RunCC & AutoRun & SDAutorun [12-04-2009], I removed CheckAutorun.exe & CheckAutorun.lnk from the ROM OEM folders and the line in the initflashfiles.dat.
I also removed the welcome.lnk from the SYS folders and the line in initflashfiles.dat.

The contents of the key files used in my UC mix:


RunCC.lua

Code:
chk = oem.checkfileexist("\\Windows\\Autorun.txt")
if chk == 1 then
runcc.addrun("RunDefault", "run", "\\Windows\\Autorun.txt")
end


Autorun.txt

Code:
TSK: \WINDOWS\HTC Black.tsk
EXEC:\Windows\AutoAttribute.exe \Windows\MASD_RemoveReadOnly.txt
EXEC:\Windows\RunCC.mscr
CAB: \WINDOWS\HTCMMSProviderCAB_20080506.CAB
XML: \WINDOWS\Autorun_Config.xml
FILEOP: \WINDOWS\Menu_Operation.txt
FILEOP: \WINDOWS\File_Operation.txt
EXEC:\WINDOWS\SDAutorun.exe


RunCC.mscr
(adapted to my needs from the original by Noonski)
Used to create some files, delete a reg entry and copy another morscript file to startup folder
Code:
Copy( "\Windows\RunCC_default_bg_640_480.jpg", "\windows\AutoRun_default_bg_480_640.bmp" )
Copy( "\Windows\RunCC_default_bg_640_480.jpg", "\windows\AutoRun_default_bg_640_480.jpg" )

RegDelete( "HKLM" , "init" , "Launch58" )
Code:
 

Copy( "\Windows\RunX.mscr", SystemPath("Startup") \ "MortAutoConfigFirstrun.mscr" )


RunX.mscr
(adapted to my needs from the original by Noonski)
The file copied to the startup folder which will run at 2nd boot and will delete itself after running.
Used to Run Welcome.exe (for screen alignment), deleting some unnecessary files no longer used, etc...
Code:
Run("\Windows\Welcome.exe")

Delete( "\Windows\AutoRun_default_bg_480_640.bmp" )
Code:
 
Delete( "\Windows\AutoRun_default_bg_640_480.jpg" )

Move( "\Windows\Start Menu\Programs\Google Maps.lnk", "\Windows\Start Menu\Programs\Applications\Google Maps.lnk" ) 

SetFileAttribute(SystemPath("Startup") \ "MortAutoConfigFirstrun.mscr" , "readonly", FALSE) 
SetFileAttribute(SystemPath("Startup") \ "MortAutoConfigFirstrun.mscr" , "system", FALSE)
Delete(SystemPath("Startup") \ "MortAutoConfigFirstrun.mscr" )

Sleep("20000") 

Copy( "\Windows\_welcome.png", "\windows\welcomehead.192.png" )


SDConfig.txt

Code:
SHOW:\windows\AutoRun_default_bg_480_640.bmp
CAB: \Internal Storage\SDConfig\GoogleMaps-ms-htc_compressed.CAB
CAB: \Internal Storage\SDConfig\WM6_PPC_HTC_Opera9_WWE.CAB


And now some little explanations:


RunCC will be responsible for reseting the device after all customization is finished, so I had to change to this in RunCC package


[HKEY_LOCAL_MACHINE\Software\HTC\RunCC]

"ResetDevice"=dword:
1

So, there's no need to include reset command in SDConfig.txt, or even to create a reset file with mortscript.


I hope I made myself clear on what I did (if not, feel free to ask).

Since I have very little spare time these days, this took me a while to complete and as usual in XDA, is still a work in progress. Also due to lack of time I haven't had the time to study this new XDA_UC method.
I don't mean to disrespect any of the work being done here; I just wanted to share my experience, and maybe provide a little more knownledge to this great community.
Also, I'm providing a zip file with my packages used for this method in case someone wants to use them for something.
Attached Files
File Type: zip FInix_UC.zip - [Click for QR Code] (939.0 KB, 126 views)
Device history .: Magician | Prophet G4 | Trinity | Diamond | Diamond 2 | Desire HD :.

Current device .: Galaxy Nexus GSM | Rooted | ROM: Stock Android 4.3 | Xposed Framework | GravityBox :.


.: Got a question? :. | .: "Patience has a limit but Stupidity is INFINITE" :.
 
Noonski
Old
(Last edited by Noonski; 30th March 2010 at 11:19 PM.)
#22  
Noonski's Avatar
Moderator Emeritus / Recognized Developer - OP
Thanks Meter 122
Posts: 5,286
Join Date: Apr 2005
Location: Amsterdam

 
DONATE TO ME
Thanks,

I didn't even know the

FILEOP: \WINDOWS\File_Operation.txt
Command

Well for starters it is going to be a lot easier to configure in the new way.


But your post does show one of my initial intentions more control over what happens when after a flash. And it confirms that not all versions of RunCC are as good as the one L3v5y is using.


In the first tests i did i could not get RunCC to accept

EXEC:\WINDOWS\SDAutorun.exe
It just wouldn't run.

I then had one of my month and a half XDA Vacation stints because of a lot of bad luck.

Then when i started again i retried some stuff and found the mistake i made before that made me stop pursuing the silent install parameter for WCEload.

But then Cmonex put me on the right syntax for that and it changed my whole perspective on the case.
I posted to this forum because i would meet more cooks that would have direct problems from the new Rom Config setup. But the final version will be setup for older devices without RunCC to.
Searching for Anwsers on XDA? Try The FireFox & IE Search Bar Plug In

www.noonski.nl For My Device History, BackLog, Beer Gifting, Off Topic Rants and everything else that won't fit in my Signature.

 
bobsbbq
Old
(Last edited by Noonski; 30th March 2010 at 11:20 PM.)
#23  
bobsbbq's Avatar
Senior Member
Thanks Meter 353
Posts: 5,153
Join Date: Jun 2008
Location: Covington, LA

 
DONATE TO ME
Thanks for your work here I'm trying this out now and will report back. I tried SDAutorun with RunCC and I put AutoRun in as well and while they would run the AutoRun would try to run sometimes before the RunCC and thus cause screen recalibration evertime a soft reset. If I got through the calibration and date fast enough and the RunCC started first it worked ok.

Glad to know many good chef and developers are working on this.
HTC One T-Mobile version
Current ROM: Stock
Carrier: Solavei

Own your Cell service. Say no to contracts and take charge of your service.


**If you like my work click: Donations Here**

IF I HAVE HELPED YOU PLEASE USE THE THANKS BUTTON BELOW THE POST:
 
mac_es
Old
(Last edited by Noonski; 30th March 2010 at 11:20 PM.)
#24  
Senior Member
Thanks Meter 6
Posts: 272
Join Date: May 2008
Ok, It is working fine here:

21812, 0C0A, QVGA...


Method1, ok

Method2, not tested
Method3, ok

Also I want to understand the official runcc, scheme.


If I left the init line, I kept in a boot loop. How is done in the 'official' way?


Thanks
 
RoryB
Old
(Last edited by Noonski; 30th March 2010 at 11:21 PM.)
#25  
RoryB's Avatar
Recognized Developer
Thanks Meter 683
Posts: 2,776
Join Date: Sep 2008
Location: Lexington

 
DONATE TO ME
@Noonski, I got your invite to come look at this thread. I saw you stopped the group we were in. I apologize, I got busy trying to learn enough to finish S.V.I's Angel since he could not finish since his phone stopped syncing.

Just to let you know where I ended up with your ideas.

1) I still use the old SDAutoRun.exe since I wasn't sure what I would gain from trying the beta.
2) My Config.txt contains
Code:
HIDE:Disabled
LOCK:Disabled
EXEC: \windows\RoryB.mscr
EXEC: \windows\cusTSK.exe \windows\HTC_BrandGREY.tsk
EXEC: \windows\SDAutoRun.exe
The autorun.exe waits for the mscr to finish before it starts cusTSK.exe.
3) RoryB.mscr contains
Code:
SetFileAttribute( "\windows\RoryB.zip", "readonly", FALSE )
SetFileAttribute( "\windows\M2D_ver_23.zip", "readonly", FALSE )
Sleep( 1000 )
Unzipall( "\windows\RoryB.zip", "")
Sleep( 1000 )
SetFileAttribute( "\registry settings.reg", "readonly", FALSE )
Sleep( 1000 )
Runwait( "\Windows\TaskMgr.exe", "\registry settings.reg /silent" )
Sleep( 1000 )
Unzipall( "\windows\M2D_ver_23.zip", "")
Sleep( 1000 )
ForEach xshortcut, xsourcefile in regValues ( "HKLM", "\Software\MortShortcut" )
CreateShortcut( xshortcut, xsourcefile, TRUE )
EndForEach
rename( "\windows\start menu\Office Mobile\Excel Mobile.lnk", "\windows\start menu\Office Mobile\Excel.lnk", TRUE )
rename( "\windows\start menu\Office Mobile\OneNote Mobile.lnk", "\windows\start menu\Office Mobile\OneNote.lnk", TRUE )
rename( "\windows\start menu\Office Mobile\PowerPoint Mobile.lnk", "\windows\start menu\Office Mobile\PowerPoint.lnk", TRUE )
rename( "\windows\start menu\Office Mobile\Word Mobile.lnk", "\windows\start menu\Office Mobile\Word.lnk", TRUE )
Delete( "\registry settings.reg" )
I found I had to set attributes to not be readonly to get unzipall to work with nested subdirectories in the zip file. Also, if a file already exists, unzip fails and locks up. I'll have to post Mort about getting an overwrite = TRUE for unzipall.

RoryB.zip contains some files I want without having them in windows. For example the manuals for mortscript get unzipped to where I want them and there is only RoryB.zip in the windows folder. It also contains registry settings.reg such as network wizard settings to turn it on after the first boot instead of right after the hard reset. This avoids the notification during customization.


The foreach statement parses through registry key HKLM\Software\MortShortcut and and gets each parm and its value. It is similar to autoshortcut without adding another exe file. As an example the mxipupdate_QuickMenu_MortShortcut.provxml file contains
Code:
<wap-provisioningdoc>
Code:
  
 <characteristic type="Registry">
  <characteristic type="HKLM\SOFTWARE\MortShortcut">
   <parm name="\Windows\StartUp\QuickMenu.lnk" value="\Windows\QuickMenu.exe" datatype="string" translation="install"/>
  </characteristic>
 </characteristic>
</wap-provisioningdoc>
As a result I have quickmenu.lnk in windows\startup and I do not have a copy of it in the windows folder.
AT&T Samsung Galaxy S III running Quantum.4
Read About Me to see what I am working on & following like CHTS, Reminder and AppTask widgets, and CHT basic function tweaks. Also, Fixed CHT restarting when you have no tasks.
Mortscript | iniEditor | regEditor| MortScripts to toggle settings
Samsung Infuse 4G drowned. If you have one check out Scott's CM10 or CM10PA Firmware
ATT Fuze (HTC RAPH110) with Energy ROM: Energy.RAPHAEL.29022.Sense2.5.Cookie.2.0.Jul.06
HTC Wizard|See about me for my ROM collection and other work
 
RoryB
Old
(Last edited by Noonski; 30th March 2010 at 11:21 PM.)
#26  
RoryB's Avatar
Recognized Developer
Thanks Meter 683
Posts: 2,776
Join Date: Sep 2008
Location: Lexington

 
DONATE TO ME
4) the SDConfig.txt contains (some of it)
Code:
LOCK:Enabled
HIDE:Disabled
CPY1:\Storage Card\SDAUTO\User_C.mscr
CPY2:\User_C.mscr
CAB: \Storage Card\SDAUTO\S2U2-1.62-QVGA.CAB
CAB: \Storage Card\SDAUTO\Transcriber.CAB
CAB: \Storage Card\SDAUTO\GoogleMaps_3.0.1.6.CAB
EXEC:\User_C.mscr
HIDE:Enabled
LOCK:Disabled
RST: Reset
5) User_C.mscr contains (some of it)
Code:
# *****************
# Stop programs to make registry changes, etc.
# *****************
If(ProcExists("ilock2.exe"))
Runwait( "\Program Files\S2U2\iLock2.exe","-nomsg" )
Endif
 
While(ProcExists("ilock2.exe"))
kill( "ilock2.exe" )
sleep( 3000 )
endwhile
 
While(ProcExists("S2U2.exe"))
kill( "S2U2.exe" )
sleep( 3000 )
endwhile
 
While(ProcExists("QuickMenu.exe"))
Kill("QuickMenu.exe")
sleep( 3000 )
endwhile
 
While(ProcExists("manila2d.exe"))
Kill("manila2d.exe")
sleep( 3000 )
endwhile
 
# *****************
# Delete AutoSnooze to try to stop reminder repeat 
# *****************
If( RegKeyExists( "HKCU", "\ControlPanel\Notifications\Reminders\AutoSnooze" ) )
  RegDeleteKey( "HKCU","\ControlPanel\Notifications\Reminders\AutoSnooze", TRUE, TRUE )
Endif
 
# *****************
# Create folder in Programs called "Explorers" and move shortcuts into it 
# *****************
MkDir( "\Windows\Start Menu\Programs\Explorers" )
 
Move( "\Windows\Start Menu\Programs\Internet Explorer.lnk", "\Windows\Start Menu\Programs\Explorers", TRUE )
Move( "\Windows\Start Menu\Programs\Google Maps.lnk", "\Windows\Start Menu\Programs\Explorers", TRUE )
 
Copy( "\Storage Card\SDAUTO\CopyFiles\S2U2_stuff\AT&T.png", "\Program Files\S2U2\gfx\operator\AT&T.png", TRUE )
 
Move( "\Windows\Start Menu\Programs\S2U2\*.*", "\Windows\Start Menu\Programs\Accessories\S2U2", TRUE, TRUE )
DelTree( "\Windows\Start Menu\Programs\S2U2" )
 
# *****************
# Running registry settings
# *****************
 
ForEach xregfile in Files( "\Storage Card\SDAUTO\REG Files\*.reg" )
   Runwait( "\Windows\TaskMgr.exe", xregfile & " /silent" )
   While( ProcExists ( "TaskMgr.exe" ))
     sleep( 1000 )
   endwhile
EndForEach
 
ForEach xxmlfile in Files( "\Storage Card\SDAUTO\XML Files\*.xml" )
  Runwait( "\Windows\TaskMgr.exe", "/provxml " & xxmlfile  )
  While( ProcExists ( "TaskMgr.exe" ))
     sleep( 1000 )
  endwhile
EndForEach
 
UnZipAll( "\Storage Card\SDAUTO\User_C.zip", "" )
Sleep( 1000 )
 
RunWait( "\Windows\TaskMgr.exe", "\User_C.reg /silent" )
While( ProcExists ( "TaskMgr.exe" ))
  sleep( 1000 )
endwhile
 
If( FileExists( "\User_C.reg" ))
  sleep( 1000 )
  Delete( "\User_C.reg" )
EndIf
 
If( FileExists( "\User_C.mscr" ))
  sleep( 1000 )
  Delete( "\User_C.mscr" )
EndIf
User_C zip and the reg file contains what it takes to have programs on sd card run without using the cab to install. Basically I unzip files to their correct folders and the User_C.reg sets the registry for the programs.
AT&T Samsung Galaxy S III running Quantum.4
Read About Me to see what I am working on & following like CHTS, Reminder and AppTask widgets, and CHT basic function tweaks. Also, Fixed CHT restarting when you have no tasks.
Mortscript | iniEditor | regEditor| MortScripts to toggle settings
Samsung Infuse 4G drowned. If you have one check out Scott's CM10 or CM10PA Firmware
ATT Fuze (HTC RAPH110) with Energy ROM: Energy.RAPHAEL.29022.Sense2.5.Cookie.2.0.Jul.06
HTC Wizard|See about me for my ROM collection and other work
 
Noonski
Old
(Last edited by Noonski; 30th March 2010 at 11:21 PM.)
#27  
Noonski's Avatar
Moderator Emeritus / Recognized Developer - OP
Thanks Meter 122
Posts: 5,286
Join Date: Apr 2005
Location: Amsterdam

 
DONATE TO ME
I used a similar way in the registry to add the shortcuts and deleted the whole key at the end.

But was not using Endwhile for that so good idea there.

xda-developers - Reply to Topic


HTC is also switching from putting their autoshortcut links from provxml files and moving these to rgu.


Should save those extra unneeded provxml files.


This new setup should reduce a lot of the scripting for those not familiar with it. But again it's great to see how others are leveraging the added control in a creative way that suits them best.


But i have to say to others "Don't get get scared away" by some of the previously posted methods. The basis of the XDA_UC will be very easy to implement. But you'd be giving the hardcore tweaking part of our community a lot of freedom in adding their own customizations.


PS: Your using QuickMenu, cool, it rocks so much more in straight forward quick use. To bad it's not updated regularly. Hoping for a release to Get rid of that damn Manilla issue taskswitch issue.
Searching for Anwsers on XDA? Try The FireFox & IE Search Bar Plug In

www.noonski.nl For My Device History, BackLog, Beer Gifting, Off Topic Rants and everything else that won't fit in my Signature.

 
Laurentius26
Old
(Last edited by Noonski; 30th March 2010 at 11:22 PM.)
#28  
Laurentius26's Avatar
Recognized Developer
Thanks Meter 1,151
Posts: 7,948
Join Date: Nov 2005

 
DONATE TO ME
What can I say, awsom work gentleman thank you!
I'm going to check this out immidiatly.

Grtz, Leo

 
Noonski
Old
(Last edited by Noonski; 30th March 2010 at 11:22 PM.)
#29  
Noonski's Avatar
Moderator Emeritus / Recognized Developer - OP
Thanks Meter 122
Posts: 5,286
Join Date: Apr 2005
Location: Amsterdam

 
DONATE TO ME
I will start changing the script after a little break (tonight), with a few extra ideas from the input from previous threads.

There will be one that takes RunCC into account and another that takes Autorun into account.


I will document as much as possible.


Rory


Still fun to see how close to each everything we have done lies.

I was using
HKLM\Software\Mortinstall\LNK
As the directory to create Shortcuts from.

I have added your

While( ProcExists ( "TaskMgr.exe" ))
sleep( 1000 )
endwhile

And aplied it to WCEload and CusTSK.exe.


To help get the Finished Installation message timed at the correct moment.


And also made the Link installation from Registry a part of the process.


Etc to the Script i'll be uploading tomorrow.

It's getting ro late now.
Searching for Anwsers on XDA? Try The FireFox & IE Search Bar Plug In

www.noonski.nl For My Device History, BackLog, Beer Gifting, Off Topic Rants and everything else that won't fit in my Signature.

 
RoryB
Old
(Last edited by Noonski; 30th March 2010 at 11:22 PM.) Reason: Problem downloading
#30  
RoryB's Avatar
Recognized Developer
Thanks Meter 683
Posts: 2,776
Join Date: Sep 2008
Location: Lexington

 
DONATE TO ME
Funny thing.

Last night I realized I could move the registry settings to the rgu and get rid of the provxml. We do seem to attack this from different directions and end up at the same place or close to it.


I forgot to subscribe to this thread so I just now saw your posts as I went to mention this idea.


I'll need to add the delete registry key to my script.

---------------

I cannot download the OEM packages. I am trying to see your command line for wceload to see is there a way to force not asking where to install. That is why I still use sdautorun. If I could install cabs without having to respond I would use a mortscript line to do so.
AT&T Samsung Galaxy S III running Quantum.4
Read About Me to see what I am working on & following like CHTS, Reminder and AppTask widgets, and CHT basic function tweaks. Also, Fixed CHT restarting when you have no tasks.
Mortscript | iniEditor | regEditor| MortScripts to toggle settings
Samsung Infuse 4G drowned. If you have one check out Scott's CM10 or CM10PA Firmware
ATT Fuze (HTC RAPH110) with Energy ROM: Energy.RAPHAEL.29022.Sense2.5.Cookie.2.0.Jul.06
HTC Wizard|See about me for my ROM collection and other work

Tags
autorun, configuration, cooking, customize, diamond, raphael, rhodium, runcc, sdautorun, td2, topaz, user
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes