Need help with brotli files for rom porting - Moto Z Play Questions & Answers

"system.new.dat.br" are some new type of system image, while porting roms i can extract them using brotli.exe but the problem is how i can compress it back to .br format?
I just made the zip using the system.new.dat and changed the updater script
block_image_update("/dev/block/bootdevice/by-name/system", package_extract_file("system.transfer.list"), "system.new.dat.br", "system.patch.dat")
to
block_image_update("/dev/block/bootdevice/by-name/system", package_extract_file("system.transfer.list"), "system.new.dat", "system.patch.dat")
but i end up with "error 7" all the time.
Anyone knows how to fix this?

Related

[Q] Can someone help me making a flashable zip

I have searched and tried everything that I can think of, I made a custom ROM, and somehow I messed up one of the apps. What I am trying to do is flash 1 file to the /system/app/ folder and two to /system/lib/ I must have tried over 100 different combinations of updater-script possibilities and I can't get any of them to work. I don't want someone to do it for me, although if that is all you will do at least I can break it down and learn that way. But I would really like someone to teach me how to do this. Anyone who can help will be thanked.
This is my updater-script
Code:
mount("MTD", "system", "/system");
package_extract_dir("system", "/system");
unmount("/system");
CWM recovery says
Code:
Finding update package...
Opening update package...
Installing update...
mount() expects 4 args. got 3
E:Error in /sdcard/684.zip
(Status 7)
Installation aborted.
if your just flashing to system, this zip should work, just change the contents. I use this all the time. Credits for the updater script go to xboarder56 http://db.tt/y3SV6QK
Sent from my HTC Vision using XDA Premium App

Stock update probs

i flashed a stock rom from shipped rom collection.. and when i updated the update was found and then it downloded and when it was installing it gave me error
Code:
We have determined that your phone may be running a modified version of its system software.
For your protection, we cannot update your phone.
Please revert back to the official HTc system software to update your phone.
if you did not modify your system software or would like help reverting your system,
please contact us via the support section at www.htc.com
why is this so?
Are you using clockworkmod? Because you must stock recovery!
vbhtt said:
Are you using clockworkmod? Because you must stock recovery!
Click to expand...
Click to collapse
ya using cwm how to gget that stock recovery?
http://forum.xda-developers.com/showthread.php?t=1431969
This Should have the option of 'return to stock recovery'
vbhtt said:
http://forum.xda-developers.com/showthread.php?t=1431969
This Should have the option of 'return to stock recovery'
Click to expand...
Click to collapse
bro i know i tried it .. the download is unavailable..
do yu have it with you? can you upload it to mediafire and sense the link?
vbhtt said:
http://forum.xda-developers.com/showthread.php?t=1431969
This Should have the option of 'return to stock recovery'
Click to expand...
Click to collapse
i flashed the recovery.img from the rom.zip got the recovery back will try update now.. i feel like a SMART ASS haha nywys thanks vbhtt
vbhtt said:
Are you using clockworkmod? Because you must stock recovery!
Click to expand...
Click to collapse
not working still getting the same eror
mhrsolanki2020 said:
not working still getting the same eror
Click to expand...
Click to collapse
You will have to return to the original System image and recovery for the update to work. The update does a system file verification before it will run.
SAMPLE
Code:
# Script Version: G2.4
mount("yaffs2", "MTD", "system", "/system");
assert(check_cid(getprop("ro.cid"), "00000000" , "11111111" ,
"22222222" , "33333333" , "44444444" , "55555555" , "66666666" ,
"77777777" , "88888888" , "99999999");
ifelse( is_ship_bootloader(getprop("ro.bootloader")) == "t" ,
assert(check_mid("full", "PG7624000") == "t");,
assert(check_mid("simple", "PG7624000") == "t");
);
assert(getprop("ro.product.device") == "marvel" ||
getprop("ro.build.product") == "marvel");
ui_print("Copying fotaBoot to /data/system for customize reload...");
mount("yaffs2", "MTD", "userdata", "/data");
package_extract_file("fotaBoot", "/data/system/fotaBoot");
ui_print("Verifying current system...");
show_progress(0.100000, 0);
assert(apply_patch_check("/system/app/AccountSyncManager.apk", "0c905b041013e66457dd8e9e3abc5a98a7aaff37", "cc881deb5a9e22c6034d4533aa16d8e59abf6124"));
set_progress(0.000434);
assert(apply_patch_check("/system/app/AccountSyncManager.odex", "54e29e187f645bf4cca610039c0cea19264db3a9", "82d14a73106da8fc8857ddf346f10803eaace65e"));
set_progress(0.000864);
assert(apply_patch_check("/system/app/AdobeReader.apk", "4b631cd33caf62c028025431193c90e74ac2f843", "b4495167bce02c3888bfbd11500b471408a2cd1e"));
set_progress(0.002245);
assert(apply_patch_check("/system/app/AppSharing.apk", "68f72c802abfae89a352e05c84fec8131f297ec2", "1af6b59cba8d4ea078cb5d92d58b4269cd482d23"));
set_progress(0.002364);
assert(apply_patch_check("/system/app/AppSharing.odex", "cdac67b3837582c59f05974100c27214d49d5c60", "dd965ebcb73fc62140ad74e192c52908884315fd"));
Tera Tike said:
You will have to return to the original System image and recovery for the update to work. The update does a system file verification before it will run.
SAMPLE
Code:
# Script Version: G2.4
mount("yaffs2", "MTD", "system", "/system");
assert(check_cid(getprop("ro.cid"), "00000000" , "11111111" ,
"22222222" , "33333333" , "44444444" , "55555555" , "66666666" ,
"77777777" , "88888888" , "99999999");
ifelse( is_ship_bootloader(getprop("ro.bootloader")) == "t" ,
assert(check_mid("full", "PG7624000") == "t");,
assert(check_mid("simple", "PG7624000") == "t");
);
assert(getprop("ro.product.device") == "marvel" ||
getprop("ro.build.product") == "marvel");
ui_print("Copying fotaBoot to /data/system for customize reload...");
mount("yaffs2", "MTD", "userdata", "/data");
package_extract_file("fotaBoot", "/data/system/fotaBoot");
ui_print("Verifying current system...");
show_progress(0.100000, 0);
assert(apply_patch_check("/system/app/AccountSyncManager.apk", "0c905b041013e66457dd8e9e3abc5a98a7aaff37", "cc881deb5a9e22c6034d4533aa16d8e59abf6124"));
set_progress(0.000434);
assert(apply_patch_check("/system/app/AccountSyncManager.odex", "54e29e187f645bf4cca610039c0cea19264db3a9", "82d14a73106da8fc8857ddf346f10803eaace65e"));
set_progress(0.000864);
assert(apply_patch_check("/system/app/AdobeReader.apk", "4b631cd33caf62c028025431193c90e74ac2f843", "b4495167bce02c3888bfbd11500b471408a2cd1e"));
set_progress(0.002245);
assert(apply_patch_check("/system/app/AppSharing.apk", "68f72c802abfae89a352e05c84fec8131f297ec2", "1af6b59cba8d4ea078cb5d92d58b4269cd482d23"));
set_progress(0.002364);
assert(apply_patch_check("/system/app/AppSharing.odex", "cdac67b3837582c59f05974100c27214d49d5c60", "dd965ebcb73fc62140ad74e192c52908884315fd"));
Click to expand...
Click to collapse
ya i know.. i flashes boot.img system.img and recovery.img from the rom.zip i extracted from ruu
The downloaded file must be on the sd card. It must be something like OTA_update...........zip check if its flashable. Check if you can do something with that. You may have to search for it.
vbhtt said:
The downloaded file must be on the sd card. It must be something like OTA_update...........zip check if its flashable. Check if you can do something with that. You may have to search for it.
Click to expand...
Click to collapse
The only file I. Found is com.android.vending.updater-20120221-061703.tar.gz
It should be in the download folder. You downloaded it ota right? I suggest you search manually and not use the search function of your file manager
vbhtt said:
It should be in the download folder. You downloaded it ota right? I suggest you search manually and not use the search function of your file manager
Click to expand...
Click to collapse
yeah bro.. i searched it everywhere on sd card .. no where not even in download folder..
Have you enabled show hidden files in your file manager? Filenames that start with a '.' are generally hidden
Sent from my iPod touch using Tapatalk
vbhtt said:
Have you enabled show hidden files in your file manager? Filenames that start with a '.' are generally hidden
Sent from my iPod touch using Tapatalk
Click to expand...
Click to collapse
yeap saw.. nothing there.
Maybe the system deleted it after if found out? Do you get a notification that an update is available in the status bar?
Sent from my iPod touch using Tapatalk
vbhtt said:
Maybe the system deleted it after if found out? Do you get a notification that an update is available in the status bar?
Sent from my iPod touch using Tapatalk
Click to expand...
Click to collapse
yep i do... and when i select it.. it starts downloading... and then nothing the same error comes..
Just after it downloads, it asks whether you want to install it right? Click no and then search for it.
Sent from my iPod touch using Tapatalk
vbhtt said:
Just after it downloads, it asks whether you want to install it right? Click no and then search for it.
Sent from my iPod touch using Tapatalk
Click to expand...
Click to collapse
it doesnt asks me nyting as such it just starts itself up
Did you try unrooting?
Factory data reset?
Try the 'fastboot oem lock' command
Cant think of anything else...
Sent from my iPod touch using Tapatalk

Modem update from CWM

Modem update from CWM simply doesn't work!
I tried already everything! Result is: Script runs without error but no change, the baseband version is still the old.
My last update script (no errors, but doesn't work) is following:
Code:
assert(getprop("ro.product.device") == "serranolte" || getprop("ro.build.product") == "serranolte" ||
getprop("ro.product.device") == "serranoltexx" || getprop("ro.build.product") == "serranoltexx" ||
getprop("ro.product.device") == "i9195" || getprop("ro.build.product") == "i9195" ||
getprop("ro.product.device") == "GT-I9195" || getprop("ro.build.product") == "GT-I9195");
ui_print("------------------------------------------------------");
ui_print("I9195 modem update by LackoGyerek");
show_progress(0.150000, 0);
package_extract_dir("tools", "/tmp");
set_perm(0, 0, 0777, "/tmp/busybox");
run_program("/tmp/busybox", "mkfs.vfat", "/dev/block/platform/msm_sdcc.1/by-name/modem");
run_program("/tmp/busybox", "mkdir", "-p", "/tmp/modem");
run_program("/tmp/busybox", "mount", "-w", "-t", "auto", "/dev/block/platform/msm_sdcc.1/by-name/modem", "/tmp/modem");
package_extract_dir("modem", "/tmp/modem");
set_perm_recursive(0, 1000, 0771, 0771, "/tmp/modem/image");
run_program("/tmp/busybox", "umount", "/tmp/modem");
ui_print("Installation complete!");
show_progress(1.000000, 0);
ui_print("------------------------------------------------------");
The update package above uses the unpacked NON-HLOS.bin content. Can be easily unpacked with DiskInternals Linux Reader tool.
Already tried with/without formatting of modem partition.
Also tried the edify command
Code:
package_extract_file("NON-HLOS.bin", "/dev/block/platform/msm_sdcc.1/by-name/modem");
Method below was checked too:
Code:
busybox dd if=./NON-HLOS.bin of=/dev/block/platform/msm_sdcc.1/by-name/modem
Result of dd command:
Code:
97923+1 records in
97923+1 records out
50136832 bytes (47.8MB) copied, 6.765573 seconds, 7.1MB/s
And finally this method:
Code:
package_extract_dir("modem","/tmp");
write_raw_image("/tmp/NON-HLOS.bin", "/dev/block/platform/msm_sdcc.1/by-name/modem");
delete("/tmp/NON-HLOS.bin");
All above with the same result: No error during flash, but baseband version not changed.
Any idea, how to update modem via recovery?
If you check the contents of the flashed NON-HLOS.bin you should find that it has indeed been changed.
The version listed in about device doesn't update unless you flash with Odin twice
Whosat said:
If you check the contents of the flashed NON-HLOS.bin you should find that it has indeed been changed.
The version listed in about device doesn't update unless you flash with Odin twice
Click to expand...
Click to collapse
Trust me, I checked it!
Followíng command used to check:
Code:
busybox dd if=/dev/block/platform/msm_sdcc.1/by-name/modem | strings | grep "I9195"
The above always returned the old baseband version string.
And yes, the Odin solution works also for me but I'm searching for a CWM flash solution. No luck yet...
News: I've found this XDA thread, where user says:
The only Write operation permitted on a flash memory device is to
change a bit from a one to a zero. If the reverse operation is needed, then
the block must be erased (to reset all bits to the one state).
Click to expand...
Click to collapse
Maybe this is the solution. Before flashing modem, the whole modem partition must be erased.
Guys, it's really interesting. It seems, that modem partition on our device is write protected. We simply can't erase/format it or write anything to it from recovery (or we don't know the correct way).
I did the following: Went to TWRP recovery, which has built in command line terminal. My goal was to format modem partition. Normally this can be done using following command:
Code:
busybox mkfs.vfat -v /dev/block/platform/msm_sdcc.1/by-name/modem
Cmd executed successfully, but modem partition was NOT formatted.
After restart of phone I checked the mobile data functionality, everything worked and still works without problem.
This is the script form a GT-I9500 CWM-flashable modem.
Code:
ui_print("----Samsung Galaxy S4----");
ui_print("-----GT-I9500-ONLY-----");
ui_print("-----Android 4.2.2------");
ui_print("------STOCK Modem-----");
ui_print("-created-by-DjeMBeY-XDA-");
show_progress(0.150000, 0);
assert(package_extract_file("Djembey/modem.bin", "/tmp/modem.bin"),
write_raw_image("/tmp/modem.bin", "/dev/block/mmcblk0p13"),
delete("/tmp/modem.bin"));
ui_print("Installation complete!");
show_progress(1.000000, 0);
Seems like it uses write_raw_image straight to the partition.
Whosat said:
This is the script form a GT-I9500 CWM-flashable modem.
Code:
ui_print("----Samsung Galaxy S4----");
ui_print("-----GT-I9500-ONLY-----");
ui_print("-----Android 4.2.2------");
ui_print("------STOCK Modem-----");
ui_print("-created-by-DjeMBeY-XDA-");
show_progress(0.150000, 0);
assert(package_extract_file("Djembey/modem.bin", "/tmp/modem.bin"),
write_raw_image("/tmp/modem.bin", "/dev/block/mmcblk0p13"),
delete("/tmp/modem.bin"));
ui_print("Installation complete!");
show_progress(1.000000, 0);
Seems like it uses write_raw_image straight to the partition.
Click to expand...
Click to collapse
Yes, I saw that. Already tried but as the other methods: Script executes successfully, but modem is not updated.
You can also try if you want, here is my example.
The script in my package is following:
Code:
package_extract_dir("modem","/tmp");
[B]write_raw_image[/B]("/tmp/NON-HLOS.bin", "/dev/block/platform/msm_sdcc.1/by-name/modem");
delete("/tmp/NON-HLOS.bin");
Note: assert() command is not necessary.

Help with unpacking system apps

Hello everybody .. Hiw i can unpack lollipop system.dat file??
@Skin1980
@S3V3N
Akhayev said:
@Skin1980
Click to expand...
Click to collapse
system.dat? Explain better pls
Skin1980 said:
system.dat? Explain better pls
Click to expand...
Click to collapse
I am sorry .. I downloaded cm12 that based on lollipop and when i opened the rom theres a file named system.new.dat and all the apps inside this file and i wants to port some apps from this file but i cant open it cos its .dat file
Akhayev said:
I am sorry .. I downloaded cm12 that based on lollipop and when i opened the rom theres a file named system.new.dat and all the apps inside this file and i wants to port some apps from this file but i cant open it cos its .dat file
Click to expand...
Click to collapse
try to mount it
Skin1980 said:
try to mount it
Click to expand...
Click to collapse
7zip cannot extract a system.new.dat file and DAEMON tools cannot mount it. I'm hoping ROM devs release their ROMs with the standard format but if they don't, I'm sure someone from the community will easily find a way to extract them.
CM12 system.new.dat apps
Hi,
I had downloaded CM12 just now. There are no apks but only 1-img and 1-dat files in which "system.new.dat" file contains the stuff. Please provide a way to extract apks from system.new.dat file.
Unpack
Anyone figure how to do this?
I would like to know this as well.
I don't know for stock, I'm searching how to do it, but for cm12, you can compile from source directly, there is a thread in development section.
I'm stuck too.
Habaddon said:
I don't know for stock, I'm searching how to do it, but for cm12, you can compile from source directly, there is a thread in development section.
Click to expand...
Click to collapse
This is a chicken and egg problem for me. I want to build a ROM but first want to extract the device firmware for my ROM. (I don't have access to the Nexus 4 phone to install a ROM on and then extract the firmware.)
I've been Googling for a solution without luck.
Followed a clue. I uncommented a debug print statement in simg2img. No luck.
Code:
$ file system.new.dat
system.new.dat: Linux rev 1.0 ext4 filesystem data, UUID=57f8f4bc-abf4-655f-bf67-946fc0f9f25b (extents) (large files)
$ simg2img.py system.new.dat system.new.raw
424620032
'\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'
Not a compressed ext4 file!!
Any ideas?
Yeah, I tried that too, it doesn't work. I ask a dev, in fact, it is simple. All you need to do is mount the img.
mkdir system
sudo mount system.img system
Click to expand...
Click to collapse
Still stuck
Habaddon said:
Yeah, I tried that too, it doesn't work. I ask a dev, in fact, it is simple. All you need to do is mount the img.
Click to expand...
Click to collapse
I'm still confused.
I suspect that the system.new.dat is not a simple image file and is most probably signed in some way. I don't know why the file command says that it is an ext4 filesystem while simg2img.py, with the debug statement which prints the first bytes uncommented, prints only nulls.
BTW, I asked my relative who owns the device to try flashing this ROM and it didn't work because of a known problem whereby rooting was lost. He will try a new ROM.
Plan B will be to pull the firmware via adb but I'm certainly curious about the new Lollipop way of packaging the ROM.
Code:
$ ls -l cm-12-20141123-UNOFFICIAL-mako.zip
-rw-r--r-- 1 zippy zippy 238444354 Dec 6 08:20 cm-12-20141123-UNOFFICIAL-mako.zip
$ unzip cm-12-20141123-UNOFFICIAL-mako.zip
Archive: cm-12-20141123-UNOFFICIAL-mako.zip
signed by SignApk
extracting: system.patch.dat
inflating: META-INF/com/android/metadata
inflating: META-INF/com/google/android/update-binary
inflating: META-INF/com/google/android/updater-script
inflating: META-INF/org/cyanogenmod/releasekey
inflating: boot.img
inflating: file_contexts
inflating: [COLOR="Red"]system.new.dat[/COLOR]
inflating: system.transfer.list
inflating: system/bin/backuptool.functions
inflating: system/bin/backuptool.sh
inflating: system/bin/otasigcheck.sh
inflating: META-INF/com/android/otacert
inflating: META-INF/MANIFEST.MF
inflating: META-INF/CERT.SF
inflating: META-INF/CERT.RSA
$ ls -l system.new.dat
-rw-rw-r-- 1 zippy zippy 424620032 Feb 29 2008 system.new.dat
$ file system.new.dat
system.new.dat: Linux rev 1.0 ext4 filesystem data, UUID=57f8f4bc-abf4-655f-bf67-946fc0f9f25b (extents) (large files)
$ rm -rf # remove the extracted system directory from above
$ mkdir system
$ sudo mount system.new.dat system
[sudo] password for zippy:
mount: wrong fs type, bad option, bad superblock on /dev/loop0,
missing codepage or helper program, or other error
In some cases useful info is found in syslog - try
dmesg | tail or so.
$ dmesg | tail -2
[89035.798766] loop: module loaded
[89035.906824] EXT4-fs (loop0): bad geometry: block count 215040 exceeds size of device (103667 blocks)
I wonder why nobody put up a way to modify this?
I kept looking for the solution from the day lollipop releases, but without any success.
:crying:
Investigating ...
I know more now.
Below is the update-script which calls functions in the update-binary. I highlighted the code in question. This is obviously not a simple filesystem in the system.new.dat. I've hacked at it with ext4.fsck and resize2fs with no luck.
Code:
assert(getprop("ro.product.device") == "mako" || getprop("ro.build.product") == "mako" || abort("This package is for device: mako; this device is " + getprop("ro.product.device") + "."););
ifelse(is_mounted("/system"), unmount("/system"));
mount("ext4", "EMMC", "/dev/block/platform/msm_sdcc.1/by-name/system", "/system", "");
package_extract_file("system/bin/backuptool.sh", "/tmp/backuptool.sh");
package_extract_file("system/bin/backuptool.functions", "/tmp/backuptool.functions");
set_metadata("/tmp/backuptool.sh", "uid", 0, "gid", 0, "mode", 0755);
set_metadata("/tmp/backuptool.functions", "uid", 0, "gid", 0, "mode", 0644);
run_program("/tmp/backuptool.sh", "backup");
unmount("/system");
if is_mounted("/data") then
package_extract_file("system/bin/otasigcheck.sh", "/tmp/otasigcheck.sh");
package_extract_file("META-INF/org/cyanogenmod/releasekey", "/tmp/releasekey");
set_metadata("/tmp/otasigcheck.sh", "uid", 0, "gid", 0, "mode", 0755);
run_program("/tmp/otasigcheck.sh") != "31744" || abort("Can't install this package on top of incompatible data. Please try another package or run a factory reset");
else
mount("ext4", "EMMC", "/dev/block/platform/msm_sdcc.1/by-name/userdata", "/data", "");
package_extract_file("system/bin/otasigcheck.sh", "/tmp/otasigcheck.sh");
package_extract_file("META-INF/org/cyanogenmod/releasekey", "/tmp/releasekey");
set_metadata("/tmp/otasigcheck.sh", "uid", 0, "gid", 0, "mode", 0755);
run_program("/tmp/otasigcheck.sh") != "31744" || abort("Can't install this package on top of incompatible data. Please try another package or run a factory reset");
unmount("/data");
endif;
show_progress(0.750000, 0);
[COLOR="red"]block_image_update("/dev/block/platform/msm_sdcc.1/by-name/system", package_extract_file("system.transfer.list"), "system.new.dat", "system.patch.dat");[/COLOR]
mount("ext4", "EMMC", "/dev/block/platform/msm_sdcc.1/by-name/system", "/system", "");
delete("/system/bin/otasigcheck.sh");
unmount("/system");
show_progress(0.020000, 10);
mount("ext4", "EMMC", "/dev/block/platform/msm_sdcc.1/by-name/system", "/system", "");
package_extract_file("system/bin/backuptool.sh", "/tmp/backuptool.sh");
package_extract_file("system/bin/backuptool.functions", "/tmp/backuptool.functions");
set_metadata("/tmp/backuptool.sh", "uid", 0, "gid", 0, "mode", 0755);
set_metadata("/tmp/backuptool.functions", "uid", 0, "gid", 0, "mode", 0644);
run_program("/tmp/backuptool.sh", "restore");
delete("/system/bin/backuptool.sh");
delete("/system/bin/backuptool.functions");
unmount("/system");
show_progress(0.050000, 5);
package_extract_file("boot.img", "/dev/block/platform/msm_sdcc.1/by-name/boot");
show_progress(0.200000, 10);
Next, one can look in the source code and try to figure out what it is doing.
Or maybe the next step is to see if there is a host build (i.e. Ubuntu, Fedora, etc) of the binary-update which can be run from the command line into a file which can be mounted.
I'm sure that there is an easy way but finding it is difficult!
Ext2Explorer, Diskinternals Linux Reader can mount, read and extract those system images. But I m not sure if they are fully compatible because in both of these apps which I tried priv-app and some other folders are shown empty. I don't know if normaly there are files in these folders or not.
I've been struggling with these system.new.dat block images since lollipop came out since I need to convert roms to flash onto F2FS system partitions. I searched high and low for a way to mount that image outside of twrp with no luck. So I just used twrp instead... Luckily I've an extra device at my disposal atm. These are the steps I take:
Clean flash a lollipop rom that has a system.new.dat image in twrp.
Reboot system.
When device finishes booting use hardware power button to power down without messing with the rom itself yet so it stays fresh. (It's ok to confirm power down on touch screen.)
In twrp make a backup of only the system partition.
Boot back to system and use the method you prefer to move the file system.ext4.win from /TWRP/BACKUPS/-ur-device-serial/-ur-backup-date on to your pc and rename it system.tar so you can unpack it. (Of course make sure you have the proper decompression tools, which every OS usually does now.)
Now you have the complete fresh contents of /system as you would in a traditional rom zip. You can now do with that as you please. :silly:
Well googling i found this solution http://forum.xda-developers.com/nexus-7/general/guide-unpack-dat-t2970707 @adomol:
I've been struggling with these system.new.dat block images since lollipop came out. I searched high and low for a way to mount that image outside of twrp with no luck. So I just used twrp instead... These are the steps I take:
1.Clean flash a lollipop rom that has a system.new.dat image in twrp.
2.Reboot system.
3.When device finishes booting use hardware power button to power down without messing with the rom itself yet so it stays fresh. (It's ok to confirm power down on touch screen.)
4.In twrp make a backup of only the system partition.
5.Boot back to system and use the method you prefer to move the file system.ext4.win from:
/TWRP/BACKUPS/-ur-device-serial/-ur-backup-date
to your pc and rename it system.tar so you can unpack it. (Of course make sure you have the proper decompression tools, which every OS usually does now.)
Now you have the complete fresh contents of /system as you would in a traditional rom zip. You can do with that as you please, or just throw it into a rom kitchen.
all credits to @adomol
adomol said:
I've been struggling with these system.new.dat block images since lollipop came out since I need to convert roms to flash onto F2FS system partitions. I searched high and low for a way to mount that image outside of twrp with no luck. So I just used twrp instead... Luckily I've an extra device at my disposal atm. These are the steps I take:
Clean flash a lollipop rom that has a system.new.dat image in twrp.
Reboot system.
When device finishes booting use hardware power button to power down without messing with the rom itself yet so it stays fresh. (It's ok to confirm power down on touch screen.)
In twrp make a backup of only the system partition.
Boot back to system and use the method you prefer to move the file system.ext4.win from /TWRP/BACKUPS/-ur-device-serial/-ur-backup-date on to your pc and rename it system.tar so you can unpack it. (Of course make sure you have the proper decompression tools, which every OS usually does now.)
Now you have the complete fresh contents of /system as you would in a traditional rom zip. You can now do with that as you please. :silly:
Click to expand...
Click to collapse
-droidberg- said:
Well googling i found this solution http://forum.xda-developers.com/nexus-7/general/guide-unpack-dat-t2970707 @adomol:
I've been struggling with these system.new.dat block images since lollipop came out. I searched high and low for a way to mount that image outside of twrp with no luck. So I just used twrp instead... These are the steps I take:
1.Clean flash a lollipop rom that has a system.new.dat image in twrp.
2.Reboot system.
3.When device finishes booting use hardware power button to power down without messing with the rom itself yet so it stays fresh. (It's ok to confirm power down on touch screen.)
4.In twrp make a backup of only the system partition.
5.Boot back to system and use the method you prefer to move the file system.ext4.win from:
/TWRP/BACKUPS/-ur-device-serial/-ur-backup-date
to your pc and rename it system.tar so you can unpack it. (Of course make sure you have the proper decompression tools, which every OS usually does now.)
Now you have the complete fresh contents of /system as you would in a traditional rom zip. You can do with that as you please, or just throw it into a rom kitchen.
all credits to @adomol
Click to expand...
Click to collapse
But this won't work when trying to port because you need to swap kernel's (for going between same-device, different-carrier)

[Question] Error E1001: Failed to update system image, ERROR 7

Hi.
This is my first time working with ROMs, wanted to see if I could unpack and repack them and have them work, so I would know if my later changes cause problems. I've noticed if I unzip a ROM, then zip it again, without any changes made, I get this error within a few seconds of starting the flash. If I don't unpack and repack the zip, it flashes fine.
I use the Android Kitchen, to unpack/repack, and signed the zip. Anyone know what's going on?
Did a full wipe with TWRP before flash attempt.
Code:
Starting ADB Sideload feature...
Target: google/occam/mako:5.1.1/LMy48M/2167285:user/release-keys
detected filesystem ext4 for /dev/block/platform/msm_sdcc.1/by-name/system
Patching system image unconditionally...
E1001: Failed to update system image.
Updater process ended with ERROR: 7
Thank you,
Josh
Edit your updater-script
find this line
Code:
.... package_extract_file("system.transfer.list"), "system.new.dat.br", "system.patch.dat") ||
abort("E1001: Failed to update system image.");
change to :
Code:
.... package_extract_file("system.transfer.list"), "system.new.dat.br", "system.patch.dat");
Just replace " ||" with ";" and delete line abort("blablabla"):
adislice said:
find this line
Code:
.... package_extract_file("system.transfer.list"), "system.new.dat.br", "system.patch.dat") ||
abort("E1001: Failed to update system image.");
change to :
Code:
.... package_extract_file("system.transfer.list"), "system.new.dat.br", "system.patch.dat");
Just replace " ||" with ";" and delete line abort("blablabla"):
Click to expand...
Click to collapse
hey man when i deleted that line my phone booted in fastboot mode
I solved this by installing the latest version of TWRP and Oxygen OS.
Can anyone please help me correct error 7 with the following updater-script
The error i get is :
Installing zip file '/external_sd/lineage-15.1
20180524-UNOFFICIAL-Ocm.zip
Checking for Digest file...
Target: htc/ocmdtwl_01405/htc_ocmdtwl:8.0.0/OPR6.
170623.013/1010171.4:user/release-keys
detected filesystem ext4 for /dev/block/bootdevice/
by-name/system
Patching system image unconditionally...
E1001: Failed to update system image.
Updater process ended with ERROR: 7
Error installing zip file '/external_sd/lineage-15.
-20180524-UNOFFICIAL-ROm,zip'
Updating partition details...
... done
assert(getprop("ro.product.device") == "htc_ocm" || getprop("ro.build.product") == "htc_ocm" ||
getprop("ro.product.device") == "htc_ocndugl" || getprop("ro.build.product") == "htc_ocndugl" ||
getprop("ro.product.device") == "htc_ocmdtwl" || getprop("ro.build.product") == "htc_ocmdtwl" ||
getprop("ro.product.device") == "ocm" || getprop("ro.build.product") == "ocm" || abort("E3004: This package is for device: htc_ocm,htc_ocndugl,htc_ocmdtwl,ocm; this device is " + getprop("ro.product.device") + ".");
ui_print("Target: htc/ocmdtwl_01405/htc_ocmdtwl:8.0.0/OPR6.170623.013/1010171.4:user/release-keys");
ifelse(is_mounted("/system"), unmount("/system"));
package_extract_dir("install", "/tmp/install");
set_metadata_recursive("/tmp/install", "uid", 0, "gid", 0, "dmode", 0755, "fmode", 0644);
set_metadata_recursive("/tmp/install/bin", "uid", 0, "gid", 0, "dmode", 0755, "fmode", 0755);
mount("ext4", "EMMC", "/dev/block/bootdevice/by-name/system", "/system", "");
run_program("/tmp/install/bin/backuptool.sh", "backup");
unmount("/system");
show_progress(0.650000, 0);
ui_print("Patching system image unconditionally...");
block_image_update("/dev/block/bootdevice/by-name/system", package_extract_file("system.transfer.list"), "system.new.dat.br", "system.patch.dat") ||
abort("E1001: Failed to update system image.");
show_progress(0.100000, 0);
ui_print("Patching vendor image unconditionally...");
block_image_update("/dev/block/bootdevice/by-name/vendor", package_extract_file("vendor.transfer.list"), "vendor.new.dat.br", "vendor.patch.dat") ||
abort("E2001: Failed to update vendor image.");
show_progress(0.020000, 10);
mount("ext4", "EMMC", "/dev/block/bootdevice/by-name/system", "/system", "");
run_program("/tmp/install/bin/backuptool.sh", "restore");
unmount("/system");
show_progress(0.050000, 5);
package_extract_file("boot.img", "/dev/block/bootdevice/by-name/boot");
show_progress(0.200000, 10);
if (getprop("ro.boot.mid") == "2Q4D20000" || getprop("ro.boot.mid") == "2Q4D10000") then
ui_print("This is a DS device - renaming radio props");
mount("ext4", "EMMC", "/dev/block/bootdevice/by-name/system", "/system", "");
rename("/vendor/lib64/libril-qc-ltedirectdisc.so", "/system/vendor/lib64/libril-qc-ltedirectdisc.so");
rename("/vendor/lib64/libril-qc-qmi-1.so", "/system/vendor/lib64/libril-qc-qmi-1.so");
rename("/vendor/lib64/libril-qc-radioconfig.so", "/system/vendor/lib64/libril-qc-radioconfig.so");
rename("/vendor/lib64/libril-qcril-hook-oem.so", "/system/vendor/lib64/libril-qcril-hook-oem.so");
unmount("/system");
endif;
set_progress(1.000000);
Any help is appreciated :s
Try using sideload insted of sd
i had the same error and i could do nothing...then I thought my sd maybe giving the error so i tried the sideload mode and believe me..........it worked
option 2:-if u have backed up your rom (or by anyhow if you can) try flashing another (in my case...an older) version of twrp. it also worked for me. would be glad if this helps you.
---------- Post added at 11:30 PM ---------- Previous post was at 11:05 PM ----------
[/COLOR]
SL.Pirate said:
i had the same error and i could do nothing...then I thought my sd maybe giving the error so i tried the sideload mode and believe......me it worked
but...at the moment i am having another problem...i'd appreciate if someone could help. the rom has been installed correctly (I guess) but...when it reboots,it says encryption unsuccessful. ther'es a key sayng reset phone but nothing happens after pressing it.i tried wiping all the partitions and reinstalling the rom and no use.
Click to expand...
Click to collapse
Solved...had some matters with the data partition.
SL.Pirate said:
Solved...had some matters with the data partition.
Click to expand...
Click to collapse
Such as?
I'm stuck at the same place as you were...
For the posterity :
in TWRP go to advanced > terminal, then create /cache/recovery with
mkdir /cache/recovery
solved the problem for me
Source : https://android.stackexchange.com/q...ineage-16-samsung-galaxy-note-2-gt-n7100-t03g
6mon said:
Such as?
I'm stuck at the same place as you were...
Click to expand...
Click to collapse
it said 'ENCRYPTION UNSUCCESSFULL'
if the samething happens to you....go to twrp,select wipe,advanced wipe and select (only) the data partition. then you gotta select repair or change file system select change file system and then select the correct format for the partition.(in and most of the cases...it is the EXT4 format.go ahead and reboot your device.this should probably work.If not...try other formats also from bottom to to. (HINT:-see what other partitions are formatted to).This should probably work if thats the case.
worked for me .thanks alot
It works!
6mon said:
For the posterity :
in TWRP go to advanced > terminal, then create /cache/recovery with
mkdir /cache/recovery
solved the problem for me
Source : https://android.stackexchange.com/q...ineage-16-samsung-galaxy-note-2-gt-n7100-t03g
Click to expand...
Click to collapse
Thank you so much! Before doing this, my Lenovo Vibe K5 Plus (A6020) wasn't able to install any ROM, but it's over! Now I can install custom ROMs with no flaws :good:
Worked for me as well and much easier than editing the update script. Thanks a lot!
If youre still getting error 7 e1001 then try this.
Boot twrp
Tap advanced tab
Tap file manager/explorer
Tap on /system
Tap + icon on the folder in bottom right corner to modify
Tap chmod 755 to enable r/w for system part.
Try to install again.
That is what worked for me
6mon said:
For the posterity :
in TWRP go to advanced > terminal, then create /cache/recovery with
mkdir /cache/recovery
solved the problem for me
Source : https://android.stackexchange.com/q...ineage-16-samsung-galaxy-note-2-gt-n7100-t03g
Click to expand...
Click to collapse
did the trick for me. Whoever has Error 7 / Error 1001 issues, try this first cant hurt!
6mon said:
For the posterity :
in TWRP go to advanced > terminal, then create /cache/recovery with
mkdir /cache/recovery
solved the problem for me
Source : https://android.stackexchange.com/q...ineage-16-samsung-galaxy-note-2-gt-n7100-t03g
Click to expand...
Click to collapse
Posterity works!!! I found your post by googling and it solved my issue, thanks again!
I have the same issue on S4 mini, but /cache/recovery/ dir is present.
Hello
I am having this issue installing /e/ os on samsung J5 J500F.
I tried making directory /cache/recovery and addind read and write rights to /system but it did not work.
I also tried different version of the os and build as well as different version of TWRP.
I tried removing the assert line in the updater script but the zip file generated then in refused by twrp, It gets me the error "invalid zip file format".
I tried making the zip file with winrar or 7zip using either relatie paths or absolute path, but i still get the same error.
Would someone have an idea ?
Thanks !
Sometimes it is caused due to corrupted file. While transferring file through MTP it is likely to corrupt large files. I had the same problem. Then I tried copying file while in TWRP (sure it is also MTP) and it worked.
HatMan22 said:
Sometimes it is caused due to corrupted file. While transferring file through MTP it is likely to corrupt large files. I had the same problem. Then I tried copying file while in TWRP (sure it is also MTP) and it worked.
Click to expand...
Click to collapse
Hello, thank you very much for your advice, I copied all files through TWRP, so it is probably coming from something else.
I tried downloading the file and and also flashing some other builds or different versions but I still get "failed to update system image error"
Gabriel-Roger said:
Hello, thank you very much for your advice, I copied all files through TWRP, so it is probably coming from something else.
I tried downloading the file and and also flashing some other builds or different versions but I still get "failed to update system image error"
Click to expand...
Click to collapse
Do you have latest TWRP installed? Old TWRP may also cause this issue.

Categories

Resources