[Q] How to Flash custom Kernel on Allwinner A10 tablet ? - Android Q&A, Help & Troubleshooting

I made zImage, uImage and modules without getting any errors but how to flash them to the device?Using adb? making boot.img making cwm zip how to pack them?
HTML:
http://www.slatedroid.com/topic/34172-kernel-compile-a10/

arunmcops said:
I made zImage, uImage and modules without getting any errors but how to flash them to the device?Using adb? making boot.img making cwm zip how to pack them?
HTML:
http://www.slatedroid.com/topic/34172-kernel-compile-a10/
Click to expand...
Click to collapse
I wanted to do the same, but apparently you have to create a whole firmware image (as in here--> https://www.miniand.com/wiki/Allwinner/Unpacking+and+building+LiveSuit+images)
I've been trying to create an image for a $rand A10 tablet, but as soon as I flash it the tablet will not boot anymore. Dunno wth is happening.

Related

[To Kernel Devs]Custom kernel|Zimage/boot.img issues at stock ROMs with stock kernel

I noticed for myself with custom ROMs there is no problem to flash a kernel zip
with Zimage or boot.img inside via recovery.Tried all available kernels and all works.
But if I do a restore to my rooted and S-Off stock ROM with stock kernel,
nothing works.First I flashed kernel zip with Zimage,then I got
Code:
Flashing New boot.img ...
assert failed: write_raw_image ("/tmp/newboot.img". "boot")
(Status 7)
Installation aborted
After this,I tried to flash a kernel zip with boot.img inside.This works,but
phone stuck at HTC splash image.
Also,after flashed the kernel zip with boot.img inside,the kernel zips with
Zimage inside works too,but also stucks at HTC splash image.
Phone details:
EVO 3D GSM, rooted by:
HBOOT 1.49.1107
revolutionary s-off
CWM 5.0.2.0
Any answers/solutions for this from the devs,why custom kernels don`t
work with rooted/S-Off stock ROM and stock kernel?
This should go to Q&A Section...
Stock ROM's have secured Boot Images, custom ROM Dev's unsecure the Boot Image to allow Root ADB commands.
Questions or Problems Should Not Be Posted in the Development Forum
Please Post in the Correct Forums
Moving to Q&A
harpss1ngh said:
This should go to Q&A Section...
Stock ROM's have secured Boot Images, custom ROM Dev's unsecure the Boot Image to allow Root ADB commands.
Click to expand...
Click to collapse
So no solution to get a custom kernel working on rooted/S-Off stock ROM
with stock kernel?
harpss1ngh said:
This should go to Q&A Section...
Stock ROM's have secured Boot Images, custom ROM Dev's unsecure the Boot Image to allow Root ADB commands.
Click to expand...
Click to collapse
I could be wrong, but as far as I know this is partly true, although I might have misread.
I agree, completely 100% stock kernels from the manufacturer have secured kernels (boot images).
Ganii said:
So no solution to get a custom kernel working on rooted/S-Off stock ROM
with stock kernel?
Click to expand...
Click to collapse
The first 256 bytes of the kernel/boot.img are the signature/encryption on 100% stock kernels for this device. Since the first 256 bytes are encrypted, the standard Anykernel (zImage in .zip file with dd, etc.) method does not work. It will successfully dump the kernel from the boot partition but it will fail when parsing out the pieces due to the 256 bytes at the beginning, at least in previous/current state.
The only way I've seen to bypass this is by flashing an unsigned kernel. I've had success removing the first 256 bytes of the dumped/RUU kernel file and flashing. Once the user has an unsigned/unsecured kernel loaded in the boot partition, the Anykernel style (zImage, dd, mkbootimg.sh, etc) type kernel usually works.
These unsigned kernel files can be found in ROMs or separately in kernel .zip files, but they have to always be in the boot.img form the first time.
Some of this is my personal theory but it is based on my experiences. Welcome anybody else with experience to chime in, especially other kernel developers.
Hope my ideas make sense!
I also tried to flash boot.img,but doesn`t work.
http://forum.xda-developers.com/showpost.php?p=18686747&postcount=166
I think you might be typing the commands wrong. Have you tried
fastboot flash zimage??? Also did you unpack/unzip the .img to the correct directory??? Also did you do fastboot reboot boot loader???
Locked & Loaded
""Shooter on Deck""
Ganii said:
I also tried to flash boot.img,but doesn`t work.
http://forum.xda-developers.com/showpost.php?p=18686747&postcount=166
Click to expand...
Click to collapse
If the kernel is compiled and verifed working properly, flashing the boot.img should work as it completely overwrites the stock kernel image.
In comparison to the Anykernel method, where they dump the stock signed kernel and attempt to split out the ramdisk, cmdline and base, which will fail due to the 256 byte signature at the front of the kernel.
As a side note, I'm fairly certain it would be simple to modify the current tools, somebody might have already, to ignore the first 256 bytes of the kernel partition, and then use the rest of the image to split out the correct information. On a mass scale, the only hard part would be determining which kernels had 256 bytes of encryption/signed or which don't. The easiest solution would be to provide a flag to pass to the binary which splits out the imagine ... probably getting off topic.
Hope the extra details help clarify the process as far as I understand it!
Whats the fastest kernel out for the EXT3? And how about EXT4?

[HELP]Corrupt boot img

Hello guys I have Alcatel One Touch 918n. I was trying to make a custom rom for the device. It is an armv6 device running on Android 2.3.6 . But for complete building and tweaks I need full stock rom which is not available on internet. So I decided to use cwm backup. I have a cwm v5.0.2.8 port for my device but I think it does not properly image the boot.img. as far as I know boot.img has zimage and ramdisk folder. Ramdisk has many tweaks associated with it. But my boot img contains zimage but no ramdisk. Also if I restore the boot.img it causes bootloop. So everytime I have to use advanced restore and restore all other img separately. Any solution so that I can fix the boot img

Flashing CM11 Nightlies Boot.img from Recovery

Hello Devs,
Just wondering if the new CyanogenMod 11 Nightlies has the boot install script in it or not , Since my device is S-OFF if the install script is present I should be able to install the boot.img from recovery itself rather than extracting it and flashing throught FASTBOOT.
Recently I found that some roms they they don't come with the install script for which I had to push the boot.img separately..
Can some one help me out with this one.
Thanks
ethanon said:
Hello Devs,
Just wondering if the new CyanogenMod 11 Nightlies has the boot install script in it or not , Since my device is S-OFF if the install script is present I should be able to install the boot.img from recovery itself rather than extracting it and flashing throught FASTBOOT.
Recently I found that some roms they they don't come with the install script for which I had to push the boot.img separately..
Can some one help me out with this one.
Thanks
Click to expand...
Click to collapse
Nope
Correct me if I am wrong , you mean to say that I will have to push boot.img separately , as the boot install script is missing in CM11
ethanon said:
Correct me if I am wrong , you mean to say that I will have to push boot.img separately , as the boot install script is missing in CM11
Click to expand...
Click to collapse
100% correct.

Convert temporary CWM zip into permanent (modifying boot.img)

Hi all! I need help replacing stock recovery from boot.img with the one contained in the CWM.zip file.
A little introduction:
I just want to install CWM onto miy device (Samsung Galaxy Young TV, S5367, Broadcom BCM21553 chipset) which has no CWM/TWRP recovery made.
This device have the kernel and recovery into one partition (boot) which I can modify by unpacking&repacking the boot.img and flashing through Odin.
The problem is, that only one CWM was made for this device, and it's usable as a temporary session (flashing CWM.zip through stock recovery).
I want to replace the stock recovery contained into the boot's ramdisk with the one in cwm.zip, but how can I do that? I've tried just replacing the files but obviously it didn't work (CWM recovery boots, but shows a lot of mounting-related errors).
Any help is appreciated!

Recovery image or firmware for Alcatel 1T 7 8067

Hi everyone. I recently bought an Alcatel 1t 7 (8067) tablet, 1Gb ram, 16Gb rom, just wifi (no 4G), mt6580 processor, android oreo go edition; a very simple and cheap tablet, but it seemed me a very nice one, because is slim and lightweight; worhty of root access, but also a custom recovery. I prefer TWRP recovery because it's more organized... ¡Anyway!... So I got down to work, but at first, as I didn't know how to backup all firmware, and when I learned how to do it and did it (esentially I could "tame" sp flash tools, hehe), I had already lost my original recovery file. Is needless to say that TWRP recovery, as far as I know, isn't available for this model, so I needed to port it, but as at first, I didn't know how to back it up, I overwritten it with other recoveries that didn't work. I mean, at this time, the tablet is working but is without recovery tool. I'm not going to talk about root access, because I already could get it, by using magisk manager, but I need my recovery image file, back; both to reinstall it and port it to TWRP.
So finally, if anyone has this stock recovery file, the full stock rom for it, or even better the ported TWRP for this tablet, please share it to me.
Thanks in advance for your attention.
just boot into android, stock recovery will be repaired from /system/recovery-from-boot.p automatically
aIecxs said:
just boot into android, stock recovery will be repaired from /system/recovery-from-boot.p automatically
Click to expand...
Click to collapse
Thank you for reply. Ok, I booted android. I have enabled usb debugging so, when android booted, I connected it to adb, and opened "adb reboot recovery" command, to be sure that android would reboot into that mode; but it didn't, it just rebooted several times on boot screen, and when it "got tired" of rebooting, it booted into android. Didn't boot into recovery, so I guess, It didn't repair it.
PS: I was looking for that file "recovery-from-boot.p" on that path, and there isn't such file, i can't find it.
on older devices it is /system/etc/install-recovery.sh or something, it's maybe disabled if your device isn't completely stock anymore?
you can port TWRP with kernel from boot. you can use this TWRP as base
aIecxs said:
on older devices it is /system/etc/install-recovery.sh or something, it's maybe disabled if your device isn't completely stock anymore?
Click to expand...
Click to collapse
¿Must that file have the same size that the original recovery image? Because the only file named recovery that i can find on that path is named "recovery-resource.dat" and its size is 807kb, and as I have seen before, is that recovery images have several Mb of size.
aIecxs said:
you can port TWRP with kernel from boot. you can use this TWRP as base
Click to expand...
Click to collapse
Two questions about it; as far as I can remember twrp image must be compatible not only for the same chipset, but the same screen resolution ¿Am I right? Also, this tablet is 600x1024 px, or 1024x 600 on landscape mode. All TWRP that I have installed on former machines, worked on portrait mode, so I wonder miself ¿Could TWRP also work on landscape mode?
/system/etc/recovery-resource.dat "generates a binary patch that creates the recovery image starting with the boot image. (Most of the space in these images is just the kernel, which is identical for the two," so the resulting patch is a executable file with smaller file size than the actual recovery.) It's just few lines of code.
https://android.googlesource.com/platform/build/+/b32161a^!/
TWRP is available in landscape mode. you can read more about here
[GUIDE]Porting TWRP without source
I don't think touchscreen will work at all, so resolution doesn't matter. you can use TWRP from cmd line
https://twrp.me/faq/openrecoveryscript.html
aIecxs said:
/system/etc/recovery-resource.dat "generates a binary patch that creates the recovery image starting with the boot image. (Most of the space in these images is just the kernel, which is identical for the two," so the resulting patch is a executable file with smaller file size than the actual recovery.) It's just few lines of code.
https://android.googlesource.com/platform/build/+/b32161a^!/
Click to expand...
Click to collapse
Ok... I can find that file on my tablet, but I'm not so skilled android user, as for rebuild recovery from that file or even port TRWP from that file, so ¿Is there an easy way to do it ( or at least, comprehensible for middle skilled android users) ? ¿How? (and supposedly this machine is easy to port and root, they say on internet. I also have a huawei y7 2018 for rooting, that seems harder to root. But that's a another (my next) struggle in here, hehe)
aIecxs said:
TWRP is available in landscape mode. you can read more about here
[GUIDE]Porting TWRP without source
Click to expand...
Click to collapse
Another question. ¿Are those programs who claim to help to port TWRP with just some clicks, reliable? (for instance TWRP porter for mediatek)
aIecxs said:
I don't think touchscreen will work at all, so resolution doesn't matter. you can use TWRP from cmd line
https://twrp.me/faq/openrecoveryscript.html
Click to expand...
Click to collapse
All the TWRP recoveries that i have ported before, have had a working touchscreen, but as I understand, resolution requirement is not only for touch calibration, but for correct displaying of TWRP GUI (that all buttons and options fit on the screen), Now I've read that new versions of TWRP adjust automatically to any screen resolution, ¿Is that right?
dump boot.img off device. you can use SP Flash Tool read back. download base TWRP and unpack with AIK. replace kernel and see what happens. if TWRP booted with black screen try to enter adb shell. get partition list from adb shell. create proper twrp.fstab and flash again. you should have functional TWRP now even without working GUI.
if touchscreen is disabled it might possible to hexpatch kernel with ghidra like I did for mine.
HCU-client needs 4 credits for Huawei.
I may reply in new thread.
aIecxs said:
dump boot.img off device. you can use SP Flash Tool read back. download base TWRP and unpack with AIK. replace kernel and see what happens. if TWRP booted with black screen try to enter adb shell. get partition list from adb shell. create proper twrp.fstab and flash again. you should have functional TWRP now even without working GUI.
if touchscreen is disabled it might possible to hexpatch kernel with ghidra like I did for mine.
Click to expand...
Click to collapse
¡No, man! If TWRP porting is kinda hard having the stock recovery image, without it, is a brain smashing task (or at least for me). I mean, I really don't understand well, how to port twrp starting only with boot.img, I mean, without recovery img. I've saw tutorials about the use of carliv kitchen (windows version), and seems easy, but all tutorials are made with stock recovery.img available, not with boot.img. So, what can I do there?
as I said. replace kernel with that from boot.img and see what happens? the generic base TWRP actually is recovery.img already, so you might lucky and it works? trial + error...
aIecxs said:
as I said. replace kernel with that from boot.img and see what happens? the generic base TWRP actually is recovery.img already, so you might lucky and it works? trial + error...
Click to expand...
Click to collapse
I saw a tutorial about. It said that I must to unpack stock recovery and twrp recovery, and replace some files of unpacked twrp recovery, with respective unpacked stock recovery files, and edit some files on twrp unpacked folder, and finally repack it.
Until that point, I assume that it should work, I mean, having stock recovery. But I did that, but using boot.img, I renamed all boot resources, to recovery, for instance, boot.imgkernel to recovery.imgkernel; and replaced it, repacked it, and reflashed it, but nothing happened, I mean, it didn`t want to boot into recovery. It`s interesting to "experiment", but I`m gonna try to find its original stock recovery, to at least get it back.
Hello!
I would like some help, alcatel 1T7" 8086 no4g I likely bricked it. There's nothing else than a black screen. The tablet doesn't react to anything. The computer finds it as unknown USB tool. No visibilty is shown. What can i do with it,for it to work? Or should i just put it in the trash?
Thank you for the reply.

Categories

Resources