custom boot.img not working for Zenfone 3 Zoom (ZE553KL) - Asus ZenFone 3 Zoom Questions & Answers

Hey guys.
I need some help... I've downloaded the firmware images and the source files for building the kernel from the Asus.com support section for Zenfone 3 Zoom and I've built a new image going through the steps:
export CROSS_COMPILE=.../kernel/android-ndk-r16b/toolchains/aarch64-linux-android-4.9/prebuilt/linux-x86_64/bin/aarch64-linux-android-
export ARCH=arm64
export SUBARCH=arm64
and fixing some include dependencies that couldn't be found (#include <> to include "" etc...). I then build the config with
make ZE553KL-Hades_defconfig then make menuconfig just to tick support to my wifi otg adapter model.
I was able to build Image, Image.gz and Image.gz-dtb from that. Afterwards I used a few of several free tools online to unpack the original boot.img that I downloaded from the support site and repack it with the ramdisk.cpio.gz and my kernel image (already tried using Image, Image.gz and Image.gz-dtb).
The problem is that when I either fastboot boot new.img or fastboot flash boot new.img the phone won't boot at all. It keeps going back to the bootloader selection screen.
If I use the downloaded boot.img instead it works fine so I don't know what I'm missing here.
Any help would be appreciated...

Related

[Q] How to flashboot A500 with my modified zImage?

Hi,
I've compiled a modified version of the 2.6.36.3 kernel (downloaded from the git repository) to include a USB Network Adapter driver (AX88772A) into a zImage. But I don't know how to flash the zImage onto my A500. When I run "fastboot flash zimage zImage" it always returns < waiting for device >. But I am able to run adb to pull and push files to the tablet.
How can I update the kernel so that it can detect my USB -> Ethernet adapter (chipset AX88772A)? Any ideas? Thanks!
You have to put it in the boot.img, then you can dd it or create a zip update, like custom roms!
You can ask for more info to a kernel guy like richardtrip or thor202ro!
Try to open one of their zip update to see how it works!
you should use android's mkbootimg
like
mkbootimg --ramdisk initrd.gz --kernel zImage -o boot.img
then you can dd it to boot partition (/dev/mmcblk0p2) and run itsmagic. And do not flash both p1 and p2 at the same time - if you flash two unbootable images or forget to update the checksum, you'll have to pm sc2k to recover the device via nvflash.
Moving to General.
PS: Every Q? thread should be posted in General.

TWRP 2.8.7 Recovery for including in Boot Image

This is TWRP 2.8.7, i.e. ramdisk-recovery..cpio built from source including the latest commit fixing failure to back to external SD. See here.: https://github.com/omnirom/android_bootable_recovery/commit/85161af11117431ff3a1d6b845e8faf35ef07b2c . I have also reduced annoyingly loud default vibration values...
This is not FOTA image, but rather a pre-built cpio ready to be included in your boot.img. It is built specifically for Xperia Z1 with all the appropriate flags.
Instructions:
1. Unzip the attached image, if you don't, you'll have a bootloop
2. Use Archi Kitchen to unpack your boot.img. Download from here: http://forum.xda-developers.com/showthread.php?t=2597220
3. Unpack kitchen, open terminal in that directory and do chmod a+x archi; then execute ./archi
4. Follow script directions and create a new project
5. Put your boot.img where the script tells you to
6. Execute ku to unpack kernel: you will have kernel directory in your project;
7. Go to /kernel/boot.img-ramdisk/sbin: you will see ramdisk-recovery.cpio file; just replace it with the attached one and execute kr to re-pack kernel.
8. You will have the new boot.img in project directory ready to be fastboot flashed.
9. If you touch anything else in unpacked kernel, your phone won't boot
10. From now and on, when you open archi kitchen, just pick (e) option for existing project and you can use any other boot.img to do the same.
optimumpro said:
This is TWRP 2.8.7, i.e. ramdisk-recovery..cpio built from source including the latest commit fixing failure to back to external SD. See here.: https://github.com/omnirom/android_bootable_recovery/commit/85161af11117431ff3a1d6b845e8faf35ef07b2c . I have also reduced annoyingly loud default vibration values...
This is not FOTA image, but rather a pre-built cpio ready to be included in your boot.img. It is built specifically for Xperia Z1 with all the appropriate flags.
Thanks. That is what I'm searching for for 2 days.
But it would be much better, if i could get totally rid of build in recovery.(TWRP will probabliy update.)
Click to expand...
Click to collapse
Click to expand...
Click to collapse

[Q] Kernel & boot.img; fails to boot properly

So I've been trying to compile a kernel for the 6P, with no luck making the device booting, so i'm looking for help here.
I've been looking for a guie specific for the Nexus 6P, but couldn't find any so i gathered what i could and knew from the past.
i'm using export ARCH=arm64 and export SUBARCH=arm64 along with the PATH and CROSS_COMPILE variables.
http://softwarebakery.com/building-the-android-kernel-on-linux
The link above is what i relied on for creating a boot.img
I have downloaded the kernel source, and the aarch64 toolchain 4.9 from google.
when the compilation is done i'll have Image, Image.gz & Image.gz-dtb in kernel_src/arch/arm64/boot/.
Then i'll use abootimg to create a boot.img using the guide posted above from the Image.gz-dtb & the stock mmb29m initrd.img & bootimg.cfg (with the bootsize= line deleted) and use fastboot boot testboot.img.
after the device downloads the boot.img it will boot in twrp instead.
Is there anything specific i'm missing or doing wrong?
Hi there! Did you resolve your problem? I had the same on HTC one m9 after compiling.

Building arm64 kernel for Galaxy S7 Edge (SM-G935F) question.

Hello,
First of all, im new to android modding and linux. I tried to build a kernel from stock G935FXXU1BPH6 source based on their readme file. My problem is, I don't have a zImage file after build that I could put into a flashable zip. I only have Image and Image.gz (I guess thats normal for arm64 kernels?) and I don't know how to make them flashable. I found a youtube video where the dude placed the Image file in a directory called "tools" in his flashable zip, I tried it and TWRP said I installed it successfully but when I start up my phone and check kernel version its still the previous one not mine.
Used this toolchain: aarch64-linux-android-4.9/bin/aarch64-linux-android-
I've set up CROSS_COMPILE path, then I set up configuration:
make ARCH=arm64 exynos8890-hero2lte_defconfig
make menuconfig (to tweak it a little bit more, like custom kernel version string so I can see if it worked)
Then I started build:
make ARCH=arm64
Output when build finished:
>>>>> Time used for generated all hashes is 6 sec
OBJCOPY arch/arm64/boot/Image
GZIP arch/arm64/boot/Image.gz
DTC arch/arm64/boot/dts/exynos8890-smdk8890.dtb
DTC arch/arm64/boot/dts/exynos8890-universal8890.dtb
Anyone knows how could I make it flashable? Thanks.
keezay said:
Hello,
First of all, im new to android modding and linux. I tried to build a kernel from stock G935FXXU1BPH6 source based on their readme file. My problem is, I don't have a zImage file after build that I could put into a flashable zip. I only have Image and Image.gz (I guess thats normal for arm64 kernels?) and I don't know how to make them flashable. I found a youtube video where the dude placed the Image file in a directory called "tools" in his flashable zip, I tried it and TWRP said I installed it successfully but when I start up my phone and check kernel version its still the previous one not mine.
Used this toolchain: aarch64-linux-android-4.9/bin/aarch64-linux-android-
I've set up CROSS_COMPILE path, then I set up configuration:
make ARCH=arm64 exynos8890-hero2lte_defconfig
make menuconfig (to tweak it a little bit more, like custom kernel version string so I can see if it worked)
Then I started build:
make ARCH=arm64
Output when build finished:
>>>>> Time used for generated all hashes is 6 sec
OBJCOPY arch/arm64/boot/Image
GZIP arch/arm64/boot/Image.gz
DTC arch/arm64/boot/dts/exynos8890-smdk8890.dtb
DTC arch/arm64/boot/dts/exynos8890-universal8890.dtb
Anyone knows how could I make it flashable? Thanks.
Click to expand...
Click to collapse
This particular chipset (64-bit Exynos) uses the uncompressed Image and a separate dtb.img file made from combining all the dtb revisions of your device codename and region into a DTBH format.
You can flash them using my LazyFlasher project.
See: https://github.com/jcadduono/lazyflasher
You will want to use the kernel-flasher branch. The kernel-flasher-samsung branch isn't fully ready and adds additional patch files to remove TIMA/Knox. I've yet to find out everything that needs to be changed from stock state to allow a bootable custom kernel without disabling encryption, unfortunately.
You can simply git clone it, then place your Image and optionally dtb.img in the root folder of the repository, then type "make" to build a TWRP flashable zip. They will be dynamically replaced in the current boot image on the device when the zip is flashed. You can check out the README.md for more info.
If you want to generate your own dtb.img to include in the installer, you can use a script I made from my universal8890 kernel sources on GitHub:
https://github.com/jcadduono/android_kernel_samsung_universal8890/blob/stock-6.0/dtbgen.sh
(correct the toolchain location for your build in the script)
It also requires the scripts/dtbTool folder (from the same git linked above) to be present in your repository. It's not the same as the Qualcomm dtbTool, and the sources are included (and fairly clean!) if you're interested in learning the Exynos dtb.img (DTBH) format.
./dtbgen.sh hero2lte xx
Now, there's still quite a bit that needs to be done to make the device actually boot successfully and be stable with a custom kernel. While the kernel is perfectly stable, the Samsung customized Android OS will absolutely freak out. That's a bit beyond me, and the reason I haven't really worked on any custom kernels for it myself.
Have fun!
jcadduono said:
This particular chipset (64-bit Exynos) uses the uncompressed Image and a separate dtb.img file made from combining all the dtb revisions of your device codename and region into a DTBH format.
You can flash them using my LazyFlasher project.
See: https://github.com/jcadduono/lazyflasher
You will want to use the kernel-flasher branch. The kernel-flasher-samsung branch isn't fully ready and adds additional patch files to remove TIMA/Knox. I've yet to find out everything that needs to be changed from stock state to allow a bootable custom kernel without disabling encryption, unfortunately.
You can simply git clone it, then place your Image and optionally dtb.img in the root folder of the repository, then type "make" to build a TWRP flashable zip. They will be dynamically replaced in the current boot image on the device when the zip is flashed. You can check out the README.md for more info.
If you want to generate your own dtb.img to include in the installer, you can use a script I made from my universal8890 kernel sources on GitHub:
https://github.com/jcadduono/android_kernel_samsung_universal8890/blob/stock-6.0/dtbgen.sh
(correct the toolchain location for your build in the script)
It also requires the scripts/dtbTool folder (from the same git linked above) to be present in your repository. It's not the same as the Qualcomm dtbTool, and the sources are included (and fairly clean!) if you're interested in learning the Exynos dtb.img (DTBH) format.
./dtbgen.sh hero2lte xx
Now, there's still quite a bit that needs to be done to make the device actually boot successfully and be stable with a custom kernel. While the kernel is perfectly stable, the Samsung customized Android OS will absolutely freak out. That's a bit beyond me, and the reason I haven't really worked on any custom kernels for it myself.
Have fun!
Click to expand...
Click to collapse
Thank you very much!
@jcadduono couldn't make the kernel boot after packing it with lazyflasher. I built a completely stock kernel from the mentioned source, pasted the "Image" (not the Image.gz) file in lazyflasher root and then used make command. Tried including "exynos8890-smdk8890.dtb" file as well. Same story. Not sure if I need anything else in the package or I made user mistake. Do you have any ideas how could I debug what makes it stuck on that screen?
Thanks!
EDIT: Solved Problem.
keezay said:
@jcadduono couldn't make the kernel boot after packing it with lazyflasher. I built a completely stock kernel from the mentioned source, pasted the "Image" (not the Image.gz) file in lazyflasher root and then used make command. Tried including "exynos8890-smdk8890.dtb" file as well. Same story. Not sure if I need anything else in the package or I made user mistake. Do you have any ideas how could I debug what makes it stuck on that screen?
Thanks!
EDIT: Solved Problem.
Click to expand...
Click to collapse
Can you help me set up an environment to build a kernel, arm64, for s7? I'm on Ubuntu having a heel of a time..
Galaxy S7 Edge Kernel Flashing Issues
I am currently trying to flash a different kernel into a galaxy s7 edge (SM-G935S).
I have gone as far as building a kernel and extracting a Image file from it, but every time I try flashing a boot.img with a replaced kernel image file, it seems to never work.
A mkbootimg tool that I am currently using requires a dtb file, but I cannot find where to get it from.
I have tried using @jcadduono's git code, but the dtb file created from it doesn't seem to work as well.
Can anyone tell me what I should do to flash a kernel successfully?
kernel panic after flashing
Hi @ll,
with this guide I was able to compile my own kernel and also flashing it to my phone. Unfortunatelly I'm getting kernel panic after rebooting the phone. is there any possibility to get the reason for this? Or do you have any hint, what I may have done wrong?
Thanks for your help.
Kind regards
v0ti

[Guide] Unpack Update.app in phone

So there's threads about how to unpack UPDATE.APP on windows/PC/OS X so i decided why not do it on android too, this apps requires some additional tools to be downloaded just as OS X/Windows and linux needs as well. but process is otherwise similar. this tutorial doesn't need root!
NOTE THIS TUTORIAL isn't fully working on OREO on Huawei devices, it has some issues and i haven't found a workaround for it yet!​
Needed apps
Termux https://play.google.com/store/apps/details?id=com.termux
Recommended apps
Hacker keyboard
Needed files
https://github.com/atarii/split_updata.pl/blob/master/splitupdate
@Atarii 's modification of splitupdate to manually enter the partitions you want to unpack
The desired FW you wan't to unpack
Unpack process:
Download Termux
Open termux and type
termux-setup-storage This will allow termux to access your /sdcard
pkg install perl (this will install perl which the update.app process is using) once asked press y and enter.
copy the downloaded files to root of your SDCARD *We keep this simple*
Once copied type: cd storage
perl splitupdate UPDATE.APP partitionyouwanttoextract if everything goes well you should be good to go and having the selected files in a folder called output where selected files should be stored.
The unpack tutorial is done. But wait! If you want to browse the files you need to do one more thing or two.
Download android image kitchen
https://play.google.com/store/apps/details?id=com.redlee90.imagekitchenforandroid
This will allow you to *unpack boot/recovery and convert system image (also vendor, product, cust and version)
*in order to unpack a boot or recovery file you'll need to remove all code using a hex edit file until you see ANDROID text. Else it won't unpack. You can unpack aosp images easily with this tool and modify what you want and repack to flash it on your device tested with twrp image for honor 8.
I would suggest to not unpack/repack boot using this tool since it'll cause problem.
There's a python script that works to unpack boot and recovery which can be found https://github.com/liudongmiao/bootimg/blob/master/bootimg.py
For this you'll need to install python.
pkg install python and hit y and enter
Now you just do as the splitupdate part where you extract the file.
Command to unpack
python bootimg.py --unpack-bootimg similar is for ramdisk but you replace bootimg with ramdisk.
To repack just simply python bootimg.py --repack-bootimg
Please note if you repack ramdisk the boot might not work (it's a while since I tested this) now this covers up how you unpack boot and extract update.app from phone.
Credits to @Atarii for telling how to unpack boot on phone and for his custom splipupdate script
Sent from my FRD-L09 using Tapatalk
Known Issues:
If you get Killed when trying to extract system.img this is most likely because the image size is too big, this isn't due to small space available i guess its due to all ram is being taken yet i can't tell.
i get permission issues. yeah this can happen sometimes try chmod +x or chmod 0777 with root, it might help.
when typing termux-setup-storage i get lots of errors and i'm on 8.0 EMUI
This is not your fault it's a bug caused by android i'd guess, or app isn't adopted completely for 8.0

Categories

Resources