If you ever came across one of these QSB files from Lenovo and wondered how you could make use of it, this is what you are looking for. It is mostly wild guessing but this script have been tested successfully on 3 different QSB for the Vibe Z (K910).
You need Perl and its XML Simple extension in order to run the script.
Every feedback will be greatly appreciated.
csu333 said:
If you ever came across one of these QSB files from Lenovo and wondered how you could make use of it, this is what you are looking for. It is mostly wild guessing but this script have been tested successfully on 3 different QSB for the Vibe Z (K910).
You need Perl and its XML Simple extension in order to run the script.
Every feedback will be greatly appreciated.
Click to expand...
Click to collapse
Noob questions, I know:
How can I use this instead on running on linux? Can you build a win version? If I begin to work in a virtualbox machine, which are the steps?
katalinscrob said:
Noob questions, I know:
How can I use this instead on running on linux? Can you build a win version? If I begin to work in a virtualbox machine, which are the steps?
Click to expand...
Click to collapse
Good news is that since Perl is scripting, it should work pretty easily under Windows. If it is installed on your machine, just
Code:
perl split_qsb.pl
should be enough.
As for the extension needed (XML Simple), if I remember correctly, Perl is shipped with a configurator allowing to download such addon pretty easily.
I get this:
Code:
Data starts at offset 0
End of index detected
-1 entries and 0 bytes extracted
Rebuild the splitted files...
File does not exist: rawprogram0.xml at split_qsb.pl line 185
I think that it cannot split the qsb file, it's a lenovo firmware update, you now why this happen?
Thanks!
csu333 said:
Good news is that since Perl is scripting, it should work pretty easily under Windows. If it is installed on your machine, just
Code:
perl split_qsb.pl
should be enough.
As for the extension needed (XML Simple), if I remember correctly, Perl is shipped with a configurator allowing to download such addon pretty easily.
Click to expand...
Click to collapse
jarayama said:
I get this:
Code:
Data starts at offset 0
End of index detected
-1 entries and 0 bytes extracted
Rebuild the splitted files...
File does not exist: rawprogram0.xml at split_qsb.pl line 185
I think that it cannot split the qsb file, it's a lenovo firmware update, you now why this happen?
Thanks!
Click to expand...
Click to collapse
This means the QSB file you got differs from the one I've got. Are you able to make an extract of the first few kb so I can have a look?
Sent from my K910 with Tapatalk
csu333 said:
This means the QSB file you got differs from the one I've got. Are you able to make an extract of the first few kb so I can have a look?
Sent from my K910 with Tapatalk
Click to expand...
Click to collapse
I have similar issue for "B8080_S003191_140515_ROW_3GData_SD_Update.qsb"
Attached is the first 500 bytes of the qsb. Thank you
Resolved it finally just to the datastart to 0
seek(INF, 0, 0) or die "Could not seek in $IMAGE_FN: $!\n";
Thanks for the hint.
Little of topic, but what is a QSB file? Im trying to flash a Lenovo K920 and the instructions says (translated from Russians) un-zip to a QSB file... a normal un-zip does not reveal any QSB files. It is just a bin folder containing a lot of other file other than QSB-files...
Any advice?
csu333 said:
If you ever came across one of these QSB files from Lenovo and wondered how you could make use of it, this is what you are looking for. It is mostly wild guessing but this script have been tested successfully on 3 different QSB for the Vibe Z (K910).
You need Perl and its XML Simple extension in order to run the script.
Every feedback will be greatly appreciated.
Click to expand...
Click to collapse
----------------------------------------------------------------------------
It works, you did a great job.
but how coud we put these files back to QSB file after some modification?
Jacky_AndroidFanse said:
----------------------------------------------------------------------------
It works, you did a great job.
but how coud we put these files back to QSB file after some modification?
Click to expand...
Click to collapse
I know I am not adding much, but please how can we rebuild a QSB file from img bin files etc?
csu333 said:
If you ever came across one of these QSB files from Lenovo and wondered how you could make use of it, this is what you are looking for. It is mostly wild guessing but this script have been tested successfully on 3 different QSB for the Vibe Z (K910).
You need Perl and its XML Simple extension in order to run the script.
Every feedback will be greatly appreciated.
Click to expand...
Click to collapse
It's a handy tool, but how do we rebuild the qsb file?
Hi. Can You Mention The Procedure Completely. I Can't Understand The Flow.
hi there
Code:
PS C:\Users\blabl\Downloads\split_qsb.pl> perl .\split_qsb.pl
Usage: .\split_qsb.pl file.qsb
PS C:\Users\blabl\Downloads\split_qsb.pl>
i am using windows 10 x86 and have installed Strawberry perl
Related
I'm sure this has been asked before but after prolific searching of the forums and our friend Google I turn to you guys for help. As the title says I'm using OS X and I need a solution (that isn't dual booting to use XP) to signing the update.zip so that I can customise aspects of my ROM, I'm very eager to learn how to do this and this so far seems to be quite an annoying problem.
Thanks for your time in advance
tristyB said:
I'm sure this has been asked before but after prolific searching of the forums and our friend Google I turn to you guys for help. As the title says I'm using OS X and I need a solution (that isn't dual booting to use XP) to signing the update.zip so that I can customise aspects of my ROM, I'm very eager to learn how to do this and this so far seems to be quite an annoying problem.
Thanks for your time in advance
Click to expand...
Click to collapse
pm me............
korndub said:
pm me............
Click to expand...
Click to collapse
Hi korndub,
Cannot you post the answer here so everybody that uses OS X can also sign?
I'm also having problems signing full roms (update.zip files) with signapk.jar
Any help is appreciated
rommelin said:
Hi korndub,
Cannot you post the answer here so everybody that uses OS X can also sign?
I'm also having problems signing full roms (update.zip files) with signapk.jar
Any help is appreciated
Click to expand...
Click to collapse
i have a folder on the desktop which contains the signapk.jar and both sets of keys...put the Archive.zip that you have created and want to sign in this folder, then open terminal
in terminal, you type
$cd FOLDER-containing-files
$java -jar signapk.jar testkeys.x509.pem testkey.pk8 Inputfile.zip outputfile.zip
the outputfile.zip is your update which is signed....
OK, I do all that I think.
Heres my process.
Download ROM
Extract downloaded zip to folder eg update
Make changes to files
Compress folder back to zip eg update1.zip
java -jar signapk.jar testkeys.x509.pem testkey.pk8 update1.zip update_signed.zip
rename and copy the signed file to sd
reboot recovery
wipe and apply update
It doesn't moan about the signing (so I assume its ok) but I get an update script not found error and it doesn't install.
I haven't changed the update scripts, only the boot.img and one or two scripts in system.
Does every file I change have to be resigned as well? I muct be missing something here
on OSX 10.5
Signing has nothing to do with that error. Make sure that the update-script is in the correct path.
META-INF/com/google/android/update-script
it is, is a normal update.zip (ie cyanogen rom), and the only file I've changed is boot.img and a2sd in system/bin
i have a folder on the desktop which contains the signapk.jar and both sets of keys...put the Archive.zip that you have created and want to sign in this folder, then open terminal
in terminal, you type
$cd FOLDER-containing-files
$java -jar signapk.jar testkeys.x509.pem testkey.pk8 Inputfile.zip outputfile.zip
the outputfile.zip is your update which is signed....
Click to expand...
Click to collapse
Thank you so much, this works for me, I might try and build it into an automator workflow
Edit: I spoke too soon, I get the update script error also
Edit Again: my update-script is in the same place as it should be also
Wonder if this is a specific OSX problem? We do have apples 'interpretation' of java don't we?
dazcox5181 said:
Wonder if this is a specific OSX problem? We do have apples 'interpretation' of java don't we?
Click to expand...
Click to collapse
haha, yeah that's right, those crazy cats at Apple. but I assume that korndub also has Apples 'interptretation' so something else could be the problem also
perhaps the way we zip the archive?
dazcox5181 said:
perhaps the way we zip the archive?
Click to expand...
Click to collapse
sadly not, I just used a application that zips in a PC format (without mac hidden files) and no joy. Good idea though.
Edit: Just tried archiving the zip but not compressing. Thought I was on to something. I wasn't.
Another update, I have tried the same in Fedora 11 and again, getting the update script error message when I flash.
I signed modified update for 3 different builds on my Mac, everything worked w/o problems every time. I did everything like described in readme and several times here. So, it's not a global OS X problem.
BTW, I used muCommander to directly modify all zips.
neuro159 said:
I signed modified update for 3 different builds on my Mac, everything worked w/o problems every time. I did everything like described in readme and several times here. So, it's not a global OS X problem.
BTW, I used muCommander to directly modify all zips.
Click to expand...
Click to collapse
When I find the time later on I will give the muCommander a go. Fingers crossed.
dazcox5181 said:
OK, I do all that I think.
Heres my process.
Download ROM
Extract downloaded zip to folder eg update
Make changes to files
Compress folder back to zip eg update1.zip
java -jar signapk.jar testkeys.x509.pem testkey.pk8 update1.zip update_signed.zip
rename and copy the signed file to sd
reboot recovery
wipe and apply update
It doesn't moan about the signing (so I assume its ok) but I get an update script not found error and it doesn't install.
I haven't changed the update scripts, only the boot.img and one or two scripts in system.
Does every file I change have to be resigned as well? I muct be missing something here
on OSX 10.5
Click to expand...
Click to collapse
you dont archive (zip) the folder, this is where you are having the issue... say you extracted the rom to ROMFOLDER, what you need to do is go into that folder, select all, then right click or two finger click and choose Compress - you will end up with an archive that contains all sub folders, if you zip the folder then you have a folder within a folder and that is where all goes south..
korndub said:
you dont archive (zip) the folder, this is where you are having the issue... say you extracted the rom to ROMFOLDER, what you need to do is go into that folder, select all, then right click or two finger click and choose Compress - you will end up with an archive that contains all sub folders, if you zip the folder then you have a folder within a folder and that is where all goes south..
Click to expand...
Click to collapse
Oh my god, you're right. And I think I actually read that somewhere before now you've reminded me. Damn. Thanks though! Thanks a lot!
Awesome, knew it was me being stupid.
sure thing guys! glad i could help...
Always something stupid...
Well, not Sure if the past should be here, I think so.
*I was tinkering with a rom (Ledro id for desire), and wanted to take a look at the xml, in such framework-res.apk, but that open from the pc, I get: hexadecimal value 0x03 is an invalid character (with xml notepad). I still open it but it is unintelligible.
What are apk's trying to open with java (do not know if I have what it takes to open them) and that makes me: failed to load main-class manifest attribute ....
I just want to tweak a little, have if I learn slowly.
Sorry for my english I am from spain
Sent from my HTC Desire using XDA App
XML files in apks are compiled to binary form, so you can't open them directly. You have to use some decoding tool: apktool (in my signature), Apk Manager (a wrapper around apktool) or AXMLPrinter2 (older and less powerful tool: can't rebuild XML and only partial info is decoded).
And no, you can't run apk files using Java on your PC.
Brut.all said:
XML files in apks are compiled to binary form, so you can't open them directly. You have to use some decoding tool: apktool (in my signature), Apk Manager (a wrapper around apktool) or AXMLPrinter2 (older and less powerful tool: can't rebuild XML and only partial info is decoded).
And no, you can't run apk files using Java on your PC.
Click to expand...
Click to collapse
Thanks, I will try
Edit: lol I dont know how I can install apktol in Windows...
I unpack the files into c:/ and now?
dany_danay said:
Thanks, I will try
Edit: lol I dont know how I can install apktol in Windows...
I unpack the files into c:/ and now?
Click to expand...
Click to collapse
So How can do this?
dany_danay said:
I unpack the files into c:/ and now?
Click to expand...
Click to collapse
You don't read carefully:
http://code.google.com/p/android-apktool/
Unpack both to your Windows directory
Click to expand...
Click to collapse
This tool is an interactive console application. It makes it easier to use blob tools. All you have to do is run it, choose to unpack or repack. If you choose repack it will ask you to enter the name for each of the required files. After that it will due the rest.
Notice: You either have to enter the full, have the blob file in the same directory/folder or have change changed directories to the location of the blob. For example: cd /path/to/blob's Dir/
Update: I have fixed the case sensitivity issue.
Note: The attachments below will always be the latest.
ostar2 said:
I created an application to make BlobTools easier to use. It is an interactive console application. I made this because I wanted to be of some help to the community. Well anyways, here it is...
Click to expand...
Click to collapse
Files are corrupt. Try again please.
Regards,
Brad
bradslinux said:
Files are corrupt. Try again please.
Regards,
Brad
Click to expand...
Click to collapse
Those were compressed with the LZMA algorithm. Here try these ones there compressed with the normal zip compression for windows.
Edit: To prevent confusion I have removed these attachments please download from The Original Post. Thanks.
ostar2 said:
Those were compressed with the LZMA algorithm. Here try these ones there compressed with the normal zip compression for windows.
Click to expand...
Click to collapse
That did it, thanks.
Nice work.
Regards,
Brad
welcome..
Excellent! Thank you - these will aid me greatly!
I like to be of help to the community so I am happy that this helps others.
Sourcecode and Update
As I am unable to compile for Linux or mac at the moment here is the sourcecode for this tool.
This uses a Code::Blocks IDE for its project/workspace. It can be compiled with just a c++ compiler. The icon is only available on windows as I do not know to implement it on macosx and Linux does not support icons in executables. also, I have updated this application as well the updated binarie zip files and source zip are attached. Enjoy!
Edit: To prevent confusion I have removed these attachments please download from The Original Post. Thanks.
ostar2 said:
As I am unable to compile for Linux or mac at the moment here is the sourcecode for this tool.
This uses a Code::Blocks IDE for its project/workspace. It can be compiled with just a c++ compiler. The icon is only available on windows as I do not know to implement it on macosx and Linux does not support icons in executables. also, I have updated this application as well the updated binarie zip files and source zip are attached. Enjoy!
Click to expand...
Click to collapse
I tried to unpack a blob and it kept failing with an Invalid Option! error. I hit u then typed blob which was in the same directory. I then manually dragged the blob onto the blobunpack.exe and it unpacked it fine.
Any ideas why?
sbdags said:
I tried to unpack a blob and it kept failing with an Invalid Option! error. I hit u then typed blob which was in the same directory. I then manually dragged the blob onto the blobunpack.exe and it unpacked it fine.
Any ideas why?
Click to expand...
Click to collapse
I was unsure of what extenstion the blob file had when I created this. What extenstion do they have? is it .blob? If so I think i can fix it.
Update: Fixed Not unpacking
Hello again I fixed the tool it should work fine now.
Edit: To prevent confusion I have removed these attachments please download from The Original Post. Thanks.
ostar2 said:
I was unsure of what extenstion the blob file had when I created this. What extenstion do they have? is it .blob? If so I think i can fix it.
Click to expand...
Click to collapse
The blobs usually have no extension at all, and the extracted parts have a dot and the partition name as their last part, but I would not call these "extensions" (even if Windows disagrees with me).
_that said:
The blobs usually have no extension at all, and the extracted parts have a dot and the partition name as their last part, but I would not call these "extensions" (even if Windows disagrees with me).
Click to expand...
Click to collapse
Thanks, that makes more sense. Also, I am thinking about having BlobTools print the command usage in more detail or at least a "--help" command displaying detailed usage of BlobTools. Like, how to unpack and repack.
[WIP] New tool
I am going to make gui version of this using wxwidgets and also maby consolidate the two tools into one and then combine it with GUI. That would make it much better.
still getting the "invalid option" message :/
arminneman said:
still getting the "invalid option" message :/
Click to expand...
Click to collapse
Please re-download from the original post. It should work fine. If not let me know.
Ok, its updated let me know if any problems occur.
ostar2 said:
Ok, its updated let me know if any problems occur.
Click to expand...
Click to collapse
I try it on win 7 64bit, run as administrator BlobToolUI select u and blob the name of file and give this error:
Unable to open "b"
Can You help me?
Thanks
Riccardo.
cipolippo said:
I try it on win 7 64bit, run as administrator BlobToolUI select u and blob the name of file and give this error:
Unable to open "b"
Can You help me?
Thanks
Riccardo.
Click to expand...
Click to collapse
Is the blob you want to unpack in the same directory? If that does not work try adding a "." the end of the file name.
ostar2 said:
Is the blob you want to unpack in the same directory? If that does not work try adding a "." the end of the file name.
Click to expand...
Click to collapse
Yes is in the same directory, adding a "." the end of the file does not work..
work if I rename file "blob" in also "b" ?
Thanks.
Hi!
I'd like to know where the OTAs are stored in our M2. Anyone that hasn't done yet the update download, and that has Root permissions, can use this app to find where they're stored, and if possible, upload it and post a link to it.
Thank you!
Do you still needed the file, sir ?
FunSucker said:
Do you still needed the file, sir ?
Click to expand...
Click to collapse
Yep. It's for some research
I think, the app didn't work sir. After I wait 30 minutes, none of the files were copied to my storage. Then I try searching using manual method, I found one file, the file size is as large as my OTA update. The nama file is "update-package".
The file extension is not ".zip", in the folder recovery (internal storage). My estimate, the file extension .LZMA or .tar.LZMA or .zipx.
I've tried to extract and decompress in the PC (windows os) using some programs, but failed.
If you still need the file, I'll upload it now .
FunSucker said:
I think, the app didn't work sir. After I wait 30 minutes, none of the files were copied to my storage. Then I try searching using manual method, I found one file, the file size is as large as my OTA update. The nama file is "update-package".
The file extension is not ".zip", in the folder recovery (internal storage). My estimate, the file extension .LZMA or .tar.LZMA or .zipx.
I've tried to extract and decompress in the PC (windows os) using some programs, but failed.
If you still need the file, I'll upload it now .
Click to expand...
Click to collapse
Yes please! Thanks
oke, sir. when finished i will share the link.
Oke sir, check this out --> Google Drive
FunSucker said:
Oke sir, check this out --> Google Drive
Click to expand...
Click to collapse
Great, thank you very much!
Okay, so this is what I got:
The update zip refuses to be flashed in UBL devices. FOTAkernel system is broken after you open the bootloader, which leads us with an unused partition (but that's other thing). The recovery logs just say: WARN: Status Rooted, ERR: Bootloader is unlocked.
I've tried to force it using AOSP Recovery commands
Code:
echo 'boot-recovery' > /cache/recovery/command
echo '--update_package=/sdcard/update.zip' >> /cache/recovery/command
reboot recovery
But just got a big nope.
So, now time to have a look at it. I tried to unpack it several times but no luck. The reason seems to be, very probably, because this is a LZMA compressed file (as 7-Zip reported) but with 2 additions at the end (which corrupts the entire read of it): An unencrypted/uncompressed XML which points out which is the software available right now in the phone (<source>), and which is the version that is going to be installed (<target>), plus, some a weird <generation> section. This is the XML
Code:
<?xml version='1.0' encoding='ISO-8859-1'?>
<metadata version="3.3">
<product>
<manufacturer>Sony</manufacturer>
<model>D2302</model>
<hwplatform>msm8226</hwplatform>
</product>
<update>
<generation>
<version>1.1.2</version>
<date>2015-12-28T12:10:19Z</date>
<rb_version>7.0.15.117</rb_version>
<rb_ua_version>7.0.15.117</rb_ua_version>
</generation>
<source>
<software>
<revision>18.6.A.0.175</revision>
</software>
<customization>
<variant>1281-0464</variant>
<revision>R2C</revision>
</customization>
</source>
<target>
<software>
<revision>18.6.A.0.182</revision>
</software>
<customization>
<variant>1281-0464</variant>
<revision>R2C</revision>
</customization>
</target>
</update>
</metadata>
And, right after that, I can perfectly see a SIN header, so I isolated it and, looks quite similar to the FOTAkernel.sin included in FTFs (330613072905Z010U S1_FOTA0 ‚"0), I personally guess it's a very, very small ELF binary, by the size of it.
So, the problem now comes to isolate the 3 parts, the LZMA file, the XML and the SIN, separetly. After that, I think we can probably have a look insde them.
How about linux os? Can we unpack or decompress that file on linux os, sir? Do you have tried?
FunSucker said:
How about linux os? Can we unpack or decompress that file on linux os, sir? Do you have tried?
Click to expand...
Click to collapse
I've tried many tools and combinations (ext4, .img, etc) and none of them worked... I'll think more about it.
Hello all.
I haven't posted here for years. My account is still active, but I am no longer allowed to post in specific forums regarding ROMs, so I am asking here.
[moderators: sorry if this is the wrong topic. It is the closest I could find, since my question is not device specific]
I have an Android 9 box which is signed with AOSP test certificates.
I also have an update.zip file for this box.
This box has A/B OTA support, it is working and verified through fastboot.
I want to edit and repackage the update.zip
I know how to do it on old ROMs, but I could not find any tool that can repackage payload.bin
There are several tools to unpack it, and I used one to extract boot.img and system.img
But I can't find any way to package these files back in to payload.bin format.
I tried various google searches and even analyzing the open source unpacking tools, but building a packaging tool from scratch is too complex for me at this point.
Any advice?
Have you found anything for this? I am trying to repack the payload.bin as well from modified IMG files, but I cant find anything on the web.
I extracted this script from linux-86 tools, pretty sure this is the one that repacks all the images into payload.bin, but donno what's the exact code inside it that makes it possible... Understand the last 100 lines & you might succeed.
MPK99 said:
I extracted this script from linux-86 tools, pretty sure this is the one that repacks all the images into payload.bin, but donno what's the exact code inside it that makes it possible... Understand the last 100 lines & you might succeed.
Click to expand...
Click to collapse
MPK99 said:
I extracted this script from linux-86 tools, pretty sure this is the one that repacks all the images into payload.bin, but donno what's the exact code inside it that makes it possible... Understand the last 100 lines & you might succees
Click to expand...
Click to collapse
Please Teach me, how to repack .img files into payload.bin
Did u Already Know How To Repack .img Files Into Payload.bin?
MPK99 said:
I extracted this script from linux-86 tools, pretty sure this is the one that repacks all the images into payload.bin, but donno what's the exact code inside it that makes it possible... Understand the last 100 lines & you might succeed.
Click to expand...
Click to collapse
Hello do you still have this script trying to repack a QCM6125 with magisk and twrp
Edit: Its advised to use superR's kitchen
SuperR Kitchen
forum.xda-developers.com
Hey
I've also tried everything, how do you pack it back into a payload.bin, I only wanted usb rights in the Platform.xml, I didn't want that anymore, that's enough for me, but how do I pack it again, thanks
I'm asking here as I never got an answer, sorry
don't want root
Thanks