How to change date/time of multiple files? - General Questions and Answers

My device is rooted
I want to change the date of a folder in /root, and change all files and subfolders within that folder (thousands of files)
Is there easy way for me to do that. I'm a user not a developer
Thanks

Requires knowledge of Android shell commands, how to write a shell script and how to run such a shell script in Android.
Look inside here:
How can I change the date modified/created of a file?
Is there a way to change the date when a file was modified/created (which is shown in Nautilus or with the ls -l command)? Ideally I am looking for a command which can change the date/time stamps o...
askubuntu.com
You might use SH Script Runner to accomplish such a task.

jwoegerbauer said:
Look inside here:
How can I change the date modified/created of a file?
Is there a way to change the date when a file was modified/created (which is shown in Nautilus or with the ls -l command)? Ideally I am looking for a command which can change the date/time stamps o...
askubuntu.com
Click to expand...
Click to collapse
I'm a user
I tried using the Total Commander app, but it cannot modify files within folders. Manually editing such a large quantity is very time-consuming

Re-read my 1st post, what I've edited.

jwoegerbauer said:
Re-read my 1st post, what I've edited.
Click to expand...
Click to collapse
Thanks
But it's too hard for me

Up, help

My last 2 cents here:
Look inside here:
How to change the modification date (The Metadata) of multiple files?
I have a gallery folder with multiple images and videos, some of them has their modification date correct, and some of them has the month wrong. I want to make a script that will change all the fil...
unix.stackexchange.com

Done

Related

Bsk files?

So I've been going through the system folder to try and find items that could be symbolically linked to system/sd in order to save space for themes.
Anyone have any idea what the bsk files in /system/usr/share/bsk are for?
And another question, is there a command to get file specs while in terminal emulator?

Help me out! editing XML file..

I just recently checked out LauncherPro beta, and i really like it, my only problem is that the shortcut icons arent really what I like.
All I want to do it edit the default_workspace.xml so that the target APKs for the shortcuts will be Phone, Messages, Gallery, and Browser. I've already edited the icons to reflect that.
I already decoded the binary XML, I just need to know how to re-compile it to a binary XML after editing.
Sorry guys, I'm a complete noob when it comes to any kind of coding... and thanks in advance
edit: I already read Stericson's sticky, but I either just didnt get it, or didnt see anywhere to re-compile a decompiled binary XML.
If you have used AXMLPrinter to decode XML, then no, you can't compile it back. It's for looking into XML files only, not for editing them as text.
AFAIK my apktool is only one tool, which gives you possibility to edit XML files easily:
http://forum.xda-developers.com/showthread.php?t=640592
AXML is what I used, but re-editing it is no problem. I tried using apktool, but it gives me a "java" is not recognized as an internal blah blah message.. I've googled it, and made sure the environment variables were correct also, just updated Java a couple hours ago as well.
edit: and oh, thanks for the reply.. it's the only one I've gotten so far between here and droidforums so far.
I don't really know, why you don't have java command set in your PATH - I think Java installer does it automatically :-/ You could find java.exe file on your disk and:
Add it to PATH - there are many arts about this in the internet.
Edit apktool.bat file to call java command using full path, i.e. replace "java" with something like: ' "C:\Program Files\Java\java.exe" '.
Don't use apktool.bat, call Java directly: ' "C:\Program Files\Java\java.exe" -jar %WINDIR%\apktool.jar d somefile.apk outdir '

Motoactv TCX/GPX/KML Exporter (no root req.)

Hey,
out of need (and before learning about the excellent on-device TCX Exporter) I scripted a little Motoactv Exporter.
You do not need a rooted Motoactv, nor any knowledge other than how to run a shell script.
That also means Mac & Linux only.
What it does:
- It gets the latest (and only the latest) Workout from the Motoactv portal
- Uploads it to a one of the few online Motoactv CSV-converters
- Downloads the TCX-File
- Optionally: downloads GPX/KML file (all you gotta do is uncomment on line / delete one '#' in the script)
There's also support for uploading to the Trainingstagebuch.org website (by uncommenting 2 lines).
It's really useful when it's part of a cronjob.
E.g. auto-upload to Motoactv.com from the device that go along with hourly checks for new workouts by the cronjob -> upload to your favorite tracking website -> :victory:
I know the code is not exactly pretty, but here you go:
http://pastebin.com/apYKVpi5
Download the script as .txt (rename to sh):
http://pastebin.com/download.php?i=apYKVpi5
1. Open the file and replace the the Data after EMAIL= and PASSWORD= with your Motoactv-Credentials. These will be saved on your computer.
2. Go down and uncomment (delete the ' # ') if you want GPX/KML conversion. Default is TCX.
3. Save the file with a *.sh suffix.
4. Run the script.
(Run with Terminal (on Mac) by typing 'sh ' and then dragging the file onto the Terminal app and the hit enter.)
strava
Could one upload with Strava? Also how do "uncomment" a line?
Thanks
rr
[email protected] said:
Could one upload with Strava? Also how do "uncomment" a line?
Thanks
rr
Click to expand...
Click to collapse
Open the file and delete the # - symbol in front of the line you want to uncomment.
I don't use Strava, but with a little knowledge of curl you could probably easily upload it to Strava.
Edit: I'm working on it.
Other than that you could just upload the tcx file from the script to Strava:
Upload a file on your computer
You can upload files directly to Strava via our file uploader found here:
strava.com/upload/select.
You can upload the following file types as long as the file is 25MB or smaller:
GPX
TCX
FIT
Click to expand...
Click to collapse
strava help
Any progress on the Strava direct option? so do I replace "Trainingstagebuch.org with strava.com in the script? is it that simple? Do I take anything out?
Also in Mac (text edit) I don't see option to change the extension to .sh. Then I run the script from terminal?
Sorry I may be out my side of technical abilities and without your "hand holding" I am sunk.
Thanks
[email protected] said:
Any progress on the Strava direct option? so do I replace "Trainingstagebuch.org with strava.com in the script? is it that simple? Do I take anything out?
Click to expand...
Click to collapse
It's not that simple as the two platforms use different APIs. I spent quite some time figuring out how to upload to strava (my script can login so far) but for some strange reason the TCX files are declared as invalid when uploaded through the script. Strava announced a new API coming and I'd spent the time and afford on the new API rather than making it work with the old one.
[email protected] said:
Any progress on the Strava direct option? so do I replace "Trainingstagebuch.org with strava.com in the script? is it that simple? Do I take anything out?
Also in Mac (text edit) I don't see option to change the extension to .sh. Then I run the script from terminal?
Sorry I may be out my side of technical abilities and without your "hand holding" I am sunk.
Thanks
Click to expand...
Click to collapse
[/QUOTE]
Just save the file as exporter.sh or something. (File -> Save As)
Open "Terminal", type "sh " (including the space). Then drop that File (from Finder or your Desktop or wherever) on to Terminal and hit enter to run it.
..but: Actually Motoactv.com has introduced as mass-export tool -> motoactv.com/settings/export
So you can just bulk export them from Motoactv and upload them to Strava as an alternative to my script.
All it can really do w/out Strava support is automatically rip the last one and convert it for you anyway.

Add APK - repack system.img

I was looking for a similar topic but I did not find one. Refers to problems with running applications added to "system.img".
I bought UMIDIG S for my father-in-law. It is based on a mediatec chipset. Unfortunately, soft is tragic, and there is no full translation, so I decided to bury it a bit in "system.img".
I can easily install the file in Linux and make changes in it. I can delete applications, I can make changes in configuration files and "buikd.prop".
Unfortunately, all APK files were uploaded to "system.img" even though I set permissions 755 for directories, and 644 for directories. Although the files are root: root, after uploading such "system.img" none of these applications works for the phone. The system sees them and tries to load. Unfortunately, applications hang because of errors. The system informs that the application hangs, and does not load its window. The icons of these applications and the names do not appear either (applications have green robocik as icon, and domain name, e.g. com.android.clock ....)
I am asking for advice. How to add APK files to the unzipped "system.img" so that after packing and uploading to the phone there were no errors ???
Do you have found how add app in system.img?
It's all around, but you can replace apps with others. In the linux system, unpack the img, and mount them. Then you can freely rename files as well as move files within the .img mount point
I chose the applications or other files I did not need, and moved them to the directories (which I named my applications). If the application needed libraries, you also had to get files in a similar way, and place them in arm or arm64 directories.
Then prepared files "stuffed" with data, using the command DD. That is, dd if = (source file) of = (the recipient file at the system.img mount point).
Thanks for reply, so this only on Linux? For Windows there is something?
Markosv76 said:
Thanks for reply, so this only on Linux? For Windows there is something?
Click to expand...
Click to collapse
I do not know, I do not use Windows. Certainly you can in a similar way from BSD systems, probably from Android and MacOS. I read something that Microsoft can somehow support linux shell, but I do not know the details. You can always use some distribution that works with a pendrive.
Thanks, I will try again
Markosv76 said:
Thanks, I will try again
Click to expand...
Click to collapse
You can use Virtual Box to run a Linux distro inside Windows or you can try using Cygwin.
Sent from my LGL84VL using Tapatalk
jaroslawstrauchmann said:
I was looking for a similar topic but I did not find one. Refers to problems with running applications added to "system.img".
I bought UMIDIG S for my father-in-law. It is based on a mediatec chipset. Unfortunately, soft is tragic, and there is no full translation, so I decided to bury it a bit in "system.img".
I can easily install the file in Linux and make changes in it. I can delete applications, I can make changes in configuration files and "buikd.prop".
Unfortunately, all APK files were uploaded to "system.img" even though I set permissions 755 for directories, and 644 for directories. Although the files are root: root, after uploading such "system.img" none of these applications works for the phone. The system sees them and tries to load. Unfortunately, applications hang because of errors. The system informs that the application hangs, and does not load its window. The icons of these applications and the names do not appear either (applications have green robocik as icon, and domain name, e.g. com.android.clock ....)
I am asking for advice. How to add APK files to the unzipped "system.img" so that after packing and uploading to the phone there were no errors ???
Click to expand...
Click to collapse
did you find a solution to this? please reply if yes, I am having the same problem

How to overwrite system file with script

This script creates another file in the same directory, with the *same* name as the desired target file:
There are now two files in the same directory with the same name (???). The original file has an Android icon, and the new file has a text icon (Total Commander).
#!/bin/bash/sh
...
echo $RANDMAC > /config/wifi/mac.txt
I'm trying to create a script, and maybe eventually an app, to randomize the MAC address and host name.
Changing the MAC on my rooted Nextbook Ares 8 requires editing the mac.txt file. (The normal methods fail.)
Android 5.1.
John_83 said:
This script creates another file in the same directory, with the *same* name as the desired target file:
There are now two files in the same directory with the same name (???). The original file has an Android icon, and the new file has a text icon (Total Commander).
#!/bin/bash/sh
...
echo $RANDMAC > /config/wifi/mac.txt
I'm trying to create a script, and maybe eventually an app, to randomize the MAC address and host name.
Changing the MAC on my rooted Nextbook Ares 8 requires editing the mac.txt file. (The normal methods fail.)
Android 5.1.
Click to expand...
Click to collapse
may be you can post your whole script so that someone knowledgeable can help you
JumboMan said:
may be you can post your whole script so that someone knowledgeable can help you
Click to expand...
Click to collapse
Hi. The only part left out is what sets $RANDMAC, and it isn't relevant. If you echo to the screen, the format of the MAC address is the same as in the original mac.txt file.
I'm looking for an active Android tablet forum, if anybody knows of one.
I also posted this question at android.stackexchange.com. The post has gotten 16 views in two days - and most of those are mine, from visiting the page when I'm not logged in.

Categories

Resources