[4.2.2]Compilling Error - myTouch 4G Q&A, Help & Troubleshooting

Code:
+ ENABLE_SPARSE_IMAGE=
+ '[' -s = -s ']'
+ ENABLE_SPARSE_IMAGE=-s
+ shift
+ '[' 5 -ne 4 -a 5 -ne 5 -a 5 -ne 6 ']'
+ SRC_DIR=/home/coderz/liquid/out/target/product/glacier/data
+ '[' '!' -d /home/coderz/liquid/out/target/product/glacier/data ']'
+ OUTPUT_FILE=/home/coderz/liquid/out/target/product/glacier/userdata.img
+ EXT_VARIANT=ext4
+ MOUNT_POINT=data
+ SIZE=1232072704
+ FC=
+ case $EXT_VARIANT in
+ '[' -z data ']'
+ '[' -z 1232072704 ']'
+ '[' -n '' ']'
+ MAKE_EXT4FS_CMD='make_ext4fs -s -l 1232072704 -a data /home/coderz/liquid/out/target/product/glacier/userdata.img /home/coderz/liquid/out/target/product/glacier/data'
+ echo make_ext4fs -s -l 1232072704 -a data /home/coderz/liquid/out/target/product/glacier/userdata.img /home/coderz/liquid/out/target/product/glacier/data
make_ext4fs -s -l 1232072704 -a data /home/coderz/liquid/out/target/product/glacier/userdata.img /home/coderz/liquid/out/target/product/glacier/data
+ make_ext4fs -s -l 1232072704 -a data /home/coderz/liquid/out/target/product/glacier/userdata.img /home/coderz/liquid/out/target/product/glacier/data
Creating filesystem with parameters:
Size: 1232072704
Block size: 4096
Blocks per group: 32768
Inodes per group: 7520
Inode size: 256
Journal blocks: 4699
Label:
Blocks: 300799
Block groups: 10
Reserved block group size: 79
Created filesystem with 10/75200 inodes and 9907/300799 blocks
+ '[' 0 -ne 0 ']'
Running: simg2img /home/coderz/liquid/out/target/product/glacier/userdata.img /home/coderz/liquid/out/target/product/glacier/unsparse_userdata.img
Running: e2fsck -f -n /home/coderz/liquid/out/target/product/glacier/unsparse_userdata.img
e2fsck 1.41.14 (22-Dec-2010)
Pass 1: Checking inodes, blocks, and sizes
Pass 2: Checking directory structure
Pass 3: Checking directory connectivity
/lost+found not found. Create? no
Pass 4: Checking reference counts
Pass 5: Checking group summary information
/home/coderz/liquid/out/target/product/glacier/unsparse_userdata.img: ********** WARNING: Filesystem still has errors **********
/home/coderz/liquid/out/target/product/glacier/unsparse_userdata.img: 10/75200 files (0.0% non-contiguous), 9907/300799 blocks
error: failed to build /home/coderz/liquid/out/target/product/glacier/userdata.img from /home/coderz/liquid/out/target/product/glacier/data
make: *** [/home/coderz/liquid/out/target/product/glacier/userdata.img] Error 1
make: *** Deleting file `/home/coderz/liquid/out/target/product/glacier/userdata.img'
make: *** Waiting for unfinished jobs....
ProGuard, version 4.4
Reading program jar [/home/coderz/liquid/out/target/common/obj/APPS/ApplicationsProvider_intermediates/classes.jar]
Reading library jar [/home/coderz/liquid/out/target/common/obj/JAVA_LIBRARIES/core_intermediates/classes.jar]
CHK include/linux/version.h
make[1]: Leaving directory `/home/coderz/liquid/kernel/htc/glacier'
Reading library jar [/home/coderz/liquid/out/target/common/obj/JAVA_LIBRARIES/core-junit_intermediates/classes.jar]
Reading library jar [/home/coderz/liquid/out/target/common/obj/JAVA_LIBRARIES/ext_intermediates/classes.jar]
Reading library jar [/home/coderz/liquid/out/target/common/obj/JAVA_LIBRARIES/framework_intermediates/classes.jar]
Note: Some input files use or override a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
Reading library jar [/home/coderz/liquid/out/target/common/obj/JAVA_LIBRARIES/guava_intermediates/classes.jar]
Preparing output jar [/home/coderz/liquid/out/target/common/obj/APPS/ApplicationsProvider_intermediates/proguard.classes.jar]
Copying resources from program jar [/home/coderz/liquid/out/target/common/obj/APPS/ApplicationsProvider_intermediates/classes.jar]
Any Ideas?:crying:

https://github.com/Evervolv/android_build/commit/6a6c11215bdf3f114ed3589ede4bda006adacf7e

Related

First things I did before and just after rooting

Hey all.
Tools I used for flashing and backup:
on PC linux box:
- heimdall - which does the flashing
- netcat - (nc, ncat or netcat) tool for writing to or reading from network.
- partx - assigns partitioned disk images as kernel's loop devices like: loop0p2...loop0p25
on s3 mini:
- busybox
- "Rooted SSH/SFTP Daemon"
Before rooting reboot the phone to the download mode and download
the pit file with:
Code:
heimdall download-pit --output goldenxx.pit --no--reboot
Root your phone and install busybox and ssh daemon on it.
Start sshd but close all other apps to keep filesystem activity so low as possible.
start netcat on your PC:
Code:
netcat -l 192.168.0.11 5050 > mmcblk0.gz
Now netcat is listening for input from your lan (Replace address to corresponding your PC's IP address)
Now try to connect to your phone with ssh. When you got an # prompt then:
Code:
sync
and send your whole internal storage from phone to your PC:
Code:
cat /dev/block/mmcblk0 | gzip | nc 192.168.0.11 5050
Do not start any apps on your phone before you got back the command prompts both on phone and PC.
when you got a command prompt again and no error messages was printed. you should have an
gzip compressed disk image of you phones mmc on your PC.
Check its integrity running
Code:
gzip -t mmcblk0.gz
If the package is ok, copy the goldenxx.pit and mmcblk0.gz to the sure location.
Now you can make an uncompressed copy of mmcblk0.gz for example:
Code:
zcat Backup/mmcblk0.gz > ~/mmcblk0
With partx you can use the image like any other partitioned disks running as root:
Code:
partx -v -a ~/mmcblk0
it should print something like this:
Code:
partition: none, disk: mmcblk0, lower: 0, upper: 0
Trying to use '/dev/loop0' for the loop device
/dev/loop0: partition table type 'gpt' detected
/dev/loop0: partition #2 added
/dev/loop0: partition #3 added
/dev/loop0: partition #4 added
...
/dev/loop0: partition #25 added
and print out the data of partitions associated within kernel:
Code:
partx -s ~/mmcblk0
Code:
3 1024 3071 2048 1M PIT 52444e41-494f-2044-5049-540000000000
4 6144 8191 2048 1M MD5HDR 52444e41-494f-2044-4d44-354844520000
5 8192 9215 1024 512K STEboot1 52444e41-494f-2044-5354-45626f6f7431
6 9216 10239 1024 512K STEboot2 52444e41-494f-2044-5354-45626f6f7432
7 10240 11263 1024 512K Dnt 52444e41-494f-2044-446e-740000000000
8 11264 12287 1024 512K reserved 52444e41-494f-2044-7265-736572766564
9 16384 18431 2048 1M CSPSAFS 52444e41-494f-2044-4353-505341465300
10 18432 20479 2048 1M CSPSAFS2 52444e41-494f-2044-4353-505341465332
11 20480 53247 32768 16M EFS 52444e41-494f-2044-4546-530000000000
12 53248 86015 32768 16M ModemFS 52444e41-494f-2044-4d6f-64656d465300
13 86016 118783 32768 16M ModemFS2 52444e41-494f-2044-4d6f-64656d465332
14 118784 221183 102400 50M Fota 52444e41-494f-2044-466f-746100000000
15 380928 381055 128 64K IPL Modem 52444e41-494f-2044-4950-4c204d6f6465
16 385024 413695 28672 14M Modem 52444e41-494f-2044-4d6f-64656d000000
17 417792 421887 4096 2M Loke4 52444e41-494f-2044-4c6f-6b6534000000
18 421888 425983 4096 2M 2ndLoke4 52444e41-494f-2044-326e-644c6f6b6534
19 425984 458751 32768 16M PARAM 52444e41-494f-2044-5041-52414d000000
20 458752 491519 32768 16M Kernel 52444e41-494f-2044-4b65-726e656c0000
21 491520 524287 32768 16M Kernel2 52444e41-494f-2044-4b65-726e656c3200
22 524288 2981887 2457600 1.2G SYSTEM 52444e41-494f-2044-5359-5354454d0000
23 2981888 4702207 1720320 840M CACHEFS 52444e41-494f-2044-4341-434845465300
24 4702208 5357567 655360 320M HIDDEN 52444e41-494f-2044-4849-4444454e0000
25 5357568 15249407 9891840 4.7G DATAFS 52444e41-494f-2044-4441-544146530000
now you can explore the partitions and make images of it. For example:
Code:
file -s /dev/loop0p11
/dev/loop0p11: Linux rev 1.0 ext4 filesystem data, UUID=1b70457a-e011-c65a-87c6-f346bd874821, volume name "efs" (extents) (large files)
Code:
cat /dev/loop0p11 > ~/efs.ext4
and...
Code:
file -s /dev/loop0p16
Code:
/dev/loop0p16: data
It is modem.bin so:
Code:
cat /dev/loop0p16 > ~/modem.bin
Note that ext4 images must be transformed to the right .img-file form with ext2simg tool before flashing.
Be careful before flash your phone with these files.
remember to unmount all /dev/loop0 -partitions and finally
Code:
partx -d /dev/loop0
losetup -d /dev/loop0
because the images was copied from running system,
all writeable filesystems are not clean. So you might want to e2fsck these partitions.
KrRain said:
Hey all.
Tools I used for flashing and backup:
on PC linux box:
- heimdall - which does the flashing
- netcat - (nc, ncat or netcat) tool for writing to or reading from network.
- partx - assigns partitioned disk images as kernel's loop devices like: loop0p2...loop0p25
on s3 mini:
- busybox
- "Rooted SSH/SFTP Daemon"
Before rooting reboot the phone to the download mode and download
the pit file with:
Code:
heimdall download-pit --output goldenxx.pit --no--reboot
Root your phone and install busybox and ssh daemon on it.
Start sshd but close all other apps to keep filesystem activity so low as possible.
start netcat on your PC:
Code:
netcat -l 192.168.0.11 5050 > mmcblk0.gz
Now netcat is listening for input from your lan (Replace address to corresponding your PC's IP address)
Now try to connect to your phone with ssh. When you got an # prompt then:
Code:
sync
and send your whole internal storage from phone to your PC:
Code:
cat /dev/block/mmcblk0 | gzip | nc 192.168.0.11 5050
Do not start any apps on your phone before you got back the command prompts both on phone and PC.
when you got a command prompt again and no error messages was printed. you should have an
gzip compressed disk image of you phones mmc on your PC.
Check its integrity running
Code:
gzip -t mmcblk0.gz
If the package is ok, copy the goldenxx.pit and mmcblk0.gz to the sure location.
Now you can make an uncompressed copy of mmcblk0.gz for example:
Code:
zcat Backup/mmcblk0.gz > ~/mmcblk0
With partx you can use the image like any other partitioned disks running as root:
Code:
partx -v -a ~/mmcblk0
it should print something like this:
Code:
partition: none, disk: mmcblk0, lower: 0, upper: 0
Trying to use '/dev/loop0' for the loop device
/dev/loop0: partition table type 'gpt' detected
/dev/loop0: partition #2 added
/dev/loop0: partition #3 added
/dev/loop0: partition #4 added
...
/dev/loop0: partition #25 added
and print out the data of partitions associated within kernel:
Code:
partx -s ~/mmcblk0
Code:
3 1024 3071 2048 1M PIT 52444e41-494f-2044-5049-540000000000
4 6144 8191 2048 1M MD5HDR 52444e41-494f-2044-4d44-354844520000
5 8192 9215 1024 512K STEboot1 52444e41-494f-2044-5354-45626f6f7431
6 9216 10239 1024 512K STEboot2 52444e41-494f-2044-5354-45626f6f7432
7 10240 11263 1024 512K Dnt 52444e41-494f-2044-446e-740000000000
8 11264 12287 1024 512K reserved 52444e41-494f-2044-7265-736572766564
9 16384 18431 2048 1M CSPSAFS 52444e41-494f-2044-4353-505341465300
10 18432 20479 2048 1M CSPSAFS2 52444e41-494f-2044-4353-505341465332
11 20480 53247 32768 16M EFS 52444e41-494f-2044-4546-530000000000
12 53248 86015 32768 16M ModemFS 52444e41-494f-2044-4d6f-64656d465300
13 86016 118783 32768 16M ModemFS2 52444e41-494f-2044-4d6f-64656d465332
14 118784 221183 102400 50M Fota 52444e41-494f-2044-466f-746100000000
15 380928 381055 128 64K IPL Modem 52444e41-494f-2044-4950-4c204d6f6465
16 385024 413695 28672 14M Modem 52444e41-494f-2044-4d6f-64656d000000
17 417792 421887 4096 2M Loke4 52444e41-494f-2044-4c6f-6b6534000000
18 421888 425983 4096 2M 2ndLoke4 52444e41-494f-2044-326e-644c6f6b6534
19 425984 458751 32768 16M PARAM 52444e41-494f-2044-5041-52414d000000
20 458752 491519 32768 16M Kernel 52444e41-494f-2044-4b65-726e656c0000
21 491520 524287 32768 16M Kernel2 52444e41-494f-2044-4b65-726e656c3200
22 524288 2981887 2457600 1.2G SYSTEM 52444e41-494f-2044-5359-5354454d0000
23 2981888 4702207 1720320 840M CACHEFS 52444e41-494f-2044-4341-434845465300
24 4702208 5357567 655360 320M HIDDEN 52444e41-494f-2044-4849-4444454e0000
25 5357568 15249407 9891840 4.7G DATAFS 52444e41-494f-2044-4441-544146530000
now you can explore the partitions and make images of it. For example:
Code:
file -s /dev/loop0p11
/dev/loop0p11: Linux rev 1.0 ext4 filesystem data, UUID=1b70457a-e011-c65a-87c6-f346bd874821, volume name "efs" (extents) (large files)
Code:
cat /dev/loop0p11 > ~/efs.ext4
and...
Code:
file -s /dev/loop0p16
Code:
/dev/loop0p16: data
It is modem.bin so:
Code:
cat /dev/loop0p16 > ~/modem.bin
Note that ext4 images must be transformed to the right .img-file form with ext2simg tool before flashing.
Be careful before flash your phone with these files.
remember to unmount all /dev/loop0 -partitions and finally
Code:
partx -d /dev/loop0
losetup -d /dev/loop0
because the images was copied from running system,
all writeable filesystems are not clean. So you might want to e2fsck these partitions.
Click to expand...
Click to collapse
Cool.... What for...?
S3miniFin said:
Cool.... What for...?
Click to expand...
Click to collapse
Because now I have a backup of all partitions of my S3 Mini.

[GUIDE] Setting Up A Build Environment on OS X 10.9 Mavericks

Hello everyone,
I've come across, and been asked, a lot of questions regarding how to properly setup a build environment on OS X, so I'm going to make this guide on how to setup a build environment on OS X 10.9 Mavericks.
this is only for setting up the build environment, and since most ROMs use different configurations, you will need to refer to your specific ROM for how to initialize their source and build
{
"lightbox_close": "Close",
"lightbox_next": "Next",
"lightbox_previous": "Previous",
"lightbox_error": "The requested content cannot be loaded. Please try again later.",
"lightbox_start_slideshow": "Start slideshow",
"lightbox_stop_slideshow": "Stop slideshow",
"lightbox_full_screen": "Full screen",
"lightbox_thumbnails": "Thumbnails",
"lightbox_download": "Download",
"lightbox_share": "Share",
"lightbox_zoom": "Zoom",
"lightbox_new_window": "New window",
"lightbox_toggle_sidebar": "Toggle sidebar"
}
Setting Up an Android Build Environment on OS X 10.9 Mavericks
A Word To The Wise
Code:
/**
* if you don't follow my instructions exactly as they are written, several things will happen:
* 1 - If you don't know what you're doing, it won't work
* 2 - I won't respond with help, since everything you need IS RIGHT HERE
**/
Click to expand...
Click to collapse
What You Will Be Installing:
XCode 5
Android SDK (includes ADB and Fastboot)
repo
Homebrew
Many, many packages required for building Android
Click to expand...
Click to collapse
XCode
XCode is roughly a 4 GB download from the AppStore. Once it is downloaded, it will start an installation process, where it will download more software and install XCode on your system. Depending on your hardware, and your internet speeds, this could take a long time.
Apple XCode 5 for OS X 10.9 Mavericks
Or just search for "XCode" in the App Store
Once XCode is downloaded and installed, you can pretty much forget about it. Just don't uninstall it.
Click to expand...
Click to collapse
Java
Java for OS X 2013-005
Click to expand...
Click to collapse
Android SDK
Android SDK​
Extract the contents of the Android SDK download archive to a new folder and name it android-sdk
Create a new folder in your HOME directory ( ~/ ) named android [your home directory can be found by opening Finder, and clicking on your username in the column to the left]
Move the android-sdk folder INTO the android folder you just made in your Home directory ( it will be ~/android/android-sdk )
Using Finder, navigate to the android/android-sdk/tools folder.
Double-click the "android" file and go through the installer for Android SDK
Click to expand...
Click to collapse
Homebrew
Code:
ruby -e "$(curl -fsSL https://raw.github.com/mxcl/homebrew/go/install)"
This will begin the download and installation of Brew.
Depending on your hardware and internet connection, this could take a bit.
Now, we need to run a few commands through Brew, just to make sure everything is installed correctly. Enter the following into the Terminal:
Code:
brew outdated && brew update && brew upgrade && brew doctor
After running brew doctor, you should receive a message saying the follow: Your system is ready to brew.
Now, we can install the packages required to build Android.
Click to expand...
Click to collapse
Required Packages For Compiling Android
Enter the following command into the Terminal:
Code:
brew install git coreutils findutils gnu-sed gnupg pngcrush python
This WILL take a while.
Click to expand...
Click to collapse
Repo
Open Terminal and enter the following:
Code:
mkdir -p ~/.bin
curl http://commondatastorage.googleapis.com/git-repo-downloads/repo > ~/bin/repo
chmod a+x ~/bin/repo
Click to expand...
Click to collapse
Creating A Case-Sensitive Volume
We need to create a CASE-SENSITIVE image for our development. Android cannot be build on case-insensitive images, so we need to make one.
Enter the following into the Terminal.
Code:
hdiutil create -type SPARSE -fs "Case-sensitive Journaled HFS+" -size 60g -volname "android" -attach ~/Desktop/Android
I have it set to be 60 GB here, but you can increase or decrease the size to whatever you choose, simply change the "60" to any number of GB you want it to be. I generally use 100 GB.
Once the command is done, you will see a new .img on your desktop, called android.sparseimage. This is the volume you just created that will store your source. To mount it, you just simply double-click it.
Click to expand...
Click to collapse
Setting Up bash_profile
Enter the following into Terminal:
Code:
~/.bash_profile
Now copy / paste this into the terminal, so it's in the bash_profile you're creating:
Code:
export PATH=~/bin:$PATH
export PATH=~/android/android-sdk/sdk/platform-tools:$PATH
export PATH=/usr/local/bin:$PATH
export BUILD_MAC_SDK_EXPERIMENTAL=1
export LC_CTYPE=C
export LANG=C
Save it by pressing Ctrl + X , then Ctrl + Y
Once back at the command line in Terminal, enter the following:
Code:
source ~/.bash_profile
Click to expand...
Click to collapse
Necessary cherry-picks for OS X compatibility
Here is a list of commits, organized alphabetically by repository, that you will need to cherry-pick in order to ensure the best compatibility for building on OS X:
If you come across other commits related to building on OS X that I have not listed, PLEASE respond to the thread and mention me. I'll get them added!
build
https://github.com/CyanogenMod/android_build/commit/e04d4ddad4790a5f67d96873890cdc8230f0e18a
openssl / sha1sum errors?
https://github.com/CyanogenMod/android_build/commit/18c1d6d96df97b975b87a2736446c9dfd3ab4169
readink -f errors?
https://github.com/omnirom/android_build/commit/27e819cd6b6c44cbb86a0dc2bd3d735ad5dc09e7
sed/gsed errors that is NOT "sed: RE error: illegal byte sequence"?
https://github.com/omnirom/android_build/commit/24b9c1bfe07d24f7e2a425d9d5aae52fd30f3819
errors with the zip creation?
https://github.com/omnirom/android_build/commit/08c61654feff40eeec04eef40f4970408de1e229
JNI errors in /external/chromium_org ?
external_chromium_org
https://github.com/CyanogenMod/andr...mmit/5130af630390487b37d99941887883647c67f37a
Click to expand...
Click to collapse
That's it. Refer to your individual ROM source for how to sync the manifests and get builds going. Happy building!
This is amazing. Thank you so much!
I get the following error everytime:
Code:
Creating filesystem with parameters:
Size: 13725835264
Block size: 4096
Blocks per group: 32768
Inodes per group: 8144
Inode size: 256
Journal blocks: 32768
Label:
Blocks: 3351034
Block groups: 103
Reserved block group size: 823
Created filesystem with 11/838832 inodes and 93654/3351034 blocks
+ '[' 0 -ne 0 ']'
stat: cannot read file system information for `%z': No such file or directory
/bin/bash: File: "/Volumes/android/omni/out/target/product/hammerhead/userdata.img"
ID: 100000600000011 Namelen: * Type: hfs
Block size: 4096 Fundamental block size: 4096
Blocks: Total: 39237622 Free: 18393164 Available: 18393164
Inodes: Total: 39237620 Free: 18393164
+
0 : syntax error in expression (error token is ": "/Volumes/android/omni/out/target/product/hammerhead/userdata.img"
ID: 100000600000011 Namelen: * Type: hfs
Block size: 4096 Fundamental block size: 4096
Blocks: Total: 39237622 Free: 18393164 Available: 18393164
Inodes: Total: 39237620 Free: 18393164
+
0 ")
make: *** [/Volumes/android/omni/out/target/product/hammerhead/userdata.img] Error 1
make: *** Deleting file `/Volumes/android/omni/out/target/product/hammerhead/userdata.img'
make: *** Waiting for unfinished jobs....
real 8m50.579s
user 1m9.360s
sys 0m46.059s
I get this building Omni but I don't get it building CM11
Any idea?
installing repo
for others using this awesome guide, don't forget to install repo in terminal the following commands before initializing repo
$ mkdir ~/bin
$ PATH=~/bin:$PATH
$ cd ~/bin
$ curl http://commondatastorage.googleapis.com/git-repo-downloads/repo > ~/bin/repo
$ chmod a+x ~/bin/repo
fzr-r4 said:
for others using this awesome guide, don't forget to install repo in terminal the following commands before initializing repo
$ mkdir ~/bin
$ PATH=~/bin:$PATH
$ cd ~/bin
$ curl http://commondatastorage.googleapis.com/git-repo-downloads/repo > ~/bin/repo
$ chmod a+x ~/bin/repo
Click to expand...
Click to collapse
repo should be installed with brew, no need to download the binary from google :good: although, i may be wrong
jakew02 said:
repo should be installed with brew, no need to download the binary from google :good: although, i may be wrong
Click to expand...
Click to collapse
Hello everyone, I`m getting the following error when trying to build Kitkat. If any help is given it will be greatly appreciated.
Code:
ldldld::: warning:warning warning: directory:directory notdirectory notfoundnot foundforfound foroptionfor 'option-option Lout '/'-host-LoutLout///darwinhost-host/x86/darwin/darwin--objx86x86///libobjobj/'/lib
lib'ld'
:
ld ld:warning:: warningwarning:option: -options option- is-s sobsoleteis obsoleteandis andbeing obsoletebeing ignoredandignored
ldbeingld: :ignoredunknown
unknownoptionld :option :-: O2-unknown
O2
option: -O2
collect2: ld returned 1 exit status
collect2: ld returned 1 exit status
collect2: ld returned 1 exit status
make: *** [out/host/darwin-x86/obj/EXECUTABLES/validatekeymaps_intermediates/validatekeymaps] Error 1
make: *** Waiting for unfinished jobs....
make: *** [out/host/darwin-x86/obj/EXECUTABLES/acp_intermediates/acp] Error 1
make: *** [out/host/darwin-x86/obj/EXECUTABLES/aidl_intermediates/aidl] Error 1
case-sensitive output directory/volume
building Paranoid Android using the team's script for the build itself after syncing, I had to specify the output directory first, out I got an error saying I was building on a case-insensitive system:
export OUT_DIR_COMMON_BASE=YOUR-VOLUME-AND-DESTINATION-HERE
Sent from my Nexus 5 using Tapatalk 4
Another Build Error
Now I`m getting the following error, does anyone knows if I can just manually create the missing directory to skip the error?
Thanks in advance.
Code:
host C: libbz <= external/bzip2/bzlib.c
Import includes file: out/host/darwin-x86/obj/EXECUTABLES/bsdiff_intermediates/import_includes
host C++: validatekeymaps <= frameworks/base/tools/validatekeymaps/Main.cpp
host StaticLib: libinput (out/host/darwin-x86/obj/STATIC_LIBRARIES/libinput_intermediates/libinput.a)
host StaticLib: libutils (out/host/darwin-x86/obj/STATIC_LIBRARIES/libutils_intermediates/libutils.a)
host StaticLib: libcutils (out/host/darwin-x86/obj/STATIC_LIBRARIES/libcutils_intermediates/libcutils.a)
host C: acp <= build/tools/acp/acp.c
host StaticLib: liblog (out/host/darwin-x86/obj/STATIC_LIBRARIES/liblog_intermediates/liblog.a)
host Executable: aidl (out/host/darwin-x86/obj/EXECUTABLES/aidl_intermediates/aidl)
host StaticLib: libhost (out/host/darwin-x86/obj/STATIC_LIBRARIES/libhost_intermediates/libhost.a)
host C++: aapt <= frameworks/base/tools/aapt/AaptAssets.cpp
host C++: aapt <= frameworks/base/tools/aapt/Command.cpp
host C++: aapt <= frameworks/base/tools/aapt/CrunchCache.cpp
host C++: aapt <= frameworks/base/tools/aapt/FileFinder.cpp
host C++: aapt <= frameworks/base/tools/aapt/Main.cpp
host C++: aapt <= frameworks/base/tools/aapt/Package.cpp
host C++: aapt <= frameworks/base/tools/aapt/StringPool.cpp
ld: warning: directory not found for option '-Lout/host/darwin-x86/obj/lib'
ld: warning: option -s is obsolete and being ignored
ld: unknown option: -O2
collect2: ld returned 1 exit status
make: *** [out/host/darwin-x86/obj/EXECUTABLES/aidl_intermediates/aidl] Error 1
make: *** Waiting for unfinished jobs....
sigh . . . Paranoid Android 4 completes a build for me on Mavericks, but root and wi-fi are broken. Terminal and Solid Explorer also don't work. :crying:
just putting this out there as a data point in case others try building PA on OS X.
EDIT:
i noticed that Symlink lines such as:
Symlink: /volumes/teamusb/output/android/target/product/hammerhead/system/xbin/rdev -> busybox
or
Symlink: /volumes/teamusb/output/android/target/product/hammerhead/system/bin/du -> toolbox
are resulting in those files (/system/xbin/rdev or /system/bin/du) being created in my .zip file, whereas a successful build from another user does not have those files.
this seems to be part of my problem--anyone have any guidance or similar issues?
Thanks for this guide!!
Thanks boys i am triying it on snow leopard with omnirom
nazforex said:
I get the following error everytime:
Code:
Creating filesystem with parameters:
Size: 13725835264
Block size: 4096
Blocks per group: 32768
Inodes per group: 8144
Inode size: 256
Journal blocks: 32768
Label:
Blocks: 3351034
Block groups: 103
Reserved block group size: 823
Created filesystem with 11/838832 inodes and 93654/3351034 blocks
+ '[' 0 -ne 0 ']'
stat: cannot read file system information for `%z': No such file or directory
/bin/bash: File: "/Volumes/android/omni/out/target/product/hammerhead/userdata.img"
ID: 100000600000011 Namelen: * Type: hfs
Block size: 4096 Fundamental block size: 4096
Blocks: Total: 39237622 Free: 18393164 Available: 18393164
Inodes: Total: 39237620 Free: 18393164
+
0 : syntax error in expression (error token is ": "/Volumes/android/omni/out/target/product/hammerhead/userdata.img"
ID: 100000600000011 Namelen: * Type: hfs
Block size: 4096 Fundamental block size: 4096
Blocks: Total: 39237622 Free: 18393164 Available: 18393164
Inodes: Total: 39237620 Free: 18393164
+
0 ")
make: *** [/Volumes/android/omni/out/target/product/hammerhead/userdata.img] Error 1
make: *** Deleting file `/Volumes/android/omni/out/target/product/hammerhead/userdata.img'
make: *** Waiting for unfinished jobs....
real 8m50.579s
user 1m9.360s
sys 0m46.059s
I get this building Omni but I don't get it building CM11
Any idea?
Click to expand...
Click to collapse
CM11 uses gstat, where Omni is using stat. I had to troubleshoot this too. in "build/core/combo/HOST_darwin-x86.mk" the last line should be
Code:
# $(1): The file to check
define get-file-size
GSTAT=$(which gstat) ; \
if [ ! -z "$GSTAT" ]; then \
gstat -c "%s" $(1) ; \
else \
stat -f "%z" $(1) ; \
fi
endef
That should fix the compile error for the userdata.img
this i s awesome! thanks for the guide. kinda tired of using a virtual machine to build android
Got a question. Is brew needed for just building kernels? I usually use ubuntu for my builds but I would like to use osx if I could as well.
Congrats @jakew02 Your outstanding guide made it to the Portal!
Check out the article HERE.
MikeC84 said:
Got a question. Is brew needed for just building kernels? I usually use ubuntu for my builds but I would like to use osx if I could as well.
Click to expand...
Click to collapse
I believe so. Brew is basically a tool that allows Linux CLI commands to be run on OS X, so you wouldn't be able to execute the necessary tools for building anything, but I'm not 100% sure.
EverDeathly said:
this i s awesome! thanks for the guide. kinda tired of using a virtual machine to build android
Click to expand...
Click to collapse
Yea, using VM's kind of sucks because you are unable to utilize the full power of your hardware
werty100 said:
Thanks boys i am triying it on snow leopard with omnirom
Click to expand...
Click to collapse
should be relatively the same with some very minor changes, I built on Snow Leopard using these directions, you will definitely NOT need to worry about switch.pm stuff with snow leopard.
fzr-r4 said:
sigh . . . Paranoid Android 4 completes a build for me on Mavericks, but root and wi-fi are broken. Terminal and Solid Explorer also don't work. :crying:
just putting this out there as a data point in case others try building PA on OS X.
EDIT:
i noticed that Symlink lines such as:
Symlink: /volumes/teamusb/output/android/target/product/hammerhead/system/xbin/rdev -> busybox
or
Symlink: /volumes/teamusb/output/android/target/product/hammerhead/system/bin/du -> toolbox
are resulting in those files (/system/xbin/rdev or /system/bin/du) being created in my .zip file, whereas a successful build from another user does not have those files.
this seems to be part of my problem--anyone have any guidance or similar issues?
Click to expand...
Click to collapse
I've had issues building OmniROM with stuff like this as well, and was never able to/didn't put much effort into finding the source. If you know what the cause of these device functions is please PM me the solution and I will make sure to update the OP with a quote from you :highfive:
joneidy said:
Now I`m getting the following error, does anyone knows if I can just manually create the missing directory to skip the error?
Thanks in advance.
Code:
host C: libbz <= external/bzip2/bzlib.c
Import includes file: out/host/darwin-x86/obj/EXECUTABLES/bsdiff_intermediates/import_includes
host C++: validatekeymaps <= frameworks/base/tools/validatekeymaps/Main.cpp
host StaticLib: libinput (out/host/darwin-x86/obj/STATIC_LIBRARIES/libinput_intermediates/libinput.a)
host StaticLib: libutils (out/host/darwin-x86/obj/STATIC_LIBRARIES/libutils_intermediates/libutils.a)
host StaticLib: libcutils (out/host/darwin-x86/obj/STATIC_LIBRARIES/libcutils_intermediates/libcutils.a)
host C: acp <= build/tools/acp/acp.c
host StaticLib: liblog (out/host/darwin-x86/obj/STATIC_LIBRARIES/liblog_intermediates/liblog.a)
host Executable: aidl (out/host/darwin-x86/obj/EXECUTABLES/aidl_intermediates/aidl)
host StaticLib: libhost (out/host/darwin-x86/obj/STATIC_LIBRARIES/libhost_intermediates/libhost.a)
host C++: aapt <= frameworks/base/tools/aapt/AaptAssets.cpp
host C++: aapt <= frameworks/base/tools/aapt/Command.cpp
host C++: aapt <= frameworks/base/tools/aapt/CrunchCache.cpp
host C++: aapt <= frameworks/base/tools/aapt/FileFinder.cpp
host C++: aapt <= frameworks/base/tools/aapt/Main.cpp
host C++: aapt <= frameworks/base/tools/aapt/Package.cpp
host C++: aapt <= frameworks/base/tools/aapt/StringPool.cpp
ld: warning: directory not found for option '-Lout/host/darwin-x86/obj/lib'
ld: warning: option -s is obsolete and being ignored
ld: unknown option: -O2
collect2: ld returned 1 exit status
make: *** [out/host/darwin-x86/obj/EXECUTABLES/aidl_intermediates/aidl] Error 1
make: *** Waiting for unfinished jobs....
Hello everyone, I`m getting the following error when trying to build Kitkat. If any help is given it will be greatly appreciated.
Code:
ldldld::: warning:warning warning: directory:directory notdirectory notfoundnot foundforfound foroptionfor 'option-option Lout '/'-host-LoutLout///darwinhost-host/x86/darwin/darwin--objx86x86///libobjobj/'/lib
lib'ld'
:
ld ld:warning:: warningwarning:option: -options option- is-s sobsoleteis obsoleteandis andbeing obsoletebeing ignoredandignored
ldbeingld: :ignoredunknown
unknownoptionld :option :-: O2-unknown
O2
option: -O2
collect2: ld returned 1 exit status
collect2: ld returned 1 exit status
collect2: ld returned 1 exit status
make: *** [out/host/darwin-x86/obj/EXECUTABLES/validatekeymaps_intermediates/validatekeymaps] Error 1
make: *** Waiting for unfinished jobs....
make: *** [out/host/darwin-x86/obj/EXECUTABLES/acp_intermediates/acp] Error 1
make: *** [out/host/darwin-x86/obj/EXECUTABLES/aidl_intermediates/aidl] Error 1
Click to expand...
Click to collapse
Looks like your missing ld to me? try brew install ld, if that doesn't work, just google "how to install ld with brew" :highfive:
Thank you for this awesome guide. I have one question.
I have the latest Java installed, should I uninstall it before I follow this guide?
Sent from my Evo 3D CDMA using Tapatalk
jakew02 said:
I believe so. Brew is basically a tool that allows Linux CLI commands to be run on OS X, so you wouldn't be able to execute the necessary tools for building anything, but I'm not 100% sure.
Click to expand...
Click to collapse
Thanks. After running brew doctor I am not getting "ready to brew"
Code:
Warning: Unbrewed dylibs were found in /usr/local/lib.
If you didn't put them there on purpose they could cause problems when
building Homebrew formulae, and may need to be deleted.
Unexpected dylibs:
/usr/local/lib/libosxfuse_i32.2.dylib
/usr/local/lib/libosxfuse_i64.2.dylib
Warning: Unbrewed .la files were found in /usr/local/lib.
If you didn't put them there on purpose they could cause problems when
building Homebrew formulae, and may need to be deleted.
Unexpected .la files:
/usr/local/lib/libosxfuse_i32.la
/usr/local/lib/libosxfuse_i64.la
Warning: Unbrewed .pc files were found in /usr/local/lib/pkgconfig.
If you didn't put them there on purpose they could cause problems when
building Homebrew formulae, and may need to be deleted.
Unexpected .pc files:
/usr/local/lib/pkgconfig/osxfuse.pc
MikeC84 said:
Thanks. After running brew doctor I am not getting "ready to brew"
Code:
Warning: Unbrewed dylibs were found in /usr/local/lib.
If you didn't put them there on purpose they could cause problems when
building Homebrew formulae, and may need to be deleted.
Unexpected dylibs:
/usr/local/lib/libosxfuse_i32.2.dylib
/usr/local/lib/libosxfuse_i64.2.dylib
Warning: Unbrewed .la files were found in /usr/local/lib.
If you didn't put them there on purpose they could cause problems when
building Homebrew formulae, and may need to be deleted.
Unexpected .la files:
/usr/local/lib/libosxfuse_i32.la
/usr/local/lib/libosxfuse_i64.la
Warning: Unbrewed .pc files were found in /usr/local/lib/pkgconfig.
If you didn't put them there on purpose they could cause problems when
building Homebrew formulae, and may need to be deleted.
Unexpected .pc files:
/usr/local/lib/pkgconfig/osxfuse.pc
Click to expand...
Click to collapse
i never personally got that error, but it looks like you should be able to just delete the files listed here. Just make sure you have ALL of your stuff backed up before doing anything in the OS X system files. I'm not 100% though, so worse you can do is try it and see
Need Help
Nevermind, figured it out, it was the way i was typing the command, re-entered it as:
nano -w ~/.bash_profile
and it took me to the correct location.
Hello Everyone, I am completely new to this and was wondering if any of you could help me with a question:
When i try to add the new text to the .bash_profile file i get this error:
[ Error writing /Users/dfrias84/Users/dfrias84/.bash_profile: No such file or ]
Why is this error popping up?
I noticed every time i type the code into terminal (nano -w ~/Users/dfrias84/.bash_profile) it opens nano with this:
GNU nano 2.0.6 File: /Users/dfrias84/Users/dfrias84/.bash_profile
Why is the directory different from what i typed into the command?

[SCRIPT] Fix partition table for Android 4.4

Since the gapps for 4.4 need very much space wee need bigger system partitions.
I've created a script which automates this process and increases them both to 840MB.
the space is taken from the userdata partition.
You should backup your whole phone before doing this(storage will not be touched but you shouldn't take the risk)
I tested it with 32GB version only so if you want to know if it will work for 16gb, too give me the output of this command:
parted -s /dev/block/mmcblk0 print
Download:
http://d-h.st/FWz
Instructions:
1) boot into CWM
2) adb push repartition.sh /tmp
3) adb shell chmod 0777 /tmp/repartition.sh
4) adb shell /tmp/repartition.sh
5) adb reboot recovery
6) now you can do all the usual stuff like enabling TDB and installing ROM's
Sounds great but I cannot test it, since I dont have any parted binaries (at least in my 4.1.1 Wajk Wiui ROM) ? Can you please tell me where I can get them.
Second Question:
Im currently running TDB:
System 1 latest WIUI 4.1.1 v5 ROM
System 2 MIUI v6 1.9.19
Both system partitions are completely full (usage 98 %) and the same with the data partitions ( usage 97 % )!
Would it be possible to decrease /sdcard space and repartition it like the following with TDB enabled:
system 800 mb
system1 800 mb
data 1500 mb
data1 1500 mb
sdcard *the rest*
thanks in advance
sounds like you tried to repartition from Android
You need to boot to CWM - you have parted there.
Sorry I hate people who just ask stupid questions before reading the instructions carefully ...silly me sorry for that...
What about the second question, is it possible to either increase the data partitions for less space on /sdcard ?
there isn't sth. like a data1 partition. we have one data partition only that's why we need the TDB hack.
other than that it's possible but you should backup all your data and restore it afterwards.
m11kkaa said:
there isn't sth. like a data1 partition. we have one data partition only that's why we need the TDB hack.
other than that it's possible but you should backup all your data and restore it afterwards.
Click to expand...
Click to collapse
Ok got it.
So following your instructions and editing script like the following should work ?
Code:
change_table() {
ui_print "parted: delete"
parted -s /dev/block/mmcblk0 rm 23 || return 1 # system
parted -s /dev/block/mmcblk0 rm 24 || return 1 # system1
parted -s /dev/block/mmcblk0 rm 25 || return 1 # cache
parted -s /dev/block/mmcblk0 rm 26 || return 1 # userdata
parted -s /dev/block/mmcblk0 rm 27 || return 1 # storage
ui_print "parted: create"
parted -s /dev/block/mmcblk0 mkpartfs primary ext2 336MB 1176MB || return 1
parted -s /dev/block/mmcblk0 mkpartfs primary ext2 1176MB 2016MB || return 1
parted -s /dev/block/mmcblk0 mkpartfs primary ext2 2016MB 2419MB || return 1
parted -s /dev/block/mmcblk0 mkpartfs primary ext2 2419MB 6515MB || return 1
parted -s /dev/block/mmcblk0 mkpartfs primary ext2 6515MB 31.3GB || return 1
ui_print "parted: name"
parted -s /dev/block/mmcblk0 name 23 system || return 1
parted -s /dev/block/mmcblk0 name 24 system1 || return 1
parted -s /dev/block/mmcblk0 name 25 cache || return 1
parted -s /dev/block/mmcblk0 name 26 userdata || return 1
parted -s /dev/block/mmcblk0 name 27 storage || return 1
return 0
}
Code:
ui_print "format partitions"
for NUM in 23 24 25 26 27
do
if ! format_partition "$NUM"; then
ui_print "Failed format partition $NUM"
exit 1
fi
done
already did full backup of sdcard, i just dont know if i should disable TDB before i stat repartitioning ... I dont know how TDB works to split the data partition thats my problem :/
yes that should work.
You don't need to disable TDB because your whole data partition will be wiped and it stores the TDB configuration(that means that TDB automatically gets disabled).
Had some errors but now its working fine ..thanks
unmount sdcard in CWM. It's a bug of this script.
Nice to hear it works now.
7 days ago Phone not start because partition corrupt
Hello
First do not panic is not the fault of your script but for you experience with mi2s and partitions are the few people in the world that can save my phone.
I'm playing a game phone(Xiaomi m2s 16GB) hang and one or more partitions are corrupt (I think this is the problem). But all de documentation than i find to delete o edit partition not work. Fastboot rom installation all ok but always only start with white logo. Mirecovery works perfectly and CWM by ivan works but temporally with this command sudo fastboot boot recovery.img
This is the result of your script
check environment
/sbin/mount
/sbin/umount
/sbin/parted
/sbin/tune2fs
/sbin/e2fsck
dump old table
unmount partitions
umount: can't umount /system: Invalid argument
umount: can't umount /system1: No such file or directory
umount: can't umount /data: Invalid argument
umount: can't umount /data_root: Invalid argument
umount: can't umount /sdcard: Invalid argument
change partition table
parted: delete
parted: create
Error: Unable to satisfy all constraints on the partition.
Failed changing table
OTHER TEST
/dev/block # e2fsck -fDp /dev/block/mmcblk0p24
e2fsck: Bad magic number in super-block while trying to open /dev/block/mmcblk0p24
/dev/block/mmcblk0p24:
The superblock could not be read or does not describe a correct ext2
filesystem. If the device is valid and it really contains an ext2
filesystem (and not swap or ufs or something else), then the superblock
is corrupt, and you might try running e2fsck with an alternate superblock:
e2fsck -b 8193 <device>
/dev/block # tune2fs -O extents,uninit_bg,dir_index /dev/block/mmcblk0p24
tune2fs 1.41.14 (22-Dec-2010)
tune2fs: Bad magic number in super-block while trying to open /dev/block/mmcblk0p24
Couldn't find valid filesystem superblock.
I try to delete partition and create a new one but fail.
(parted) rm 24
rm 24
(parted) mkpartfs primary ext2 872 1409
mkpartfs primary ext2 872 1409
Error: Unable to satisfy all constraints on the partition.
I FOUND THIS IN XDA FORUM BUT I HAVEN'T IMAGE TO TEST
adb push mmcblk0p19_repaired.img /tmp/
adb shell dd if=/tmp/mmcblk0p19_repaired.img of=/dev/block/mmcblk0p19
adb reboot bootloader
MY PARTITION TABLE SYSTEM1 NOT HAVE FILESYSTEM EXT4
[email protected]:~/Escritorio/recovery$ sudo adb shell parted -s /dev/block/mmcblk0 print
Model: MMC SEM16G (sd/mmc)
Disk /dev/block/mmcblk0: 15.8GB
Sector size (logical/physical): 512B/512B
Partition Table: gpt
Number Start End Size File system Name Flags
1 17.4kB 89.1MB 89.1MB fat16 modem
2 89.1MB 178MB 89.1MB fat16 modem1
3 178MB 179MB 524kB sbl1
4 179MB 179MB 524kB sbl2
5 179MB 180MB 1049kB sbl3
6 180MB 181MB 1049kB rpm
7 181MB 182MB 1049kB tz
8 182MB 183MB 524kB DDR
9 183MB 187MB 4194kB aboot
10 187MB 188MB 1049kB misc
11 188MB 191MB 2990kB logo
12 191MB 192MB 799kB m9kefs1
13 192MB 193MB 799kB m9kefs2
14 193MB 193MB 1024B m9kefsc
15 193MB 201MB 8501kB bk1
16 201MB 202MB 799kB m9kefs3
17 202MB 268MB 66.3MB bk2
18 268MB 284MB 15.7MB boot
19 284MB 300MB 15.7MB boot1
20 300MB 316MB 15.7MB recovery
21 316MB 327MB 11.5MB bk3
22 327MB 336MB 8389kB ext4 persist
23 336MB 872MB 537MB ext4 system
24 872MB 1409MB 537MB system1
25 1409MB 1812MB 403MB ext4 cache
26 1812MB 5570MB 3758MB ext4 userdata
27 5570MB 15.8GB 10.2GB ext4 storage
Xiaomi Mi2 32GB
XIAOMI MI2 32GB ONLY
For those using a single MIUI ROM I've made a partition table with system1 set to 1024Mb.
Run the attached from CWM (in /tmp).
Aternus said:
XIAOMI MI2 32GB ONLY
For those using a single MIUI ROM I've made a partition table with system1 set to 1024Mb.
Run the attached from CWM (in /tmp).
Click to expand...
Click to collapse
Can you explain a little more? Does it only leave 1 system partition? Can I flash it like a regular zip?
Enviado desde mi MI 2S mediante Tapatalk
any step by step manual how to change partition? with all necessary downloads etc...
or.... is it possible to delete system2 with all its parts? - for me I'd to use system1 only
Why can not I change the size of the system partition?
Already tried several times, with disabled TDB and with enabled TDB.
Full wipe did and still no result.
P.S. I have already been able to do any repartitioning.
Code:
PS C:\Android> adb push repartition.sh /tmp
* daemon not running. starting it now on port 5037 *
* daemon started successfully *
21 KB/s (3797 bytes in 0.169s)
PS C:\Android> adb shell chmod 0777 /tmp/repartition.sh
PS C:\Android> adb shell /tmp/repartition.sh
check environment
/sbin/mount
/sbin/umount
/sbin/parted
/sbin/tune2fs
/sbin/e2fsck
dump old table
__bionic_open_tzdata: couldn't find any tzdata when looking for localtime!
__bionic_open_tzdata: couldn't find any tzdata when looking for GMT!
__bionic_open_tzdata: couldn't find any tzdata when looking for posixrules!
unmount partitions
umount: can't umount /system: Invalid argument
umount: can't umount /system1: No such file or directory
umount: can't umount /data: Invalid argument
umount: can't umount /sdcard: Invalid argument
change partition table
parted: delete
parted: create
parted: name
format partitions
format: /dev/block/mmcblk0p23
tune2fs 1.41.14 (22-Dec-2010)
tune2fs: No such file or directory while trying to open /dev/block/mmcblk0p23
Couldn't find valid filesystem superblock.
e2fsck 1.41.14 (22-Dec-2010)
e2fsck: No such file or directory while trying to open /dev/block/mmcblk0p23
Possibly non-existent device?
tune2fs 1.41.14 (22-Dec-2010)
e2fsck 1.41.14 (22-Dec-2010)
Adding dirhash hint to filesystem.
Pass 1: Checking inodes, blocks, and sizes
Pass 2: Checking directory structure
Pass 3: Checking directory connectivity
Pass 3A: Optimizing directories
Pass 4: Checking reference counts
Pass 5: Checking group summary information
/dev/block/mmcblk0p23: ***** FILE SYSTEM WAS MODIFIED *****
/dev/block/mmcblk0p23: 11/500856 files (0.0% non-contiguous), 62917/1000445 blocks
format: /dev/block/mmcblk0p24
tune2fs 1.41.14 (22-Dec-2010)
Creating journal inode: done
This filesystem will be automatically checked every 30 mounts or
0 days, whichever comes first. Use tune2fs -c or -i to override.
e2fsck 1.41.14 (22-Dec-2010)
Pass 1: Checking inodes, blocks, and sizes
Pass 2: Checking directory structure
Pass 3: Checking directory connectivity
Pass 3A: Optimizing directories
Pass 4: Checking reference counts
Pass 5: Checking group summary information
/dev/block/mmcblk0p24: ***** FILE SYSTEM WAS MODIFIED *****
/dev/block/mmcblk0p24: 11/262144 files (0.0% non-contiguous), 49386/524289 blocks
tune2fs 1.41.14 (22-Dec-2010)
e2fsck 1.41.14 (22-Dec-2010)
Adding dirhash hint to filesystem.
Pass 1: Checking inodes, blocks, and sizes
Pass 2: Checking directory structure
Pass 3: Checking directory connectivity
Pass 3A: Optimizing directories
Pass 4: Checking reference counts
Pass 5: Checking group summary information
/dev/block/mmcblk0p24: ***** FILE SYSTEM WAS MODIFIED *****
/dev/block/mmcblk0p24: 11/262144 files (0.0% non-contiguous), 49386/524289 blocks
format: /dev/block/mmcblk0p25
tune2fs 1.41.14 (22-Dec-2010)
Creating journal inode: done
This filesystem will be automatically checked every 30 mounts or
0 days, whichever comes first. Use tune2fs -c or -i to override.
e2fsck 1.41.14 (22-Dec-2010)
Pass 1: Checking inodes, blocks, and sizes
Pass 2: Checking directory structure
Pass 3: Checking directory connectivity
Pass 3A: Optimizing directories
Pass 4: Checking reference counts
Pass 5: Checking group summary information
/dev/block/mmcblk0p25: ***** FILE SYSTEM WAS MODIFIED *****
/dev/block/mmcblk0p25: 11/196608 files (0.0% non-contiguous), 32935/393217 blocks
tune2fs 1.41.14 (22-Dec-2010)
e2fsck 1.41.14 (22-Dec-2010)
Adding dirhash hint to filesystem.
Pass 1: Checking inodes, blocks, and sizes
Pass 2: Checking directory structure
Pass 3: Checking directory connectivity
Pass 3A: Optimizing directories
Pass 4: Checking reference counts
Pass 5: Checking group summary information
/dev/block/mmcblk0p25: ***** FILE SYSTEM WAS MODIFIED *****
/dev/block/mmcblk0p25: 11/196608 files (0.0% non-contiguous), 32935/393217 blocks
format: /dev/block/mmcblk0p26
tune2fs 1.41.14 (22-Dec-2010)
Creating journal inode: done
This filesystem will be automatically checked every 30 mounts or
0 days, whichever comes first. Use tune2fs -c or -i to override.
e2fsck 1.41.14 (22-Dec-2010)
Pass 1: Checking inodes, blocks, and sizes
Pass 2: Checking directory structure
Pass 3: Checking directory connectivity
Pass 3A: Optimizing directories
Pass 4: Checking reference counts
Pass 5: Checking group summary information
/dev/block/mmcblk0p26: ***** FILE SYSTEM WAS MODIFIED *****
/dev/block/mmcblk0p26: 11/399200 files (9.1% non-contiguous), 28951/798348 blocks
tune2fs 1.41.14 (22-Dec-2010)
e2fsck 1.41.14 (22-Dec-2010)
Adding dirhash hint to filesystem.
Pass 1: Checking inodes, blocks, and sizes
Pass 2: Checking directory structure
Pass 3: Checking directory connectivity
Pass 3A: Optimizing directories
Pass 4: Checking reference counts
Pass 5: Checking group summary information
/dev/block/mmcblk0p26: ***** FILE SYSTEM WAS MODIFIED *****
/dev/block/mmcblk0p26: 11/399200 files (9.1% non-contiguous), 28951/798348 blocks
Done.
PS C:\Android> adb reboot recovery
PS C:\Android>
UPD. The problem was that I was using Windows Povershell
Run the script from the command line and everything turned out.
Thanks!
I have to format first system and system1 in recovery to apply this script, because I have and error :
tmp/repartition.sh lin 115 can´t create /sdcard/parted_12_06_2014_FDFD6F4CB043F4956D9CAD053C3738AA.
DO MOUNT your SDCARD
then Follow the instruction
duhh...
I modified the script a little bit for 1 ROM usage. System1 is 840MB as in the original and System2 is 5MB. The rest goes into userdata. This is for the 16GB version.
Ok! I did again and umount the sdcard abd it worked fine.
Thanks
I found a better way
If u reboot into dload mode, u can change the partition table from your computer
The problem is that most partition managers don't support changing the GPT Partition names and that's why I added support for that to GParted.
GParted supports booting from Live CD/USB so Windows/Mac users aren't left out.
http://i.imgur.com/3SwSXs2.png
I pushed the patch to GParted repo's and I'll inform u once there're any news.
from my point of view the best way for use is:
- system (system1) - let 1024 MB
- system1 (system2) - let 10 MB
- userdata (apps) - let 4096 MB (take it from sdcard) - but maybe more

cannot lookup security context for /system/addon.d

So I'm trying to write up a simple system image patcher for my lineageOS rom (V20 Nougat).
When trying to pack the img after modification, I get this error:
Re-packing img.
Code:
/home/guy/Desktop/ROM_EXTRACT/file_contexts.bin: line 1 is missing fields, skipping
/home/guy/Desktop/ROM_EXTRACT/file_contexts.bin: line 21 is missing fields, skipping
/home/guy/Desktop/ROM_EXTRACT/file_contexts.bin: line 37 is missing fields, skipping
/home/guy/Desktop/ROM_EXTRACT/file_contexts.bin: line 38 is missing fields, skipping
/home/guy/Desktop/ROM_EXTRACT/file_contexts.bin: line 74 is missing fields, skipping
/home/guy/Desktop/ROM_EXTRACT/file_contexts.bin: line 76 is missing fields, skipping
/home/guy/Desktop/ROM_EXTRACT/file_contexts.bin: line 78 is missing fields, skipping
/home/guy/Desktop/ROM_EXTRACT/file_contexts.bin: line 79 is missing fields, skipping
/home/guy/Desktop/ROM_EXTRACT/file_contexts.bin: line 80 is missing fields, skipping
/home/guy/Desktop/ROM_EXTRACT/file_contexts.bin: line 81 is missing fields, skipping
/home/guy/Desktop/ROM_EXTRACT/file_contexts.bin: line 82 is missing fields, skipping
Creating filesystem with parameters:
Size: 2684190720
Block size: 4096
Blocks per group: 32768
Inodes per group: 8192
Inode size: 256
Journal blocks: 10239
Label:
Blocks: 655320
Block groups: 20
Reserved block group size: 159
error: build_directory_structure: cannot lookup security context for /system/addon.d
Any idea what I'm doing wrong?
Here is a whole copy of my script so far:
Code:
echo "Deleting old folder if it exists."
echo
rm -r ~/Desktop/ROM_EXTRACT
echo "Extracting ROM."
echo
unzip ~/Desktop/NULL_ROM.zip -d ~/Desktop/ROM_EXTRACT
echo "Changing directories"
echo
cd ~/Desktop/ROM_EXTRACT
echo "Copying Tools."
echo
mkdir ~/Desktop/ROM_EXTRACT/TOOLS
cp ~/Desktop/PATCH_TOOLS/* ~/Desktop/ROM_EXTRACT/TOOLS
chmod 0777 ~/Desktop/ROM_EXTRACT/TOOLS/*
echo "Extracting dat."
echo
mkdir ~/Desktop/ROM_EXTRACT/EXTRACT
./TOOLS/sdat2img.py system.transfer.list system.new.dat ./EXTRACT/system.img
echo "Mounting img."
echo
mkdir ~/Desktop/ROM_EXTRACT/EXTRACT/MODIFY
sudo mount -t ext4 -o loop ./EXTRACT/system.img ~/Desktop/ROM_EXTRACT/EXTRACT/MODIFY
sudo mount -o remount,rw ~/Desktop/ROM_EXTRACT/EXTRACT/MODIFY
echo "PATCH IMG"
echo
echo "Re-packing img."
echo
./TOOLS/make_ext4fs -T 0 -S ~/Desktop/ROM_EXTRACT/file_contexts.bin -l 2684190720 -a system ./system_new.img ~/Desktop/ROM_EXTRACT/EXTRACT/MODIFY
echo "Cleaning up."
echo
sudo umount ~/Desktop/ROM_EXTRACT/EXTRACT/MODIFY
sudo rmdir ~/Desktop/ROM_EXTRACT/EXTRACT/MODIFY
Hi There, did you resolve this issue at all? I have the exact same problem and same errors as this. System.img unpacks fine, I just tweaked the build.prop for a test and got the same "line xx is missing..." errors on the file_contexts and also
"Cannot lookup security context for /system/.build.prop.swp"
I am working on Ubuntu 16.4.3 inside virtualbox on W10 host machine.
Dave
OK, so i answered my own question!
Firstly I found that the file_contexts file in Android 7.x+ is now a binary file so the make_ext4fs script cannot read from it. I used a converter tool to get the text version and that solved the issue with not being able to read from the lines.
Secondly I resolved the issue with the permissions by checking the permission on my Ubuntu system. Stupidly I had not sudo'd correctly in creating the mount folder so my system.img in fact was empty. I checked the permissions on all the folders I have been using and that resolved the issue. Bingo the new system.img flashed no problem!
Hope this helps someone.

Flashfire closes

I am trying to run flashfire. My device is rooted.
Here is some output from the lastlog log file:
Code:
[ERR] rm: can't remove '/sutmp/avb.img': No such file or directory
[ERR] dd: writing '/dev/block/mmcblk0p34': No space left on device
[ERR] 8193+0 records in
[ERR] 8192+0 records out
[ERR] 33554432 bytes (32.0MB) copied, 0.278370 seconds, 115.0MB/s
[ERR] cat: write error: Broken pipe
[ERR] umount: can't umount /su: Invalid argument
[ERR] BusyBox v1.22.1 static (2017-01-21 15:57 +0100) multi-call binary.
[ERR]
[ERR] Usage: losetup [-r] [-o OFS] {-f|LOOPDEV} FILE - associate loop devices
[ERR] losetup -d LOOPDEV - disassociate
[ERR] losetup -a - show status
[ERR] losetup -f - show next free loop device
[ERR]
[ERR] -o OFS Start OFS bytes into FILE
[ERR] -r Read-only
[ERR] -f Show/use next free loop device
[ERR]
[ERR] cat: can't open '/tmp/recovery.log': No such file or directory
[UI] - Done !
[OUT] ui_print
[UI]
[UI] Restoring recovery image backup...

Categories

Resources