Help: How to extract the compressed files from XIP? - Upgrading, Modifying and Unlocking

Hi all, I'm doing sth. to O2 XDA Stealth rom.
But I found that the "files" (not "modules") in XIP are all compressed, boot.hv looks just like this:
{
"lightbox_close": "Close",
"lightbox_next": "Next",
"lightbox_previous": "Previous",
"lightbox_error": "The requested content cannot be loaded. Please try again later.",
"lightbox_start_slideshow": "Start slideshow",
"lightbox_stop_slideshow": "Stop slideshow",
"lightbox_full_screen": "Full screen",
"lightbox_thumbnails": "Thumbnails",
"lightbox_download": "Download",
"lightbox_share": "Share",
"lightbox_zoom": "Zoom",
"lightbox_new_window": "New window",
"lightbox_toggle_sidebar": "Toggle sidebar"
}
I compared the file with some other compressed files, and considered that the file was probabily compressed by LZX arithmetic.
So I tried to decompress the file with cecompr_nt.dll, and here is some codes:
Code:
HMODULE hDll= LoadLibrary(_T("G:\\Projects\\TestCompCE\\cecompr_nt.dll"));
if (hDll==NULL || hDll==INVALID_HANDLE_VALUE) {
printf("ERROR - Can not load the cecompr_nt library\n");
return -1;
}
FILE * hTest = NULL;
_tfopen_s(&hTest,_T("boot.hv"),_T("rb"));
int iSize =0;
fseek(hTest,0,SEEK_END);
iSize = ftell(hTest);
fseek(hTest,0,SEEK_SET);
BYTE * pBuf1 = (BYTE *)malloc(iSize);
BYTE * pBuf2 = (BYTE *)malloc(iSize);
fread_s(pBuf1,iSize,iSize,1,hTest);
fclose(hTest);
ZeroMemory(pBuf2,iSize);
FNCompressOpen CompressOpen= NULL;
FNCompressConvert CompressConvert= NULL;
FNCompressClose CompressClose= NULL;
CompressOpen= (FNCompressOpen)GetProcAddress(hDll, ("LZX_DecompressOpen"));
CompressConvert= (FNCompressConvert)GetProcAddress(hDll, ("LZX_DecompressDecode"));
CompressClose= (FNCompressClose)GetProcAddress(hDll, ("LZX_DecompressClose"));
if (CompressOpen==NULL || CompressConvert==NULL || CompressClose==NULL) {
printf("ERROR - Can not find the compression functions in the library\n");
FreeLibrary(hDll);
return -2;
}
DWORD stream = CompressOpen(0x10000, iSize, Compress_AllocFunc, Compress_FreeFunc, 0);
if (stream == NULL || stream==0xFFFFFFFF) {
printf("ERROR - CompressOpen");
return 14;
}
DWORD res=CompressConvert( stream, pBuf1,0x1AFF,pBuf2,iSize);//Compressed size of boot.hv is 0x1AFF
return 0;
But the CompressConvert function always returns 0 or -1 (i.e. failed)
So can anyone please tell me what's wrong with it? Is it not a LZX compressed file? Does I use wrong decompress function? Or there is no way to decompress it at all?
I found quite a number of ROMs have compressed files in XIP, such as O2 XDA Stealth, ASUS P525, ASUS P535 etc... So if we can decompress it, we should have much more stable and useful ROMs.
Thanks for your help and reading my post, and I appologize for my poor English.

Related

Scariping HTML - problems with non english characters

Hey guys
Really hope some friendly soul out there can help me.
Trying to build an app that uses DownloadStringAsync to download a HTML page. The problem is that Swedish characters (å, ä, ö) doesn't show up and just appear as a black diamond with a white questionmark in it.
{
"lightbox_close": "Close",
"lightbox_next": "Next",
"lightbox_previous": "Previous",
"lightbox_error": "The requested content cannot be loaded. Please try again later.",
"lightbox_start_slideshow": "Start slideshow",
"lightbox_stop_slideshow": "Stop slideshow",
"lightbox_full_screen": "Full screen",
"lightbox_thumbnails": "Thumbnails",
"lightbox_download": "Download",
"lightbox_share": "Share",
"lightbox_zoom": "Zoom",
"lightbox_new_window": "New window",
"lightbox_toggle_sidebar": "Toggle sidebar"
}
I guess it ahs to do with unicode or the lack of unicode but have no clue on how to fix it. I'm really new to this.
Please help, thanks in advance.
Edit: Of course I had to spell the title wrong... should be scraping
Have you tried setting the encoding to Unicode?
WebClient wc = new WebClient ();
wc.Encoding = System.Text.Encoding.UTF8;
williammel said:
Have you tried setting the encoding to Unicode?
WebClient wc = new WebClient ();
wc.Encoding = System.Text.Encoding.UTF8;
Click to expand...
Click to collapse
Thank you for your response!
Yes, I have tried it but maybe not exactly the way you suggested. But it didn't help.
This is what I get when debugging:
calendarItems = "R�sta nu\r\n"
Only other thing which you probably tried if you typed that in is
WebClient wc = new WebClient ();
wc.Encoding = System.Text.Encoding.Unicode;
You should post this on the create.msdn.com forums. Since it's run by Microsoft there's Microsoft employees and other people who are very helpful.
Try the HTML Agility pack. The latest version on codeplex has a sample WP7 library, which I found works very well. It should make your scraping easier, plus it'll probably be more flexible around encoding.
http://htmlagilitypack.codeplex.com/
Yes, this works perfectly with Unicode characters. HTML scrapping made easy with this.
Can someone post up the pre-compiled version and a short tutorial on how to use it properly?

[MOD] [Launcher-Theme] TW4.5 Glass-Blue

Hi Guys
Today i want present you my new Launcher-Theme.
Features:
Themed TW4.5 Launcher
Themed Dialer - Icon
Themed Contacts - Icon
Themed- Messeging - Icon
Installation:
Just download it and install it over CWM!
Download:
Only for JVP deodexed:
http://db.tt/bJflsMZ
Screenshots:
{
"lightbox_close": "Close",
"lightbox_next": "Next",
"lightbox_previous": "Previous",
"lightbox_error": "The requested content cannot be loaded. Please try again later.",
"lightbox_start_slideshow": "Start slideshow",
"lightbox_stop_slideshow": "Stop slideshow",
"lightbox_full_screen": "Full screen",
"lightbox_thumbnails": "Thumbnails",
"lightbox_download": "Download",
"lightbox_share": "Share",
"lightbox_zoom": "Zoom",
"lightbox_new_window": "New window",
"lightbox_toggle_sidebar": "Toggle sidebar"
}
Credits:
Fr4gg0r
Swiftwork
I am working on it, its not finished yet.
Have fun!
Waiting ...
Thanks anyway
Please use the integrated theming mechanism instead of modding the .apk, launcher will be updated later this evening so you can theme more icons.
Attached is an test version with more theming capabilities.. would be nice if you would try it and report back.
The following possibilities are added to the existing ones:
case Id.Menu.cancel: name = Settings.currentThemeDir+"menu_cancel.png"; break;
case Id.Menu.discard: name = Settings.currentThemeDir+"menu_discard.png"; break;
case Id.Menu.edit: name = Settings.currentThemeDir+"menu_edit.png"; break;
case Id.Menu.preferences: name = Settings.currentThemeDir+"menu_preferences.png"; break;
case Id.Menu.save: name = Settings.currentThemeDir+"menu_save.png"; break;
case Id.Menu.search: name = Settings.currentThemeDir+"menu_search.png"; break;
case Id.Menu.share: name = Settings.currentThemeDir+"menu_share.png"; break;
case Id.Menu.wallpaper: name = Settings.currentThemeDir+"menu_wallpaper.png"; break;
case Id.Menu.settings: name = Settings.currentThemeDir+"menu_settings.png"; break;
case Id.Folder.icon: name = Settings.currentThemeDir+"folder_icon.png"; break;
case Id.Folder.icon_mainmenu: name = Settings.currentThemeDir+"folder_icon_mainmenu.png"; break;
case Id.Folder.open: name = Settings.currentThemeDir+"folder_open.png"; break;
case Id.Add.folder: name = Settings.currentThemeDir+"add_folder.png"; break;
case Id.Add.shortcut: name = Settings.currentThemeDir+"add_shortcut.png"; break;
case Id.Add.wallpaper: name = Settings.currentThemeDir+"add_wallpaper.png"; break;
case Id.Add.widget: name = Settings.currentThemeDir+"add_widget.png"; break;
and
"pageIndicator.png"
Click to expand...
Click to collapse
I think that should be quite self explanatory..
Nice!
Will test it...
Sent from my GT-I9000 using Tapatalk
any easy way to install tw themes
hi sir i flash this theme on galaxy xxjvp very good relaible and speedy but i have 1 prob. message background is black and message cant read plz help me

[APP][2.1+]File Tools v3.0 [20/1/2013]

This is my own application.So Try it and Rate it.
File Tools
Version:3.0
Screen Shots:
{
"lightbox_close": "Close",
"lightbox_next": "Next",
"lightbox_previous": "Previous",
"lightbox_error": "The requested content cannot be loaded. Please try again later.",
"lightbox_start_slideshow": "Start slideshow",
"lightbox_stop_slideshow": "Stop slideshow",
"lightbox_full_screen": "Full screen",
"lightbox_thumbnails": "Thumbnails",
"lightbox_download": "Download",
"lightbox_share": "Share",
"lightbox_zoom": "Zoom",
"lightbox_new_window": "New window",
"lightbox_toggle_sidebar": "Toggle sidebar"
}
Descriptions:
File Tools is a collection for Tools to preform some useful actions on files.
Now it contains File Renamer,File Finder and Duplicate Finder.In future,i will add more tools based on your suggestions.
File Tools Features:
1.Collections of Useful Tools
2.Completely Ad-Free
3.Easy to Navigate
File Renamer:
Do you want to rename 1000 files or more than of that.Then really you need this tool.You can rename 1000 files by adding Date,Number,Custom Text etc at your desire position easily by this tool.
Features:
1.Custom Text
2.Numbering
3.Date
4.Find & Replace
5.Remove Char
File Finder:
Don't know where your files are placed or saved on your Memory Card and want to Search for your desire file easily.Then use this tool.You can easily locate your desire file by choosing a Filters like File Extensions,File Size etc..
Features:
1.Match Case.
2.Search on desire folders.
3.Filtering
Size limit.
Extension.
Duplicate Finder:
Do you have more files in your Memory Card and also having lot of Duplicate files(Same files found in different folders).Then you can easily search for it and able to delete it.By using this tool you can save more memory.
Features:
1.Byte by Byte Search.
2.Easy to delete.
3.Faster search.
Report at:[email protected]
Click to expand...
Click to collapse
Download:
Market link Inside:http://www.cybapps.com/view.php?id=8
(Don't forgot to click some ads)

[BOOTANIMATION][AUDIO][FLASHABLE] Sony Xperia X Bootanimation and Audio

Hi! I just want to share the Xperia X bootanimation and audio that I took from the official 8.0 (34.4.A.2.118) firmware and made some adjustment to the bootanimation to work perfectly on Grand Prime
I tested it on G530H (XCU) running (Unofficial) LineageOS 15.1 and theoretically should work on any AOSP/LineageOS based rom (maybe even on TouchWiz)
Preview
{
"lightbox_close": "Close",
"lightbox_next": "Next",
"lightbox_previous": "Previous",
"lightbox_error": "The requested content cannot be loaded. Please try again later.",
"lightbox_start_slideshow": "Start slideshow",
"lightbox_stop_slideshow": "Stop slideshow",
"lightbox_full_screen": "Full screen",
"lightbox_thumbnails": "Thumbnails",
"lightbox_download": "Download",
"lightbox_share": "Share",
"lightbox_zoom": "Zoom",
"lightbox_new_window": "New window",
"lightbox_toggle_sidebar": "Toggle sidebar"
}
MAKE A FULL BACKUP FIRST BEFORE FLASHING THIS ZIP !!
THIS ZIP WILL REMOVE THE STOCK BOOTANIMATION AND AUDIO FROM YOUR CURRENT ROM !!
How to install:
Boot into TWRP
Make a complete backup (or you can just backup your /system/ partition)
Flash the zip
Reboot
Download
View attachment 4690749
if the animation speed is too slow, you can change it in the desc.txt file (the default speed from Sony is 20fps)
Code:
540 321 20
p 1 0 intro #ffffff
p 0 0 loop #ffffff
c 1 40 outro #ffffff
How to change the animation speed
Copy the bootanimation.zip to somewhere else (internal storage/sdcard)
Unzip it
Open the desc.txt file with any text editor
Change the value "20" to something else (30/60, whatever you want)
Save your edit
Repack the bootanimation as a zip file with compression method Store
Replace the old one with the new one
Reboot
Thanks again
Sent from my Samsung Galaxy J2 Prime using XDA Labs

help! build nethunter kernel for lgv30

I try to compile nethunter kernel for lgv30, the goal is to enable wireless and hid functions. Now the wireless function has been successfully completed, but the hid function has encountered a problem
Patches_hid_hid_gadget-4.4.patch found from [kali-nethunter-kernel](https://gitlab.com/kalilinux/nethunter/build-scripts/kali-nethunter-devices/-/tree/master/patches/hid) merged with Two errors, from [Forums](https://forums.kali.org/showthread.php?48320-HID-on-4-X-kernel), I learned that there is no need to modify the kernel, but [enable usb function ](https://www.kali.org/docs/nethunter/nethunter-kernel-6-config-5/), and use [nethunter-installer](https://gitlab.com/kalilinux/nethunter/build- scripts/kali-nethunter-project/-/tree/master/nethunter-installer) compile the kernel, I followed the tutorial to complete this step, and then use twrp to flash into the phone
Now you can set hid mode, but it cannot be used, as shown
{
"lightbox_close": "Close",
"lightbox_next": "Next",
"lightbox_previous": "Previous",
"lightbox_error": "The requested content cannot be loaded. Please try again later.",
"lightbox_start_slideshow": "Start slideshow",
"lightbox_stop_slideshow": "Stop slideshow",
"lightbox_full_screen": "Full screen",
"lightbox_thumbnails": "Thumbnails",
"lightbox_download": "Download",
"lightbox_share": "Share",
"lightbox_zoom": "Zoom",
"lightbox_new_window": "New window",
"lightbox_toggle_sidebar": "Toggle sidebar"
}
My compilation environment is ubuntu20.04, [kernel source code](https://github.com/SGCMarkus/android_device_lge_h930) is los17.1 linux4.4.153
The compilation tool is google gcc4.9
Compile command:
Code:
./make_defconfig.sh nethunter_joan_defconfig
export ARCH=arm64 &&\
export SUBARCH=arm64 &&\
export PATH=/opt/gccarm64/bin/:$PATH &&\
export CROSS_COMPILE=aarch64-linux-android- &&\
make -j$(nproc --all) O=out nethunter_joan_defconfig
make -j$(nproc --all) O=out ARCH=arm64 \
SUBARCH=arm64 CROSS_COMPILE=aarch64-linux-android- \
CONFIG_DEBUG_SECTION_MISMATCH=y
make mrproper && make clean && rm -rf out
Did anything ever come of this? Ive been trying to find a v30 nethunter version for awhile now....
I've got Nethunter installed and monitor mode working with onboard wlan0. It is impossible to catch a handshake though. There's nowhere online that I can find a working Nethunter kernel for the V30. This page is basically dead but I don't know where else to go for help.

Categories

Resources