[LOGO][GUIDE] Custom bootloader logo using nandroid - Milestone XT720 Themes and Apps

Burried in the Motorola getsatisfaction discussion about the lack of official froyo for the XT720, is a request that the bootloader logo be changed to incorporate Calvin. That seems within my artistic grasp. This replaces the M logo at boot (i.e. before the bootanimation).
Extract calvin.zip and copy the files to your sdcard as /sdcard/nandroid/openrecovery/calvin/logo.img and /sdcard/nandroid/openrecovery/calvin/logo.md5
Reboot into OpenRecovery
Select Nandroid > Restore > calvin > Restore All
Reboot
Instructions for creating boot logos based on:
http://androidforums.com/droid-all-...eplace-motorola-boot-logo-your-own-image.html Note that the XT720 logo.img are larger, but the resolution and bit depths are the same (480x182, 24bpp).
If you're on Linux, here's a script that extracts logo.bmp from logo.img (uses ImageMagick). The script handles flipping the image for you.
Code:
#!/bin/bash
convert -size 480x182 xc:black logo.bmp
dd of=tmp.bmp if=logo.bmp bs=1 count=54
dd of=tmp.bmp if=logo.img bs=1 count=262080 conv=notrunc oflag=append
convert -flip tmp.bmp logo.bmp
rm tmp.bmp
and here's a script that updates logo.img from logo.bmp (logo.bmp must be 24bit color). The script handles reflipping the image for you.
Code:
#!/bin/bash
convert -flip logo.bmp tmp.bmp
dd of=logo.img if=tmp.bmp bs=1 skip=54 count=262080 conv=notrunc
md5sum logo.img > logo.md5
rm tmp.bmp

nicely done M. nicely done
edit: not working for me. M logo is not changed

c19932 said:
edit: not working for me. M logo is not changed
Click to expand...
Click to collapse
I think the install instructions were probably unclear. I've edited the top post to clarify the install procedure. Let me know if that helps.

ahhh thank you for the clarification. silly me didn't even bother to see what's inside the zip file
thanks again for sharing. If you know more cool stuffs please continue to share =)

nice one
psssst....

how can I change my image to logo
I'm using Defy+ and Windows 7

tnx
tnx man i need this.

Related

[HOW TO] Create an update.zip file - via Pershoot

This is all via pershoot, I hope you don't mind me posting this, as it was buried in another thread and I figure this is great for the community and these steps have never been put all in one place before.
Again, this is not my knowledge, but pershoot's.
This is assuming you're using Windows (XP/2000/2K3/Vista/7):
1. unpack this http://www.relentlessaddictions.com/Androidstuff/signing.zip to tools directory within your sdk folder.
2. run autosign.bat and go number by number
*****the creation of the image (and all related parts) are done in linux. steps 3-7
3. unpack this: http://android-dls.com/files/linux/split_bootimg.zip
4. take a boot.img from let's say, cyanogenmod rom
5. ./split_bootimg.pl boot.img
6. If you would like to modify anything in the ramdisk:
mkdir my_ramdisk
cd my_ramdisk
gzip -dc ../boot.img-ramdisk.gz | cpio -i
To pack back together:
cd ..
mkbootfs ./ramdisk | gzip > my_ramdisk.gz
Note: you can find mkbootfs in AOSP: out/host/linux-x86/bin
7. use mkbootimg (found within AOSP: out/host/linux-x86/bin (assuming your using an x86 linux host)) to create a nexus image, contained of your zImage and a ramdisk:
mkbootimg --base 20000000 --cmdline 'no_console_suspend=1 console=null' --kernel arch/arm/boot/zImage --ramdisk boot.img-ramdisk.gz -o my_bootable_file.img
8. take one of pershoot's bootable recovery update.zips (http://droidbasement.com/db-blog/?p=161)
9. replace your my_bootable_file.img with the boot.img found within the .zip
10. replace your modules folder and wifi module in the modules folder
11. feel free to amend the update-script found within META-INF\com\google\android (you can use this as a reference: http://forum.xda-developers.com/showthread.php?t=641223
12. if you setup autosigning correctly, you can now right click the .zip -> sign.
Note: on windows 7, the right click gets damaged, so to speak, if you reassign the extension after autosigning, so just open up a command prompt and: java testsign my_recovery_update.zip
13. you're all done.
To sign updates in Linux:
Follow this: http://forum.xda-developers.com/showpost.php?p=4155081&postcount=1
-pershoot
*****For Ubuntu : the mkbootimg and mkbootfs executables are found here: http://www.sendspace.com/file/p9s80w for x86 only.
Sign Tool For Linux
I seem to be able to not finish reading the OP!
I'm confused... Why can't you finish the OP?
Thanks Mark (and pershoot) for posting this, will definitely come in handy. Now I can finally post my 1.8ghz kernel
jlevy73 said:
Thanks Mark (and pershoot) for posting this, will definitely come in handy. Now I can finally post my 1.8ghz kernel
Click to expand...
Click to collapse
That was a joke, I hope lol.. at least not in update.zip format..
Eclair~ said:
That was a joke, I hope lol.. at least not in update.zip format..
Click to expand...
Click to collapse
yeah, he meant his 8.1 ghz kernel...
rori~ said:
yeah, he meant his 8.1 ghz kernel...
Click to expand...
Click to collapse
Lmao....
(10 blah)
sry my bad english
can`t do "split_bootimg.pl boot.img" out from cmd console
i dont have perl or something installed.
What am I doing wrong?
thx
crazyknallchopf said:
sry my bad english
can`t do "split_bootimg.pl boot.img" out from cmd console
i dont have perl or something installed.
What am I doing wrong?
thx
Click to expand...
Click to collapse
./split_bootimg.pl boot.img (which is implied if it is not in your path)
mark, please update the OP with ./
updated the OP to include your changes pershoot:
"./split_bootimg.pl boot.img"
sorry i don`t understand what you mean with "OP"
crazyknallchopf said:
sorry i don`t understand what you mean with "OP"
Click to expand...
Click to collapse
OP = original post (the 1st one on top of a thread)
pershoot said:
OP = original post (the 1st one on top of a thread)
Click to expand...
Click to collapse
oke thx...
in CMD i do cd to my sdk directory where my .pl and .bin files are placed,
then i type "./split_bootimg.pl boot.img" (without quotes) it does not work...
no command are found
crazyknallchopf said:
oke thx...
in CMD i do cd to my sdk directory where my .pl and .bin files are placed,
then i type "./split_bootimg.pl boot.img" (without quotes) it does not work...
no command are found
Click to expand...
Click to collapse
you put the boot.img in the same directory as the unpacked split_bootimg.pl then run a ./split_bootimg.pl boot.img
you should not be using your sdk directory as a work/scrap area, as things may get messy in there.
use something like /var/tmp/FOLDER or ~/FOLDER
EDIT: the quick brown fox jumps over a lazy dog
pershoot said:
you put the boot.img in the same directory as the unpacked split_bootimg.pl then run a ./split_bootimg.pl boot.img
you should not be using your sdk directory as a work/scrap area, as things may get messy in there.
use something like /var/tmp/FOLDER or ~/FOLDER
Click to expand...
Click to collapse
thx pershoot
i dont know what im doing wrong
it wont work
i uploadet a pic :
http://yfrog.com/2gimgoincrazyp
crazyknallchopf said:
thx pershoot
i dont know what im doing wrong
it wont work
i uploadet a pic :
http://yfrog.com/2gimgoincrazyp
Click to expand...
Click to collapse
i was afraid you were doing that. the creation of the image (and all related parts) are done in linux.
mark, might want to update the OP with that tidbit, for the linux pieces.
pershoot said:
i was afraid you were doing that. the creation of the image (and all related parts) are done in linux.
mark, might want to update the OP with that tidbit, for the linux pieces.
Click to expand...
Click to collapse
steps 3-7
.......
edited: here is the mkbootimg executable that works on ubuntu 9.10.
use at your own risk.
This was the only part that I was unable to do on a stock ubuntu install.
Was following this: http://android-dls.com/wiki/index.php?title=HOWTO:_Unpack,_Edit,_and_Re-Pack_Boot_Images
britoso said:
Can someone upload the mkbootimg and mkbootfs executables please.
I'm on ubuntu 9.1.
Seems like a lot of work to build just this little tool.
thanks.
Click to expand...
Click to collapse
http://www.sendspace.com/file/p9s80w
for x86 only.

[Q] How to create/install a custom Splash Screen?

Hi there, yes I know, there are some threads about this, but nothing special about our HTC LEGEND...
Somebody tried to install a custom splash-screen?
Or somebody created a custom-splash screen for HTC Legend?
I´ve found a tool for G1, that creates a splash-screen, but I don´t know if it works on my Legend... Don´t wanna brick it
TheGrammarFreak created one from my bootanimation, see HERE
As for myself I have no idea howto
Get the image you want. It needs to be 320 pixels wide and 480 high. Save it out as a 24 bit bmp file called splash1 (ms paint does the job). Any name will do, but for the sake of this guide we'll use that.
Download this tool and extract it into a known directory. Put the bmp you created earlier in there. Open cmd (if you're on windows) and cd into that directory (cd C:\nbimg for example) then run this command:
Code:
nbimg -F splash1.bmp -w 320 -h 480
Take the output file and change the extension to .img
To install:
Reboot your phone to fastboot mode
Code:
fastboot flash splash1 C:\nbimg\splash1.img
Yeah guys, u r cool!
For all other, who need the Converter, here's it:
http://forum.xda-developers.com/showpost.php?p=2366042&postcount=1
Thank u sooo much!
Crap, I forgot to link. Sorry mate, but you found it anyway
This one is better!
WARNING: Your input image shoud be 320 * 480 pixels!!!
All credits goes to: DeToX-cz
Forum thread: http://forum.xda-developers.com/showthread.php?t=537515
ogo2 said:
This one is better!
WARNING: Your input image shoud be 320 * 480 pixels!!!
Click to expand...
Click to collapse
Why is it better?
TheGrammarFreak said:
Why is it better?
Click to expand...
Click to collapse
It's easy to use, it has nice GUI, no cmd line...
ogo2 said:
It's easy to use, it has nice GUI, no cmd line...
Click to expand...
Click to collapse
Oh, boring then.
A tool without command line functionality doesn't deserve to be called a tool
Sent from my HTC Legend
Ha! I win, I have the almighty BlaY0 on my side
Linux users…
For those of you who use Linux:
1.: Download View attachment splash1script.zip, and extract it somewhere convenient.
2.: Create an image in GIMP with the dimensions 320x480. (You may also use an image from the web, and resize it to 320x480 in GIMP.)
3.: In GIMP go to "Save As…" (or press "CTRL+SHIFT+s").
4.: Browse to where you extracted the script.
5.: Click "Select File Type (By Extension)".
6.: Scroll down and select "Windows BMP image".
7:: Name the file "splash1" (without ""), for your own convenience.
8.: Click "Advanced Options".
9.: Choose "24 Bits" - "R8 G8 B8".
10.: Click "Save".
11.: Open a "Terminal" (Either with "Applications>Accessories>Terminal" or with "CTRL+ALT+t").
12.: "cd" to the folder where you extracted the script and saved your image. (For example: "cd ~/Downloads".)
13.: Write "./splash1script splash1.bmp".
14.: Follow the instructions in "Terminal".
15.: Done.
-Torkiliuz
It's show the "Device not allowed" when I flash the splash1. I chenck the /proc/mtd, There is no partition of splash1. How can I flash it?
Do u have S-OFF from alpharev installed?
If not, u can´t install it...sorry
I can't get it to flash - it isn't finding my device when it's in fastboot, only when it's in recovery mode, or just on.
I've flashed AlphaRev and it created the .raw65 image successfully, but my device isn't recognised by the script, nor by the adb, when it's in fastboot mode.
Even booting into recovery, starting an adb shell, and using 'reboot bootloader' just disconnects the device. I have no idea how to fix it.
I'm using the linux tool on Ubuntu btw, and I've definitely flashed to the bootloader before (can't remember what, though)
TheGrammarFreak said:
Get the image you want. It needs to be 320 pixels wide and 480 high. Save it out as a 24 bit bmp file called splash1 (ms paint does the job). Any name will do, but for the sake of this guide we'll use that.
Download this tool and extract it into a known directory. Put the bmp you created earlier in there. Open cmd (if you're on windows) and cd into that directory (cd C:\nbimg for example) then run this command:
Code:
nbimg -F splash1.bmp -w 320 -h 480
Take the output file and change the extension to .img
To install:
Reboot your phone to fastboot mode
Code:
fastboot flash splash1 C:\nbimg\splash1.img
Click to expand...
Click to collapse
Hi TheGrammarFreak
I tried the fastboot command on my HTC Legend with HBOOT HTC dev unlocked recently, but I just get this:
Code:
C:\Program Files\Android\android-sdk\platform-tools>fastboot flash splash1 splash1.img
sending 'splash1' (300 KB)...
OKAY [ 0.126s]
writing 'splash1'...
(bootloader) signature checking...
FAILED (remote: signature verify fail)
finished. total time: 0.239s
Any suggestions?
didn't work for me either - probably the htcdev unlock didn't include s-off for splash1?!
The HTC bootloader unlcock method sucks. It allows nothing except writing direcrly to the system. It even checks for signatures when using fastboot from the Android SDK. At least I get signature error when trying to flash a .img file thru fastboot.

[TOOL] Easy One Click Splash Converter and Flasher-Kpkimmel-Gerbil

Hello folks, made this for myself and decided to share it.
-download the file HERE
-extract anywhere, doesn't matter because adb and fastboot files are included
-place your .bmp image in the extracted folder and rename it to splash.bmp (not splash.bmp.bmp)
-click the clickhere.bat, then click return (or any button to continue) when it says and it will do its thing. That simple. Thanks
-if you have a jpg or other nefarious file formats and need to convert to bmp just download GIMP, its free and open your image, then save as, chose extension .bmp and save.
-This will automatically resize the image to what it needs to be, but if you want to preview what it will look like, open your image in microsoft paint, chose resize, then click pixels, then uncheck box that says "maintain aspect ratio", then in box one chose 540, then box two input 960, then done and that is exaclty what your splash screen will look like.
Troubleshooting**********
If you get "permission denied" when flashing you need to download this file here, rename it to PG86IMG.ZIP (NOT PG86IMG.ZIP.ZIP), put on root of your sdcard, reboot into bootloader and flash. Its an engineering hboot for extended flashboot commands. After flashing reboot phone and try the above process again and it will work. Thanks.
Thanx! This will come in handy.
A tool to always keep on standby
Thank You.. fantastic tool!
is there a specific size that the img needs to be under
Mrdiaz09 said:
is there a specific size that the img needs to be under
Click to expand...
Click to collapse
easiest way is to open the pic in paint, resize to 640*960 and see how it looks, because that is exaclty how it will look on your phone...regardless this app will reside the pic to phone...
Is this for up and down animations/splash screens?
johnsonjs said:
Is this for up and down animations/splash screens?
Click to expand...
Click to collapse
its not, its for the screen you first see when you boot up your phone, called the splash screen. (the one that says "HTC") all white....yeah replaces that one...
Youre gonna want 540x960 and a 24bit BMP
kellyrx8 said:
Youre gonna want 540x960 and a 24bit BMP
Click to expand...
Click to collapse
This app will automatically resize the image to the evo screen. No worries about the image..
I'm no android dev but I have some batch skills. I took the liberty of making some modifications to your bat file to make it a bit cleaner as well as do some basic error checking (making sure the .bmp file exists and making sure the converted file is created)... hope you don't mind. I've pasted the modified code below
@echo off
dir /b %~dp0 | findstr /i /x splash.bmp
if %errorlevel% neq 0 goto nobmp
nbimg -F splash.bmp -w 540 -h 960
echo.
rename splash.bmp.nb splash.img
REM check to assure file converted properly
dir /b %~dp0 | findstr /i /x splash.img
if %errorlevel% neq 0 goto convertfail
REM wait 5 Seconds for conversion
ping 10.10.10.10 -n 1 -w 5000 >nul
adb reboot bootloader
cls
echo when in bootloader, press any key to continue
pause >nul
fastboot devices
echo if your device is listed hit enter
pause >nul
fastboot flash splash1 splash.img
fastboot reboot
exit
:nobmp
cls
color 4f
Echo splash.bmp file not found. Please assure file is in place and named properly then try again.
Pause
Exit
:convertfail
cls
color 4f
Echo Your image was not properly converted, please try again
pause
Exit
kpkimmel said:
This app will automatically resize the image to the evo screen. No worries about the image..
Click to expand...
Click to collapse
trust me, just resizing the image looks like crap(squished or stretched)....if you do it before hand it works a ton better and looks a lot nicer....
32-bit BMPs don't tend to work well with nbimg
I have been making these left and right, believe me resize before or crop down to the part of the image you want and then use nbimg to finish up.
I keep getting distorted images. I resized and saved as 24-bit bmg. Any suggestions
Sent from my PG86100 using XDA App
Mrdiaz09 said:
I keep getting distorted images. I resized and saved as 24-bit bmg. Any suggestions
Sent from my PG86100 using XDA App
Click to expand...
Click to collapse
Simply converting an image to fit specifications if you don't have a high res source to begin with won't work well..

How to bump yourself stock kernel, modify ramdisk to add init.d + SELinux permissive

Hello,
I spent a lot of time searching and finding the material to understand and reproduce process about bump!.
After a few times shared the results of my manipulations on stock kernel, which I applied the method I'll describe here, I will try now to explain how you can make for yourself an identical result.
If you are still wondering what is Bump! I can only invite you to look for yourself, and even give you the link where I tried to answer this question on the section of the G2.
The purpose of this topic is to get you to bump kernel, from a PC, Linux, or Windows, or even from the phone.
I'll try to explain as why certain steps are essential to ensure a good result, steps that, at first, did not seem obvious.
When you will try it, and will want to test the result, make sure nice to have taken the necessary precautions before: Make a backup of your current kernel foremost flashing.
Now, you know what is BUMP! and why kernel must be bumped. Bump! basically involves injecting a signature in a file (boot).
This injection of the signature to be made in hexadecimal format, and immediately after the last used page of the kernel, we have to remove unnecessary bytes before doing so, and unpack/repack kernel is the easiest way to do so (http://forum.xda-developers.com/showpost.php?p=60086231&postcount=42). To do that, we need two binaries (unpackbootimg and mkbootimg).
About these two binaries, we can compile them ourselves from source, or taking already compiled bins.
@osm0sis made and share a super tool containing all that we need, these compiled bins, in his Android Image Kitchen - Unpack/Repack Kernel Ramdisk [Win/Android/Linux].
So i propose to use it here. The big advantage to this, is that @osm0sis compiled for windows, linux, and phone (arm). He created scripts that automate unpack and repack too.
The purpose of this topic is not to learn how to get the kernel file (boot), I assume that this prerequisite is acquired. However, I give you some hints for beginners, you can take a look at KDZ and TOT Extractor from @bullghost or the dd command to achieve.
1) Simply Bump a stock kernel in Linux (no change in ramdisk) to obtain a bumped working untouched stock kernel
Download the linux version of Android Image Kitchen - Unpack/Repack Kernel Ramdisk [Win/Android/Linux] ( AIK-Linux-v1.9.1-ALL.tar.gz), and untar it somewhere. Create, in the root directory of AIK, one file named "one_shot_bump.sh" (or the name that you like) containing this code I gave in osm0sis AIK thread (or, if you prefer, you can take the file named "linux_one_shot_bump_only.tar.gz" in attached files here), and chmod it 755.
Now you can use it by opening a terminal and drag and drop this file inside following by drag and drop kernel file too. Press enter, it's done You'll find a file named bumped.img, in AIK root directory, wich is your bumped kernel.
Note: bash for this script is very important for an expected result for printf cmd. It doesn't work as expected with sh.
2) Simply Bump a stock kernel in Windows (no change in ramdisk) to obtain a bumped working untouched stock kernel
I've not made a one click script to bump on this OS, but I'll explain very simply how to get there using the scripts offered natively in the osm0sis tools . This fair will be in three stages, for the reasons discussed in the preamble:
1) unpack the kernel
2) repack the kernel
3) inject hexa signature (bump!)
So to begin, download the windows version of Android Image Kitchen - Unpack/Repack Kernel Ramdisk [Win/Android/Linux] (Android.Image.Kitchen.v2.3-Win32.zip).
Unzip it where you want. Open a dos prompt and drag and drop unpackimg.bat on the prompt windows, tape one spaces in the command and drag and drop your kernel file in the prompt windows. Tape on enter: You made the first step, your kernel is unpacked.
Don't close window prompt, tape one touch to continue, as the prompt invite you to do.
Now, just drag and drop repackimg.bat in the prompt windows, and tape on enter. Done, you just finished the second step, you've repacked the kernel (image-new.img on the root folder of AIK).
Now, for doing the step 3, you need to inject the signature. I have not found other solutions at the moment than to use a hex editor to do this. I tried with a shareware (Hex Editor) and also with a freeware (HxD) with succes for these two softwares. With Hex Editor, after opening image-new.img, click on the first free byte at the end of the file and copy paste there "41A9E467744D1D1BA429F2ECEA655279" (without double quote). Save the file.
Or with HxD, after opening image-new.img, click at the end of the file, just after the last used byte, and in the menu"edition", choose "insert bytes". On the dialog box, type 10 on the first field (amount), let "hex" checked, and paste in the second field the value "41A9E467744D1D1BA429F2ECEA655279" (without double quote). Save the file.
Done, you just finished bumping your kernel in windows
I can give later screenshot if needed/asked.
Edit: i've found a workaround for using @osmosis tool to sign (bump) kernel just after repacking. Details can be found here: http://forum.xda-developers.com/showthread.php?p=63884919#post63884919
Edit2: After talking with @osmosis, the best solution for signing (bump) the kernel just after repacking should be to use cygwin printf.exe (I've attached this file to this post), that can be added in aik/bin folder (the real name of this folder is android_win_tools and it can be found in the root of AIK tool). So we just need to put printf.exe in android_win_tools folder, and replace this code in repackimg.bat
Code:
%bin%\mkbootimg --kernel "split_img/%kernel%" %ramdisk% %second% --cmdline "%cmdline%" --board "%board%" --base %base% --pagesize %pagesize% --kernel_offset %kerneloff% --ramdisk_offset %ramdiskoff% %second_offset% --tags_offset %tagsoff% %dtb% -o image-new.img %errout%
by
Code:
%bin%\mkbootimg --kernel "split_img/%kernel%" %ramdisk% %second% --cmdline "%cmdline%" --board "%board%" --base %base% --pagesize %pagesize% --kernel_offset %kerneloff% --ramdisk_offset %ramdiskoff% %second_offset% --tags_offset %tagsoff% %dtb% -o image-new.img %errout%
%bin%\printf \x41\xA9\xE4\x67\x74\x4D\x1D\x1B\xA4\x29\xF2\xEC\xEA\x65\x52\x79 >> image-new.img
As you can see, just one new line was inserted for injecting the signature.
3) Simply Bump a stock kernel in Phone (no change in ramdisk) to obtain a bumped working untouched stock kernel
I will not reinvent the wheel, you can use an existing tool for some time, made by @somboons, which uses the technique I mentioned here (unpack the kernel, repack it and injection of signing , all in the phone).
This script is an adaptation of Live bump by @Skin1980 that uses the arm versions of unpackbootimg and mkbootimg.
You will find the instructions and the tool here:
http://forum.xda-developers.com/lg-g2/development/tools-bump-kernel-offline-t3073261
---​
Credits and thank's a lot:
codefire team for bump!:
@thecubed , @Shelnutt2 , @IllegalArgument , @autoprime , @AnimatronicRocketReptile , @Dees_Troy
@Skin1980 for his live bump and these explanations
@osm0sis for his Android Image Kitchen - Unpack/Repack Kernel Ramdisk [Win/Android/Linux]
@zequav for explain me at the beginning what happen with bump and what can be done on linux
How to add init.d support and SELinux permissive on the Ramdisk​
Here, i explain how to implement in Ramdisk init.d and SELinux permissive.
We start from untouched kernel not bumped (so not from the kernel we eventually have bumped with the previous post).
Use @osmosis tool android image kitchen version for your system to unpack it.
After that, navigate to the AIK root folder and:
in split_img/boot.bin-cmdline, replace
Code:
console=ttyHSL0,115200,n8 user_debug=31 ehci-hcd.park=3 msm_rtb.filter=0x37 androidboot.hardware=g3
by
Code:
console=ttyHSL0,115200,n8 user_debug=31 ehci-hcd.park=3 msm_rtb.filter=0x37 androidboot.hardware=g3 androidboot.selinux=permissive
in ramdisk/init.qcom.rc replace
Code:
on property:sys.boot_completed=1
start qcom-post-boot
by
Code:
service sysinit /sbin/sysinit.sh
oneshot
class late_start
user root
group root
disabled
on property:sys.boot_completed=1
start qcom-post-boot
start sysinit
and on /sbin folder, add a file named "sysinit.sh" that contains this code:
Code:
#!/system/bin/sh
mount -o rw,remount /system
if [ ! -e /system/etc/init.d ]; then
mkdir /system/etc/init.d
chown -R root.root /system/etc/init.d
chmod -R 755 /system/etc/init.d
fi;
mount -o ro,remount /system
run-parts /system/etc/init.d/
/system/xbin/daemonsu --auto-daemon &
Note: This previous code on sysinit.sh is only for those who have run-parts installed (with busybox by example). Otherwise, for those who don't want to use run-parts, you can put the next one that don't need it:
Code:
#!/system/bin/sh
mount -o rw,remount /system
if [ ! -e /system/etc/init.d ]; then
mkdir /system/etc/init.d
chown -R root.root /system/etc/init.d
chmod -R 755 /system/etc/init.d
fi;
mount -o ro,remount /system
setenforce 0
FILES=/system/etc/init.d/*
for f in $FILES
do
$f
done
/system/xbin/daemonsu --auto-daemon &
Now you are ready to repack the kernel. Use AIK repackimg script for that. After repacking the kernel, you still have to sign it (Bump!).
For this last formality depending on the OS which you find yourself:
1) On Linux
put a file that you name as you want with sh ext(bump.sh should be a great idea ) on the AIK root folder, and chmod it 755.
On this file put the code above:
Code:
#!/bin/bash
printf '\x41\xA9\xE4\x67\x74\x4D\x1D\x1B\xA4\x29\xF2\xEC\xEA\x65\x52\x79' >> image-new.img
Save it, and now just drag and drop this file on a window terminal and valid. That's all
2) On Windows
Refer to the OP, i explained there how I bump on windows
3) On Phone
Refer to the OP, i explained there how I bump on the phone
Wow great, waiting for chapter 2
reserved
u25150 said:
Wow great, waiting for chapter 2
Click to expand...
Click to collapse
I feel that few people seem really passionate about what I say, if I refer to the answers
Also I'm going to focus on those who, like you, arise, and seem interested in this subject.
What specifically would you like to see some detail (what do you call "chapter two" ) ?
Duckscreen said:
reserved
Click to expand...
Click to collapse
Welcome, pleased to meet you
@6ril1 great work my freind
jac10000 said:
@6ril1 great work my freind
Click to expand...
Click to collapse
Hi my friend (not my freind, which is an advantage of German expression, ) , thank's, I assume that it is better to teach to fish than give fish, but perhaps this concept is it outdated ?
Could you making how to kexec hardboot patch Guide please
(for support Multirom)
Really nice work my friend !!!
In Linux, I just make my first bump boot thanks to you :good:
jac10000 said:
Really nice work my friend !!!
In Linux, I just make my first bump boot thanks to you :good:
Click to expand...
Click to collapse
You are welcome
And great thank's for having notify me my mistake about code i wrote in post 2 (class late_sart instead of class late_start )
Code is edited and correct now
Yeaah @6ril1 and my first bump boot with SELinux permissive
jac10000 said:
Yeaah @6ril1 and my first bump boot with SELinux permissive
Click to expand...
Click to collapse
LOL, thank's to have testing all of that i described in this thread, and for having mentioning me in private some others mistakes (unexpected one space inserted during copy-paste on the post 2 and one code tag not closed) . I have edited again with all that you find and now it should be correct
THANK'S again my friend
For windows user, new stuff added, i'll edit op with that too:
http://forum.xda-developers.com/showpost.php?p=63884919&postcount=716
Edit2: One more simple solution just added in OP
I have new-img but how do you use hex editor exactly? i can not figure it out. can u help with screenshots please?
I tried your tutorial (windows x64)(only bump no change in ramdisk) for 30c MM kernel but my phone wont boot(i don't have security error). Any ideas? Thank you!

[GUIDE] Make a kernel for G531F variant

So, I'm doing this tutorial due to the trial and error I got.
Prerequisites:
Ubuntu or any linux-based os with the right packages installed
Source code from the kernel
Backup of you boot partition
These tools here
Patience
1) The first thing you want to do is to do a backup of your boot partition.
Code:
adb shell
dd if=/dev/block/mmcblk0p9 of=/sdcard/boot.img
2) Download the source code from here, extract it and place it somewhere. I placed it in /home/fabio/Documentos/Kernel/sourcecode
3) Download a toolchain, I downloaded "aarch64-linux-android-4.8" from google and placed in "/home/<your username>/Documentos/Kernel/aarch64-linux-android-4.8"
4) Go to your kernel source code and find the file "Makefile", open it and change CROSS_COMPILE= to say the place where you stored the toolchain "/home/<your username>/Documentos/Kernel/aarch64-linux-android-4.8" + "/bin/aarch64-linux-android-"
5) Now that you are done setting up the stuff, open a console and navigate to your kernel source code root and type
Code:
make
make pxa1908_grandprimevelte_eur_defconfig
make -j#
# is the number of cores + 1
6) While that runs, go to where you stored those mkbootimg tools and unpack that boot.img you backed up
7) Once the kernel building is complete. Go to your kernel folder and navigate to arch/arm64/boot and copy the file "Image.gz"
8) Download bless or an Hex Editor of your liking and open the following files: boot.img (the original boot), Image.gz, boot.img-zImage.
Search on the "boot.img-zImage" for 1F 8B 08 and copy everything before then on your Image.gz place what you copied and save it as a different file otherwise it will fail to save.
9) Go to your mkbootimg folder and where you stored the unpacked files and build one boot.img with the following command
Code:
./mkbootimg --kernel image2.gz --ramdisk boot.img-ramdisk.gz --dt boot.img-dt --signature boot.img-signature -o boot2.img
10) Flash the boot2.img using any software you want!
THIS MIGHT NOT WORK! If it doesn't you can send me a DM! I will be retouching this post again and make it prettier adding pictures and stuff but for now I can't do much!
If you know a better way of doing this please say in the replies! I will be building a kernel for this device soon enough
RESERVED
Can you please upload link of custom kernel
I'm still trying to do a kernel with new features, but don't know what to add yet. Trying to make Init.d support without 3rd party apps!
EDIT1: I give up! My phone is too much trouble and since SAMSUNG doesn't care about it neither do I anymore! Try to build the kernel yourself and tweak it as you like! Make a script to automate this process to be easier! Good luck! Anything you need just say
Can you help this guy for porting kernel source code http://forum.xda-developers.com/grand-prime/general/developers-discussion-sm-g531f-custom-t3444598
fabiossilva21 said:
So, I'm doing this tutorial due to the trial and error I got.
Prerequisites:
Ubuntu or any linux-based os with the right packages installed
Source code from the kernel
Backup of you boot partition
Degas mkbootimg tools
Patience
1) The first thing you want to do is to do a backup of your boot partition.
Code:
adb shell
dd if=/dev/block/mmcblk0p9 of=/sdcard/boot.img
2) Download the source code from here, extract it and place it somewhere. I placed it in /home/fabio/Documentos/Kernel/sourcecode
3) Download a toolchain, I downloaded "aarch64-linux-android-4.8" from google and placed in "/home/fabio/Documentos/Kernel/aarch64-linux-android-4.8"
4) Go to your kernel source code and find the file "Makefile", open it and change CROSS_COMPILE= to say the place where you stored the toolchain "/home/fabio/Documentos/Kernel/aarch64-linux-android-4.8" + "/bin/aarch64-linux-android-"
5) Now that you are done setting up the stuff, open a console and navigate to your kernel source code root and type
Code:
make
make pxa1908_grandprimevelte_eur_defconfig
make -j#
# is the number of cores + 1
6) While that runs, go to where you stored degas-mkbootimg tools and unpack that boot.img you backed up
7) Once the kernel building is complete. Go to your kernel folder and navigate to arch/arm64/boot and copy the file "Image.gz"
8) Download bless (Hex Edit) and open the following files: boot.img (the original boot), Image.gz, boot.img-zImage.
Search on the "boot.img-zImage" for 1F 8B 08 and copy everything before then on your Image.gz place what you copied and save it as a different file otherwise it will fail to save.
9) Go to your degas-mkbootimg folder and where you stored the unpacked files and build one boot.img with the following command
Code:
./degas-mkbootimg --kernel image2.gz --ramdisk boot.img-ramdisk.gz --dt boot.img-dt --signature boot.img-signature -o boot2.img
10) Flash the boot2.img using any software you want!
THIS MIGHT NOT WORK! If it doesn't you can send me a DM! I will be retouching this post again and make it prettier adding pictures and stuff but for now I can't do much!
If you know a better way of doing this please say in the replies! I will be building a kernel for this device soon enough
Click to expand...
Click to collapse
i follow this step and build kernel after flash boot.img phone not booting
my boot.img size is 8.2MB (image.gz size 6.5MB) where stock size is 8MB
is problem with size?
sorry for my bad english
How did you flash the boot.img?
fabiossilva21 said:
How did you flash the boot.img?
Click to expand...
Click to collapse
using odin
What changes did you make to the kernel?
fabiossilva21 said:
What changes did you make to the kernel?
Click to expand...
Click to collapse
Add governors
Other setting same as stock
If i build with stock setting without any changes then kernel boot but if i change something then its stuck on Samsung logo
Sorry, I can't really help you... I no longer work with Grand prime... switched to a J5
fabiossilva21 said:
Sorry, I can't really help you... I no longer work with Grand prime... switched to a J5
Click to expand...
Click to collapse
Ok
Noice

Categories

Resources