[SOLVED] I messed this up.... - Galaxy S III Q&A, Help & Troubleshooting

I have CM 10.1.3 installed on my i9100 and I flashed the ZIP file from the thread at the bottom of this post through CWM Recovery. Now, my phone is stuck at the boot screen.
I would realllly hate to reinstall my ROM and all apps, so I'd just like to fix the problem. The ZIP makes changes to the 'SurfaceFlinger' library. Could I reflash a ZIP of the original library? Any idea how I could get the file?
surfaceflinger-fix.zip
http://forum.xda-developers.com/galaxy-nexus/development/fix-lag-fix-cm10-based-roms-cm10-t1875490
SOLUTION:
The only file that surfaceflinger-fix.zip affects is libsurfaceflinger.so. So, I tried extracting this file from a copy of the CM 10.1 zip file. libsurfaceflinger.so is located in system/lib. I then created a flashable ZIP using this guide:
http://forum.xda-developers.com/showthread.php?t=2163974
I flashed the ZIP after pushing it via 'ADB push sample.zip /sdcard'. I installed the ZIP via CWM Recovery. Clear caches, reboot. STILL DIDN"T WORK.
So then I took a look a look in the META-INF folder of surfaceflinger-fix.zip and noticed some additional files that I did not have in my custom 'sample.zip'. So, I just took the libsurfaceflinger.so file that I extracted from CM 10.1 and put this file in surfaceflinger-fix.zip, replacing the original one in the ZIP file. Pushed this ZIP via ADB, everything works.

Had you taken a backup prior to flashing the zip it would've been five minutes work fixing your problem, I'm sure there's a lesson for all of us there.

ghostofcain said:
Had you taken a backup prior to flashing the zip it would've been five minutes work fixing your problem, I'm sure there's a lesson for all of us there.
Click to expand...
Click to collapse
This was definitely easier and this is a better fix than using a backup, but I absolutely agree with you.

Related

[Q] How to close the update.zip file the right way

Hi everyone,
I want to eventually create an edited ROM for an Android tablet. (Very simple stuff, really. Removing apks, adding build.prop mods)
I have a working update.zip file, which re-installs the image on the tablet, through stock recovery and the install from sdcard option.
But once I unzip it,
and then zip and even re-sign it (with the tool I found by searching the forum),
the recovery says 'installation aborted', when it is verifying the package.
1. How can I avoid this from happening? I get it that closing the update.zip is done wrong. How can I pass the verification section?
2. It IS possible to push such a .zip through stock recovery, right? I want to avoid CWM and TWRP and make it as simple as possible.
Thanks.
Have you tried making the changes without the unzip-rezip step? Editing the zip contents directly inside the zip (just drag n drop, delete, etc).
dxppxd said:
Have you tried making the changes without the unzip-rezip step? Editing the zip contents directly inside the zip (just drag n drop, delete, etc).
Click to expand...
Click to collapse
I tried this, too.
I only deleted one apk from system/app and later I tried again by deleting the apk and its odex file, too.
In both cases, instead of rejecting the update instanlty, it starts the process and then stops after a few seconds.
IS it possible that there is a filesize checker text inside the image?
(or maybe a propery inside the build.prop or updater-script ?)
Any ideas, anyone?
Still no progress.
I am trying to avoid custom recovery,
(I guess that would involve re-compiling it - which I do not know how to do - or ... just asking so from someone?)
is it possible to push the update.zip through stock recovery?
iraklisvel said:
Still no progress.
I am trying to avoid custom recovery,
(I guess that would involve re-compiling it - which I do not know how to do - or ... just asking so from someone?)
is it possible to push the update.zip through stock recovery?
Click to expand...
Click to collapse
No
Stock recovery doesn't flash custom roms
Get cwm from builder.recovery.com
Press thanks :good: I'd helped :highfive:

Flashing Issues | Will not pass Android Logo on XtreStolite ROM

Flashing Issues | Will not pass Android Logo
I have have the T-Mobile version of the S5 and it is currently running XtreStolite rom on lollipop. I have been messing around with the SystemUI and framework apks. (getting them to work every now and again)
However, I was searching around and tried to push the apk files through adb at first, instead of a complete reflash with the modified apks inside, with no luck. Adb says that the files were successfully sent but are not there and no changes are made. I then stumbled across a method using a flashable zip that is supposed to just replace the files I need.
I n doing so, after reboot the phone just sits at the Android Logo on powerup, them I have to reflash or restore my recovery. My question is this: Is there a method that allows me to setup a flashable zip with the system/priv-app/systemui/systemui.apk so that it will only replace those files and not the whole system folder itself?
There may be some more information that I am leaving out, sorry I have not slept all night and I am about to go to class.
Thanks in advance, if I have posted incorrectly, please advise.
RockyCaballero said:
I have have the T-Mobile version of the S5 and it is currently running XtreStolite rom on lollipop. I have been messing around with the SystemUI and framework apks. (getting them to work every now and again)
However, I was searching around and tried to push the apk files through adb at first, instead of a complete reflash with the modified apks inside, with no luck. Adb says that the files were successfully sent but are not there and no changes are made. I then stumbled across a method using a flashable zip that is supposed to just replace the files I need.
I n doing so, after reboot the phone just sits at the Android Logo on powerup, them I have to reflash or restore my recovery. My question is this: Is there a method that allows me to setup a flashable zip with the system/priv-app/systemui/systemui.apk so that it will only replace those files and not the whole system folder itself?
There may be some more information that I am leaving out, sorry I have not slept all night and I am about to go to class.
Thanks in advance, if I have posted incorrectly, please advise.
Click to expand...
Click to collapse
Here download this https://www.androidfilehost.com/?fid=24052804347782219
Extract and Add whatever directories/folders you want inside the system folder and flash. The script just extracts the system folder as a whole so as long as you make the correct folders, file names, directories etc it'll flash everything to the right spot.
Delete the jar file out of system/framework/ tho since it's a 5.1.1 jar file I did
Much obliged sir, worked perfectly. I'm sure it was the coding. [emoji2]

How to create flashable zip from system.img?

I have a system.img file, which I extracted from a 20J KDZ. I would now like to convert it into a flashable zip. I have 2 reasons for this. One, I dont want to have to use LGUP to revert my phone to a 100% stock system. It is much easier to just flash a zip of the system partition. Two, I would like to get into modding and ROM development. I believe that it is best to start from pure stock and make changes from there, instead of basing your work off of something that someone else has already modded.
I found these threads but they're a bit old (Lollipop):
1. http://forum.xda-developers.com/lg-v10/development/lg-h901-stock-img-files-boot-recovery-t3238638
2. http://forum.xda-developers.com/tmobile-lg-v10/development/lg-h901-stock-images-device-restore-t3241170
In one of them a member provided img's for recovery, boot, and system. In the other thread flashable zips of these img's were posted. These are for the Tmo v10. So it's not a matter of whether it can be done, but how. What tools are needed?
I downloaded the zip from one of the aforementioned threads, deleted the boot.img, replaced his system.img with mine, edited updater-script, and zipped up the meta-inf and system.img files with 7zip. I also checked to be sure that the block to be flashed was correct, it is the same (even though my img is for MM). I tried flashing with TWRP, I immediately get an error code 6.
What should I do?
Just off the subject slightly...but Eliminater74 already has a flashable zip (thought TWRP) for the 20J release. Its a 2 Part System.
Eliminator74's zip is modified. I want to take a 100% pure stock system.img (extracted from stock firmware) and put it into a zip that can be flashed in TWRP. When I say stock, that's what I mean. No root, no Xposed, no BusyBox, nothing. This has already been done for Lollipop on the v10, but I have MM. I have already explained why I want to do this. I'm currently looking into whether Superr's Kitchen can accomplish this.
He has a Fully Stock 20J release..just gotta read the thread..
AnonVendetta said:
I have a system.img file, which I extracted from a 20J KDZ. I would now like to convert it into a flashable zip. I have 2 reasons for this. One, I dont want to have to use LGUP to revert my phone to a 100% stock system. It is much easier to just flash a zip of the system partition. Two, I would like to get into modding and ROM development. I believe that it is best to start from pure stock and make changes from there, instead of basing your work off of something that someone else has already modded.
I found these threads but they're a bit old (Lollipop):
1. http://forum.xda-developers.com/lg-v10/development/lg-h901-stock-img-files-boot-recovery-t3238638
2. http://forum.xda-developers.com/tmobile-lg-v10/development/lg-h901-stock-images-device-restore-t3241170
In one of them a member provided img's for recovery, boot, and system. In the other thread flashable zips of these img's were posted. These are for the Tmo v10. So it's not a matter of whether it can be done, but how. What tools are needed?
I downloaded the zip from one of the aforementioned threads, deleted the boot.img, replaced his system.img with mine, edited updater-script, and zipped up the meta-inf and system.img files with 7zip. I also checked to be sure that the block to be flashed was correct, it is the same (even though my img is for MM). I tried flashing with TWRP, I immediately get an error code 6.
What should I do?
Click to expand...
Click to collapse
What tool did you use to extract the KDZ? I am trying to get a stock boot.img for the H901J build and I cannot seem to find it. I used the WindowsLGFirmwareExtract 1.2.5.0 release and all I see are a ton of .bin files and system.img. Is boot.img inside system.img?
@Sippi4x4man: I also used WindowsLGFirmwareExtract. Inside the KDZ there is a DZ and DLL file. Just extract the DZ, then you see lots of BINs. The system.img is split up (since it's around 4GB alone), but the tool can combine the pieces into one file. I was able to figure out how to manually flash the IMG, by running a dd command with TWRP's terminal emulator.
dd if=/external_sd/system.img of=/dev/block/platform/f9824900.sdhci/by-name/system
It takes a few minutes to finish, followed by a message that says no more space is available (I guess /system got filled up). I think when you dd anything you are copying both free and used space, since an IMG is usually just a (sometimes raw) disk image. TWRP will also initially say that no system is installed, I just ignored it, the device boots fine, everything is pure stock, no issues at all. System is mountable after subsequent boots into recovery. I used Magisk and the phh Superuser Magisk module to gain root without modding system partition, and the Magisk version of Xposed. But I would still like to create a flashable zip to automate this. If I figure it out I don't mind uploading it so the community can benefit.
As for the stock boot.img, I would imagine that the boot.bin inside the DZ is probably what you're after. The file size seems about right. However, I tried renaming boot.bin to boot.img and flashing from TWRP. Device wouldn't boot. So maybe there is some other conversion process that needs to be done. I can't think of any other way to obtain a pure stock boot image, extracting it from stock firmware seems like a sure way. If you ever figure it out then please provide a copy. Make sure it isn't patched by SuperSU, Xposed, Magisk, etc. I could maybe merge it into a stock zip.
AnonVendetta said:
@Sippi4x4man: I also used WindowsLGFirmwareExtract. Inside the KDZ there is a DZ and DLL file. Just extract the DZ, then you see lots of BINs. The system.img is split up (since it's around 4GB alone), but the tool can combine the pieces into one file. I was able to figure out how to manually flash the IMG, by running a dd command with TWRP's terminal emulator.
dd if=/external_sd/system.img of=/dev/block/platform/f9824900.sdhci/by-name/system
It takes a few minutes to finish, followed by a message that says no more space is available (I guess /system got filled up). I think when you dd anything you are copying both free and used space, since an IMG is usually just a (sometimes raw) disk image. TWRP will also initially say that no system is installed, I just ignored it, the device boots fine, everything is pure stock, no issues at all. System is mountable after subsequent boots into recovery. I used Magisk and the phh Superuser Magisk module to gain root without modding system partition, and the Magisk version of Xposed. But I would still like to create a flashable zip to automate this. If I figure it out I don't mind uploading it so the community can benefit.
As for the stock boot.img, I would imagine that the boot.bin inside the DZ is probably what you're after. The file size seems about right. However, I tried renaming boot.bin to boot.img and flashing from TWRP. Device wouldn't boot. So maybe there is some other conversion process that needs to be done. I can't think of any other way to obtain a pure stock boot image, extracting it from stock firmware seems like a sure way. If you ever figure it out then please provide a copy. Make sure it isn't patched by SuperSU, Xposed, Magisk, etc. I could maybe merge it into a stock zip.
Click to expand...
Click to collapse
It's been a while from this post... But I'm looking after the same goal you were and got the same error 6 trying the same things you described in your previous posts. Despite of these long 4 years, let me try: did you finally achieve to make the flashable zip with system.img?
I do not own an LG V10 anymore.....it is the most garbage phone I've ever had.
I now use SuperR's Kitchen to create flashable zip from system.img. Works like a charm every time. Downside is that you need a PC to use it. It works for all phones (but you must also have an unlocked bootloader and custom recovery, or you will not be able to flash the zip). There are both free and donate versions, both will work fine.
AnonVendetta said:
I do not own an LG V10 anymore.....it is the most garbage phone I've ever had.
I now use SuperR's Kitchen to create flashable zip from system.img. Works like a charm every time. Downside is that you need a PC to use it. It works for all phones (but you must also have an unlocked bootloader and custom recovery, or you will not be able to flash the zip). There are both free and donate versions, both will work fine.
Click to expand...
Click to collapse
Thank you for your reply. My device is Lenovo Z6 Pro but I thought this wouldn't make a difference.
Just to be sure, what you get with SuperR's Kitchen is a zip including system.img file and not the /system folder, right? Thank you in advance.
Edit: I had tried with other kitchen softwares with no success but SuperR's Kitchen did the job as you said, like a charm. Tons of thanks.
@descarao81: No, SuperR's Kitchen does not include system.img/boot.img, you must provide them yourself. They are device-specific. And system.img is a very large file, so it cannot reasonably be included in the Kitchen zip.
Yeah, maybe I wasn't clear, I meant if the resultant zip would include those raw image files being the original image files provided by the user. It's clear now. Thank you.
Here is how to do it...
1. Go to:
https://forum.xda-developers.com/tm.../lg-h901-stock-images-device-restore-t3241170
Download from the link he provided.
2. Extract the .zip file that you downloaded.
3. Make a new folder called "rom"
4. Copy the META-INF folder from the folder you extracted and place it into the "rom" folder.
5. Download any other flashable rom for your device. Extract it.
6. Go to {EXTRACTED_FLASHABLE_ROM}\META-INF\com\google\android\update-binary in your flashable extracted rom folder. Copy the "update-binary" . Got to the "rom" folder and go to META-INF\com\google\android. Delete the update-binary there and replace it with the one you have copied.
7. Now copy the boot.img from the other rom that is for your device. And place it into the "rom" folder.
8. Now Finally Compress the all the files.
9. Now you will have a flashable system.img.
10. Go to TWRP and flash the .zip that you have just made!
Upytry2 said:
Here is how to do it...
1. Go to:
https://forum.xda-developers.com/tm.../lg-h901-stock-images-device-restore-t3241170
Download from the link he provided.
2. Extract the .zip file that you downloaded.
3. Make a new folder called "rom"
4. Copy the META-INF folder from the folder you extracted and place it into the "rom" folder.
5. Download any other flashable rom for your device. Extract it.
6. Go to {EXTRACTED_FLASHABLE_ROM}\META-INF\com\google\android\update-binary in your flashable extracted rom folder. Copy the "update-binary" . Got to the "rom" folder and go to META-INF\com\google\android. Delete the update-binary there and replace it with the one you have copied.
7. Now copy the boot.img from the other rom that is for your device. And place it into the "rom" folder.
8. Now Finally Compress the all the files.
9. Now you will have a flashable system.img.
10. Go to TWRP and flash the .zip that you have just made!
Click to expand...
Click to collapse
Trying that exactly when im home! Thank you!

from Online Nandroid (CWM) to flash-able zip for Odin, need Meta-inf folder

After a failed online nandroid backup recovery I just shake my head.... not again. Don't want to flash stock rom, root, custom recovery flash path again!
So, I really like to create a flashable rom from my old backup. I just lack the meta-inf.
All these make flashable threads say get the meta-inf folder from any rom. I don't think that it is THAT easy.
(I tried a Meta-inf from a custom rom
http://forum.xda-developers.com/galaxy-s5/development/rom-noble-rom-t3403867/page19#post69117710
, but during zipping I get an error that it could not create something....)
Where can I get a working meta-inf file for Samsung S5 G901F, that I do not need to alter or just works?
Thanks you very much.

Replacing/updating files in ROM update zip

Quick scenario: I am working on a Nook Simple Touch UK ROM zip (now obsolete), trying to get from it the essentials that make it "UK" and move them into/replace similar files (mostly images and documents, but maybe one or two system apps) to the current US version of the ROM so that everything will function properly, but the ROM will have the look and feel (and localization options) of the obsolete UK ROM. There's not a lot to change.
The zips don't open for inspection properly in anything I've tried except 7zip. I can move/overwrite files from one ROM to the other, but there does seem to be a slight compression going on and I have no idea how to stop this. In WinRAR I could, but I don't see any similar option in 7zip. Then the zip contents go into a CWM flashable zip.
Preparing the CWM zip with no changes to the current US ROM gives an error-free flash and a functioning result. But if I change even one file (like the boot splash screen--same name, same file size--until moved), the flash fails almost immediately.
I asked someone about internal checksums before ROMs would install but they did not think there were any on these ROMs. Now I wonder. I don't see anything that looks like a checksum or even a "to do" list.
Have I missed some fundamental step or am I using my tools incorrectly (or the wrong tools)? One last thought, these are "update" zips, if that makes any difference, so on their own they would not wipe user data,for example.
Edit: I think I've got it!
1. Unzip (not just "open") both zips with WinRAR (7zip would not extract the update zips for me)
2. Drag alternate versions of files from one folder to the other
3. Zip up with 7zip
4. Open CWM update zip (just has META-INF folder) and ROM update zip with 7zip
5. Drag contents of ROM update zip to CWM zip.
6. Copy new CWM zip to CWM card and flash.
7. SMILE!
nmyshkin said:
Quick scenario: I am working on a Nook Simple Touch UK ROM zip (now obsolete), trying to get from it the essentials that make it "UK" and move them into/replace similar files (mostly images and documents, but maybe one or two system apps) to the current US version of the ROM so that everything will function properly, but the ROM will have the look and feel (and localization options) of the obsolete UK ROM. There's not a lot to change.
The zips don't open for inspection properly in anything I've tried except 7zip. I can move/overwrite files from one ROM to the other, but there does seem to be a slight compression going on and I have no idea how to stop this. In WinRAR I could, but I don't see any similar option in 7zip. Then the zip contents go into a CWM flashable zip.
Preparing the CWM zip with no changes to the current US ROM gives an error-free flash and a functioning result. But if I change even one file (like the boot splash screen--same name, same file size--until moved), the flash fails almost immediately.
I asked someone about internal checksums before ROMs would install but they did not think there were any on these ROMs. Now I wonder. I don't see anything that looks like a checksum or even a "to do" list.
Have I missed some fundamental step or am I using my tools incorrectly (or the wrong tools)? One last thought, these are "update" zips, if that makes any difference, so on their own they would not wipe user data,for example.
Edit: I think I've got it!
1. Unzip (not just "open") both zips with WinRAR (7zip would not extract the update zips for me)
2. Drag alternate versions of files from one folder to the other
3. Zip up with 7zip
4. Open CWM update zip (just has META-INF folder) and ROM update zip with 7zip
5. Drag contents of ROM update zip to CWM zip.
6. Copy new CWM zip to CWM card and flash.
7. SMILE!
Click to expand...
Click to collapse
Nice job!

Categories

Resources