Script help - Android Q&A, Help & Troubleshooting

I'm trying to write a script to check the size of a directory on my sdcard. Playing around in terminal emulator I can't figure it out.
With this command.
du -h /storage/sdcard/backups
I get an error saying.
usage: du [-H | -L | -P] [-a | -d depth | -s] [-cgkmrx] [file ...
If I use -H
It gives me an output but it doesn't correlate with what's in the folder?
Am I doing something wrong?
Sent from my LG-D802 using Tapatalk

Still struggling here!
Sent from my LG-D802 using Tapatalk

Related

[Q] busybox and touch command

Who can help me with the syntax of the command touch?
Using the touch command as follows:
touch -d "01/01/2012 00:00:00" \ data \ data \ com.android.providers.telephony \ databases \ mmssms.db
the system outputs the following message:
unknow option - d etc ...
But Usage Command is:
touch [-c] [-d DATE] FILE [FILE]
BR
die-hard
Yeah, that's weird. It works as you typed it in a regular linux shell, but the busybox on my android gives me the same error. Might be a bug in busybox, or perhaps the date parser in the busybox version is less tolerant on the date format. It may be a config option as well. I know that date/time parsing is very "expensive" in libc and perhaps busybox just doesn't implement it by default.
10x bro,
I solved installing busybox 1.18.0 git
My busybox touch accepts dates in ISO format:
/ # touch -d '2011-1-1 23:1' x
/ # ls -l x
-rw-rw-rw- root shell 0 2011-01-02 00:01 x
Click to expand...
Click to collapse
Hi
I have CM 10.1 with busybox 1.20.2-jb installed. Touch binary doenst have -d option:
Code:
1|[email protected]:/sdcard $ touch --h
touch --h
touch: usage: touch [-alm] [-t time_t] <file>
-t option only accept date in unix timestamp format, but default format ( [[[[cc]yy]MM]dd]hhmm[.ss] ) needed for me.
Can anybody provide touch binary with -d option support or with -t option, that accept date in this format: [[[[cc]yy]MM]dd]hhmm[.ss]?
Second question:
Code:
[email protected]:/ $ awk 'BEGIN {print mktime("1970-01-01 00 00 00")}' <
-5454000
Why awk return -5454000 instead 0?
I tried update busybox to 1.21.0 version, it doesnt help.
memtew said:
Hi
I have CM 10.1 with busybox 1.20.2-jb installed. Touch binary doenst have -d option:
Code:
1|[email protected]:/sdcard $ touch --h
touch --h
touch: usage: touch [-alm] [-t time_t] <file>
-t option only accept date in unix timestamp format, but default format ( [[[[cc]yy]MM]dd]hhmm[.ss] ) needed for me.
Can anybody provide touch binary with -d option support or with -t option, that accept date in this format: [[[[cc]yy]MM]dd]hhmm[.ss]?
Second question:
Code:
[email protected]:/ $ awk 'BEGIN {print mktime("1970-01-01 00 00 00")}' <
-5454000
Why awk return -5454000 instead 0?
I tried update busybox to 1.21.0 version, it doesnt help.
Click to expand...
Click to collapse
Use the touch inside busybox, not the one that comes with the stock rom. Install Busybox from Stericson on your android device. It has also the -d option. You must run it as root, so check that you are superuser if using a script.
Code:
su
busybox touch -c -t YYYYMMDDHHMM[.ss] yourfile
hi,
i have the command working, but is it possible to keep the date and time of each file like "vid_yyyymmdd_hhmmss.mp4" to push it in the command for each file of the folder ?
Thanks.
nobody to help ???
diabolyk said:
hi,
i have the command working, but is it possible to keep the date and time of each file like "vid_yyyymmdd_hhmmss.mp4" to push it in the command for each file of the folder ?
Thanks.
Click to expand...
Click to collapse
You want to rename the files?
scandiun said:
You want to rename the files?
Click to expand...
Click to collapse
no, just change the time of creation of the file
diabolyk34 said:
no, just change the time of creation of the file
Click to expand...
Click to collapse
Don't understand exactly what you want to do.
scandiun said:
Don't understand exactly what you want to do.
Click to expand...
Click to collapse
I have found a command that working well but I should change the files one by one and I would like to find a command which is changing all videos files of a folder.
video name for example : vid_20170717_103251.mp4
need to extract date and time (in the name of the file) to put it in the command.
here the command which is working :
busybox touch -c -t 201707171032 *
and it changes all the files of the folder with the *...
I would like to extract the elements of the name from each file to give it its own date and time.
diabolyk34 said:
I have found a command that working well but I should change the files one by one and I would like to find a command which is changing all videos files of a folder.
video name for example : vid_20170717_103251.mp4
need to extract date and time (in the name of the file) to put it in the command.
here the command which is working :
busybox touch -c -t 201707171032 *
and it changes all the files of the folder with the *...
I would like to extract the elements of the name from each file to give it its own date and time.
Click to expand...
Click to collapse
Ok to do that you need a shell (bash) script. For example this code will get the date in the format you want, now you just need to read it from files and change the timestamp accordingly.
Code:
echo vid_20110717_103251.mp4 | sed 's/vid_*//' | sed 's;.mp4*;;' | sed 's/_//'
Test it online here: http://www.learnshell.org/
scandiun said:
Ok to do that you need a shell (bash) script. For example this code will get the date in the format you want, now you just need to read it from files and change the timestamp accordingly.
Code:
echo vid_20110717_103251.mp4 | sed 's/vid_*//' | sed 's;.mp4*;;' | sed 's/_//'
Test it online here: http://www.learnshell.org/
Click to expand...
Click to collapse
ok thanks for your help, your code is well working
Is it possible to keep all without the seconds (last 2 digits before .mp4) ?
And after that it should put the result in the command 'busybox touch -c -t result name_of_the_file'
and how to repeat that for each file named 'vid_xxxx' ?
thanks a lot
diabolyk34 said:
ok thanks for your help, your code is well working
Is it possible to keep all without the seconds (last 2 digits before .mp4) ?
And after that it should put the result in the command 'busybox touch -c -t result name_of_the_file'
and how to repeat that for each file named 'vid_xxxx' ?
thanks a lot
Click to expand...
Click to collapse
Go to the folder of the vids with "cd /sdcard/DCIM/Videos" or the appropriate and then execute this:
Code:
for i in * ; do touch -c -t "$(echo $i | sed 's/vid_*//' | sed 's;.mp4*;;' | sed 's/_//' | sed 's/..$//')" "$i" ; done
Make sure that in that folder there are only files that have the same exact filename pattern.
scandiun said:
Go to the folder of the vids with "cd /sdcard/DCIM/Videos" or the appropriate and then execute this:
Code:
for i in * ; do touch -c -t "$(echo $i | sed 's/vid_*//' | sed 's;.mp4*;;' | sed 's/_//' | sed 's/..$//')" "$i" ; done
Make sure that in that folder there are only files that have the same exact filename pattern.
Click to expand...
Click to collapse
in the folder there is img and videos but if i should put videos on a separate folder i can...
this code will do all i need ? (i think missing just "busybox" in the code)
extract the name of each file without seconds, put for each one the extraction in the command : busybox touch -c -t 201707181200 vid_20170718_120000.mp4 (for example of a file of today at 12 o'clock)
diabolyk34 said:
in the folder there is img and videos but if i should put videos on a separate folder i can...
this code will do all i need ? (i think missing just "busybox" in the code)
extract the name of each file without seconds, put for each one the extraction in the command : busybox touch -c -t 201707181200 vid_20170718_120000.mp4 (for example of a file of today at 12 o'clock)
Click to expand...
Click to collapse
This code will alter only files starting with vid:
Code:
for i in vid* ; do touch -c -t "$(echo $i | sed 's/vid_*//' | sed 's;.mp4*;;' | sed 's/_//' | sed 's/..$//')" "$i" ; done
You can try with or without busybox first and see which one works for you.
scandiun said:
This code will alter only files starting with vid:
Code:
for i in vid* ; do touch -c -t "$(echo $i | sed 's/vid_*//' | sed 's;.mp4*;;' | sed 's/_//' | sed 's/..$//')" "$i" ; done
You can try with or without busybox first and see which one works for you.
Click to expand...
Click to collapse
thank you very much i will try this in an hour to send you the answer if it's working or not
are you a developper ? cause it seems very hard to know all that...
i have another question, is it possible to put 1 or 2 less than the hour because of GMT ?
201707172000 should be 201707171900...
the answer of the command (not working) is :
touch: invalid date 'VID20170717_2000'
repeat for all lines....
i think it keep too many characters.
characters keeped should be 201707172000 (without "VID" and without "_")
how to delete that from the echo ?

[GSM/CDMA]EternityProject WebTop Mod -- Full Ubuntu Natty Narwhal on RAZR --

Welcome to the EternityProject's WebTop Modifications Thread for Motorola RAZR
What do we have here?
Ubuntu Natty. Ubuntu Natty. Ubuntu Natty. Is it enough?
What do we need?
1. A brain
2. A RAZR
3. .....Anything you want
Download:
WebTopMOD v0.2a (Natty) for Motorola RAZR: HERE
domain_policy.conf: HERE
sudoers: HERE
Easy INSTALL & STARTUP Scripts: HERE
Instructions:
1. UnBz2/UnTar the archive
2. Copy the IMG file on the root of your external sdcard
3. Install the Easy Scripts with bootstrap/safestrap recovery
4. Enjoy!
WebTopMOD Changelog:
Code:
v0.2a:
Image file now is 3.5GB, FAT32 friendly!
v0.2:
Updated to Natty Narwhal
Prelinked all libraries for faster execution
Added EternityProject branding
Installed base dev tools
The Gimp included
Fixed some errors in APT
Regenerated all the locales and fixed locale errors
....and many many other fixes :)
v0.1:
- First release.
EPRJWTScripts Changelog:
Code:
v0.1:
- First time setup included
- Added scripts for WebTopMOD easy boot
MANUAL First Time Setup:
Code:
adb push domain_policy.conf /tmp/
adh push sudoers /tmp/
adb shell
su
cp domain_policy.conf /etc/tomoyo/
cp sudoers /etc/
chown root:root /etc/tomoyo/domain_policy.conf
chown root:root /etc/sudoers
chmod 440 /etc/sudoers
reboot
Then start WebTop and execute this:
Code:
*********PRELIMINARY VERSION SCRIPT*********
su
/usr/bin/sudo -H -u adas bash
export DISPLAY=:0
xhost +
sudo -i
mknod -m640 /dev/loop94 b 7 94
mkdir /tmp/wtm
mount -o loop /sdcard-ext/eternitywtm.img /tmp/wtm
mount -o bind /proc /tmp/wtm/proc
mount -o bind /dev /tmp/wtm/dev
mount -o bind /dev/pts /tmp/wtm/dev/pts
mount -o bind /dev/shm /tmp/wtm/dev/shm
mount -o bind /proc/bus/usb /tmp/wtm/proc/bus/usb
mount -o bind /sys /tmp/wtm/sys
mount -o bind /tmp /tmp/wtm/tmp
mount -o bind /var/tmp /tmp/wtm/var/tmp
mount -o bind /var/run/dbus/ /tmp/wtm/var/run/dbus
mount -o bind /var/lib/dbus/ /tmp/wtm/var/lib/dbus
mount -o bind /sdcard /tmp/wtm/sdcard
mount -o bind /sdcard-ext /tmp/wtm/sdcard-ext
chroot /tmp/wtm /bin/bash
export DISPLAY=:0
xterm
The xterm window is acting on the new Maverick system.
Replacing WebTop UI with Lightweight GNOME (only panels and metacity) in v0.2:
Code:
eprj_lightgnome
Replacing WebTop with Full GNOME in v0.2:
Code:
eprj_fullgnome
Replacing WebTop UI with Lightweight GNOME (only panels and metacity) in v0.1:
Code:
kill $(ps -ef | grep 5000 | grep webtop-panel | cut -c10-15)
kill $(ps -ef | grep 5000 | grep apptray | cut -c10-15)
kill $(ps -ef | grep 5000 | grep metacity | cut -c10-15)
kill $(ps -ef | grep 5000 | grep xscreensaver | cut -c10-15)
sleep 3
gnome-panel &
metacity -c &
Replacing WebTop with Full GNOME in v0.1:
Code:
kill $(ps -ef | grep 5000 | grep webtop-panel | cut -c10-15)
kill $(ps -ef | grep 5000 | grep apptray | cut -c10-15)
kill $(ps -ef | grep 5000 | grep metacity | cut -c10-15)
kill $(ps -ef | grep 5000 | grep webtop-wallpaper | cut -c10-15)
kill $(ps -ef | grep 5000 | grep xscreensaver | cut -c10-15)
sleep 3
gnome-session &
Status:
The WebTop MOD FileSystem is ready.
Note that it is an alpha version so, not everything will work flawlessly and easily. If APT doesn't work, check /etc/resolv.conf.
Oldies:
WebTopMOD v0.1 (Maverick) for Motorola RAZR: HERE
Heheh!
So, I wanna do some questions to the community for making this to be better.
1. What do you expect from this release?
2. What are the programs you want to find on it?
3. What do you want to be able to do?
Thanks for your replies, guys!
The EternityProject Developer,
-kholk
Installed:
Full GNOME Environment
XTerm
OpenOffice.org Writer
Preview:
Click!
Great work!
1. What do you expect from this release?
A perfectly functional Ubuntu Maverick. Support for sudo, apt-get and such tings. I have never used webtop so I don't know what to expect. But a working Ubuntu as close as possible to the desktop edition would be a dream.
2. What are the programs you want to find on it?
Except from the default (maybe remove some unnecessary if space is needed, for example evolution (I think most android users use gmail) and gimp if it was still included in 10.10) I just want programs needed for correct function.
3. What do you want to be able to do?
Everything
Just a thought. Was 10.10 released for ARM?
Wondering if there are repositories available...
And why 10.10 and not 11.10? Is webtop using the same kernel as Android so we can't compile a newer one?
Im not exactly sure what I expect, I had a Bionic for 2 weeks prior to the RAZR, and its webtop mod basically made the Bionic a mouse and HDMI out to a tv a computer. Thats all I want, Santa.
You, good sir, have made my day!
1. What do you expect from this release?
I'd love the webtop be to much quicker. I think if you could introduce swap space, the speed could be increased greatly. I know there was a patch for that on the Bionic, so it would be excellent to see that on here to ensure it performs well.
2. What are the programs you want to find on it?
Is Mobile View possible? Also, I'd like to be able to compile code... can you maybe get Eclipse or Netbeans? Additionally, OpenOffice would be nice.
3. What do you want to be able to do?
I'm using my webtop primarily for taking notes in class, but I would absolutely love to have the ability to compile code so I can work on assignments on-the-go.
THANK YOU!!!
I'm installing Evolution and OpenOffice. I'll possibly install GIMP, too, but Eclipse and Netbeans are really big, so if anyone needs it, apt-get will work so you'll be able to install it on your own.
Anyway, please don't request big things, it should be a base system. Its size now (with Evolution) is 2GB. I expect it to grow to 2.5GB with OpenOffice.
How does it seem to be performing so far? Compared to the lapdock OS already installed?
This must be something different than what was out for the Bionic. That was just a couple megs and basically allowed webtop over HDMI without any adapters.
What you're referring to was a modification to Motorola's APKs for allowing WebTop over HDMI. This is a chroot into full Ubuntu Maverick through WebTop.
The link is broken... you added an extra w in the newworld part lol
kholk said:
What you're referring to was a modification to Motorola's APKs for allowing WebTop over HDMI. This is a chroot into full Ubuntu Maverick through WebTop.
Click to expand...
Click to collapse
Cool!
Soooooo....and talk to me as if Im an idiot, because, well, I am,..lol.....what is this then? And what are the advantages of this over Moto's webtop? And can I still use this over HDMI? Also if something goes horrifically wrong, will a nadroid back up made previously suffice in getting everything right again?
Every modification made to this system won't be reflected to the Motorola WebTop partition, so, if you totally screw up my Ubuntu Maverick installation, your device won't be screwed up: you just need to recopy the original WebTopMOD partition and... start over without problems!
Motorola WebTop is a modified Ubuntu system, with some Moto proprietary libraries and APT screwed up / disabled, so you cannot install anything over it.
WebTopMOD has got full APT so you can install everything you want or, well, everything available on Ubuntu repositories.
It's like having a "normal" (barely normal) PC Ubuntu Maverick installation.
I think the file is corrupt... wouldn't unzip for me. Downloading again...
your work is so awesome =)
what is a ubuntu maverick? googled it and nothing came up..
Ubuntu is a operating system like windows or OSX. Maverick is a version like Vista or Lion
See ubuntu.com or wikipedia
Sent from my awsome Motorola RAZR
link is broken =(
fighting4fun said:
link is broken =(
Click to expand...
Click to collapse
Remove one of the w's in newwwworld. It's spelled wrong in his link.
Someone has test it? i guess root is required, right?
proalius said:
Someone has test it? i guess root is required, right?
Click to expand...
Click to collapse
I'm pretty sure you need root. However, I downloaded the file twice now, and WinRAR wouldn't open with it. 7zip seems to work, but I'm a bit concerned that it might be corrupt. I'll post again if it works for me.
EDIT: File is corrupt. I can't open the img file. I've tried downloading and extracting on two different computers.

[GSM/CDMA] EternityProject GenTop -- Full Gentoo on your RAZR --

Welcome to the EternityProject's WebTop Modifications Thread for Motorola RAZR
...:: Unleash your Gentoo Power! ::...
What do we need?
A brain...... And willing to unleash the power of your device.... :°)
Download:
GenTop for Motorola RAZR - v0.2: HERE
domain_policy.conf: HERE
sudoers: HERE
Changelog:
Code:
v0.2:
- World has been updated (01/2012)
- Recompiled most things with NEON support
- Portage bug solved (can now emerge without tricks)
v0.1:
- First release
History:
GenTop for Motorola RAZR - v0.1: HERE
Instructions:
1. UnBz2/UnTar the archive
2. Copy the IMG file on the root of your external sdcard
3. Execute the scripts
4. Enjoy!
Script:
Only for the first time setup:
Code:
adb push domain_policy.conf /tmp/
adh push sudoers /tmp/
adb shell
su
cp domain_policy.conf /etc/tomoyo/
cp sudoers /etc/
chown root:root /etc/tomoyo/domain_policy.conf
chown root:root /etc/sudoers
chmod 440 /etc/sudoers
reboot
Then start WebTop and execute this:
Code:
su
/usr/bin/sudo -H -u adas bash
export DISPLAY=:0
xhost +
sudo -i
mknod -m640 /dev/loop94 b 7 94
mkdir /tmp/wtm
mount -o loop /sdcard-ext/eternitygentop.img /tmp/wtm
mount -o bind /proc /tmp/wtm/proc
mount -o bind /dev /tmp/wtm/dev
mount -o bind /dev/pts /tmp/wtm/dev/pts
mount -o bind /dev/shm /tmp/wtm/dev/shm
mount -o bind /proc/bus/usb /tmp/wtm/proc/bus/usb
mount -o bind /sys /tmp/wtm/sys
mount -o bind /tmp /tmp/wtm/tmp
mount -o bind /var/tmp /tmp/wtm/var/tmp
mount -o bind /var/run/dbus/ /tmp/wtm/var/run/dbus
mount -o bind /var/lib/dbus/ /tmp/wtm/var/lib/dbus
mount -o bind /sdcard /tmp/wtm/sdcard
mount -o bind /sdcard-ext /tmp/wtm/sdcard-ext
chroot /tmp/wtm /bin/bash
export DISPLAY=:0
xterm
The xterm window is acting on the new Gentoo system.
Replacing WebTop UI with Lightweight GNOME (only panels and metacity):
Code:
eprj_lightgnome
Replacing WebTop with Full GNOME:
Code:
eprj_fullgnome
Replacing WebTop UI with Lightweight GNOME (only panels and metacity -- manual):
Code:
kill $(ps -ef | grep 5000 | grep webtop-panel | cut -c10-15)
kill $(ps -ef | grep 5000 | grep apptray | cut -c10-15)
kill $(ps -ef | grep 5000 | grep metacity | cut -c10-15)
kill $(ps -ef | grep 5000 | grep xscreensaver | cut -c10-15)
sleep 3
gnome-panel &
metacity -c &
Replacing WebTop with Full GNOME (Manual):
Code:
kill $(ps -ef | grep 5000 | grep webtop-panel | cut -c10-15)
kill $(ps -ef | grep 5000 | grep apptray | cut -c10-15)
kill $(ps -ef | grep 5000 | grep metacity | cut -c10-15)
kill $(ps -ef | grep 5000 | grep webtop-wallpaper | cut -c10-15)
kill $(ps -ef | grep 5000 | grep xscreensaver | cut -c10-15)
sleep 3
gnome-session &
How to emerge packages:
Code:
cd /root
emerge --pretend --fetchonly MYEBUILD | sed -r '/^(ht|f)tp:\/\//{s/ +/\n/g;p};d' >urllist
xargs wget -nc -nd -P /usr/portage/distfiles/ <urllist
emerge MYEBUILD
rm -rf /usr/portage/distfiles/*
Replace "MYEBUILD" with your package's name.
Status:
Note that it is an alpha version so, not everything will work flawlessly and easily. If your network doesn't work, check /etc/resolv.conf.
The EternityProject Team Manager & Main Developer,
-kholk
EternityProject Team FTW! ^_^
Heh! When I promise something, I'll do. Unless you're a bad child.
Oh, forgetting to say and I didn't want to write that on first post, the GenTop image is intended to be used on a real MicroSD (first) ext4 partition if you want to install other things on it.
You know, Gentoo requires a lot of space when compiling
Great work. Looking forward to unleashing the Gentop!
I'll try and keep my extreme noobie questions to a minimum, but:
1. Do I need to root my phone?
2. So I paste these 3 (uncompressed) files onto the root directory of my SD card and open the 3 files using a file explorer. Does this open a terminal window where I type in the scripts you listed (similar to if I have a DOS window open on my PC?)
3. When I plug the phone into the lapdock, will I get a choice of whether it opens into webtop vs gentop?
Thanks.
1. Yup.
2. What a confusion... You should do the first time setup using a computer with ADB
3. No. It will simply boot WebTop, you'll replace it with GenTop later.
Thanks. I'll do some self directed learning before my next question
I'll start here: http://developer.android.com/guide/developing/tools/adb.html
Anyhow, I don't want to waste peoples time with too many overly basic questions. Your time is better spent developing this I still have to swap out my slightly defective phone, so probably won't get to installing this for about a week. In the mean time I'll read up on some of the basics...
Looking forward to try it out.
broken links got my hopes up here i miss gentoo
Oh, my bad, links fixed.
ArchTop would be the best option here IMHO. No need to compile-recompile especially on SD card which I believe will be affecting sd card life (lots of reads/writes cycles is bad for cards)
Link is not working for me...makes me a sad panda
Yup, I know. I'm really sorry for this, my head is giving me some bad jokes today.
Link re-fixed and tested. Now it works
Can you please explain how to create an ext4 partition to mount the gentop?
Unless you mean you want to get the IMG on an sdcard partition (in this case you should use fdisk and dd, and you can find more infos HERE) ....
....it's all written on first post.
Code:
export PATH=/data/local/bin:$PATH
[email protected]_spyder:/$ export PATH=/data/local/bin:$PATH
[email protected]_spyder:/$ su
[email protected]_spyder:/# /usr/bin/sudo -H -u adas bash
[email protected]:/$ export DISPLAY=:0
[email protected]:/$ xhost +
access control disabled, clients can connect from any host
[email protected]:/$ sudo -i
-bash: getprop: command not found
[email protected]:~# mknod -m640 /dev/loop94 b 7 94
mknod: /dev/loop94: File exists
[email protected]:~# mount -o loop /sdcard-ext/gentop.img /tmp/wtm
mount: you must specify the filesystem type
[email protected]:~# mount -o loop /sdcard-ext/gentop.img /tmp/wtm -t ext4
mount: wrong fs type, bad option, bad superblock on /dev/loop0,
missing codepage or helper program, or other error
In some cases useful info is found in syslog - try
dmesg | tail or so
[email protected]:~# mount -o loop -t auto /sdcard-ext/gentop.img /tmp/wtm
mount: you must specify the filesystem type
[email protected]:~# mount -o loop -t ext3 /sdcard-ext/gentop.img /tmp/wtm
mount: wrong fs type, bad option, bad superblock on /dev/loop0,
missing codepage or helper program, or other error
In some cases useful info is found in syslog - try
dmesg | tail or so
[email protected]:~# mount -o loop -t ext4 /sdcard-ext/gentop.img /tmp/wtm
mount: wrong fs type, bad option, bad superblock on /dev/loop0,
missing codepage or helper program, or other error
In some cases useful info is found in syslog - try
dmesg | tail or so
[email protected]:~# dmesg | tail
[ 1635.078918] HDCP: hdcp_ioctl() - QUERY 1335468
[ 1635.627441] 1 1429 679 0
[ 1636.224029] 1 850 234 1
[ 1636.291473] 1 850 234 0
[ 1636.829101] HDCP: hdcp_ioctl() - QUERY 1337226
[ 1637.243896] CPU1: shutdown
[ 1638.579315] HDCP: hdcp_ioctl() - QUERY 1338976
[ 1640.329528] HDCP: hdcp_ioctl() - QUERY 1340726
[ 1642.080322] HDCP: hdcp_ioctl() - QUERY 1342476
[ 1643.830505] HDCP: hdcp_ioctl() - QUERY 1344226
[email protected]:~#
No luck mounting the image.. any advice?
mount -o loop -t ext4 /sdcard-ext/gentop.img /tmp/wtm
That works on my device.
OR...
....fsck.ext4 -f /sdcard-ext/gentop.img
and retry to mount.
This looks awesome as well, but I'm having the same issue that was occurring with the ubuntop mod where my screen goes blank after a random interval of time.
It's obvious. The problem comes from Moto's XServer and I cannot do anything right now for this as I'm looking to solve some other things and make something else to be easier.
Anyway this is solvable with some working (and it WILL be solved!) and you can avoid this to happen clicking sometimes on the mobile view window!
Take your time! Although I think the recent RAZR update broke it for the original WTM for ubuntu on my phone too...
GenTop looks much better then ubuntu but like really noob I don't know lot of things there. Like how to install apps(libreoffice, jdownloader,...), how to mount external drive, etc. I have also issue with MX video player when I switch it on full screen and back. On gentop mobile view stop working. And on ubuntu WebTop falls at all. But maybe it is caused by nebtop.
I think it looks very promising but there is lot of work to be done. I'll be glad to help you, if there is something that I could do.
Thanks.
EDITn standard webtop with nebtop it works fine.
Sent from my XT910 using XDA App

[CLI] Bash-OSD

Bash-OSD allows you to display Bash outputs with Notify-OSD
Code:
#!/bin/bash
info=$(eval "$*" 2>/dev/null)
notify-send -t $((1000+300*`echo -n $info | wc -w`)) "$*" "$info" || exit 2
push the file to /home/phablet/
and run the file like so sh "name" "bash-command"
sample
sh send free -h
I'm planning on adding a cron hourly feature and implement Bash-OSD with the "free -h".
That way it'll notify you hourly of your system resources.
Sent from my LG-LS970 using xda app-developers app

Run bash script app

I' m trying to run a bash script.
I have a script and that script download 3 other scripts, and then, run them.
The first script, is the script where downloading 3 other scripts and running them.
The second script, is an example of the 3 other scripts.
So, which is the easiest way to do that ?
Is there any application where can do that ?
I use these scripts on android tv boxes.
The tv boxes are not rooted.
Also, i have an error with "wget: bad address"
Bash:
#!/bin/bash
wget http://domain.com/files/script_1.sh -O /sdcard/scripts/script_1.sh
sleep 1;
wget http://domain.com/files/script_2.sh -O /sdcard/scripts/script_2.sh
sleep 1;
wget http://domain.com/files/script_3.sh -O /sdcard/scripts/script_3.sh
sleep 1;
sh ./sdcard/scripts/script_1.sh
sleep 1;
sh ./sdcard/scripts/script_2.sh
sleep 1;
sh ./sdcard/scripts/script_3.sh
notify-send "Finish"
exit
Bash:
#!/bin/bash
wget https://domain.com/files/name.txt -O /sdcard/scripts/1.txt
cat 1.txt | cut -c10- | awk -F "/a/" '{print $1}' | awk -F "/word" '{print $1}' | awk 'NR == 2' > 1_.txt
a=$(cat 1_.txt) && sed -i "[email protected]\(.*/a/\).*\(/word/.*m\)@\1$a\[email protected]" /sdcard/scripts/file/filename1
sleep 2 ;
wget https://domain.com/files/name.txt -O /sdcard/scripts/2.txt
cat 2.txt | cut -c10- | awk -F "/a/" '{print $1}' | awk -F "/word" '{print $1}' | awk 'NR == 2' > 2_.txt
b=$(cat 2_.txt) && sed -i "[email protected]\(.*/a/\).*\(/word/.*m\)@\1$b\[email protected]" /sdcard/scripts/file/filename2
sleep 2 ;
find /sdcard/scripts/file/ -name "*.m" -printf '%T+ %p\n' | sort -r | xargs cat > /sdcard/scripts/file/filename.new
sleep 1 ;
sed -i '1i word' /sdcard/scripts/file/filename.new
sed -i '2i word' /sdcard/scripts/file/filename.new
sed -i '3i word' /sdcard/scripts/file/filename.new
sed -i '4i word' /sdcard/scripts/file/filename.new
domain.com is a web hosting site, so your http:// link is wrong - it needs to be your actual website
wget http://domain.com/files/script_1.sh -O /sdcard/scripts/script_1.sh
DSA said:
domain.com is a web hosting site, so your http:// link is wrong - it needs to be your actual website
wget http://domain.com/files/script_1.sh -O /sdcard/scripts/script_1.sh
Click to expand...
Click to collapse
Sorry, i forgot to say that the "domain.com" is an example. I use correct domain in my script. Just i hide it in post, because i wouldn't to share it.
The script in linux works fine.
May be the WGET what is implemented in your Android OS is faulty.
Here a workaround was shown.
jwoegerbauer said:
May be the WGET what is implemented in your Android OS is faulty.
Here a workaround was shown.
Click to expand...
Click to collapse
Didn't work. Same error
"wget: bad address"

Categories

Resources