repack system.img.ext4 with stock recovery - Samsung Galaxy Note 9 Questions & Answers

i want to remove some apk from system. so i plan make odin flashable tarball.
i just test the extract and repack, didn't do any modify, but it was fail.
1.
system.img.ext4.lz4 -> lz4 -> system.img.ext4 -> simg2img -> system.img -> img2simg -> system.img.ext4 -> N960U.tar(only system.img.ext4)
with system.img , i didn't modify anything,
after img2simg :
file system.img.ext4
system.img.ext4: Android sparse image, version: 1.0, Total of 1291776 4096-byte output blocks in 6335 input chunks.
Odin flash fail (auth), mobile show : security check fail system.
2.
system.img.ext4.lz4 -> lz4 -> system.img.ext4 -> N960U.tar(only system.img.ext4)
do not use simg2img or img2simg
after lz4:
file system.img.ext4
system.img.ext4: Android sparse image, version: 1.0, Total of 1291776 4096-byte output blocks in 6277 input chunks.
Odin flash success.
i also try to use mkuserimg.sh to repack android sparse image, but it also make fail.
mkuserimg.sh -s /Volumes/sysmain system.img.ext4 ext4 /system 529114496
The tow system.img.ext4 has some different, i want to compare the tow img file , but it to huge.
Any good idea? how the samsung mobile to check if it own img?
Sorry for my poor english.

[Q] Help on unpack repack ext4 system image
Does any one know how can I unpack and repack ext4 system images using cygwin? can you give me the complete and understandable tutorials on it? I have tried all of the tutorials here in XDA, but it seems that I can't follow the right way. Please...
forum.xda-developers.com

auth fail = OEM lock = BL Lock
must unlock bl or sampwnd

zalmen hatotach said:
[Q] Help on unpack repack ext4 system image
Does any one know how can I unpack and repack ext4 system images using cygwin? can you give me the complete and understandable tutorials on it? I have tried all of the tutorials here in XDA, but it seems that I can't follow the right way. Please...
forum.xda-developers.com
Click to expand...
Click to collapse
What errors do you get?

Related

[DEV TOOLS] - Pack & Repack Boot.img Files - for Windows USERS

Plagiarism will not be tolerated on XDA-Developers:
http://forum.xda-developers.com/showpost.php?p=35640046&postcount=36
Reserved - Possible Updates Using Cygwin
I'm gonna take this one just in case as well
Thx for the app but i have an empty ramdisk folder...and all of the ramdisk files can't created or newer or same age version exists...cydwin won't let me copy the log...im using huawei not SE phone..if it has something to do!! But i can see the contents at boot.img-ramdisk.gz
Thanks but please mirror to other filehoster because mf is buggy on my phone
Sent from my WT19i using xda premium
$ ./extractboot boot.img
./extractboot: ./split_bootimg.pl: /usr/bin/perl: bad interpreter: Permission denied
./extractboot: line 17: cpio: command not found
gzip: ../../boot.img-ramdisk.gz: No such file or directory
what i missed here?
edit: opps. missed the REQUIRED packages. testing again.
$ ./extractboot boot.img
Android Magice not found in ./boot.img/ Giving up.
gzip: ../../boot.img-ramdisk.gz: unexpected end of file
cpio: premature end of archive
Any help with this error? I am trying to split and edit a custom CM9/ICS boot.img
very useful tool, thanks
This isn't working for me on my htc evo 4g lte. I am unpacking the stock boot.img and then repacking it with NO changes and get bootloops.
your image png should not exceed 20KB and your logo.rle should not exceed 60kb Otherwise you will almost always bootloop
stef67000 said:
your image png should not exceed 20KB and your logo.rle should not exceed 60kb Otherwise you will almost always bootloop
Click to expand...
Click to collapse
I didn't change any pngs, logos, or anything. I simply unpacked, repacked, and flashed.
maxdamage2122 said:
I didn't change any pngs, logos, or anything. I simply unpacked, repacked, and flashed.
Click to expand...
Click to collapse
Check on the way your kernel should be build.. Ours use as base 0x20 but yours may change..
Sent from my LT18i using Tapatalk
jimbo77 said:
Check on the way your kernel should be build.. Ours use as base 0x20 but yours may change..
Sent from my LT18i using Tapatalk
Click to expand...
Click to collapse
Is there a way to check without the source? Source for our kernel isn't released yet.
I've tried to unpack the last boot.img from cm9 RC2 to get the new cwm 6.x but I have an issue
Code:
$ ./extractboot boot.img
Page size: 2048 (0x00000800)
Kernel size: 3229308 (0x0031467c)
Ramdisk size: 1789254 (0x001b4d46)
Second size: 0 (0x00000000)
Board name:
Command line:
Writing boot.img-kernel ... complete.
Writing boot.img-ramdisk.gz ... complete.
./extractboot: line 17: cpio: command not found
I use this way http://forum.xda-developers.com/showthread.php?t=1477845
how to change spash screen http://forum.xda-developers.com/showthread.php?t=1140406
You need to download the cpio package through cygic in order to have it fixed..
Sent from my SGS3... Yes I have it!!!!
jimbo77 said:
You need to download the cpio package through cygic in order to have it fixed..
Sent from my SGS3... Yes I have it!!!!
Click to expand...
Click to collapse
thanks
thomas.raines said:
$ ./extractboot boot.img
Android Magice not found in ./boot.img/ Giving up.
gzip: ../../boot.img-ramdisk.gz: unexpected end of file
cpio: premature end of archive
Any help with this error? I am trying to split and edit a custom CM9/ICS boot.img
Click to expand...
Click to collapse
Hello,I'm having the same error with CM9/10 ICS/JellyBean kernel boot.img,there are chances it comes from the kernel itself as it appears to be or should we better look into our configuration?
helo, i repacket doomlord kernel v22 and when im trying to flash it i got this error :
FAILED (remote: Wrong range:0x10008000-0x103202d7. Ok:0x00200000 - 0x03dfff)
It's somethink about size of kernel and "fake size maker" file, but i dont know how to fix it.
So I pulled a working one apart and replaced the kernel with the compiled one.
Code:
[email protected] ~
$ cd /boot
[email protected] /boot
$ ./extractboot boot.img
Page size: 2048 (0x00000800)
Kernel size: 4463500 (0x00441b8c)
Ramdisk size: 372027 (0x0005ad3b)
Second size: 0 (0x00000000)
Board name:
Command line: console=ttyHSL0,115200,n8 androidboot.hardware=qcom loglevel=0
Writing boot.img-kernel ... complete.
Writing boot.img-ramdisk.gz ... complete.
2881 blocks
[email protected] /boot
$ ./packboot
Using base address 0x40200000
Using command line 'console=ttyHSL0,115200,n8 androidboot.hardware=qcom loglevel=0'
No errors
I then put it back together and I'm getting the boot.img is like half the original size (even tho the kernel files were pretty close to almost deadon the same size) and when I try to send to boot I get this
Code:
>fastboot boot boot_new.img
downloading 'boot.img'...
OKAY [ 1.168s]
booting...
FAILED (remote: incomplete bootimage)
finished. total time: 1.168s
This is for a Pantech Burst (p9070) if that helps at all
Original boot.img
New repacked boot.img

Repacking firmware to flash in Odin but Without increasing binary? [done dumping]

Well i dumped my own rom and did this:
Code:
tar -H ustar -c zImage boot.bin modem.bin Sbl.bin cache.img data.img factoryfs.img hidden.img param.lfs > odin.tar
md5sum -t odin.tar >> odin.tar
mv odin.tar odin.tar.md5
It does create a valid flashable image for Odin... but the problem is that it increases the binary counter!
Anyone know how can i create a tar image without increasing it?
Since no one replied and in case anyone is wondering: to make a repack just use the stock kernel because a custom recovery increases the binary.. As simples as that
Sent from my GT-N7000 using Tapatalk 2

Partition information / Unbricking

This is the place for various bits and pieces of information/facts/wtf collected whilst digging around in our TF701.
Use at your own peril.
UPDATE: I know the staging partition is where to blob (bootloader) goes, but as I found out, that's only half of the story.
It seems like the bootloader takes the contents of staging at boot time and puts them where they belong.
Now if anybody has more details about this, that would be great.
Partitions
Code:
name device mountpoint fs description
/dev/block/platform/sdhci-tegra.3/ADF /dev/block/mmcblk0p7 /ADF ext4 ?
/dev/block/platform/sdhci-tegra.3/APD /dev/block/mmcblk0p6 /APD ext4 ASUS Product Demo
/dev/block/platform/sdhci-tegra.3/APP /dev/block/mmcblk0p4 /system ext4 Android OS
/dev/block/platform/sdhci-tegra.3/CAC /dev/block/mmcblk0p5 /cache ext4 recovery logs
/dev/block/platform/sdhci-tegra.3/CRA /dev/block/mmcblk0p11 ?
/dev/block/platform/sdhci-tegra.3/DTB /dev/block/mmcblk0p2 ?
/dev/block/platform/sdhci-tegra.3/EKS /dev/block/mmcblk0p13 NVEKSP
/dev/block/platform/sdhci-tegra.3/LNX /dev/block/mmcblk0p3 Linux kernel (8388608 b)
/dev/block/platform/sdhci-tegra.3/MDA /dev/block/mmcblk0p12 ?
/dev/block/platform/sdhci-tegra.3/MSC /dev/block/mmcblk0p8 empty (misc, bootloader etc.)
/dev/block/platform/sdhci-tegra.3/PER /dev/block/mmcblk0p10 /persist ext4 config/calibration data
/dev/block/platform/sdhci-tegra.3/SOS /dev/block/mmcblk0p1 Recovery kernel (8388608 b)
/dev/block/platform/sdhci-tegra.3/UDA /dev/block/mmcblk0p14 /data ext4 Android user data
/dev/block/platform/sdhci-tegra.3/USP /dev/block/mmcblk0p9 Staging (blob)
recovery.fstab
Code:
/dev/block/platform/sdhci-tegra.3/by-name/APP /system ext4 ro wait
/dev/block/platform/sdhci-tegra.3/by-name/CAC /cache ext4 noatime,nosuid,nodev,nomblk_io_submit,errors=panic wait
/dev/block/platform/sdhci-tegra.3/by-name/UDA /data ext4 noatime,nosuid,nodev,nomblk_io_submit,errors=panic wait,encryptable=/dev/block/platform/sdhci-tegra.3/by-name/MDA
/dev/block/platform/sdhci-tegra.3/by-name/MSC /misc emmc defaults defaults
/dev/block/platform/sdhci-tegra.3/by-name/LNX /boot emmc defaults defaults
/dev/block/platform/sdhci-tegra.3/by-name/SOS /recovery emmc defaults defaults
/dev/block/platform/sdhci-tegra.3/by-name/USP /staging emmc defaults defaults
/devices/platform/sdhci-tegra.2/mmc_host/mmc1 /storage/sdcard1 vfat default voldmanaged=sdcard:auto
/devices/platform/tegra-ehci.0 /mnt/usbdrive vfat default voldmanaged=usbdrive:auto
Blob
Code:
name size description status
[U]10.14.1.47:[/U] [ATTACH]2435244._xfImport[/ATTACH]
blob.BCT 8,192 Bytes Boot Config Table (original) [ATTACH]2435246._xfImport[/ATTACH]
blob.BC1 8,192 Bytes ? (original) [ATTACH]2435245._xfImport[/ATTACH]
blob.EBT 1,396,736 Bytes Bootloader (original) [ATTACH]2435247._xfImport[/ATTACH]
blob.PT 2,202 Bytes Partition Table (original) [ATTACH]2435248._xfImport[/ATTACH]
[U]10.26.1.7:[/U] [ATTACH]2435238._xfImport[/ATTACH]
blob.BCT 8,192 Bytes Boot Config Table (unchanged) [ATTACH]2435241._xfImport[/ATTACH]
blob.BC1 8,192 Bytes ? (changed) [ATTACH]2435240._xfImport[/ATTACH]
blob.EBT 1,421,312 Bytes Bootloader (changed) [ATTACH]2435242._xfImport[/ATTACH]
Unbrick
How to unbrick a TF701 that still has fastboot running (possibly partially redundant):
WARNING: Any damage caused by following these instructions...
Yeah, right... Nevermind that... If your fastboot works, this will save your tablet
Required tools: I assume you have them already
Required files:
UL-K00C-xx-10.14.1.47-user.zip (on micro SD card in TF701)
10.14.1.47 blob and boot.img (unpacked from UL-K00C-xx-10.14.1.47-user.zip)
drgravy's recovery.img
Code:
fastboot erase boot
fastboot erase staging
fastboot format system
fastboot flash staging blob
fastboot flash boot boot.img
fastboot flash recovery.img
fastboot reboot-bootloader
check the version displayed. Is it 10.14.1.47? if not, hard reset to bootloader ([vol-] + [power])
boot recovery kernel (RCK)
install zip
choose zip from sdcard
UL-K00C-xx-10.14.1.47-user.zip
Yes
wait and pray to odin
+++ go back +++
reboot system now
Yes - Disable recovery flash (doesn't actually matter)
Yes - Root device (/system/xbin/su) (just kidding, this doesn't work)
Please consider clicking thanks
Sources:
Lots of own work
http://forum.xda-developers.com/showpost.php?p=47767352&postcount=71
https://github.com/AndroidRoot/BlobTools
im trying to find pretty much the same info
mmcblk0p? for boot and external_sd
This helped alot thanks!
nevermind find both
LNX = boot
/dev/block/mmcblk1p1 is external_sd
schmeggy929 said:
im trying to find pretty much the same info
mmcblk0p? for boot and external_sd
This helped alot thanks!
nevermind find both
LNX = boot
/dev/block/mmcblk1p1 is external_sd
Click to expand...
Click to collapse
things that will appear here tomorrow:
by name symlinks
recovery fstab info
unpacked blob contents
more detailed bootloader related stuff
anything fun I'll find on the way
for the next 12 hours that's it...
lpdunwell said:
This is the place for various bits and pieces of information/facts/wtf collected whilst digging around in our TF701.
Use at your own peril.
UPDATE: I know the staging partition is where to blob (bootloader) goes, but as I found out, that's only half of the story.
It seems like the bootloader takes the contents of staging at boot time and puts them where they belong.
Now if anybody has more details about this, that would be great.
Partitions
Code:
name device mountpoint fs description
/dev/block/platform/sdhci-tegra.3/ADF /dev/block/mmcblk0p7 /ADF ext4 ?
/dev/block/platform/sdhci-tegra.3/APD /dev/block/mmcblk0p6 /APD ext4 ASUS Product Demo
/dev/block/platform/sdhci-tegra.3/APP /dev/block/mmcblk0p4 /system ext4 Android OS
/dev/block/platform/sdhci-tegra.3/CAC /dev/block/mmcblk0p5 /cache ext4 recovery logs
/dev/block/platform/sdhci-tegra.3/CRA /dev/block/mmcblk0p11 ?
/dev/block/platform/sdhci-tegra.3/DTB /dev/block/mmcblk0p2 ?
/dev/block/platform/sdhci-tegra.3/EKS /dev/block/mmcblk0p13 NVEKSP
/dev/block/platform/sdhci-tegra.3/LNX /dev/block/mmcblk0p3 Linux kernel (8388608 b)
/dev/block/platform/sdhci-tegra.3/MDA /dev/block/mmcblk0p12 ?
/dev/block/platform/sdhci-tegra.3/MSC /dev/block/mmcblk0p8 empty (misc, bootloader etc.)
/dev/block/platform/sdhci-tegra.3/PER /dev/block/mmcblk0p10 /persist ext4 config/calibration data
/dev/block/platform/sdhci-tegra.3/SOS /dev/block/mmcblk0p1 Recovery kernel (8388608 b)
/dev/block/platform/sdhci-tegra.3/UDA /dev/block/mmcblk0p14 /data ext4 Android user data
/dev/block/platform/sdhci-tegra.3/USP /dev/block/mmcblk0p9 Staging (blob)
recovery.fstab
Code:
/dev/block/platform/sdhci-tegra.3/by-name/APP /system ext4 ro wait
/dev/block/platform/sdhci-tegra.3/by-name/CAC /cache ext4 noatime,nosuid,nodev,nomblk_io_submit,errors=panic wait
/dev/block/platform/sdhci-tegra.3/by-name/UDA /data ext4 noatime,nosuid,nodev,nomblk_io_submit,errors=panic wait,encryptable=/dev/block/platform/sdhci-tegra.3/by-name/MDA
/dev/block/platform/sdhci-tegra.3/by-name/MSC /misc emmc defaults defaults
/dev/block/platform/sdhci-tegra.3/by-name/LNX /boot emmc defaults defaults
/dev/block/platform/sdhci-tegra.3/by-name/SOS /recovery emmc defaults defaults
/dev/block/platform/sdhci-tegra.3/by-name/USP /staging emmc defaults defaults
/devices/platform/sdhci-tegra.2/mmc_host/mmc1 /storage/sdcard1 vfat default voldmanaged=sdcard:auto
/devices/platform/tegra-ehci.0 /mnt/usbdrive vfat default voldmanaged=usbdrive:auto
Blob
Code:
name size description status
[U]10.14.1.47:[/U] [ATTACH]2435244[/ATTACH]
blob.BCT 8,192 Bytes Boot Config Table (original) [ATTACH]2435246[/ATTACH]
blob.BC1 8,192 Bytes ? (original) [ATTACH]2435245[/ATTACH]
blob.EBT 1,396,736 Bytes Bootloader (original) [ATTACH]2435247[/ATTACH]
blob.PT 2,202 Bytes Partition Table (original) [ATTACH]2435248[/ATTACH]
[U]10.26.1.7:[/U] [ATTACH]2435238[/ATTACH]
blob.BCT 8,192 Bytes Boot Config Table (unchanged) [ATTACH]2435241[/ATTACH]
blob.BC1 8,192 Bytes ? (changed) [ATTACH]2435240[/ATTACH]
blob.EBT 1,421,312 Bytes Bootloader (changed) [ATTACH]2435242[/ATTACH]
Unbrick
How to unbrick a TF701 that still has fastboot running (possibly partially redundant):
WARNING: Any damage caused by following these instructions...
Yeah, right... Nevermind that... If your fastboot works, this will save your tablet
Required tools: I assume you have them already
Required files:
UL-K00C-xx-10.14.1.47-user.zip (on micro SD card in TF701)
10.14.1.47 blob and boot.img (unpacked from UL-K00C-xx-10.14.1.47-user.zip)
drgravy's recovery.img
Code:
fastboot erase boot
fastboot erase staging
fastboot format system
fastboot flash staging blob
fastboot flash boot boot.img
fastboot flash recovery.img
fastboot reboot-bootloader
check the version displayed. Is it 10.14.1.47? if not, hard reset to bootloader ([vol-] + [power])
boot recovery kernel (RCK)
install zip
choose zip from sdcard
UL-K00C-xx-10.14.1.47-user.zip
Yes
wait and pray to odin
+++ go back +++
reboot system now
Yes - Disable recovery flash (doesn't actually matter)
Yes - Root device (/system/xbin/su) (just kidding, this doesn't work)
Please consider clicking thanks
Sources:
Lots of own work
http://forum.xda-developers.com/showpost.php?p=47767352&postcount=71
https://github.com/AndroidRoot/BlobTools
Click to expand...
Click to collapse
Sorry, how should I extract the recovery.img from the OTA zip file?
I can only find several files: install-recovery.sh recovery-from-boot.p recovery-resource. dat
Or if I can extract it anywhere else?
lpdunwell said:
Code:
[U]10.26.1.7:[/U] [ATTACH]2435238[/ATTACH]
blob.BCT 8,192 Bytes Boot Config Table (unchanged) [ATTACH]2435241[/ATTACH]
blob.BC1 8,192 Bytes ? (changed) [ATTACH]2435240[/ATTACH]
blob.EBT 1,421,312 Bytes Bootloader (changed) [ATTACH]2435242[/ATTACH]
Click to expand...
Click to collapse
@lpdunwell
Any ideas what BC1 is for? Also there is no SOS file inside the BLOB. I have repacked the BLOB as I wanted to make a bootloader and recovery flash package but not sure how to flash a recovery.
On the TF700 you could just pack it back into the BLOB using the below and it would flash to staging fine. Any ideas?
Code:
blobpack -s blob EBT blob.EBT SOS blob.SOS
I wonder if the same can be done like this?
Code:
blobpack -s blob BCT blob.BCT BC1 blob.BC1 EBT blob.EBT SOS blob.SOS
sbdags said:
@lpdunwell
Any ideas what BC1 is for? Also there is no SOS file inside the BLOB. I have repacked the BLOB as I wanted to make a bootloader and recovery flash package but not sure how to flash a recovery.
On the TF700 you could just pack it back into the BLOB using the below and it would flash to staging fine. Any ideas?
Code:
blobpack -s blob EBT blob.EBT SOS blob.SOS
I wonder if the same can be done like this?
Code:
blobpack -s blob BCT blob.BCT BC1 blob.BC1 EBT blob.EBT SOS blob.SOS
Click to expand...
Click to collapse
TBCH, I'm not sure about the BC1.
The recovery is not part of the blob (anymore?). And the exact way an official update flashes it is probably not the best way to go when flashing manually. My advice for the moment probably is: Keep flashing the bootloader to a minimum, and flash recoveries via fastboot.
lpdunwell said:
TBCH, I'm not sure about the BC1.
The recovery is not part of the blob (anymore?). And the exact way an official update flashes it is probably not the best way to go when flashing manually. My advice for the moment probably is: Keep flashing the bootloader to a minimum, and flash recoveries via fastboot.
Click to expand...
Click to collapse
Yeah I tried a number of ways to get it to flash but it looks like the nvcopy tool that Asus use doesn't work outside the stock recovery.
Search the UL-K00C-WW-10.14.1.47-user.zip file
Hi,
And thank you. But Do you know where I can download the UL-K00C-WW-10.14.1.47-user.zip ?
On ASUS and can find only WW_epaduser_10_14_1_47_UpdateLauncher.zip.
Oups UL-K00C-WW-10.14.1.47-user.zip is in WW_epaduser_10_14_1_47_UpdateLauncher.zip.
Question
Hi
A question : Is it possible to use the same procedure with UL-K00C-WW-10.26.1.7-user.zip or UL-K00C-WW-10.26.1.18-user.zip ?
Best regards
Bumping this as it should be stickied
Xstof said:
Hi,
And thank you. But Do you know where I can download the UL-K00C-WW-10.14.1.47-user.zip ?
On ASUS and can find only WW_epaduser_10_14_1_47_UpdateLauncher.zip.
Oups UL-K00C-WW-10.14.1.47-user.zip is in WW_epaduser_10_14_1_47_UpdateLauncher.zip.
Click to expand...
Click to collapse
Did you ever find out where to get this file? I've been looking everywhere and I fear my device is hosed without it. HELP!
SgtMac02 said:
Did you ever find out where to get this file? I've been looking everywhere and I fear my device is hosed without it. HELP!
Click to expand...
Click to collapse
Google "Asus support downloads", click on the first link....
lpdunwell said:
Code:
fastboot erase boot
fastboot erase staging
fastboot format system
fastboot flash staging blob
fastboot flash boot boot.img
fastboot flash recovery.img
fastboot reboot-bootloader
Click to expand...
Click to collapse
Ok, so I'm trying to get through this and having some trouble...
I've been having to go back and forth on a few things and I fear I've managed to hose thing up pretty good. But at this point, I have the files you state, and in following these instructions, was able to successfully erase the partitions mentioned, then when I tried to flash the first time, I actually screwed up and didn't have the blob file I needed, so now I go back, and obviously I can't re-erase the other files, but formatting system still works, so I know I'm getting good communication with the device. Then trying to flash the blob to staging, I get:
sending 'staging' (1379 KB)...
FAILED (command write failed (No such device or address))
Any thoughts or suggestions would be greatly appreciated.
Am I completely bricked?
I'm stuck in a boot loop with Asus / Unlocked appearing and unable to get to recovery. I've tried connecting with win 8.1 via usb but adb does not see devices. i assume running fastboot is the same situation. I can see the device listed APX and understand that Nvflash can help with that but there is no nvflash for Tegra 4.
I'm not sure how it got to this state - could be me or device. it is new and i considered returning save for the Device is Unlocked message
Ironically, this is my second Tf701t as the first cracked the screen. Considering taking motherboard out of old and putting in new (or visa vera) but I'm really bad with hardware.
Do I really have 2 broken devices I'll try anything.
Thanks for any (emotional) support ...
sonicthoughts said:
I'm stuck in a boot loop with Asus / Unlocked appearing and unable to get to recovery. I've tried connecting with win 8.1 via usb but adb does not see devices. i assume running fastboot is the same situation. I can see the device listed APX and understand that Nvflash can help with that but there is no nvflash for Tegra 4.
I'm not sure how it got to this state - could be me or device. it is new and i considered returning save for the Device is Unlocked message
Ironically, this is my second Tf701t as the first cracked the screen. Considering taking motherboard out of old and putting in new (or visa vera) but I'm really bad with hardware.
Do I really have 2 broken devices I'll try anything.
Thanks for any (emotional) support ...
Click to expand...
Click to collapse
This happened in my TF300T, yes is a hard brick.
Nvflash only works if you did work before.
Here is a guide to ifixit a TF700 perhaps help you. :good:
Would it not make more sense to swap the screens over?
Sent from my HTC Desire 610 using XDA Free mobile app
lpdunwell said:
This is the place for various bits and pieces of information/facts/wtf collected whilst digging around in our TF701.
Use at your own peril.
UPDATE: I know the staging partition is where to blob (bootloader) goes, but as I found out, that's only half of the story.
It seems like the bootloader takes the contents of staging at boot time and puts them where they belong.
Now if anybody has more details about this, that would be great.
Sources:
Lots of own work
http://forum.xda-developers.com/showpost.php?p=47767352&postcount=71
https://github.com/AndroidRoot/BlobTools
Click to expand...
Click to collapse
Thank you for your analysis! I wonder does the "staging" partition contain temporary updates, and the blob flashed to it will automatically decompress to the correct partitions in the next boot?
In other words, in order to update the bootloader and the recovery system, I could do either:
1.
Code:
fastboot flash staging bootloader
fastboot flash recovery TWRP.img
Or:
Code:
blobpack -s bootloader-TWRP.blob EBT bootloader.EBT SOS TWRP.img
fastboot flash staging bootloader-TWRP.blob
Are they equivalent?
Stuck with the old bootloader
[CODE said:
fastboot erase boot
fastboot erase staging
fastboot format system
fastboot flash staging blob
fastboot flash boot boot.img
fastboot flash recovery.img
fastboot reboot-bootloader[/CODE]
check the version displayed. Is it 10.14.1.47? if not, hard reset to bootloader ([vol-] + [power])
boot recovery kernel (RCK)
install zip
choose zip from sdcard
UL-K00C-xx-10.14.1.47-user.zip
Yes
wait and pray to odin
+++ go back +++
reboot system now
Yes - Disable recovery flash (doesn't actually matter)
Yes - Root device (/system/xbin/su) (just kidding, this doesn't work)
Please consider clicking thanks
Sources:
Lots of own work
http://forum.xda-developers.com/showpost.php?p=47767352&postcount=71
https://github.com/AndroidRoot/BlobTools
Click to expand...
Click to collapse
I am stuck, for some reason after following these steps when the device reboots it is still with the old recovery and bootloader. Can anybody help please?
xabier87 said:
I am stuck, for some reason after following these steps when the device reboots it is still with the old recovery and bootloader. Can anybody help please?
Click to expand...
Click to collapse
What are you trying to do? Which BL and recovery do you currently have?
Flashable zips for the last bootloaders are here: http://forum.xda-developers.com/showpost.php?p=61045480&postcount=2
berndblb said:
What are you trying to do? Which BL and recovery do you currently have?
Flashable zips for the last bootloaders are here: http://forum.xda-developers.com/showpost.php?p=61045480&postcount=2
Click to expand...
Click to collapse
Thanks for the info! I might try with these zips and bootloaders. I am trying to reset my tablet or make it work. Had cm-12.1-20160711-NIGHTLY-tf701t.zip on it with TWRP recovery and US_epad-10.26.1.18-20131217 bootloader but it recently stoppped working. I do have access to the bootloader and recovery but after following the fastboot instructions and rebooting nothing is changed on the tablet.

Odin: FAIL! LZ4 is invalid

I have a ROM that I can flash on Samsung S10 5G(Qualcomm) successfully. My goal is to check whether I can modify `system.img` file of the ROM or not but before modification, I just want to verify that the AP file can be flashed after unpacking and packing of the `system.img`. To check this I have tried following:
Unpack-Pack AP file:
A) `tar` flashing:
1. Extracted AP file using `tar -xf AP...tar.md5` command.
2. Compress the extracted files using `tar -cvf AP...tar *`
3. Flash it with Odin3 v3.13.
B) `tar.md5` flashing:
- Get tar by following steps in A) and then run `md5sum -t AP...tar >> AP...tar` and `mv AP...tar AP...tar.md5`
Both `Ap...tar` and `AP...tar.md5` flashed successfully.
Unpack-Pack `system.img.ext4.lz4`
1. Extracted AP file using `tar -xf AP...tar.md5` command. Extracted files are "*boot.img.lz4*, *meta-data*, *userdata.img.ext4.lz4*, *carrier.img.ext4.lz4*, *persist.img.ext4.lz4*, *vbmeta.img.lz4*, *dqmdbg.img.ext4.lz4*, *recovery.img.lz4*, *vendor.img.ext4.lz4*, *dtbo.img.lz4*, *system.img.ext4.lz4*".
2. Extract system file using `unlz4 system.img.ext4.lz4` command. This is giving me a `system.img.ext4` Android sparse image.
3. Tried following commands to compress `system.img.ext4` without doing any modification:
lz4 system.img.ext4 system.img.ext4.lz4 - Default Compression
lz4 -9 system.img.ext4 system.img.ext4.lz4 - High Compression
lz4 -l system.img.ext4 system.img.ext4.lz4 - Default Compression in Legacy format
lz4 -l -9 system.img.ext4 system.img.ext4.lz4 - High Compression in Legacy format
lz4 -0 -l system.img.ext4 system.img.ext4.lz4 - No Compression in Legacy format
lz4 -B4 system.img.ext4 system.img.ext4.lz4 - Default Compression with Block size 4
lz4 -B5 system.img.ext4 system.img.ext4.lz4 - Default Compression with Block size 5
lz4 -B6 system.img.ext4 system.img.ext4.lz4 - Default Compression with Block size 6
lz4 --no-frame-crc system.img.ext4 system.img.ext4.lz4 - Default Compression with no crc frame
Click to expand...
Click to collapse
and make an AP file by replacing the original `system.img.ext4.lz4` file with the compressed file from above command(one at one time) and tried to flash it but every time it fails with **"Odin FAIL! LZ4 is invalid"**
LZ4 command detail:
1. Working on Ubuntu 18
2. Using "LZ4 command line interface 64-bits r128, by Yann Collet (Apr 3 2018)"
Tried with "LZ4 command line interface 64-bits v1.9.2, by Yann Collet" but get the same result.
`file system.img.ext4.lz4` output:
- Original file: `system.img.ext4.lz4: LZ4 compressed data (v1.4+)`.
- My version with both LZ4 (r128 and v1.9.2):
1. For file compressed with legacy flag(-l): `system.img.ext4.lz4: LZ4 compressed data (v0.1-v0.9)`
2. For file compressed without legacy flag(-l): `system.img.ext4.lz4: LZ4 compressed data (v1.4+)`
So, I think it means the file should be compressed without legacy flag.
Size
1. With `-9` flag i.e. High Compression the output file is of 3.3 GB.
2. Without `-9` flag i.e. Default Compression the output file is of 3.6 GB.
The Original file is of size 3.6 GB so, I think high compression should not be used.
But still the same error throws by Odin.
Any suggestion why it is happening?
having the same problem here.anyone have a solution?
Why Ya dont use "lz4 -m *.lz4" command after Extract with tar, its Decompress all Files in one Process!!
But iam have the same Problem i would a Existing Package tar.md5 Extract and Replace the system.img.lz4 with a newer Version, so i have Compress the IMG to LZ4 with these Command
"lz4 -B6 --content-size system.img system.img.lz4" and then Pack all to tar and add md5sum!! and Flash the Package it would like ya Failed at System Flash Process!!!

Odin: FAIL! (Auth)

I have a `system.img.ext4.lz4` file that is compatible with my Samsung S10 5G(Qualcomm) device. I have extracted `system.img.ext4` file from the `system.img.ext4.lz4` using `unlz4 system.img.ext4.lz4` command.
I want to play with its content. So I have decided it in two steps:
1. Flash `system.img.ext4` without modification:
- Using `tar -cvf AP.tar system.img.ext4` command, I have created a AP.tar file.
- Flashed `AP.tar` file using Odin3 v3.13.
- It flashed successfully.
2. Flash `system.img.ext4` with modification:
a) Modifying
- With `simg2img system.img.ext4 system.img`, you will get a raw image file named `system.img`
- With `mkdir system`, create directory to mount system.img
- With `sudo mount -t ext4 -o loop system.img system/` you will get all files of `system.img` in `system` folder
- With `ls -l system/init.rc` note permissions: 750
- With `sudo chmod 777 system/init.rc` give write permissions
- With `sudo echo "#MODIFICATION " >> system/init.rc` done some modification in `init.rc`
- With `sudo chmod 750 init.rc` reset `init.rc` to the noted permissions
b) Calculate system sector size
- With `tune2fs -l system.img | grep "Block size\|Block count"` you will get block size and count
- With `echo $((1553064 * 4096))` multiply both results. I got 6361350144
c) Packing
- With `sudo make_ext4fs -s -l 6361350144 -a system system_new.img sys/` you will get `system_new.img` “Android Sparse Image” that has all changes
- With `sudo umount system` unmount the system directory
- With `rm -fr system` delete the system directory
d) Tar Compression
- With `rm system.img.ext4` remove original system.img.ext4, Don’t worry you should have a backup of it in lz4 file
- With `mv system_new.img system.img.ext4` rename system_new.img to system.img.ext4 for flashing with Odin3 v3.13
- With `tar -cvf AP.tar system.img.ext4` you will get AP.tar that you can flash with Odin3 v3.13.
- It failed to flash with FAIL! (Auth) error.
Please suggest how can I resolve this issue?
I will be very thankful to you for any little to big suggestion.:angel:
Vats12 said:
I have a `system.img.ext4.lz4` file that is compatible with my Samsung S10 5G(Qualcomm) device. I have extracted `system.img.ext4` file from the `system.img.ext4.lz4` using `unlz4 system.img.ext4.lz4` command.
I want to play with its content. So I have decided it in two steps:
1. Flash `system.img.ext4` without modification:
- Using `tar -cvf AP.tar system.img.ext4` command, I have created a AP.tar file.
- Flashed `AP.tar` file using Odin3 v3.13.
- It flashed successfully.
2. Flash `system.img.ext4` with modification:
a) Modifying
- With `simg2img system.img.ext4 system.img`, you will get a raw image file named `system.img`
- With `mkdir system`, create directory to mount system.img
- With `sudo mount -t ext4 -o loop system.img system/` you will get all files of `system.img` in `system` folder
- With `ls -l system/init.rc` note permissions: 750
- With `sudo chmod 777 system/init.rc` give write permissions
- With `sudo echo "#MODIFICATION " >> system/init.rc` done some modification in `init.rc`
- With `sudo chmod 750 init.rc` reset `init.rc` to the noted permissions
b) Calculate system sector size
- With `tune2fs -l system.img | grep "Block size\|Block count"` you will get block size and count
- With `echo $((1553064 * 4096))` multiply both results. I got 6361350144
c) Packing
- With `sudo make_ext4fs -s -l 6361350144 -a system system_new.img sys/` you will get `system_new.img` “Android Sparse Image” that has all changes
- With `sudo umount system` unmount the system directory
- With `rm -fr system` delete the system directory
d) Tar Compression
- With `rm system.img.ext4` remove original system.img.ext4, Don’t worry you should have a backup of it in lz4 file
- With `mv system_new.img system.img.ext4` rename system_new.img to system.img.ext4 for flashing with Odin3 v3.13
- With `tar -cvf AP.tar system.img.ext4` you will get AP.tar that you can flash with Odin3 v3.13.
- It failed to flash with FAIL! (Auth) error.
Please suggest how can I resolve this issue?
I will be very thankful to you for any little to big suggestion.:angel:
Click to expand...
Click to collapse
you need to unlock your bl and/or flash in twrp.
if you are trying this on a locked bl it will not work since when u modify the system partition you break the sig and hashes etc etc
elliwigy said:
you need to unlock your bl and/or flash in twrp.
if you are trying this on a locked bl it will not work since when u modify the system partition you break the sig and hashes etc etc
Click to expand...
Click to collapse
The bootloader is already unlocked and after that I am getting this issue. Twrp is not available for this model of Samsung S10.
hi, what next about this problem?
i have same issue
Vats12 said:
The bootloader is already unlocked and after that I am getting this issue. Twrp is not available for this model of Samsung S10.
Click to expand...
Click to collapse

Categories

Resources