[TUTORIAL] Unpack and repack boot.img + a2sd support for XXKPH - Galaxy Ace S5830 Android Development

Hi ppl,
Today I will tell you howto unpack and repack your Galaxy Ace boot.img files. First the base and page size:
Code:
The base parameter is 0x13600000 and pagesize is 4096
- First get your boot.img from CWM backup / odin package / dump etc.
- In linux make a folder on your desktop called something like bootrepack
- Place your original boot.img there along with the extracted files from the attached zip.
- Run this command to split your boot.img
Code:
./split_bootimg.pl boot.img
This will split your boot.img in kernel and ramdisk.
If you get permission error try to chmod the file to 755
- Now extract your ramdisk to make modifications to init.rc for example.
Code:
mkdir ramdisk
cd ramdisk
gzip -dc ../boot.img-ramdisk.gz | cpio -i
cd ..
- Make the required modifications.
- You can also replace kernel by deleting boot.img-kernel, and replace it by zImage.
- After all the necessary modifications are done you can make a new boot.img using this:
Code:
./repack_bootimg.pl boot.img-kernel ramdisk bootnew.img
- Finally move your bootnew.img to a new location and rename it to boot.img. From there you can create update.zip to flash it using CWM
Always make sure you have a proper nandroid backup before you flash a new boot.img
If your repack fails you can always restore using CWM - > Backup and Restore - > Advanced Restore - > Date/time bla bla -> Restore boot
--------
Added bonus: I've edited coolya's ext4 kernel for XXKPH to also run install_recovery.sh for a2sd support. Flash using CWM -> Install zip -> ext4-a2sd-update.zip
--------
Sources:
- Android-dls on Unpacking and editing boot images
- Ysgace for base and pagesize
- k0mpresd/original author for repack script

nice job!!...will help people immensely to build their own ROMs!!...

Can you make a noob tutorial for enabling a2sd?
Sent from my Galaxy ace using Tapatalk

There already is one: Enabling Darktremor a2sd on Samsung s5830 Galaxy ACE

After apply this update ext4-a2sd-update.zip link2sd will be working on S5830XXKPH Rom and mount SD ext2 partition?

bizon69 said:
After apply this update ext4-a2sd-update.zip link2sd will be working on S5830XXKPH Rom and mount SD ext2 partition?
Click to expand...
Click to collapse
The kernel will run install-recovery.sh on boot

peeter123 said:
There already is one: Enabling Darktremor a2sd on Samsung s5830 Galaxy ACE
Click to expand...
Click to collapse
"This method has been tested on a rooted Galaxy ACE running Android 2.2.1. It might work on other devices, but I don't guarantee."
is this work on KPH ?

install_recovery.sh didnt work for me. i Flashed using CWM -> Install zip -> ext4-a2sd-update.zip.
Here's what "cat /system/etc/install-recovery.sh" shows:
#!/system/bin/sh
/system/bin/mount -t ext2 /dev/block/mmcblk0p2 /system/sd
/system/bin/sh /system/etc/init.d/dtapp
/system/bin/sh /system/etc/init.d/99complete
but didnt work a2sdgui

sametpoyraz said:
install_recovery.sh didnt work for me. i Flashed using CWM -> Install zip -> ext4-a2sd-update.zip.
Here's what "cat /system/etc/install-recovery.sh" shows:
#!/system/bin/sh
/system/bin/mount -t ext2 /dev/block/mmcblk0p2 /system/sd
/system/bin/sh /system/etc/init.d/dtapp
/system/bin/sh /system/etc/init.d/99complete
but didnt work a2sdgui
Click to expand...
Click to collapse
Did you chmod 755 install-recovery.sh?

yeah i did

i have S5830XXKPH rom. and kernel 2.6.35.7-perf-CL260130. what is the problem ?

can it work on jellybean?

peeter123 said:
- Now extract your ramdisk to make modifications to init.rc for example.
Code:
mkdir ramdisk
cd ramdisk
gzip -dc ../boot.img-ramdisk.gz | cpio -i
cd ..
- Make the required modifications.
Click to expand...
Click to collapse
Hi,
I have problem while extracting "boot.img-ramdisk.gz" file. I hope this is not getting created as zip file during the extracting process.
[email protected]:~/VIJAY/andriod/work2$ ./split_bootimg.pl boot.img
Page size: 2048 (0x00000800)
Kernel size: 3477896 (0x00351188)
Ramdisk size: 596322 (0x00091962)
Second size: 0 (0x00000000)
Board name:
Command line:
Writing boot.img-kernel ... complete.
Writing boot.img-ramdisk.gz ... complete.
[email protected]:~/VIJAY/andriod/work2$
[email protected]:~/VIJAY/andriod/work2$ ls
boot.img data/ LeWa_A919build.1.09.zip META-INF/ repack_bootimg.pl* split_bootimg.pl*
Bootimgutils.zip installbusybox logo.bin mkbootimg* sdcard/ system/
[email protected]:~/VIJAY/andriod/work2$ mkdir ramdisk
[email protected]:~/VIJAY/andriod/work2$
[email protected]:~/VIJAY/andriod/work2$
[email protected]:~/VIJAY/andriod/work2$ ls -lrt
total 336788
-rwxrwxrwx 1 vramaraj sw-team 28614 Dec 24 2010 mkbootimg*
-rwxrwxrwx 1 vramaraj sw-team 6773 Jul 17 2011 split_bootimg.pl*
-rwxrwxrwx 1 vramaraj sw-team 569 Jul 17 2011 repack_bootimg.pl*
drwxr-xr-x 3 vramaraj sw-team 4096 Oct 9 2011 data/
-rw-r--r-- 1 vramaraj sw-team 70 May 16 2012 installbusybox
drwxr-xr-x 4 vramaraj sw-team 4096 Oct 6 19:03 sdcard/
-rw-r--r-- 1 vramaraj sw-team 333103 Jan 10 16:02 logo.bin
drwxr-xr-x 16 vramaraj sw-team 4096 Jan 21 06:20 system/
-rw-r--r-- 1 vramaraj sw-team 4079616 Jan 21 21:07 boot.img
-rw-r--r-- 1 vramaraj sw-team 15413 Jan 31 21:58 Bootimgutils.zip
-rw-r--r-- 1 vramaraj sw-team 197379000 Jan 31 21:59 LeWa_A919build.1.09.zip
drwxr-xr-x 3 vramaraj sw-team 4096 Jan 31 21:59 META-INF/
-rw-r--r-- 1 vramaraj sw-team 3477896 Jan 31 22:00 boot.img-kernel
-rw-r--r-- 1 vramaraj sw-team 596322 Jan 31 22:00 boot.img-ramdisk.gz
drwxr-xr-x 2 vramaraj sw-team 4096 Jan 31 22:00 ramdisk/
-rw-r--r-- 1 vramaraj sw-team 138215424 Jan 31 22:14 YONIP_MP_A919_v1.zip
[email protected]:~/VIJAY/andriod/work2$
[email protected]:~/VIJAY/andriod/work2$ cd ramdisk
[email protected]:~/VIJAY/andriod/work2/ramdisk$ gunzip -c ../boot.img-ramdisk.gz | cpio -i
gunzip: ../boot.img-ramdisk.gz: not in gzip format
cpio: premature end of archive
[email protected]:~/VIJAY/andriod/work2/ramdisk$ unzip ../boot.img-ramdisk.gz
Archive: ../boot.img-ramdisk.gz
End-of-central-directory signature not found. Either this file is not
a zipfile, or it constitutes one disk of a multi-part archive. In the
latter case the central directory and zipfile comment will be found on
the last disk(s) of this archive.
unzip: cannot find zipfile directory in one of ../boot.img-ramdisk.gz or
../boot.img-ramdisk.gz.zip, and cannot find ../boot.img-ramdisk.gz.ZIP, period.
[email protected]:~/VIJAY/andriod/work2/ramdisk$ tar zvf ../boot.img-ramdisk.gz
tar: You must specify one of the `-Acdtrux' options
Try `tar --help' or `tar --usage' for more information.
[email protected]:~/VIJAY/andriod/work2/ramdisk$ tar xvf ../boot.img-ramdisk.gz
tar: This does not look like a tar archive
tar: Skipping to next header
tar: Archive contains obsolescent base-64 headers
tar: Read 2402 bytes from ../boot.img-ramdisk.gz
tar: Error exit delayed from previous errors
[email protected]-swe-09:~/VIJAY/andriod/work2/ramdisk$
[email protected]:~/VIJAY/andriod/work2/ramdisk$
Click to expand...
Click to collapse
I tried to read the contents in the file. But it has having binary code. Which confirms it is not a zip file. Any clues..?
---------- Post added at 11:53 AM ---------- Previous post was at 11:41 AM ----------
Update:
Is this the process it will do?
gzip decompresses the ramdisk archive to stdout, pipe it into cpio with the -i switch to read from stdin and it will correctly extract the data
Click to expand...
Click to collapse
.
But I am getting this..
Code:
[email protected]:~/VIJAY/andriod/work3/ramdisk$ gzip -dc ../boot.img-ramdisk.gz | cpio -i
[COLOR="Red"][B]gzip: ../boot.img-ramdisk.gz: not in gzip format
cpio: premature end of archive[/B][/COLOR]
[email protected]:~/VIJAY/andriod/work3/ramdisk$

Isn't this just copy + pasted from anonymous's kernel guide?:sly:
Sent from my GT-I9070 using xda premium

hello, please, its wat to decompile file "recovery" in "sbin" folder and translate it? I would like to translate recovery into my language.
Thanks....

hello mi have a problem with my scroll basic plus 54860 boot not starting do you have root to this tablet?? b1 and b

Related

invalid rsync error - rsync not found in path

[Thread edited and changed, because partially solved]
Device: asus Nexus 7
Android Version: 4.2.2
Build: JDQ39
rooted
I have installed SSHDroidPro (v1.9.6) - https://play.google.com/store/apps/details?id=berserker.android.apps.sshdroidpro and Terminal IDE (v2.02) - https://play.google.com/store/apps/details?id=com.spartacusrex.spartacuside
Code:
/storage/emulated/legacy # which rsync
/storage/emulated/legacy # which mkdir
/data/data/berserker.android.apps.sshdroidpro/home/bin/mkdir
Code:
-rwx------ 1 u0_a86 u0_a86 1012309 Dec 5 2011 /data/data/com.spartacusrex.spartacuside/files/system/bin/rsync
What do I have to do, that _this_ rsync is used by SSHDroidPro? I would like to use all shell.commands from Terminal IDE with SSHDroidPro.
It helped to copy rsync set the permissions to 755 and link it:
Code:
cp /data/data/com.spartacusrex.spartacuside/files/system/bin/rsync /data/data/berserker.android.apps.sshdroidpro/dropbear
ls -l /data/data/berserker.android.apps.sshdroidpro/dropbear/rsync
-rwxr-xr-x 1 root root 1012309 Mar 10 01:37 /data/data/berserker.android.apps.sshdroidpro/dropbear/rsync
ls -l /data/data/berserker.android.apps.sshdroidpro/home/bin/rsync
lrwxrwxrwx 1 root root 60 Mar 10 01:38 /data/data/berserker.android.apps.sshdroidpro/home/bin/rsync -> /data/data/berserker.android.apps.sshdroidpro/dropbear/rsync
And then:
Code:
/storage/emulated/legacy # which rsync
/data/data/berserker.android.apps.sshdroidpro/home/bin/rsync
The rest of the posting was deleted, because it was a bug in my script. But what can I do, so the ssh-server can use the commands ot the IDE-Terminal?

First things I did before and just after rooting

Hey all.
Tools I used for flashing and backup:
on PC linux box:
- heimdall - which does the flashing
- netcat - (nc, ncat or netcat) tool for writing to or reading from network.
- partx - assigns partitioned disk images as kernel's loop devices like: loop0p2...loop0p25
on s3 mini:
- busybox
- "Rooted SSH/SFTP Daemon"
Before rooting reboot the phone to the download mode and download
the pit file with:
Code:
heimdall download-pit --output goldenxx.pit --no--reboot
Root your phone and install busybox and ssh daemon on it.
Start sshd but close all other apps to keep filesystem activity so low as possible.
start netcat on your PC:
Code:
netcat -l 192.168.0.11 5050 > mmcblk0.gz
Now netcat is listening for input from your lan (Replace address to corresponding your PC's IP address)
Now try to connect to your phone with ssh. When you got an # prompt then:
Code:
sync
and send your whole internal storage from phone to your PC:
Code:
cat /dev/block/mmcblk0 | gzip | nc 192.168.0.11 5050
Do not start any apps on your phone before you got back the command prompts both on phone and PC.
when you got a command prompt again and no error messages was printed. you should have an
gzip compressed disk image of you phones mmc on your PC.
Check its integrity running
Code:
gzip -t mmcblk0.gz
If the package is ok, copy the goldenxx.pit and mmcblk0.gz to the sure location.
Now you can make an uncompressed copy of mmcblk0.gz for example:
Code:
zcat Backup/mmcblk0.gz > ~/mmcblk0
With partx you can use the image like any other partitioned disks running as root:
Code:
partx -v -a ~/mmcblk0
it should print something like this:
Code:
partition: none, disk: mmcblk0, lower: 0, upper: 0
Trying to use '/dev/loop0' for the loop device
/dev/loop0: partition table type 'gpt' detected
/dev/loop0: partition #2 added
/dev/loop0: partition #3 added
/dev/loop0: partition #4 added
...
/dev/loop0: partition #25 added
and print out the data of partitions associated within kernel:
Code:
partx -s ~/mmcblk0
Code:
3 1024 3071 2048 1M PIT 52444e41-494f-2044-5049-540000000000
4 6144 8191 2048 1M MD5HDR 52444e41-494f-2044-4d44-354844520000
5 8192 9215 1024 512K STEboot1 52444e41-494f-2044-5354-45626f6f7431
6 9216 10239 1024 512K STEboot2 52444e41-494f-2044-5354-45626f6f7432
7 10240 11263 1024 512K Dnt 52444e41-494f-2044-446e-740000000000
8 11264 12287 1024 512K reserved 52444e41-494f-2044-7265-736572766564
9 16384 18431 2048 1M CSPSAFS 52444e41-494f-2044-4353-505341465300
10 18432 20479 2048 1M CSPSAFS2 52444e41-494f-2044-4353-505341465332
11 20480 53247 32768 16M EFS 52444e41-494f-2044-4546-530000000000
12 53248 86015 32768 16M ModemFS 52444e41-494f-2044-4d6f-64656d465300
13 86016 118783 32768 16M ModemFS2 52444e41-494f-2044-4d6f-64656d465332
14 118784 221183 102400 50M Fota 52444e41-494f-2044-466f-746100000000
15 380928 381055 128 64K IPL Modem 52444e41-494f-2044-4950-4c204d6f6465
16 385024 413695 28672 14M Modem 52444e41-494f-2044-4d6f-64656d000000
17 417792 421887 4096 2M Loke4 52444e41-494f-2044-4c6f-6b6534000000
18 421888 425983 4096 2M 2ndLoke4 52444e41-494f-2044-326e-644c6f6b6534
19 425984 458751 32768 16M PARAM 52444e41-494f-2044-5041-52414d000000
20 458752 491519 32768 16M Kernel 52444e41-494f-2044-4b65-726e656c0000
21 491520 524287 32768 16M Kernel2 52444e41-494f-2044-4b65-726e656c3200
22 524288 2981887 2457600 1.2G SYSTEM 52444e41-494f-2044-5359-5354454d0000
23 2981888 4702207 1720320 840M CACHEFS 52444e41-494f-2044-4341-434845465300
24 4702208 5357567 655360 320M HIDDEN 52444e41-494f-2044-4849-4444454e0000
25 5357568 15249407 9891840 4.7G DATAFS 52444e41-494f-2044-4441-544146530000
now you can explore the partitions and make images of it. For example:
Code:
file -s /dev/loop0p11
/dev/loop0p11: Linux rev 1.0 ext4 filesystem data, UUID=1b70457a-e011-c65a-87c6-f346bd874821, volume name "efs" (extents) (large files)
Code:
cat /dev/loop0p11 > ~/efs.ext4
and...
Code:
file -s /dev/loop0p16
Code:
/dev/loop0p16: data
It is modem.bin so:
Code:
cat /dev/loop0p16 > ~/modem.bin
Note that ext4 images must be transformed to the right .img-file form with ext2simg tool before flashing.
Be careful before flash your phone with these files.
remember to unmount all /dev/loop0 -partitions and finally
Code:
partx -d /dev/loop0
losetup -d /dev/loop0
because the images was copied from running system,
all writeable filesystems are not clean. So you might want to e2fsck these partitions.
KrRain said:
Hey all.
Tools I used for flashing and backup:
on PC linux box:
- heimdall - which does the flashing
- netcat - (nc, ncat or netcat) tool for writing to or reading from network.
- partx - assigns partitioned disk images as kernel's loop devices like: loop0p2...loop0p25
on s3 mini:
- busybox
- "Rooted SSH/SFTP Daemon"
Before rooting reboot the phone to the download mode and download
the pit file with:
Code:
heimdall download-pit --output goldenxx.pit --no--reboot
Root your phone and install busybox and ssh daemon on it.
Start sshd but close all other apps to keep filesystem activity so low as possible.
start netcat on your PC:
Code:
netcat -l 192.168.0.11 5050 > mmcblk0.gz
Now netcat is listening for input from your lan (Replace address to corresponding your PC's IP address)
Now try to connect to your phone with ssh. When you got an # prompt then:
Code:
sync
and send your whole internal storage from phone to your PC:
Code:
cat /dev/block/mmcblk0 | gzip | nc 192.168.0.11 5050
Do not start any apps on your phone before you got back the command prompts both on phone and PC.
when you got a command prompt again and no error messages was printed. you should have an
gzip compressed disk image of you phones mmc on your PC.
Check its integrity running
Code:
gzip -t mmcblk0.gz
If the package is ok, copy the goldenxx.pit and mmcblk0.gz to the sure location.
Now you can make an uncompressed copy of mmcblk0.gz for example:
Code:
zcat Backup/mmcblk0.gz > ~/mmcblk0
With partx you can use the image like any other partitioned disks running as root:
Code:
partx -v -a ~/mmcblk0
it should print something like this:
Code:
partition: none, disk: mmcblk0, lower: 0, upper: 0
Trying to use '/dev/loop0' for the loop device
/dev/loop0: partition table type 'gpt' detected
/dev/loop0: partition #2 added
/dev/loop0: partition #3 added
/dev/loop0: partition #4 added
...
/dev/loop0: partition #25 added
and print out the data of partitions associated within kernel:
Code:
partx -s ~/mmcblk0
Code:
3 1024 3071 2048 1M PIT 52444e41-494f-2044-5049-540000000000
4 6144 8191 2048 1M MD5HDR 52444e41-494f-2044-4d44-354844520000
5 8192 9215 1024 512K STEboot1 52444e41-494f-2044-5354-45626f6f7431
6 9216 10239 1024 512K STEboot2 52444e41-494f-2044-5354-45626f6f7432
7 10240 11263 1024 512K Dnt 52444e41-494f-2044-446e-740000000000
8 11264 12287 1024 512K reserved 52444e41-494f-2044-7265-736572766564
9 16384 18431 2048 1M CSPSAFS 52444e41-494f-2044-4353-505341465300
10 18432 20479 2048 1M CSPSAFS2 52444e41-494f-2044-4353-505341465332
11 20480 53247 32768 16M EFS 52444e41-494f-2044-4546-530000000000
12 53248 86015 32768 16M ModemFS 52444e41-494f-2044-4d6f-64656d465300
13 86016 118783 32768 16M ModemFS2 52444e41-494f-2044-4d6f-64656d465332
14 118784 221183 102400 50M Fota 52444e41-494f-2044-466f-746100000000
15 380928 381055 128 64K IPL Modem 52444e41-494f-2044-4950-4c204d6f6465
16 385024 413695 28672 14M Modem 52444e41-494f-2044-4d6f-64656d000000
17 417792 421887 4096 2M Loke4 52444e41-494f-2044-4c6f-6b6534000000
18 421888 425983 4096 2M 2ndLoke4 52444e41-494f-2044-326e-644c6f6b6534
19 425984 458751 32768 16M PARAM 52444e41-494f-2044-5041-52414d000000
20 458752 491519 32768 16M Kernel 52444e41-494f-2044-4b65-726e656c0000
21 491520 524287 32768 16M Kernel2 52444e41-494f-2044-4b65-726e656c3200
22 524288 2981887 2457600 1.2G SYSTEM 52444e41-494f-2044-5359-5354454d0000
23 2981888 4702207 1720320 840M CACHEFS 52444e41-494f-2044-4341-434845465300
24 4702208 5357567 655360 320M HIDDEN 52444e41-494f-2044-4849-4444454e0000
25 5357568 15249407 9891840 4.7G DATAFS 52444e41-494f-2044-4441-544146530000
now you can explore the partitions and make images of it. For example:
Code:
file -s /dev/loop0p11
/dev/loop0p11: Linux rev 1.0 ext4 filesystem data, UUID=1b70457a-e011-c65a-87c6-f346bd874821, volume name "efs" (extents) (large files)
Code:
cat /dev/loop0p11 > ~/efs.ext4
and...
Code:
file -s /dev/loop0p16
Code:
/dev/loop0p16: data
It is modem.bin so:
Code:
cat /dev/loop0p16 > ~/modem.bin
Note that ext4 images must be transformed to the right .img-file form with ext2simg tool before flashing.
Be careful before flash your phone with these files.
remember to unmount all /dev/loop0 -partitions and finally
Code:
partx -d /dev/loop0
losetup -d /dev/loop0
because the images was copied from running system,
all writeable filesystems are not clean. So you might want to e2fsck these partitions.
Click to expand...
Click to collapse
Cool.... What for...?
S3miniFin said:
Cool.... What for...?
Click to expand...
Click to collapse
Because now I have a backup of all partitions of my S3 Mini.

Galaxy S5 Root (verizon) boot loader

I am trying to understand where the boot loader is exactly? Heres a 'ls' in the root directoy. Can anyone point me in the right direction here?
jasons-mbp-5latform-tools mmartinez$ ./adb shell
[email protected]:/ $ ls
acct
cache
config
d
data
default.prop
dev
efs
etc
file_contexts
firmware
firmware-modem
fstab.qcom
init
init.carrier.rc
init.container.rc
init.environ.rc
init.mdm.sh
init.qcom.class_core.sh
init.qcom.early_boot.sh
init.qcom.factory.sh
init.qcom.rc
init.qcom.ril.sh
init.qcom.sh
init.qcom.ssr.sh
init.qcom.syspart_fixup.sh
init.qcom.usb.rc
init.qcom.usb.sh
init.rc
init.ril.rc
init.ril.sh
init.target.rc
init.trace.rc
init.usb.rc
mnt
persdata
persist
proc
property_contexts
publiccert.pem
root
sbin
sdcard
seapp_contexts
sepolicy
sepolicy_version
storage
sys
system
tombstones
ueventd.qcom.rc
ueventd.rc
vendor
[email protected]:/ $
Here is the folder containing vendor binaries.
[email protected]:/vendor/lib $ ls
C16QL_libchromatix_s5k2p2xx_common.so
C16QL_libchromatix_s5k2p2xx_common_res0.so
C16QL_libchromatix_s5k2p2xx_common_res1.so
C16QL_libchromatix_s5k2p2xx_common_res2.so
C16QL_libchromatix_s5k2p2xx_common_res3.so
F16QL_libchromatix_s5k2p2xx_common.so
F16QL_libchromatix_s5k2p2xx_common_res0.so
F16QL_libchromatix_s5k2p2xx_common_res1.so
F16QL_libchromatix_s5k2p2xx_common_res2.so
F16QL_libchromatix_s5k2p2xx_common_res3.so
F16QS_libchromatix_imx240_common.so
F16QS_libchromatix_imx240_common_res0.so
F16QS_libchromatix_imx240_common_res1.so
F16QS_libchromatix_imx240_common_res2.so
F16QS_libchromatix_imx240_common_res3.so
egl
hw
lib-dplmedia.so
lib-imsSDP.so
lib-imscamera.so
lib-imsdpl.so
lib-imsqimf.so
lib-imsrcs.so
lib-imss.so
lib-imsvt.so
lib-imsxml.so
lib-rcsimssjni.so
lib-rcsjni.so
lib-rtpcommon.so
lib-rtpcore.so
lib-rtpdaemoninterface.so
lib-rtpsl.so
libC2D2.so
libCB.so
libCommandSvc.so
libDiagService.so
libDivxDrm.so
libExtendedExtractor.so
libFileMux.so
libHevcSwDecoder.so
libI420colorconvert.so
libNimsWrap.so
libOmxAacDec.so
libOmxAmrwbplusDec.so
libOmxEvrcDec.so
libOmxMux.so
libOmxQcelp13Dec.so
libOmxWmaDec.so
libOpenCL.so
libOpenVG.so
libP11Notify.so
libQSEEComAPI.so
libSHIMDivxDrm.so
libSSEPKCS11.so
libStDrvInt.so
libSubSystemShutdown.so
libTimeService.so
libWVStreamControlAPI_L1.so
libacdbloader.so
libacdbmapper.so
libacdbrtac.so
libactuator_ak7345_camcorder.so
libactuator_ak7345_camera.so
libactuator_dw9714_camcorder.so
libactuator_dw9714_camera.so
libactuator_dw9716_camcorder.so
libactuator_dw9716_camera.so
libactuator_wv560_camcorder.so
libactuator_wv560_camera.so
libadiertac.so
libadreno_utils.so
libadsprpc.so
libaudcal.so
libaudioalsa.so
libbt-vendor.so
libbtnv.so
libc2d2_z180.so
libc2d30-a3xx.so
libc2d30-a4xx.so
libc2d30.so
libchromatix_s5k8b1yx_common.so
libchromatix_s5k8b1yx_pip.so
libchromatix_s5k8b1yx_preview.so
libchromatix_s5k8b1yx_smart_stay.so
libchromatix_s5k8b1yx_snapshot.so
libchromatix_s5k8b1yx_video.so
libchromatix_s5k8b1yx_vt.so
libchromatix_s5k8b1yx_vt_beauty.so
libchromatix_s5k8b1yx_vt_hd.so
libchromatix_s5k8b1yx_zslshot.so
libcneapiclient.so
libcneconn.so
libcneqmiutils.so
libcneutils.so
libconfigdb.so
libcsd-client.so
libdiag.so
libdisp-aba.so
libdrmdiag.so
libdrmfs.so
libdrmtime.so
libdsnetutils.so
libdsucsd.so
libdsutils.so
libepdsp.so
libfastcvadsp_stub.so
libfastcvopt.so
libgeofence.so
libgsl.so
libidl.so
libizat_core.so
liblbs_core.so
liblistensoundmodel.so
libllvm-qcom.so
liblocationservice.so
libmm-abl-oem.so
libmm-abl.so
libmm-color-convertor.so
libmm-hdcpmgr.so
libmmQSM.so
libmmQTA.so
libmmcamera2_c2d_module.so
libmmcamera2_companion_imx240.so
libmmcamera2_companion_s5k2p2xx.so
libmmcamera2_cpp_module.so
libmmcamera2_iface_modules.so
libmmcamera2_imglib_modules.so
libmmcamera2_isp_modules.so
libmmcamera2_pproc_modules.so
libmmcamera2_sensor_modules.so
libmmcamera2_stats_modules.so
libmmcamera2_vpe_module.so
libmmcamera2_wnr_module.so
libmmcamera_faceproc.so
libmmcamera_image_stab.so
libmmcamera_imglib.so
libmmcamera_imglib_faceproc_adspstub.so
libmmcamera_imx240.so
libmmcamera_s5k2p2xx.so
libmmcamera_s5k8b1yx.so
libmmhttpstack.so
libmmiipstreammmihttp.so
libmmipstreamaal.so
libmmipstreamnetwork.so
libmmipstreamsourcehttp.so
libmmipstreamutils.so
libmmosal.so
libmmparser.so
libmmrtpdecoder.so
libmmrtpencoder.so
libmmwfdinterface.so
libmmwfdsinkinterface.so
libmmwfdsrcinterface.so
liboemcamera.so
liboemcrypto.so
liboi_sbc_decoder.so
libprdrmdecrypt.so
libprofiler_msmadc.so
libqc-opt.so
libqcci_legacy.so
libqcgesture.so
libqmi.so
libqmi_cci.so
libqmi_client_qmux.so
libqmi_common_so.so
libqmi_csi.so
libqmi_csvt_srvc.so
libqmi_encdec.so
libqmiservices.so
libril-qcril-hook-oem.so
librmp.so
librpmb.so
libsc-a2xx.so
libsc-a3xx.so
libscale.so
libscve.so
libscve_stub.so
libsensor1.so
libssd.so
libsubsystem_control.so
libthermalclient.so
libthermalioctl.so
libtime_genoff.so
libtzdrmgenprov.so
libtzplayready.so
libwfdcommonutils.so
libwfdhdcpcp.so
libwfdmmsink.so
libwfdmmsrc.so
libwfdmmutils.so
libwfdnative.so
libwfdrtsp.so
libwfdsm.so
libwfduibcinterface.so
libwfduibcsink.so
libwfduibcsinkinterface.so
libwfduibcsrc.so
libwfduibcsrcinterface.so
libwvdrm_L1.so
libxml.so
mediadrm
rfsa
jasons-mbp-5latform-tools mmartinez$ ./adb pull /system/framework/com.verizon.net.jar
120 KB/s (2480 bytes in 0.020s)
jasons-mbp-5latform-tools mmartinez$
jasons-mbp-5latform-tools mmartinez$
jasons-mbp-5latform-tools mmartinez$ ./adb pull /system/framework/com.verizon.net.odex
293 KB/s (5912 bytes in 0.019s)
jasons-mbp-5latform-tools mmartinez$ jar tf com.verizon.net.jar
META-INF/
META-INF/MANIFEST.MF
classes.dex
I'm not a programmer but from what i understand, the bootloader is a separate partition and does not show up in the Android filesystem. If anyone with better skills than mine can explain this better, please feel free.You'd need to have the boot.img file extracted. Look here:
http://k.japko.eu/boot-img-manipulation.html

[Z00T] Possible corrupted /firmware file(s)

Hi,
A little while back, my Z00T stopped booting (would bootloop shortly after the splash screen). Even with stock.
Looks like logcat line 187 is kicking my butt.
I can get in TWRP with no issue, so I have been tracking down the problem from there, and now suspect a corrupt /firmware partition (or a few files within).
Can a Z00T owner with the MM bootloader (preferably June 2nd 2016 update, can verify with first command below), go into TWRP, mount the firmware partition (under Mounts) and run the following two commands?:
Code:
~ # ls -l /firmware/image/keymaste.*
__bionic_open_tzdata: couldn't find any tzdata when looking for localtime!
__bionic_open_tzdata: couldn't find any tzdata when looking for GMT!
__bionic_open_tzdata: couldn't find any tzdata when looking for posixrules!
-rwxrwxrwx 1 root root 180 Jun 2 2016 /firmware/image/keymaste.b00
-rwxrwxrwx 1 root root 6568 Jun 2 2016 /firmware/image/keymaste.b01
-rwxrwxrwx 1 root root 126672 Jun 2 2016 /firmware/image/keymaste.b02
-rwxrwxrwx 1 root root 8132 Jun 2 2016 /firmware/image/keymaste.b03
-rwxrwxrwx 1 root root 6748 Jun 2 2016 /firmware/image/keymaste.mdt
~ # md5sum /firmware/image/keymaste.*
ccaf75b641f15b9b8b33cefc836f29e0 /firmware/image/keymaste.b00
0a446b039708f600cebf1cba89865cd8 /firmware/image/keymaste.b01
8749be39e11338cf5a7998b57da4549c /firmware/image/keymaste.b02
f10be3e59e81f92243166b5e92fb4e47 /firmware/image/keymaste.b03
af9f26f61a4f12b82e99f028867174ea /firmware/image/keymaste.mdt
~ #
Please paste your results in a reply with the CODE tags for comparison (feel free to give me a mention or have a partial QUOTE in your reply).
Bonus points for (if you have the right date but a different hash)...
I will probably need a new firmware partition, and hope my internal SD is not dying.
If noone knows where I can find an official one, you can make one by first verifying the partition number (should be 41):
Code:
adb shell cat /proc/mounts | grep firmware
Then make an image copy to file with dd* to the external sd (using partition 41), download to PC:
Code:
adb shell dd if=/dev/block/mmcblk0p41 of=/sdcard1/firmware.img
adb pull /sdcard1/firmware.img
* Issue the command verbatim, or don't issue at all if not familiar with dd. If used incorrectly, dd can do some serious damage. Been there, done that, always check your work.
This will help me out in continuing to use this device for development purposes.
ZD551KL Selfi / Z00T. ROM CM13 for Z00T
Code:
C:\adb>adb shell ls -l /firmware/image/keymaste.*
-r--r--r-- root root 180 2016-08-05 04:59 keymaste
-r--r--r-- root root 6568 2016-08-05 04:59 keymaste
-r--r--r-- root root 126672 2016-08-05 04:59 keymaste
-r--r--r-- root root 8132 2016-08-05 04:59 keymaste
-r--r--r-- root root 6748 2016-08-05 04:59 keymaste
C:\adb>adb shell md5sum /firmware/image/keymaste.*
ccaf75b641f15b9b8b33cefc836f29e0 /firmware/image/keymaste.b00
0a446b039708f600cebf1cba89865cd8 /firmware/image/keymaste.b01
8749be39e11338cf5a7998b57da4549c /firmware/image/keymaste.b02
f10be3e59e81f92243166b5e92fb4e47 /firmware/image/keymaste.b03
af9f26f61a4f12b82e99f028867174ea /firmware/image/keymaste.mdt
Well then...that blows that out of the water - the hashes match even with a different model num and OTA date.
Unless the partition is only readable under certain circumstances (system boot not being one of them but TWRP seems more forgiving), then I will need a replacement ZE551KL firmware.img. If it is still something else, I will then be unsure how to proceed since this is a problem across multiple boot.img's so it's not a kernel or ramdisk issue yet still prevents /vendor from getting set up before /vendor symlinks to /system/vendor.
Here is md5sum of my z00t ze601kl
Code:
ccaf75b641f15b9b8b33cefc836f29e0 /firmware/image/keymaste.b00
0a446b039708f600cebf1cba89865cd8 /firmware/image/keymaste.b01
8749be39e11338cf5a7998b57da4549c /firmware/image/keymaste.b02
f10be3e59e81f92243166b5e92fb4e47 /firmware/image/keymaste.b03
af9f26f61a4f12b82e99f028867174ea /firmware/image/keymaste.mdt
Code:
-r--r--r-- system system 180 2016-08-03 00:38 keymaste.b00
-r--r--r-- system system 6568 2016-08-03 00:38 keymaste.b01
-r--r--r-- system system 126672 2016-08-03 00:38 keymaste.b02
-r--r--r-- system system 8132 2016-08-03 00:38 keymaste.b03
-r--r--r-- system system 6748 2016-08-03 00:38 keymaste.mdt

(SM-T280) How to extract IMG files from stock rom like a zip file?

I downloaded the stock rom for the SM-T280 and extracted the zip, ap and other files, but i got stuck at the .img files, main one is system.img, attempting to open them gives me "Corrupted Disk Image", Linux doesnt help either, cant recognize the FS, but if i try to export to disk image it will give me the file, but i cannot open. Any Ideas?
If you are tying to mount the image locally (on computer) you will need to use raw image.
More than likely the image files you have are sparse images.
In linux, you can convert them to raw images using the simg2img command.
Example
Code:
[[email protected] P5a]$ ls -la
total 872116
drwxr-xr-x. 2 ip ip 4096 Feb 16 17:10 .
drwxr-xr-x. 44 ip ip 4096 Feb 16 17:05 ..
-rw-r--r--. 1 ip ip 893030692 Feb 16 17:05 system.img
[[email protected] P5a]$
[[email protected] P5a]$ mkdir system
[[email protected] P5a]$ ls -la
total 872120
drwxr-xr-x. 3 ip ip 4096 Feb 16 17:10 .
drwxr-xr-x. 44 ip ip 4096 Feb 16 17:05 ..
drwxr-xr-x. 2 ip ip 4096 Feb 16 17:10 system
-rw-r--r--. 1 ip ip 893030692 Feb 16 17:05 system.img
[[email protected] P5a]$ sudo mount -o ro system.img system
mount: /ip/P5a/system: wrong fs type, bad option, bad superblock on /dev/loop0, missing codepage or helper program, or other error.
dmesg(1) may have more information after failed mount system call.
[[email protected] P5a]$
[[email protected] P5a]$ simg2img system.img raw_system.img
[[email protected] P5a]$ ls -la
total 1744220
drwxr-xr-x. 3 ip ip 4096 Feb 16 17:11 .
drwxr-xr-x. 44 ip ip 4096 Feb 16 17:05 ..
-rw-r--r--. 1 ip ip 895975424 Feb 16 17:11 raw_system.img
drwxr-xr-x. 2 ip ip 4096 Feb 16 17:10 system
-rw-r--r--. 1 ip ip 893030692 Feb 16 17:05 system.img
[[email protected] P5a]$ sudo mount -o ro raw_system.img system
[[email protected] P5a]$ ls -la
total 1744224
drwxr-xr-x. 3 ip ip 4096 Feb 16 17:11 .
drwxr-xr-x. 44 ip ip 4096 Feb 16 17:05 ..
-rw-r--r--. 1 ip ip 895975424 Feb 16 17:11 raw_system.img
drwxr-xr-x. 26 root root 4096 Dec 31 2008 system
-rw-r--r--. 1 ip ip 893030692 Feb 16 17:05 system.img
[[email protected] P5a]$
Cheers.
You can always use a hex editor and look at the start of the image.
Sparse files begin with:
Code:
3a ff 26 ed
ed26ff3a (little endian)
ipdev said:
Code:
-rw-r--r--. 1 ip ip 895975424 Feb 16 17:11 raw_system.img
-rw-r--r--. 1 ip ip 893030692 Feb 16 17:05 system.img
Click to expand...
Click to collapse
This is an example of the most pointless use of sparse files.
Going through the hassle to save 3 MB on 900 MB?
Renate said:
This is an example of the most pointless use of sparse files.
Going through the hassle to save 3 MB on 900 MB?
Click to expand...
Click to collapse
What do you expect from Google.
System image I had readily available to use for an example.
Pixel 5a (barbet-sq3a.220705.003.a1)​
The example was primarily to show the error when trying to mount a sparse image.
Then how to use simg2img to convert the image.
Cheers.
Renate said:
You can always use a hex editor and look at the start of the image.
Sparse files begin with:
Code:
3a ff 26 ed
ed26ff3a (little endian)
Click to expand...
Click to collapse
I was searching for
Code:
1f 8b 08
when doing this.
Dexrn said:
I was searching for 1f 8b 08 when doing this.
Click to expand...
Click to collapse
That's the gzip header. (But you knew that.)
Renate said:
That's the gzip header. (But you knew that.)
Click to expand...
Click to collapse
Yep, for some reason it worked when trying to extract the Recovery and Boot.img, i assume because maybe one of the CPIO images use the same header (if that is even how it works), either way i was extracting some kind of zip file, I dont remember if it was the ramdisk or the actual image that was extracted though.
Dexrn said:
Yep, for some reason it worked when trying to extract the Recovery and Boot.img, i assume because maybe one of the CPIO images use the same header (if that is even how it works), either way i was extracting some kind of zip file, I dont remember if it was the ramdisk or the actual image that was extracted though.
Click to expand...
Click to collapse
I also wonder if there is some way (other than binwalk) to extract the sboot.bin file as it would give us the original filenames inside, and it also contains the boot images (i attached one)
ipdev said:
If you are tying to mount the image locally (on computer) you will need to use raw image.
More than likely the image files you have are sparse images.
In linux, you can convert them to raw images using the simg2img command.
Example
Code:
[[email protected] P5a]$ ls -la
total 872116
drwxr-xr-x. 2 ip ip 4096 Feb 16 17:10 .
drwxr-xr-x. 44 ip ip 4096 Feb 16 17:05 ..
-rw-r--r--. 1 ip ip 893030692 Feb 16 17:05 system.img
[[email protected] P5a]$
[[email protected] P5a]$ mkdir system
[[email protected] P5a]$ ls -la
total 872120
drwxr-xr-x. 3 ip ip 4096 Feb 16 17:10 .
drwxr-xr-x. 44 ip ip 4096 Feb 16 17:05 ..
drwxr-xr-x. 2 ip ip 4096 Feb 16 17:10 system
-rw-r--r--. 1 ip ip 893030692 Feb 16 17:05 system.img
[[email protected] P5a]$ sudo mount -o ro system.img system
mount: /ip/P5a/system: wrong fs type, bad option, bad superblock on /dev/loop0, missing codepage or helper program, or other error.
dmesg(1) may have more information after failed mount system call.
[[email protected] P5a]$
[[email protected] P5a]$ simg2img system.img raw_system.img
[[email protected] P5a]$ ls -la
total 1744220
drwxr-xr-x. 3 ip ip 4096 Feb 16 17:11 .
drwxr-xr-x. 44 ip ip 4096 Feb 16 17:05 ..
-rw-r--r--. 1 ip ip 895975424 Feb 16 17:11 raw_system.img
drwxr-xr-x. 2 ip ip 4096 Feb 16 17:10 system
-rw-r--r--. 1 ip ip 893030692 Feb 16 17:05 system.img
[[email protected] P5a]$ sudo mount -o ro raw_system.img system
[[email protected] P5a]$ ls -la
total 1744224
drwxr-xr-x. 3 ip ip 4096 Feb 16 17:11 .
drwxr-xr-x. 44 ip ip 4096 Feb 16 17:05 ..
-rw-r--r--. 1 ip ip 895975424 Feb 16 17:11 raw_system.img
drwxr-xr-x. 26 root root 4096 Dec 31 2008 system
-rw-r--r--. 1 ip ip 893030692 Feb 16 17:05 system.img
[[email protected] P5a]$
Cheers.
Click to expand...
Click to collapse
This didnt work well for me for some reason, sometimes it just wouldnt work, and I do not know why.
Dexrn said:
I also wonder if there is some way (other than binwalk) to extract the sboot.bin file as it would give us the original filenames inside, and it also contains the boot images (i attached one)
Click to expand...
Click to collapse
I also want to find out how to extract the bootsamsung.qmg file

Categories

Resources