yashsingh1/xdaforums huggingface dataset:
[T-Mobile Samsung Galaxy Note 3] bigbiff:
Why can't you post /tmp/recovery.log and the results of dmesg?
[T-Mobile Samsung Galaxy Note 3] Apo11on:
I certainly can, and will do it shortly. Sorry, didn't realize it's actually required for this type of issue.

UPDATE:

OK, so there is no /tmp folder in the root of my phone, or in the typical locations, such as /var, /etc. /sdcard folder doesn't have recovery.log file. I have done full system search and discovered there are only 2 recovery.log files on my phone, both located inside TWRP backup folders. These are the files, generated during each backup. I have edited the most recent one of the two recovery.log files, cut out the contents of my backup information because it contained a little more personal data than I'm willing to share, and uploaded the rest per your request: https://paste.tinyw.in/index.php/view/66362066

As far as dmesg goes - can you please be more specific about "results of dmesg" - what command exactly do I need to run?

Let me know if there are any other logs to collect or things I need to do, to help troubleshoot this. I have CatLog and Android System Info apps installed on my phone - both allow to easily collect a bunch of system logs through UI, without using adb or command line, although I don't care either way. Thanks for your time.
[T-Mobile Samsung Galaxy Note 3] bigbiff:
I need the output of dmesg to see what the kernel thinks about the external sdcard from TWRP.

Also it would be helpful to post the entire contents of recovery.log as an attachment or paste.omnirom.org
[T-Mobile Samsung Galaxy Note 3] Apo11on:
I did Advanced->Copy Log to SDCard and here is the new log, unedited: https://paste.tinyw.in/index.php/view/87501300. Ignore the ":Unable to open '/data/media/0/TWRP/BACKUPS/d45b4696'" messages you see in the log - those appear because I manually moved my backups from internal storage to sdcard.

dmesg is here: https://paste.tinyw.in/index.php/view/68820017

---------- Post added at 02:25 PM ---------- Previous post was at 01:59 PM ----------

In recovery.log /external_sd true path is specified as: /dev/block/mmcblk1p1

The following lines from dmesg appear to be relevant:

<3>[ 9.246379] FAT-fs (mmcblk1p1): bogus number of reserved sectors
<6>[ 9.246387] FAT-fs (mmcblk1p1): Can't find a valid FAT filesystem
<3>[ 9.315903] FAT-fs (mmcblk1p1): bogus number of reserved sectors
<6>[ 9.315925] FAT-fs (mmcblk1p1): Can't find a valid FAT filesystem

They are repeated multiple times in dmesg
[T-Mobile Samsung Galaxy Note 3] bigbiff:
In the TWRP terminal can you paste the results of

blkid /dev/block/mmclbk1p1
[T-Mobile Samsung Galaxy Note 3] Apo11on:
I went ahead and assumed it's a typo, and you meant mmcblk1p1 and not mmclbk1p1. Here is the output from recovery.log:

I:operation_start: 'CommandOutput'
/ # blkid /dev/block/mmcblk1p1
I:Actual command is: 'cd "/" && blkid /dev/block/mmcblk1p1 2>&1'
I:Set page: 'terminalfolder'
I:Set page: 'terminalcommand'
I:Set page: 'terminalfolder'
I:Set page: 'terminalcommand'

In the terminal window itself while booted into TWRP there was no output to the screen, tried twice
[T-Mobile Samsung Galaxy Note 3] bigbiff:
What kernel is Android running?
[T-Mobile Samsung Galaxy Note 3] Apo11on:
leanKernel, which comes with Hyperdrive 7.1 ROM. The full kernel version from About screen: 3.4.104-leanKernel-hlte3.13-+imoseyon@leankernel #40 Sat Nov 29 09:01:25 PST 2014
[T-Mobile Samsung Galaxy Note 3] bigbiff:
What is the output of blkid /dev/block/mmcblk1p1 in android?
[T-Mobile Samsung Galaxy Note 3] sjancura:
Is there a fix yet for successfully restoring a Lollipop nandroid backup? Sometimes the restore fails while restoring in TWRP and if it does complete, the touch screen is unresponsive and you need to reflash the ROM. Sometimes you can just restore data successfully, but that is obviously not ideal. Is it changes in the Lollipop directory structure that is causing the restore issues?
[T-Mobile Samsung Galaxy Note 3] Apo11on:
It doesn't look like this query is generating any output at all:

export PATH=/data/local/bin:$PATH
u0_a230@hltetmo:/ $ export PATH=/data/local/bin:$PATH
u0_a230@hltetmo:/ $ blkid /dev/block/mmcblk1p1
u0_a230@hltetmo:/ $
[T-Mobile Samsung Galaxy Note 3] bigbiff:
Please post recovery.log for debugging.
[T-Mobile Samsung Galaxy Note 3] bigbiff:
What is the output of cat /proc/partitions
[T-Mobile Samsung Galaxy Note 3] bigbiff:
Looks like it is using sdcardfs as the filesystem. Can you PM me to remind me to try to recompile the kernel to support this filesystem?
[T-Mobile Samsung Galaxy Note 3] Apo11on:
Done
[T-Mobile Samsung Galaxy Note 3] Apo11on:
Does anyone know how to get this to work? Is there a different kernel I could flash for my TW KK rom, which will allow TWRP to see 200GB card in recovery?
[T-Mobile Samsung Galaxy Note 3] bigbiff:
Have you tried reformatting the card exfat?
[T-Mobile Samsung Galaxy Note 3] Apo11on:
It is a well documented fact in many tech blog articles and forums, such as this one that Android devices cannot see microSDXC cards with 64GB or larger capacity, formatted using exFAT file system. Personally, I've owned (and still do) 64GB and 128GB microSDXC cards and they were never recognized in my Android phone when formatted into exFAT. Only after formatting the card into FAT32 my phone was able to see it, for each and every card I tried. This SanDisk 200GB card came pre-formatted into exFAT and as expected, the phone did not recognize it when I put it in brand new. Only after formatting it into FAT32 I was able to use it.
[Xperia Z Q&A, Help & Troubleshooting] omaroe666:
my xperia z wen't into bootloop after something went wrong with flashing and i don't have a backup or a rom on my sd card :( the phone just goes into bootloop how do i get out of this ? :crying:
[Xperia Z Q&A, Help & Troubleshooting] kingvortex:
First, questions belong in the q&a section. Don't be surprised if this thread is moved. ;)

To solve your problem, flash a stock rom with Flashtool. Search for a rom in the general section, then follow this tutorial to flash it - How to flash stock roms with Flashtool
[Xperia Z Q&A, Help & Troubleshooting] h4r5h:
^[DISASTER RECOVERY][v3.3] Getting your Z/ZL back to life!
[Xperia Z Q&A, Help & Troubleshooting] omaroe666:
oh damn i'm sorry :o but now my phone is working again but i can't turn on my wifi it just says: turning wifi on and it won't turn on? anybody knows how to fix this ?
[Xperia Z Q&A, Help & Troubleshooting] omaroe666:
nevermind fixed it by flashmode ;)
[Sprint HTC One (M7)] strskysun1:
Need zip file for download
[Sprint HTC One (M7)] Star2dn:
Here you go
[Miscellaneous Android Development] AndroidSlave:
HOW TO AUTOMATE YOUR ROM BUILDING PROCESS

... using

​

Special thanks to [MENTION=4406720]chasmodo[/MENTION] for all his support, as well as his wonderful How-To build CM thread located HERE.

I.

Donations and Support...

Feel free to post any question here, as well as provide your own scripts. As far as I'm concerned, there are no stupid questions; you are, however, required to search before posting.

Please do not donate to me, donate to the Testicular Cancer Society (Click Here).

II.

Introduction...

This guide will direct you on how to setup your android build environment to automate your builds using Jenkins and various shell/bash scripts. As this was initially drafted, it was targeted towards CyanogenMod 10.2, but I am quite confident it can easily be easily modified to work with anything you choose, including LP builds.

This can be a useful process if you want to setup nightly/weekly builds, or if you just want to have a easy-to-use web interface to run your builds without entering the shell.

This guide assumes you have an active build environment (preferably Ubuntu-based), and general linux knowledge.

III.

Initializing your build environment...

You will first have to have your build environment setup, and you should already be able to successfully build CM, AOSP, AOKP, or other variants, before moving forward. Furthermore, you are expected to have simple scripting knowledge, or you will not be able to do this. If you need assistance with setting up an android build environment (which is not the focus of this thread), you can get started by Clicking Here, or by looking at [MENTION=4406720]chasmodo[/MENTION]'s thread by Clicking Here.

It is important to note that your Jenkins home directory is at "/var/lib/jenkins" (not /home/jenkins). As such, to get your build directory in the proper location, you will login normally to your shell, and "su jenkins" (you may have to use su policy, if you don't know how to do this, you may just want to login as root). Do Not login to the system-jenkins-user shell by changing the jenkins user password (I am referring to the System User named jenkins, not your jenkins web-interface). Once logged in as jenkins, do a "cd ~", create your directory (e.g., "cm10.2"), and repo init there (e.g., in /var/lib/jenkins/cm10.2 directory).

IV.

Installing Jenkins and Apache Daemons...

Once your build environment has been initialized, you will have to get Jenkins/Hudson setup and running. You can read more about Jenkins software by Clicking Here.

Further, you will need to install and setup apache web server in order to access the Jenkins web interface. Click Here for more information on apache.

The jenkins install process can easily be setup by following the guide Located Here.

After you have successfully installed Jenkins and apache, you may proceed to setting up your automated builds.

V.

Setting Up Jenkins Security...

Be sure to setup a Jenkins user account, or a remote user can get your setup and screw up your machine.

Follow the article here:

https://wiki.jenkins-ci.org/display/JENKINS/Standard+Security+Setup

Continued in Post #2
[Miscellaneous Android Development] AndroidSlave:
V.

Configuring your first build...

.... A.

Creating the new build...

Once you have setup your jenkins server (by going to http://localhost:8080, or port 80 if you set it that way), log in with the username/password you configured.

After you have logged in, click "New Job" in the left toolbar.

Screenshot:

Then, enter the "Job name". Please Note to NOT use spaces or slashes in the name, as it causes build issues. If you need a space, use an underscore ("_"). Check the radio-box "Build a free-style software project", and hit "OK".

Screenshot:

Now, continue to the procedure listed directly below (i.e., in section "B", "How to have Jenkins call your local scripts...")

.... B.

How to have Jenkins call your local scripts...

As opposed to attempting to have Jenkins' propriety interface try to run your build process directly, it is best to have it call out for your individualized shell/bash scripts.

To do so, under the "Execute Shell" Field in the "Build" section, you will call out your script by entering the following code:

#!/bin/bash
cd ~/[COLOR="Red"]FOLDER[/COLOR]/
source [COLOR="Red"]SCRIPT_NAME[/COLOR].sh

Screenshot:

Once your code has been input, the next step is to create your script in your build directory. In this instance, the script is called "buildscriptclobber.sh" and the directory is "~/cm10.2" (~ is home). It is important to remember that your home directory is the Jenkins user home directory, which gets installed at /var/lib/jenkins (NOT /home/jenkins).

As above mentioned, you will login normally to your shell, and "su jenkins". Once logged in as jenkins, do a "cd ~/FOLDER" (e.g., "~/cm10.2"). Then, use your favorite text editor (e.g., pico, installed by sudo apt-get install pico), and enter your script.

A good script I wrote will make clobber and repo sync every time. It is as follows:

#!/bin/bash
cd ~/[COLOR="red"]FOLDER[/COLOR]/
make clobber
cd ~/[COLOR="red"]FOLDER[/COLOR]/
export PATH=~/bin:$PATH
export USE_CCACHE=1
repo sync
vendor/cm/get-prebuilts
source build/envsetup.sh && time brunch [COLOR="red"]DEVICE[/COLOR]

You may notice above that I call out the folder ("cd"), and set the "PATH" multiple times, especially when its already set in your ".bashrc". This is because the script will give errors if you do not do so, because Jenkins won't consistently read your ".bashrc" or other external configurations. It is important to always do this type of thing when shell scripting with Jenkins. The "time" command may be omitted, because Jenkins log will show the total build time throughout, so its partially redundant, but I like it in there.

Once the script has been setup, do not forget to "chmod a+x" or it will not run.

VI.

Automating your first build...

WIP SETTING UP H H H TRIGGER

VII.

Configuring and automating additional builds...

Follow the same steps as above, just be sure the Cron Triggers are set to not overlap. For Example, if you have setup H H H(0-5) for one, and you know your builds may take up to two hours, then setup H H H(2-7) for the next.

Continued in Post #3
[Miscellaneous Android Development] AndroidSlave:
VIII.

Scripting your builds in general...

.... A.

Use individual shell scripts for each process...

The beauty of having a Jenkins environment is your scripting capabilities. There are many possibilities, and many plugins available within the Jenkins interface. I, however, prefer just executing Shell Scripts, since you will have more control over what you are doing via bash scripting. If you are a bash scripting novice, you can Click Here to view a nice guide.

When scripting, realize that every change you make must be changed in your other scripts. For example, if I use the change filename script below, obviously I will need to modify my upload script to reflect the changed filename. I think of it in a way that "one thing breaks another". This is why its great to have an independent script for every process you do, so that only one file requires modification if changes are made.

.... B.

How to set your scripts to run after the initial compile process has completed...

In order to run ANY OTHER PROCESS after the initial build script is complete, you must run another script after build. To do this, you will use the "Add build step" feature to "Execute Shell", located in the "Build" section.

As such, for ANY new script you want to run after the build script, you must add another build step

. Consequently, every single script below requires a new build script.

Screenshot:

Like above when you setup your initial build script, you will call a script out. This can be done the same way, using:

#!/bin/bash
cd ~/[COLOR="Red"]FOLDER[/COLOR]/
source [COLOR="Red"]SCRIPT_NAME[/COLOR].sh

Screenshot:

Continued in Post #4
[Miscellaneous Android Development] AndroidSlave:
IX.

Specific post-build scripts...

.... A.

Automating Filename Changes, and/or Moving The Build to a Different Directory Automatically...

This essentially moves the build .zip to the same folder, but renames it to the name you choose. Thus, when it uploads, you don't have to manually rename the ROM Firmware file.

#!/bin/bash
cd /var/lib/jenkins/[COLOR="red"]FOLDER[/COLOR]/out/target/product/[COLOR="red"]DEVICE[/COLOR]/
mv cm-10*.zip [COLOR="red"]BUILD-NAME[/COLOR].zip

If you want to add the date to the filename, you can add the following string within the filename:

$(date +%Y%m%d)

You are free to modify the ordering of %Y%m%d as you see fit.

Therefore, if I wanted my build to say "SGT7-DATE-n7000-NIGHTLY.zip", I would use the following as the filename:

SGT7-[COLOR="Red"]$(date +%Y%m%d)[/COLOR]-n7000-NIGHTLY.zip

As such, you're final code would be:

#!/bin/bash
cd /var/lib/jenkins/[COLOR="red"]FOLDER[/COLOR]/out/target/product/[COLOR="red"]DEVICE[/COLOR]/
mv cm-10*.zip [COLOR="red"]BUILD-NAME[/COLOR]-$(date +%Y%m%d).zip

Alternatively, if you want to move to a local directory, such as your public ftp folder, you can use the following code instead, adding the date string above if you want:

#!/bin/bash
cd /var/lib/jenkins/[COLOR="red"]FOLDER[/COLOR]/out/target/product/[COLOR="red"]DEVICE[/COLOR]/
mv cm-10*.zip /[COLOR="red"]PATH_TO_PUB_FTP_FOLDER[/COLOR]/[COLOR="red"]BUILD-NAME[/COLOR].zip

.... B.

Automating uploads to "goo.im" or any other FTP/SFTP server...

First, you will have to install yafc in ubuntu. This is done via "sudo apt-get install yafc".

Then, create a script using the following code:

#!/bin/bash
cd /var/lib/jenkins/[COLOR="Red"]FOLDER[/COLOR]/out/target/product/[COLOR="red"]DEVICE[/COLOR]/
yafc <<**
open ftp://[COLOR="Red"]USER[/COLOR]:[COLOR="red"]PASS[/COLOR]@upload.goo.im:21/
cd public_html/[COLOR="red"]FOLDER[/COLOR]
put -f -r /var/lib/jenkins/[COLOR="red"]FOLDER[/COLOR]/out/target/product/[COLOR="red"]DEVICE[/COLOR]/cm-10*.zip
close

.... C.

Automating build.prop modifications...

MARKER

.... D.

Automating changelogs...

MARKER

Continued in Post #5
[Miscellaneous Android Development] AndroidSlave:
X.

Troubleshooting...

Here are some common solutions to your issues.

Reboot your system ("reboot -n") and try again. You may need a daily, or even weekly reboot depending on your RAM, software causing memory leaks, etc. You can setup a CRONJOB (Click Here for more info) to do a reboot daily. If you choose to setup a job in the crontab, be ensure it doesn't conflict with the timing of your Jenkins cron builds.

If you keep getting java out of memory errors, you probably need more RAM.

Other errors may be caused by your CCACHE being set to low. If you continue having issues caused by ccache, even when its high, you may want to install a global ccache in /usr/bin or the like.

Did you remember to set permissions on your scripts ("chmod a+x")

need to reset your username? See this post: http://xdaforums.com/showthread.php?p=51248853

having ota jenkins.zip NOT FOUND ERROR (or no such file or directory)? See this post: http://xdaforums.com/showthread.php?p=48454597; see also this post: http://xdaforums.com/showthread.php?p=55954963
[Miscellaneous Android Development] MikeCriggs:
Subscribed!
[Miscellaneous Android Development] AndroidSlave:
I have lots of great scripts and stuff I will be posting! just have to juggle my real job with throwing in some time every day to build this up...
[Miscellaneous Android Development] chasmodo:
Well done, mate. This is something that hasn't been covered so far methinks. :good:
[Miscellaneous Android Development] AndroidSlave:
Thanks buddy. I wanted to PM you a question, but you don't accept PMs...

I'll G+ you later on.
[Miscellaneous Android Development] Galaxtus:
I have become your slave ;)

Very good :)

#KitKat - Having one right now.
[Miscellaneous Android Development] sunny2303:
This is what you call, "Taking it to next level"

:):thumbup:

Sent from Asylum HQ
[Miscellaneous Android Development] azliazmi:
Absolutely awesome! I'm subscribed this fred, man!

Sent from my N7000 using cm10.2-Asyluminator by chasmodo
[Miscellaneous Android Development] dschense:
with my new root - 16GB RAM - everything works like it should :D thread subscribed!

is there any way to make the build faster? yes, using ccache.. but are there some more ways to get everything out of the box ?
[Miscellaneous Android Development] AndroidSlave:
What type of hard drive do you have?

How long do your Jenkins builds take to run?

The first run always fails (flaw in Jenkins) I need to add that to the guide.

The second run always takes extra long

The third run should be quicker...

My builds take about 30-45 minutes including repo sync everything

If you have a Solid State hard drive you can have builds going much quicker....
[Miscellaneous Android Development] dschense:
Okay.. I have tried many ways of setting up environment with Jenkins for compiling for paranoid android. But I had no luck at all..

I am running everything on a Ubuntu 12.04 headless server.

I did everything for setting up environment with installing nessesary apps and stuff with user who has sudo rights.

Than I installed Jenkins and logged in to the Jenkins user with sudo su und from root to Jenkins with su Jenkins without pw.

Home of Jenkins is var/lib/jenkins.

I downloaded android sdk to Jenkins home and installed sdk over x11 ssh connection in var/lib/jenkins/android-sdk.

Installed java jdk 6u45 to opt/java/64/java installation

Jdk path is set in Jenkins settings for default.

Logged in to Jenkins Web. Setup security with new user, created freestyle project und created workings pace. Repo init to this directory and sync everything.

In the freestyle project shell with Repo sync command and. /rom-build.sh i9300 clean

#!/bin/bash

cd ~/

export PATH=~/bin:$PATH

export USE_CCACHE=1

cd ~/workspace/pa43-legacy-modded/

repo sync -j16

./rom-build.sh i9300 clean

Build is syncing and building.. But I get Damn error all the time..

Do I have to change permissions or is the setup of my environment not the right way?

Hope anybody can help me...

Kaaaaaaaaatsching... Tapatalked!
[Miscellaneous Android Development] AndroidSlave:
[MENTION=2049297]dschense[/MENTION]

I'm confused as to what your Jenkins shell command is...

Also are you calling another script within a script? Or do you have two separate Jenkins execute shells?

Does that question make sense?

Also if you went into that particular build directory logged in via su jenkins, can you compile it manually without error?

your setup should look like this:

is that what you have?

You should Not be calling another script from inside your jenkins script. that will cause issues. you need to do them incrementally in chronological order and do a new execute shell for each script.

Also the "./" command won't work inside a script, or in a jenkins command

so your "./rom-build.sh i9300 clean" should be a whole new execute shell

and instead of "./" you need to use the "source" command like I have above
[Miscellaneous Android Development] AndroidSlave:
Also can you post the link of your error? I know you PM'd Me maybe u can paste that here
[Miscellaneous Android Development] dschense:
I think my biggest problem is how I can do a right shell script for building. If I build ParanoidAndroid from source manually I use the command. /rom-build.sh i9300... But I don't know exactly what commands to use for just using the shell window in Jenkins without using the script by ParanoidAndroid.. Any help?

Kaaaaaaaaatsching.... Tapatalked!
[Miscellaneous Android Development] AndroidSlave:
I'm trying to help but you don't respond to my questions.

Can you (1) post the PA build script and (2) post exactly what is in your execute shell
[Miscellaneous Android Development] dschense:
I am at work atm.. I will post everything when I have a little more time.. Next week I have much free time to use for setting up everything at all.. But maybe I can post some things like the build script tomorrow after work.

BTW. Big big the for helping me!

EDIT:

This is the rom-build.sj script:

http://pastebin.com/UzFFKqYM

EDIT2:

Now everything is clean.. i fetched my repo stuff and finished syncing.

Job is also clean.. any help for how to do next ?

Kaaaaaaaaatsching... Tapatalked!
[Miscellaneous Android Development] :
I will look in the morning when I get to work. I'll get back to you asap.
[Miscellaneous Android Development] :
Please also post your 'execute shell' Jenkins config section

I want to see a screenshot of that. I think that's where the issue is.
[Miscellaneous Android Development] dschense:
I put the build script (copy past) into my shell and changed some parameters. Screenshot is coming..

EDIT1:

The script I put inso the jenkins shell:

http://pastebin.com/BKcif2aZ

EDIT2:

The Screenshots

I hope this helps you to help me ;)

Kaaaaaaaaatsching.... Tapatalked!