[HELP] Error in flashing module : "Invalid zip file format!" - Magisk

I am trying to make a magisk module to remove an app. I followed the guide here. But I can't install it.
Flashing in magisk manager gives error: "! Installation failed"
Flashing in TWRP gives error : "Invalid zip file format!"
I guess, I am making the zip the wrong way.
My zip file is attached.
Any help would be appreciated.

Try using a different app/program to create the zip file.

Didgeridoohan said:
Try using a different app/program to create the zip file.
Click to expand...
Click to collapse
I used this command.
HTML:
zip -r stkremove2.zip META-INF README.md common/ install.sh module.prop system
is there a known correct way?

Didgeridoohan said:
Try using a different app/program to create the zip file.
Click to expand...
Click to collapse
I also tried using winrar and it didn't work.

anaandshailu said:
I am trying to make a magisk module to remove an app. I followed the guide here. But I can't install it.
Flashing in magisk manager gives error: "! Installation failed"
Flashing in TWRP gives error : "Invalid zip file format!"
I guess, I am making the zip the wrong way.
My zip file is attached.
Any help would be appreciated.
Click to expand...
Click to collapse
anaandshailu said:
I also tried using winrar and it didn't work.
Click to expand...
Click to collapse
It's works fine using WinRAR and/or 7-zip for me (Windows host)
anaandshailu said:
I used this command.
HTML:
zip -r stkremove2.zip META-INF README.md common/ install.sh module.prop system
is there a known correct way?
Click to expand...
Click to collapse
Looks like good, just try and feedback..

Rom said:
Looks like good, just try and feedback..
Click to expand...
Click to collapse
the zip attached in OP was made by the zip command method and it does not work
could you please try that stkremove2.zip in OP

*typo in filename... updater-binary - - >update-binary
*use module_installer.sh instead

Related

Why does my apk signing not work?

I'm using the auto-sign here:
http://forum.xda-developers.com/showthread.php?t=646962&highlight=sign
I modified framework-res.apk (changed 3 png files), signed it, and replaced the apk in the update.zip from: http://forum.xda-developers.com/showthread.php?t=687935
I get the following error when flashing the zip:
Code:
Verifying update package...
E:Wrong digest:
system/framework/framework-res.apk
E:Verification failed
What am I doing wrong here?
delete the META-INF folder before signing.
arkavat said:
delete the META-INF folder before signing.
Click to expand...
Click to collapse
Tried it. Still no go. =\
I think the APK needs to use the same signature as the update.zip when signing... at least that's what I read from somewhere.
Hmm, well, sheet.
Q&A section Paul! cmon!
lol just busting your balls but that is strange... dxi's idea sounds correct though since there is a "verification" error
dsixda said:
I think the APK needs to use the same signature as the update.zip when signing... at least that's what I read from somewhere.
Click to expand...
Click to collapse
Nope... that's why a rom can contain signed files from many sources.
@Paul: did you decode -> replace -> encode -> sign or insert into zip -> resign?
Oh, and I assume is an Eclair version?
JHaste said:
Q&A section Paul! cmon!
lol just busting your balls but that is strange... dxi's idea sounds correct though since there is a "verification" error
Click to expand...
Click to collapse
I could have sworn I posted in the Themes & Apps section last night. But after it posted, I figured I'd leave it since I can't delete my posts anyway like on other boards.
djmcnz said:
Nope... that's why a rom can contain signed files from many sources.
@Paul: did you decode -> replace -> encode -> sign or insert into zip -> resign?
Oh, and I assume is an Eclair version?
Click to expand...
Click to collapse
Not sure what you mean by decode/encode. I replaced the png files, signed the framework apk, and replaced the framework apk in the update.zip from Docrambone.
Paul22000 said:
Not sure what you mean by decode/encode. I replaced the png files, signed the framework apk, and replaced the framework apk in the update.zip from Docrambone.
Click to expand...
Click to collapse
Did you re-sign the update.zip after adding the APK back to it?
dsixda said:
Did you re-sign the update.zip after adding the APK back to it?
Click to expand...
Click to collapse
No. The auto-sign says it will sign the only apk in the folder, so it wouldn't even see the update.zip.
Paul22000 said:
No. The auto-sign says it will sign the only apk in the folder, so it wouldn't even see the update.zip.
Click to expand...
Click to collapse
Hmmm ok, so now I am confused, I thought we had to sign the update.zip each time it changes.
If you can get it working, let us know what you did..
MOD EDIT - Moved to Q&A
Paul22000 said:
No. The auto-sign says it will sign the only apk in the folder, so it wouldn't even see the update.zip.
Click to expand...
Click to collapse
Ahh... yes, you need to sign the zip as well...
Code:
java -jar signapk.jar <your_cert.x509.pem> <your_key.pk8> <input_file_name.zip> <output_file_name.zip>
If you're using test keys it will be...
Code:
java -jar signapk.jar testkey.x509.pem testkey.pk8 <input_file_name.zip> <output_file_name.zip>
If you run this in the same directory that you ran signapk.bat in then this will work as well.
So your procedure:
Edit apk
Delete META-INF folder
Re-sign apk
Add re-signed apk to update.zip package
Sign update.zip package as above
EDIT: Oh, are you reusing an existing update.zip file?? No, don't do that. Perhaps reuse the script but just create a new zip and replicate the required directory structure, drop your files in (including the script) and sign it. If you must reuse the zip then delete all of the certificate files in the meta-inf directory but don't delete the folder structure where the update-script lives.
Paul22000 said:
I'm using the auto-sign here:
http://forum.xda-developers.com/showthread.php?t=646962&highlight=sign
I modified framework-res.apk (changed 3 png files), signed it, and replaced the apk in the update.zip from: http://forum.xda-developers.com/showthread.php?t=687935
I get the following error when flashing the zip:
Code:
Verifying update package...
E:Wrong digest:
system/framework/framework-res.apk
E:Verification failed
What am I doing wrong here?
Click to expand...
Click to collapse
i don't know if you figured it out yet...but send me your zip and I will take a look at it
ogdobber said:
i don't know if you figured it out yet...but send me your zip and I will take a look at it
Click to expand...
Click to collapse
Here's my non-working zip
Paul22000 said:
Here's my non-working zip
Click to expand...
Click to collapse
Insufficient build information in the update script file and a syntax error.
Try this:
Code:
assert compatible_with("0.2") == "true"
assert getprop("ro.product.device") == "passion" || getprop("ro.build.product") == "passion"
show_progress 0.1 0
copy_dir PACKAGE:system SYSTEM:
show_progress 0.1 10
djmcnz said:
Try this:
Click to expand...
Click to collapse
Try what? What do I do with that code?
If you want to cheat, here's a modified and signed version.
I can't test it because I'm not using Froyo but it all looks okay.
Paul22000 said:
Try what? What do I do with that code?
Click to expand...
Click to collapse
Insufficient build information in the update script file and a syntax error.
No?
I mean, you do recognise this line: copy_dir PACKAGE:system SYSTEM: from your update.zip? Or is that somebody else's original zip? It's a wonder it ever worked. Nevertheless, have a look inside the one I attached and you'll see what I mean... /META-INF/com/google/android/update-script
djmcnz said:
If you want to cheat, here's a modified and signed version.
I can't test it because I'm not using Froyo but it all looks okay.
Click to expand...
Click to collapse
Aren't the frameworks different from 2.1u1 to 2.2? I'm almost sure they'd be different with all the changes in FroYo.
djmcnz said:
Insufficient build information in the update script file and a syntax error.
No?
Click to expand...
Click to collapse
You're speaking Greek to me.

Installing UOT Kitchen theme error?

hi all,
I tried to create an theme for the new 20N rom(lite, deodexed) so i copied SystemUI.apk and framework-res.apk to my PC and uploaded them to UOT Kitchen.
In UOT Kitchen i start choosing icons etc (settings.uot in attatchment) and tried flashing it but when i do i get an error:
Code:
E: Error in /sdcard/theme.zip
(Status 0)
Installation aborted.
(tried Update-binary = MTD and Optimus)
PLEASE HELP!
EDIT: Forgot to click the sumbit work to kitchen so downloaded someone others file
WORKAROUND for recovery error (Status 0):
1. Unzip your ROM and find
META-INF/com/google/android/update-binary file
2. Put this file in the UOT zip (overriding UOT's file)
from: http://uot.dakra.lt/how_to/
I'm having problems too.
I get this error
E:Can't open /sdcard/Download/Andrew-2.zip
(bad)
Installation aborted.
Please help.
Andrew-2.zip is the second theme I made. The first one I made also got the same error. I replaced the binary file thing the one above me said.
andrewbadge said:
I'm having problems too.
I get this error
E:Can't open /sdcard/Download/Andrew-2.zip
(bad)
Installation aborted.
Please help.
Andrew-2.zip is the second theme I made. The first one I made also got the same error. I replaced the binary file thing the one above me said.
Click to expand...
Click to collapse
try it with an another SD card... m8be is the SD card corrupt or something
yeomond said:
WORKAROUND for recovery error (Status 0):
1. Unzip your ROM and find
META-INF/com/google/android/update-binary file
2. Put this file in the UOT zip (overriding UOT's file)
from: http://uot.dakra.lt/how_to/
Click to expand...
Click to collapse
Where is the META-INF/com/google/android/update-binary located? I searched eveywhere on my phone with root explorer...
WIIstpM said:
Where is the META-INF/com/google/android/update-binary located? I searched eveywhere on my phone with root explorer...
Click to expand...
Click to collapse
It is in the flashable zip file of your rom
That's weird. I got the cooked zip to install on my OB. Im on Zeus v3n. It flashed fine and everything was working besides the status bar and notification. I still haven't found a workaround for that..
timvdhoorn said:
It is in the flashable zip file of your rom
Click to expand...
Click to collapse
Eh I'm using the stock rom... anyway it wasn't the problem but the script editing (had to put it to "Type Optimus") Everything worked then
WIIstpM said:
Eh I'm using the stock rom... anyway it wasn't the problem but the script editing (had to put it to "Type Optimus") Everything worked then
Click to expand...
Click to collapse
where did u have to make that change?
lMonsterl said:
where did u have to make that change?
Click to expand...
Click to collapse
At Uot Kitchen's website. At file upload section. Under the "Select flashable zip scripting" part you can choose update-binary type. Never forget to set it to "Type optimus".

Can Anyone provide a link for Tiamat wifi module driver

Tried to download tiamat-031412-bcm4329.ko.7z but it's giving me an error when I try to open it. Help pls.
Try to re-edit the extension to zip.
Sent from my Incredible S
mdk83 said:
Try to re-edit the extension to zip.
Sent from my Incredible S
Click to expand...
Click to collapse
Unfortunately that didn't work.
Is file on your phone or computer? What zip program do you use on your computer?
File on computer....tried WinRAR and 7zip.
I know you can open it in winzip and then do a save as and save it as a zip file. Not sure that will help.
Did you use the convert feature in WinRAR?
Is the download corrupt?
I'll try Winzip now see what happens.
WinZip failed too...any help?
What exactly is failing?
acme anvil said:
What exactly is failing?
Click to expand...
Click to collapse
"Cannot open file. Does not appear to be a valid archive".
Sounds like it's corrupt. Download again.
Downloaded multiple times...that's why I'd like it if anyone could link me a good file :/
Cmon guys I seriously need help I can't use my phone!
Download playground and kernel and reflash.
I cannot flash the kernel...because I'm on S-OFF and I need to adb push the Wifi module driver...now to do that I need to change the name of the file in the zip. But I can't access the zip...
But isn't the Wifi module in the rom? If you are s-off, download the rom via computer, copy to sd card and flash. Do the same with the kernel. Unless I'm missing something.
The file isn't for unpacking as I remember you just need to edit the filename and remove the .7z extension and copy it over the current one.
It should only be S-ON users that had to do this as I remember too.
nsordk said:
The file isn't for unpacking as I remember you just need to edit the filename and remove the .7z extension and copy it over the current one.
It should only be S-ON users that had to do this as I remember too.
Click to expand...
Click to collapse
Hmm I thought the filename I had to edit was in the actual zip. Thanks...
You can't just rename a 7zip file you need to extract and than re-compress the files into a zip file.
Sent from my HTC Incredible S using xda premium
itsbeertimenow said:
You can't just rename a 7zip file you need to extract and than re-compress the files into a zip file.
Sent from my HTC Incredible S using xda premium
Click to expand...
Click to collapse
You may also be able to open in winzip and do as a save as and save it as a zip file.

Magisk Module Help

I'm trying to make a simple Magisk Module to replace a single file in /statem but I can't make the module valid. When I download the template and zip it up MagiskManger won't recognize it. The root of the zip file has the various files, the files are not in there own directory.
The uploaded zip is the packed template repo.
What program are you using to make the zip? Try a different one... On Windows I've used 7zip. Usually, when making simple modules, I do it directly on my phone and then I use FX File Explorer.
Didgeridoohan said:
What program are you using to make the zip? Try a different one... On Windows I've used 7zip. Usually, when making simple modules, I do it directly on my phone and then I use FX File Explorer.
Click to expand...
Click to collapse
I used Astro, I would assume they would both use the same code for that. Isn't creating a zip a STD library feature?
I used that and it worked, just need to figure out why my boot animation didn't seem to change.
gudenau said:
I used that and it worked, just need to figure out why my boot animation didn't seem to change.
Click to expand...
Click to collapse
https://github.com/topjohnwu/Magisk/blob/master/docs/details.md#simple-mount-details
Didgeridoohan said:
https://github.com/topjohnwu/Magisk/blob/master/docs/details.md#simple-mount-details
Click to expand...
Click to collapse
I don't see that path...
gudenau said:
I don't see that path...
Click to expand...
Click to collapse
Create it...
Didgeridoohan said:
Create it...
Click to expand...
Click to collapse
Didn't change anything.
gudenau said:
Didn't change anything.
Click to expand...
Click to collapse
If the info provided in the link above doesn't work and you want help, you're going to have to provide a bit more details than that...

Dual speaker mod

Hi this mod work on A30 with OneUi 3.1 only.
DualSpeaker+Earphone_Mod-v1.1.zip
drive.google.com
Cant install.
It says: Invalid zip file format
arman0077 said:
Cant install.
It says: Invalid zip file format
Click to expand...
Click to collapse
1. Download file again (Galaxy A30 based OneUi 3 only)
2. Install from twrp
If you cant, extract file and replace (floating features and mixer_gains and mixer_patchs) with Root Explore in vendor/etc
Magisk is nessesarry.
Procces tested and work
rezabahramnezhad said:
1. Download file again (Galaxy A30 based OneUi 3 only)
2. Install from twrp
If you cant, extract file and replace (floating features and mixer_gains and mixer_patchs) with Root Explore in vendor/etc
Magisk is nessesarry.
Procces tested and work
Click to expand...
Click to collapse
I install it and works, but with making some changes in zip file.
"meta inf" and "vendor" folders should be in the root of the zip file, not in a folder.
.
please make changes and reupload the correct file..
thanks.
arman0077 said:
I install it and works, but with making some changes in zip file.
"meta inf" and "vendor" folders should be in the root of the zip file, not in a folder.
.
please make changes and reupload the correct file..
thanks.
Click to expand...
Click to collapse
Can you please tell me how to do it?

Categories

Resources