Hi
I want to bring you the fix permission script , t exactly same as the one in cwm/twrp ! The whole codes are written by cwm and cyanogen mod developers . I did some changes and modification to make it run on android enviroment .
How to use ?
You have two ways to use this script :
1- Using Script Manager :
Just change it names from fp.txt to fp.sh and run it in root mode
2- Using terminal emulator :
rename it to fp.sh . move it to /system/bin . change permissions to rwxrwxrwx ( 777 ) . open terminal and type :
Code:
su
fp.sh
Credits
cyanogen mod team
777 is a good permission? Sorry but this makes the file world-writable. Maybe learn something about permissions in linux before providing a script?
Nexus 4 cihazımdan Tapatalk 4 Beta ile gönderildi
droidjam said:
777 is a good permission? Sorry but this makes the file world-writable. Maybe learn something about permissions in linux before providing a script?
Nexus 4 cihazımdan Tapatalk 4 Beta ile gönderildi
Click to expand...
Click to collapse
But I don't think he need it all the time!
Maybe he want remove it after run it
Sent from my GT-I9300 using Tapatalk 4 Beta
droidjam said:
777 is a good permission? Sorry but this makes the file world-writable. Maybe learn something about permissions in linux before providing a script?
Nexus 4 cihazımdan Tapatalk 4 Beta ile gönderildi
Click to expand...
Click to collapse
All busybox applets + system applets are moded in 777 !
I is just an small script and you have to remove it when you done your work . IT IS NOT A SYSTEM FILE OR A SYSFS FILE to be concerned about !!!!!!
Good! I needed some times something like this thanks for the scripts
regards!
Hello alireza7991 and thank you for this script!
I tried it on my Galaxy Tab 3 running RocketTab v3.1 ROM (excellent stuff, Android 4.1.2) using SSH Droid and Terminal (on my Mac) but I get a "Bus Error" for each application.
The fp.sh permissions are correct, and running it as "su" too, but I still get this below. Any idea what's wrong, please?
I think it starts by the fact it's not mounting properly. (please note this is run live, in Terminal via SSH) Check the "applet not found" error...
Code:
[email protected]:/data/data/berserker.android.apps.sshdroid/home # ./fp.sh
mount: applet not found
./fp.sh started at 02-08-2014 22:50:32
Processing (1 of 113): com.google.android.location...
Bus error
Processing (2 of 113): com.imdb.mobile...
Bus error
Processing (3 of 113): com.sec.android.app.phoneutil...
Bus error
[…]
Processing (112 of 113): com.google.android.syncadapters.contacts...
Bus error
Processing (113 of 113): com.google.android.backup...
Bus error
./fp.sh ended at 02-08-2014 22:50:57 (Runtime:0m25s)
[email protected]:/data/data/berserker.android.apps.sshdroid/home #
konsti said:
Hello alireza7991 and thank you for this script!
I tried it on my Galaxy Tab 3 running RocketTab v3.1 ROM (excellent stuff, Android 4.1.2) using SSH Droid and Terminal (on my Mac) but I get a "Bus Error" for each application.
The fp.sh permissions are correct, and running it as "su" too, but I still get this below. Any idea what's wrong, please?
I think it starts by the fact it's not mounting properly. (please note this is run live, in Terminal via SSH) Check the "applet not found" error...
Code:
[email protected]:/data/data/berserker.android.apps.sshdroid/home # ./fp.sh
mount: applet not found
./fp.sh started at 02-08-2014 22:50:32
Processing (1 of 113): com.google.android.location...
Bus error
Processing (2 of 113): com.imdb.mobile...
Bus error
Processing (3 of 113): com.sec.android.app.phoneutil...
Bus error
[…]
Processing (112 of 113): com.google.android.syncadapters.contacts...
Bus error
Processing (113 of 113): com.google.android.backup...
Bus error
./fp.sh ended at 02-08-2014 22:50:57 (Runtime:0m25s)
[email protected]:/data/data/berserker.android.apps.sshdroid/home #
Click to expand...
Click to collapse
install busybox and try :
Code:
export PATH=${PATH}:/system/xbin
before running it.
alireza7991 said:
install busybox and try :
Code:
export PATH=${PATH}:/system/xbin
before running it.
Click to expand...
Click to collapse
Thank you alireza7991, I am not an expert yet on Android (despite knowing some UNIX) so how can I first check if BusyBox is (properly) installed on this device? Is there a simple way to check, by means of e.g. a test command?
The ROM I am using is excellent RocketTab v3.1 for my Galaxy Tab 3 7" but unfortunately the thread is now locked (to ask). However, there is mention that BusyBox is installed... perhaps only the PATH environment was missing?
Many thanks again!
konsti said:
Thank you alireza7991, I am not an expert yet on Android (despite knowing some UNIX) so how can I first check if BusyBox is (properly) installed on this device? Is there a simple way to check, by means of e.g. a test command?
The ROM I am using is excellent RocketTab v3.1 for my Galaxy Tab 3 7" but unfortunately the thread is now locked (to ask). However, there is mention that BusyBox is installed... perhaps only the PATH environment was missing?
Many thanks again!
Click to expand...
Click to collapse
It's pretty similar to UNIX. type 'busybox' in terminal if busyox has not been installed shell will says the command not found or sth similar.
Hi again alireza7991, thanks for your info. Typing "busybox" on the terminal window on my Mac (via SSHDroid) I get:
Code:
BusyBox v1.21.0 (2013-07-08 16:00:47 CEST) multi-call binary.
Now, your export command although accepted, didn't work. So I figured typing it as I find it on my Mac:
Code:
export PATH="/system/xbin/":$PATH
[B]instead of[/B]
export PATH=${PATH}:/system/xbin
And now the script works, I tried it with -s option (for simulation) and get nothing as error(s) for apps. Does that mean I am OK in terns of "fixed" permissions?
However, as you can see, the last part of the script still has issues? Or is it the "simulation" flag?
Your comment is appreciated again… I think it's that last bit in your script (chmod 644 /system/app/*) which I am not sure what it serves for… or is it /system/ not properly mounted as r/w?
Many thanks:
Code:
[B][email protected]:/data/data/berserker.android.apps.sshdroid/home #[/B] [COLOR="DarkRed"]./fp.sh -s[/COLOR]
./fp.sh started at 02-15-2014 13:56:44
Processing (1 of 113): com.google.android.location...
Processing (2 of 113): com.imdb.mobile...
Processing (3 of 113): com.sec.android.app.phoneutil...
[...]
Processing (111 of 113): com.bigeyes0x0.trickstermod...
Processing (112 of 113): com.google.android.syncadapters.contacts...
Processing (113 of 113): com.google.android.backup...
./fp.sh ended at 02-15-2014 13:58:18 (Runtime:1m34s)
chmod: /system/app/AllshareService.apk: Read-only file system
chmod: /system/app/ApplicationsProvider.apk: Read-only file system
[...]
chmod: /system/app/minimode-res.apk: Read-only file system
chmod: /system/app/serviceModeApp.apk: Read-only file system
[B][email protected]:/data/data/berserker.android.apps.sshdroid/home #[/B]
alireza7991 said:
It's pretty similar to UNIX. type 'busybox' in terminal if busyox has not been installed shell will says the command not found or sth similar.
Click to expand...
Click to collapse
konsti said:
Hi again alireza7991, thanks for your info. Typing "busybox" on the terminal window on my Mac (via SSHDroid) I get:
Code:
BusyBox v1.21.0 (2013-07-08 16:00:47 CEST) multi-call binary.
Now, your export command although accepted, didn't work. So I figured typing it as I find it on my Mac:
Code:
export PATH="/system/xbin/":$PATH
[B]instead of[/B]
export PATH=${PATH}:/system/xbin
And now the script works, I tried it with -s option (for simulation) and get nothing as error(s) for apps. Does that mean I am OK in terns of "fixed" permissions?
However, as you can see, the last part of the script still has issues? Or is it the "simulation" flag?
Your comment is appreciated again… I think it's that last bit in your script (chmod 644 /system/app/*) which I am not sure what it serves for… or is it /system/ not properly mounted as r/w?
Many thanks:
Code:
[B][email protected]:/data/data/berserker.android.apps.sshdroid/home #[/B] [COLOR="DarkRed"]./fp.sh -s[/COLOR]
./fp.sh started at 02-15-2014 13:56:44
Processing (1 of 113): com.google.android.location...
Processing (2 of 113): com.imdb.mobile...
Processing (3 of 113): com.sec.android.app.phoneutil...
[...]
Processing (111 of 113): com.bigeyes0x0.trickstermod...
Processing (112 of 113): com.google.android.syncadapters.contacts...
Processing (113 of 113): com.google.android.backup...
./fp.sh ended at 02-15-2014 13:58:18 (Runtime:1m34s)
chmod: /system/app/AllshareService.apk: Read-only file system
chmod: /system/app/ApplicationsProvider.apk: Read-only file system
[...]
chmod: /system/app/minimode-res.apk: Read-only file system
chmod: /system/app/serviceModeApp.apk: Read-only file system
[B][email protected]:/data/data/berserker.android.apps.sshdroid/home #[/B]
Click to expand...
Click to collapse
I think I 've forgot to mount system rw before. this was used to fix a bug which caused bootloop in my device.
however this is an extremely old job and I do not remember what I have done, sorry .
alireza7991 said:
I think I 've forgot to mount system rw before. this was used to fix a bug which caused bootloop in my device.
however this is an extremely old job and I do not remember what I have done, sorry .
Click to expand...
Click to collapse
how to be included on my build rom?
Related
i tried different method but i couldn't install Ubuntu or Debian in legend.........could someone post a tutorial..............????? pls
FOLLOW ME http://smartsreenath.blogspot.com/
smartsreenath said:
i tried different method but i couldn't install Ubuntu or Debian in legend.........could someone post a tutorial..............????? pls
Click to expand...
Click to collapse
I have tried too without sucess... Would be really cool if this would work on Legend too.
How do you go about even starting?
check this sites.......
http://www.saurik.com/id/10
http://nexusonehacks.net/
i hope some one will do a nice tutorial for us...........
FOLLOW ME http://smartsreenath.blogspot.com/
Does the Legend kernel have support for loop devices?
EDIT:
Well, I pulled the config file from my legend and the dumfuq OC kernel looks like it might do, but I'm not sure if it's commented out... Also, we need the loop devices in order to mount the Ubuntu images, so if support isn't there someone is gonna have to compile a few kernels that do have it...
EDIT:
Argh!!! I can't even download the sodding files needed, my internet keeps dropping out.
Buddy
Follow the instructions here
http://nexusonehacks.net/nexus-one-hacks/how-to-install-ubuntu-on-your-nexus-oneandroid/
I had made a little change to the bootubuntu script , to make it work for legend
Download it from here
http://10stones.com/ubuntu/bootubuntu
I had tried it on stock rom , 2.1 update 2 , with temporary root access using the Universal And Root .
make sure you ran the "sh ./ubuntu.sh" command each time you change the bootubuntu.
Since mine was a temporary root i pushed the busybox binary to /data/ using
adb push busybox /data/
download the busybox binary from here
http://10stones.com/ubuntu/busybox
** For custom roms the busybox will be installed.
If you are facing any problems reply with the output of commands.
smartvinu said:
I had made a little change to the bootubuntu script , to make it work for legend
Download it from here
http://10stones.com/ubuntu/bootubuntu
Click to expand...
Click to collapse
how i can change the script ?
with sdk and cmd ?
tnx
Something ain't working here. The script fails (see below) then I get a forced reboot...
C:\AndroidSDK\tools>adb shell
# su
su
# cd /sdcard/ubuntu
cd /sdcard/ubuntu
# sh ./ubuntu.sh
sh ./ubuntu.sh
modprobe: module 'ext2' not found
←[H←[Jmkdir failed for /data/local/mnt, File exists
←[H←[Jrm: can't remove '/system/bin/fsrw': No such file or directory
rm: can't remove '/system/bin/bootubuntu': No such file or directory
rm: can't remove '/system/bin/unionfs': No such file or directory
unknown option -- /BusyBox v1.16.2androidfull (2010-08-01 14:57:25 EDT) multi-ca
ll binary.
Usage: rm [OPTIONS] FILE...
Remove (unlink) FILEs
Options:
-i Always prompt before removing
-f Never prompt
-R,-r Recurse
cp: can't create '/system/bin/fsrw': Out of memory
cp: can't create '/system/bin/bootubuntu': Out of memory
cp: can't create '/system/bin/unionfs': Out of memory
cp: can't create '/system/bin/mountonly': Out of memory
chmod: bootubuntu: Operation not permitted
chmod: fsrw: Operation not permitted
chmod: mountonly: Operation not permitted
chmod: ubuntu.img: Operation not permitted
chmod: ubuntu.sh: Operation not permitted
chmod: unionfs: Operation not permitted
chmod: su: No such file or directory
←[H←[J
Ubuntu Chroot Bootloader v0.1
Ubuntu Bootloader is now installed!
This process does NOT damage Android OS!
Original Installer by Charan Singh
Modified for Ubuntu Chroot by Max Lee at NexusOneHacks.net
To enter the Debian Linux console just type 'bootubuntu'
#
Click to expand...
Click to collapse
TheGrammarFreak said:
Something ain't working here. The script fails (see below) then I get a forced reboot...
Click to expand...
Click to collapse
what is the busybox version .. ?
I tried with 1.16.1
also check if you have enough phone memory
smartvinu said:
what is the busybox version .. ?
I tried with 1.16.1
also check if you have enough phone memory
Click to expand...
Click to collapse
Busybox 1.16.2
How much phone memory is enough?
I tried some more tinkering and now I just get an error about /bin/bash not existing whenever I try and run ubuntuboot...
C:\AndroidSDK\tools>adb shell
# su
su
# cd /sdcard/ubuntu
cd /sdcard/ubuntu
# sh ./ubuntu.sh
sh ./ubuntu.sh
modprobe: module 'ext2' not found
←[H←[Jmkdir failed for /data/local/mnt, File exists
←[H←[Junknown option -- /BusyBox v1.16.2androidfull (2010-08-01 14:57:25 EDT) mu
lti-call binary.
Usage: rm [OPTIONS] FILE...
Remove (unlink) FILEs
Options:
-i Always prompt before removing
-f Never prompt
-R,-r Recurse
chmod: bootubuntu: Operation not permitted
chmod: fsrw: Operation not permitted
chmod: mountonly: Operation not permitted
chmod: ubuntu.img: Operation not permitted
chmod: ubuntu.sh: Operation not permitted
chmod: unionfs: Operation not permitted
chmod: su: No such file or directory
←[H←[J
Ubuntu Chroot Bootloader v0.1
Ubuntu Bootloader is now installed!
This process does NOT damage Android OS!
Original Installer by Charan Singh
Modified for Ubuntu Chroot by Max Lee at NexusOneHacks.net
To enter the Debian Linux console just type 'bootubuntu'
# bootubuntu
bootubuntu
mount: can't setup loop device: No such file or directory
mount: mounting devpts on /data/local/ubuntu/dev/pts failed: No such file or dir
ectory
mount: mounting proc on /data/local/ubuntu/proc failed: No such file or director
y
mount: mounting sysfs on /data/local/ubuntu/sys failed: No such file or director
y
net.ipv4.ip_forward = 1
Setting /etc/resolv.conf to Google Open DNS 8.8.8.8 and 8.8.4.4
bootubuntu: cannot create /data/local/ubuntu/etc/resolv.conf: directory nonexist
ent
bootubuntu: cannot create /data/local/ubuntu/etc/resolv.conf: directory nonexist
ent
Setting localhost on /etc/hosts
bootubuntu: cannot create /data/local/ubuntu/etc/hosts: directory nonexistent
READY TO ROCK AND ROLL BABY!
Brought to you by NexusOneHacks.net and the open source community!
chroot: can't execute '/bin/bash': No such file or directory
Shutting down Ubuntu
umount: can't umount /data/local/ubuntu/dev/pts: No such file or directory
umount: can't umount /data/local/ubuntu/proc: No such file or directory
umount: can't umount /data/local/ubuntu/sys: No such file or directory
umount: can't umount /data/local/ubuntu: Invalid argument
#
Click to expand...
Click to collapse
Can u try with the busybox i uploaded
smartvinu said:
Can u try with the busybox i uploaded
Click to expand...
Click to collapse
Still no joy...
C:\AndroidSDK\tools>adb push busybox /data/
1042 KB/s (1120536 bytes in 1.050s)
C:\AndroidSDK\tools>adb shell
# su
su
# cd /sdcard/ubuntu
cd /sdcard/ubuntu
# sh ./ubuntu.sh
sh ./ubuntu.sh
modprobe: module 'ext2' not found
←[H←[Jmkdir failed for /data/local/mnt, File exists
←[H←[Junknown option -- /BusyBox v1.16.2androidfull (2010-08-01 14:57:25 EDT) mu
lti-call binary.
Usage: rm [OPTIONS] FILE...
Remove (unlink) FILEs
Options:
-i Always prompt before removing
-f Never prompt
-R,-r Recurse
chmod: bootubuntu: Operation not permitted
chmod: fsrw: Operation not permitted
chmod: mountonly: Operation not permitted
chmod: ubuntu.img: Operation not permitted
chmod: ubuntu.sh: Operation not permitted
chmod: unionfs: Operation not permitted
chmod: su: No such file or directory
←[H←[J
Ubuntu Chroot Bootloader v0.1
Ubuntu Bootloader is now installed!
This process does NOT damage Android OS!
Original Installer by Charan Singh
Modified for Ubuntu Chroot by Max Lee at NexusOneHacks.net
To enter the Debian Linux console just type 'bootubuntu'
# bootubuntu
bootubuntu
mount: can't setup loop device: No such file or directory
mount: mounting devpts on /data/local/ubuntu/dev/pts failed: No such file or dir
ectory
mount: mounting proc on /data/local/ubuntu/proc failed: No such file or director
y
mount: mounting sysfs on /data/local/ubuntu/sys failed: No such file or director
y
net.ipv4.ip_forward = 1
Setting /etc/resolv.conf to Google Open DNS 8.8.8.8 and 8.8.4.4
bootubuntu: cannot create /data/local/ubuntu/etc/resolv.conf: directory nonexist
ent
bootubuntu: cannot create /data/local/ubuntu/etc/resolv.conf: directory nonexist
ent
Setting localhost on /etc/hosts
bootubuntu: cannot create /data/local/ubuntu/etc/hosts: directory nonexistent
READY TO ROCK AND ROLL BABY!
Brought to you by NexusOneHacks.net and the open source community!
chroot: can't execute '/bin/bash': No such file or directory
Shutting down Ubuntu
umount: can't umount /data/local/ubuntu/dev/pts: No such file or directory
umount: can't umount /data/local/ubuntu/proc: No such file or directory
umount: can't umount /data/local/ubuntu/sys: No such file or directory
umount: can't umount /data/local/ubuntu: Invalid argument
#
Click to expand...
Click to collapse
This clearly throws a large number of errors, I just don't know why. The first command I issue is "su"
smartvinu said:
Can u try with the busybox i uploaded
Click to expand...
Click to collapse
why don't you check it after rooting your mobile? you already posted that your phone is hafly rooted and using stock rom........why don't you move it to azure rom and post custom bootubuntu [sorry my opinion]
FOLLOW ME http://smartsreenath.blogspot.com/
here is my log just check it smartvinu
E:\sdk\tools>adb devices
* daemon not running. starting it now *
* daemon started successfully *
List of devices attached
xxxxxxxxxxxxx device
E:\sdk\tools>adb shell
# su
su
# su
su
# cd /sdcard/ubuntu
cd /sdcard/ubuntu
# sh ./ubuntu.sh
sh ./ubuntu.sh
modprobe: chdir(/lib/modules): No such file or directory
←[H←[Jrm failed for -f, No such file or directory
rm failed for -f, No such file or directory
rm failed for -f, No such file or directory
rm failed for -f, No such file or directory
rm failed for -f, No such file or directory
mkdir failed for /data/local/mnt, File exists
←[H←[Jrm failed for -/system/bin/mountonly, No such file or directory
Unable to chmod bootubuntu: Operation not permitted
←[H←[J
Ubuntu Chroot Bootloader v0.1
Ubuntu Bootloader is now installed!
This process does NOT damage Android OS!
Original Installer by Charan Singh
Modified for Ubuntu Chroot by Max Lee at NexusOneHacks.net
To enter the Debian Linux console just type 'bootubuntu'
# bootubuntu
bootubuntu
net.ipv4.ip_forward = 1
Setting /etc/resolv.conf to Google Open DNS 8.8.8.8 and 8.8.4.4
Setting localhost on /etc/hosts
READY TO ROCK AND ROLL BABY!
Brought to you by NexusOneHacks.net and the open source community!
[1] Illegal instruction chroot ${mnt} /b...
Shutting down Ubuntu
#
Click to expand...
Click to collapse
FOLLOW ME http://smartsreenath.blogspot.com/
HTC legend hvn't full R/W on system files ...
edit : sorry i'm french
smartsreenath said:
here is my log just check it smartvinu
FOLLOW ME http://smartsreenath.blogspot.com/
Click to expand...
Click to collapse
@smartsreenath
Can u check that after doing this steps the /data/local/ubuntu is mounted with the ubuntu.img
Umm, post missing??
I can run ubuntu with sucess and access it with vlc-viewer to localhost.
Do a "cat ubuntu.sh" and manually enter commands to see whish fail
and the same with bootubuntu.
Oops
I'll try again to make it work tomorrow
mmm my post was deleted ?!
I can't mount with indigo bean rom ...
But with anothersotckrom that work fine ^^
Always wondered what the terminal emulator app does? Dont now what commands to type? Well this thread is all about that
ALERT!!! ALERT!!
BELOW ARE THE COMMANDS AND THE PROCESSES THAT WILL HAPPEN BY TYPING THE COMMANDS!!!
IF YOU DO NOT UNDERSTAND SOMETHING PLEASE SO NOT TRY IT.. IT IS RISKY AND WILL POTENTIALLY HARM YOUR DEVICE!!
DO NOT BLAME ME THEN!!
THIS IS A REFERENCE AND DEV THREAD. NOOBS SHOULD NOT LINGER AROUND HERE
The Android Shell
A "shell" is a program that listens to keyboard input from a user and performs actions as directed by the user. Android devices come with a simple shell program. This shell program is mostly undocumented. Since many people are curious about it I thought I'd write up some documentation for it.
Currently this documentation is incomplete, sorry!
Click to expand...
Click to collapse
Common problems
The built-in shell has very limited error handling. When you type a command name incorrectly it will say "permission denied", even though the real problem is that it couldn't find the command:
Click to expand...
Click to collapse
Code:
$ dir
dir: permission denied <---- this is a misleading error message, should say 'dir: not found'
$ ls
... listing of current directory
The PATH variable
The Android shell will run any program it finds in its PATH. The PATH is a list of directories. You can find out what your shell's PATH is set to by using the built-in echo command:
Code:
$ echo $PATH
/data/local/bin:/sbin:/vendor/bin:/system/sbin:/system/bin:/system/xbin
Depending upon your shell, you may see a different result.
Built in Commands
Every shell has a few built-in commands. Some common built-in commands are:
echo -- prints text to stdout.
set -- sets shell variables
export -- makes shell variables available to command-line programs
cd -- change the current directory.
pwd -- print name of the current directory.
Commands
To find out what commands you have available to you, use the "ls" command on each of the directories in the PATH variable.
Click to expand...
Click to collapse
Finding documentation for the Android commands.
Many of the Android commands are based on standard Linux (or bsd) commands. If you're curious about a command, you can sometimes learn how it works by using the "man" command on a desktop Linux or OSX (Apple Macintosh) computer. The Linux or OSX version of the command may be different in details, but much of the documentation will still apply to the Android version of the command.
Another source of documentation for people without a Linux or OSX machine handy is to use a web browser and use a web search engine to search for the text: "man Linux command-name".
List of commands
The following is a list of the commands that are present on a Nexus S phone running an Android 2.3.3 "user-debug" build. Many of these commands are not present on a "user" phone. (They are missing from a "user" phone because they are specific to developing or debugging the Android operating system.)
Code:
$ ls /data/local/bin
/data/local/bin: No such file or directory
Notice that by default there is no /data/local/bin directory. You can create this directory using the "mkdir" command if you like.
Code:
$ ls /sbin
opendir failed, Permission denied
The /sbin directory exists, but you don't have permission to access it. You need root access. If you have a developer phone, or otherwise have root access to your phone you can see what's in this directory.
Code:
$ su
# ls /sbin
ueventd
adbd
# exit
$
Notice that the shell prompt changes from a '$' to a '#' to indicate that you have root access.
Click to expand...
Click to collapse
Notice also that neither of the /sbin commands are useful to the shell -- the adb and ueventd files are 'daemon' programs used to implement the Android Debugger "adb" program that is used by developers.
Code:
$ ls /vendor/bin
gpsd
pvrsrvinit
Vendor/bin is where device vendors can put device-specific executables. These files are from a Nexus S.
Code:
$ ls /system/sbin
/system/sbin: No such file or directory
This directory does not exist on a Nexus S.
Code:
$ ls /system/bin
am
am is the Android Activity Manager. It's used to start and stop Android activities (e.g. applications) from the command line. Type am by itself to get a list of options.
Click to expand...
Click to collapse
Code:
amix
aplay
Command line audio file player.
Code:
app_process
applypatch
Used to apply patches to android files.
Code:
arec
Command line audio recorder.
Code:
audioloop
bluetoothd
BlueTooth daemon
Code:
bmgr
Backup manager - type command by itself to get documentation.
Code:
bootanimation
Draws the boot animation. You may have to reset your phone to get out of this.
Code:
brcm_patchram_plus
bugreport
cat
Copy the contents of a file to standard output.
Code:
chmod
Change the mode of a file (e.g. whether it can be read or written.)
Code:
chown
Change the owner of a file.
Code:
cmp
Compare two files byte-by-byte
Code:
dalvikvm
The dalvik virtual machine. (Used to run Android applications.)
Code:
date
Prints the current date and time
Code:
dbus-daemon
dd
Convert and copy a file. By default copies standard in to standard out.
Code:
debuggerd
dexopt
df
Shows how much space is free on different file systems on your device.
Code:
dhcpcd
dmesg
dnsmasq
dumpstate
dumpsys
dvz
fsck_msdos
gdbserver
getevent
getprop
gzip
hciattach
hd
id
ifconfig
iftop
ime
input
insmod
installd
ioctl
ionice
iptables
keystore
keystore_cli
kill
Send signals to processes.
Code:
linker
ln
Used to set up a file system link.
Code:
log
logcat
Prints the Android runtime log.
Code:
logwrapper
ls
Lists files.
Code:
lsmod
lsof
make_ext4fs
mediaserver
mkdir
Make a directory.
Code:
monkey
A program that sends random events, used to test applications. (Like having a monkey playing with the device.)
Code:
mount
mtpd
mv
Move a file from one directory to another. (Only on the same file system. Use "cat a > b" to copy a file between file systems.
Code:
nandread
ndc
netcfg
netd
netstat
newfs_msdos
notify
omx_tests
pand
ping
pm
pppd
printenv
ps
List active processes.
Code:
qemu-props
qemud
racoon
radiooptions
reboot
Reboot the device.
Code:
record
renice
rild
rm
Remove a file.
Code:
rmdir
Remove a directory.
Code:
rmmod
route
rtp_test
run-as
schedtest
schedtop
sdcard
sdptool
sendevent
service
servicemanager
setconsole
setprop
setup_fs
sh
showlease
sleep
smd
stagefright
start
Starts the Android runtime.
Code:
stop
Stops the Android runtime.
Code:
surfaceflinger
svc
sync
system_server
tc
testid3
toolbox
top
Shows which processes are currently using the most CPU time.
Code:
umount
uptime
Prints how long your device has been running since it was last booted.
Code:
vdc
vmstat
vold
watchprops
wipe
wpa_cli
wpa_supplicant
$ ls /system/xbin
add-property-tag
btool
check-lost+found
dexdump
dhdutil
hcidump
latencytop
librank
opcontrol
oprofiled
procmem
procrank
rawbu
scp
Secure copy program. (Used to copy files over the network.)
Code:
showmap
showslab
sqlite3
Used to administer SQLite databases.
Code:
strace
System trace command - use to see what system calls a program makes.
Code:
su
Start a shell with root privileges.
Versions of the Android Shell
Android 1.0 used a shell that had no tab completion or history editing.
Android 2.3 added history editing. You can for example use the up/down arrows to edit previous commands.
Other shells
Busybox
Busybox is a program that contains a shell and a set of command line utilities. Search Android Market for "Busybox" and you should find some versions you can install. The Busybox shell includes tab completion and history editing. Some versions of Busybox for Android do not require that you root your phone.
Debian utilities
You can install the full Debian shell and utilities. (Debian is a popular desktop Linux distribution.) I don't know the details, and it may require a "rooted" phone. Try a web search for "Debian Android install".
Custom ROMs
Some custom ROMs come with their own shells and utilities. If you are using a custom ROM, check its documentation to find out what's available.
How can I view stdout outputs in terminal emulator window?
For example with dd command, not specifying output should display it at current terminal, like in linux, but actually doesn't. Any ideas?
Hey wanna troll someone's phone
Type in terminal "stop" lololol
Sent from my E15i using xda premium
Similar to linux terminal commands I use
Nice work though, great guide, thanks dude
W!LßSO @ XDA
Great guide, but you have forgot a very useful command: grep
It allows to apply filters to the output of the commands. The syntax is:
Code:
command | grep filter
For example, to list only the apk files inside a folder:
Code:
ls /folder/to/list | grep .apk
Great guide!
IMO dmesg is also important. Maybe you should add in a description for it?
Dmesg --> prints the Linux kernel output, which is different from the Android system output, logcat. Useful for checking hardware and to see if modules started up succesfully. Also useful for debugging in conjunction with logcat.
Code:
cat /proc/kmsg > /sdcard/dmesg.txt
Copies the dmesg output to a file fled dmesg.txt on the sdcard
And
Code:
cat /dev/log/system > /sdcard/logcat.txt
Copies the logcat output to a file named logcat.txt on your sdcard.
Also, you missed out the parted and e2fsck commands, used for partitioning and checking filesystem integrity.
Also, the command free (display free ram/swap) is not included.
Sent from my E15i using Tapatalk 2
Is there a command for check disk utility as in windows.. chkdsk...
my memory card is not working hence thought of running the check disk if possible...
dspPunk said:
Is there a command for check disk utility as in windows.. chkdsk...
my memory card is not working hence thought of running the check disk if possible...
Click to expand...
Click to collapse
Code:
su
fsck_msdos /dev/block/yourdevice
For ext4 there's e2fsck
scandiun said:
Code:
su
fsck_msdos /dev/block/yourdevice
For ext4 there's e2fsck
Click to expand...
Click to collapse
Dint get it... Sorry i am a so not into commands...
Kindly tell me the step wise solution... How can i see my device [yourdevice] which you have specified...
dspPunk said:
Dint get it... Sorry i am a so not into commands...
Kindly tell me the step wise solution... How can i see my device [yourdevice] which you have specified...
Click to expand...
Click to collapse
I don't have a Xperia X8 actually, does it support mass storage mode for internal sdcard?
http://www.jayceooi.com/2012/03/14/...storage-on-android-4-0-ics-samsung-galaxy-s2/
scandiun said:
I don't have a Xperia X8 actually, does it support mass storage mode for internal sdcard?
http://www.jayceooi.com/2012/03/14/...storage-on-android-4-0-ics-samsung-galaxy-s2/
Click to expand...
Click to collapse
I am having SGS2 and yes it supports mass storage for internal sdcard...
When i connect to my computer it shows only internal sdcard and not external card which is present in the external sdcard slot...
actually the problem is that my sdcard gets detected some times and sometimes it doesnt...
i searched a lot and many of them told that it is a kernel version issue.. i updated kernel still no luck..
then i got one thread which gave me the solution of check disk so was thinking whether terminal emulator has any commands for check disk..
Hi hetunandu, great guide,
but still I don't understand few things:
1: how to run a specific action of an app?
2: how to KNOW the exact sintax of possible actions of an app?
3: is it possible to launch these commands via SSH (through an SSH server)?
eg: I want to start a audio-recording app on my phone from my computer, AND start recording from remote. Is it possible?
Thank you
(and sorry for my english..)
JFI - Never run fsck on a mounted partition.. You will corrupt your data!
CtrlAltDelIrl said:
JFI - Never run fsck on a mounted partition.. You will corrupt your data!
Click to expand...
Click to collapse
Usually fsck won't run on that case and you warn you, you will have to use the force option in that case.
reading traffic stats
I am trying to get the traffic stat getMobileRxBytes (or any other traffic stat) to output a usable result in the terminal emulator. The goal is simply to be able to copy the rx bytes total to be used in Tasker. However, I can't seem to be able to get any output. I would appreciate it if anybody knows the proper command/syntax to show this traffic data. Thanks.
I am on a stock rooted 4.1.1 Galaxy Nexus.
[Q] Is there a command to show some configuration ?
I have run this command on terminal emulator:
[email protected]:/ $ su
[email protected]:/ #setprop net.cdma.rstp.proxy.addr 0.0.0.0;
[email protected]:/ #setprop net.cdma.rstp.proxy.port 0;
[email protected]:/ #setprop net.cdma.httppd.proxy.addr 0.0.0.0;
[email protected]:/ #setprop net.cdma.httppd.proxy.port 0;
Is above command right..???
after that i ran "getprop" i don't see effect of that command.
Can you tell me the right way or command to change my rstp & httppd setting...? cause my Epic4G cannot play video streaming after flashing CM10 nightly.
thanks,
adit
permission denied
china telecom infotmic m7206 not root because no usb i want to root tablet pc
terminal is boot "permission denied" why
help me please ???
Any way to check Camera firmware version per http://forum.xda-developers.com/showthread.php?t=2006128 ?
rooted Verizon SG3 on CM10.0
Hi... Before this I have rooted my phone since yesterday when I accidentally copy su file from "/system" to "/system/bin/" andnow I can't get root access because on Superuser I check the su version was 3.1.1 but there got red words maybe it try saying that I put su file in wrong location and I can't move it back because my root explorer can't get root access and it just show Root Explorer acess denied by Superuser. Terminal emulator also access denied. One more I'm using Sony Ericsson W8 and it can't unlock bootloader. Could someone help me to remove su file from "/system/bin". Thanks You
PutraMasyers97 said:
Hi... Before this I have rooted my phone since yesterday when I accidentally copy su file from "/system" to "/system/bin/" andnow I can't get root access because on Superuser I check the su version was 3.1.1 but there got red words maybe it try saying that I put su file in wrong location and I can't move it back because my root explorer can't get root access and it just show Root Explorer acess denied by Superuser. Terminal emulator also access denied. One more I'm using Sony Ericsson W8 and it can't unlock bootloader. Could someone help me to remove su file from "/system/bin". Thanks You
Click to expand...
Click to collapse
Just root ur W8 again as u did before
see boot animation without rebooting
I have a rooted Asus Nexus 7 the rooting was fine. And installing flash and other things like Busybox was fine. However when I try to do
sh bootbt
it gives me a loop error.
Loop Device exists
ioctl LOOP_SET_FD failed: Device or Resource busy
mount: No such file or directory
mount: No such file or directory
mount: No such file or directory
net.ipv4.ipforeward = 1
bootbt[23] : can't create /data/local/mnt/etc/resolv.conf: No such file or directory
bootbt[23] : can't create /data/local/mnt/etc/hosts: No such file or directory
chroot: cant execute 'bin/bash': No such file or directory
Shutting down Backtrack ARM for Xoom
failed: No such file or directory
failed: No such file or directory
failed: No such file or directory
failed: Invalid argument
then it goes back too
/storage/sdcard0/BT5 #
I have tired moding the bootbt but it only has one place that I know of to change the mounting. Unless I am missing something.
Yes I am a noob but I really would like to learn on how to fix this.
I did finally figure it out. But there are still some small issues to work out. Understanding how this is set up on the device and how to utilize BT on my nexus is the next best thing to do.
Sent from my Nexus 7 using xda app-developers app
[email protected]:/ $ export PATH=/data/local/bin:$PATH
[email protected]:/ $ su
[email protected]:/ # cd /sdcard/bt5
[email protected]:/sdcard/bt5 # sh bt
mkdir failed for /data/local/mnt, File exists
Loop device exists
mount: Device or resource busy
net.ipv4.ip_forward = 1
Ubuntu is configured with SSH and VNC servers that can be accessed from the IP:
eth0: No such device
[email protected]:~# exit
exit
Shutting down BackTrack ARM
failed: Device or resource busy
losetup: /dev/loop7: Device or resource busy
1|[email protected]:/sdcard/bt5 #
It doesn't shut down and even when I exit I end up with still accessing BT through android vnc. Any ideas?
Sent from my Nexus 7 using xda app-developers app
Can anyone tell me why it loops through localhost 1 then 2 and 3 all the way to 6. It doesn't kill any of the others out.
Sent from my Nexus 7 using xda app-developers app
i am getting the same error after typing sh bootbt. it d0oesnt open. i am using HTC one x. can anyone please help me to load backtrack. please.
Project thread created..
http://forum.xda-developers.com/showthread.php?t=2627255
install-or-mount-v0.8-gui.zip
Use this thread for help
Device List
Change Log
Sony Xperia P - CM11 4.4.2
Error with
Code:
handle_error mke2fs -qF -t $fs_type $IMGLOC/$IMGNAME
Needed another command.
ONDR4SH3K said:
Sony Xperia P - CM11 4.4.2
Error with
Code:
handle_error mke2fs -qF -t $fs_type $IMGLOC/$IMGNAME
Needed another command.
Click to expand...
Click to collapse
I figured that was gonna be an issue.
There are so many variants when it comes to device / busybox, I tried to get around that by including my own binary but fail on my part i guess...
Anyways.
Fix this line
Code:
LINE: 310 handle_error mke2fs -qF -t $fs_type $IMGLOC/$IMGNAME
to
Code:
handle_error mk2fs.ext2 $IMGLOC/$IMGNAME
userdelroot said:
I figured that was gonna be an issue.
There are so many variants when it comes to device / busybox, I tried to get around that by including my own binary but fail on my part i guess...
Anyways.
Fix this line
Code:
LINE: 310 handle_error mke2fs -qF -t $fs_type $IMGLOC/$IMGNAME
to
Code:
handle_error mk2fs.ext2 $IMGLOC/$IMGNAME
Click to expand...
Click to collapse
I rewrite with mke2fs -F $IMGLOC/$IMGNAME this working well.
But another problem with debootstrap. See attachment. So it's end of testing, isn't it?
ONDR4SH3K said:
I rewrite with mke2fs -F $IMGLOC/$IMGNAME this working well.
But another problem with debootstrap. See attachment. So it's end of testing, isn't it?
Click to expand...
Click to collapse
hmm...
I had that error initially also and I corrected it, probably should of documented what I fixed...
in the terminal type
uname
Is that a valid command?
change install-or-mount
Code:
LINE :333 handle_error debootstrap --no-check-gpg --extractor=ar --arch=armhf --foreign $DIST $MOUNT $MIRROR
to
Code:
handle_error debootstrap --no-check-gpg --extractor=ar --arch armhf --foreign $DIST $MOUNT $MIRROR
userdelroot said:
hmm...
I had that error initially also and I corrected it, probably should of documented what I fixed...
in the terminal type
uname
Is that a valid command?
Click to expand...
Click to collapse
Yes, it print Linux. I try another deboostrap. You use VERSION='1.0.40~ubuntu0.4'. So I find new one.
EDIT: New debootstrap with the same error.
ONDR4SH3K said:
Yes, it print Linux. I try another deboostrap. You use VERSION='1.0.40~ubuntu0.4'. So I find new one.
EDIT: New debootstrap with the same error.
Click to expand...
Click to collapse
Yea, it has to do with the line above I believe.
userdelroot said:
hmm...
I had that error initially also and I corrected it, probably should of documented what I fixed...
in the terminal type
uname
Is that a valid command?
change install-or-mount
Code:
LINE :333 handle_error debootstrap --no-check-gpg --extractor=ar --arch=armhf --foreign $DIST $MOUNT $MIRROR
to
Code:
handle_error debootstrap --no-check-gpg --extractor=ar --arch armhf --foreign $DIST $MOUNT $MIRROR
Click to expand...
Click to collapse
Sry, not working, but I deleted line with checking architecture and I got new error. See attachment.
EDIT:
I use:
sh install-or-mount -i -n linux.img -m /data/local/chroot -l /data/local -o precise -0
Rewrited mk2fs line in install-or-mount file to: mke2fs -F $IMGLOC/$IMGNAME
Deleted if [ -z "$ARCH" ] || [ -z "$HOST_OS" ]; then error 1 WHATARCH "Couldn't work out current architecture" fi line in deboostrap file
I think if I deleted this line, chroot not mounted correctly and bootstrap can't continue. So we need figure out, how fix architecture error.
I found this: http://uyirpodiru.blogspot.cz/2012/08/debootstrap-error-e-couldnt-work-out.html
ONDR4SH3K said:
Sry, not working, but I deleted line with checking architecture and I got new error. See attachment.
EDIT:
I use:
sh install-or-mount -i -n linux.img -m /data/local/chroot -l /data/local -o precise -0
Rewrited mk2fs line in install-or-mount file to: mke2fs -F $IMGLOC/$IMGNAME
Deleted if [ -z "$ARCH" ] || [ -z "$HOST_OS" ]; then error 1 WHATARCH "Couldn't work out current architecture" fi line in deboostrap file
I think if I deleted this line, chroot not mounted correctly and bootstrap can't continue. So we need figure out, how fix architecture error.
I found this: http://uyirpodiru.blogspot.cz/2012/08/debootstrap-error-e-couldnt-work-out.html
Click to expand...
Click to collapse
All the errors you are getting I did get at one point, I forgot how I fixed them, cause I was working on another project..
Ill do some testing, as I am working on the code right now.
Ill post when I find a solution to those..
Also before continuing I wanted to just let you know.
the debootstrap requires 'ar' archiver which I do not believe comes with CM.
busybox ar
That is why I included my own version.
I may have some work arounds tho so give me a few..
userdelroot said:
All the errors you are getting I did get at one point, I forgot how I fixed them, cause I was working on another project..
Ill do some testing, as I am working on the code right now.
Ill post when I find a solution to those..
Also before continuing I wanted to just let you know.
the debootstrap requires 'ar' archiver which I do not believe comes with CM.
busybox ar
That is why I included my own version.
I may have some work arounds tho so give me a few..
Click to expand...
Click to collapse
New vesion 0.2 in attachment. Is on the way.
EDIT: I put busybox from /sbin to /system/xbin and it looks like deboostrap working, but you have error with Release. Attachment no.3.
Thanks for helping.
is it normall ubuntu for desktop or Ubuntu phone version?
desktop
JFizDaWiz said:
desktop
Click to expand...
Click to collapse
I'm confused
Does touch work? Or do we need OTG cables
milestoneman said:
I'm confused
Does touch work? Or do we need OTG cables
Click to expand...
Click to collapse
You need root, and an android device.
No OTG cables..
It build's a chroot image on the device, with android running in the background.
You can run X windows (only LXDE currently because it is lightwieght) on the device and then vnc into it from anywhere, even a desktop...
There are other tools out there for this however, they require you to download the images. Which are usually between 1gig - 4gigs.
Instead of downloading the images, this creates the image and only downloads approximately 200megs for the packages.
Thanks for the explanation, sounds great
Sent from my Nexus 7 using Tapatalk
ONDR4SH3K said:
New vesion 0.2 in attachment. Is on the way.
EDIT: I put busybox from /sbin to /system/xbin and it looks like deboostrap working, but you have error with Release. Attachment no.3.
Thanks for helping.
Click to expand...
Click to collapse
Yea, crap, that was my bad, I should check where the system busybox is installed. It should default to /system/xbin
But some roms I guess put it in /system/sbin ? Possibly a typo on the rom developers part? LOL
Anyways, I will add code to correct this.
EDIT: How did you fix image 2?, as it should stop at the error in image type every time.
At any rate, image 2 error is because it can't find sh. in the install-or-mount/bin directory type this..
ls -l bin/
Make sure sh is symlinked to /system/bin/sh or /system/xbin/busybox if not that is causing the error in picture 2
it should look like this...
ls -l bin/
sh sh -> /system/xbin/busybox
If you don't see that do the following:
cd /data/local/install-or-mount
busybox touch bin-configs/sh
rm -rf .bin-configs-done
if you have something like that it should be ok, however to be safe since you moved you your busybox
from inside install-or-mount
rm -rf .bin-configs-done
Yes there is a DOT in front of bin-configs-done
I receive a permission denied error with debootstrap as well
Edit: crap I didn't see all the replies up there
Sent from my GT-N7105 using Tapatalk
Will it works on my armv7 single core tablet?
I fix it other way:
mount -o remount,rw /system
cp busybox /sbin /system/xbin
mount -o remount,ro /system
I hope that commands are fine.
I has no solution for fetch Release error, yet. I tried rewrite URL, but unsussesful.
Its in scripts folder line mirror_styles Release
Sent from my Xperia P using xda app-developers app
---------- Post added at 01:06 AM ---------- Previous post was at 01:00 AM ----------
Already testing on armv7 device dual core. OP must fix a few errors but you can try it.
Sent from my Xperia P using xda app-developers app
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