[Q] How to apply apk.p to original apk - G2 and Desire Z General

I downloaded the official OTA file for Desire Z (for TW version).
The file includes several apk.p and odex.p files.
Some of them are in bsdiff format and some of them are in imgdiff2 format.
I can use bspatch to apply the files in bsdiff format.
But I don't know how to apply the files in imgdiff2 format.
Is anyone know how to deal this kind of files?

Related

[How To] Create a custom firmware for SmartQ Ten3 T15

These are the steps explaining you how to create a custom firmware based on the SmartQ firmware releases.
Warning : Creating a firmware and changing the files may cause your device to stop working, I won't be held responsible for any damage caused by this.
Creating a firmware file is actually very easy, not much is involved and nothing more than some basic software is required to create the files. If you don't understand the steps below than maybe you shouldn't fiddle around with this and wait for other members to create these.
There is nothing explained here about the flashing itself, as I will create a seperate How-To about that with pictures explaining the steps of the recovery.
Also there is nothing explained about kernel building itself, I have no clue how to do that and I'll leave that up to SmartQ.
Use the instructions below to make your own Firmware file with the software you want in it and make all configuration changes you want.
1. If you haven't already download the latest official firmware from SmartQ.
2. Extract the zip file. You then have 2 files, a Chinese .txt file with the release notes. And a file called "SmartQT15".
3. Rename the file "SmartQT15" to "SmartQT15.zip". Accept any warning about making the file useless, as in fact you are making it useful.
4. Extract the zip file. Then you end up with 4 new folders :
"boot" - This will be the files required for booting the OS. And possibly the recovery.
"data" - The user apps and data are in this folder.
"META-INF" - The certificate SmartQ used is in this folder and also the update script that manages the update process.
"system" - The actual Android OS.Stay clear of the boot folder, unless you are 100% sure about what you are doing, this may cause a bricked device without the possibility to reflash.
Add apps to the app subfolder in the data folder. Make sure if you do add apps to set the permissions in the update script file and make changes accordingly. The data-extra.tar file is extracted during the update process.
In the "META-INF\com\google\android" folder you can find the updater-script file, you can edit this with Notepad++. This file tells the CWM based recovery what to do and in this file the permissions are set for apps. Also is it required to edit this if you want to create a pre-rooted firmware.
Be carefull what to change in the system folder it can cause your OS not to boot, but it should be no problem to revert back to another build that did work previously as you didn't touch the boot folder and the recovery should work normally.
Once you have made all the changes you wanted to do. You follow the steps back.
5. zip the 4 folders backup using Winzip or WinRAR, whatever suits you best (You can use compression, I tried out Fast, Normal, Good compression in WinRAR and the firmware flashed without problems). Make sure you have the 4 folders in the "root" of your zip file. Use for filename "SmartQT15.zip"
6. Rename the "SmartQT15.zip" file to "SmartQT15" and accept any warning again about changing the extension of your file.
You have now created a flashable firmware file for the SmartQ Ten3 T15.
Copy his file to the root of an empty microSD card and follow my How-To about flashing Custom Firmwares.
Don't use the guide to flash original SmartQ firmwares as this won't work, by changing the firmware package you break the firmware signature and the recovery will check for this during flashing.
Signature checking can be disabled though in the recovery as I will explain in the new How-To.
If you have any questions feel free to post below and I'll do my best to answer them, all the above is based on my experience and from what I could find out on the Internet.

[Q] How to merge external files with rom files?

Hey guys,
I just started the long journey of android rom development/cooking using an app called Android Kitchen, and I'm looking for some help from the more experienced. I extracted a custom rom folders (for personal use), and started to edit some of the extracted files (replacing and deleting), but I'm quite lost when it comes to merging flashable .zip folders (like lockscreens and mods) with the extracted rom file.Should I copy and paste whats inside the flashable zip into the rom file? Or should I use note editor to copy what's inside the mod file itself, copy the text, and add it to the original one? I really want to add these mods through this app rather than recovery mode. And can I emulate edited roms on my computer rather than risking my phone?
Thnx...

(Q)New to devoloping, trying to alter an already built rom. Any guidance appreciated

I just have a couple questions, I've been adjusting theme zips by changing around files in the zip then flashing.
I wanted to alter a rom I have by changing the apks that are in the system/app , data/app, and framework folders. Usually I'm able to view apks as zips, but I'm the rom zip file, I cannot. I can't seem to write in the zip file at all...
And I can't change is permissions cuz when I go into the root section in my xplore file manager, anytime I view the sd or extsd Cards, I don't get the same options.
Any guidance is appreciated
You've Just Been Tapatold ♧♢dbombROMv3beta♤♡
☆FlappyBird☆Score ☆ 85 ☆
Or if I'm in the wrong section... where should I go?
You've Just Been Tapatold ♧♢dbombROMv3beta♤♡
☆FlappyBird☆Score ☆ 85 ☆
you cant edit files IN compressed files. (zips)
extract the files you want to edit. edit them, then place them back in the zip, overwriting the old versions of the files you edited.
though it is best to extract the whole rom zip, edit then re-zip everything. most recoveries dont require signed zip files, or can be disabled, so you dont even need a special tool to re-zip them most of the time. just use windows zipping. or win rar with 0 compression.
Start reading here.
http://forum.xda-developers.com/general/xda-university
one of the top posts is how to make recovery flashable zips.

[Q] How do I add my own img file to a separate partition ?

I am a beginner, and I have compiled a game built with C. The instructions I have say that I have to flash the final .img file to a separate partition on my SM-N900P. Now I have successfully downloaded the stockfirmware, unpacked it with mkbootimg, built my own dtb.img and flashed the phone. (Side note: I got an error about Samsung Keyboard, which if you know how I can address I would be grateful). I do not know how / where to put the .img file I compiled though. Do I pack it when I tar my files?

convert tar to zip?

I've been scouring the interweb looking for a way to take a stock tar file and convert it to a zip file that will flash with twrp. I know it can be done, but thus far I'm not happy with the processes I've found... how do you guys do it?
The stock TAR files contain partitions in IMG format - an all in one file system, and in this case using EXT4 formatting.
In order to create a ZIP, you need to access the files on the partition, which means finding a way to mount those IMG partitions to copy their contents, or find a piece of software to extract from them w/o mounting. Since they are EXT4, you can probably assume a Windows solution isn't available (EXT4 is Linux). Some utilities may exist to handle EXT4 on Windows, but finding one that knows EXT4 and can extract/mount an IMG file is pretty specific.
EDIT : found a utility for you - http://forum.xda-developers.com/showthread.php?t=2285831
If you can somehow get the files out of the archive, you'll need to find a tutorial on the structure of a flashable ZIP. Generally, its just folders and files but there is also a META-INF folder, scripts to install and set permissions, etc. There are likely threads here on XDA that can detail these steps.
Spitzaf, thanks so much! I was hoping for just such a tool

Categories

Resources