Unyaffs / Makeyaffs utility (Windows / Linux) - Android Software Development

Some older version of unyaffs utility don't open recent new format of YAFFS file image.
There are some new structure for YAFFS file iamge (ex. 8192 bytes /segment and 448 bytes /spare)
The new utility (unyaffs) can support it, but if you want to recompile it should be encessary also makeyaffs (and it should be run under Linux - not under Windows)
Some link about other utils
Unyaffs /ehlers) - source: https://github.com/ehlers/unyaffs
To compile under Windows it's quite simple.
Install Cygwinwin (downlaod http://cygwin.com/setup.exe and run it).
As modules select: "gcc", "gdb" and "make".
Create a folder under "/Cygwin/home/@username" and put here the program source.
Run Cygwin. Go to the source directory. Run "make". You will have the .exe file compiled.
Copy the compiled .exe file plus CYGWIN.DLL (available in \CYGWIN) and in other folder and you can run utility.
Other usefull tools: http://code.google.com/p/yaffs2utils/

Related

CrunchIT Method

A Type of COMPRESS EXTENDED ROM that uses the SelF eXtracting Archive (SFX), done thru a Zip Program(Pocket Rar, Winzip, or Winrar), Zip it then Make a SFX with Nsctech CrunchIT 5.0, then add the XdA2JoJo.v3.0.1t.CAB in config.txt to automatically execute the ExtROM.exe and extract the files to TEMP folder, the files will be executed by autorun and needed to specify the \TEMP\ as the path, after installing all program files, it will remove the cab files in the TEMP folder with wei's Fast Cleanup 1.3
.. for more details about the CrunchIT Method Click Here

Build Cab File of an app

Hey Guys!
How can i Build a cab for my programs in vs2005 or have i to use another tool to do this?
thanks SciLor
WinCe cab manager does the job.
its not free though.
but its worth it
isnt there another tool i can use?
look in the Visual studio's help file on making an installer..i cant remember now but i did create a cab once..btw which version of VS do u use
This is from My VS 2008 Pro Documentation
This section describes creating CAB files for distributing ATL and MFC controls over the Internet. If you need more information about CAB files, see the Cabinet File Reference in the Windows SDK documentation (in MSDN Library/Setup and System Administration/Setup/Setup API/Overview/Cabinet Files).
To create a CAB file:
Create an INF file.
Run the CABARC utility.
Creating an INF File
The INF file is a text file that specifies the files (such as DLLs or other OCXs) that need to be present or downloaded for your control to run. An INF file allows you to bundle all the needed files in one compressed CAB file. By default, files with the same version numbers as existing files on the user's hard disk will not be downloaded. For more information about INF files and their options, including how to create platform-independent INF files, see About INF Files and Using INF Files in the Windows SDK documentation (in MSDN Library/Setup and System Administration/Setup/Setup API/Overview/Setup Applications).
As an example, the following INF will be used to create a CAB file for the ATL Polygon control. You can build POLYGON.DLL by downloading the ATL POLYGON sample files from the Visual C++ CD and building a MinSize version. If you build a MinSize version of the Polygon control, you need one additional DLL, ATL.DLL. Since ATL.DLL needs to be registered before POLYGON.DLL, put the ATL.DLL first in the INF file:
Copy Code
; Sample INF file for POLYGON.DLL
[version]
; version signature (same for both NT and Win95) do not remove
signature="$CHICAGO$"
AdvancedINF=2.0
[Add.Code]
polygon.dll=polygon.dll
atl.dll=atl.dll
; needed DLL
[atl.dll]
file-win32-x86=thiscab
FileVersion=2,00,0,7024
DestDir=11
RegisterServer=yes
[polygon.dll]
file-win32-x86=thiscab
clsid={4CBBC676-507F-11D0-B98B-000000000000}
FileVersion=1,0,0,1
RegisterServer=yes
; end of INF file
This INF specifies that ATL.DLL with the given version needs to be installed on the system. If ATL.DLL doesn't exist already on the system, it will be downloaded from the CAB file created with this INF. "thiscab" is a keyword meaning the CAB containing this INF. You can also download a needed DLL from an HTTP location by specifying an absolute or relative path, for example:
Copy Code
file-win32-x86=http://example.microsoft.com/mydir/NEEDED.DLL
The keyword "file-win32-x86" identifies the platform as x86 specific.
You can get the version number of a file by clicking the right mouse button on the file in Windows Explorer. Select Properties from the list that appears, then select the Version tab on the dialog box that appears. You will sometimes need to insert an extra 0 in the file version. For example, the version number for the ATL.DLL is shown as 2.00.7024 in the dialog box. This becomes 2, 00, 0, 7024 in the INF file.
The "DestDir" is where the directory where the file will be loaded: 11 specifies the system directory WINDOWS/SYSTEM or WINNT/SYSTEM32; 10 specifies the windows directory, WINDOWS or WINNT. If no DestDir is specified (typical case), code is installed in the fixed OCCACHE directory.
The "clsid" is the CLSID of the control to be installed.
Once you have created an INF file, run the CABARC utility (available in the Mssdk\Bin directory) to create the CAB file. You should run CABARC in the directory that contains your source files. On the command line, put the source files in the order they appear in the INF and the INF file last. For example, to make a CAB file for the Polygon control from the INF above, use the following command:
Copy Code
C:\MSSDK\BIN\CABARC -s 6144 POLYGON.CAB ATL.DLL POLYGON.DLL POLYGON.INF
The POLYGON.CAB file contains a compressed version of ATL.DLL and POLYGON.DLL along with the information needed to extract them in the POLYGON.INF file.
For an example of how to parse and extract component files from CAB files, see the CabView sample in the MSDN Online Code Center at http://msdn.microsoft.com/visualc/downloads/samples.asp (select the CabView link).
The DLL files you need to include with an MFC control are MSVCRT.DLL, MFC42.DLL, and OLEPRO32.DLL.
Running the CABARC Utility
The CABARC utility is available in the Mssdk\Bin directory. For example:
Copy Code
C:\MSSDK\BIN\CABARC -s 6144 n MYCTL.CAB NEEDED1.DLL NEEDED2.DLL MYCTL.OCX MYCTL.INF
CABARC creates a CAB file called MYCTL.CAB.
You should run CABARC in the directory that contains your source files (the INF, OCX, and DLL files). The files to be archived in the CAB file should be listed on the command line in the same order they are listed in the INF file. In the example above, the INF file should list NEEDED1.DLL first, then NEEDED2.DLL, and then MYCTL.OCX.
The -s option reserves space in the cabinet for code signing. The n command specifies that you want to create a CAB file. For a list of CABARC commands and options, type CABARC alone on the command line:
Copy Code
C:\MSSDK\BIN\CABARC
Click to expand...
Click to collapse
I found an older version of this online:
http://www.aperitto.com/content/view/14/159/
I have version 2.0 and it works great without registering the copy. Look into it
I can't find the original setup I used... sorry, I will keep looking... but I've heard good things about SPB's installatation creator
http://www.spbsoftwarehouse.com/products/ezsetup/index.html?en
It is easy with VS 2008 there you can create a CAB Builder

HOWTO: Get callstack for the threads in system calls - utilites

Hi!
There is utils for dump all threads call stack in application and for analyse it.
Dghsdb.exe – dump ulit. Use executable file name (name.exe) for command line parameter.
DumpParser.exe – run this util on desctop. Before it copy this util to directory with your winmobile app.
3 parameters:
1. Executable file name (name.exe or “name_part1 name_part2.exe”)
2. Dump file full path
3. Pdb file path (without file name).
DumpParser.exe name.exe c:\dump_file.txt D:\MyProject\Debug
See console for result

Squashfs Utils for Xperia ROMs

I have been looking to free up space in the ROM by reducing the size of the squashfs files in the System partition. These files contain ODEX files for some of the ROM packages. When pruning out some of these packages, the squashfs files are usually untouched, leading to wasted space. I have compiled the squashfs tools (a regular linux package) with the correct compression method for the xperia ROMs ('xz') in cygwin, together with a couple of cmd files with the correct parameters included for ease of use and the relevant cygwin support DLLs. These are latest versions as of 5th October 2016 and uses v4.3 of squashfs tools. This will allow you to:
1. Unpack the odex.app.sqsh, odex.priv-app.sqsh and odex.framework.sqsh files
- e.g. type: "unsq odex.app" to unpack odex.app.sqsh to a subdirectory called odex.app
2. Prune or add files to the folders (ensure you don't disturb the directory structure)
3. Repack the sqsh files
- e.g. type: "mksq odex.app" to pack file odex.app.sqsh from a subdirectory called odex.app
Download and extract the files from the following archive: https://drive.google.com/open?id=0B1H2QbfukxKxQmt1Umd3ZDc1elU
hey bro,im using Z3C stock rom based android 6.0.
i repacked and replaced sqsh file(changed own 644) ,when i make factory reset,it cant boot up again(after boot animation,show a black screen,after a while,it restart automaticly...finally,i got any FC stopped...) ......canyou help me to solove this ?(im sorry for my poor english)

How to extract the boot.img file from the oneplus 8 firmware for magisk rooting

Install Python for Windows - Windows is the easiest
Download Payload Dumper (you can find it on XDA by searching or google it)
Download your correct firmware file and unzip it, then discard everything except the payload.bin file - that's the only one you need
Make a desktop folder and name it anything you want. I named mine Python.
Install Python inside that folder.
Take the contents of the Payload Dumper (all the files) and put them in the folder also.
Also put the payload.bin file in that folder
Now open a command prompt ( you can do it in the address bar inside that python folder or whatever you named it by typing CMD).
Run the following two commands in terminal: python -m pip install -r requirements.txt
and the second: python payload_dumper.py payload.bin
that's it. The boot.img and other files will be in the output folder.
cityneversleepz said:
Install Python for Windows - Windows is the easiest
Download Payload Dumper (you can find it on XDA by
...
that's it. The boot.img and other files will be in the output folder.
Click to expand...
Click to collapse
Hi, that's not a question, so this belongs to the guide and discussion thread.
Thanks for doing that next time
cityneversleepz said:
The boot.img and other files will be in the output folder.
Click to expand...
Click to collapse
you could also just throw that payload.bin into the input folder in the payload dumper folder and double click payload dumper.exe

Categories

Resources