[Q] Moding ramdisk - XPERIA X10 Q&A, Help & Troubleshooting

Hello guys, I have a small problem,
I wanted to change logo in ramdisk (unlocked bootloader kernel), but after everything I got black screen after trying to boot device (vibra and then black screen)
There is list what I do, maybe someone will find mistake:
1. Unpacked ftf via 7zip -> got kernel.sin and loader.sin
2. Unpacked kernel.sin via unpack-kernelsin.pl
3. Unpacked ramdisk via 7-zip
4. Renamed unpacked ramdisk to ramdisk.cpio (moved to tmp dir)
5. cpio -i -F ramdisk.cpio (in tmp dir)
6. Replaced logo and moved ramdisk.cpio to ../
7. Executed command in tmp dir: cpio -i -t -F ../ramdisk.cpio | cpio -o -H newc -O ../ramdisk_new.cpio
8. Renamed folder with new ramdisk to ramdisk~
9. Packed it via 7zip (gz,Ultra)
10. Moved to sintools and renamed gz file to ramdisk
11. Moved kernel.sin-kerne (from unpacking kernel via unpack-kernelsin.pl), and renamed it to image
12. Executed example_build.cmd from sinTools
13. Moved to flashtool, maked bundle
14. Flashed
15. Black screen : /
If someone can help, I'll be glad

Related

[GUIDE] [Xperia P/S] How to unpack/pack the Sony 2012 kernels

This guide should hopefully allow you to unpack and re-pack the 2012 Xperia kernels, which use a new .elf format.
[ Requirements: ]
Sony's mkelf.py
Python (For mkelf.py)
7-zip
[ Unpack elf: ]
1. Unpack the .elf using 7-zip, either via the GUI or command line:
Code:
7z e kernel.elf
2. This will give you 3 files:
Code:
0 - Kernel
1 - RAMDisk
2 - Resource Power Manager (RPM, Xperia S only):
2. You will need to unpack the '1' file to get the RAMDisk (It will be named 1~):
Code:
7z e 1
3. Unpack the RAMDisk:
Code:
mkdir ramdisk
7z x "1~" -o"ramdisk"
Now make your changes to the RAMDisk
[ Pack elf: ]
1. Pack the new RAMDisk (The new RAMDisk will be named '1' in the ramdisk folder):
Code:
cd ramdisk
find . | cpio -o -H newc | gzip > 1
2. Copy the kernel '0', new RAMDisk '1' (in the ramdisk folder) and RPM '2' (Xpera S only) into a new folder, along with the mkelf.py file
3. Run the Python mkelf.py (note the different instructions for Xperia P and Xperia S):
Xperia P:
Kernel should be named 0
RAMDisk should be named 1
Code:
python mkelf.py -o new_kernel.elf [email protected] [email protected],ramdisk
Xperia S:
Kernel should be named 0
RAMDisk should be named 1
Resource Power Manager (RPM) should be named 2
Code:
python mkelf.py -o new_kernel.elf [email protected] [email protected],ramdisk [email protected],rpm
This should create a new packed file called newkernel.elf
[ Boot: ]
1. Flash the new kernel
Code:
fastboot -i 0x0fce flash boot new_kernel.elf
2. Reboot the phone
Code:
fastboot -i 0x0fce reboot
Hopefully should boot into your new kernel
Open to comments and suggestions for this tutorial
Disclaimer: I accept no responsibility if this destroys your device/house/life
Source: http://developer.sonymobile.com/wp/...-archive-released-with-building-instructions/
Source: http://android-dls.com/wiki/index.php?title=HOWTO:_Unpack%2C_Edit%2C_and_Re-Pack_Boot_Images
Thanks: nickholtus, DooMLoRD
Guide looks really good
Just for the record: did anyone test this?
K900 said:
Just for the record: did anyone test this?
Click to expand...
Click to collapse
Yes Nickholtus did (On his Xperia P)
And on the S? Because from what I know the P doesn't have that bug.
Will this also work for the sola?
shreyasdilip said:
Will this also work for the sola?
Click to expand...
Click to collapse
It will need different addresses for the mkelf.py. If you link me to a Sola kernel, I can update the post with it
will this work for sola
What about sola
ffaaiissaall said:
What about sola
Click to expand...
Click to collapse
Don't mean to sound an arse but did you even read the thread? Check the question two posts up from you and the response to it just one below.
K900 said:
Just for the record: did anyone test this?
Click to expand...
Click to collapse
yes i have already done lots of testing on nick's Xperia P last week
And what if i have 4 files after unpacking the kernel.elf??
i have 0,1,2,3
How to deal with this case?
norberto_ said:
And what if i have 4 files after unpacking the kernel.elf??
i have 0,1,2,3
How to deal with this case?
Click to expand...
Click to collapse
what phone and what kernel ??
Regarding testing of things, I now have a spare Xperia S if anyone wants me to try things out without the risk of messing up my main phone.
check this out
http://forum.xda-developers.com/showthread.php?p=27859098#post27859098
championswimmer said:
check this out
http://forum.xda-developers.com/showthread.php?p=27859098#post27859098
Click to expand...
Click to collapse
makes sense
Atarii said:
This guide should hopefully allow you to unpack and re-pack the 2012 Xperia kernels, which use a new .elf format.
[ Requirements: ]
Sony's mkelf.py
Python (For mkelf.py)
7-zip
[ Unpack elf: ]
1. Unpack the .elf using 7-zip, either via the GUI or command line:
Code:
7z e kernel.elf
2. This will give you 3 files:
Code:
0 - Kernel
1 - RAMDisk
2 - Resource Power Manager (RPM, Xperia S only):
2. You will need to unpack the '1' file to get the RAMDisk (It will be named 1~):
Code:
7z e 1
3. Unpack the RAMDisk:
Code:
mkdir ramdisk
7z x "1~" -o"ramdisk"
Now make your changes to the RAMDisk
[ Pack elf: ]
1. Pack the new RAMDisk (The new RAMDisk will be named '1' in the ramdisk folder):
Code:
cd ramdisk
find . | cpio -o -H newc | gzip > 1
2. Copy the kernel '0', new RAMDisk '1' (in the ramdisk folder) and RPM '2' (Xpera S only) into a new folder, along with the mkelf.py file
3. Run the Python mkelf.py (note the different instructions for Xperia P and Xperia S):
Xperia P:
Kernel should be named 0
RAMDisk should be named 1
Code:
python mkelf.py -o new_kernel.elf [email protected] [email protected],ramdisk
Xperia S:
Kernel should be named 0
RAMDisk should be named 1
Resource Power Manager (RPM) should be named 2
Code:
python mkelf.py -o new_kernel.elf [email protected] [email protected],ramdisk [email protected],rpm
This should create a new packed file called newkernel.elf
[ Boot: ]
1. Flash the new kernel
Code:
fastboot -i 0x0fce flash boot new_kernel.elf
2. Reboot the phone
Code:
fastboot -i 0x0fce reboot
Hopefully should boot into your new kernel
Open to comments and suggestions for this tutorial
Disclaimer: I accept no responsibility if this destroys your device/house/life
Source: http://developer.sonymobile.com/wp/...-archive-released-with-building-instructions/
Source: http://android-dls.com/wiki/index.php?title=HOWTO:_Unpack%2C_Edit%2C_and_Re-Pack_Boot_Images
Thanks: nickholtus, DooMLoRD
Click to expand...
Click to collapse
I just unpack & repack the kernel, but it isn't work
the screen just all black
nothing displays
wzhy said:
I just unpack & repack the kernel, but it isn't work
the screen just all black
nothing displays
Click to expand...
Click to collapse
I am using Xperia acro S. I had the same problem.
@wzhy, why don't you use the following command instead.
Code:
python mkelf.py -o new_kernel.elf [email protected] [email protected],ramdisk [email protected],rpm
for unpacking the ramdisk use the method on this page (few posts above)
otherwise you will get a black screen
Hi.
whats the correct setting for Xperia U for mkelf.py ?
Thx
Nice guide but ...
I have Xperia sola
4.0.4 rom build 6.1.1.B.1.54
kernel.sin has 3 files {
kernel.elf
kernel.patinfo
kernel.header
}
kernel.elf has 4 files! {
kernel.elf.3
kernel.elf.cert
kernel.elf.Image
kernel.elf.ramdisk.gz
}
In the ram disk there is a file name kernel.elf.ramdisk
and kernel.elf.ramdisk has the ramdisk files
So how can I repack THIS?!
thanks in advance for your answer

[Q] 1000 failures while trying to compile CM!

I'm tired of asking the same question again and again but for the thousandth and the last time I'll try my best to explain y'all the jeopardy I'm in.
I'm trying to build cm-10.2 from source for Sony Xperia E (nanhu) and everything started off just fine until I had to generate the skeleton files. I decided to use the mkvendor.sh to generate em. I have no clue why, but Sony seems to be in love with .elf files. And the best part, mkvendor only works with a standard boot.img file. Since I found mkvendor.sh the only convincing option, I decided to not use the other 2 options given here.
I extracted the kernel.sin from the ftf package of the kernel I downloaded, used flashtool to in turn extract kernel.sin which produced kernel.elf. I tried two things:
1) Unpack kernel.elf (flashtool elf extractor) and then pack em into a boot.img file (Failed as I couldn't pack em because I didn;t know how to use mkbootimg)
2) Rename kernel.elf to boot.img. as suggested by a developer of CM11 for Xperia E (Worked and was also accepted by mkvendor.sh)
I used mkvendor and it said that i don't have unpackbootimg binaries. I tried to make them by using:
make -j4 out/host/linux-x86/bin/unpackbootimg
Sadly I didn't know how to proceed so I got the binary from here and copied it to /usr/bin/ and made executable using:
sudo chmod a+x /usr/bin/unpackbootimg
Rebooted and it worked but you will see below that it isn't fixed 100% but it just works. I moved on and decided to use the script again on the renamed kernel.elf file(i.e. boot.img)
This is the following error I encounter while using mkvendor:
[email protected]:~/tools/FlashTool$ cd ~/source/cm/branch/cm-10.2
[email protected]:~/source/cm/branch/cm-10.2$ ./build/tools/device/mkvendor.sh sony nanhu ~/Desktop/boot.img
Arguments: sony nanhu /home/carbogen-chemist/Desktop/boot.img
Output will be in /home/carbogen-chemist/source/cm/branch/cm-10.2/device/sony/nanhu
*** Error in `unpackbootimg': free(): invalid next size (fast): 0x09793170 ***
./build/tools/device/mkvendor.sh: line 84: 3943 Aborted (core dumped) unpackbootimg -i $BOOTIMAGEFILE > /dev/null
gzip: ../boot.img-ramdisk.gz: No such file or directory
cpio: premature end of archive
cp: cannot stat ‘/tmp/carbogen-chemist/bootimg/boot.img-zImage’: No such file or directory
Creating initial git repository.
~/source/cm/branch/cm-10.2/device/sony/nanhu ~/source/cm/branch/cm-10.2
Initialized empty Git repository in /home/carbogen-chemist/source/cm/branch/cm-10.2/device/sony/nanhu/.git/
[master (root-commit) d49b660] mkvendor.sh: Initial commit of nanhu
7 files changed, 95 insertions(+)
create mode 100644 AndroidBoard.mk
create mode 100644 AndroidProducts.mk
create mode 100644 BoardConfig.mk
create mode 100644 cm.mk
create mode 100644 device_nanhu.mk
create mode 100644 recovery.fstab
create mode 100644 system.prop
~/source/cm/branch/cm-10.2
Done!
Use the following command to set up your build environment:
lunch cm_nanhu-eng
And use the follwowing command to build a recovery:
. build/tools/device/makerecoveries.sh cm_nanhu-eng
Since the script seems to look up for boot.img-ramdisk.gz and boot.img-zImage, I decided to investigate a bit further. I renamed boot.img to kernel.elf and used flashtool elf extractor to unzip kernel.elf. I obtained four files as a result of the extraction:
1) kernel.elf.bootcmd
2) kernel.elf.cert
3) kernel.elf.Image
4) kernel.elf.ramdisk.gz
Since mkvendor needed boot.img-ramdisk.gz and boot.img-zImage, I renamed all the files:
1) kernel.elf.bootcmd >> kernel.img-bootcmd
2) kernel.elf.cert >> kernel.img-cert
3) kernel.elf.Image >> kernel.img-zImage
4) kernel.elf.ramdisk.gz >> kernel.img-ramdisk.gz
Now I repackaged them using mkelf.py script. Since I couldn't find any command specific to nanhu, I edited it to fit for the device:
python mkelf.py -o edited.elf [email protected] [email protected],ramdisk [email protected],cmdline
This command throws no error and produces edited.elf. All of the files are packed in except kernel.img-cert as I didn't know the arguments for it ([email protected]?x????????,cert). I rename the edited.elf to boot2.img.
But I get the same error as the one I get when I use the unedited kernel (boot.img)
What should I do to get out of this format abyss? Would I have better luck with mkbootimg? If so, could you point me out to a thread or tell me here itself how to use it?
Thank you all!
TheUltimateNoobist said:
I used mkvendor and it said that i don't have unpackbootimg binaries. I tried to make them by using:
make -j4 out/host/linux-x86/bin/unpackbootimg
Sadly I didn't know how to proceed so I got the binary from here and copied it to /usr/bin/ and made executable using:
sudo chmod a+x /usr/bin/unpackbootimg
Rebooted and it worked but you will see below that it isn't fixed 100% but it just works. I moved on and decided to use the script again on the renamed kernel.elf file(i.e. boot.img)
Click to expand...
Click to collapse
Fixed it myself. How did I miss that note at cyanogenmod porting?
Cd'ed to my working directory. Ran :
sudo make -j4 otatools
and grabbed unpackbootimg from WORKING_DIR/out/host/linux-x86/bin/unpackbootimg and pasted to /usr/bin
Made it executable by running:
sudo chmod a+x /usr/bin/unpackbootimg
Reboot!
It would also be very helpful if anyone could point out what the correct config for Xperia E is. (For EG >> blue_mint_defconfig is for Xperia T, semc_zeus_defconfig is for Xperia Play)
There is a file called README_Xperia, which contains the configuration names for the different phones in the kernel source can be used for. But my source doesn't contain it. So I would be very grateful if someone pointed it out!
Thank you!
TheUltimateNoobist said:
I'm tired of asking the same question again and again but for the thousandth and the last time I'll try my best to explain y'all the jeopardy I'm in.
I'm trying to build cm-10.2 from source for Sony Xperia E (nanhu) and everything started off just fine until I had to generate the skeleton files. I decided to use the mkvendor.sh to generate em. I have no clue why, but Sony seems to be in love with .elf files. And the best part, mkvendor only works with a standard boot.img file. Since I found mkvendor.sh the only convincing option, I decided to not use the other 2 options given here.
I extracted the kernel.sin from the ftf package of the kernel I downloaded, used flashtool to in turn extract kernel.sin which produced kernel.elf. I tried two things:
1) Unpack kernel.elf (flashtool elf extractor) and then pack em into a boot.img file (Failed as I couldn't pack em because I didn;t know how to use mkbootimg)
2) Rename kernel.elf to boot.img. as suggested by a developer of CM11 for Xperia E (Worked and was also accepted by mkvendor.sh)
I used mkvendor and it said that i don't have unpackbootimg binaries. I tried to make them by using:
make -j4 out/host/linux-x86/bin/unpackbootimg
Sadly I didn't know how to proceed so I got the binary from here and copied it to /usr/bin/ and made executable using:
sudo chmod a+x /usr/bin/unpackbootimg
Rebooted and it worked but you will see below that it isn't fixed 100% but it just works. I moved on and decided to use the script again on the renamed kernel.elf file(i.e. boot.img)
This is the following error I encounter while using mkvendor:
[email protected]:~/tools/FlashTool$ cd ~/source/cm/branch/cm-10.2
[email protected]:~/source/cm/branch/cm-10.2$ ./build/tools/device/mkvendor.sh sony nanhu ~/Desktop/boot.img
Arguments: sony nanhu /home/carbogen-chemist/Desktop/boot.img
Output will be in /home/carbogen-chemist/source/cm/branch/cm-10.2/device/sony/nanhu
*** Error in `unpackbootimg': free(): invalid next size (fast): 0x09793170 ***
./build/tools/device/mkvendor.sh: line 84: 3943 Aborted (core dumped) unpackbootimg -i $BOOTIMAGEFILE > /dev/null
gzip: ../boot.img-ramdisk.gz: No such file or directory
cpio: premature end of archive
cp: cannot stat ‘/tmp/carbogen-chemist/bootimg/boot.img-zImage’: No such file or directory
Creating initial git repository.
~/source/cm/branch/cm-10.2/device/sony/nanhu ~/source/cm/branch/cm-10.2
Initialized empty Git repository in /home/carbogen-chemist/source/cm/branch/cm-10.2/device/sony/nanhu/.git/
[master (root-commit) d49b660] mkvendor.sh: Initial commit of nanhu
7 files changed, 95 insertions(+)
create mode 100644 AndroidBoard.mk
create mode 100644 AndroidProducts.mk
create mode 100644 BoardConfig.mk
create mode 100644 cm.mk
create mode 100644 device_nanhu.mk
create mode 100644 recovery.fstab
create mode 100644 system.prop
~/source/cm/branch/cm-10.2
Done!
Use the following command to set up your build environment:
lunch cm_nanhu-eng
And use the follwowing command to build a recovery:
. build/tools/device/makerecoveries.sh cm_nanhu-eng
Since the script seems to look up for boot.img-ramdisk.gz and boot.img-zImage, I decided to investigate a bit further. I renamed boot.img to kernel.elf and used flashtool elf extractor to unzip kernel.elf. I obtained four files as a result of the extraction:
1) kernel.elf.bootcmd
2) kernel.elf.cert
3) kernel.elf.Image
4) kernel.elf.ramdisk.gz
Since mkvendor needed boot.img-ramdisk.gz and boot.img-zImage, I renamed all the files:
1) kernel.elf.bootcmd >> kernel.img-bootcmd
2) kernel.elf.cert >> kernel.img-cert
3) kernel.elf.Image >> kernel.img-zImage
4) kernel.elf.ramdisk.gz >> kernel.img-ramdisk.gz
Now I repackaged them using mkelf.py script. Since I couldn't find any command specific to nanhu, I edited it to fit for the device:
python mkelf.py -o edited.elf [email protected] [email protected],ramdisk [email protected],cmdline
This command throws no error and produces edited.elf. All of the files are packed in except kernel.img-cert as I didn't know the arguments for it ([email protected]?x????????,cert). I rename the edited.elf to boot2.img.
But I get the same error as the one I get when I use the unedited kernel (boot.img)
What should I do to get out of this format abyss? Would I have better luck with mkbootimg? If so, could you point me out to a thread or tell me here itself how to use it?
Thank you all!
Click to expand...
Click to collapse
Nevermind :/ Fixed it myself.
Repacked the edited files using mkbootimg.
mkbootimg --kernel kernel.img-zImage --ramdisk kernel.img-ramdisk.gz --cmdline kernel.img-bootcmd -o boot.img

[GUIDE][HOW TO][Xperia P/U] Unpack & Repack Kernel.elf

Hi everyone, I didn't find a full guide for unpacking & repacking new kernel.elf, they were somehow out-dated.
so I'm here to share with you my knowledge.
First Post : Unpack kernel
Second Post : Unpack ramdisk
Third Post : Repack ramdisk
Fourth Post : Repack kernel
1st : Requirements​
1) the kernel you want to unpack
2) 7z -->
Code:
sudo apt-get install p7zip
2nd : procedure​
lets assume our working directory is "~/kernel" and the kernels name is "kernel.elf".
now open terminal and write down the following code.
Code:
mkdir ~/kernel
cp /path/to/file ~/kernel/kernel.elf
cd ~/kernel
7z e kernel.elf
now you will get 0, 1, 2, 3.
0 --> zImage
1 --> ramdisk
2 --> cmdline
3 --> cert
Code:
mv 0 kernel.elf-zImage
mv 1 kernel.elf-ramdisk.gz
mv 2 kernel.elf-cmdline
mv 3 kernel.elf-cert
now you have successfully unpacked the kernel.
[B]Second Post : Unpack ramdisk[/B]
1st : Requirements​
1) the ramdisk we got from the first post.
2) file -->
Code:
sudo apt-get install file
3) most probably gzip -->
Code:
sudo apt-get install gzip
2nd : procedure​
Code:
file -b kernel.elf-ramdisk.gz
most probably you will get "gzip compressed data".
if not read the notes at the end of this post then resume reading.
Code:
gzip -dk kernel.elf-ramdisk.gz
now you will get cpio archive "kernel.elf-ramdisk".
Code:
mkdir ramdisk
mv kernel.elf-ramdisk ramdisk
cd ramdisk
cpio -i < kernel.elf-ramdisk
rm kernel.elf-ramdisk
cd ..
now you successfully extracted the ramdisk.
3rd : notes​
it seems your ramdisk isn't gzip compressed.
if you got "LZMA compressed data" from file command
then it is "lzma" compressed
lzma -->
Code:
sudo apt-get install xz-utils
to uncompress use
Code:
mv kernel.elf-ramdisk.gz kernel.elf-ramdisk.lzma
xz -dk kernel.elf-ramdisk.lzma
now you chould resume unpacking process.
Third Post : repack ramdisk
1st : Requirements​
1) the ramdisk folder we extracted from second post.
2) cpio
3) the tool we used for unpacking ramdisk (gzip) (check notes for other compression types)
2nd : procedure​
Code:
cd ramdisk
find|cpio -o -H newc|gzip >../kernel.elf-new_ramdisk.gz
cd ..
now you successfully repacked the ramdisk.
3rd : notes​
well it is recommended to repack the ramdisk with the original ramdisk format
because other formats maybe not supported
but no problem trying other formats as long as they are supported
for lzma :
Code:
cd ramdisk
find|cpio -o -H newc|xz --format=lzma >../kernel.elf-new_ramdisk.lzma
cd ..
Fourth Post : repack kernel
1st : Requirements​
1) the files we unpacked from the kernel from first post (zImage, cmdline, we won't be needing the extracted cert).
2) the ramdisk folder we repacked from third post.
3) the original kernel.elf for injecting cert.
4) mkelf.py Sony's or Doomlord's
github.com/sonyxperiadev/device-sony-lt26/blob/master/tools/mkelf.py
github.com/DooMLoRD/build_tools/blob/master/bin/mkelf.py
2nd : procedure​
now we gonna repack kernel.elf (without cert yet).
Code:
mkelf.py -o kernel.elf-new [email protected] [email protected],ramdisk [email protected]
now comes the tricky part.
Code:
printf "\x04"|dd of=kernel.elf-new bs=1 seek=44 count=1 conv=notrunc 2>/dev/null
dd if=kernel.elf of=kernel.elf-dumped_cert bs=1 skip=148 count=1106 2>/dev/null
cat kernel.elf-dumped_cert|dd of=kernel.elf-new bs=1 seek=148 count=1106 conv=notrunc 2>/dev/null
rm kernel.elf-dumped_cert
now you successfully repacked the kernel .
Hi, would this method work on the Xperia GO? Would I have to change the command line arguments in order for it to work for my Xperia GO?
Hukanawa said:
Hi, would this method work on the Xperia GO? Would I have to change the command line arguments in order for it to work for my Xperia GO?
Click to expand...
Click to collapse
It would be great if you linked me to the kernel you want to unpack/repack.
Should work for Xperia GO
I grabbed the kernel "in CM11 weekly 20 for Xperia GO by XperiaSTE Team", and found the kernel structure is similar to Xperia P/U.
So yeah this guide should work for Xperia GO.
I hope this was helpful.
Very nice and helpful guide.
Worked for ARM64 kernel.elf also.

How to get adb shell # on Samsung J3 Pro with Android 5.1.1?

I am trying below method to get adb sheel root , but seems it does not work, can anybody tell me whether this method is working on Samsung device with Android 5.1.1 or not?
- Unlock bootloader , using 'Rom Service', after done, I can see, on the Download mode, the 'CROM service' is 'UnLock'
- Turn on the USB debugging in the Developer options
- Download the stock device image from internet
- unzipped the stock image, obtain the boot.img file
- extract the boot.img content by below command
$mkdir boot
$cd boot
$abootimg -x /tmp/boot.img
- extract the initrd.img to get the ramdisk files
$mkdir initrd
$cd initrd
$cat ../initrd.img | gunzip | cpio -vid
- then edit the default.prop file, to change the ro.secure=1 to ro.secure=0
- recreate the ramdisk image by
$cd initrd
$find . | cpio --create --format='newc' | gzip > ../myinitrd
- repack the boot.img by
$abootimg --create myboot.img -f bootimg.cfg -k zImage -r myinitrd.img
- convert the boot img file to tar with md5
$tar -H ustar -c myboot.img > myboot.tar
$md5sum -t myboot.tar >> myboot.tar
- boot device to Downloading mode (Home + power + Volume down), try to use the Odin to flash the modified boot image to my Samsung J3Pro, but FAILED!
the error message in Odin is: Complete(Write) operation failed
on the device, error is 'Unsupport dev_type'
I suspect Samsung has done sth in the bootloader to block this flash....
Can anybody tell me anthing wrong?

[S905] WeTek Hub Boot Image Modification

I recently got my hands on a WeTek Hub. All round quite a nice little box, but the default lowmemorykiller settings are a little annoying, and sometimes result in the boot failing because the kernel decided to kill one of the startup processes. I'm trying to modify the settings in the init.rc, but I'm having a spot of trouble with a boot loop after repacking the boot image.
I copied the image off the device by using dd to extract the partition to a file, and then used the built-in FTP server to copy it off the device, and extracted it using unmkbootimg. after unzipping, extracting, modifying, and re-packing, I used mkbootimg to recreate the image, and dd'd it back onto the box (commands below).
Code:
dd if=/dev/block/boot of=/sdcard/boot.img
Code:
./unmkbootimg boot.img
mv initrd.img{,.gz}
gunzip initrd.img.gz
mkdir initrd
cp initrd.img initrd
cd initrd
cpio -i < initrd.img
rm initrd.img
# change stuff here
find . | cpio -o -H newc > ../initrd.cpio
cd ..
gzip initrd.cpio
./mkbootimg --kernel kernel.gz --ramdisk initrd.img.gz -o new_boot.img
Code:
dd if=/sdcard/new_boot.img of=/dev/block/boot
Unfortunately, that left me with a flashing WeTek logo as the it continuously rebooted. examining the logs from u-boot didn't give anything useful, but luckily I was able to get it into recovery and flash Ricardo's Android TV ROM back on there. Unfortunately, I'm still stuck with the original boot failure issue. Any clues as to what I've missed?
I do so
Code:
cd boot
../mkboot boot.img unpaсk
cd unpack/ramdisk
find . | cpio -o -H newc | gzip > ../ramdisk.packed
[I][B]# (edit size ramdisk in /boot/unpack/img_info file)[/B][/I]
cd ../..
../mkboot unpack boot.img
all is working

Categories

Resources