[PROGRAM] wtfus - open source firmware downloader - Galaxy S II Original Android Development

This little utility will download and decrypt the latest firmware for your Samsung device.
You don't need Windows, .NET Framework, or the bloated Samsung Kies software to use it!
To flash your firmware, use Heimdall http://www.glassechidna.com.au/products/heimdall/
Requirements:
- Python 2.x, where 2.x probably needs to be 2.4 or later (don't use 3.x)
- pycrypto (http://pycrypto.org/) needs to be installed.
Install pycrypto:
Windows:
You will need 32-bit Python (64-bit Python is not compatible with their builds)
http://www.voidspace.org.uk/python/modules.shtml#pycrypto
Ubuntu and Debian:
Code:
sudo apt-get install python-crypto
Fedora:
Code:
yum install python-crypto
Get python code from github: https://github.com/hgwel1s/wtfus/blob/master/wtfus
Code:
wtfus [-v|-vv|-q] -d [-o output] firmware prodcode model
wtfus [-v|-vv] -p VARNAME [-p VARNAME ...] [--value] firmware prodcode model
-d Download latest firmware
-o file Save firmware to this file. Can contain variables, eg. {BINARY_FILE}
-p Print variable name, eg. LATEST_FW_VERSION or all to print all vars
--value Print value only, not name=value
-q No output
-v Verbose
-vv Very verbose
Examples:
wtfus -d I9100XWKDD/I9100XEUKD1/I9100XXKDH/I9100XWKDD XEU GT-I9100
wtfus -d SC02COMKF2/SC02CDCMKF2/SC02COMKF2/SC02COMKF2 DCM SC-02C
wtfus -d I9100TDUKF2/I9100TVAUKF2/I9100TDUKF2/I9100TDUKF2 VAU GT-I9100T
wtfus -d -o "{DEVICE_MODEL_NAME}-{LAST_MODIFIED}.zip" S8500XXKF3/S8500OXAJL2 XEO GT-S8500
wtfus -p LATEST_FW_VERSION -p BINARY_NAME I9100XWKDD/I9100XEUKD1/I9100XXKDH/I9100XWKDD XEU GT-I9100
wtfus -p all I9000XFJM1/I9000OXFJM1/I9000XXJM1/I9000XFJM1 CNX GT-I9000

Nice! Handy for cooks
Sent from my GT-I9100 using XDA App

Sorry for asking... do you have the code somewhere as your provided github link returns error 404. Yes, I know samsung changing their fus server auth. and also your post is dated on year 2011 but I am curious about your python code as I think I will learn something from your code Thanks.

Related

[TUT] CM6 / CM7 / Kernel Compile Step by Step

1) You need the following:
-Python 2.4 -- 2.7, which you can download from python.org.
Or:
Code:
$ sudo add-apt-repository ppa:fkrull/deadsnakes
$ sudo apt-get update
$ sudo apt-get install python2.5
-JDK 6 if you wish to build Gingerbread or newer
or
-JDK 5 for Froyo or older.
You can download both from java.sun.com.
Or:
Code:
$ sudo add-apt-repository "deb http://archive.canonical.com/ lucid partner"
$ sudo add-apt-repository "deb-src http://archive.canonical.com/ubuntu lucid partner"
$ sudo apt-get update
$ sudo apt-get install sun-java6-jdk-
Git 1.5.4 or newer. You can find it at git-scm.com.
Or:
Code:
$ sudo apt-get update
$ sudo apt-get upgrade
$ sudo apt-get install git-core-(optional) Valgrind, a tool that will help you find memory leaks, stack corruption, array bounds overflows, etc.
Download from valgrind.org.
Or:
Code:
$ sudo apt-get update
$ sudo apt-get upgrade
$ sudo apt-get install valgrind
2) Install required packages.
Code:
$ sudo apt-get install git-core gnupg flex bison gperf build-essential zip curl zlib1g-dev libc6-dev
lib32ncurses5-dev ia32-libs x11proto-core-dev libx11-dev lib32readline5-dev lib32z-dev
3) Download the repo:
Code:
$ mkdir ~/bin
$ PATH=~/bin:$PATH
$ curl http://android.git.kernel.org/repo > ~/bin/repo
$ chmod a+x ~/bin/repo6) Initialize the repo:
Code:
$ mkdir WORKING_DIRECTORY
$ cd WORKING_DIRECTORYF
or master branch:
Code:
$ repo init -u git://android.git.kernel.org/platform/manifest.git
For specific branch other than Gingerbread you would put in Donut, Eclair, Froyo, or Gingerbread where it currently says "gingerbread" without the parenthesis:
Code:
$ repo init -u git://android.git.kernel.org/platform/manifest.git -b gingerbread
4) When prompted, please configure Repo with your real name and email address. To use the Gerrit code-review tool, you will need an email address that is connected with a registered Google account. Make sure this is a live address at which you can receive messages. The name that you provide here will show up in attributions for your code submissions.
5) Gather the files:
Code:
$ repo sync
6) Verify and insert public key block:
Code:
$ gpg --import
Code:
-----BEGIN PGP PUBLIC KEY BLOCK-----
Version: GnuPG v1.4.2.2 (GNU/Linux)
mQGiBEnnWD4RBACt9/h4v9xnnGDou13y3dvOx6/t43LPPIxeJ8eX9WB+8LLuROSV
lFhpHawsVAcFlmi7f7jdSRF+OvtZL9ShPKdLfwBJMNkU66/TZmPewS4m782ndtw7
8tR1cXb197Ob8kOfQB3A9yk2XZ4ei4ZC3i6wVdqHLRxABdncwu 5hOF9KXwCgkxMD
u4PVgChaAJzTYJ1EG+UYBIUEAJmfearb0qRAN7dEoff0FeXsEa UA6U90sEoVks0Z
wNj96SA8BL+a1OoEUUfpMhiHyLuQSftxisJxTh+2QclzDviDya TrkANjdYY7p2cq
/HMdOY7LJlHaqtXmZxXjjtw5Uc2QG8UY8aziU3IE9nTjSwCXeJn uyvoizl9/I1S5
jU5SA/9WwIps4SC84ielIXiGWEqq6i6/sk4I9q1YemZF2XVVKnmI1F4iCMtNKsR4
MGSa1gA8s4iQbsKNWPgp7M3a51JCVCu6l/8zTpA+uUGapw4tWCp4o0dpIvDPBEa9
b/aF/ygcR8mh5hgUfpF9IpXdknOsbKCvM9lSSfRciETykZc4wrRCVGh lIEFuZHJv
aWQgT3BlbiBTb3VyY2UgUHJvamVjdCA8aW5pdGlhbC1jb250cm lidXRpb25AYW5k
cm9pZC5jb20+iGAEExECACAFAknnWD4CGwMGCwkIBwMCBBUCCA MEFgIDAQIeAQIX
gAAKCRDorT+BmrEOeNr+AJ42Xy6tEW7r3KzrJxnRX8mij9z8tg CdFfQYiHpYngkI
2t09Ed+9Bm4gmEO5Ag0ESedYRBAIAKVW1JcMBWvV/0Bo9WiByJ9WJ5swMN36/vAl
QN4mWRhfzDOk/Rosdb0csAO/l8Kz0gKQPOfObtyYjvI8JMC3rmi+LIvSUT9806Up
hisyEmmHv6U8gUb/xHLIanXGxwhYzjgeuAXVCsv+EvoPIHbY4L/KvP5x+oCJIDbk
C2b1TvVk9PryzmE4BPIQL/NtgR1oLWm/uWR9zRUFtBnE411aMAN3qnAHBBMZzKMX
LWBGWE0znfRrnczI5p49i2YZJAjyX1P2WzmScK49CV82dzLo71 MnrF6fj+Udtb5+
OgTg7Cow+8PRaTkJEW5Y2JIZpnRUq0CYxAmHYX79EMKHDSThf/8AAwUIAJPWsB/M
pK+KMs/s3r6nJrnYLTfdZhtmQXimpoDMJg1zxmL8UfNUKiQZ6esoAWtDg pqt7Y7s
KZ8laHRARonte394hidZzM5nb6hQvpPjt2OlPRsyqVxw4c/KsjADtAuKW9/d8phb
N8bTyOJo856qg4oOEzKG9eeF7oaZTYBy33BTL0408sEBxiMior 6b8LrZrAhkqDjA
vUXRwm/fFKgpsOysxC6xi553CxBUCH2omNV6Ka1LNMwzSp9ILz8jEGqmU tkBszwo
G1S8fXgE0Lq3cdDM/GJ4QXP/p6LiwNF99faDMTV3+2SAOGvytOX6KjKVzKOSsfJQ
hN0DlsIw8hqJc0WISQQYEQIACQUCSedYRAIbDAAKCRDorT+Bmr EOeCUOAJ9qmR0l
EXzeoxcdoafxqf6gZlJZlACgkWF7wi2YLW3Oa+jv2QSTlrx4KL M=
=Wi5D
-----END PGP PUBLIC KEY BLOCK-----
7) After copying and pasting the public key block press Crtl+D to end the input.
8) Compiling:
Code:
$ source build/envsetup.sh
Or:
Code:
$ . build/envsetup.sh
9) Issue:
Code:
$ lunch
10) Pick your poison.
11) Now issue:
Code:
$ make
12) Now just cross your fingers and hope it all works out!
13) Issue this command to create a flashable zip:
Code:
$ make otapackage
Or if you want to test on an emulator:
Code:
$ emulator
15) If all went well you can either run your build on an emulator or flash it on a device.
Code:
Please note that you have already selected your build target with lunch, and it is unlikely at best to run on a different target than it was built for.
~How To Add A Device To The List~
1) Find the github for your device you wish to add. (For me it is the HTC Hero CDMA)
2) Now navigate to the location you are going clone the device tree to:
Code:
$ cd WORKING_DIRECTORY/device/htc3) Clone the github device tree from remote to local: (The heroc would be whatever you want that folder to be named so make sure it is whatever standard name would be for your device, example: Nexus One [Passion], Nexus S [Crespo], Motorola Droid [Sholes], HTC Incredible [Inc], etc.)
Code:
git clone git://github.com/wjb/android_device_htc_heroc.git -b gingerbread heroc
3) Now navigate into the folder:
Code:
$ cd heroc
4) Setup Device Specific Make Files:
Code:
$ ./setup-makefiles.sh
5) Prepare To Copy Device Proprietary Files To Vendor Tree:
Code:
$ cd prebuilt
6) Copy Proprietary Files To Vendor Tree:
Code:
$ cp -r proprietary WORKING_DIRECTORY/vendor/htc/heroc
7) Navigate back to your home directory for building:
Code:
$ cd ~/WORKING_DIRECTORY
8) Prepare To Compile:
Code:
$ source build/envsetup.sh
Or:
Code:
$ . build/envsetup.sh
9) Get your list of devices:
Code:
$ lunch
10) Pick your poison.
11) Now compile:
Code:
$ make
Or if you want a flashable zip:
Code:
$ make otapackage
Compiling kernel:
You will need sdk / ndk packages from Google:
mkdir KERNEL_DIRECTORY
cd to KERNEL_DIRECTORY
Code:
ARCH=arm CROSS_COMPILE=???/prebuilt/linux-x86/toolchain/arm-eabi-4.4.0/bin/arm-eabi- make semc_?????_defconfig
or
Unpack config.gz to KERNEL_DIRECTORY as .config from kernel.sin --- how? Simple use hexeditor and search two times for gzip magic 1F8B08 cut all before that and you have config.gz
then
ARCH=arm CROSS_COMPILE=???/prebuilt/linux-x86/toolchain/arm-eabi-4.4.0/bin/arm-eabi- make
Compiling invidual packages:
Code:
make [ module name ]
Why this so down this is a huge guide no one interested?
THANKS Man I was wondering how to do this, thanks a lot this guide will help many people. And others will understand the hard work that involves creating a custom kernel or rom.
This guide is for debian based distributions
Great job aZuZu
Sent from my X10a using xda premium

[Q] USB HOST support SiyahKernel 3.0beta6

Dear Friends,
I have been building custom USB devices for Android as a hobby during my spare time since the end of last year. I have been succesfully using until now Siyah kernel V2.5.2-VWM + Android 2.3.5 in order to test my hardware prototypes with my SGS2. This version of Siyah kernel was compiled with some flags (CONFIG_SEC_WHITELIST=n) that disabled a white-list placed by Samsung that prevented third-party USB devices from connecting to the phone.
I updated yesterday to Siyah-v3.0b6 and CM9 and found that my USB devices are not working (OTG devices like my USB memory stick still works). I tracked the problem using the "lsusb" terminal command and the "USB Device Info" app, and I found that my devices are not enumerated correctly anymore. This is a symptom that the Samsung white-list is enabled and it is filtering USB devices that are not found in the list.
I may be wrong, but I think the workaround is only in the compilation flag above described. Does anyone of you people know of any kernel supporting ICS that is working with custom USB devices, or HID devices (joysticks, keyboards, mouse, gamepads, etc)?
I dont have enough credits to post this in the developer Forum so that Gokhanmoral can receive this feedback. I hope he may eventually read this post.
Thanks in advance for your help,
Saul
Did you try Beta 5? I had problems with Beta 6, I could not access the phone via adb or see any of the drives on my PC via MTP. Maybe there are general USB problems in that version. Going back to Beta 5 solved it.
rovo89 said:
Did you try Beta 5? I had problems with Beta 6, I could not access the phone via adb or see any of the drives on my PC via MTP. Maybe there are general USB problems in that version. Going back to Beta 5 solved it.
Click to expand...
Click to collapse
Thanks a lot for the suggestion. I am digging on this issue and found that it is more related to a compilation flag of the new kernel for ICS.
regards,
Saul
USB Host support for custom devices
Hello Saul,
I am experiencing a similar problem with my custom USB device. I have a rooted Samsung Galaxy S2 (GT-I9100) with android 4.0.3.
Did you manage to complie a kernel that works? I downloaded the GT-I9200_ICS_Opensource_Update4.zip kernel source files from opensource.samsung.com but I am not able to compile it. I got the error:
Code:
drivers/media/video/samsung/mali/linux/mali_osk_mali.c:23:98: error: arch/config.h: No such file or directory
Any ideas or guidance would be greatly appreciated.
Model: GT-I9100
Android version: 4.0.3
Baseband: I9100BULP6
Kernel: [email protected]#3
Compilation: IML74K.BULPC
Hi Saul and everybody,
I figured out what the problem was; this is just in case it's useful to someone.
It seems the "make clean" and "make mrproper" routines in the Makefile created by Samsund does not work properley and you need to unzip the entire source code again and restart the proces from scratch every time you want to change the .config and re-compile.
Afterwards, I also noticed the image won't work because I needed to exctract an initramfs for my device and to link it to the new kernel during the kernel compilation process and setting the CONFIG_INITRAMFS_SOURCE .config parameter pointing to the location where it was extracted.
In order to extract my initramfs, I applied the following script (which is an adaptation I made to this one http://forum.xda-developers.com/wiki/Extract_initramfs_from_zImage) to a zImage kernel included in a stockrom that worked fine in my device:
Code:
#!/bin/bash
#
#Source: http://forum.xda-developers.com/wiki/Extract_initramfs_from_zImage
#
#Extract initramfs from zImage
#
#initramfs provides the rootfs when booting a Linux kernel on a mobile device.
#Below script may be helpful if you are interested in extracting such an image from a zImage kernel file.
#Tested on Ubuntu for Samsung Galaxy S firmware. Other zImages may have different archiving options - would require a #modification to the script...
#
#After extracting the initramfs, it can be unpacked into the local directory with
#
#cpio -v -i --no-absolute-filenames < <path-to-initramfs.img>
#
zImage=$1
#========================================================
# find start of gziped kernel object in the zImage file:
#========================================================
#
# Next two lines modified by Federico Linares
#
p1=`perl -e 'print "\x1F\x8B\x08"'` # Added by Federico Liares
pos=`grep -P -a -b --only-matching $p1 $zImage | cut -f 1 -d :` # Modified by Federico Linares
echo "-I- Extracting kernel image from $zImage (start = $pos)"
#========================================================================
# the cpio archive might be gzipped too, so two gunzips could be needed:
#========================================================================
dd if=$zImage bs=1 skip=$pos | gunzip > /tmp/kernel.img
pos=`grep -P -a -b -m 1 --only-matching $'\x1F\x8B\x08' /tmp/kernel.img | cut -f 1 -d :`
#===========================================================================
# find start and end of the "cpio" initramfs image inside the kernel object:
# ASCII cpio header starts with '070701'
# The end of the cpio archive is marked with an empty file named TRAILER!!!
#===========================================================================
if [ ! $pos = "" ]; then
echo "-I- Extracting compressed cpio image from kernel image (start = $pos)"
dd if=/tmp/kernel.img bs=1 skip=$pos | gunzip > /tmp/cpio.img
start=`grep -a -b -m 1 --only-matching '070701' /tmp/cpio.img | head -1 | cut -f 1 -d :`
end=`grep -a -b -m 1 --only-matching 'TRAILER!!!' /tmp/cpio.img | head -1 | cut -f 1 -d :`
inputfile=/tmp/cpio.img
else
echo "-I- Already uncompressed cpio.img, not decompressing"
start=`grep -a -b -m 1 --only-matching '070701' /tmp/kernel.img | head -1 | cut -f 1 -d :`
end=`grep -a -b -m 1 --only-matching 'TRAILER!!!' /tmp/kernel.img | head -1 | cut -f 1 -d :`
inputfile=/tmp/kernel.img
fi
# 11 bytes = length of TRAILER!!! zero terminated string, fixes premature end of file warning in CPIO
end=$((end + 11))
count=$((end - start))
if (($count < 0)); then
echo "-E- Couldn't match start/end of the initramfs image."
exit
fi
echo "-I- Extracting initramfs image from $inputfile (start = $start, end = $end)"
dd if=$inputfile bs=1 skip=$start count=$count > initramfs.cpio
And that's almost all. At this point everything works fine except the Wifi. I think I have to link it to the kernel as a module, but I am not sure where to get the module from.
Any help would be greatly appreciated.
______________________________
Device: GT-I9100
Android version: 4.0.3
Baseband: I9100BULP6
Kernel: 3.0.15-I9100G
Compilation: IML74K.BULPC

[GUIDE] Build Cyanogenmod from Source

Hi,
I have decided to write this post after reading so many different guides on my journey to build my own version of Cyanogenmod and after countless tries and hours of research I succeeded. Here's how:
You will need:
A Ubuntu box
A basic knowledge of Linux
A fast internet connection or a lot of patience.
Once you have setup your Ubuntu box either in a Virtual Machine of as a stand alone PC you will need to open a terminal, this can be done by pressing 'CTRL + ALT + T' or opening the search menu and typing "Terminal".
You should see the following:
Code:
[email protected]:~$
We will need to install all the necessary files in order to build and download Cyanogenmod, we can do this by running the following command:
Code:
sudo apt-get install bison build-essential curl flex git gnupg gperf libesd0-dev liblz4-tool libncurses5-dev libsdl1.2-dev libwxgtk2.8-dev libxml2 libxml2-utils lzop pngcrush schedtool squashfs-tools xsltproc zip zlib1g-dev openjdk-7-jdk openjdk-7-jre
As many Linux users have more than one version of Java installed we will need to set the the version we just installed as our default version.
Code:
sudo update-alternatives --config java
sudo update-alternatives --config javac
If by any chance you have a 64-bit version of Ubuntu installed we will require some extra files, if not please skip this command.
Code:
sudo apt-get install g++-multilib gcc-multilib lib32ncurses5-dev lib32readline-gplv2-dev lib32z1-dev
We will now for simplicity's sake need to create the following directories in your home folder. These directories will host our build.
Code:
mkdir -p ~/bin
mkdir -p ~/android/system
Once you have setup everything correctly we will now to download the Cyanogenmod source code of which we are going to use the 'Repo' utility. This utility is an automated tool for GitHub cloning. We can download this and set the correct permissions by running the following commands.
Code:
curl https://storage.googleapis.com/git-repo-downloads/repo > ~/bin/repo
chmod a+x ~/bin/repo
To continue with download the source code we will now initialize the GitHub repository that holds Cyanogenmod. We are going to need to specify the repository with -u and the branch with -b. Here I am going to download the latest available version of Cyanagenmod 13.0.
Code:
cd ~/android/system/
~/bin/repo init -u https://github.com/CyanogenMod/android.git -b cm-13.0
And to finally start downloading the source:
Code:
~/bin/repo sync -c -f -j8
Where:
-c Download the current version instead of all history.
-F Forces the connection to continue even if a connection error occurs.
-j8 This specifies the number of parallel operations. Use -j8 for a quad core processor and a -j16 for an octa-core.
Once the download completes successfully we will need to download the device specific code, this includes specific applications and kernel configurations for your device. To start downloading the files type:
Code:
source build/envsetup.sh
breakfast angler
The download should now start, it should only take minutes however this depends on your internet connection.
Again once this completes, we need to grab proprietary specific files. We first need to navigate to ~/android/system/device/huawei/angler. You can do this by running the following command:
Code:
cd ~/android/system/device/huawei/angler
As the script we are going to use has some dependencies we will need to get them first.
Code:
git clone https://github.com/JesusFreke/smali
cd smali
./gradlew build
cd ..
Additionally we need to download a Google Stock Image, I'm using angler-mmb29m-factory-8c31db3f.tgz, once downloaded you will need to unzip it and cd to it within the terminal.
and then download:
Code:
wget http://people.canonical.com/~mfisch/tools/ext4_utils.tar.gz
tar xzsf ext4_utils.tar.gz
cd ext4_utils
mv simg2img ../angler-mmb29m/
cd ../angler-mmb29m/
We will now convert the system and vendor img's using simg2img to a readable format and mount them so we extract the propriety files using ./extract_files.sh
We can do all of this by using the following commands.
Code:
./simg2img system.img system.ext4
./simg2img vendor.img vendor.ext4
sudo mkdir -p /mnt/system
sudo mkdir -p /mnt/vendor
sudo mount -rw system.ext4 /mnt/system
sudo mount -rw vendor.ext4 /mnt/vendor
Finally we can extract the proprietary files for the system image by running the following commands.
Code:
cd ~/android/system/device/huawei/angler/
./extract_files /mnt/ smali/
Finally we can finish off by our by running the brunch command to build and generate the .zip file of our own Cyanogenmod.
Code:
brunch angler
Note: This will take 20 mins - 2 hours - 2 days depending on your hardware spec.
And well that's it, the location of your generated .zip file should be in blue at the end of your terminal.
Reserved
N/A
This is amazing. Many thanks.
Great I've been looking
Sent from my XT1526 using XDA Forums Pro.
If there are bugs how can we fix that .Such as camera ,ril.For nexus 6p it is fine but for other phones
AANISH said:
If there are bugs how can we fix that .Such as camera ,ril.For nexus 6p it is fine but for other phones
Click to expand...
Click to collapse
As I have only just started my journey on this long path I have done a bit of research for you. Google released there own device specific binaries for the Nexus devices of which usually include the following:
NFC, Bluetooth and Wi-Fi
Media, Audio, Thermal, Touch Screen, Sensors
GPS, Camera, Gestures, Graphics, DRM, Video
This to me suggests that the chipset suppliers supply them - Broadcom, Qualcomm... or even other companies like Motorola. So if you are looking for binaries for other devices I would start with there chipset.
If you would like to look at Google's binaries following the link below however before you go looking for the 6P binaries they haven't been uploaded yet + if you do find any further information please reply to this comment or PM me.
Just saying, the official guide on the wiki works just fine. Been building for all my CM12-capable devices since 2015. Good for people who don't go there, though.
Sent from Google Nexus 6P @ CM13
[WARNING: XDA One have not implemented "mark forum as read" - do not use]
AndyYan said:
Just saying, the official guide on the wiki works just fine. Been building for all my CM12-capable devices since 2015. Good for people who don't go there, though.
Sent from Google Nexus 6P @ CM13
[WARNING: XDA One have not implemented "mark forum as read" - do not use]
Click to expand...
Click to collapse
That is true but I had major difficulties with it, for example it asks you to initialise the cm 12.1 branch when it wasn't available and I had a major pain with extract_files as it wouldnt use adb but instead had to use stock firmware to grab the proprietary files.
connectionalive said:
That is true but I had major difficulties with it, for example it asks you to initialise the cm 12.1 branch when it wasn't available and I had a major pain with extract_files as it wouldnt use adb but instead had to use stock firmware to grab the proprietary files.
Click to expand...
Click to collapse
You still have to spot the tiny mistakes in the guide, of course. The guide hasn't been updated in a long time.
I didn't grab any proprietary files for any of my devices and the builds still run fine - the files should already be in the repo.
Sent from Google Nexus 6P @ CM13
[WARNING: XDA One have not implemented "mark forum as read" - do not use]
AndyYan said:
You still have to spot the tiny mistakes in the guide, of course. The guide hasn't been updated in a long time.
I didn't grab any proprietary files for any of my devices and the builds still run fine - the files should already be in the repo.
Sent from Google Nexus 6P @ CM13
[WARNING: XDA One have not implemented "mark forum as read" - do not use]
Click to expand...
Click to collapse
Ah I didn't know this, I have only just started learning and researching all of this so all helps, if you could point me in the right direction, it would be greatly appreciated.
connectionalive said:
Ah I didn't know this, I have only just started learning and researching all of this so all helps, if you could point me in the right direction, it would be greatly appreciated.
Click to expand...
Click to collapse
I'm also just at the beginning - building according to official guides without modifying the source. Just giving some tips so that you don't step on the same mines as I did
P.S. Transition from CM12.1 to CM13 was a real PITA...
Sent from Google Nexus 6P @ CM13
[WARNING: XDA One have not implemented "mark forum as read" - do not use]
Great guide, I have a build environment setup on Linux Mint, but I am curious to know if the simg2img stuff and extraction is necessary, I thought the initial build process took care of that??
adzcache said:
Great guide, I have a build environment setup on Linux Mint, but I am curious to know if the simg2img stuff and extraction is necessary, I thought the initial build process took care of that??
Click to expand...
Click to collapse
It's not, it's a lot easier to just use the Muppets and not worry about it.
akellar said:
It's not, it's a lot easier to just use the Muppets and not worry about it.
Click to expand...
Click to collapse
I suppose I should start learning how to building up a roomservice.xml for this 6P then. Thanks for the confirmation.
akellar said:
It's not, it's a lot easier to just use the Muppets and not worry about it.
Click to expand...
Click to collapse
I couldn't find it on their repository under Google or Huawei
connectionalive said:
I couldn't find it on their repository under Google or Huawei
Click to expand...
Click to collapse
Look under the right branch
Code:
./simg2img system.img system.ext4
./simg2img vendor.img vendor.ext4
sudo mkdir -p /mnt/system
sudo mkdir -p /mnt/vendor
sudo mount -rw system.ext4 /mnt/system
sudo mount -rw vendor.ext4 /mnt/vendor
Code:
cd ~/android/system/device/huawei/angler/
./extract_files /mnt/ smali/
You have to take ownership of the mounted images before you can extract the blobs. Otherwise you have to use sudo for extract. Then the folder is root and make is denied permission while compiling.
XxMORPHEOUSxX said:
Code:
./simg2img system.img system.ext4
./simg2img vendor.img vendor.ext4
sudo mkdir -p /mnt/system
sudo mkdir -p /mnt/vendor
sudo mount -rw system.ext4 /mnt/system
sudo mount -rw vendor.ext4 /mnt/vendor
Code:
cd ~/android/system/device/huawei/angler/
./extract_files /mnt/ smali/
You have to take ownership of the mounted images before you can extract the blobs. Otherwise you have to use sudo for extract. Then the folder is root and make is denied permission while compiling.
Click to expand...
Click to collapse
I had no issues when actioning any of these commands but in theory you are correct.
connectionalive said:
I had no issues when actioning any of these commands but in theory you are correct.
Click to expand...
Click to collapse
I ran into issues. That's why I mentioned it. Also the extract-files tool is formatted different in my tree. After mounting these were are my exact commands. Maybe it will help someone else.
Code:
sudo chown -hR <user> /mnt/system
sudo chown -hR <user> /mnt/vendor
cd ~/android/system/device/huawei/angler
./extract-files.sh /mnt/ smali/
Hola
I have gone through this guide (really well put together) but I am getting an error almost at the very end and I need some guidance please:
I invoke brunch angler command but it shows:
~/android/system/device/huawei/angler$ brunch angler
bash: build/tools/roomservice.py: No such file or directory
** Don't have a product spec for: 'cm_angler'
** Do you have the right repo manifest?
No such item in brunch menu. Try 'breakfast'
I tried the lunch and breakfast commands but it comes up with the same error.
I did run both:
source build/envsetup.sh
breakfast angler
from the right directory and no errors came up. Can anyone assist me? Thanks.

[HELP!] Lineageos 15.1 build fails with "ninja failed with: exit status 1"

Hi everyone!
I'm trying to build LineageOS 15.1 for my Samsung Galaxy S5 - klte. Everything is good until I start compiling and then the build fails with an error "ninja failed with: exit status 1".
I've gone through the output from the build, but I can't find anything that sticks out. I also have tried Googling the problem, but I can't find anything that matches my problem. Here are my build steps:
## Create the directories
mkdir -p ~/bin
mkdir -p ~/android/lineage
## Install the repo
curl https://storage.googleapis.com/git-repo-downloads/repo > ~/bin/repo
chmod a+x ~/bin/repo
## Put the ~/bin directory in my path
nano ~/.profile
# set PATH so it includes user's private bin if it exists
if [ -d "$HOME/bin" ] ; then
PATH="$HOME/bin:$PATH"
fi
source ~/.profile
## Initialize the source repository
cd ~/android/lineage
repo init -u https://github.com/LineageOS/android.git -b lineage-15.1
## Download the source code
repo sync -f --force-sync -j8 -c
source build/envsetup.sh
breakfast klte
cd ~/android/lineage/device/samsung/klte
./extract-files.sh
cd ~/android/lineage
export USE_CCACHE=1
./prebuilts/sdk/tools/jack-admin kill-server
export JACK_SERVER_VM_ARGUMENTS="-Dfile.encoding=UTF-8 -XX:+TieredCompilation -Xmx15g"
./prebuilts/sdk/tools/jack-admin start-server
## Prepare the device-specific code
source build/envsetup.sh
breakfast klte
## Start the build
croot
brunch klte
Here is a link for the output from the build:
http://www.ohsmeg.com/bill/projects/android/lineageos/ninja_error.html
My build machine is an i7-950 with 16gb of memory, running Ubuntu 16.04 headless.
Any suggestions?
Thanks!
zog

SuperR's Kitchen CLI (command line)(Donate Version)

The command line options for Linux/WSL/WSL2/Mac are a result of all the requests for a way to build img files outside of the kitchen. Now there is a way to do exactly this and more.
This post will be updated as features/commands are added or changed. The example commands below will work with the latest version of the kitchen.
If you have problems, make sure you are fully updated.
If something works in the kitchen but does not work in the CLI, please post about it in this thread.
If something does not work in the kitchen and does not work in the CLI, please post in the main kitchen thread.
Command Line Examples:
Unpack img file
Code:
$ /path/to/kitchen/superr -f unpack_img system.img -p superr_project-name
Pack img file
Code:
$ /path/to/kitchen/superr -f pack_img system.img raw -p superr_project-name
$ /path/to/kitchen/superr -f pack_img system.img sparse -p superr_project-name
$ /path/to/kitchen/superr -f pack_img system.img dat -p superr_project-name
$ /path/to/kitchen/superr -f pack_img system.img lz4 -p superr_project-name
Unpack super.img
Code:
$ /path/to/kitchen/superr -f unpack_super super.img -p superr_project-name
Pack super.img
Code:
$ /path/to/kitchen/superr -f pack_super system_new.img vendor_new.img product_new.img raw -p superr_project-name
$ /path/to/kitchen/superr -f pack_super system_new.img vendor_new.img product_new.img sparse -p superr_project-name
$ /path/to/kitchen/superr -f pack_super system_new.img vendor_new.img product_new.img dat -p superr_project-name
$ /path/to/kitchen/superr -f pack_super system_new.img vendor_new.img product_new.img lz4 -p superr_project-name
Deodex
Code:
$ /path/to/kitchen/superr -f deodex -p superr_project-name
Remove dm-verity
Code:
$ /path/to/kitchen/superr -f dmverity -p superr_project-name
Remove forceencrypt
Code:
$ /path/to/kitchen/superr -f forcee -p superr_project-name
Reserved
amazing, thank you!
Want to thank you for this. Awesome !!!
Thank you
PLZ HELP
I am trying to unpack stock rom for moto g play 2021 (C:\Users\Code3p0\Downloads\XT2093-3_GUAMNA_BOOST_11_RZA31.Q2-146-14-6_subsidy-DEFAULT_regulatory-DEFAULT_CFC.xml.zip)
super.img_sparsechunk.0
cannot upload rom to Kitchen
cannot unpack due to errno 2 (file not found no such file system.img)
hi, good move.
adding plugins options via cli will be appeciated

Categories

Resources