Related
Hi Guys...
I really can't figure out how I go about installing CM7.2 on my arc again, after upgrading to BaseBand70 + ICS.
I tried a lot of different stuff and what ussually happens, is when I install the CM bootmloader, the phone won't turn on and the screen keeps on being black.
Right now I have the Arconium rom installed and it works fine, but I miss the smootness and the awesome battery life I had on with CM7.2
I've tried to install various tft files flashtool, but the only thing I can get to work is the BB70 one.
Hope you guys can help
You can return to CM7 but you must flash CM7 kernel with flash tool.
view topic : here
fabou said:
You can return to CM7 but you must flash CM7 kernel with flash tool.
view topic : here
Click to expand...
Click to collapse
Thanks...
But I have already tried that and that doesn't work... I thought it was because I needed to flash an older baseband or something similar?
i think the baseband is not linked with the kernel, but you can flash the kernel and you can upgrade baseband.
Did you try the FXP117 kernel? maybe the kernel work, it's a bluid problem.
On CM9 I had the same problem .
adrianom said:
Guys,
The problem of boot image is again in ramdisk, and is only a build problem, I extract the 117 boot.img and only recompress and work.
If someone wants to build for other devices, the command to build the boot.img, is:
Use unpack-bootimg.pl to extract the boot.img:
Code:
unpack-bootimg.pl boot.img
Rebuild the ramdisk:
Code:
cd boot_117.img-ramdisk
find . -name ".DS_Store" -depth -exec rm {} \;
find . | cpio -o -H newc | gzip > ../ramdisk.cpio.gz;
cd ..
Rebuild the boot.img:
Code:
mkbootimg --base 0x00200000 --kernel boot_117.img-kernel --ramdisk ramdisk.cpio.gz -o boot.img
Ps.: the script above is for Mac, but should also work for Linux.
Attached below is the fix boot.img.
Click to expand...
Click to collapse
WARNING : this quote is for CM9!!
follow this thread and maybe it will have a patch
This is DIY
If you are just looking for a well done and stable PA download, you are probably the wrong place. Then go and grab xzzz9097s build, it's good!
If you are impatient and know what to do, just leave and do the init/sync/build.
For anyone wanting to build her/his own PA without any "extras", go ahead and read on.
We already have a very easy full guide to compile CM10 for HOX. I was looking for the same for ParanoidAndroid, but did not find a 100% guide, meaning I had to do it myself.
To be fair, I only needed to do 1% as you will see after the usual disclaimer. I hope this little guide will be enough to make anyone complile their own PA for the HOX.
The usual disclaimer:
I am no developer!
I just happen to be able to read and understand instructions. I am persistent and know how to search for answers.
With luck and patience I ended up with a 184MB zip, that installs and runs just fine on my HOX.
I pass this guide as it is now, no guarantee no returns. I will probably not be able to help much here, time is very limited, so no commitments for support from me.
If it breaks you device, you broke it all by yourself
I am no developer!
gokussjx made the general guide, explaining how to port Paranoid Android 3.xx to different devices.
It works 99% for Endeavoru. The last 1% takes some effort to get right.
For me, not knowing what I am doing, it took a lot of trial and error, but eventually, - I made it and might as well pass it on here.
I'm in debt to all the people helping out in that thread. Huge thanks!
To get started, just follow a few simple steps:
You need a linux setup.
Install as your main system or run it in windows with VirtualBox.
Most guides are expecting Ubuntu. I use Mint Debian 64, which is just perfect for this job (and everything else ).
For VirtualBox you need at least a 50GB virtual-drive. Add 16GB if you will use ccache. I have build PA with a 52GB VBox in Win7.
It was just enough to compile, but had no room for ccache!
Compile time (VBox) on EliteBook 8540w (i7) was 120min. Not too bad, considering my old DeskTop need close to 4 hours on pure Linux.
Expect to download 8GB of source. Add 18GB for building to the "out" folder.
Enough statistics now, let's get started.
Follow gokussjx guide to setup linux for PA compiling.
Follow only these steps:
# Install OpenSSL, for Python
# Install Dependencies
# Configure USB
# JAVA JDK Installation
# Python Installation (just pick option 1)
# Android SDK
Click to expand...
Click to collapse
Exit gokussjx guide and continue here:
Download your favorite arm toolchain:
I found mine here.
Just extract the archive to any folder with user access, later you will point the build system to the /bin folder of the toolchain.
Install CCACHE:
Code:
$ sudo apt-get install ccache
Activate it in .bashrc:
Code:
# use ccache
export USE_CCACHE=1
You can change max-cache size, 16G should be enough for this build.
From terminal:
Code:
$ ccache -M 16G
Install Repo:
Code:
$ mkdir ~/bin
$ PATH=~/bin:$PATH
$ curl http://commondatastorage.googleapis.com/git-repo-downloads/repo > ~/bin/repo
$ chmod a+x ~/bin/repo
Download the build manifest:
Code:
$ mkdir -p padroid/system
$ cd padroid/system
$ repo init -u git://github.com/teemodk/manifest.git -b padroid
Get the source!
Code:
$ repo sync -j16
Find this section in "build/envsetup.sh" update with your favorite arm toolchain:
Code:
case $ARCH in
x86) toolchaindir=x86/i686-linux-android-$targetgccversion/bin
;;
arm) toolchaindir=[B]~/toolchain/linaro4.8/bin[/B]
;;
mips) toolchaindir=mips/mipsel-linux-android-$targetgccversion/bin
;;
Go!
Code:
$ ./rom-build.sh endeavoru
Thats all. If it went well, get your new ROM in "out/target/product/endeavoru"
Don't forget the gApps.
Credits go to
PA:molesarecoming, D4rKn3sSyS for the awesome hybrid magic. All PA contributors. gokussjx for the mother of all PA guides. All the helpful people here, that use their time to help.
CM(aosp):thöemy,gorbi16,tbalden,(pabx) and all the unknown soldiers contributing to CM
Everyone I forgot.
Differencies from the official guide.
The official PA manifest is put together in a way, so you can easily build and maintain multiple devices with only one manifest.
It works by adding and removing device specific code with local manifests under the "vendor/pa" folder.
However, I am only compiling for OneX, so I found it easier to add/remove stuff directly in the main manifest.
The downside to this is, that you have to manually maintain the manifest everytime you want to sync with PA. Place for improvement
All changes in STEP 2 of the official guide, is already done if using my guide with padroid manifest.
In vendor/pa these steps are done:
Code:
* Create [URL="https://github.com/teemodk/padroid_vendor_pa/blob/padroid/manifests/endeavoru.adds"]/manifest/<device>.adds[][/URL]
* Create [URL="https://github.com/teemodk/padroid_vendor_pa/blob/padroid/manifests/endeavoru.removes"]/manifest/<device>.removes[/URL]
* Create [URL="https://github.com/teemodk/padroid_vendor_pa/blob/padroid/prebuilt/pa_endeavoru.conf"]/prebuilt/pa_<device>.conf[/URL]
* Create [URL="https://github.com/teemodk/padroid_vendor_pa/blob/padroid/products/pa_endeavoru.mk"]/products/pa_<device>.mk[/URL]
* Add device makefile entry to [URL="https://github.com/teemodk/padroid_vendor_pa/blob/padroid/products/AndroidProducts.mk"]/products/AndroidProducts.mk[/URL]
* Create [URL="https://github.com/teemodk/padroid_vendor_pa/tree/padroid/vendorprops"]/vendorprops/<device>.proprietaries[/URL]
* Add device lunch menu entry to [URL="https://github.com/teemodk/padroid_vendor_pa/blob/padroid/vendorsetup.sh"]/vendorsetup.sh[/URL]
Furthermore, I temporarily moved the CM adds/removes from "vendor/pa/manifests" to .repo/manifest.xml.
I am sure there are better ways to handle git/repo/manifest etc., but this works well for me for now. Open for suggestions though.
Problem Solving
If (when) you run into problems, go to the official guide and find the answer. Most, if not all, errors is already answered there. If not, ask.
But first make a serious effort to find the error yourself. Read some good advice about finding the error.
As a rule of thumb: The build system tells you where to find the error! Something is missing, something is duplicated or somthing is just wrong. It's all in the log, running up your screen when compiling.
Build 25.Oct.2013
http://d-h.st/XRt
Nice, I'm always eager to learn this stuff .
Thanks!
ROM uploaded to post 3.
teemo said:
ROM uploaded to post 3.
Click to expand...
Click to collapse
Thank you so much Teemo, for providing the guide and the rom.
Just a Q: is this stock ParanoidAndroid rom (stock kernel?) ?
Thanks again for your work :good:
Mat08.cc said:
Thank you so much Teemo, for providing the guide and the rom.
Just a Q: is this stock ParanoidAndroid rom (stock kernel?) ?
Thanks again for your work :good:
Click to expand...
Click to collapse
The ROM is as close to stock as it get for OneX. It is really a mix of CyanogenMod and ParanoidAndroid. I follow the official build guide from PA-team.
The kernel is from same source as CM.
You can see everything in the manifest.
@teemo
your build is running fast and stable, congratulations! maybe you can keep updating this .. I appreciate it and I'm sure many other people would be of the same opinion
Sry,wrong threat....
Gesendet von meinem EndeavorU mit Tapatalk
Hi @teemo I was trying to build my own rom using a different source.
I'm pretty sure I've done things right except that when i start my build it ends up after few seconds saying: "Kernel source found, but no configuration was defined. Please add the TARGET_KERNEL_CONFIG variable to your BoardConfig.mk file"
I checked my BoardConfig.mk file and what I've got is TARGET_KERNEL_CONFIG := cyanogenmod_endeavoru_defconfig
I thought you may know how to help me with this!
Other infos: I'm tryn to build paranoidandroid 4.0 and i'm using cyanogenmod files for the endeavoru since i know aospa is cyanogenmod based right?
Hope you can help me :fingers-crossed:
Mat08.cc said:
Hi @teemo I was trying to build my own rom using a different source.
I'm pretty sure I've done things right except that when i start my build it ends up after few seconds saying: "Kernel source found, but no configuration was defined. Please add the TARGET_KERNEL_CONFIG variable to your BoardConfig.mk file"
I checked my BoardConfig.mk file and what I've got is TARGET_KERNEL_CONFIG := cyanogenmod_endeavoru_defconfig
I thought you may know how to help me with this!
Other infos: I'm tryn to build paranoidandroid 4.0 and i'm using cyanogenmod files for the endeavoru since i know aospa is cyanogenmod based right?
Hope you can help me :fingers-crossed:
Click to expand...
Click to collapse
Hi, I don't know what it takes to build ParanoidAndroid 4
But maybe you can ask in the Paranoid guide.
Or you can ask here for all other builds.
EDIT: Btw, to build PA4 or any other KitKat, you need the new sources for OneX (device+vendor+kernel). This guide will not work for KitKat.
teemo said:
Hi, I don't know what it takes to build ParanoidAndroid 4
But maybe you can ask in the Paranoid guide.
Or you can ask here for all other builds.
EDIT: Btw, to build PA4 or any other KitKat, you need the new sources for OneX (device+vendor+kernel). This guide will not work for KitKat.
Click to expand...
Click to collapse
I used the new sources but that was the result! I'll start from zero again to see if I missed something Thanks for the reply always really kind!
Mat08.cc said:
I used the new sources but that was the result! I'll start from zero again to see if I missed something Thanks for the reply always really kind!
Click to expand...
Click to collapse
the aospa dev build the aospa kitkat version...so a few days waiting and it will be there
One-X-master said:
the aospa dev build the aospa kitkat version...so a few days waiting and it will be there
Click to expand...
Click to collapse
Yeah I thought so! But I would love to learn! I have always looked to devs as to extraordinary people, understanding what makes them such would be great
Hey @teemo , sorry to bother you, but could you make an update build of PA? I don't have a stable connection, can't make a build of the new PA.. :/
Thanks man, take care
LuisDias said:
Hey @teemo , sorry to bother you, but could you make an update build of PA? I don't have a stable connection, can't make a build of the new PA.. :/
Thanks man, take care
Click to expand...
Click to collapse
All credits to @audahadi https://drive.google.com/folderview?id=0B-KjFDQ914F4dVdQLU9nT3VkMGc&usp=sharing
bosas200 said:
All credits to @audahadi https://drive.google.com/folderview?id=0B-KjFDQ914F4dVdQLU9nT3VkMGc&usp=sharing
Click to expand...
Click to collapse
Thanks brotha
teemo said:
Build 25.Oct.2013
http://d-h.st/XRt
Click to expand...
Click to collapse
Any chance helping me build AOSB with newer cm 11 base?
As no instructions anywhere on building AOSB from source. Source is
https://github.com/AOSB?page=1
Many thanks
Hello fellow OGPers...
So I've been jumping from ROM to ROM for a solid few months now. Really enjoyed my time as an Android user and soaked in a lot. I've been learning (well... teaching myself) about Linux and other related things. But I've been busy with classes, a social life, and other commitments. Anyway let me cut to the chase. I really enjoyed it in 4.3 ROMs when I could use all the settings on the AOSP custom kernel for our device and among other things liked the experience of a custom kernel. It's about time we got one for 4.4.x Kitkat... right?
I am currently running Windows 7 (if specs are important I will post them) with a Linux Mint distro (both are 64-bit). I have downloaded the CM11.0 from github and a few toolchains. I haven't untared them yet or anything, but I have some. One is specialized for Cortex A-15, which I read our device's CPU is much alike to. Anyway I just wanted some help getting started with making a kernel is what it comes down to. I have basic Linux knowledge and that's about it. I just want to get a custom kernel out and then maybe in the future get a nice battery-optimized kernel out. I forgot to grab a kernel patch and I'll download it tomorrow probably. But I really don't know where to start at all. Do I need knowledge of anything or some more experience knowledge? If anybody can point me in a good direction that would be great. Everything is appreciated.
Oh and feel free to PM me answers as well if it's easier or more convenient for you.
Thanks guys!
This would be great as we need a kernel Dev ... Good luck on your journey !
2SHAYNEZ
If you only want to compile kernel,clone this repository.
git clone https://github.com/CyanogenMod/lge-kernel-gproj/tree/cm-11.0
make any change you want to do with the source.
Download android toolchain and extract it.
Compile the kernel sources with
export ARCH=arm CROSS_COMPILE=/path.to.toolchain/bin/arm-eabi- && make cyanogenmod_e980_defconfig && make -j#
(# is the number of your computer cores +1)
you will get zimage in /arch/arm/boot folder
Using boot.img(the kernel) from official CM build zip to get the ramdisk is easier
abootimg -x boot.img
you will see:
writing boot image config in bootimg.cfg
extracting kernel in zImage
extracting ramdisk in initrd.img
put the extracted initrd.img and bootimg.cfg to /arch/arm/boot(where your compiled zimage are)
run:
abootimg --create boot.img -f bootimg.cfg -k zImage -r initrd.img
You will get the boot.img!
This is the complete kernel!
Use any previous kernel zip, and replace the boot.img inside the zip with yours.
Flash it and test it.
My TWRP 2.8.0.0 or TWRP from freegee or Philz Touch will auto lokify the kernel.
Wing
Attached is the kernel.zip that i use.
Replace the your finished boot.img with it~~
Wing
BTW i am not programmer, but i am a very long time gentoo linux and archlinux user, long before android exist~
mukwing said:
If you only want to compile kernel,clone this repository.
git clone https://github.com/CyanogenMod/lge-kernel-gproj/tree/cm-11.0
make any change you want to do with the source.
Download android toolchain and extract it.
Compile the kernel sources with
export ARCH=arm CROSS_COMPILE=/path.to.toolchain/bin/arm-eabi- && make cyanogenmod_e980_defconfig && make -j#
(# is the number of your computer cores +1)
you will get zimage in /arch/arm/boot folder
Using boot.img(the kernel) from official CM build zip to get the ramdisk is easier
abootimg -x boot.img
you will see:
writing boot image config in bootimg.cfg
extracting kernel in zImage
extracting ramdisk in initrd.img
put the extracted initrd.img and bootimg.cfg to /arch/arm/boot(where your compiled zimage are)
run:
abootimg --create boot.img -f bootimg.cfg -k zImage -r initrd.img
You will get the boot.img!
This is the complete kernel!
Use any previous kernel zip, and replace the boot.img inside the zip with yours.
Flash it and test it.
My TWRP 2.8.0.0 or TWRP from freegee or Philz Touch will auto lokify the kernel.
Wing
Click to expand...
Click to collapse
Wow thank you so much... definitely going to give this a shot today! So I didn't have to download the 12 GB source... good to know.
Oh and one more thing. Is there any difference from building a CM11 kernel vs an AOSP 4.4.x kernel? I figured since most of our device's ROMs are CM based this would work fine... Thank you very much for the information at hand! Appreciated.
CM kernel is different from AOSP kernel from what i know.
CM kernel is base on CAF(which is optimized for msm chip) and AOSP kernel base on google original code.
They are a bit different so imcompatible from what i know.
Wing
When I compile there are loads of errors and eventually it stops (at different times each attempt...) anyway, the first thing I notice is this:
warning: (ARCH_MSM7X27 && ARCH_MSM8960 && ARCH_MSM8930 && ARCH_MSM8974) selects DONT_MAP_HOLE_AFTER_MEMBANK0 which has unmet direct dependencies (SPARSEMEM)
warning: (ARCH_MSM7X27 && ARCH_MSM8960 && ARCH_MSM8930 && ARCH_MSM8974) selects DONT_MAP_HOLE_AFTER_MEMBANK0 which has unmet direct dependencies (SPARSEMEM)
Is that anything I have to worry about? I can't find anything online about it. Thanks in advance.
First, is it unmodified cm kernel sources?
Make sure to use unmodified sources to test building first.
Somes errors can safely ignored.The msm8960 error can safty ignore. It has nothing to do with our device.
If it failed to build, try using option like -Xlint.
Sometimes, using older build of toolchain is easier to build, e.g.gcc4.7 or 4.8
Gcc 4.9 always failed to build e980 cm kernel.
mukwing said:
First, is it unmodified cm kernel sources?
Make sure to use unmodified sources to test building first.
Somes errors can safely ignored.The msm8960 error can safty ignore. It has nothing to do with our device.
If it failed to build, try using option like -Xlint.
Sometimes, using older build of toolchain is easier to build, e.g.gcc4.7 or 4.8
Gcc 4.9 always failed to build e980 cm kernel.
Click to expand...
Click to collapse
Ohhh okay. Yeah it's all unmodified and I've downloaded tons of "needed" packages (including most likely unnessesary ones too). I'm using a 4.9 GCC. That might be it. Okay thanks. I'll give another shot tomorrow when I have access to my VM.
Kernel has been successfully compiled. Check here for download and further discussion...
http://forum.xda-developers.com/optimus-g-pro/orig-development/kernel-e980-kernel-t2872514
Hi everynone,
I was building a kernel for the pixel c. I could build it, now the only problem i have is i can't unpack / repack boot.img of the pixel c (i would like to unpack it in order to extract the ramdisk ans generate the boot.img).
How do you generate boot.img after you have the compiled kernel image on a pixel c ?
These informations are very important to understand and mod Pixel C.
I will be very interested too to have some info about how to unpack/repack boot.img for pixel c (as it's a chromeos boot image)
Thanks a lot in advance,
Mathieu
Ok so after some analysis, here is what i understood :
boot.img contains in itself an android boot.img at the adress 0x1000.
So to extract the android boot.img image, we can use dd :
dd if=chromeosBoot.img of=androidBoot.img skip=8192 bs=8
This will extract the androidBoot.img. Then we will be able to use split_bootimg.pl to extract the kernel and the ramdisk (compressed in gz).
Now my questions : from 0x0 to 0x1000 in chromos boot img, there is some data i still don't understand clearly.
I would like to try to replace the kernel and the ramdisk, and then repack all keeping the same data from 0x0 to 0x1000.
Do you think it's gonna work ?
What are the risks to do so (i don't want to brick too much my tablet...)
Thanks a lot for your help,
Hope my researches will be helpful for other developers.
Mathieu
Samt434 said:
Ok so after some analysis, here is what i understood :
boot.img contains in itself an android boot.img at the adress 0x1000.
So to extract the android boot.img image, we can use dd :
dd if=chromeosBoot.img of=androidBoot.img skip=8192 bs=8
This will extract the androidBoot.img. Then we will be able to use split_bootimg.pl to extract the kernel and the ramdisk (compressed in gz).
Now my questions : from 0x0 to 0x1000 in chromos boot img, there is some data i still don't understand clearly.
I would like to try to replace the kernel and the ramdisk, and then repack all keeping the same data from 0x0 to 0x1000.
Do you think it's gonna work ?
What are the risks to do so (i don't want to brick too much my tablet...)
Thanks a lot for your help,
Hope my researches will be helpful for other developers.
Mathieu
Click to expand...
Click to collapse
Thanks for the unpacking help .. works quick and good.
It´s actually the same like ..
Code:
dd if=boot.img of=unpacked.img ibs=65536 skip=1
Have the same problem, as I want to repack Pixel C boot.img ..etc.
For the repacking part I was searching heavily .. like you.
boot-split.pl or mkbootimg is done ... only the signing part is missing ?!?
Here is a part of the solution : ( working on ubuntu 14.04 )
Code:
apt-get install vboot-kernel-utils
Code:
vbutil_kernel --repack boot.img --oldblob xceed-kernel-google-dragon-v6.10-RELEASE-mxc14g.img --signprivate /usr/share/vboot/devkeys/kernel_data_key.vbprivk
the output ...
Code:
Key block:
Size: 0x4b8
Flags: 7 !DEV DEV !REC
Data key algorithm: 4 RSA2048 SHA256
Data key version: 1
Data key sha1sum: d6170aa480136f1f29cf339a5ab1b960585fa444
Preamble:
Size: 0xfb48
Header version: 2.2
Kernel version: 1
Body load address: 0x100000
Body size: 0x57d000
Bootloader address: 0x67c000
Bootloader size: 0x1000
Body verification succeeded.
Just took the xceed kernel as example .. works with all other "CHROMEOS" images too.
But to sign a changed kernel it seems you need more/other parameter.
Still searching ...
Time to boot soon
Cheers
More infos !
Here is where my researches are :
You need to get and compile vboot_reference in order to have the lastest version :
git clone https://chromium.googlesource.com/chromiumos/platform/vboot_reference
after this :
futility vbutil_keyblock --pack boot.img.keyblock --datapubkey kernel_data_key.vbpubk --signprivate kernel_data_key.vbprivk
and next :
echo " " > empty.txt
futility vbutil_kernel --pack boot.img --keyblock boot.img.keyblock --signprivate kernel_data_key.vbprivk --version 1 --vmlinuz boot.img.unsigned --config empty.txt --arch arm --bootloader empty.txt --flags 0x1
And now it seems we have a valid boot.img image !
Thanks a lot for your researches followmsi, i was blocked due to the fact i couldn't generate a signing key, but it seems that the keys are public finally (in tests/devkeys/ of vboot_reference project) !!
Next step for me :
fastboot flash boot boot.img
This comment here helped me a lot :
https://bbs.archlinux.org/viewtopic.php?id=207385
Thanks anatolik if you read this !
Mathieu
I could unpack/repack the stock kernel with this :
From the boot.img :
dd if=boot.img of=androidBoot.img skip=8192 bs=8
Click to expand...
Click to collapse
This gives you the Android boot.img
then, we can use
split_bootimg.pl androidBoot.img
Click to expand...
Click to collapse
in order to extract the kernel.img and the ramdisk.gz.
To repack :
mkbootimg --kernel kernel.img --ramdisk ramdisk.gz --output boot.img.unsigned
futility vbutil_keyblock --pack boot.img.keyblock --datapubkey kernel_data_key.vbpubk --signprivate kernel_data_key.vbprivk --flags 7
futility vbutil_kernel --pack boot.img --keyblock boot.img.keyblock --signprivate kernel_data_key.vbprivk --version 1 --vmlinuz boot.img.unsigned --config empty --arch arm --bootloader empty --flags 0x1
Click to expand...
Click to collapse
We flash the new kernel :
fastboot flash boot boot.img : the kernel repacked is booting correctly !!
Samt434 said:
I could unpack/repack the stock kernel with this :
From the boot.img :
This gives you the Android boot.img
then, we can use
in order to extract the kernel.img and the ramdisk.gz.
To repack :
We flash the new kernel :
fastboot flash boot boot.img : the kernel repacked is booting correctly !!
Click to expand...
Click to collapse
Well done!
Works like a charm .. Thanks !
Just made a new stock rooted encrytable kernel for Pixel C .. to be installed via TWRP.
http://forum.xda-developers.com/pixel-c/development/twrp-flashable-monthly-update-zip-pixel-t3375591
Cheers
How to build pixel c kernel
Hi Samt434,
I have downloaded pixel c kernel code from chrome os git.
But I don't know which build config should I use or set.
When build other nexus device, from example, Nexus 9, I use:
make tegra_defconfig
make -j4
But what I should to do this for pixel c kernel code?
Thanks very much!
Samt434 said:
Ok so after some analysis, here is what i understood :
boot.img contains in itself an android boot.img at the adress 0x1000.
So to extract the android boot.img image, we can use dd :
dd if=chromeosBoot.img of=androidBoot.img skip=8192 bs=8
This will extract the androidBoot.img. Then we will be able to use split_bootimg.pl to extract the kernel and the ramdisk (compressed in gz).
Now my questions : from 0x0 to 0x1000 in chromos boot img, there is some data i still don't understand clearly.
I would like to try to replace the kernel and the ramdisk, and then repack all keeping the same data from 0x0 to 0x1000.
Do you think it's gonna work ?
What are the risks to do so (i don't want to brick too much my tablet...)
Thanks a lot for your help,
Hope my researches will be helpful for other developers.
Mathieu
Click to expand...
Click to collapse
make dragon_defconfig
Cheers
Sent from my Nexus 10 using Tapatalk
Samt434 said:
I could unpack/repack the stock kernel with this :
From the boot.img :
This gives you the Android boot.img
then, we can use
in order to extract the kernel.img and the ramdisk.gz.
To repack :
We flash the new kernel :
fastboot flash boot boot.img : the kernel repacked is booting correctly !!
Click to expand...
Click to collapse
hi Samt434,
I followed the instructions to flash my repacked boot image, and fastboot boot boot.img
After the boot animation, my Pixel C keeps telling me "To start Android, enter your password"
But I didn't setup any password
any clue? thanks
Samt434 said:
Here is where my researches are :
You need to get and compile vboot_reference in order to have the lastest version :
git clone https://chromium.googlesource.com/chromiumos/platform/vboot_reference
Click to expand...
Click to collapse
Is there someplace that I can download this from (already compiled)? Thanks, in advance.
I'm just trying to edit fstab.dragon, changing from force encrypt to encrytable.
cam30era said:
Is there someplace that I can download this from (already compiled)? Thanks, in advance.
I'm just trying to edit fstab.dragon, changing from force encrypt to encrytable.
Click to expand...
Click to collapse
if you have TWRP, do you mind testing https://build.nethunter.com/android-tools/no-verity-opt-encrypt/no-verity-opt-encrypt-5.1.zip for me?
It should do what you want if it succeeds. I'd like a recovery.log either way.
jcadduono said:
if you have TWRP, do you mind testing https://build.nethunter.com/android-tools/no-verity-opt-encrypt/no-verity-opt-encrypt-5.1.zip for me?
Click to expand...
Click to collapse
I will try it and report back, in a day or two. Thank you very much for the response.
@jcadduono,
It works. Thank you very much. Recovery log attached.
cam30era said:
@jcadduono,
It works. Thank you very much. Recovery log attached.
Click to expand...
Click to collapse
Thanks a lot! This is great news It also means Pixel C custom kernel dev can take advantage of https://github.com/jcadduono/lazyflasher now if they like!
It allows you to simply git clone, put an Image.gz-dtb in the folder, and type 'make' and you've got a TWRP flashable kernel!
If you guys want a simpler way to extract the boot images, you can use https://github.com/jcadduono/android_external_libbootimg
"make" will produce bootimg.exe for windows, bootimg for linux & mac. you can use "make bootimg" for just linux/mac.
Unfortunately it can only unpack ChromeOS images (bootimg xv boot.img) and not modify or create them. It will strip the ChromeOS signature and header if you do use the create/update functions of it, but you can just use futility vbutil_kernel to sign it again.
While it would certainly be nice to add the option to pack/modify ChromeOS images without needing futility, the feature alone would make my project increase in size tenfold.
Prebuilt binaries are here: https://build.nethunter.com/possibly-the-coolest-things/bootimg/
jcadduono said:
It will strip the ChromeOS signature and header if you do use the create/update functions of it, but you can just use futility vbutil_kernel to sign it again.
Click to expand...
Click to collapse
Where can I find the futility vbutil_kernel? I'd still like to be able to manually modify fstab.dragon myself.
Thanks for all of this. Much appreciated.
cam30era said:
Where can I find the futility vbutil_kernel? I'd still like to be able to manually modify fstab.dragon myself.
Thanks for all of this. Much appreciated.
Click to expand...
Click to collapse
It depends on Android libc and libcrypto inside Android build environment so it's not exactly portable but might be possible to force it static and include libc. I tried to do that myself but libcrypto doesn't seem to want to build staticly.
I'd suggest doing a shallow depth repo init of Omni 6.0 TWRP manifest if you want a smallish Android build tree to work with, allowing you to build the tool.
jcadduono said:
It depends on Android libc and libcrypto inside Android build environment so it's not exactly portable but might be possible to force it static and include libc. I tried to do that myself but libcrypto doesn't seem to want to build staticly.
I'd suggest doing a shallow depth repo init of Omni 6.0 TWRP manifest if you want a smallish Android build tree to work with, allowing you to build the tool.
Click to expand...
Click to collapse
I didn't understand a word you said.... You might as well have been speaking Greek!
I did get the part about it not being portable though. Obviously, I'm not a developer.
I'll just stick with your TWRP flashable zip!
Thanks for the feedback, though. I do appreciate it.
cam30era said:
I didn't understand a word you said.... You might as well have been speaking Greek!
I did get the part about it not being portable though. Obviously, I'm not a developer.
I'll just stick with your TWRP flashable zip!
Thanks for the feedback, though. I do appreciate it.
Click to expand...
Click to collapse
Another option as well is to flash your modified normal android boot image to your device.
Download no-verity-opt-encrypt zip 5.1+ and add a file in the patch.d folder of the zip, this should be the file's contents:
Code:
#!/sbin/sh
. "$env"
> "$split_img/boot.img-chromeos"
exit 0
(you can remove the verity/opt encrypt scripts from patch.d if you want to as well)
This will convince the zip to sign it for ChromeOS before flashing it back to the device
jcadduono said:
Another option as well is to flash your modified normal android boot image to your device.
Download no-verity-opt-encrypt zip 5.1+ and add a file in the patch.d folder of the zip, this should be the file's contents:
Code:
#!/sbin/sh
. "$env"
> "$split_img/boot.img-chromeos"
exit 0
This will convince the zip to sign it for ChromeOS before flashing it back to the device
Click to expand...
Click to collapse
I'll give it a try and let you know. Thank you.
@jcadduono,
Why don't you post your mods in the Android Development section for Pixel C. This doesn't get much visibility here, in Q&A.
Hey xdas,
i just received my new Samsung Galaxy z Fold 4
SAOMC_SM-F936B_OXM_EUX_12_0045 EUX /-/EUX/EUX
Kernel : 5.10.81-afaneh92-gd8d6af751972 (flashed for twrp)
I would like to install nethunter on the device with a working kernel
I tired my best to understand the docu on kali but its not the best
i am also new to compiling kernels at that level so maybe someone can help here
I attached as much as i could
So the steps i took so far is
Unlocked Bootloader
installed the twrp ( like descriped here : https://forum.xda-developers.com/t/recovery-unofficial-twrp-for-galaxy-z-fold4-snapdragon.4498743/ )
installed magisk
Then for nethunter
(https://www.kali.org/docs/nethunter/)
i downloaded the kernel source :
https://opensource.samsung.com/uploadSearch?searchValue=SM-F936 (my device is EUX see infos for device above)
downloaded the proper=? toolchain , there is an readme_kernel inside the kernel_source with a link to the toolchain , i am unsure about this
https://opensource.samsung.com/uploadSearch?searchValue=toolchain
there are two options i took the S22(Exynos) file ( hope thats right ?)
now we come to the difficult part :-(
first i tried to compile via the instructions on kali docs
unpack the kernel file i did and there a subfolders so i decided to use the subfolder common as the root mentioned in the docs:
you can begin by cloning our kernel builder to the root of your kernel’s folder, and prepare the environment:
from common folder i did git clone https://gitlab.com/kalilinux/nethunter/build-scripts/kali-nethunter-kernel
cd kali-nethunter-kernel
I did not change the configs as i am new to that so i know there are some exports inside the build config inside the kernel file but i dont know how get them together
./build.sh
S. Setup Environment and download toolchains.
2. Configure & compile kernel from scratch
It found the devconfig so i took it as mentioned in the docs (Select your device’s defconfig, then save and exit to start the building process.)
did not edit the kernel config till jet
and ran into the error attached in the error txt
I would like to understand how i can build the kernel the normal way , without the nethunter tool
and maybe someone could help to make this working with nethunter that would be great !
i want to understand the process and i am willing to help , so i am not asking for a final kernel , more for the way to go in general to also give the community a benefit for the next new kernel we want to port
as mentioned the docs are not the best !
thanks for your time
@yesimxev / @V3rB0se / @afaneh92 need some help here
Which toolchain to you use in nethunter kernel builder? I'd recommend clang-12.
https://android.googlesource.com/platform/prebuilts/clang/host/linux-x86/+archive/refs/tags/android-12.0.0_r12/clang-r416183b1.tar.gz
Download, extract somewhere and add it's path to kali-nethunter-kernel/config (clang-10 is the default). no need for setup environment again.
Any luck with this? i am in the same situation trying to build a nethunter kernel for my zfold4
Wanttoknowthings said:
Hey xdas,
i just received my new Samsung Galaxy z Fold 4
SAOMC_SM-F936B_OXM_EUX_12_0045 EUX /-/EUX/EUX
Kernel : 5.10.81-afaneh92-gd8d6af751972 (flashed for twrp)
I would like to install nethunter on the device with a working kernel
I tired my best to understand the docu on kali but its not the best
i am also new to compiling kernels at that level so maybe someone can help here
I attached as much as i could
So the steps i took so far is
Unlocked Bootloader
installed the twrp ( like descriped here : https://forum.xda-developers.com/t/recovery-unofficial-twrp-for-galaxy-z-fold4-snapdragon.4498743/ )
installed magisk
Then for nethunter
(https://www.kali.org/docs/nethunter/)
i downloaded the kernel source :
https://opensource.samsung.com/uploadSearch?searchValue=SM-F936 (my device is EUX see infos for device above)
downloaded the proper=? toolchain , there is an readme_kernel inside the kernel_source with a link to the toolchain , i am unsure about this
https://opensource.samsung.com/uploadSearch?searchValue=toolchain
there are two options i took the S22(Exynos) file ( hope thats right ?)
now we come to the difficult part :-(
first i tried to compile via the instructions on kali docs
unpack the kernel file i did and there a subfolders so i decided to use the subfolder common as the root mentioned in the docs:
you can begin by cloning our kernel builder to the root of your kernel’s folder, and prepare the environment:
from common folder i did git clone https://gitlab.com/kalilinux/nethunter/build-scripts/kali-nethunter-kernel
cd kali-nethunter-kernel
I did not change the configs as i am new to that so i know there are some exports inside the build config inside the kernel file but i dont know how get them together
./build.sh
S. Setup Environment and download toolchains.
2. Configure & compile kernel from scratch
It found the devconfig so i took it as mentioned in the docs (Select your device’s defconfig, then save and exit to start the building process.)
did not edit the kernel config till jet
and ran into the error attached in the error txt
I would like to understand how i can build the kernel the normal way , without the nethunter tool
and maybe someone could help to make this working with nethunter that would be great !
i want to understand the process and i am willing to help , so i am not asking for a final kernel , more for the way to go in general to also give the community a benefit for the next new kernel we want to port
as mentioned the docs are not the best !
thanks for your time
Click to expand...
Click to collapse
Great research bro , same as here.
Difference is I am doing it for M21 .
And to flash the kernel I need to do port twrp for vA12 M21 too.
Great respect bro.
Anyone can help with kernel? u need AR9271 and rtl8188EUS drivers on ysl Android 9
https://forum.xda-developers.com/t/arm64-rom-unofficial-9-0-0-ysl-lineageos-16-0-18-08-2019.3958696/ <----- this rom
Phone: codename-[ysl]
Redmi s2
i have been trying to make it myself but always gets fails
im having the same issue at this step... anyone willing to show the part on how to setup the toolchain properly>?
heres a screenshot of my issue
this is local.config file
kluongo said:
heres a screenshot of my issue
Click to expand...
Click to collapse
It shows the error, do apt install flex
yesimxev said:
It shows the error, do apt install flex
Click to expand...
Click to collapse
Will do, thanks... You know I was looking through the process and missed that line... I suppose next time I should take more time and look more carefully
kluongo said:
Will do, thanks... You know I was looking through the process and missed that line... I suppose next time I should take more time and look more carefully
Click to expand...
Click to collapse
Great, I'll add to the setup env script so it won't be missed. It shouldn't happen in the first place though