[Q] Repack system.img for P5100 Tab 2? - Galaxy Tab 2 Q&A, Help & Troubleshooting

All,
I am hacking my way through some ROM development - trying to learn how it all works.
I have been trying to get started modifying the system.img from the Stock ICS 4.0.4 ROM for the GT-P5100, following this guide
All good - and I have done my mods to the files (actually all i have done is added an APK) to reduce the variables if something goes wrong.
When I try to "repack" using:
Code:
./mkuserimg.sh -s /some/directory/with/files ./factoryfs_custom.img ext4 ./temp 512M
I get
Code:
Creating filesystem with parameters:
Size: 536870912
Block size: 4096
Blocks per group: 32768
Inodes per group: 8192
Inode size: 256
Journal blocks: 2048
Label:
Blocks: 131072
Block groups: 4
Reserved block group size: 31
error: do_inode_allocate_extents: Failed to allocate 2925 blocks
I am guessing this is because of the block size? So the question is what should this be for the Tab 2 10.1 P5100?

Have you tried using a larger value for the temp size?
Posted from my Fascinate using XDA Premium

MultipleMonomials said:
Have you tried using a larger value for the temp size?
Posted from my Fascinate using XDA Premium
Click to expand...
Click to collapse
I honestly am not really sure what the value does - so no... any suggestions for a value? Or suck it and see?
What impact does it have on the final image?

patonar said:
I honestly am not really sure what the value does - so no... any suggestions for a value? Or suck it and see?
What impact does it have on the final image?
Click to expand...
Click to collapse
OK - so i bit the bullet, change the size to 1024M and repacked the FS, tar'd the file, and flashed using ODIN.
Worked a dream
I think I am going to write a guide on the basics, as there is so much info out there - but not many sources for beginners pulling it all together.

Go for it! More information is never a bad thing!
Posted from my Galaxy Tab with CM10

Related

Why does my almost finished build terminate with no reason or error?

I have been building some CM7/9 ROMs, but lately this one repo I'm compiling from never finishes the make job. It did worked once, but the rest of the times it never does. I do not do anything other than edit the init, mk, vendor files.
It always stops after making the system.img and terminates for no reason back to the terminal.
Code:
Install: out/target/product/vivo/system/app/SystemUI.apk
Finding NOTICE files: out/target/product/vivo/obj/NOTICE_FILES/hash-timestamp
Combining NOTICE files: out/target/product/vivo/obj/NOTICE.html
Installed file list: out/target/product/vivo/installed-files.txt
Target system fs image: out/target/product/vivo/obj/PACKAGING/systemimage_intermediates/system.img
in mkuserimg.sh PATH=out/host/linux-x86/bin/:/usr/lib/jvm/java-6-sun/bin:/home/kaijura/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/home/kaijura/android-sdk/tools:/home/kaijura/android-sdk/platform-tools:/home/kaijura/icecold/out/host/linux-x86/bin:/home/kaijura/icecold/prebuilt/linux-x86/toolchain/arm-linux-androideabi-4.4.x/bin:/home/kaijura/icecold/development/emulator/qtools:/home/kaijura/icecold/prebuilt/linux-x86/toolchain/arm-eabi-4.6.3/bin:/home/kaijura/icecold/prebuilt/linux-x86/toolchain/arm-eabi-4.6.3/bin
make_ext4fs -s -l 585101312 -a system out/target/product/vivo/obj/PACKAGING/systemimage_intermediates/system.img out/target/product/vivo/system
Creating filesystem with parameters:
Size: 585101312
Block size: 4096
Blocks per group: 32768
Inodes per group: 7152
Inode size: 256
Journal blocks: 2231
Label:
Blocks: 142847
Block groups: 5
Reserved block group size: 39
Created filesystem with 1402/35760 inodes and 66573/142847 blocks
Install system fs image: out/target/product/vivo/system.img
out/target/product/vivo/system.img+out/target/product/vivo/obj/PACKAGING/recovery_patch_intermediates/recovery_from_boot.p total size is 266217238
[email protected]:~/icecold$
Any ideas what I can try? I have done make clean, deleted the out folder and have properly set ccache.
Code:
export USE_CCACHE=1
export CCACHE_DIR=/home/kaijura/.ccache
prebuilt/linux-x86/ccache/ccache -M 40G
make -j2

[Q] Switching from CM10 to CleanRom v5

Hello, I am trying to switch from CM10 to CleanRom, but am having issues installing the ROM itself. When selecting the last next before the install process in the Aroma installer, it simply goes to the install complete screen.
I pulled the install logs off the device which I have pasted below.
Code:
AROMA INSTALLER version 2.51
(c) 2012 by amarullz xda-developers
ROM Name : CleanROM
ROM Version : 5.0
ROM Author : Scott
Device : HTC One X
Start at : Thu Nov 8 13:04:13 2012
CleanROM V
//snip//
Formatting and Optimizing File System...
Extract: /tmp/fsck.ext4
Extract: /tmp/mkfs.ext4
Extract: /tmp/tune2fs.ext4
Creating filesystem with parameters:
Size: 1744829440
Block size: 4096
Blocks per group: 32768
Inodes per group: 8192
Inode size: 256
Journal blocks: 6656
Label:
Blocks: 425983
Block groups: 13
Reserved block group size: 103
Created filesystem with 11/106496 inodes and 13971/425983 blocks
error: file_write: write: I/O error
Installer Error (Status 1)
End at : Thu Nov 8 13:04:13 2012
I can reload CM10 happily via recovery, just not CleanRom. (I also tried Viper which failed too.)
Info:
Bootloader Unlocked
HBOOT-01.09.0000
I feel I am missing something stupid here, any ideas?
Thanks,
koj1n said:
Hello, I am trying to switch from CM10 to CleanRom, but am having issues installing the ROM itself. When selecting the last next before the install process in the Aroma installer, it simply goes to the install complete screen.
I pulled the install logs off the device which I have pasted below.
Code:
AROMA INSTALLER version 2.51
(c) 2012 by amarullz xda-developers
ROM Name : CleanROM
ROM Version : 5.0
ROM Author : Scott
Device : HTC One X
Start at : Thu Nov 8 13:04:13 2012
CleanROM V
//snip//
Formatting and Optimizing File System...
Extract: /tmp/fsck.ext4
Extract: /tmp/mkfs.ext4
Extract: /tmp/tune2fs.ext4
Creating filesystem with parameters:
Size: 1744829440
Block size: 4096
Blocks per group: 32768
Inodes per group: 8192
Inode size: 256
Journal blocks: 6656
Label:
Blocks: 425983
Block groups: 13
Reserved block group size: 103
Created filesystem with 11/106496 inodes and 13971/425983 blocks
error: file_write: write: I/O error
Installer Error (Status 1)
End at : Thu Nov 8 13:04:13 2012
I can reload CM10 happily via recovery, just not CleanRom. (I also tried Viper which failed too.)
Info:
Bootloader Unlocked
HBOOT-01.09.0000
I feel I am missing something stupid here, any ideas?
Thanks,
Click to expand...
Click to collapse
Have you tried wiping everything (data, cache, dalvik, system) before running the installer?
Yep, I have wiped everything. Even tried flashing the CleanRom boot.img via fastboot, non-CM10 ROMs just seem fail to load.
Unzip on a computer and flash the cleanroms boot.IMG then flash.
Sent from my HTC One X using xda premium
curly9 said:
Unzip on a computer and flash the cleanroms boot.IMG then flash.
Sent from my HTC One X using xda premium
Click to expand...
Click to collapse
He's on hboot 1.09 he doesnt need to do that
Figured it out. CleanRom 5 is incompatible with TWRP 2.3+, just downgraded and it works again.

how can check memory 16 or 64gb when phone hang on logo

how can check memory of one plus one when phone stuck on logo i have recived many times one plus one hang on logo and customer dont no how much memory in this phone how can check plz help thnx
ahmerp said:
how can check memory of one plus one when phone stuck on logo i have recived many times one plus one hang on logo and customer dont no how much memory in this phone how can check plz help thnx
Click to expand...
Click to collapse
If the device has a white back cover, it's the 16gb version and if i'ts the sandstone black cover then it's the 64gb version, ofcourse this is only true when the owner hasn't replaced their back cover!
if user change back cover then bcz to much refurbish phone in market last night black back cover 16gb phone i recived for firmware update that is reason today i post this
ahmerp said:
if user change back cover then bcz to much refurbish phone in market last night black back cover 16gb phone i recived for firmware update that is reason today i post this
Click to expand...
Click to collapse
if it has a customer recovery built in boot into recovery and plug in the cable and see how much memory there is
fastboot format cache
waiting for device >
rasing 'cache'...
KAY [ 0.197s]
ormatting 'cache' partition...
reating filesystem with parameters:
Size: 536870912
Block size: 4096
Blocks per group: 32768
Inodes per group: 8192
Inode size: 256
Journal blocks: 2048
Label:
Blocks: 131072
Block groups: 4
Reserved block group size: 31
reated filesystem with 11/32768 inodes and 4206/131072 blocks
ending 'cache' (10432 KB)...
riting 'cache'...
KAY [ 0.624s]
inished. total time: 0.823s this is the procedure to check memory

System dump HTC U11+

Hi
I am searchin for a System dump for HTC U11+.
Can someone help me please?
Thank you and regards
damigor said:
Hi
I am searchin for a System dump for HTC U11+.
Can someone help me please?
Thank you and regards
Click to expand...
Click to collapse
You can decrypt RUUs using HTC RUU/ROM Decryption Tool to obtain the system.img and other .img files.
goodman_east said:
You can decrypt RUUs using HTC RUU/ROM Decryption Tool to obtain the system.img and other .img files.
Click to expand...
Click to collapse
Thank you very much. I guess you helped me a lot but I have no Idea how to make this stepsl So I will read instructions and try to understand them
Can I ask you for further information if I need some help?
damigor said:
Thank you very much. I guess you helped me a lot but I have no Idea how to make this stepsl So I will read instructions and try to understand them
Can I ask you for further information if I need some help?
Click to expand...
Click to collapse
Of course.
Hi
as supposed it has not work. See Log. :-/ Do you have any idea?
d to open keydata file: C:/adb/OUT/tmp/use_keyfile.bin
ERROR: could not decrypt file 'zip_23.zip' (res=247)
Decrypting (25/25) 'zip_24.zip'
Encrypted zip detected, running ruuveal...
ruuveal
-------
failed to open keydata file: C:/adb/OUT/tmp/use_keyfile.bin
ERROR: could not decrypt file 'zip_24.zip' (res=247)
DecryptZIPs took 6.433 seconds.
Restoring '2Q4DIMG_OCEAN_M_DUGL_O80_SENSE90GP_hTC_Asia_TW_1.01.709.3_Radio_8998-002772-1710131105_release_514337_combined_signed_2_4.zip' to normal folder
Removing unneeded work folders
Overall process completion time: 3 minutes 48.735 seconds.
Finished: Tool has finished but there was an error, please
check the console output and your OUT folder
'C:/adb/OUT'
goodman_east said:
Of course.
Click to expand...
Click to collapse
What do you think?
damigor said:
d to open keydata file: C:/adb/OUT/tmp/use_keyfile.bin
ERROR: could not decrypt file 'zip_23.zip' (res=247)
Decrypting (25/25) 'zip_24.zip'
Encrypted zip detected, running ruuveal...
ruuveal
-------
failed to open keydata file: C:/adb/OUT/tmp/use_keyfile.bin
ERROR: could not decrypt file 'zip_24.zip' (res=247)
DecryptZIPs took 6.433 seconds.
Restoring '2Q4DIMG_OCEAN_M_DUGL_O80_SENSE90GP_hTC_Asia_TW_1.01.709.3_Radio_8998-002772-1710131105_release_514337_combined_signed_2_4.zip' to normal folder
Removing unneeded work folders
Overall process completion time: 3 minutes 48.735 seconds.
Finished: Tool has finished but there was an error, please
check the console output and your OUT folder
'C:/adb/OUT'
Click to expand...
Click to collapse
You need a keyfile or hosd.img to decrypt a RUU.
Here is the keyfile you need.
goodman_east said:
Of course.
Click to expand...
Click to collapse
goodman_east said:
You need a keyfile or hosd.img to decrypt a RUU.
Here is the keyfile you need.
Click to expand...
Click to collapse
thank you very much. Where I have to put this Keyfile?
goodman_east said:
You need a keyfile or hosd.img to decrypt a RUU.
Here is the keyfile you need.
Click to expand...
Click to collapse
Ok. I got it.
Thank you very much. I have right now just Boot.img and system.img. I have flash a Boot.img but when I tra to flash System.img I recieve this error:
C:\adb>fastboot -w flash system C:\adb\OUT_2Q4D_1.01.709.3\system\system.img
target reported max download size of 2392800000 bytes
Invalid sparse file format at header magi
Creating filesystem with parameters:
Size: 121274105856
Block size: 4096
Blocks per group: 32768
Inodes per group: 8192
Inode size: 256
Journal blocks: 32768
Label:
Blocks: 29607936
Block groups: 904
Reserved block group size: 1024
Created filesystem with 11/7405568 inodes and 512922/29607936 blocks
Creating filesystem with parameters:
Size: 234881024
Block size: 4096
Blocks per group: 32768
Inodes per group: 7168
Inode size: 256
Journal blocks: 1024
Label:
Blocks: 57344
Block groups: 2
Reserved block group size: 15
Created filesystem with 11/14336 inodes and 1961/57344 blocks
erasing 'system'...
OKAY [ 0.192s]
sending sparse 'system' (2325171 KB)...
FAILED ()
finished. total time: 1.370s
C:\adb>
damigor said:
Ok. I got it.
Thank you very much. I have right now just Boot.img and system.img. I have flash a Boot.img but when I tra to flash System.img I recieve this error:
C:\adb>fastboot -w flash system C:\adb\OUT_2Q4D_1.01.709.3\system\system.img
target reported max download size of 2392800000 bytes
Invalid sparse file format at header magi
Creating filesystem with parameters:
Size: 121274105856
Block size: 4096
Blocks per group: 32768
Inodes per group: 8192
Inode size: 256
Journal blocks: 32768
Label:
Blocks: 29607936
Block groups: 904
Reserved block group size: 1024
Created filesystem with 11/7405568 inodes and 512922/29607936 blocks
Creating filesystem with parameters:
Size: 234881024
Block size: 4096
Blocks per group: 32768
Inodes per group: 7168
Inode size: 256
Journal blocks: 1024
Label:
Blocks: 57344
Block groups: 2
Reserved block group size: 15
Created filesystem with 11/14336 inodes and 1961/57344 blocks
erasing 'system'...
OKAY [ 0.192s]
sending sparse 'system' (2325171 KB)...
FAILED ()
finished. total time: 1.370s
C:\adb>
Click to expand...
Click to collapse
command
Code:
fastboot flash -S 1G system C:\adb\OUT_2Q4D_1.01.709.3\system\system.img
fastboot flash boot C:\adb\OUT_2Q4D_1.01.709.3\system\boot.img
goodman_east said:
You need a keyfile or hosd.img to decrypt a RUU.
Here is the keyfile you need.
Click to expand...
Click to collapse
nenebear said:
command
Code:
fastboot flash -S 1G system C:\adb\OUT_2Q4D_1.01.709.3\system\system.img
fastboot flash boot C:\adb\OUT_2Q4D_1.01.709.3\system\boot.img
Click to expand...
Click to collapse
Thank you very much! This has worked but now I am in bootloop :-/
damigor said:
Thank you very much! This has worked but now I am in bootloop :-/
Click to expand...
Click to collapse
Are your device is htc_ocmdugl ?
nenebear said:
Are your device is htc_ocmdugl ?
Click to expand...
Click to collapse
Yes I am. Still having Bootloop :-/
damigor said:
Yes I am.
Click to expand...
Click to collapse
Plz upload the download mode photo of your U11 plus
goodman_east said:
Plz upload the download mode photo of your U11 plus
Click to expand...
Click to collapse
Here you go. Thanks guy for your support
damigor said:
Here you go. Thanks guy for your support
Click to expand...
Click to collapse
you can flash ruu 1.01.709.3, or 1.03.1405.1 after mid and cid changed
goodman_east said:
you can flash ruu 1.01.709.3, or 1.03.1405.1 after mid and cid changed
Click to expand...
Click to collapse
sorry, I need some more informaion. :-/
damigor said:
Here you go. Thanks guy for your support
Click to expand...
Click to collapse
cidnum: HTC__034 -- HTC Europe
OS-0.81.709.10 -- HTC TW
Change cidnum: 11111111 than flash RUU_1.01.709.3
flash HTC RUU use this tool -- adb tool
download mode
Code:
fastboot oem writecid 11111111
fastboot oem rebootRUU
flash flash zip RUU_name.zip
fastboot reboot
goodman_east said:
you can flash ruu 1.01.709.3, or 1.03.1405.1 after mid and cid changed
Click to expand...
Click to collapse
nenebear said:
cidnum: HTC__034 -- HTC Europe
OS-0.81.709.10 -- HTC TW
Change cidnum: 11111111 than flash RUU_1.01.709.3
flash HTC RUU use this tool -- adb tool
download mode
Code:
fastboot oem writecid 11111111
fastboot oem rebootRUU
flash flash zip RUU_name.zip
fastboot reboot
Click to expand...
Click to collapse
Thank you very much. This has worked but I am still in Bootloop

Mi 4C stuck on preparing apps boot loop

Hi,
years ago i installed the Teamsuperluminal's CM13 on my Xiaomi Mi 4c and it it worked for a long time without major issues. Lately the phone started to auto power down when the battery reached appr. 50% charge. I would hook it up to a charger and reboot it and charge it back up again. Then it was fine again, this has been going on for months now. But yesterday it auto powered down again and after reboot it showed the CM boot logo for an unusual amount of time, after that it started preparing apps for start. When it was done with that it would just immediately reboot and start over again. So it is now stuck on a preparing apps reboot loop.
What i have tried so far:
1. Wipe cache and dalvik in TWRP and reboot. Didn't help
2. Tried to reformat a partition that might be corrupted due to brown out with:
Code:
make_ext4fs /dev/block/mmcblk0p15
It shows the following error:
Code:
Creating filesystem with parameters:
Size: 131072
Block size: 4096
Blocks per group: 32768
Inodes per group: 16
Inode size: 256
Journal blocks:1024
Label:
Blocks: 32
Block groups: 1
Reserved block group size: 7
error: ext4_allocate_best_fit_partial: failed to allocate 1005 blocks, out of space?
But there are more than 2GB of free space available and mmblk0p15 is then missing from /dev/block/ , so if i run the same command again i get:
Code:
Need size of filesystem
How can i repair this or what log file might be interesting?

Categories

Resources