No such file or directory issues when building linage os. - Android Software Development

https://pastebin.com/uzADsJtf Heres my issue.
I can't use source build/envsetup.sh or cd ~/android/system/vendor/cm because it says
Code:
[email protected]:~/android/system$ cd ~/android/system/vendor/cm
bash: cd: /home/user/android/system/vendor/cm: No such file or directory
[email protected]:~/android/system$ source build/envsetup.sh
bash: build/envsetup.sh: No such file or directory
[email protected]:~/android/system$
Please help me.
I attached a file of my ubuntu version. I am also running ubuntu in a virtual machine, (hence the 20.7gb ram and 112.8gb SSD )

XDAcube said:
https://pastebin.com/uzADsJtf Heres my issue.
I can't use source build/envsetup.sh or cd ~/android/system/vendor/cm because it says
Code:
[email protected]:~/android/system$ cd ~/android/system/vendor/cm
bash: cd: /home/user/android/system/vendor/cm: No such file or directory
[email protected]:~/android/system$ source build/envsetup.sh
bash: build/envsetup.sh: No such file or directory
[email protected]:~/android/system$
Please help me.
I attached a file of my ubuntu version. I am also running ubuntu in a virtual machine, (hence the 20.7gb ram and 112.8gb SSD )
Click to expand...
Click to collapse
The messages are telling you that you don't have a folder named cm in /android/system/vendor
This is just a guess but did you download the vendor tree for your device and place it in your source?
Try:
Code:
$ cd ~/android
$ git clone
$ git://github.com/{path-to-your-device-vendor}.git -b {branch} system/vendor
Sent from my HUAWEI VNS-L31 using Tapatalk

Related

Getting Started

Hello,
I am following the instructions here: http://source.android.com/source/download.html but I find I am having some problems. I am using 32 bit ubuntu.
Firstly, I can not get Java 5 SDK the terminal reports an error that the package cant be found, what can I do to rectify this, is there a work around, is the google page just out dated now?
secondly, I come to the "Installing Repo" section and follow:
Make sure you have a~/bindirectory in your home directory, and check to be sure that this bin directory is in your path:
$ cd ~
$ mkdir bin
$ echo $PATH
Download thereposcript and make sure it is executable:
$ curl http://android.git.kernel.org/repo >~/bin/repo
$ chmod a+x ~/bin/repo
All of that seems to work, however, I must have done something wrong because when I get to the next bit "Initialising a Repo Client" I dont seem to be able to run:
repo init -u git://android.git.kernel.org/platform/manifest.git
I get the following error:
[email protected]:~$ repo init -u git://android.git.kernel.org/platform/manifest.git
No command 'repo' found, did you mean:
Command 'rep' from package 'rep' (universe)
Command 'repl' from package 'nmh' (universe)
Command 'repl' from package 'mailutils-mh' (universe)
repo: command not found
[email protected]:~$ cd bin
[email protected]:~/bin$ dir
repo
[email protected]:~/bin$
As you can see, I have a bin directory, and inside it is repo
Whats the score here??
Hi,
You can choose one of theese
a. ~/bin/repo init.....
b. export PATH=$PATH:~/bin/
repo init......
HTH
Hey that's got it, so simple really, but the best answers are... thanks bud

<Making Progress> Compile 2013 Nexus 7 – Flash to device – Stuck a Google boot screen

<Making Progress> Compile 2013 Nexus 7 – Flash to device – Stuck a Google boot screen
I am using the following device: 2013 Nexus 7
Android version: 4.3
Kernel version: [email protected]__ #1
Build number: JSS15Q
The problem:
When I try to flash a new boot.img file that contains my own recompiled kernel I am unable to boot the system – it sticks at the Google boot screen (and does not make it to the color X screen)
Below I have detailed out the steps I have taken. Please take a look and tell me if you notice if I am doing something wrong.
The following step were taken while running Ubuntu 12.04 LTS
*******************************************************************************************
Unlocking the 2013 Nexus 7 (Flo=wifi)
Rooting the 2013 Nexus 7 (Flo=wifi)
*** Compile/Recompile the kernel ***
*** Create a new boot.img file ***
….. contains instructions for getting root access
*** Flashing a new boot.img file ***
*******************************************************************************************
Unlocking the 2013 Nexus 7 (Flo=wifi)
Open a terminal and make sure that your system can see the Nexus 7, run:
$ ./adb devices
If you see the Nexus 7, run:
$. /adb reboot bootloader
When the bootloader screen has reappeared, run:
$ sudo ./fastboot devices
-If you can see the Nexus 7, run:
$ sudo ./fastboot oem unlock
-Look at the Nexus 7, a screen should appear asking you if you want to “Unlock the bootloader” – choose Yes.
You will need to use volume up/down to choose a response and press the power button to select.
- The device will flash a new image and exit to prompt
Next, reboot the device:
$ sudo ./fastboot reboot
The device is now unlocked.
*******************************************************************************************
Rooting the 2013 Nexus 7 (Flo=wifi)
*** Compile/Recompile the kernel ***
In the following steps you will be compiling/recompileing a kernel for the Nexus 7.
*Make sure that libncurses5-dev is installed (needed for make menuconfig)
Starting out I am at the following location
[email protected]:/home/user $
In your home directory create a folder named “Razor_Flo”:
$ mkdir Razor_Flo
Move into the new folder:
$ cd Razor_Flo
You should be here – [email protected]:/home/user/Razor_Flo $
In the Razor_Flo directory, create a sub directory named “Kernel”:
$ mkdir Kernel
Move into the new folder:
$ cd Kernel
You should be here – [email protected]:/home/user/Razor_Flo/Kernel $
[----------------- For the next steps, I used the following website to determine what files I needed -----------------]
__http__://source.android.com/source/building-kernels.html
Figuring out which kernel to build
[----------------------------------------------------------------------------------------------------------------------------------------------]
In the Kernel folder, download the following files:
$ git clone __https__://android.googlesource.com/device/asus/flo-kernel
$ cd flo-kernel
You should be here – [email protected]:/home/user/Razor_Flo/Kernel/flo-kernel $
$ git log --max-count=1 kernel
-- Log information will be displayed, under the “flo: prebuilt kernel” you will see a set of numbers and letters that will look like 365a6e0, note that number for future use.
Back out of the flo-kernel folder
$ cd ..
You should be here – [email protected]:/home/user/Razor_Flo/Kernel $
Once you are in the Kernel folder, download the following files:
$ git clone __https__://android.googlesource.com/kernel/msm.git
-- This command will create an msm directory
Move into the msm folder
$ cd msm
You should be here – [email protected]:/home/user/Razor_Flo/Kernel/msm $
[---------------------- For the next step, I used the following website to acquire the files I needed --------------------]
__http__://source.android.com/source/building-kernels.html
On a linux host, if you don't have an Android source tree, you can download the prebuilt toolchain from:
$ git clone __https__://android.googlesource.com/platform/prebuilts/gcc/linux-x86/arm/arm-eabi-4.6
[-----------------------------------------------------------------------------------------------------------------------------------------------]
Export the path to the prebuilt gcc files
$ export PATH=$PATH: <link to files>
Additional exports
$ export ARCH=arm
$ export SUBARCH=arm
$ export CROSS_COMPILE=arm-eabi-
Checkout the correct kernel files
$ git checkout 365a6e0 <-- the number you noted above
Make the Kernel
$ make flo_defconfig
* At this point you can use “make menuconfig” to make any changes to the .config file you need (i.e. kernel modifications)
$ make
* When the make is complete a file named zImage will be created here:
.../arch/arm/boot/zImage <-- Note this, you will need the file later
The kernel compile/recompile is now complete
*** Create a new boot.img file ***
In the following steps you will be taking apart the “Factory boot.img” so that you can create a “Modified boot.img” which will contain your modified and rooted kernel.
You should be here – [email protected]:/home/user/Razor_Flo/Kernel/msm $
Move up two directories
$ cd ../../
You should be here – [email protected]:/home/user/Razor_Flo $
[------------------------------------------------------- Tools need for next step -------------------------------------------------------]
You will need to download the following files.
-- split_bootimg.pl
__http__://code.google.com/p/zen-droid/downloads/detail?name=split_bootimg.pl
-- mkbootimg
__http__://code.google.com/p/zen-droid/downloads/detail?name=mkbootimg
-- 2013 Nexus Factory Images
__https__://dl.google.com/dl/android/aosp/razor-jss15q-factory-4f77b811.tgz
* You will need to copy this file to a unique location so that you can extract the “boot.img” that is located with it.
[------------------------------------------------------------------------------------------------------------------------------------------------]
Create a new folder named Workspace
$ mkdir Workspace
Enter the Workspace directory
You should be here – [email protected]:/home/user/Razor_Flo/Workspace $
Make two new folders in this directory
$ mkdir Original
$ mkdir Hacked
Move into the Hacked folder
You should be here – [email protected]:/home/user/Razor_Flo/Workspace/Hacked $
Create a new folders named Hacked_ramdisk
$ mkdir Hacked_ramdisk
Move up two directories – to the Workspace folder
$ cd ../../
You should be here – [email protected]:/home/user/Razor_Flo/Workspace $
Copy the 2013 Nexus 7 factory boot.img file into the ..Workspace/Original folder
-- can be found within the factory tgz file:
Copy the split_bootimg.pl file to the ..Workspace/Original folder
Copy the mkbootimg file to the ..Workspace/Hacked folder
Move the zIamge file to the ..Workspace/Hacked folder
Move to the Hacked folder
You should be here – [email protected]:/home/user/Razor_Flo/Workspace/Hacked $
Rename the zImage file to boot.img-kernel
Move up one directory - to the Workspace folder
You should be here – [email protected]:/home/user/Razor_Flo/Workspace $
Move to the Original folder
You should be here – [email protected]:/home/user/Razor_Flo/Workspace/Original $
Run the following command:
$ ./split_bootimg.pl boot.img
This will create two files, copy the boot.img-kernel and boot.img-ramdisk.gz
Copy the boot.img-ramdisk.gz file to the “Hacked/Hacked_ramdisk” folder
Move to the Hacked/Hacked_ramdisk folder
You should be here – [email protected]:/home/user/Razor_Flo/Workspace/Hacked/Hacked_ramdisk $
Run the following command:
$ sudo gzip -cd boot.img-ramdisk.gz | cpio -i
This will extract all the files with in the boot.img-ramdisk.gz file.
Delete the original boot.img-ramdisk.gz file that you just extracted the files from.
Edit the default.prop file
change ro.secure=1 to ro.secure=0
change ro.adb.secure=1 to ro.adb.secure=0
Save changes and close the file.
Run the following command :
$ find .| cpio -o -H newc | gzip > insecure_boot.img-ramdisk.gz
This will create a new file named insecure_boot.img-ramdisk.gz.
Rename the insecure_boot.img-ramdisk.gz. file to boot.img-ramdisk.gz and copy it up one folder in the hierarchy to the “Hacked” folder.
Move up one directory - ../Workspace/Hacked
You should be here – [email protected]:/home/user/Razor_Flo/Workspace/Hacked $
List the files in the ../Workspace/Hacked directory, there should be three files:
(1) boot.img-kernel, (2) boot.img-ramdisk.gz, & (3) mkbootimg
Run the following command from within the “Hacked” folder
$ ./mkbootimg --cmdline 'no_console_suspend=1 console=null' --kernel boot.img-kernel --ramdisk boot.img-ramdisk.gz -o mynewimage.img
Rename mynewimage.img to boot.img and flash on the device.
The new boot image is now complete and ready to flash.
*** Flashing a new boot.img file ***
[------------------------------------------------------- Tools need for next step -------------------------------------------------------]
You will need to download the following file.
-- 2013 Nexus Factory Images
__https__://dl.google.com/dl/android/aosp/razor-jss15q-factory-4f77b811.tgz
* You will need to copy this file to a unique location so that you can extract the “system.img” file that is located with it.
--- Android SDK (I used the 64-bit version)
__http__://dl.google.com/android/android-sdk_r22.0.5-linux.tgz
[------------------------------------------------------------------------------------------------------------------------------------------------]
You will need to use both the adb and fastboot utilites that come in the Android SDK application.
You will need two image to complete this task
1. boot.img <--file you just created, located in the ../Workspace/Hacked directory
2. system.img <-- can be found within the factory tgz file:
Starting out I am at the following location
[email protected]:/home/user/android-sdk/platform-tools $
Place both the boot.img and system.img files into the same folder as the adb and fastboot utilites.
Verify that you can see the Nexus 7 device that you are about to flash
$ sudo ./adb devices
*if you cannot see the device, make sure that you have checked the “enable USB Debugging” in the developer options.
Run the following commands
$ sudo ./adb reboot bootloader
$ sudo ./fastboot flash boot boot.img
$ sudo ./fastboot flash system system.img
$ sudo ./fastboot format cache
$ sudo ./fastboot format userdata
$ sudo ./fastboot restart
At this point the system should be unlocked and rooted.
Bump - still looking for help
Post your zImage.
Sent from my Nexus 4 using Tapatalk 4
Here is the zImage I created
Here is the zImage that I created.
I have rename it to chad.img
Thanks
jassycliq said:
Post your zImage.
Sent from my Nexus 4 using Tapatalk 4
Click to expand...
Click to collapse
Hi All
I am still looking for feedback - if anyone has any.
Thanks
Chad
Chady said:
Hi All
I am still looking for feedback - if anyone has any.
Thanks
Chad
Click to expand...
Click to collapse
I used this and I got it working:
http://source.android.com/source/initializing.html
I created the msm directory inside the flo-kernel directory as a place to put the kernel source. I don't know if that is right, or if it even matters, but it works for me. Then I had to move the zImage to out/product/target/flo/kernel before doing the make on the framework. Don't forget to do the "source build/envsetup.sh" and "lunch" before making the framework. Before compiling the kernel, be sure to set ARCH, SUBARCH and CROSS_COMPILE environment variables and make sure your PATH includes the prebuilt cross-compiler.
Making headway
Ok, So I made some headway lastnight.
I have not figured out how to compile the kernel on my own however, I am able to compile and boot an AOSP image for the 2013 Nexus 7
My problem getting the image to boot once compiled centered around drivers. I was under the impression that Android would work like Linux and Windows... meaning that if you did not have device drivers installed the OS would still boot - I was wrong. After installing the drivers (via the provided install .sh files) I then compiled the OS, flashed the device, and the system boot.
Now I am off to figure out how to get a custom kernel running.
Chad
for the benifit of others
Chady said:
Ok, So I made some headway lastnight.
I have not figured out how to compile the kernel on my own however, I am able to compile and boot an AOSP image for the 2013 Nexus 7
My problem getting the image to boot once compiled centered around drivers. I was under the impression that Android would work like Linux and Windows... meaning that if you did not have device drivers installed the OS would still boot - I was wrong. After installing the drivers (via the provided install .sh files) I then compiled the OS, flashed the device, and the system boot.
Now I am off to figure out how to get a custom kernel running.
Chad
Click to expand...
Click to collapse
For the benefit of others who might look at this forum in the future.
This is what is required to be done.
source.android.com/source/building-devices.html#obtaining-proprietary-binaries
I faced the same problem and took time to figure out what it really meant.
Also if it is in an infinite loop after the above procedure. Try doing fastboot flashall -w
-w option did the magic for me when I was stuck in an infinite loop after the above procedure.

I'm trying to boot my Nexus 10 with your linux-kvm-arm kernel version 3.13...

Hello to everyone,
I'm trying to boot my Nexus 10 with another kind of kernel version,because I'm not interested to use the Android kernel,but the Ubuntu pure kernel. I've chosen to use the linux-kvm-arm kernel version 3.13 :
These are the commands that I have used :
git clone git://github.com/virtualopensystems/linux-kvm-arm.git
cd linux-kvm-arm
git checkout origin/chromebook-3.13 -b chromebook-3.13
curl http://www.virtualopensystems.com/downloads/guides/kvm_on_chromebook/config > .config
and then I've added these lines to the .config file :
CONFIG_ANDROID=y
CONFIG_ANDROID_BINDER_IPC=y
CONFIG_ASHMEM=y
CONFIG_ANDROID_LOGGER=y
CONFIG_ANDROID_PERSISTENT_RAM=y
CONFIG_ANDROID_RAM_CONSOLE=y
CONFIG_ANDROID_TIMED_OUTPUT=y
CONFIG_ANDROID_TIMED_GPIO is not set
CONFIG_ANDROID_LOW_MEMORY_KILLER=y
CONFIG_ANDROID_SWITCH is not set
CONFIG_ANDROID_INTF_ALARM is not set
CONFIG_FB_TILEBLITTING=y
CONFIG_PHONE is not set
CONFIG_USB_WPAN_HCD is not set
CONFIG_WIMAX_GDM72XX is not set
CONFIG_ARM_PLATFORM_DEVICES=y
CONFIG_ARM_CHROMEOS_FIRMWARE=y
CONFIG_CHROMEOS=y
CONFIG_CHROMEOS_VBC_BLK=y
CONFIG_CHROMEOS_VBC_EC=y
CONFIG_CHROMEOS_RAMOOPS_RAM_START=0x41f00000
CONFIG_CHROMEOS_RAMOOPS_RAM_SIZE=0x00100000
CONFIG_CHROMEOS_RAMOOPS_RECORD_SIZE=0x00020000
CONFIG_CHROMEOS_RAMOOPS_DUMP_OOPS=0x1
CONFIG_CLKDEV_LOOKUP=y
and then I did :
ARCH=arm CROSS_COMPILE=arm-linux-gnueabihf- make uImage dtbs
from here I've followed the tutorial that I've found here :
http://forum.xda-developers.com/showthread.php?t=1981788
and here :
http://forum.xda-developers.com/showthread.php?t=1981788&page=2
mkdir -p newkernel
cd newkernel
wget -c https://dl.google.com/dl/android/aosp/mantaray-kot49h-factory-174ba74f.tgz
tar xvzf mantaray-kot49h-factory-174ba74f.tgz
cd mantaray-kot49h
unzip image-mantaray-kot49h.zip
wget -c http://android-serialport-api.googlecode.com/files/getramdisk.py
chmod +x getramdisk.py
./getramdisk.py boot.img --> ramdisk.img
wget -c http://android-serialport-api.googlecode.com/files/android_bootimg_tools.tar.gz
tar xvf android_bootimg_tools.tar.gz
./mkbootimg --kernel ../../linux-kvm-arm/arch/arm/boot/zImage --ramdisk ramdisk.img --cmdline bootimg.cfg -o new-boot.img
fastboot flash boot new-boot.img
I think that something is wrong here,because it is not able to boot....I see a black screen and nothing else happens...
Hi,
probably too simple, but:
How does your .config look?
Did the curl actually work? (I ask because I tried your URL and it didn't work for me).
Did you actually compile a guest kernel too and boot it?
Special ChromeOS suupport does not exist in that branch.
Keep up the work, if you succeed booting linux, I got a prize for you.
Don't take it wrong, I'm just too bored of the tablet as it is now.
Wejgomi

Miui 8

Miui 8 patch rom release, can someone port it for Nexus 4?
https://github.com/MiCode/patchrom/tree/marshmallow
I need it too...
You should contact to miui support forum or XDA devs, I hope they can build miui 8 for nexus 4
@Trickster22
Install Ubuntu.
Install Java
Guide to configure android SDK
Guide to configure repository:
Open terminal
Code:
mkdir -p ~/bin
Code:
PATH=~/bin:$PATH
Code:
cd ~/bin
Code:
curl https://storage.googleapis.com/git-repo-downloads/repo > ~/bin/repo
Code:
chmod a+x ~/bin/repo
Code:
mkdir ~/patchrom
Code:
cd ~/patchrom
Code:
repo init -u git://github.com/MiCode/patchrom.git -b marshmallow
Now you'll have to configure git. Run following commands in terminal
Code:
git config --global user.email ENTER_YOUR_EMAIL_ID_HERE
Code:
git config --global user.name ENTER_YOUR_REAL_NAME_HERE
Code:
repo init -u git://github.com/MiCode/patchrom.git -b marshmallow
Code:
repo sync
Wait......
after, Install the latest version of Fake nexus (marshmallow), reboot to device in mode recovery (TWRP).
PS.: After you finish generating the stockrom.zip of fake nexus, do the same for cm-13.0-20160820-SNAPSHOT-ZNH5YAO0J5-mako.zip
Reboot your device for recovery, use this comand to gerate stockrom.zip and metadata folder:
Code:
/home/"YOUR-USER-NAME-UBUNTU"/patchrom/tools/releasetools/ota_target_from_phone -r
Sende me stockrom.zip and metadata folder
Source: http://forum.xda-developers.com/android/software/guide-build-port-miui-rom-to-device-t3250984
Dio_S said:
@Trickster22
Install Ubuntu.
Install Java
Guide to configure android SDK
Guide to configure repository:
Open terminal
Code:
mkdir -p ~/bin
Code:
PATH=~/bin:$PATH
Code:
cd ~/bin
Code:
curl https://storage.googleapis.com/git-repo-downloads/repo > ~/bin/repo
Code:
chmod a+x ~/bin/repo
Code:
mkdir ~/patchrom
Code:
cd ~/patchrom
Code:
repo init -u git://github.com/MiCode/patchrom.git -b marshmallow
Now you'll have to configure git. Run following commands in terminal
Code:
git config --global user.email ENTER_YOUR_EMAIL_ID_HERE
Code:
git config --global user.name ENTER_YOUR_REAL_NAME_HERE
Code:
repo init -u git://github.com/MiCode/patchrom.git -b marshmallow
Code:
repo sync
Wait......
after, Install the latest version of Fake nexus (marshmallow), reboot to device in mode recovery (TWRP).
PS.: After you finish generating the stockrom.zip of fake nexus, do the same for cm-13.0-20160820-SNAPSHOT-ZNH5YAO0J5-mako.zip
use this comand to gerate stockrom.zip and metadata folder:
Code:
/home/"YOUR-USER-NAME-UBUNTU"/patchrom/tools/releasetools/ota_target_from_phone -r
Sende me stockrom.zip and metadata folder
Source: http://forum.xda-developers.com/android/software/guide-build-port-miui-rom-to-device-t3250984
Click to expand...
Click to collapse
Thank you sir for this valuable info/guide but I have a weak machine for Ubuntu like only 2 GB ram. This is why I was requesting others to build miui.
Trickster22 said:
Thank you sir for this valuable info/guide but I have a weak machine for Ubuntu like only 2 GB ram. This is why I was requesting others to build miui.
Click to expand...
Click to collapse
You should just generate the stockrom.zip + metadata and send me, I can do it, because I do not have the device
what ıs thıs ?
hasanben35 said:
what ıs thıs ?
Click to expand...
Click to collapse
For me to compile miui, I need the stockrom.zip plus the metadata folder generated by the patchrom, this guide shows how.
Sorry mt english
hım how long does it take
hasanben35 said:
hım how long does it take
Click to expand...
Click to collapse
This process should take around 1 hour if you already have Ubuntu installed and configured
multı rom nıtrogen os 7.1.1 and flyme ınstalled flyme remove ubuntu ınstall after _?
hasanben35 said:
mult? rom n?trogen os 7.1.1 and flyme ?nstalled flyme remove ubuntu ?nstall after _?
Click to expand...
Click to collapse
Ubuntu in PC "Desktop"
oh my god no no no waıtıng rom sorry ubuntu ınstall pc no
Okay, I'll make those files. Where should I send it?

Kernel building error

I try to compile kernel for Samsung SM-A510F. I got source from Samsung Open source.
My steps:
1.Create folder in home directory and extract kernel.tar.gz there.
2.Create another folder in home directory and download compiler
$ mkdir bin
$ cd bin
$ git clone https://android.googlesource.com/platform/prebuilts/gcc/linux-x86/aarch64/aarch64-linux-android-4.9
3.
$ cd aarch64-linux-android-4.9
$ export SUBARCH=arm64
$ export ARCH=arm64
$ export CROSS_COMPILE=~/bin/aarch64-linux-android-4.9/bin/aarch64-linux-android-
4.
make menuconfig. Save default settings just to make .config file
5.
In kernel folder
$ make clean
$ make mrproper
$ make ARCH=arm64 exynos7580-a5xelte_defconfig
$ make -j 8
I received compiler patch error and other errors. Maybe I used wrong guide? Please, point me to right direction!
.

Categories

Resources