make_boot_hv.bat problem - MDA III, XDA III, PDA2k, 9090 Software Upgrading

it return this message:
importing registry file ".\boot.rgu"...
Failed to parse value name HKEY_CURRENT_USER\Software\Microsoft\Windows!!!
InitRegistry FAILED in file ".\boot.rgu" within a few lines of line 3.
BuildBootHive: (RGUComp) !ERROR failed importing ".\boot.rgu"
wmain: (RGUComp) !ERROR failed building BOOT hive
help me

to avoid that error
make sure that theres one entry per line. e.g
correct
"ww"=dword:0
"vv"=dword:1
wrong
"ww"=dword:0 "vv"=dword=1
if I were you, use ms word to edit rgu files..
like for example, you have default.hv, generate using rgucomp.exe to make it .rgu, now open the rgu files with msword ang save it as xxx.txt (unicode), rename that again as xxx.rgu and use ms word if you want to modify smething.. now you don't have to worry again getting that error message..

ok
now work
my notepad going crazy

Related

Cooking a rom...

Hi, I followed the thread: "How to reconstruct a dumped ROM"... (obviously I had, before, did a rom dump!). Now I have a directory named "dump" with several subdirs.
In the step 3) there is written: "After this step you can optionally edit the OS files with the proper tools"... now the question is: what are these proper tools? I searched in the forum, in the other threads but I didn't find anything... My needs are: to delete some programs that are in the rom (for example Pocket Word, Pocket Excel, other..) in order to obtain more space, but to install other tools at the free space.
Thanks in advance for your help....
Great question ! i can't help you , but i wait for answers ....
I asked the same thing the other day, and got an answer(thx again to him).
Actually, I'm doing it right now, as a test I've successfuly dumped and rebuilt lsvw's rom using enhanced imgfs tools batch files, nbdump.bat nbname.nb & nbbuild nbname.nb, now I'm removing files from the rom and maybe add some other, like that quick gps thingy, latest msn(optimized for trinity, removed vga resources), phone pad, and some other thing on my custom extrom.
I had the same doubt as you, but it seems that we're overcomplicating things, you can simply use the file explorer to remove files from that dir, beware of which files you remove/alter.. initflashfiles.dat has some operations to be done after flashing the device(creating folders,renaming files, moving them to startup/start menu/etc folders), I thought that if the file didn't exist on the windows folder, whatever invoques initflashfiles.dat would crash, but it doesn't seem to be the case, I haven't put this to test, but I've found several missing files on the initflashfiles.dat(and a typo, "floder", go figure what it means - lazy/rushed editing IMO), so there seems to be some tolerance to the operations contained in that file.
I won't edit the wiki until I'm 100% sure that what I know is correct, but to sum it up:
dump the files
add/delete files with explorer
edit the registry using rgucomp
edit initflashfiles.dat using the original windows notepad & use an hexeditor to remove the 1st 2 bytes
run NBBuild.bat to create the *.nb file
OSchecker.exe to validate the *.nb file
nbhtool.exe to create the nbh
flash it(I prefer the sd card method)
Code:
rgucomp needs setting _FLATRELEASEDIR environment variable to current directlry like this:
set _FLATRELEASEDIR=.
Dump default.hv/user.hv file to .reg with:
rgucomp.exe -nologo -o default.hv > default.reg, then add line "REGEDIT4" to the beginning of REG file.
Modify the .reg file to your liking, (save it in UTF-16 with CR+LF terminations and a new line at the end of the file) and convert it back to .hv
And don't forget to flash Olipro's Hard SPL before, it may save your device.
"and convert it back to .hv"
http://forum.xda-developers.com/showpost.php?p=1186635&postcount=1
(no wonder I didn't find this info, forum search is almost useless, googled for rgucomp and voilĂ , first result(above) right answer)

Registry Editor export/import fails

i use Resco Register Editor and i want update (save) my original registry data after a Hard Reset. I did ...but it fail
i selected "my registry" then i choose -> export and i saved the file like: name.reg
when i tried to restore the registry i used ---> import and the file "name.reg" i saved before but i got error message , is says ..is not a valid registry file
someone had the same problem ?

RGU issue

Can somebody explain to me, why this registry key doesn't work???
Code:
[HKEY_CURRENT_USER\Software\Microsoft\Today]
"Skin"="\windows\Htc black.tsk"
All other keys are working, except this one here.
Here is the kitchen log:
Code:
Failed to parse value name HKEY_CURRENT_USER\Software\Microsoft\Today!!!
InitRegistry FAILED in file ".\Registry\5216cacc-522b-4a02-a974-b2e85bec2f62.rgu" within a few lines of line 58.
ImportFromPackageListStrict: (RGUComp) !ERROR failed importing ".\Registry\5216cacc-522b-4a02-a974-b2e85bec2f62.rgu"
wmain: (RGUComp) !ERROR failed building DEFAULT hives
Check if you don't have any special characters on these lines like space, tabs etc... and remove them.
If you're under Windows OS, you can also copy all your rgu file into bloc note and copy the text from bloc note to your rgu file again.
Do no look at these lines only but the whole file.
Remeber that you must have "REGEDIT4" on the first line and an empty line at the end of the file.
Be sure that your GUID file name is unique. If there is another file that have the same name, use Package creator to generate a new one and rename it!
Here are some rules that i follow to cook my roms ^^
Hope this help!
Solved problem by using xml.. Close Please

Modification.

i cant find how to modify a ROM..
i mean after converting NK.NBF into DUMP folder if i want to remove any application and add another one how to do that?
like i want to add some plugins like arcsoft MMS,office and adictionary into a ROM how to do that..
thanx
well, that is done manually, you need to remove all the files/add the files from the OEM package there (exclude the option.xml and initflashfiles.dat and the dsm's and RGU) just copy the files, then when you goto the next step,or the step where you need to modify the HKLM and HKCU files, just open the OEM's RGU file, cpoy the keys and paste it in the Presented HKCU/HKLM and when you go to the other step, where you are required to edit the initflashfiles.dat, open the OEM's initflashfile in notepad, copy its content and paste it into the Main initflashfiles.dat of the ROM you are extracting, ther, that should do it
Note : make shure you hex edit the initflashfiles.dat and remove the first 2 bytes from the file (something like dd dd) or else your rom wont boot!!
if you dont want to hex edit, you can use my intiflashfiles Builder which is included in my kitchen, http://forum.xda-developers.com/showthread.php?t=378498
Ps. there is a guide too there

Theming mediatek-res.apk

I have been interested in theming an MTK 6592 mediatek phone (Infinix Hot Note x551) I have owned for quite a while. Its currently running Stock Android 5.1 Lollipop.
I reached a point where I needed to decompile and recompile the mediatek-res.apk framework resource app.
I was using apktool version 2.1.1 and later on 2.2.0-a4270d-SNAPSHOT
I wanted to get rid of this notification item, every time you opened the Dialer, Contacts or Mms application. I found it annoying - asking every time to choose a default simcard, when I clearly wanted and is able to choose a line on calls, or outgoing SMSs.
Sorry, cant post image links yet!!
Click to expand...
Click to collapse
After a few weeks of on-of/trial and error research, I realized that these could be accomplished by editing the mediatek-res.apk located in /system/framework/mediatek-res.
It decompiled ok, but could not compile after editing(again, trial-error).
These were the compilation errors I was getting: A tonne of errors concerning all the resources and their Id's:
HTML:
W: /home/*****/Desktop/mtk/mediatek-res/res/layout/account_five.xml:6: error: Error: No resource found that matches the given name (at 'id' with value '@id/account_five_img').
I read up on this error and one post here on XDA (didnt save the link, sorry) and also over at github, said to edit the apktool.yml file and include the framework ID for the mediatek-res.apk (already installed via 'apktool if mediatek-res.apk'). Its framework ID was 8. So I added it.
HTML:
usesFramework:
ids:
- 1
to
HTML:
usesFramework:
ids:
- 1
- 8
On compilation, a ton of these new errors came up:
HTML:
W: /home/*****/Desktop/mtk/mediatek-res/res/values/styles.xml:3: error: Resource entry style/ImageSwitch is already defined in package com.mediatek.
Looked around furrther for quite sometime couldnt get a solution to this new errors. I continued on my trial and error ways and discovered that If edited the apktoo.yml file
HTML:
sharedLibrary: false
to
HTML:
sharedLibrary: true
and removed the mediatek-res framework ID from apktool.yml file, the errors were reduced to TWO!!
HTML:
W: /home/*****/Desktop/mtk/mediatek-res/res/values/public.xml:914: error: Public symbol ^attr-private/factor declared here is not defined.
HTML:
W: /home/*****/Desktop/mtk/mediatek-res/res/values/public.xml:915: error: Public symbol ^attr-private/scale declared here is not defined.
On investigating the error, I found out that indeed the two resources( ^attr-private/scale & ^attr-private/factor) were not defined in Ids.xml located in /res/values. I added the two to the bottom of the file,
HTML:
<item type="^attr-private" name="factor">false</item>
<item type="^attr-private" name="scale">false</item>
Also I renamed the file ^attr-privates.xml to ^attr-private.xml
On compilation, NO ERRORS!! and the app but pushed to system the phone ends up in endless bootloop.
I finally resolved the bootloop by replacing the resources.arsc in the compiled apk by the one from the original resources.arsc. They differ in size by a few kilobytes.
STEP BY STEP
1. Using APK Multi-Tools, use option
1. Extract APK
Click to expand...
Click to collapse
. Go to Projects folder and copy the resources.arsc file. This is the original file you shall place in the compiled app.
2. Compile as usual the modified mediatek-res app.
3. Go to '/Build/apk' folder and replace the resources.arsc therein with the one from setp 1.
4. Compile a second time.
5. Your apk will be able to boot and run ok now.
Because I am not very well versed with apktool and its inner workings, I don't know why this errors came up. I know this is a work-around, but for now it will have to do.
If this post saves you a few hours/days/weeks of research, hit thanks!!

Categories

Resources