[UTIL] REG/RGU Cleaner

Search This thread

multi888

Senior Member
Mar 17, 2010
81
2
The :D smile means that you are just joking? :D

Just click on Input and select input file (the one that will be parsed)
Then click on Output and select output file (there it will be saved)
and click on GO


No I'm not joking, I'm very serious...:p

Where do I run this program? In the phone or my PC?
 

OndraSter

Retired Recognized Developer
Mar 27, 2009
2,083
272
31
Prague
Of course on your PC, it is tool for chefs that want to clean their registry files from shipped ROMs (usually OEMdrivers RGU and sometimes OperatorPKG have messed rgu files).
 

OndraSter

Retired Recognized Developer
Mar 27, 2009
2,083
272
31
Prague
Problem is in the ;

The same problem as upper, Ill do the same as I did with the previous one.

Are you sure that the ; is supposed to be there at all?
 
  • Like
Reactions: ceesheim

BeeGee_Tokyo

Inactive Recognized Developer
Nov 20, 2008
2,881
1,399
Paranaque
www.giesecke.tk
Hello OndraSter,

thank you for another great tool.

I have a question about cleaning the registry files.

Sometimes you find in .reg or .rgu files entries like:

[-HKEY_LOCAL_MACHINE\Software\Microsoft\Today\Items\"Wireless"]
[-HKEY_LOCAL_MACHINE\Software\Microsoft\Today\Items\LOC_TODAY_WIRELESS_0409]

As far as I know, this is to delete existing registry keys and all values in it. Your registry cleaner is removing this lines. What if the (in this example) the key "Wireless" was set by another reg file (earlier in the cooking sequence) and need to be deleted?
 

OndraSter

Retired Recognized Developer
Mar 27, 2009
2,083
272
31
Prague
Well, that will be problem.

I merge it in way that I delete in the loaded registry dump so they don't get written there.

Since this tool is mostly for OEMDrivers, they are parsed as one of the first rgu's. I can implement it as another type that will be left as delete, if you want.
 
  • Like
Reactions: ceesheim

magawa

Senior Member
Apr 29, 2009
212
22
great work keep it up

oem app from 306 kb to 112kb
oem driver from 207 to 86 kb

this is amazing
 

graz.raz

New member
Apr 23, 2010
1
0
please explaine - RGU CLEANER

sorry but I didn't understood:
in the input - were should I go in my phone to find the right files to clean
in the output - were it better to save them, and why to save them?
as you can understand I'm not have so much tecnical knowladge in this erea, please explain in a way also some one like me, can understand what he do, in order not tomake mistakes.
by the way- I use xperia X2
 

BeeGee_Tokyo

Inactive Recognized Developer
Nov 20, 2008
2,881
1,399
Paranaque
www.giesecke.tk
Of course on your PC, it is tool for chefs that want to clean their registry files from shipped ROMs (usually OEMdrivers RGU and sometimes OperatorPKG have messed rgu files).

sorry but I didn't understood:
in the input - were should I go in my phone to find the right files to clean
in the output - were it better to save them, and why to save them?
as you can understand I'm not have so much tecnical knowladge in this erea, please explain in a way also some one like me, can understand what he do, in order not tomake mistakes.
by the way- I use xperia X2

Just a few posts above you have the answer.

This tool is not to clean up the registry in your phone. It is for cooks to clean up the registry files before they create a new ROM.
 

BeeGee_Tokyo

Inactive Recognized Developer
Nov 20, 2008
2,881
1,399
Paranaque
www.giesecke.tk
Well, that will be problem.

I merge it in way that I delete in the loaded registry dump so they don't get written there.

Since this tool is mostly for OEMDrivers, they are parsed as one of the first rgu's. I can implement it as another type that will be left as delete, if you want.

Thinking about it, it would be nicer if the tool could scan and compare all registry files of a ROM build. This way it would be made sure that registry entries that are deleted or overwritten by other reg or rgu files could be found.

But I guess this is much more functionality than you planned to do with this tool.
 

af974

Retired Recognized Developer / Retired Forum Mod
Jan 22, 2008
4,934
1,683
Redmi Note 8
Damn....i was missing this new tool from you ,but finally i got it :D

Nice work as usual......thanks for sharing Ondra:)


@ NewsWriters : no comment :D
 

af974

Retired Recognized Developer / Retired Forum Mod
Jan 22, 2008
4,934
1,683
Redmi Note 8
First test: Amazing , ive only tried with an OEM rgu and it takes half space now :eek:......basically i could save over 2 mb in my rom:D

1st suggestion : if this should be drag 'n drop it could be more fastest :)
 

OndraSter

Retired Recognized Developer
Mar 27, 2009
2,083
272
31
Prague
It won't save space in your ROM:rolleyes: just make it human readable :D

Drag&drop is possible quite easily, I might add it someday if I remember it:D
 
  • Like
Reactions: ceesheim

Staxxthedan

Senior Member
Jan 30, 2009
1,088
759
Under His Wings
Hi,
I've been looking for some app, that will take my .reg or .rgu file (dump of WM registry), specially for OEMDrivers rgu, which is over 300kB large, delete duplicated stuff, sort it etc.

That's why I created this app.

What can it do:
- Grabs your input file, goes through it, takes together all registry nodes, when you have some key twice or more times, it gets overwritten so you're sure it isn't anywhere else after that
- Put it back to new output file :D
- Can remove "padding" zeroes at dwords, like you have "something"=dword:0000001 -- it removes the first zeros. They are not needed there and it is way readable IMHO (maybe not for everybody, so I made it as checkbox)

rguclean3435.png


It made from OEMDrivers RGU of size 313kB new one with only 135kB!

Great tool, Thanks man for all the efforts to make cooking easier:)
 

babak00000

Senior Member
Apr 27, 2007
184
0
Isfahan
At first, thanks for great tools, you provide to the community.
I use some of them everyday, and they help me so much.:)

About this tool:

Don't you think rgu size changes are mainly due to saving formats, as the tool saves them in ANSI?
Just save your rgu in ANSI and you will see the difference! (50% less space)
 

KilZone

Senior Member
Sep 14, 2008
145
1
Like your osKitchen, this works great! It makes life just that little easier, less mistakes better ROMs. Found one little bug (I think) though, it merges the following wrong:

Code:
[HKEY_LOCAL_MACHINE\System\StorageManager\Profiles\MSFlash\Part00]
   "CheckForFormat"=dword:1
;[HKEY_LOCAL_MACHINE\System\StorageManager\FATFS\filters\HTCFSFILTER]
;    "Dll"="htcfsfilter.dll"
;    "Order"=dword:0

As

Code:
[HKEY_LOCAL_MACHINE\System\StorageManager\Profiles\MSFlash\Part00]
"CheckForFormat"=dword:1
"    "Dll"="htcfsfilter.dll"
"    "Order"=dword:0

This is far from a problem, I can just remove those entries myself (besides this it works perfect), but I thought I should mention it. However, for most I just want to thank you for the perfect application!
 

OndraSter

Retired Recognized Developer
Mar 27, 2009
2,083
272
31
Prague
Are you sure? I messed with detecting comments because of that "" stuff so I maybe broke it. I'll check it when I get up :)
 

selyb

Senior Member
Mar 10, 2008
244
5
Shreveport
I wrote something like this some while ago [App] RGUber v1.21a, RGUOrder v1.4

RGUber is almost the same as your app but RGUber requires rgucomp.exe and cereg400.dll. RGUOrder organizes the rgu without processing the data, so comments, 'delete' keys, and duplicate entries are preserved. RGUOrder has no dependencies.
 
Last edited:

dharvey4651

Retired Senior Moderator
May 11, 2007
3,137
682
Olathe, Kansas
xdaforums.com
I know I'm a bit late to the party but I must say BRAVO!! This little app of yours is absolutely incredible. I used to do this by hand in my ROMS but no longer!!

Thanks a million for your great app. Will save me countless hours in the coming weeks when I update my Kitchen and ROM again.

-Dan
 

Top Liked Posts

  • There are no posts matching your filters.
  • 2
    Hi,
    I've been looking for some app, that will take my .reg or .rgu file (dump of WM registry), specially for OEMDrivers rgu, which is over 300kB large, delete duplicated stuff, sort it etc.

    That's why I created this app.

    What can it do:
    - Grabs your input file, goes through it, takes together all registry nodes, when you have some key twice or more times, it gets overwritten so you're sure it isn't anywhere else after that
    - Put it back to new output file :D
    - Can remove "padding" zeroes at dwords, like you have "something"=dword:0000001 -- it removes the first zeros. They are not needed there and it is way readable IMHO (maybe not for everybody, so I made it as checkbox)

    rguclean3435.png


    It made from OEMDrivers RGU of size 313kB new one with only 270kB! With human readable lines

    With version 1.7 I fixed bug, that it got saved as ANSI rather UNICODE (thanks for others noticing that), thus having 50% of file size compared to supposed size. But Unicode is the right way to save that, sorry guys! (Platformrebuilder can use both, but OSBuilder maybe not? Well this is the better way).

    Also, with 1.7, there's added option to run it from command line like rgucleaner.exe <sourcefile> <targetfile> and it _should_ close itself, but I'm not sure, I can't test it now. It was done as request :)

    Version 1.8 update -- fixed "="="something" line in Mango beta for HD2. (thanks tslany for reporting). Plus now any problem with parsing line when it fails parsing even before checking if it is correct is now catched too rather crashing and reports the problematic line.
    1
    :)

    Wait till I get back, I got updated version, I forgot to include mui_sz registry value kind:confused:.
    1
    OK, version 1.2 UP on first post!

    Fixed registry, where was - on beginning (delete)
    Added support for mui_sz string values
    1
    It doesn't delete anything, but:

    1. loads into "virtual registry" as if it was in real registry
    2. overwrites stuff that are twice etc (same name in each subkey) -- here gets lost most of the stuff, since many lines are in it sometimes more than one time*
    3. and dumps from the "virtual registry"

    And yes, for some unknown reason, whole system feels faster. But that's just some kind of psychics LOL.

    *EXAMPLE:

    [HKLM\something]
    "foo"=dword:0000001
    "bar"="hujah"
    "woohoo"=mui_sz:"phcanoverbmp.dll,#32"
    [HKLM\something]
    "bar"="newone"

    will merge into

    [HKLM\something]
    "foo"=dword:1
    "bar"="newone"
    "woohoo"=mui_sz:"phcanoverbmp.dll,#32"

    just as in real registry or when going in prb would happen.
    1
    Hi kokotas,
    You mean like go through all packages and clean their registry files?

    I think it is possible, Ill look on it when I get some time :)