Related
Code:
localhost / # cd sd-ext
localhost sd-ext # ls
app bt5 lost+found
app-private dalvik-cache
localhost sd-ext # cd bt5
localhost bt5 # ls
bt5.img changelog.txt scripts
localhost bt5 # cd scripts
localhost scripts # ls
go l mkdirectory stop
localhost scripts # sh go
mount: mounting /dev/block/vold/179:3 on /data/bootbt failed: No such file or directory
losetup: /dev/block/loop253: No such file or directory
swapon: /dev/block/loop253: Invalid argument
losetup: /dev/block/loop254: No such file or directory
mount: mounting /data/bootbt/bt5.img on /data/runbt failed: No such file or directory
mount: mounting devpts on /data/runbt/dev/pts failed: No such file or directory
mount: mounting proc on /data/runbt/proc failed: No such file or directory
mount: mounting sysfs on /data/runbt/sys failed: No such file or directory
net.ipv4.ip_forward = 1
go: cannot create /data/runbt/etc/resolv.conf: directory nonexistent
go: cannot create /data/runbt/etc/hosts: directory nonexistent
-Backtrack Loaded-
Run Backtrack as: (select number)
1. CLI
2. VNC
2
chroot: can't change root directory to /data/runbt: No such file or directory
localhost scripts #
My android is: cyanmod 7 (TyphooN_CM7_v3.4.1-MAGLDR)
Backtrack 5 arm downloaded from: http://forum.xda-developers.com/showthread.php?p=15443300#post15443300 (V 0.2)
Please help me.
Sorry, missed this somehow :/
the mount and image points are static, i see you have them possibly in the wrong spot. the .img file needs to be on the third partition of your SDcard (the ext4 one). if you place it somewhere, you need to tell the script where to find it.
these scripts were written with static mount points, so placement of the files is crucial.
Disclaimer, apply the following at your own risk, I plan to test most if not all of what I post but can't guarantee that you will not cause damage or lose data, and if you do I take no responsibility, that being said it is a simple adaption to current installations.
This is in no way (currently) a replacement for ext4 (or NAND), and shouldn't be seen as a replacement for NativeSD (I'm just piggybacking of their installation zips) compatibility across the board just isn't good enough yet.
Mark 1 - Nilfs2
Code:
Nilfs2 should be good as a replacement for lower class cards and may show a speed improvement on class 2/4 cards. If your installing on a fresh card and have the means to use nilfs2 then please try before/after using ext4 and report back your findings. Any requests for things currently using ext4 will be looked at to make them compatible with nilfs2 if possible.
[B]Partition creation[/B]
Currently only via a Linux OS, will try and trick a recovery to create a nilfs2 instead of ext but no promises
[I]Method 1. Terminal[/I][CODE]sudo apt-get install nilfs-tools
sudo mkfs -t nilfs2 /dev/sdc2
Changing sdc2 to the partition thats to be formatted, look in gparted to be sure your formatting the correct one
Method 2. Disk Utility
You can use Disk Utility from within a LinuxOS
Method 3. Gparted live
Partition creation should be possible using a gparted live usb or cd
Method 4. On device
Copy mkfs.nilfs2 binary to /system/xbin
duplicate fstab renaming to mtab
sudo mkfs.nilfs2 /dev/block/mmcblk0p2
ROM Modifications
Currently, starting with a NativeSD zip as a base only need to alter the install.sh and modify a few lines within the init (within /kernel/bootsd/initrd.gz)
INSTALL.SH
Code:
mount -t ext4 /dev/block/mmcblk0p2 /ext4p
change to
mount -t nilfs2 /dev/block/mmcblk0p2 /ext4p
INIT
Code:
mkdir -p /NativeSD
mount -t ext4 -o rw,noatime,nodiratime,barrier=0 /dev/block/mmcblk0p2 /NativeSD
change to
mkdir -p /NativeSD
mkdir -p /nilfs
mount -t nilfs2 /dev/block/mmcblk0p2 /nilfs
mount -t nilfs2 -o rw,noatime,nodiratime,barrier=0 /dev/block/mmcblk0p2 /NativeSD
ROM Installation
Installation confirmed working via CWM, and modified 4ext (recoverymod) (will need to test others)
After Install modifications
Download Nilfs2.zip from #2 , using a root browser or adb copy the system folder to / (thus adding the folders /files to /system). Then need to change permissions of /system/xbin/nilfs_cleanerd , /system/etc/nilfs_cleanerd.conf and /system/etc/init.d/04nilfs to 755 (permissions required will probably change at some point)
Backup
Backup of NILFS2 partition can be done by CWM but only if android is also in NAND as it needs to backup the whole system.
REQUEST: Help from any one who has experience with NiLFS2, and ideally people who have gotten the cleaner to run properly, I'm sure it ran correctly several times, but can't as yet recreate how I got it to work. Let me know if you think you can help [/COLOR][/B]
User Experience
Xylograph's user experience and benchmark NAND / EXT4 / NiLFS2
AnTuTu and Androbench benchmarks[/CODE]
F2FS
Code:
[SIZE="2"][B]Partition creation[/B]
[I][B]Linux only[/B][/I]
Download [URL="http://sourceforge.net/projects/f2fs-tools/"]f2fs tools[/URL] and extract,
cd into folder and run the following[CODE]autoreconf --install
sudo chmod +x configure
sudo ./configure
sudo make
sudo make install
Now you can format:
Code:
sudo umount /dev/sdd1
sudo mkfs.f2fs /dev/sdd1
[/SIZE][/CODE]
To do list
Tidy up the Aroma installer to say nilfs2 instead of ext
Modify a recovery (needed still???)
Modify installer to allow NAND/ext4/nilfs2 installation
Optimize init.d script
Optimize init mounts
Possible beneficial references from across the web
NiLFS website
Not sure if ext4 would have the same problem as ext2
Btrfs
Kernel updates??
Credits / Thanks
Unhelpful for the nilfs2 binaries
Xylograph and securecrt for NativeSD Installation method
ROM devs. (Updated as ROM diffs. added)
Xylograph for AOKP, PA, CyanX
Smokin901 for MIUI
Tytung for Nexus-HD2
Rick1995 for BareBones CM7
Kernel devs.
Securert
Tytung
NILFS2 SuperThread
Will fill this out in due course,
New setup, with sdcard partitions being FAT32 / EXT4 / ANY
requirement for different ROMs should be just the initrd and to change rom_name in a few files.
First change build is on post 34
Fyi. it would be relatively simple to change it to FAT32 / ANY / ANY so if you don't want an additional partition using two (fat32/nilfs2) shouldn't be a problem.
Attached is the different installer files, should be self explanitory, really just need the NAND_ANY_ANY one, but there you go.
NAND_ANY_ANY is the only one without included initrd.gz's, will eventually add a readme detailing what you need to change in the zip, for installing other ROMs and attach a list of initrd's for different roms and partition types / locations
ROM diff files attached, edit the files in the relevant NativeSD zips. And install via recovery.
Have modified securecrt's diff file for BBCM7 - although am having some issues wouldn't advise its use (yet) DON'T USE BBCM7
General
The nilfs2 mounts with the general mount script mount and not the mount.nilfs2.
Need reports on any settings that should help the system; for example noop seems to be the best i/o scheduler for me but have no confirmation from others
Attached Files
ROM 7zip files contain the different files from there corresponding NativeSD zip
All bins and .conf that I've found can be found in nilfs.7z
Nilfs2.zip contains the 3 files needed for the cleaner to work, just copy system over using a root browser and give the three file execution permission.
Init.d script
Original - confirmed working - just point to nilfs_cleanerd . If not already present add the following to /system/etc/init.d/ and chmod +x (or chmod 755) it via terminal/root explorer
Code:
#!/system/bin/sh
/system/xbin/nilfs_cleanerd
Currently trying the following - will probably be implemented within ramdisk at some point - adapted from unhelpful's user_init
Code:
#!/system/bin/sh
export PATH=$PATH:/system/xbin
exec >/system/nilfs2_mount.log
exec 2>&1
set -x
umount /nilfs
time mount -t nilfs2 -o noatime /dev/block/mmcblk0p2 /nilfs
nilfs_cleanerd -c /system/etc/nilfs_cleanerd.conf /dev/block/mmcblk0p2 /nilfs
Edit: files attached as ROM_NAME_initrd.gz need to just be renamed as initrd.gz
HypoTurtle said:
Current relevent files can be found here
Click to expand...
Click to collapse
Thx a lot, however would you be so kind to do the same with BareBoneCM7 NativeSD?
You haven't specified in the starting post how exactly lines should be modified in the init (within /kernel/bootsd/initrd.gz) and also install.sh...
Thanks for creating this thread, HypoTurtle!
Let the ideas start to flow
I'm sure nilfs2 will take over ext4 storage as prefered format once all details are ironed out and recoveries are updated to support it.
It's technically superior to other formats for any solid state memory device.
(BTW, I sent you a PM earlier)
I'm now running CyanMobileX with your nilfs2 binaries. It's just runs flawless!, speedy and I feel my data is very safe in case of any abrupt crash or power failure.
can some one make nilfs2 for this rom :victory:
http://forum.xda-developers.com/showthread.php?t=1681906
HypoTurtle said:
After Install modifications (needs clarification in terms of location)
Will tidy this up as they should/can be included in installation/flashable zip; but using adb/root browser copy the bins and .conf file into /system/xbin. And add a script to /system/etc/init.d initiating /system/xbin/nilfs_cleanerd. Then give the files execution permissions.
Click to expand...
Click to collapse
*.conf file into /system/xbin but not into /etc ?
One more notion: why not to put all these files from nilfs.7z into directories already inside ROM installation zip? (You advise to do it only after installation is complete)
ioy said:
*.conf file into /system/xbin but not into /etc ?
Click to expand...
Click to collapse
Yep, the .conf goes under "system/etc"
ioy said:
*.conf file into /system/xbin but not into /etc ?
One more notion: why not to put all these files from nilfs.7z into directories already inside ROM installation zip? (You advise to do it only after installation is complete)
Click to expand...
Click to collapse
Sorry yes, the default install location for the .conf would be in /etc (or /system/etc; same folder).
Integration of the binaries into the ROM is something I did state would be done eventually, but think that would also require digging through the zip to find where permissions are added and change those, and have had a bit of a hit and miss experience with the cleaner at the moment, want to make sure I have the permissions correct and it's working well before integration.
Kwag, could you make a post listing the benefits of nilfs2, as you know a lot more than I do.
HypoTurtle said:
Kwag, could you make a post listing the benefits of nilfs2, as you know a lot more than I do.
Click to expand...
Click to collapse
Already have
http://forum.xda-developers.com/showpost.php?p=31657498&postcount=716
Here's a copy:
Checksums
Immediate recovery after system crash (no fsck needed at all!)
Continuous (tailored) snapshots of the fs.
Those are benefits of nilfs over ext4. Ext4 has none of those!
no way to creat nilfs on ubuntu cause when i open termenal and command
mkfs -t nilfs2 /dev/sdb2
it give me Error: cannot open device: /dev/sdb2
so any ideas.....
seaman2k said:
no way to creat nilfs on ubuntu cause when i open termenal and command
mkfs -t nilfs2 /dev/sdb2
it give me Error: cannot open device: /dev/sdb2
so any ideas.....
Click to expand...
Click to collapse
sorry, might need sudo ; so sudo mkfs -t nilfs2 /dev/sdb2 failling that try formatting it to ext4 in gparted then try again.
Code:
[SIZE="2"]E/PackageManager( 1471): Couldn't create temp file for downloaded package file.
E/AndroidRuntime( 1471): *** FATAL EXCEPTION IN SYSTEM PROCESS: PackageManager
E/AndroidRuntime( 1471): java.lang.NullPointerException
E/AndroidRuntime( 1471): at com.android.server.PackageManagerService$FileInstallArgs.createCopyFile(PackageManagerService.java:5247)
E/AndroidRuntime( 1471): at com.android.server.PackageManagerService$FileInstallArgs.copyApk(PackageManagerService.java:5255)
E/AndroidRuntime( 1471): at com.android.server.PackageManagerService$InstallParams.handleStartCopy(PackageManagerService.java:5051)
E/AndroidRuntime( 1471): at com.android.server.PackageManagerService$HandlerParams.startCopy(PackageManagerService.java:4902)
E/AndroidRuntime( 1471): at com.android.server.PackageManagerService$PackageHandler.doHandleMessage(PackageManagerService.java:516)
E/AndroidRuntime( 1471): at com.android.server.PackageManagerService$PackageHandler.handleMessage(PackageManagerService.java:461)
E/AndroidRuntime( 1471): at android.os.Handler.dispatchMessage(Handler.java:99)
E/AndroidRuntime( 1471): at android.os.Looper.loop(Looper.java:130)
E/AndroidRuntime( 1471): at android.os.HandlerThread.run(HandlerThread.java:60)
E/AudioHardwareQSD( 1827): Cannot open /dev/audience_a1026 -1
E/HTC Acoustic( 1827): Update ADIE table ID 0
E/HTC Acoustic( 1827): Update ADIE table ID 2
E/HTC Acoustic( 1827): Update ADIE table ID 5
E/HTC Acoustic( 1827): Update ADIE table ID 7
E/HTC Acoustic( 1827): Update ADIE table ID 8
E/HTC Acoustic( 1827): Update ADIE table ID 10
E/HTC Acoustic( 1827): Update ADIE table ID 51
E/HTC Acoustic( 1827): Update ADIE table ID 53
E/HTC Acoustic( 1827): Fail to open /system/etc/TPA2018.csv -1.
E/SoundPool( 1844): error loading /system/media/audio/ui/Effect_Tick.ogg
E/SoundPool( 1844): error loading /system/media/audio/ui/KeypressStandard.ogg
E/SoundPool( 1844): error loading /system/media/audio/ui/KeypressSpacebar.ogg
E/SoundPool( 1844): error loading /system/media/audio/ui/KeypressDelete.ogg
E/SoundPool( 1844): error loading /system/media/audio/ui/KeypressReturn.ogg
E/GSM ( 1929): Wrong network type: 0
E/GSM ( 1929): Wrong network type: 0
E/GSM ( 1929): Wrong network type: 0
E/GSM ( 1929): Wrong network type: 0
E/GSM ( 1929): Wrong network type: 0
E/GSM ( 1929): Wrong network type: 0
E/GSM ( 1929): Wrong network type: 0
E/GSM ( 1929): Wrong network type: 0
E/NetworkLocationProvider( 1970): releaseCheckLocationLock: wake lock has already been released
E/WifiStateTracker( 1844): DHCP request failed: Timed out waiting for DHCP to finish
E/ConnectivityService( 1844): Attempt to connect to WIFI failed.[/SIZE]
logcat attached for BB7 when trying to install an app from the market, what happens is when downloading a app it downloads fine, but doesn't install, screen just turns off an app isn't installed. Haven't seen this posted elsewhere so may be nilfs2 related, anyone have any ideas.
HypoTurtle said:
logcat attached for BB7 when trying to install an app from the market, what happens is when downloading a app it downloads fine, but doesn't install, screen just turns off an app isn't installed. Haven't seen this posted elsewhere so may be nilfs2 related, anyone have any ideas.
Click to expand...
Click to collapse
Yeah I think I already mentioned it in the NativeSD thread.. it's because securecrt is using a method to share the '/root of your 'ext' partition/app' folder with all NativeSD roms, but that folder doesn't have the right permissions and so the whole system is failing..
This needs proper modifications in the updater script first just like the 'nilfs_cleanerd' stuff..
Xylograph said:
Yeah I think I already mentioned it in the NativeSD thread.. it's because securecrt is using a method to share the '/root of your 'ext' partition/app' folder with all NativeSD roms, but that folder doesn't have the right permissions and so the whole system is failing..
This needs proper modifications in the updater script first just like the 'nilfs_cleanerd' stuff..
Click to expand...
Click to collapse
Thanks just noticed that myself (the app folder in the root of the partition)
HypoTurtle said:
Thanks just noticed that myself (the app folder in the root of the partition)
Click to expand...
Click to collapse
I advise you to use the init script (ramdisk) structure found in my roms and leave the 'sharing data/app' folder aside untill it's properly inplemented
HypoTurtle said:
Code:
[SIZE="2"]E/PackageManager( 1471): Couldn't create temp file for downloaded package file.
E/AndroidRuntime( 1471): *** FATAL EXCEPTION IN SYSTEM PROCESS: PackageManager
E/AndroidRuntime( 1471): java.lang.NullPointerException
E/AndroidRuntime( 1471): at com.android.server.PackageManagerService$FileInstallArgs.createCopyFile(PackageManagerService.java:5247)
E/AndroidRuntime( 1471): at com.android.server.PackageManagerService$FileInstallArgs.copyApk(PackageManagerService.java:5255)
E/AndroidRuntime( 1471): at com.android.server.PackageManagerService$InstallParams.handleStartCopy(PackageManagerService.java:5051)
E/AndroidRuntime( 1471): at com.android.server.PackageManagerService$HandlerParams.startCopy(PackageManagerService.java:4902)
E/AndroidRuntime( 1471): at com.android.server.PackageManagerService$PackageHandler.doHandleMessage(PackageManagerService.java:516)
E/AndroidRuntime( 1471): at com.android.server.PackageManagerService$PackageHandler.handleMessage(PackageManagerService.java:461)
E/AndroidRuntime( 1471): at android.os.Handler.dispatchMessage(Handler.java:99)
E/AndroidRuntime( 1471): at android.os.Looper.loop(Looper.java:130)
E/AndroidRuntime( 1471): at android.os.HandlerThread.run(HandlerThread.java:60)
E/AudioHardwareQSD( 1827): Cannot open /dev/audience_a1026 -1
E/HTC Acoustic( 1827): Update ADIE table ID 0
E/HTC Acoustic( 1827): Update ADIE table ID 2
E/HTC Acoustic( 1827): Update ADIE table ID 5
E/HTC Acoustic( 1827): Update ADIE table ID 7
E/HTC Acoustic( 1827): Update ADIE table ID 8
E/HTC Acoustic( 1827): Update ADIE table ID 10
E/HTC Acoustic( 1827): Update ADIE table ID 51
E/HTC Acoustic( 1827): Update ADIE table ID 53
E/HTC Acoustic( 1827): Fail to open /system/etc/TPA2018.csv -1.
E/SoundPool( 1844): error loading /system/media/audio/ui/Effect_Tick.ogg
E/SoundPool( 1844): error loading /system/media/audio/ui/KeypressStandard.ogg
E/SoundPool( 1844): error loading /system/media/audio/ui/KeypressSpacebar.ogg
E/SoundPool( 1844): error loading /system/media/audio/ui/KeypressDelete.ogg
E/SoundPool( 1844): error loading /system/media/audio/ui/KeypressReturn.ogg
E/GSM ( 1929): Wrong network type: 0
E/GSM ( 1929): Wrong network type: 0
E/GSM ( 1929): Wrong network type: 0
E/GSM ( 1929): Wrong network type: 0
E/GSM ( 1929): Wrong network type: 0
E/GSM ( 1929): Wrong network type: 0
E/GSM ( 1929): Wrong network type: 0
E/GSM ( 1929): Wrong network type: 0
E/NetworkLocationProvider( 1970): releaseCheckLocationLock: wake lock has already been released
E/WifiStateTracker( 1844): DHCP request failed: Timed out waiting for DHCP to finish
E/ConnectivityService( 1844): Attempt to connect to WIFI failed.[/SIZE]
logcat attached for BB7 when trying to install an app from the market, what happens is when downloading a app it downloads fine, but doesn't install, screen just turns off an app isn't installed. Haven't seen this posted elsewhere so may be nilfs2 related, anyone have any ideas.
Click to expand...
Click to collapse
In the BB7 the same happened on Ext4, it had been reported many times even before NILFS-NativeSD idea arrived.
Xylograph said:
I advise you to use the init script (ramdisk) structure found in my roms and leave the 'sharing data/app' folder aside untill it's properly inplemented
Click to expand...
Click to collapse
Yeah thats the first thing I tried, but still not working correctly.
Other than removing the following from the init is there anything I've overlooked?
Code:
# create app data/app dir
mkdir -p /NativeSD/app
mkdir -p /data/app
mount --bind /NativeSD/app /data/app
if [ ! -d /data/.cache ];then
mkdir -m 0770 /data/.cache
chown 1000:2001 /data/.cache
fi
ln -s /data/.cache /cache
RecoveryMOD seems to run fine (Magldr - android on nand), and installs as expected.
HypoTurtle said:
Yeah thats the first thing I tried, but still not working correctly.
Other than removing the following from the init is there anything I've overlooked?
Code:
# create app data/app dir
mkdir -p /NativeSD/app
mkdir -p /data/app
mount --bind /NativeSD/app /data/app
if [ ! -d /data/.cache ];then
mkdir -m 0770 /data/.cache
chown 1000:2001 /data/.cache
fi
ln -s /data/.cache /cache
RecoveryMOD seems to run fine (Magldr - android on nand), and installs as expected.
Click to expand...
Click to collapse
Hmm.. have you compared the updater-script with for example the CyanMobile one ?
I also made an RecoveryMOD2 that will only mount the fat32, mmcblk0p2 and if available mmcblk0p3...
Xylograph said:
Hmm.. have you compared the updater-script with for example the CyanMobile one ?
I also made an RecoveryMOD2 that will only mount the fat32, mmcblk0p2 and if available mmcblk0p3...
Click to expand...
Click to collapse
Couldn't see anything relevant there, Could it be something in init.htcleo.rc? Have tried commenting everything at on fs, but still not fixed. There's also some mounts for squashfs files in init.rc (for modules and xbin) that seem redundant.
When I open complete linux installer and click launch kali linux I get error:
Checking loop device ...found
mount: mouting /storage on /data/local/mnt/external_sd failed: invalid argument
no user defined mount points
net.ipv4.ip_forward =1
chroot: can't execute '/root/init.sh' permission denided
shutting down Linux ARM
umount: can't umount /data/local/mnt/external_sd: invalid argument
umount: can't umount /data/local/mnt/dev :invalid argument
SELinux mode changer=Permissive: http://postimg.org/image/aqcx9x8ob/
SELinux mode changer=Enforcing: http://postimg.org/image/mp3aq0r3f/
Overview
I've created a very simple #!/bin/bash script (attached) to automate the initial build or subsequent rebuild of SpookCity138's ROM:
Slim Rom 7 for the Samsung S5 mini G800f (kminilte). The script simply automates the steps and processes created by others (none of which is my own work - all credit goes to the original creators). I have only tested this script on my own working environment: Gnome Ubuntu 17.04; 16GB RAM; i7-7700HQ; If your environment differs from this your experience may differ from mine.
How to Execute script
See readme at: https://github.com/fidoedidoe/build_scripts
Thanks
@spookcity138, @jimmy999x. Taking the time to educate me at each and every tentative step and demonstrating great patience
Contributors
spookcity138
jimmy999x
Script Source
The latest version of the script (and others for different devices) can be found here: https://github.com/fidoedidoe/build_scripts
SpookCity138's ROM
https://forum.xda-developers.com/galaxy-s5-mini/development/rom-slim-rom-7-nougat-t3558926
Created 2017-09-20
Last Updated 2017-12-09
There are sources to build this ROM for the Snapdragon variant (G800H)? It's a very good device, but simply there is not a single Nougat ROM for it...
wow, excellent, I have reviewed the code (I have not executed it yet) looks pretty good, it should work, I have to copy your script and modify it for other roms, thanks!
edit 1: it is possible to use this script (I use it and it works perfect) to automate even more the process of configuring the compilation environment https://github.com/akhilnarang/scripts
Also, for Ubunt 16.04 I added a couple more to make it easier some things:
cmake
nautilus (optional)
phablet-tools
unrar
silversearcher-ag (this is optional, but extremely useful for me, allows me to find the problematic lines inside a document or folder)
lfom said:
There are sources to build this ROM for the Snapdragon variant (G800H)? It's a very good device, but simply there is not a single Nougat ROM for it...
Click to expand...
Click to collapse
You need to apply some SELinux, CAF, And CM/LOS Patches to build a Nougat ROM for G800H, or that rom will not boot, or will shall not pass from build errors.
Is not a easy task.....
lfom said:
There are sources to build this ROM for the Snapdragon variant (G800H)? It's a very good device, but simply there is not a single Nougat ROM for it...
Click to expand...
Click to collapse
i found this on YT
so far so good for me
give it a try
https://youtu.be/UPOpJgqnlf8
not working for me -- using xubuntu 17.10
ko_taka said:
not working for me -- using xubuntu 17.10
Click to expand...
Click to collapse
Script updated on github (follow links for build_slimrom7_kminilte.sh). Tested on my laptop (Ubuntu gnome 17.04) and SlimRom7 version 1.17 builds successfully (although I have yet to test the build on the device). I'll update the attached zip in the opening page in the coming days, but as a general rule github is the best place to find latest version(s).
Thanks to @spookcity138 (again) for taking time the time and offering sound help / advice identifying the issues and resolve (the issue was within applying device specific patches ./apply.sh).
I am on 40GB partition. Not enough?
perly terminated.
Fetching projects: 70% (381/544) fatal: unable to access 'https://android.googlesource.com/platform/hardware/akm/': gnutls_handshake() failed: The TLS connection was non-properly terminated.
Fetching projects: 73% (398/544) fatal: unable to access 'https://android.googlesource.com/platform/system/connectivity/shill/': gnutls_handshake() failed: The TLS connection was non-properly terminated.
fatal: unable to access 'https://android.googlesource.com/platform/external/jsr330/': gnutls_handshake() failed: The TLS connection was non-properly terminated.
Fetching projects: 74% (403/544) fatal: unable to access 'https://android.googlesource.com/platform/external/jsr330/': gnutls_handshake() failed: The TLS connection was non-properly terminated.
error: Cannot fetch platform/external/jsr330
Fetching projects: 78% (425/544) fatal: write error: No space left on device
fatal: write error: No space left on device
fatal: write error: No space left on device
fatal: write error: No space left on device
fatal: write error: No space left on device
fatal: write error: No space left on device
fatal: write error: No space left on device
fatal: index-pack failed
error: index-pack died
fatal: index-pack failed
fatal: index-pack failed
fatal: index-pack failed
fatal: index-pack failed
fatal: index-pack failed
error: Cannot fetch SlimRoms/frameworks_base
Click to expand...
Click to collapse
ko_taka said:
I am on 40GB partition. Not enough?
Click to expand...
Click to collapse
Yeah,you're running out of space. I don't recall exactly what the sources and the build of a nougat ROM take,space wise. It seems a little weird you were running out of space syncing the sources. If I recall correctly nougat sources are somewhere between 25-30GB. I could be wrong though. The actual build itself (the out folder) also takes a fair bit of space. Again,just guessing,but around 15-20GB. I would say 60GB would be what you need.
hi spookcity138, nice to see you around
I haven't coded that so I'm feeling a bit lost
The process finally ended (now I am on 80GB partition)
I do not know where is the build if that built anything
those are the last lines
build_slimrom7_kminilte.sh: 176: build_slimrom7_kminilte.sh: [[: not found
Remove references to OmniRom recovery...
remove config_uriBlruEnabled references, spoils the build...
alter local manifest files for slimrom 7 build compatability...
insert text into file: frameworks/base/core/res/res/values/config.xml...
delete file cm_arrays.xml...
remove flipflap stuff from device/samsung/smdk3470-common/smdk3470-common.mk...
build_slimrom7_kminilte.sh: 205: read: Illegal option -t
build_slimrom7_kminilte.sh: 210: build_slimrom7_kminilte.sh: [[: not found
patching file include/telephony/ril.h
Hunk #1 FAILED at 31.
Hunk #2 succeeded at 395 (offset -1 lines).
Hunk #3 succeeded at 409 (offset -1 lines).
Hunk #4 succeeded at 569 (offset -1 lines).
Hunk #5 succeeded at 624 (offset -1 lines).
Hunk #6 succeeded at 1023 (offset -1 lines).
Hunk #7 succeeded at 5217 (offset -1 lines).
Hunk #8 succeeded at 5866 (offset -1 lines).
1 out of 8 hunks FAILED -- saving rejects to file include/telephony/ril.h.rej
manually reapplying failed Hunk #1...
patching file ril/Android.mk
patching file ril/libril/Android.mk
patching file ril/libril/ril.cpp
patching file ril/libsecril-client/Android.mk
applying frameworks_av to frameworks/av
Applying: av: Add samsung wfd service
Applying: add Android M MediaBufferGroup:MediaBufferGroup() for libwvm.so
applying frameworks_native to frameworks/native
Applying: Revert "Remove Parcel::writeIntPtr."
Applying: add missing const getSensorList() for MM gpsd (G800FXXU1CPK5)
applying hardware_libhardware to hardware/libhardware
applying hardware_ril to hardware/ril
Applying: ril: recover on crash
applying hardware_samsung_ril to hardware/samsung/ril
Applying: add SetAudioMode and SetSoundClockMode for MM audio-ril
applying packages_services_Telephony to packages/services/Telephony
./apply.sh: line 24: cd: /home/ferran/android/build_scripts/packages/services/Telephony: No such file or directory
build_slimrom7_kminilte.sh: 238: read: Illegal option -t
build_slimrom7_kminilte.sh: 243: build_slimrom7_kminilte.sh: [[: not found
prepare device specific code...
build_slimrom7_kminilte.sh: 249: build_slimrom7_kminilte.sh: source: not found
build_slimrom7_kminilte.sh: 250: build_slimrom7_kminilte.sh: lunch: not found
running croot...
build_slimrom7_kminilte.sh: 253: build_slimrom7_kminilte.sh: croot: not found
build_slimrom7_kminilte.sh: 262: read: Illegal option -t
build_slimrom7_kminilte.sh: 267: build_slimrom7_kminilte.sh: [[: not found
running mka bacon...
build_slimrom7_kminilte.sh: 273: build_slimrom7_kminilte.sh: mka: not found
Click to expand...
Click to collapse
ko_taka said:
hi spookcity138, nice to see you around
I haven't coded that so I'm feeling a bit lost
The process finally ended (now I am on 80GB partition)
I do not know where is the build if that built anything
those are the last lines
Click to expand...
Click to collapse
The build did not start. It applied the patches successfully (all but one where there was an error) Then it is just a serious of failures. I have not used this script so I cant say specifically where you are going wrong. Does the script have executable permissions? (I assume so as it partially worked) Do you have all of the need dependencies for building Android? Thats not the issue I don't think,but you need them either way. Other than that I am not real sure honestly. You may need to wait for @fidoedidoe to help you. I'll reply back if any possible reason comes to mind.
ko_taka said:
hi spookcity138, nice to see you around
I haven't coded that so I'm feeling a bit lost
The process finally ended (now I am on 80GB partition)
I do not know where is the build if that built anything
those are the last lines
Click to expand...
Click to collapse
Hi @ko_taka
@spookcity138 is correct, the script failed...when it succeeds it's pretty clear the last few messages published will read along the lines of: "Package Complete: .../out/target/product/kminilte/Slim-kminilte-7.1.2.build.1.17-UNOFFICIAL-20171209-1401.zip" followed by "#### make completed successfully (24:30 (mm:ss)) ####" (note the build time will vary depending on the power of your build machine and utilisation of ccache). Oh, FYI - my build folder is ~95GB in size (the ../out/ folder is 26GB and the ../.repo/ folder is 47GB!!)
Back to the script failure....first verify the following variable in the build_slimrom7_kminilte.sh is defined correctly for your environment:
Code:
WORK_DIRECTORY="$HOME/android/slimrom7"
For my personal build environment I keep the script (build_slimrom7_kminilte.sh) in a separate folder to where the source is located and the build is output to (just so i can purge those folders without losing the build script). FYI on your laptop your folder structure should look something like that shown below, with build_slimrom7.kminilte.sh stored in the folder .../build_scripts
Code:
/home/ferran/android/build_scripts
/home/ferran/android/slimrom7
Once the above is verified...the primary issue you have is every time you see "...[[: not found", the script is hitting an issue. Check that the first line of the script contains the line "#!/bin/bash ", this is called "shebang" and it tells your shell what program to interpret the script with, in our case we need "Bash". I'm now wondering what OS / Shell you're using (I use Ubuntu Gnome 17.04 with Bash version 4.4.7) does yours differ from this? To verify your Bash version:
Code:
$ bash -version
GNU bash, version 4.4.7(1)-release (x86_64-pc-linux-gnu)
Copyright © 2016 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
You could try forcing your shell to use bash (from memory), by switching to the /build_scripts/ folder and running the following command (do not use sudo or any elevated permissions):
Code:
$ cd /home/ferran/android/build_scripts
$ ./build_slimrom7_kminilte.sh
Let me know how you get on, in essence the script is failing on the evaluation lines where "if [[....]]" is used. if we can't get it to work, in your case, the script may need to be altered to change the evaluation (perhaps "if [...]" would be more suitable). Anyway - give me some feedback and lets see if we can get you a little further.
my bash is 4.4.12
working directory had been set correctly
I removed the double [[ leaving a simple [ same with ]] closing brackets
it says Illegal option -t in line 238
this is line 238: read -r -p "6/7. Initialise environment for Build <Y/n>? (automatically continues unprompted after 10 seconds): " -t 10 -e -i Y PROMPT
it also says [: Y: unexpected operator on line 243
this is line 243: if [ ! $PROMPT =~ ^[Yy]$ ]; then
Timte to time I was getting errors while fetching
TLS errors
I found it is due gnutls package and applied the following solution:
compile git with openssl. To do this, run the following commands:
sudo apt-get update
sudo apt-get install build-essential fakeroot dpkg-dev libcurl4-openssl-dev
sudo apt-get build-dep git
mkdir ~/git-openssl
cd ~/git-openssl
apt-get source git
dpkg-source -x git_1.7.9.5-1.dsc
cd git-1.7.9.5
(Remember to replace 1.7.9.5 with the actual version of git in your system.)
Then, edit debian/control file (run the command: gksu gedit debian/control) and replace all instances of libcurl4-gnutls-dev with libcurl4-openssl-dev.
Then build the package (if it's failing on test, you can remove the line TEST=test from the file debian/rules):
sudo dpkg-buildpackage -rfakeroot -b
Install new package:
x86_64: sudo dpkg -i ../git_1.7.9.5-1_amd64.deb
Click to expand...
Click to collapse
I'm using git-openssl build now
Just started the fetching process again
I'm under virtual machine on a host with a proper firewall configuration -- maybe that caused the connection problems while fetching
ko_taka said:
my bash is 4.4.12
working directory had been set correctly
I removed the double [[ leaving a simple [ same with ]] closing brackets
it says Illegal option -t in line 238
this is line 238: read -r -p "6/7. Initialise environment for Build <Y/n>? (automatically continues unprompted after 10 seconds): " -t 10 -e -i Y PROMPT
it also says [: Y: unexpected operator on line 243
this is line 243: if [ ! $PROMPT =~ ^[Yy]$ ]; then
Click to expand...
Click to collapse
Sounds like we're making progress. This is good. So, reading around the subject of square brackets vs double. It transpires converting the evaluations from double square brackets ([[..]]) to singles ([..]) may** change how variables are referenced. In my script I was forced to use double square brackets to correctly evaluate the response from the "read -r....." (read input) command (where it evaluates when upper or lower case Y is entered). If this command is changed from double square brackets to single ones the command then fails (on my setup). Further to this, in your reply it appears you're also having issues with the "read" command, for some reason your version doesn't support the -t directive (which waits for N seconds - ie: -t 5 will wait 5 seconds for user input).
For now the easiest thing to do is to remove *all* of the steps in the script that awaits input from the user to continue processing the script (they are non essential vanity items primarily used while I was building out the script). There are 7 is these in the script (look for "1/7", "2/7", "3/7", etc etc), just comment out (insert # at beginning of each line) for all 7 instances. There are ~10 lines per instance, examples of how instance #1 and #7 should look after editing is below. Just do the same for all 7 instances in your script and re run the script.
Code:
...
...
#PROMPT=""
#read -r -p "1/7. Initialise/Reinitialise Repo, first 'repo init' will take hours <Y/n>? (automatically continues unpromted after 5 seconds): " -t 5 -e -i Y PROMPT
#echo
#if [ -z "$PROMPT" ]; then
# PROMPT="Y"
#fi
#if [[ ! $PROMPT =~ ^[Yy]$ ]]; then
# echo "Response: '$PROMPT', exiting!"
# exit 1
#fi
...
...
#PROMPT=""
#read -r -p "7/7. Build rom (this segment can take hours) <Y/n>? (automatically continues unprompted after 10 seconds): " -t 10 -e -i Y PROMPT
#echo
#if [ -z "$PROMPT" ]; then
# PROMPT="Y"
#fi
#if [[ ! $PROMPT =~ ^[Yy]$ ]]; then
# echo "Response: '$PROMPT', exiting!"
# exit 1
#fi
...
I'd be really interested in knowing what OS you're using (Ubuntu, Mac, etc along with version) perhaps I can use this detail to come up with a more generic version of the script.
Good luck, let me know how you get on.
ko_taka said:
Timte to time I was getting errors while fetching
TLS errors
I found it is due gnutls package and applied the following solution:
I'm using git-openssl build now
Just started the fetching process again
I'm under virtual machine on a host with a proper firewall configuration -- maybe that caused the connection problems while fetching
Click to expand...
Click to collapse
I'd also try changing the value of the variable: REPO_SYNC_THREADS in the script to something lower (more suitable to your internet bandwidth / performance), try 2 or 4 and build up from there. ie: REPO_SYNC_THREADS=2
I think the problem was on GIT .. confusing I think so
I would be waiting a message like (file doesnt exist or something like that)
anyway I still with compiling errors but now is quite different
I am using virtualbox (Xubuntu 17.10) on Mac OS 10.13.2 Mac Mini 2014 entry level
applying packages_services_Telephony to packages/services/Telephony
./apply.sh: line 24: cd: /home/ferran/android/slimrom7/packages/services/Telephony: No such file or directory
6/7. Initialise environment for Build <Y/n>? (automatically continues unprompted after 10 seconds): Y
prepare device specific code...
including device/generic/mini-emulator-arm64/vendorsetup.sh
including device/generic/mini-emulator-armv7-a-neon/vendorsetup.sh
including device/generic/mini-emulator-mips64/vendorsetup.sh
including device/generic/mini-emulator-mips/vendorsetup.sh
including device/generic/mini-emulator-x86_64/vendorsetup.sh
including device/generic/mini-emulator-x86/vendorsetup.sh
including device/samsung/kminilte/vendorsetup.sh
build/envsetup.sh: line 1716: vendor/slim/build/envsetup.sh: No such file or directory
build/core/product_config.mk:250: *** _nic.PRODUCTS.[[device/samsung/kminilte/slim.mk]]: "vendor/slim/config/common_full_phone.mk" does not exist. Stop.
build/envsetup.sh: line 624: vendor/slim/build/tools/roomservice.py: No such file or directory
build/core/product_config.mk:250: *** _nic.PRODUCTS.[[device/samsung/kminilte/slim.mk]]: "vendor/slim/config/common_full_phone.mk" does not exist. Stop.
cat: /home/ferran/android/slimrom7/vendor/slim/build/envsetup.sh: No such file or directory
cat: /home/ferran/android/slimrom7/vendor/slim/build/envsetup.sh: No such file or directory
build/core/product_config.mk:250: *** _nic.PRODUCTS.[[device/samsung/kminilte/slim.mk]]: "vendor/slim/config/common_full_phone.mk" does not exist. Stop.
** Don't have a product spec for: 'slim_kminilte'
** Do you have the right repo manifest?
running croot...
mka clean/clobber needed...
./build_slimrom7_kminilte.sh: line 257: mka: command not found
7/7. Build rom (this segment can take hours) <Y/n>? (automatically continues unprompted after 10 seconds): Y
running mka bacon...
./build_slimrom7_kminilte.sh: line 273: mka: command not found
Click to expand...
Click to collapse
ko_taka said:
I think the problem was on GIT .. confusing I think so
I would be waiting a message like (file doesnt exist or something like that)
anyway I still with compiling errors but now is quite different
I am using virtualbox (Xubuntu 17.10) on Mac OS 10.13.2 Mac Mini 2014 entry level
Click to expand...
Click to collapse
Thanks for the feedback. At first glance it looks to me like your issue is less to do with the script and more to do with not having all the source locally. Seeing commands such as running ./apply.sh (puled down with the source) error reporting "file not found" is the smoking gun.
Right now I'd be tempted to say ensure you've successfully pulled the primary SlimRom7 source locally. It may be easier to do this outside of the script by running the following:
Code:
$ cd /home/ferran/android/slimrom7/
$ repo forall -vc "git reset --hard" --quiet
$ repo sync --jobs="2"
Keep an eye out of timeouts / 404 while it's syncing the repo's (the third of the three commands above). If you get errors just keep rerunning the "repo sync" command given above while in the correct directory until it completes without error. Once you have that done successfully, change the the build_scripts directory and re-run the script. If you see timeouts / 404 in the script output then you might have to manually run the "git clone" commands to see which one is causing the issue(s).
why does need that much space?
I was executing
$ repo forall -vc "git reset --hard" --quiet
$ repo sync --jobs="2"
Click to expand...
Click to collapse
I am getting the message "out of space"
80GB full of source code and even need more space??
ko_taka said:
why does need that much space?
I was executing
I am getting the message "out of space"
80GB full of source code and even need more space??
Click to expand...
Click to collapse
Use a disk usage analysis tool to find out whether earlier failed attempts pulled source down to multiple locations (when the script was failing).. I mentioned in an earlier post the size of the repo, look back 5 or 6 posts. Don't forget the bulk of the source will be contained in a hidden folder named /.repo/ check this folder doesn't exist outside of the build folder (/slimrom7/)...looking at earlier attempts I'd fist check your /build_scripts/ folder for the hidden .repo folder and if there delete it. Good luck
Hello XDA, I was attempting to do some experimentation with what I could do on the device via modifying init.rc files and the like. Rather than building and flashing a custom ROM for each run which is time consuming I thought I could just mess with the existing system images.
What I was hoping would work:
1. Download the October 007 (patch) stock binaries from Google
2. Extract the flame_xxxxx.zip image file
3. Convert the sparse system image file to a raw image file
- $ simg2img system.img system.raw
4. Mount the ext2 filesystem to a loopback device
- $ mount -o loop -t ext2 system.raw temp_dir
5. Edit the init file (e.g. init.rc) and save it
6. Unmount the ext2 filesystem
7. Create sparse system image
- Still don't quite know how to do this
8. Flash the sparse image from fastboot
- $ fastboot flash system system.img
So my question to the community at large is, is this track of work even logically correct. If so, how does one do it?
I have been trying to run these steps against image-flame-qd1a.190821.007.zip
My machine is running Ubuntu 19.10
For example Step 4 (mounting the ext2 system is failing for me)
Code:
$ losetup --list
....
/dev/loop8 0 0 1 1 /path/system.raw 0 512
....
$ sudo mount /dev/loop8 sys_mount
mount: /pathsys_mount: wrong fs type, bad option, bad superblock on /dev/loop8, missing codepage or helper program, or other error.
Also not working for Step 4
Code:
$ file system.raw
system.raw: Linux rev 1.0 ext2 filesystem data, UUID=4729639d-b5f2-5cc1-a120-9ac5f788683c (extents) (large files) (huge files)
$ sudo mount -o loop -t ext2 system.raw sys_mount
mount: /pathsys_mount: wrong fs type, bad option, bad superblock on /dev/loop8, missing codepage or helper program, or other error.
Thanks for the help.
I have since built my own AOSP build and have the same issue in that I can't mount the resulting system.img file from the AOSP build either.
Not sure if that matters or not, but I found it odd.