Flashable Zip - Xiaomi Mi 6 Questions & Answers

Hi!
Im trying to figure out how to make a flashable zip to flash after a rom update so apps that I want to install in sytstem/apps can be automatically be flashed from the recovery instead of manually copying them using a file manager. Is there some one that can help me in this?

yakie996 said:
Hi!
Im trying to figure out how to make a flashable zip to flash after a rom update so apps that I want to install in sytstem/apps can be automatically be flashed from the recovery instead of manually copying them using a file manager. Is there some one that can help me in this?
Click to expand...
Click to collapse
I have a script I run after each flash, but I currently only use it to delete apks. Perhaps you can use it as a base, I think you need the function "package_extract_file" (it's commented out in my script, I used it to overwrite a GPS config).
My zip is attached, the file to look into is in meta-inf/com/google/android and is called update_script.
Just play around with it, you can just put it back into the zip and flash it in twrp.

muff99 said:
I have a script I run after each flash, but I currently only use it to delete apks. Perhaps you can use it as a base, I think you need the function "package_extract_file" (it's commented out in my script, I used it to overwrite a GPS config).
My zip is attached, the file to look into is in meta-inf/com/google/android and is called update_script.
Just play around with it, you can just put it back into the zip and flash it in twrp.
Click to expand...
Click to collapse
Great thank you! I'll look at it

yakie996 said:
Great thank you! I'll look at it
Click to expand...
Click to collapse
Look at loads of updater scripts. Learn the commands they use.
Pick some relevant for your needs.
Then use them.
You will get errors. There will be screw ups but eventually it all starts working.
There's no other good way really that's how I learned how to use updater-scripts.

Related

[Q] Odin EB13 SPH-D700.zImage.stock.tar

I am trying to flash my Kernel back to factory, i do not want to wipe the whole thing just remove a Kernel Mod and restore the factory kernel. Where can I find the SPH-D700.zImage.stock.tar file that I keep reading about that I need to achieve this? I can not seem to find this file any place.
Creine59 said:
I am trying to flash my Kernel back to factory, i do not want to wipe the whole thing just remove a Kernel Mod and restore the factory kernel. Where can I find the SPH-D700.zImage.stock.tar file that I keep reading about that I need to achieve this? I can not seem to find this file any place.
Click to expand...
Click to collapse
You could go to the wiki http://forum.xda-developers.com/wiki/index.php?title=Samsung_Galaxy_S/SPH-D700
Download EB13 Stock
Pullout the zImage file.
Download a flashable Kernel zip
and put the zImage from the stock tar, into the zip. That would give you a zip you could use to put the stock kernel back on.
You can use 7-zip to open the tar file and pull out the zImage file and subsequently use 7 zip to open the zip for the kernel you download (like twilight, vision or genocide)
hope that helps. as always backup first.
Creine59 said:
I am trying to flash my Kernel back to factory, i do not want to wipe the whole thing just remove a Kernel Mod and restore the factory kernel. Where can I find the SPH-D700.zImage.stock.tar file that I keep reading about that I need to achieve this? I can not seem to find this file any place.
Click to expand...
Click to collapse
Really man? You couldn't read the sticky at the top that says what to do with Q's?
Moved to Q&A.

[Q] Creating app bundle?

Can anyone link me to a guide for putting together a zip file of apk's I like to install after flashing a ROM? Thanks.
U can download a gapps zip and replace the apps with whatever apks u would want but I think most gapps zips will install them in system but I'm not sure, you could try the inverted gapps as I'm pretty sure those install in data to make them more easily removeable later
Just add them to the ROM before you flash it in the System/App folder
bdK14 said:
Can anyone link me to a guide for putting together a zip file of apk's I like to install after flashing a ROM? Thanks.
Click to expand...
Click to collapse
Can you clarify the question? Do you mean a zip of apps that you just don't want to forget to install or do you mean actually mean a flashable zip like some of the other guys mentioned?

[Q] could someone explain systemui.apk?

So I've been cruisin' around the threads here and on rootzwiki looking to mod my newly rooted Gnex and I see most of the mods are using lingo I'm not familar with. Like systemui.apk dropping files here and there. I've used root explorer and I know how to mount r/w or whatever but I don't understand what to do and how to flash these mods. is there a tutorial somewhere?
First - an .apk file is just a compressed container that contains files just like a .zip file. In fact it is a zip file with certain Android specific folder structures, files, and "signatures".
Disclaimer - I don't mod or code on the Android platform and the following is based on my understanding of how Android works.
The SystemUI.apk is an Android system file that contains Android system ui code, layouts, and ui related content such as images and etc. What the modders have done is made changes to these code, layouts, and images to modify how the Andoid UI looks.
This SystemUI.apk file resides in a specific location on your phone. What most of the modders have done is made it easy for you and packaged this file into a zip file (which is usually what they give to you as a download) that you can flash via ClockworkMod recovery to automatically replace your stock SystemUI.apk copy with their modified copy.
If you are not familiar ClockworkMod recovery is the standard for flashing Mods, ROMs, and kernels onto your phone. Since you are rooted and want to tinker with your phone you should flash the CWM recovery to your phone if you haven't already. You can look up the many guides that show you how to do this.
To flash most of the mods you would download the .zip file to the internal storage on your phone. Then you would boot into CWM recovery (there are a couple of ways to do this - do a search) and choose the "Install zip from sdcard" and navigate to the file you downloaded. Flash the zip file and the mod should be installed for you.
Note: Many of the modders that make changes to the SystemUI.apk will have packaged this file into flashable zips. By flashing these zip files they overwrite the current SystemUI.apk on your phone. What this means is that if you flash a mod on top of another mod they will overwrite each other.
ok that clears some things up for me. I do have CWM flashed (currently sporting the touch version which is sweet by the way). So when a modder talks of the systemui.apk they are not asking for the user to do anything with the files, they are just explaing how the .zip file works? I guess I got confused because I thought that's what the modder was wanting me to do (change the Systemui.apk). I would simply flash the .zip then on reboot something crazy would happen like I'd lose my softkeys or the status bar would disappear. Thank God for Nandroid but after a while you get tired of trying to flash different mods because I have to go back and restore. I am currently running Android Revolution 2.1.2 but I don't know if that makes a difference or not.
automaddux said:
ok that clears some things up for me. I do have CWM flashed (currently sporting the touch version which is sweet by the way). So when a modder talks of the systemui.apk they are not asking for the user to do anything with the files, they are just explaing how the .zip file works? I guess I got confused because I thought that's what the modder was wanting me to do (change the Systemui.apk). I would simply flash the .zip then on reboot something crazy would happen like I'd lose my softkeys or the status bar would disappear. Thank God for Nandroid but after a while you get tired of trying to flash different mods because I have to go back and restore. I am currently running Android Revolution 2.1.2 but I don't know if that makes a difference or not.
Click to expand...
Click to collapse
They probably want you to change the systemui.apk and then push it to your phone. If this is not done correctly your system ui will disappear. Happened to me when I was trying to mod my softkeys.
automaddux said:
ok that clears some things up for me. I do have CWM flashed (currently sporting the touch version which is sweet by the way). So when a modder talks of the systemui.apk they are not asking for the user to do anything with the files, they are just explaing how the .zip file works? I guess I got confused because I thought that's what the modder was wanting me to do (change the Systemui.apk). I would simply flash the .zip then on reboot something crazy would happen like I'd lose my softkeys or the status bar would disappear. Thank God for Nandroid but after a while you get tired of trying to flash different mods because I have to go back and restore. I am currently running Android Revolution 2.1.2 but I don't know if that makes a difference or not.
Click to expand...
Click to collapse
Most modders will not ask you to modify the SystemUI.apk yourself. This requires knowledge of how to package and sign the apk so it will work with Android. Most likely if the modder gives you specific details about files in the SystemUI.apk package they are just distributing information about how the modification works.
The current rom you're on is 4.0.2. I suspect the mod you flash is only compatible with 4.0.3 (most people tinkering with their phones have flashed to 4.0.3 ROMs now) and that's what caused your issues.
You don't necessarily have to nandroid - although it is very good practice. Before you flash mods if you either know files are being flashed or use a zip utility (i highly recommend 7zip) to inspect the .zip file provided by the modder you can use Root Explorer or ADB to backup the files that will be replaced. This way it would be an easy restore if something screws up. Note that this isn't 100% bulletproof since it really depends on what the mod is and what it's changing in the Android system.
silow said:
Most modders will not ask you to modify the SystemUI.apk yourself. This requires knowledge of how to package and sign the apk so it will work with Android. Most likely if the modder gives you specific details about files in the SystemUI.apk package they are just distributing information about how the modification works.
The current rom you're on is 4.0.2. I suspect the mod you flash is only compatible with 4.0.3 (most people tinkering with their phones have flashed to 4.0.3 ROMs now) and that's what caused your issues.
You don't necessarily have to nandroid - although it is very good practice. Before you flash mods if you either know files are being flashed or use a zip utility (i highly recommend 7zip) to inspect the .zip file provided by the modder you can use Root Explorer or ADB to backup the files that will be replaced. This way it would be an easy restore if something screws up. Note that this isn't 100% bulletproof since it really depends on what the mod is and what it's changing in the Android system.
Click to expand...
Click to collapse
Well i guess im gonna hafta upgrade then wont I

[Q] How do i make a ZIP TWRP friendly?

So i have had this issue for some time now but i have been overlooking it. every time i make a flashable rom for my xperia play and try to install it get a error and cant install from TWERP. If i install on CWM it works, but i did notice that some other zips install on TWRP but not mine. Once i tried something from TWRP website and it worked ON TWRP BUT NOT ON CWM. I need to make a zip that is compatible with both TWRP & CWM
xdarkmario said:
So i have had this issue for some time now but i have been overlooking it. every time i make a flashable rom for my xperia play and try to install it get a error and cant install from TWERP. If i install on CWM it works, but i did notice that some other zips install on TWRP but not mine. Once i tried something from TWRP website and it worked ON TWRP BUT NOT ON CWM. I need to make a zip that is compatible with both TWRP & CWM
Click to expand...
Click to collapse
Maybe your meta inf file in the zip I'd outdated? Try copying one from a newer flashable zip like a rom or one that works. Im not very good with this stuff but it's just a suggestion you could try
Sent from my Xperia Play (r800x)
xdarkmario said:
So i have had this issue for some time now but i have been overlooking it. every time i make a flashable rom for my xperia play and try to install it get a error and cant install from TWERP. If i install on CWM it works, but i did notice that some other zips install on TWRP but not mine. Once i tried something from TWRP website and it worked ON TWRP BUT NOT ON CWM. I need to make a zip that is compatible with both TWRP & CWM
Click to expand...
Click to collapse
I notice that that twrp hates things in updater-script that doesn't exists. For example, setting permissions or symlinking for non-existing files. And better do mounting with busybox command.
If you want just take meta-inf folder from my rom, it work in twrp. Edit to your liking (but delete aroma folder and aroma scrips)
Sent from my R800i using xda app-developers app
abdel12345 said:
Maybe your meta inf file in the zip I'd outdated? Try copying one from a newer flashable zip like a rom or one that works. Im not very good with this stuff but it's just a suggestion you could try
Sent from my Xperia Play (r800x)
Click to expand...
Click to collapse
if i update it then the zip looses compatibility with CWM
Bakisha said:
I notice that that twrp hates things in updater-script that doesn't exists. For example, setting permissions or symlinking for non-existing files. And better do mounting with busybox command.
If you want just take meta-inf folder from my rom, it work in twrp. Edit to your liking (but delete aroma folder and aroma scrips)
Sent from my R800i using xda app-developers app
Click to expand...
Click to collapse
i'll take a look for non existing links.

[Q] Update.zip and update-script

Hello,
First of all, Im not a developer, I'm just customizing my own ROM's apps and little stuff like that.
I want to create an update-script and a zip I can just flash in recovery.
I tried to create a script, then zipped it but when I tried to flash it, it says something like "error executing update-binary" Can someone help me?
I've looked up some tutorials on creating the zip.. but It doesnt work.
btw, I can flash all other zips
Kattiq said:
Hello,
First of all, Im not a developer, I'm just customizing my own ROM's apps and little stuff like that.
I want to create an update-script and a zip I can just flash in recovery.
I tried to create a script, then zipped it but when I tried to flash it, it says something like "error executing update-binary" Can someone help me?
I've looked up some tutorials on creating the zip.. but It doesnt work.
btw, I can flash all other zips
Click to expand...
Click to collapse
pull the update binary from a zip you have successfully flashed and use it to replace the one your are currently using.
if you get the same message then it's your script that may be the problem. make the binary switch first and try.
m

Categories

Resources