Hi guys.
I'm getting problems when I try a make for my aosp build (for my p3113)
I followed this guide: http://forum.xda-developers.com/showthread.php?t=1762641
and I git clone git://github.com/AOKP/android_device_samsung_espressowifi.git -b jb espressowifi
then ./extract-files.sh
when I'm extracting, I get some errors like
remote object '/system/lib/hw/lights.omap4.so' does not exist
341 KB/s (31320 bytes in 0.089s)
remote object '/system/media/battery_batteryerror.qmg' does not exist
remote object '/system/media/battery_charging_0.qmg' does not exist
remote object '/system/media/battery_charging_5.qmg' does not exist
Is this normal?
Btw.. I continue with . build/envsetup.sh which is done successfully
and a lunch done successfully too..
PLATFORM_VERSION_CODENAME=REL
PLATFORM_VERSION=4.1.2
TARGET_PRODUCT=full_espressowifi
TARGET_BUILD_VARIANT=userdebug
...
HOST_BUILD_TYPE=release
BUILD_ID=JZO54K
OUT_DIR=out
Finally I try a make -j4 otapackage and I got way too much errors and it stops
Can i have help please?
rainfalls said:
Hi guys.
I'm getting problems when I try a make for my aosp build (for my p3113)
I followed this guide: http://forum.xda-developers.com/showthread.php?t=1762641
and I git clone git://github.com/AOKP/android_device_samsung_espressowifi.git -b jb espressowifi
then ./extract-files.sh
when I'm extracting, I get some errors like
remote object '/system/lib/hw/lights.omap4.so' does not exist
341 KB/s (31320 bytes in 0.089s)
remote object '/system/media/battery_batteryerror.qmg' does not exist
remote object '/system/media/battery_charging_0.qmg' does not exist
remote object '/system/media/battery_charging_5.qmg' does not exist
Is this normal?
Btw.. I continue with . build/envsetup.sh which is done successfully
and a lunch done successfully too..
PLATFORM_VERSION_CODENAME=REL
PLATFORM_VERSION=4.1.2
TARGET_PRODUCT=full_espressowifi
TARGET_BUILD_VARIANT=userdebug
...
HOST_BUILD_TYPE=release
BUILD_ID=JZO54K
OUT_DIR=out
Finally I try a make -j4 otapackage and I got way too much errors and it stops
Can i have help please?
Click to expand...
Click to collapse
To build it proper you need...
https://github.com/AOKP/android_device_samsung_p3100
https://github.com/AOKP/android_device_samsung_p3113
And:
https://github.com/AOKP/vendor_samsung
for the p31xx blobs
That should get you going.
cmenard said:
To build it proper you need...
github.com/AOKP/android_device_samsung_p3100
github.com/AOKP/android_device_samsung_p3113
And:
github.com/AOKP/vendor_samsung
for the p31xx blobs
That should get you going.
Click to expand...
Click to collapse
Thanks for the reply. So if I understand correctly, the samsung_espressowifi isn't the right one I need? so i went into device/samsung/ then I git clone p3100 and p3113 there am I right?
I was wondering where do I have to clone the vendor? directly into the samsung folder?
Thanks again for your help! Greatly appreciated
rainfalls said:
Thanks for the reply. So if I understand correctly, the samsung_espressowifi isn't the right one I need? so i went into device/samsung/ then I git clone p3100 and p3113 there am I right?
I was wondering where do I have to clone the vendor? directly into the samsung folder?
Thanks again for your help! Greatly appreciated
Click to expand...
Click to collapse
Yup. Just use the links I provided and you should be able to build just fine.
cmenard said:
Yup. Just use the links I provided and you should be able to build just fine.
Click to expand...
Click to collapse
Ok. I've started from scratch, deleted all the things in the samsung folders. i git clone p3113, p3100 and vendor. So now I have p3113,p3100 and samsung_vendor folders. Do I have to pull the p31xx folders from vendor and paste it directly into the samsung one?
when I do a ./extract-files.sh, i don't have any error until there ->
180 KB/s (14268 bytes in 0.077s)
453 KB/s (45380 bytes in 0.097s)
remote object '/system/lib/libsec-ril.so' does not exist
120 KB/s (9620 bytes in 0.077s)
172 KB/s (13768 bytes in 0.077s)
My p3113 is connected with usb debugging and appears correctly in adb devices.
Plus, nothing as been added into the p3113 folders at the end of the extract-files. At the end of the extract, should a vendorsetup.sh file supposed to be created?
Sorry but I'm a noob looking to learn something
thanks
EDIT: ok I found what was wrong with the vendor.. it's not going into /device/samsung folder but /vendor/samsung/p31xx right? still having the libsec-ril issue tho..
Do you have any hint cmenard?
You have two problems. One, you need to manually add a vendorsetup.sh file to the p3113 folder. Copy one from one of the other devices, and change its only line to read something like ADD_LUNCH_COMBO_p3113. Also, if extract-files.sh gave any errors, it didn't work. I've never had any luck with the default file, I always change the two lines that have adb pull to read cp /<romlocation>/system $file and extract a JB ROM to a folder on the disk.
Posted from my Galaxy Tab with CM10
MultipleMonomials said:
You have two problems. One, you need to manually add a vendorsetup.sh file to the p3113 folder. Copy one from one of the other devices, and change its only line to read something like ADD_LUNCH_COMBO_p3113. Also, if extract-files.sh gave any errors, it didn't work. I've never had any luck with the default file, I always change the two lines that have adb pull to read cp /<romlocation>/system $file and extract a JB ROM to a folder on the disk.
Posted from my Galaxy Tab with CM10
Click to expand...
Click to collapse
Yeah I already added the vendor setup file manually. I'll resync my jb tonight maybe something went wrong. I'll have to figure out the extract file problem too. All this when I'll get back from work lol
Why are you using extract-files.sh? The reason to use it is if you don't have the vendor files for the device already downloaded, and if you look at the vendor_samsung folder, it has all the stuff you need already. All you need to do is specify the device and build after you have the source downloaded.
imnuts said:
Why are you using extract-files.sh? The reason to use it is if you don't have the vendor files for the device already downloaded, and if you look at the vendor_samsung folder, it has all the stuff you need already. All you need to do is specify the device and build after you have the source downloaded.
Click to expand...
Click to collapse
I was using it because I've followed the guide step by step but I was asking the same question myself. I'll retry again as soon as I go back home
I'm getting a bit farther now. Not compiling yet but.. will do soon.. when I'm trying to do a make -j4 otapackage, I'm getting a series and I wrote them in pastebin
http://pastebin.com/f3UP50ku
I'm using:
[email protected]:~/android$ java -version
java version "1.6.0_35"
Java(TM) SE Runtime Environment (build 1.6.0_35-b10)
Java HotSpot(TM) 64-Bit Server VM (build 20.10-b01, mixed mode)
I'm kinda lost
thanks for your help!
You have java virtual machine, but not java development kit. It's a bit difficult to find for Linux, but you can get it from http://www.cyberciti.biz/faq/howto-ubuntu-linux-install-configure-jdk-jre/
Posted from my Galaxy Tab with CM10
MultipleMonomials said:
You have java virtual machine, but not java development kit. It's a bit difficult to find for Linux, but you can get it from http://www.cyberciti.biz/faq/howto-ubuntu-linux-install-configure-jdk-jre/
Posted from my Galaxy Tab with CM10
Click to expand...
Click to collapse
Well.. this is what I've done so far
1. I downloaded java there http://www.oracle.com/technetwork/java/javase/downloads/jdk6-downloads-1637591.html (jdk-6u34-linux-x64.bin)
2. Went to terminal chmod +x jdk-6u34-linux-x64.bin
3. Then /.jdk-6u34-linux-x64.bin == install successfull
4. sudo update-alternatives --config java -> to choose the last jdk I've installed (by default, OpenJDK is installed with ubuntu instead of java jdk)
still having the same output with java -version
still having same issues
I got the same problem too when I'm trying to compile.
pastebin.co m/wcSZq6wq
it stops there and nothing.
I'm using p3113, p3110 and p3100 folder from /github.co m/AOKP/
Any idea someone?
Thanks
Finally I've been able to compile it through the end. Now time for debugging... I got a bootloop (surprising eh!?)
http ://pastebin.co m/e6STwe0E
Any help will be appreciated!
thanks!
EDIT: I've uploaded my work so far right there:
https ://docs.google.c om/file/d/0B6GzemNaw2dRY3BTT0tPWDdKYnM/edit
REMEMBER it's bootloading!
Nobody have a clue?
Related
This is the quickest and easiest way to build your own Kernel using the Android NDK
Note:I will be reffering to the following
yourusername=the username that you are logged in to
devicecode=The codename for the device you are building a kernel for(Google it on what is the code name
Click to expand...
Click to collapse
Note:I am only showing you how to make it to be flashed via CWM. If you wan't a tuttorial on how to make a boot.img comment and i will make it.
What you will need
Ubuntu 12.04 or newer
A lot of patience
Click to expand...
Click to collapse
Step 1:Installing the required files
Open a terminal and type the following (copy-paste)
Code:
sudo apt-get install -y build-essential kernel-package libncurses5-dev bzip2
This will install the packages you need
Download the kernel source code for your device (This is important. We are going to build the kernel from this)
For HTC http://htcdev.com
For Samsung http://opensource.samsung.com/
Click to expand...
Click to collapse
Find your device and click Download
Download The NDK
Move the NDK and your device Kernel source code in your home folder
Extract both the NDK and your kernel source code
Rename the folder were you have the NDK installed to NDK. And rename the folder where you have the kernel installed to Kernel
Now we are ready to build.
Step 2:Tweaking the kernel
Navigate to the kernel folder
Code:
cd /home/[COLOR="red"]yourusername[/COLOR]/Kernel
Next we need to point the NDK tools to the kernel folder
Code:
export CROSS_COMPILE=/home/[COLOR="red"]yourusername[/COLOR]/NDK/toolchains/arm-linux-androideabi-4.4.3/prebuilt/linux-x86/bin/arm-linux-androideabi-
We've pointed the NDK tolls and now we can use the NDK to tweak the kernel
Next we need to clean the previous work just incase:
Code:
make clean && make mrproper
If everything goes well you are good to go. If you have an Error(s) then something is wrong.
Now we are ready.
Next we need to add the kernel features to the NDK so we can modife them
Firs open your kernel source code folder go to arch/arm/configs
Here you will all the configs.
We need only one. Find that. It is called:Yourdevicecode_somethingbalblabla.defconfig
Rename it to maker.defconfig
Now type this in your terminal
Code:
make maker.defconfig
Now we need to tweak those configs.
Code:
make menuconfig
A user interface will pop out showing you all the tweaks you can do. I am not going to show you whow to use it. Google it(Sorry don't have that enough space)
When you are ready close the UI and click SAVE
Step 3 Building
So we tweaked the Kernel and we are ready to build.
make -j# ARCH=arm
Click to expand...
Click to collapse
Note:The # means the number of CPU cores +1. For example my device has a quad core CPU and I will type
Code:
make -j5 ARCH=arm
This will build the Kernel. It will take about 10 minutes.
Step 4: Finalizing
Now that kernel is ready you will need to find a kernel flashable zip for your device(Just google it)
Download the zip file and leave it in your home folder.
Now got to your kernel source and go to arch/arm/boot and copy zImage
Paste your Zimage to the zip file and replace it.
Now we need the WI-FI modules otherwise your WI-FI will not be working
Go to the Kernel source code folder and go to driver/net/wireless/bcm4329_204 and copy bcm4329.ko
Got the zip file go to the System folder and replace it's bcm4329.ko with your bcm4329.ko
You are ready all you need to do is flash it.
mmm..interesting...i always build without the ndk,but simpy sdk.what's the advantages?
and i usually do the git clone to download all the sources,in my case nexus7 and maguro.
thanks for this!
Well i am just waiting for Samsung to release JB sources for N7000 to start learning on how to create my own kernel
This is a pretty good base! Thanks
Sorry if this is a stupid question but do we need 64 bit like we do for ROM compiling, or will this work fine for 32 bit (I'm running Ubuntu 12.10 32 bit). Also, roughly how much is there to download? Thanks
:good: Thanks! I'm use Ubuntu 10.04 64 bit don't know if can?
HTCDreamOn said:
Sorry if this is a stupid question but do we need 64 bit like we do for ROM compiling, or will this work fine for 32 bit (I'm running Ubuntu 12.10 32 bit). Also, roughly how much is there to download? Thanks
Click to expand...
Click to collapse
I am not sure. I think you can on 32 bit try it the download takes all together about 500 MB
TheWizardOfROMs said:
I am not sure. I think you can on 32 bit try it the download takes all together about 500 MB
Click to expand...
Click to collapse
Thanks, do you know how large all the files are once installed on the system (you might have guessed I'm slightly short of space atm)
HTCDreamOn said:
Thanks, do you know how large all the files are once installed on the system (you might have guessed I'm slightly short of space atm)
Click to expand...
Click to collapse
About 700 MB
sert00 said:
mmm..interesting...i always build without the ndk,but simpy sdk.what's the advantages?
and i usually do the git clone to download all the sources,in my case nexus7 and maguro.
thanks for this!
Click to expand...
Click to collapse
What are you building? If a whole ROM like AOSP,AOKP,PA or CM then they typically bundle the toolchain/kernel with the source, making this totally unneeded.
---------- Post added at 12:18 PM ---------- Previous post was at 12:17 PM ----------
HTCDreamOn said:
Sorry if this is a stupid question but do we need 64 bit like we do for ROM compiling, or will this work fine for 32 bit (I'm running Ubuntu 12.10 32 bit). Also, roughly how much is there to download? Thanks
Click to expand...
Click to collapse
No 32-bit is fine, just install the right libraries. I actually believe that you can compile a ROM on 32-bit as well.
Self-Plug http://forum.xda-developers.com/showthread.php?t=1748297
Also just to warn users, the above defconfig convention is just that, a convention. The author of a kernel can name the defconfig whatever they want, so it is something to keep in mind.
Sent from my SCH-R950 using Tapatalk 2
thewadegeek said:
What are you building? If a whole ROM like AOSP,AOKP,PA or CM then they typically bundle the toolchain/kernel with the source, making this totally unneeded.
---------- Post added at 12:18 PM ---------- Previous post was at 12:17 PM ----------
No 32-bit is fine, just install the right libraries. I actually believe that you can compile a ROM on 32-bit as well.
Self-Plug http://forum.xda-developers.com/showthread.php?t=1748297
Click to expand...
Click to collapse
i builded some kang rom for personal use,but lately only kernels (for my nexus devices and 2 emebedded system board like in my sig.
Thanks for the guide, but unfortunately I am getting errors during compilation:
Code:
make -j3 ARCH=arm
CHK include/linux/version.h
CHK include/generated/utsrelease.h
HOSTCC scripts/kallsyms
HOSTCC scripts/bin2c
CC scripts/mod/empty.o
arm-eabi-gcc: No such file or directory
Is your PATH set correctly?
make[2]: *** [scripts/mod/empty.o] Error 2
make[1]: *** [scripts/mod] Error 2
make[1]: *** Waiting for unfinished jobs....
make: *** [scripts] Error 2
I am trying to compile the Andromadus 3.0 kernel for HTC Vision, I'd really appreciate some help. I'm using Ubuntu 12.10 32 bit and the Android NDK.
TheWizardOfROMs said:
This is the quickest and easiest way to build your own Kernel using the Android NDK
Note:I will be reffering to the following
Note:I am only showing you how to make it to be flashed via CWM. If you wan't a tuttorial on how to make a boot.img comment and i will make it.
What you will need
Step 1:Installing the required files
Open a terminal and type the following (copy-paste)
Code:
sudo apt-get install -y build-essential kernel-package libncurses5-dev bzip2
This will install the packages you need
Download the kernel source code for your device (This is important. We are going to build the kernel from this)
Find your device and click Download
Download The NDK
Move the NDK and your device Kernel source code in your home folder
Extract both the NDK and your kernel source code
Rename the folder were you have the NDK installed to NDK. And rename the folder where you have the kernel installed to Kernel
Now we are ready to build.
Step 2:Tweaking the kernel
Navigate to the kernel folder
Code:
cd /home/yourusername/Kernel
Next we need to point the NDK tools to the kernel folder
Code:
export CROSS_COMPILE=/home/yourusername/NDK/toolchains/arm-linux-androideabi-4.4.3/prebuilt/linux-x86/bin/arm-linux-androideabi-
We've pointed the NDK tolls and now we can use the NDK to tweak the kernel
Next we need to clean the previous work just incase:
Code:
make clean && make mrproper
If everything goes well you are good to go. If you have an Error(s) then something is wrong.
Now we are ready.
Next we need to add the kernel features to the NDK so we can modife them
Firs open your kernel source code folder go to arch/arm/configs
Here you will all the configs.
We need only one. Find that. It is called:Yourdevicecode_somethingbalblabla.defconfig
Rename it to maker.defconfig
Now type this in your terminal
Code:
make maker.defconfig
Now we need to tweak those configs.
Code:
make menuconfig
A user interface will pop out showing you all the tweaks you can do. I am not going to show you whow to use it. Google it(Sorry don't have that enough space)
When you are ready close the UI and click SAVE
Step 3 Building
So we tweaked the Kernel and we are ready to build.
Note:The # means the number of CPU cores +1. For example my device has a quad core CPU and I will type
Code:
make -j5 ARCH=arm
This will build the Kernel. It will take about 10 minutes.
Step 4: Finalizing
Now that kernel is ready you will need to find a kernel flashable zip for your device(Just google it)
Download the zip file and leave it in your home folder.
Now got to your kernel source and go to arch/arm/boot and copy zImage
Paste your Zimage to the zip file and replace it.
Now we need the WI-FI modules otherwise your WI-FI will not be working
Go to the Kernel source code folder and go to driver/net/wireless/bcm4329_204 and copy bcm4329.ko
Got the zip file go to the System folder and replace it's bcm4329.ko with your bcm4329.ko
You are ready all you need to do is flash it.
Click to expand...
Click to collapse
will work with an ics device like amazon kindle fire?
Sent from my KFTT using xda app-developers app
HTCDreamOn said:
Thanks for the guide, but unfortunately I am getting errors during compilation:
Code:
make -j3 ARCH=arm
CHK include/linux/version.h
CHK include/generated/utsrelease.h
HOSTCC scripts/kallsyms
HOSTCC scripts/bin2c
CC scripts/mod/empty.o
arm-eabi-gcc: No such file or directory
Is your PATH set correctly?
make[2]: *** [scripts/mod/empty.o] Error 2
make[1]: *** [scripts/mod] Error 2
make[1]: *** Waiting for unfinished jobs....
make: *** [scripts] Error 2
I am trying to compile the Andromadus 3.0 kernel for HTC Vision, I'd really appreciate some help. I'm using Ubuntu 12.10 32 bit and the Android NDK.
Click to expand...
Click to collapse
Check your toolchain definition, looks like your path is wrong.
thewadegeek said:
Check your toolchain definition, looks like your path is wrong.
Click to expand...
Click to collapse
Thanks, you're right my path was wrong, but now I have fixed all the problems and it appears to compile successfully however there is no zImage in arch/arm/bin. Any suggestions? Thanks
HTCDreamOn said:
Thanks, you're right my path was wrong, but now I have fixed all the problems and it appears to compile successfully however there is no zImage in arch/arm/bin. Any suggestions? Thanks
Click to expand...
Click to collapse
Try building it again. Be sure to clean the source folder before you start
TheWizardOfROMs said:
Try building it again. Be sure to clean the source folder before you start
Click to expand...
Click to collapse
Thanks very much, I'd been recommended using Linaro tool chain instead and it works perfectly now, booting and WiFi and all. If I can learn some more advanced modding stuff to do to it then I'll release it in the Vision forums and I'll make sure to link to this guide
I installed Ubuntu on my windows laptop.my computer stars are 3Gigs of memory with 140 Gigs of available free space.Do I have enough space and is my laptop good enough to build kernels on.and I do use Ubuntu 12.04 to build kernels correct.I'm sorry I'm all new to this I just would like to be able to build a kernel for my sensation and HTC one which I will have next week.thanks very much for your time and expertise.
Sent from my HTC Sensation using xda app-developers app
rp56 said:
I installed Ubuntu on my windows laptop.my computer stars are 3Gigs of memory with 140 Gigs of available free space.Do I have enough space and is my laptop good enough to build kernels on.and I do use Ubuntu 12.04 to build kernels correct.I'm sorry I'm all new to this I just would like to be able to build a kernel for my sensation and HTC one which I will have next week.thanks very much for your time and expertise.
Sent from my HTC Sensation using xda app-developers app
Click to expand...
Click to collapse
I compiled with Ubuntu 12.10 and only 2 GB of RAM, and only 30GB free space. The tool chain and kernel really doesn't use up much room at all. As long as you don't go OTT on the -jx bit (I do -j3 as I've got a lowly core 2 duo) you should be fine. By the way if you get errors and you're path is definitely correct, then try with the Linaro tool chain instead.
got an error something like, "make ** [vm.virtual], waiting for unfinished jobs..." then stops, going to try new defconfig and new toolchain
Hi all!
Many of us are dreaming of having a real native desktop operating system on Galaxy Note 10.1 as a second system. Of course, the software there is not touch-optimized, but you can attach keyboard and mouse via USB-OTG and Bluetooth and imagine it's a netbook
exception13 showed us that it's possible and shared his work on in a forum and repo. X-Stranger could use it and shared compiled images of ArchLinux. But what if you want to do something more specific for your own needs and you are not such a great developer as both of them are?
My project is for all of you who want to have native GNU/Linux, who want to participate but don't know how yet. It's a guide how to build it from scratch. The problem is - I am not a superdev too and I couldn't do many things. Frankly speaking, all the remaining things seem to be small but I don't know how to overcome them. Maybe it's because I'm studying economics but not programming
Link to the guide.
I need help from anyone who knows how to overcome any of the problems on every step! Everything I managed to do by myself is already written there and currently I have a compiled kernel which is booting a partition on external SD but it freezes there.
If you have any ideas - you can just make a pull request out of Github's webinterface, if you don't know how to edit this html but know something about building Linux - you are welcome to open an issue or write it here and I will include it in the guide.
Let's make our Galaxy Note 10.1 better together!
,I just got my Note 101.1 earlier today. I'll look into the missing information and add to the webpage. Is there anything that you think I should look into first?
I actually had a question.
Looks like you have the section "Harder Way - how to prepare binaries" split into Ubuntu and Arch. Instructions for compiling the kernel are the same.
I guess my question is why the choice to show the arch kernel being compiled under arch?
Might be easier to read the guide with all the kernel compiling done in Ubuntu.
**Edit**
What I didn't originally mention is that i really like it. Hoping to help contribute as well.
darksabre_x said:
I actually had a question.
Looks like you have the section "Harder Way - how to prepare binaries" split into Ubuntu and Arch. Instructions for compiling the kernel are the same.
I guess my question is why the choice to show the arch kernel being compiled under arch?
Might be easier to read the guide with all the kernel compiling done in Ubuntu.
**Edit**
What I didn't originally mention is that i really like it. Hoping to help contribute as well.
Click to expand...
Click to collapse
Good question. The reason for that are that despite how close Arch Linux and Ubuntu are, the environments are different. Ubuntu usually has some sort of bash completion enabled by default whereas Arch Linux doesn't and of course each of them requires diferent packages installed to perform the same functions. I believe thermatk did each distro separately as to make things simpler for the end user. Pick a distro and go as each distro's guide can be tuned independent of the others.
Soul_Est said:
Good question. The reason for that are that despite how close Arch Linux and Ubuntu are, the environments are different. Ubuntu usually has some sort of bash completion enabled by default whereas Arch Linux doesn't and of course each of them requires diferent packages installed to perform the same functions. I believe thermatk did each distro separately as to make things simpler for the end user. Pick a distro and go as each distro's guide can be tuned independent of the others.
Click to expand...
Click to collapse
Doesn't really answer my question considering the end kernel will be the same regardless of the distro being used. I think you took my question as "Why are there 2 options for kernel compilation?", which wasn't what I was asking.
Looks like thermatk actually addressed the question with a page update.
It now gives separate options depending on which distro you want to end up with on your Note 10.1, in addition to separate kernel compilation options.
What I was referring to was when it was Ubuntu only instructions from kernel compilation all the way to deployment on the tablet and Arch only instructions. The kernel and linux image instructions weren't independent of each other, as they currently are.
Update
I'm really happy to hear that someone else wants to use it and contribute! :victory:
darksabre_x, you are right I separated the guide into parts yesterday because the system where you compile kernel doesn't really affect anything on the tablet.
Soul_Est, thank you for helping with questions in the thread :good:
Now I understand that tabs are not the best way to do it, will start this day from trying to rewrite this to a navbar constantly on top which lets you choose options from a dropdown.
Also yesterday got the guide to the point when one path through can get ypu to a bootable distro! You can compile kernel wherever you want, you should be on stock based rom and choose to install Arch on separate partition which probably will be a partition on SD. What you have to add at the end is
Code:
pacman -S lxde
and copy xorg.conf from X-Stranger's post. Once rebooted, you will be able to enter android:changeme and
Code:
sudo lxdm
and the gui will start if you don't have USB-OTG and keyboard you won't be able to enter password but you can poweroff from the interface's right corner :good: Attention: if gui says that it has no permissions to write logs do
Code:
sudo mount -n -o remount, rw /
and retry but do not forget to write here about it!
What are the current problems:
Why exception13 and X-Stranger both hardcoded the whole cmdline for kernel and forced it not to be changeable from bootloaders. It's easy to fix in the config but there should have been some idea or i'm paranoic?
What's wrong with LinuxDeploy, separate partitions and CyanogenMod? hiruna filed a bug but meefik seems to be away for a week. If anyone else with CM has an idea on how to overcome this maybe with some special unmount commands CM is thinking that ext4 partition is th extSdCard and mounts it so that LinuxDeploy can't install anything there (seems that it's the problem) while stock can't mount ext4 as extsdcard and is not touching the partition.
How do we make Debian/Ubuntu to boot? Both ways - for separate partition and img are stuck one the problem that not any mkinitramfs or abootimg or their combinations could get to a better state than initramfs shell. Separate partition should be easier so focus should be on it for the start.
Adapt X-Stranger's guide about booting Arch from *.img. It's there and should be tested, rewritten and easied and some whitespaces should be filled. I know there are some as i have spent many hours in Arch with little dirty hacks like
Code:
ln -s /proc/self/fd /dev/fd
that are needed but no one ever wrote that they are.
What's wrong with basic video? While we get bootable Arch if you add lxdm and xorg.conf it should work with lightdm and boot there without console commands. If you try to install lightdm you will get nothing but a black screen if you start it with
Code:
sudo lightdm
... and it should boot automatically without touching console.
Oh and why is kernel from exception13 not building at all? XD
Redesign #2
Anyone dislikes the new design idea with navbar selectors instead of tabs?
I hope it's better.
Will soon update the guide with last steps to have Arch with LXDE bootable from separate partition.
That's fun as I started this project to get Ubuntu working... :angel:
If anyone can understand what should be done with mkinitramfs to make debian/ubuntu rootfs bootable - please do it.
First success!
If you choose any pc distro, arch on sgn with lxde on a seaprate partition you will now get a fully working guide that will give you a native bootable GNU/Linux =)
That's first success for me but still i hope to get help as i don't know things I asked two posts ago and it's difficult to move forward.
XFCE problems
XFCE is booting (not in the guide yet) but for working with fingers in XFCE one should probably disable multitouch S-pen works fine.
http://lists.x.org/pipermail/xorg/2012-July/054626.html
http://xfce.10915.n7.nabble.com/Xfwm-window-borders-do-not-respond-to-touch-screen-td17348.html
Will find a way to enable onscreen keyboard on LightDM and update the guide with XFCE. Still I was hoping to make it my primary DE and they are not supporting fingers moving windows upstream :crying:
I was hoping to contribute this weekend but unfortunately my only machine is down after mucking up the /lib folder when heimdall. To add insult to injury, I have no backups. Installing Arch Linux or Debian and configuring everything to my liking again will take a few hours.
Sent from my GT-N8010 using Tapatalk 2
How to setup WiFi using wpa_supplicant.conf
How to setup WiFi using wpa_supplicant.conf
1. Copy the "wifi" folder to "/opt"
- You will need gedit to edit the nameservers.
- You also need two dependencies before installing gedit.
- The two dependencies are : gtksourceview3-3.6.1-1-armv7h.pkg.tar.xz and libpeas-1.6.1-1-armv7h.pkg.tar.xz
2. Download them and copy over to ArchLinux
3. Install the dependencies first then gedit:
Code:
sudo pacman -U gtksourceview3-3.6.1-1-armv7h.pkg.tar.xz
sudo pacman -U libpeas-1.6.1-1-armv7h.pkg.tar.xz
sudo pacman -U gedit-3.6.2-2-armv7h.pkg.tar.xz
4. insmod the drivers:
***NOTE*** " 3.0.31-gedcc915 " is my kernel name. Change it to your
kernel name if it is different.
Code:
sudo insmod /lib/modules/3.0.31-gedcc915/kernel/net/wireless/cfg80211.ko
sudo insmod /lib/modules/3.0.31-gedcc915/kernel/drivers/net/wireless/bcmdhd/dhd.ko op_mode=0 firmware_path=/opt/wifi/bcmdhd_sta.bin nvram_path=/opt/wifi/nvram_net.txt_murata
5. Enable the wlan0:
Code:
sudo ip link set wlan0 up
6. Setup wpa_supplicant and ip address:
Code:
sudo wpa_supplicant -B -i wlan0 -Dwext -c /etc/wpa_supplicant/wpa_supplicant.conf
sudo ip addr add 192.168.1.33/24 dev wlan0
sudo ip route add default via 192.168.1.1
7a. Add nameservers:
Code:
sudo gedit /etc/resolv.conf
7b. Go to the next available line and type:
Code:
nameserver 8.8.8.8
7c. Next line :
Code:
nameserver 8.8.4.4
7d. Save it
8. Go back to the terminal and edit the wpa_supplicant file:
Code:
sudo gedit /etc/wpa_supplicant/wpa_supplicant.conf
- wpa_supplicant.conf file should be like this:
Code:
ctrl_interface=/var/run/wpa_supplicant
eapol_version=1
network={
ssid="NETWORKNAME"
scan_ssid=1
proto=RSN
key_mgmt=WPA-PSK
pairwise=CCMP TKIP
psk="NETWORKPASSWORD"
}
9. And finally, to connect to your network, run
Code:
sudo dhcpcd
Open up a web browser and enjoy!
:good: :good: :good:
WiFi
I am currently including WiFi in the main guide as it's something everyone needs :laugh:
Soul_Est said:
I was hoping to contribute this weekend but unfortunately my only machine is down after mucking up the /lib folder when heimdall. To add insult to injury, I have no backups. Installing Arch Linux or Debian and configuring everything to my liking again will take a few hours.
Sent from my GT-N8010 using Tapatalk 2
Click to expand...
Click to collapse
I will be happy if you join :good:
thermatk said:
I will be happy if you join :good:
Click to expand...
Click to collapse
I'll get right on the Arch Linux instructions once I get an Arch based OS installed. Hopefully that'll be tomorrow.
Written on my Galaxy Note 10.1
is this project dead ?
Equilibrio said:
is this project dead ?
Click to expand...
Click to collapse
Great job! This is awesome.
Anyone else having dependency conflicts with bluez and obexd-client?
cctoro said:
Great job! This is awesome.
Anyone else having dependency conflicts with bluez and obexd-client?
Click to expand...
Click to collapse
I did before but it really depends on what you have install at the time when you do the update.
Having a small issue
Ok, so I followed all the instructions and set the kernel up to boot from mmcblk1p2 (my ext4 partition on my sdcard I made for linux), and used dd to copy the prebuilt arch to the partition, and it boots and eveything seems to work but the wifi.... I repeated the process from the beginning all over and recompiled to make sure i didn't miss anything, but still no wifi... And since I'm using the prebuilt image copied to the sdcard for the distro, and everything works in it if i boot the .img from the internal storage and use the premade recovery, I'm assuming maybe there's something missing from compiling the kernel? In either case, if anyone has any ideas about this, please help, or if someone can make a properly compiled recovery.img that boots from mmcblk1p2, that would be super awesome.... I'm only mediocre in linux skill so any help would be appreciated!
K, so i was an idiot and forgot to copy the compiled kernel modules to /lib........ OOPS!
Arch linux distro booting from mmcblk1p2 with 1p3 as swap... all work awesome! Working on dri2 for the mali now.....
Sent from my GT-N8013 using xda app-developers app
Could you post a prepared .IMG, possibly? Thanks.
Sent from my GT-N8013 using xda app-developers app
I have a Nook Simple Touch, BNRV300, and I have successfully modified uRamdisk to gain root shell access with ADB over USB (Thanks Renate!). I am currently on firmware version 1.2.1.
I know this may seem like heresy to some here, but I really do not want or need to root my NST and add a number of apps I won't use anyway. I have a fully rooted Nexus 7 for that sort of thing.
All I would like to be able to do is turn off the need to swipe to unlock when returning from sleep, and modify the text on the screensaver overlay.
I have discovered, by the way, that sqlite3 does not seem to be available on this NST, as when trying to use it via ADB shell, it says "sqlite3: not found".
SO, there we are... I would greatly appreciate any assistance offered.
MildBill
P.S. I have tried Nook Manager, and while it did what I wanted, there were many things added that I just have no need for. And, battery drain seemed to double.So, it had to go.
Regarding SQLite3.
Since the guts of it (libsqlite.so) is already in the Nook, you only need the command line executable (sqlite3).
It's here: http://forum.xda-developers.com/showthread.php?p=50958855#post50958855
Unzip it, stick it in /system/bin, chmod 755 it.
Renate NST said:
Regarding SQLite3.
Since the guts of it (libsqlite.so) is already in the Nook, you only need the command line executable (sqlite3).
It's here: http://forum.xda-developers.com/showthread.php?p=50958855#post50958855
Unzip it, stick it in /system/bin, chmod 755 it.
Click to expand...
Click to collapse
Ahh, once again, thank you Renate. Now if I can get some idea on my main questions...
There are no simple questions here. Even the answers are complicated.
Many people have created solutions and packed them into these "manager" things.
I finally got around to doing my own minimal one.
It's packaged up in nook121patch.zip (in the signature).
Code:
C:\>adb pull /system/framework/android.policy.jar
C:\>apktool d android.policy.jar \AP
C:\>mergesmali /v C:\AP\smali C:\Nook121Patch\KeyguardViewMediator.smali
C:\>apktool b C:\AP android.policy.jar
C:\>adb shell stop
C:\>adb mount -o rw,remount /dev/block/mmcblk0p5 /system
C:\>adb push android.policy.jar /system/framework/
C:\>adb shell chmod 644 /system/framework/android.policy.jar
C:\>adb shell reboot
Renate NST said:
There are no simple questions here. Even the answers are complicated.
Many people have created solutions and packed them into these "manager" things.
I finally got around to doing my own minimal one.
It's packaged up in nook121patch.zip (in the signature).
Click to expand...
Click to collapse
Well Renate, I hate to complicate your answer any more than necessary, but...
On the Temblast page that clicking on your signature takes me to, I do see mergesmali, one of the two tools I will need based on the instructions you gave. I do not see nook121patch.zip, nor apktool, however. Where can I find these?
Also, can you tell me something about what this will do for me?
I hate to be such a noob, I have just enough knowledge to be dangerous. Thanks again for all your help, sorry I have to keep asking for more.
MildBill
Well, I wasn't that clear.
mergesmali is in the signature, nook121patch.zip is on the mergesmali project page too.
Apktool is detailed and linked here: http://forum.xda-developers.com/wiki/Apktool
There are many patches in the nook121patch.zip
You can apply them selectively.
.jar is easy, they don't need signing.
.apk is trickier they must be signed.
System .apk is even trickier, they must be signed with the system signature.
The KeyguardViewMediator.smali will make that your Nook just opens with a push of the power button and no swipe.
Renate NST said:
Well, I wasn't that clear.
mergesmali is in the signature, nook121patch.zip is on the mergesmali project page too.
Apktool is detailed and linked here: http://forum.xda-developers.com/wiki/Apktool
Click to expand...
Click to collapse
Ahh! Well, my bad, I should have tried harder. And, yet again, thanks. Nook users owe you much, Renate!
MildBill
Renate NST said:
Code:
C:\>adb pull /system/framework/android.policy.jar
Click to expand...
Click to collapse
OK so far, and (I think) I have apktool properly installed, then realized I also needed to install the Java Development Kit as well to use it, which I managed to do. But, when I try to do
Code:
C:\>apktool d android.policy.jar \AP
I get
Code:
Input file (\AP) was not found or was not readable.
as a response.
So, I guess I need to return to the magic well of your knowledge for further assistance and/or instruction.
To which I can only add...
HELP!
EDIT: By the way, I am using an adb.exe implementation from another root kit I have installed, not the standard installation from the SDK. Is this perhaps part of my problem?
Well, something goofy is going on there.
Type just apktool and get the usage and version.
\AP in this case is the destination directory.
It should not already exist or else you get a warning.
Maybe the input file (the jar) can't be found, but the error message is wrong?
Code:
C:\>apktool
Apktool v1.5.2 - a tool for reengineering Android apk files
Copyright 2010 Ryszard Wi?niewski <[email protected]>
with smali v1.4.1, and baksmali v1.4.1
Code:
C:\>apktool d C:\nook121\system\framework\android.policy.jar \AP
I: Baksmaling...
I: Copying assets and libs...
Code:
C:\>apktool d C:\boguspath \BogusDir
Input file (C:\boguspath) was not found or was not readable.
Renate NST said:
Well, something goofy is going on there.
Type just apktool and get the usage and version.
Click to expand...
Click to collapse
Well, there ya go... I got apktool v2.0.0b9.
I can get 1.5.2, but will it work with Java 7? Oh well, live and learn I guess...
MildBill
Oh, well, then the 2.0 probably uses different args.
"apktool" by itself will tell you the order of arguments.
To run anything on the desktop the Java 7 runtime environment is fine.
To compile an Android application you have to use Java 6.0 SDK.
Renate NST said:
Oh, well, then the 2.0 probably uses different args.
"apktool" by itself will tell you the order of arguments.
To run anything on the desktop the Java 7 runtime environment is fine.
To compile an Android application you have to use Java 6.0 SDK.
Click to expand...
Click to collapse
Well then, since it appears from the changes that 2.0 requires the Java 7 SDK, I guess I'll uninstall it all and get 1.5.2 and Java 6.
I'm running desktop applications:
Code:
C:\>java.exe -version
java version "1.7.0"
Java(TM) SE Runtime Environment (build 1.7.0-b147)
Java HotSpot(TM) Client VM (build 21.0-b17, mixed mode, sharing)
I'm compiling Android applications with:
Code:
C:\>javac.exe -version
javac 1.6.0_38-ea
apktool runs under the JRE, version 1.7 is fine.
OK, finally got around to completing the instructions as posted, and except for having to add the command 'shell' to the mount statement, everything worked fine. And, it accomplishes exactly what I was after.
Next I may look into trying your library and reader apps.
Thanks again!
MildBill
P.S. You might consider rewriting the readme file included in nook121patch.zip to better describe what each patch does.
The readme is admittedly very old.
That's because I forgot that it's even there!
Each of the individual smali files has comments at the head saying what it does.
I'll make something to compile the individual comments into a single readme.
I can also report, at this point, that unlike an other method I have tried to accomplish this simple task, this one does NOT run thru battery life like it was going out of style.
The next most popular option, NookManager, which uses the NookModManager to do this fix, uses an average of 10% battery life every day, even when in in sleep mode the whole time. Turning the option off (I.E. reinstating the swipe to unlock) again reduces battery drain to a more normal point.
But, the fix by Renate seems to use nomorebattery than the stock reader, whether reading, sleeping, with WiFi on or off. I like it!
Once again, Renate, thank you very much for this, and for all you have done for the Nook community.
MildBill
So i noticed while searching around to fix things on my device there was a lack of linux support in general, and almost none for the S5, so I thought I would make a support thread for any linux users. This thread will be mainly for posting how-to's for linux but can also be a place to ask any questions you have.
HOW-TO'S:
How to install adb
I'm on linux mint, and this tutorial is based off of how to threads for linux mint, but there shouldn't be much difference in commands other than filenames.
To start you'll need to download the sdk, then run these commands one at a time.
Code:
cd ~
tar -zxvf ~/[download path here]/android-sdk_r23.0.2-linux.tgz
mv android-sdk-linux android
Then we need to update the SDK.
Code:
cd ~
android/tools/android
This should bring up the android SDK manager, the ones you'll want to update/install are:
-Everything under "Android 4.4.2 (API 19)
-Under the tools dropdown, check "Android SDK tools", "Android SDK Platform-tools" and "Android SDK Build-tools" revision 20
Once all that is done you'll need to set your path to include adb.
Code:
cd ~
gedit .bashrc
In the text editor that opens paste the following then save and exit
Code:
export PATH=${PATH}:~/android/sdk/platform-tools
Then we need to make it executable
Code:
cd ~
chmod a+x .bashrc
Then you need to setup device rules
Code:
cd ~
sudo gedit /etc/udev/rules.d/51-android.rules
There is a list of vendor IDs on the android dev website, but for this case Samsung's ID is 04e8 so just paste the following then save and exit.
Code:
SUBSYSTEM=="usb", ATTR{idVendor}=="04e8", MODE="0666"
Then we need to make the rules executable
Code:
cd ~
sudo chmod a+x /etc/udev/rules.d/*
Then you should be able to use adb from terminal once you plug your phone in and just do "adb devices" and a prompt should come up on your phone, if it doesnt make sure you have USB debugging enabled on your phone, if it is then unplug your phone and run
Code:
adb kill-server
adb start-server
Then plug your device back in and do "adb devices".
If you are having issues with the server not starting with sufficient permissions you need to add the full path to adb start-server to rc.local, this can be done with the folowing commands.
Code:
cd ~
sudo gedit /etc/rc.local
Then you will need to paste the following above exit 0
Code:
/home/[path]/android/platform-tools/adb start-server
Make sure to replace [path] with the actual name of your home directory then save and exit and reboot your computer, you should be able to use adb properly now.
How to flash odin image files
UNTESTED ON S5
If you have no windows computer available or do but would like to flash on linux, you can try heimdall, but apparently it doesnt fully support the s5 by default and would need to have a patch made to support the new protocol, it may work I havent had a chance to test it though. Another option is jOdin, that has a more familar interface but it has a heimdall backbone afaik so you still need a patch, so for now until said patch is made by the dev or by someone in the community, or it is tested, the only option is get to a windows computer. This section will be updated once one of the two is done.
Thanks so much, I can't believe there isn't more activity in here. I'm about to set my brand new s5 up (root, recovery) using ubuntu, so I'll post what I've learned in here : )
skorasaurus said:
Thanks so much, I can't believe there isn't more activity in here. I'm about to set my brand new s5 up (root, recovery) using ubuntu, so I'll post what I've learned in here : )
Click to expand...
Click to collapse
Nice, tell us how you doing, if you can flash a Firmware with Linux.
ice [N]ation
There is a gs5 pull request on the heimdall github, this could be good....
Sent from my SM-G900P using XDA Free mobile app
I am still getting a handshake error, is it working for anybody else?
miked63017 said:
I am still getting a handshake error, is it working for anybody else?
Click to expand...
Click to collapse
I got it to output my pit file, will test flashing tomorrow and maybe do a pull request or fork if it works.
Users of Debian Wheezy must install libusb-1.0-0-dev from wheezy-backports before compiling Heimdall (apt-get -t wheezy-backports install libusb-1.0-0-dev). I had no luck using it to get anything useful out of my S5.
My experiences in rooting my phone are detailed here: http://forum.xda-developers.com/gal...-build-date-june-3-2014-t2891621/post55826720. I suppose that once Heimdall is modified to talk fluently with the S5, then http://forum.xda-developers.com/att-galaxy-s5/general/g900and3tong3keeprootota-zip-t2862299 should make for a good model for this guide.
dgriffi said:
Users of Debian Wheezy must install libusb-1.0-0-dev from wheezy-backports before compiling Heimdall (apt-get -t wheezy-backports install libusb-1.0-0-dev). I had no luck using it to get anything useful out of my S5.
My experiences in rooting my phone are detailed here: http://forum.xda-developers.com/gal...-build-date-june-3-2014-t2891621/post55826720. I suppose that once Heimdall is modified to talk fluently with the S5, then http://forum.xda-developers.com/att-galaxy-s5/general/g900and3tong3keeprootota-zip-t2862299 should make for a good model for this guide.
Click to expand...
Click to collapse
Yes heimdall will work once it can talk to the s5. However, i have ran into that same problem with the tar that was mentioned in that second link. I have noticed that some files i download from the rogerwilco sites give me that issue, the all in ones from there work fine though. Did you download that tar from the rogerwilco site? Other times it has happened to me was because of a bad download, and redownloading fixed my problem. If the tar is corrupt, even heimdall wont help.
BTW i used libusb-1.0 source from github, heimdall source from github and modified heimdall source in a few places based on the simple usb logger output i got when flashing with odin. I dont think my patches would ever be merged in because it might break compatibility with other models since i had to change the buffer size. Also, i work on opensuse 64bit 13.1, in case anybody ends up trying to follow along. I plan on trying a flash a little later today.
miked63017 said:
Yes heimdall will work once it can talk to the s5. However, i have ran into that same problem with the tar that was mentioned in that second link. I have noticed that some files i download from the rogerwilco sites give me that issue, the all in ones from there work fine though. Did you download that tar from the rogerwilco site? Other times it has happened to me was because of a bad download, and redownloading fixed my problem. If the tar is corrupt, even heimdall wont help.
BTW i used libusb-1.0 source from github, heimdall source from github and modified heimdall source in a few places based on the simple usb logger output i got when flashing with odin. I dont think my patches would ever be merged in because it might break compatibility with other models since i had to change the buffer size. Also, i work on opensuse 64bit 13.1, in case anybody ends up trying to follow along. I plan on trying a flash a little later today.
Click to expand...
Click to collapse
I downloaded from sammobile.com.
Well flashing was a no go, and i cant get consistently working setup ATM. Maybe i will poke around some more throughout the week.
No way,
*with libusb
*with kernel compiled with 32 and 64 bits,
*Debian, LMDE and Ubuntu 14.04.1 (I'm using the latter).
*with jodin3 from my notebook and from the web all with negative results.
Might as well try to flash with heimdall from TTY?
ice [N]ation
Not much progress other than learning a lot about libusb, anybody else have any luck?
miked63017 said:
Not much progress other than learning a lot about libusb, anybody else have any luck?
Click to expand...
Click to collapse
I don't think so :/
ice [N]ation
Any news?
ice [N]ation
As i said, i discusssed it with miked63017, and he informed me there needs to be a modification to get heimdall to work with the s5, this was also mentioned earlier in the thread, jOdin fram what i can tell is a java front end for heimdall so same situation. As was also mentioned a fork was made of heimdall mentioning the s5, that may be worth testing, otherwise something needs to be worked on, privately or as a group.
Sent from my SM-G900A using Tapatalk
Well, I'm willing to help in my humble place
ice [N]ation
Rakuu said:
As i said, i discusssed it with miked63017, and he informed me there needs to be a modification to get heimdall to work with the s5, this was also mentioned earlier in the thread, jOdin fram what i can tell is a java front end for heimdall so same situation. As was also mentioned a fork was made of heimdall mentioning the s5, that may be worth testing, otherwise something needs to be worked on, privately or as a group.
Sent from my SM-G900A using Tapatalk
Click to expand...
Click to collapse
I tested the fork with no luck. Then the thought crossed my mind to rewrite it in ruby, because I am alot better with it than I am with c++. I started, only got as far as finding the device, but it is really ambitious and will take a long time to complete. If anybody thinks they can help I will put it on githib, but be warned it is in really early stages. Let me know otherwise I will keep it to myself until its further along.
Was anyone ever able to get heimdall working on your S5 in Linux? I have been having similar problems getting it to run in Xubuntu 14.10 with my Note 4.
I compiled Heimdall with the S5 patch, even installed the latest libusb, no luck whatsoever. I am getting the following error:
Code:
Initialising protocol...
ERROR: Failed to receive handshake response. Result: -7
ERROR: Protocol initialisation failed!
I just came across this, but didn't try it out yet.
DieHappy said:
Was anyone ever able to get heimdall working on your S5 in Linux? I have been having similar problems getting it to run in Xubuntu 14.10 with my Note 4.
I compiled Heimdall with the S5 patch, even installed the latest libusb, no luck whatsoever. I am getting the following error:
Code:
Initialising protocol...
ERROR: Failed to receive handshake response. Result: -7
ERROR: Protocol initialisation failed!
I just came across this, but didn't try it out yet.
Click to expand...
Click to collapse
Never got it working but might try your link tomorrow if i have time
Sent from my SM-G900P using XDA Free mobile app
Okay I don't have enough time to update this whole description, no one volunteered to host the VM so now I only have a Debian Buster WSL2 (Windows 10 latest) build environment. You can make kernels and ROMs from it. It has a built in XFCE4 and all the features listed below. It will build kernels for you from source and place them in AnyKernel3 zip files ready for flashing in the ~/ directory. Build scripts are provided for Op8T 5G custom and GPUOC RadioActive Kernels from my GitHub (modded for performance + battery). You can use this guide and get full audio and a GUI and all you need to build.
Try out this build for Debian Buster for WSL2:
First you need to ensure you are on a recent build of Windows, go to windows Updates in settings and download the latest.
Next open a Powershell Command Prompt in Admin mode. Type:
dism.exe /online /enable-feature /featurename:Microsoft-Windows-Subsystem-Linux /all /norestart
Enable-WindowsOptionalFeature -Online -FeatureName VirtualMachinePlatform -NoRestart
Restart your PC, then get back into an Admin Powershell prompt and type:
wsl --set-default-version 2
Next you can download this tar.gz distribution, it's quite big (6GB zipped -> 14GB unzipped). Apparently you can import a tar.gz directly, so I changed it from a .zip file to .gz: https://mega.nz/file/DkARXIjD#hGu8TjxaA__YrRsfqfWJw9-2ViyyntyK5U8JdClor6A
Easily move WSL distributions between Windows 10 machines with import and export!
wsl --import <DistributionName> <InstallLocation> <Full path to .tar/.tar.gz FileName>
After import, you should type: login: user password: user (also the sudo password) change the Global Git settings to your own email and username.
Open the command line.
Set your username: git config --global user.name "FIRST_NAME LAST_NAME"
Set your email address: git config --global user.email "[email protected]"
Then if you want to set up SSH between your WSL2 instance and NoMachine, download NoMachine here for your host PC: https://www.nomachine.com/download/download&id=8 then follow the steps to generate an SSH key, which will be located at ~/.ssh.
ssh-keygen -m PEM -t rsa -b 4096
Use the directory default ~/.ssh/
Then copy this file: ~/.ssh/id_rsa.pub to ~/.nx/config/authorized.crt
In the NoMachine GUI, you should select Configuration, Use a key based authentication key which you provide, then provide the path to the private key \\wsl$\debian\home\user\.ssh\id_rsa and check the box Import the key to the connection file.
To get to the XFCE4 GUI, you should type login: user password: user, then run /.nomachine.sh
It will post the IPV6 address you need to enter into the configuration into NoMachine on Windows 10. It changes every time you open it (WSL2 problem).
Now you should be able to connect to the GUI and use all the dev tools built in. Or you can just use the command line if you're more comfortable there. You'll probably need to do some more Googling to get everything setup the way you like. There are 2 examples in this file for an Op8T RadioActive modded kernel from my GitHub repos with a ./Build-Clang12.sh script you can use to see how to build a kernel. It it fully automatic. It will generate the zip specified in that file in the ~/ directory which can be flashed to a device via EX Kernel Manager or FK Kernel Manager. Best of luck!
Great job mate. I hope this is the kick off and boost up kernel development on the MI9 ??
Now THAT is what XDA is all about.
I'd like to get in to this type of development but simply don't have the personal time right now.
Hope this helps boost community support a bit.
This must've taken some time. Hats off to you sir.
kickassdave said:
Now THAT is what XDA is all about.
I'd like to get in to this type of development but simply don't have the personal time right now.
Hope this helps boost community support a bit.
This must've taken some time. Hats off to you sir.
Click to expand...
Click to collapse
Thanks Dave - this is the absolute easiest way to build a kernel. Yes it took forever to get working, a lot had to do with bad Xiaomi source code and Android 9 package requirements for building kernels. You can simply download, install, click Goto Build, click on QClang8_Build, copy/paste it's text from Geany into the open terminal, sit back and wait for the build to finish. Then once it completes, you click on Built Kernels and you have your image ready. A few more steps obviously outlined in the post to transfer to the host machine (cp Image-dtb /media/sf_VMxfer) and pack via Android Image Kitchen, copy to the device, and flash via TWRP. Most features require Magisk patching as well to enable altering in a kernel manager. The mentioned repo (mrslezak) has Fsync toggle, 830GPU overclock, and F2FS file system support (Mauro TWRP has just enabled it, so I'm using it now). I should note as well that this kernel has only been tested on MIUI and Xiaomi.eu builds thus far (anything based on Xiaomi MIUI should work - MIUI Global Dev, China Dev, Xiaomi.eu, MiGlobe, RevolutionOS, etc. as long as it is Android Pie).
I'm waiting on others to jump on board!!!! Hopefully it happens
Excellent guide, will work for almost all pie devices!
Great work OP :highfive:
Regards,
acervenky
Hi, @mslezak @acervenky Can you help me to build kernel for Stock Miui 10 for K20/Mi9t . I followed your guide setup all requirement i just changed the device code name from cepheus to davinci everything went well kernel complied and also created the boot.img with AIK but after flash it is through back me to recovery.
Can you Please help me with this.
@acervenky fixed that by applying the patch in the Desktop Mi9_Build_Tools/Required_Patches_to_Compile_Xiaomi_Source/cosmin_kernel-module.c copy that to /kernel/module.c, he can chime in here. Or check out his repo he has one on Github that compiles already QUAX kernel I believe with a bunch of stuff added already over stock.
Good job. Compiled a kernel for mi9t pro (raphael) with your detailed guide.
Can you help with "make modules" command?
I need to make xt_HL.ko module, but it not compiling ((
Not needed anymore, made it successfully.
Can you compile q kernels with this?
asgardpark said:
Can you compile q kernels with this?
Click to expand...
Click to collapse
Yes! Just don't replace .dtsi and module.c files for now.
Regards,
acervenky
New Q build VM coming soon. GCC10 x64 and Arter97 GCC9 x32 toolchain.
Just a notice here I have a VM almost ready to upload that can build Mi9 source. It's a ton of patches to stock code but I'll setup a repo with them already applied.
Can i use anykernel to make a flashable zip? Or do i have to use a diffrent approach?
https://mega.nz/#!voJEGIRC!r4FcV6zUlVbFExcidhL9JmgVZlu3IscYH-S5XlnTUJI Android Q VM - expands to 40gb on your hard drive so you don't run out of space. Builds a GCC10 patched version of Xiaomi Cepheus and Raphael kernels from my repo, forked from Xiaomi and commits outlining every step needed to get it to build. https://github.com/mrslezak/Cepheus-Raphael-Q-GCC10
Yes AnyKernel3 is the easiest
asgardpark said:
Can i use anykernel to make a flashable zip? Or do i have to use a diffrent approach?
Click to expand...
Click to collapse
Sure AnyKernel3 is easy, take someone's kernel zip, insert your Image-gz.dtb or Image-dtb into the root of the zip, delete the other kernel, and you should be able to flash it.
got some compile errors today when i tried your wm
/home/user/toolchains/aarch64-linux-elf/bin/aarch64-linux-elf-ar: kernel/resource.o: No such file or directory
I'd first try a: make clean; and: make mrproper;....
But here's more info:
Double click the GoTo Build icon, a terminal will open in the source directory. Then in the terminal: cp /home/user/Desktop/Build GCC10 Cepheus.sh .; chmod +x "Build GCC10 Cepheus.sh"; ./"Build GCC10 Cepheus.sh"; Once done the kernel will be in /home/user/Cepheus-Raphael-Q-GCC10/out/arch/arm64/boot/Image.gz-dtb. /out9TP/ for Raphael, just substitute the build script you need.
If it then still won't build, you'll have to grab the repo again. Type: git pull
Or the safest is a complete re-download: cd ..; rm -rf Cepheus-Raphael-Q-GCC10; git clone --depth=1 https://github.com/mrslezak/Cepheus-Raphael-Q-GCC10.git and repeat the prior copying of the build script to the source directory.
I tested this last night and it worked. If I tried to just drag the script into a terminal window it failed. There could be some dirty files in there not sure how that happened, but deleting and cloning again definitely works. I built both Cepheus and Raphael kernels last night in the VM off a fresh clone of the repo. I'd update I but it literally takes 6hrs + since the files are huge and take forever to compress and upload to Mega. And I have to delete so much off my VM and SSD just to do it. This way you learn something too
I first drag n dropped the file when i got the error, then i remembered when i compiled kernels for my raspberry pi's it also failed if i draged n dropped my build script so i did it the proper way and it worked
Thanks for your WM it's working great
mslezak said:
https://mega.nz/#!voJEGIRC!r4FcV6zUlVbFExcidhL9JmgVZlu3IscYH-S5XlnTUJI Android Q VM - expands to 40gb on your hard drive so you don't run out of space. Builds a GCC10 patched version of Xiaomi Cepheus and Raphael kernels from my repo, forked from Xiaomi and commits outlining every step needed to get it to build. https://github.com/mrslezak/Cepheus-Raphael-Q-GCC10
Click to expand...
Click to collapse
Could you upload the VM to Google Driver? Thank you!
q659503934 said:
Could you upload the VM to Google Driver? Thank you!
Click to expand...
Click to collapse
Yeah if you buy me Google drive space I'd be more than happy to upload to Google Drive. I'm out of space man. If you run Windows 10 Preview WSL2 I have a 3.2GB build that kills everything else out there.
mslezak said:
Yeah if you buy me Google drive space I'd be more than happy to upload to Google Drive. I'm out of space man. If you run Windows 10 Preview WSL2 I have a 3.2GB build that kills everything else out there.
Click to expand...
Click to collapse
Do you have WSL2 tar file that can build Kernel?