Move files only if they are older then a certain date - Tasker Tips & Tricks

Hi!
I want create a tasker profile to move the whatsapp media files on SD card, but I want move only files that are older then 1 month.
How can I do?
I've create a tasker profile based on this tutorial:
https://www.youtube.com/watch?v=h86EZcdOlVk
it works but now how can I move only files that are older then 1 month?
Another question.... if inside a folder there are other folders, but I don't want move also the subfolders, how can I do?

Ok, for the second question the solution is simple: in List File action is enough add *.* in match
I'm still looking for a solution for the first question

If you are rooted, you can use the following command in tasker shell action;
find /FULL/PATH/TO/DIRECTORY/ -maxdepth 1 -type f -mtime +30
This uses the built-in find command.
The path must be defined from the point of view of root, so starting from / (e.g. to the download directory on the sdcard it would be /sdcard/Download/ - note the trailing slash)
max depth of 1 to not enter subdirectories
-type f defines look only for files
-mtime +30 modify date 30 days earlier than now.
"Good judgment comes from experience, and a lot of that comes from bad judgment." - Will Rogers

Related

Auto install of applications, folder making & regcodes.

I am starting this thread as there seem to be a lot of smart people on this forum that have a lot more knowledge about the BlueAngle device than I do and I hope that they will be able to come up with a better solution to my problem.
Problem:
1) Every time I update my device I need to run a lot of setup.exe to reload all of my software.
2) I have to create new folders under "Programs"
3) As I don’t like the default location of the links, I have to move the links into my new folders
4) I have to enter registration codes on a number of applications.
I would like to be able to automat this were possible.
I would like to share with you my solution in the hope that it helps you
and I would like it to be inproved by anybody who has a better understanding of this than me.
I have had to break this up into 3 parts and post then each seperatly.
Part 1:
Auto Install of applications based on a config file
http://forum.xda-developers.com/viewtopic.php?p=83120#83120
Part 2:
Dos add-on that allows me to make folders, copy and delete links from a batch file
http://forum.xda-developers.com/viewtopic.php?p=83121#83121
Part 3
Macro to enter the Reg codes of software.
http://forum.xda-developers.com/viewtopic.php?p=83122#83122
I base all of these on an application called "Splashphoto" which is a demo version and can be found on www.handango.com
(the link was to long to copy as it messed up the view)
You can find the files under:
ftp://xda:[email protected]/BlueAngel/Tools
I hope I can also add them as downloads.
Comments, sugestions and better ideas are welcome.
edited 18/01/04 Finished part 3 Macros
Auto Install of applications based on a config file
Problem:
1) Every time I update my device I need to run a lot of setup.exe to reload all of my software.
Now this has got on my nerves and I would like to share the solution that I have found in the hope that somebody SMART can simplify it.
I base this example on the application "Splashphoto" in the combination of the autorun.exe found in the Extended_ROM.
You can modify the concept to your own liking by changing the install location, the number of install files
**Note** the supplied config.txt files is set to turn the touch screen off when you install.
Thus it will ONLY work if your cab file does NOT come up with a message that requires you to confirm it by hand on installation.
Such as "written for older version.." or "Is already installed reinstall?.." You can change that as written below.
Although you are able to install software from your desktop onto any location of your device I have not found a switch for this and am already way out of my depth. I would think that there has to be some command line that that the Cab file reacts to. I hope somebody SMART can Work this part out.
I have added all the needed files to: AutoInstall_Beta.rar and have tried to go into a deep explanation based my own limited understanding.
ftp://xda:[email protected]/BlueAngel/Tools/Autoinstall_Beta/AutoInstall_Beta.rar
Step 1
You will need to download this file, extract it and copy it to your storage.
This example uses "\Storage\Install"
Step 2
You will need to modify the following key to insure that autorun.exe points to the correct config.txt file.
HKEY_LOCAL_MACHINE\Comm\AutoRunCFG
Old value: \Exteneded_ROM\config.txt
New Value: \Storage\Install\config.txt
Step 3
Run \Storage\Install\Autorun.exe from your device.
This file will run the commands found in Config.txt
In this case
A) disable Touch screen (may be also the phone)
B) install SlashPhoto
C) Enable Touch screen (may be also the phone)
D) Reboot
AutoInstall_Beta.rar has the following files:
1: SplashPhoto.2577.CAB
Extracted cab file from demo version of SplashPhoto found under:
http://www.handango.com/
2: AutoRun.exe
Found on the Extended_Rom.
This file will run the commands found in Config.txt
3: Config.txt
Modified config.txt file with the only entry being SplashPhoto.2577.CAB
4: TPDisable.exe
Application to disable the touch screen (may be Phone function) while installing applications also found on the Extended_Rom
5: TPEnable.exe
Application to Enable the touch screen (may be Phone function) while installing applications also found on the Extended_Rom
6: Ruler.ARM.CAB
This is a freeware application that turns your display into a Ruler.
It has been added as it comes up with a message that you need to confirm.
**Note** if you add this to config.txt you will hang and need to reboot your device.
After reboot you will find the application under start\Ruler and it will work.
**UPdate** By removing the commands TPDisable.exe and TPEnable.exe from the config,txt
you are able to confim the install dialog as the touch remains active.
Understanding of Autorun.exe:
Based on the info I have picked up there seems to be 2 versions of autorun.exe, one uses a config.txt and one not. (this one does)
After a new upgrade of your device autorun is executed to install the software based on the carrier that you have all of whih is found under \Extened_ROM hidden folder.
I took this Idea modified the config.txt and ran autorun in a new folder on my device to find out that it installed all the software in the Exteneded_rom and NOT out of the folder I was in nor with the config file that I had.
This was not what I wanted and did not make me very happy.
So after some playing around with regedit I found
HKEY_LOCAL_MACHINE\Comm\AutoRunCFG with the value of \Exteneded_ROM\config.txt
This I changed to \Storage\Install\config.txt,
re ran the autorun and it worked thus giving me Proof of concept.
Understanding of Config.txt
EXEC:\Storage\install\TPDisable.exe
CAB: \Storage\install\SplashPhoto.2577.CAB
EXEC:\Storage\install\TPEnable.exe
RST: Reset
Click to expand...
Click to collapse
It seems that with the command EXEC you can execute a *.exe file such as turning the touch screen on and off
It seems that with the command CAB you can install an application.
It seems that RST reboots the device.
What would be nice is to work out if you can force the application to install in a different location (Storage Card)
Finding your cab files.
Most applications that are installed from your desktop will create a folder and deposit the cab files in it.
If your device is connected it will kick of the setup routine that will ask you for the install location and then execute the cab file.
It is recommended that your install the software this way first to see if you get a message on your device.
If the install falls under the clean versions then you can remove it with the stettings\remove Programs and modify your config.txt
In our SplashPhoto Case the default location is:
"C:\Program Files\SplashData\SplashPhoto for PocketPC\SplashPhoto.2577.CAB"
I have also found cab files under
"C:\Program Files\Microsoft ActiveSync\Name_of_Application"
Working out which CAB is the correct one.
The file names might be ???.mips.CAB, ???.arm.CAB, ???.sa.CAB, ???.sh3.CAB or ???.Cef.CAB
I am in luck as in our case there is no choice
Which is just as well as I have no Idea what they mean.
Hint: I use ARM as it seems to work and I its my cpu type.
So what is left?
1) Solving the problem of cabs that come up with a message such as Ruler.ARM.CAB
Solved:
TPDisable.exe ----> Seems to disable the touch screen
TPEnable.exe ----> Thus this would enable the touch screen.
So for the Ruler.ARM.CAB that asks gives us the "written for other version" the following will work with out a reset
Config.txt
CAB: \Storage\install\Ruler.ARM.CAB
Click to expand...
Click to collapse
2) finding a switch to set the location of the install to say "\Storage Card"
3) A little cab that turns config location on and off.
Does a regedit of our key with out having to change it by hand.
And has a drop down Browse function to for my "\Storage\Install" folder
Or a better solution than mine!!!!
Next thing I will try to cover is batch copy and del of links
Gee I hope this all was not a waste of your time reading it.
Edit 18/01/04 added Open 1 as solved
Corrected text about what TPDisable.exe, TPEnable.exe (which is turn Touch screnn on/off (may be the Phone funtion)
Updated the section on Ruler.ARM.CAB
Dos add-on to make folders, copy and delete on Device
Problem:
2) I have to create new folders under "Programs"
3) As I don’t like the default location of the links, I have to move the links into my new folders
I base this example on the application "Splashphoto" in the combination of the autorun.exe found in the Extended_ROM
as well as freeware version of RemoteCommand.x86_15_English
I would presume that you have installed the SplashPhoto as discribed in:
http://forum.xda-developers.com/viewtopic.php?p=83120#83120
You can modify the concept to your own liking by changing folder structure of your programs menu,
the number of new folder you would like to make or the number of links you want to move.
I have added all the needed files to: CopyLinks_Beta.rar
ftp://xda:[email protected]/BlueAngel/Tools/CopyLinks_Beta/CopyLinks_Beta.rar
I have tried to go into a deep explanation based my own limited understanding.
Step 1
You will need to download this file, extract it and copy it to your desktop.
This example uses "C:\Install"
Step 2
You will need to extract the RemoteCommand.x86_15_English.zip in a location of your choice.
Step 3
You will need to install RemoteCommand.x86_15_English on your desktop
The program is setup.msi and found in the zip file
Step 4
You need to be connected to your device and activesync needs to be running
Step 5
You will need to run the CopyLinks.bat in a dos box
Start menu -> Run -> Cmd ->Enter
In the dos box
C: [Enter]
Cd c:\install [Enter]
CopyLinks.bat [Enter]
The batch file will
1) Create a new folder under your Programs folder of your device called applications
\Windows\Start Menu\Programs\Applications
2) Copy the splashphoto.lnk to this folder
\Windows\Start Menu\Programs\Applications\SplashPhoto.lnk
3) Delete the old Link
\Windows\Start Menu\Programs\SplashPhoto.lnk
CopyLinks_beta.rar has the following files:
1: RemoteCommand.x86_15_English.zip
Download freeware desktop version of RemoteCommand from
http://www.freewareppc.com/utilities/remotecommand.shtml
2: CopyLinks.bat
Batch file to create a new folder, copy the link and then delete the original link.
Understanding of RemoteCommand:
The install of remoteCommand gives you a new file called Rcmd.exe which is like a Pocket PC version of dos.
It is not executed on your pocket Pc so don’t even try to look for programs\dos.
It is a command line add-on executed in a dos window that allows you functions like copy, del md
from your desktop onto your Pocket PC or from your Pocket PC to your Pocket PC.
It adds itself in the path statement and thus a batch file can be executed from anywhere.
** Note ** You have to be connected to your device and ActiveSync needs to be running.
Understanding of CopyLinks.bat:
Rem Make a folder under programs
rcmd md "\Windows\Start Menu\Programs\Applications"
Rem Copy Links into that folder
rcmd copy "\Windows\Start Menu\Programs\SplashPhoto.lnk" "\Windows\Start Menu\Programs\Applications\SplashPhoto.lnk"
Rem Delete the old Link
rcmd del "\Windows\Start Menu\Programs\SplashPhoto.lnk"
Click to expand...
Click to collapse
Gee I hope I don’t need to go into that.
So what is left?
1) Would be nice if one would check "on error" as the dos screen sort of zips past.
2) Think it would be nice to add a "CopyLinks.bat /Install" and "CopyLinks.bat /Uninstall" option.
As we are moving the links and creating new folders the "remove program" will not pick it up.
This way one could put the links back were they belong before removing the software with "Remove programs"
Or a better solution than mine!!!!
Next think I will try to cover is batch Entering of Registration codes.
As always I hope this all was not a waste of your time reading it
Macro to enter the Reg codes of software
Macro to enter the Reg codes of software.
Problem:
4) I have to enter registration codes on a number of applications.
I base this example on the application "Splashphoto" in the combination with the
demo version of Pocket Controller-Professional by SOTI Inc found on
http://www.handango.com/ (Link was to long to copy)
or
http://www.soti.net/default.asp?Cmd=Products&SubCmd=PCPro
I would presume that you have installed the SplashPhoto as discribed in:
http://forum.xda-developers.com/viewtopic.php?p=83120#83120
I would presume that you have copied the link as discribed in:
http://forum.xda-developers.com/viewtopic.php?p=83121#83121
You can modify the concept to your own liking by recording your own macros, cutting them into one file and running them.
I have added all the needed files to: Macro_Beta.rar
ftp://xda:[email protected]/BlueAngel/Tools/Macro_Beta/Macro_beta.rar
I have not added the Pocket Controller-Professional due to its size.
Step 1
Download Pocket Controller-Professional
Go to www.handango.com
Browse by Operating System -> Windows Mobile™ Smartphone
in search add -> Pocket Controller-Professional
The rest should be clear
*or*
http://www.soti.net/default.asp?Cmd=Products&SubCmd=PCPro
Hit the [try] button
Step 2
Insure phone is connected, activesync is running
install Pocket Controller-Professional on your desktop
Step 3
Run Pocket Controller-Professional and connect to device
File -> connect
you should see you device on your screnn.
Step 4
Download the Macro_Beta.rar
Unpack it to c:\install
Step 5
in Pocket Controller-Professional
in menu Tools -> Macro -> Play [mouse click]
Browse -> choose C:\install\SplashPhoto.cmd [OK]
This will run the macro that:
1) Starts SplashPhot
(Start -> Programs > Aplications > SplashPhoto)
2) In SplashPhoto goes to Preferences and opens the keyboard
(Tools > Preferences > Keyboard)
Not very flash I know
Understanding of Pocket Controller
This is a very useful piece of software that will allow you to use your device on your Desktop.
You can take snap shots or films of your devices display. Great to prove your point with support.
It has a dos box that in this version does not support Batch files.
It has a file explorer of both desktop and device.
And what I need for this Macro recording.
(Personal pick I admit to it )
Soti if you read this post:
Qestion Is there much point in having my device on desktop if I cant even copy a text out of notepad into it?
Macro_beta.rar has the following files:
SplashPhoto.cmd
Understanding SplashPhoto.cmd
This is a text file that records the mouse event on a X/Y postion as well as other actions
That is also its downfall as you links will move as they are sorted in your folder.
Add to this that the start menu might be of a different hight.
The itemes in the start menu might have changed order
SplashPhoto.cmd
MouseEvent 0x0 0x2444 0x800
SleepEx 0xc8
MouseEvent 0x1 0x2444 0x800
SleepEx 0xd48
MouseEvent 0x0 0x3777 0xe0cc
SleepEx 0xc8
...........
Click to expand...
Click to collapse
So what is left?
1) Work out if there is a option to input in a text mode
The help is not much help.
My thoughts would be along the line of
Menu "Start"
SleepEx 0xc8
Menu "Programs"
SleepEx 0xc8
.....
Click to expand...
Click to collapse
I will e-mail support.
As always I hope this all was not a waste of your time reading it
you might check this thread out :
http://forum.xda-developers.com/viewtopic.php?t=9333&highlight=restorator
Thanks M4io
Did and did I ever go swimming!!! Have sent PM to SP for help.
Solved Part 1: CAB that need Touch screen input on install
Solved Part 1: CAB that need Touch screen input on install
Edit 18/01/04
added Open 1 as solved
Corrected text about what TPDisable.exe, TPEnable.exe (which is turn Touch screnn on/off (may be the Phone funtion))
Updated the section on Ruler.ARM.CAB (by removing the TP* commands out of config.txt the screen is still active
thus you can confirm with ok
Updated post is the original
http://forum.xda-developers.com/viewtopic.php?p=83120#83120
MDAIIIUser said:
did I ever go swimming!!!
Click to expand...
Click to collapse
System error s0c4 : Unknown expression :lol:
M4io
Try Help->search> Unknown expression > Find > Swim*
Will return, System error s0c4. <Grin>
The Short of that is after reading that post I had more questions than answers.
Finished Part 3
Macro to enter the Reg codes of software.
http://forum.xda-developers.com/viewtopic.php?p=83122#83122
I think I would simply use backup intead
i would like to know which .cab files MUST be kept in there....
Well the extrom should have the resco cabs to be able to hack the reg. (or what ever reg application you want to use).
If you don't have that then you cant change the keys to point to the new auto run as well as the new config.txt
As you will be installing of a different location the unlock cab is not needed but would be nice to have.
My smart suggestion
Hi MDAIII user,
Gr8 thing to be posted, but I follow a bit smarter way....
I use SPB Clone to take the Cloning image of all the device and after updating or after say if device got hard reset, I just restore that clone image...it restores all the data including the call history SMS and the installed softs with registration codes....
It also restores the extended ROM if one has unlocked it and the storage data too!!!!!
I hope, this information will be useful for all
Would a clone of a 1.22 Rom which is restored on a device that you just upddated to a 1.40 rom not sort of mess it up??????
Hi Man,
Logically yes, but I hv not encountered yet......

Building your own kitchen (Part 1)

Xplode has created a really great kitchen for us to play with and have made my custom ROM with this kitchen. I think it’s so easy that everyone is now able to create his own ROM.
However, I would like to go a bit further: Instead of just using the kitchen someone has made, I would like to take any of the ROMs (e.g. Helmi_BA_WM2k5_AKU3.5_v1.4.CF2 R2 by baniaczek) and use that as my kitchen starting point.
I’ve been doing a lot of reading on the subject and this is what I’ve figured out so far. It is by no means complete (or maybe even correct), but I can certainly use some help to get further. Below information is not something I found out on my own, but is based on what is mentioned in other postings in different forums and websites and picking apart the batch files I’ve found in several kitchens.
My intention of this posting is to make a simple how-to wiki-page so anyone could create his/her own kitchen and from that kitchen create the best possible ROM for their own use: Add the packages they use and leave out the stuff they don’t need. My plan is not that everyone will start publishing the ROM they have created from a decompiled ROM since there would simply be to many chefs
------------------
Step 1: Convert the nbf file to an nba file.
The ROM file that you load on your phone is always called nk.nbf. However, before you can do anything with this file, you’ll need to convert to to nk.nba. For this you use a tool called “xda3nbftool.exe” (yes, the one you used to set the operator with)
The command to do the conversion is: xda3nbftool.exe -x nk.nbf nk.nba 0x20040521
After a minute or so, you’ll have a file called “nk.nba” that is the same size as the original
Step 2: Brake the nk.nba file into separate files.
The nk.nba file consists of 2 parts and need to be split. To do this split, you’ll use the following command:
prepare_imgfs.exe nk.nba
After the program has run, you’ll have 2 files: “imgfs_removed_data.bin” (0.5 mb) and “imgfs_raw_data.bin” (variable size, but e.g. 27 mb)
Obviously, the part we’re interested in is the bigger file of the 2.
Important remark: For other HTC platforms (like HTC Uni), the above command is executed with an extra parameter “-nosplit”. However, if that parameter is added the output is unusable when performed on the Blue Angel ROM.
Step 3: Extract the modules
Now you have the raw image file, you’ll need to extract it and convert it back into modules.
To do this, you’ll first need to place a file called “recmod.exe” in the directory where the imgfs_raw_data.bin file is. The next step is to run this command:
viewimgfs imgfs_raw_data.bin
This command will create a directory called “dump” and it will extract all the files and many directories in this directory. You can have a look in this directory and will probably recognize a lot of the names if you have been building ROMs on someone’s kitchen.
Step 4: Dividing the modules into SYS and OEM
Before you can do anything with these modules, you’ll first need to convert them to packages. To do this, you’ll need a piece of software called “Package Tool” (from Bepe)
Start the program and select the dump folder via “File\Open”. Once selected, it will give some basic information about the dump directory like OS etc.
Now select Tools\Build Packages, but before you start the command, make sure you have the file map.txt in the same directory as the Package Tools application. That way, many of the GUID numbers will be translated to readable names.
This program will just run a few seconds. After it is complete, you’ll now find a SYS and OEM directory in the dump directory. If everything went well, then there will be just 1 file left: initflashfiles.dat. All other files and directories that were there before are now in the SYS or OEM directory.
However, in the real world…. My experience with several ROMs I’ve tried, the Package Tools program is unable to properly complete the process for a, to me, unknown reason and when it has run, the directory is far from empty. Under the section “[Missing Files]” there is the information about files that are missing.
When you look in this file, you’ll see that all the missing files are not really missing but are directories with the same names and extension of the files that where not placed in the correct sub-directories. All is not lost yet. You can manually move the files to the mentioned directories. Once you have completed this job, you should still end up with a virtually empty dump directory.
There is also a chance, like with fake WM6 ROM on this forum, that after you move all the files that are mentioned in the “missing files”-section but still end up with a long list of files in the dump directory. If that’s the case, then obviously something went wrong. However, at this point, I don’t know why this happens. However, it does look like it’s not a good starting point to build your own ROM with.
Remark: The “Missing files” section may also contain entries like this one:
19a7f28b-6bc7-4fe9-b060-76ae3a65ff72
19a7f28b-6bc7-4fe9-b060-76ae3a65ff72.rgu (File)
This indicates that the RGU file is missing. However, this is not a big problem. Just create an empty file with the name in the mentioned directory. Later on, the BuildOS.exe program will use the empty file to place the correct information in the file.
Step 5: Move the 2 directories
Now you have the correct SYS and OEM files, you’re on you way to start cooking. Move the 2 directories to a different directory. (like how it is in Xplode kitchen for example) and remove the dump directory
------------ Now, I’m at this point and here I’m a bit lost ------
Step 6: Adding and removing
Now you are at the part that was the whole point of the exercise: Adding and removing packages. Adding premade packages is not too difficult: With some luck the packages you want to add can be found in a different kitchen or is otherwise available. (Helmi and others wrote some documents on how to create packages, so refer to those).
Take the packages and place them in the OEM directory.
Taking out packages should be as simple as well: Just move the directories of packages you don’t want to a different directory (you could also just delete them, but you might need them again later). When removing packages, there is of course a big chance that you remove something that is essential for a part of the OS that you are not aware of, so removing bit and pieces is more trail, error and a bit of luck.
(continued on the next post)
Building your own kitchen (Part 2)
(continued from above port)
Step 6a: Changing the registry
After you’ve followed step 1 to 5, you also extracted the default.hv and user.hv and can be found in SYS\Metadata directory. This is the registry that also contain all the bits and pieces of registry files that are in the packages (the .RGU files)
To modify these 2 files, use these commands:
SET _FLATRELEASEDIR=.
rgucomp -o default.hv -nologo > default.txt
rgucomp -o user.hv -nologo > user.txt
Add "REGEDIT4" in the beginning of the files and leave a blank line at the end of the file. Save the file as UTF-16 or Unicode format. (Ultra-Edit is very good editor for this)
After you have made the changes, you will need to covert them back to a format your PPC will understand. Use these commands:
SET _FLATRELEASEDIR=.
copy default.txt boot.rgu
rgucomp -b
ren boot.hv default.hv
copy user.txt boot.rgu
rgucomp -b
ren boot.hv user.hv
---------------
The next steps are basically the reverse from the first 5 steps: After taking the files apart, they now need to be put back into place.
----------------------------------
Step 7: Building the ROM up again.
To start building the ROM now, the first command you execute is BuildOS.exe.
This program will create the dump directory again and will copy the directories and files from SYS and OEM to the directory.
Remark: There are several versions of BuildOS on this forum. Xplode’s kitchen is using a more advanced version where you can easily select the packages you want to be included (instead of moving them in and out the directory). This is a much nicer approach and will make ROM building as simple as installing a regular piece of software on your PC. However, to keep it a bit more simple for this how-to, I’m assuming an older version of BuildOS.exe that will not ask for any user input. (The more advanced version will require you to modify XML files to add packages. It’s not too difficult, but does require a bit more background knowledge)
Step 8: Building the file image system
Now you have all the files and directories that make up the ROM, you’ll need to convert it back into a file image.
For this, you run the program BUILDIMGFS (without any parameters)
Remark: For some reason, but this program is very memory intensive. If you don’t have that much internal memory, or your swap file is too small, this program is never able to completely run. I’ve noticed this problem on more then 1 computer. (I have the source code of this program and tried if I could do something about this. However, the program is heavily relying on a DLL called “cecompr_nt.dll” and I expect that that DLL is the culprit. I’ve been searching for more information on this DLL, but have not found anything on the internet about it)
Important note: If you have added to many modules to your own ROM, the BUILDIMGFS process may crash. So, if this happens, you’ll need to go back to step 6 and remove some of the packages you’ve added. If you go back to step 6, you’ll need to delete the “dump” directory first.
This program will convert the dump directory back in the file “imgfs_raw_data.bin”.
Once the program has run, the file should be something like 27 mb again.
If the program does not crash and runs to completion, there is still a chance that you have added to many packages to your ROM. When the BUILDIMGFS is ready, it will show the number of free sectors at the end of file system image. If it is showing something like ffffef that means that it’s too big, since it should show a small (hexadecimal) number like 1e or something like that.
Since/If you want to add as many packages as possible to the ROM (instead of installing them in RAM) you may need to repeat step 6, 7 and 8 several times. To make your life a bit easier, make a screen shot of the OEM directory and keep track which one worked and which one didn’t). If you go back to step 6, you’ll need to delete the “dump” directory first.
Step 9: Building the nk.nba
To create the nk.nba file again, you need the file you just created in step 8, but also the other file created in step 2: imgfs_removed_data.bin (maybe this file is created by buildimgfs??)
When you have these 2 files in a directory together, run this command:
MAKE_IMGFS nk.nba
Once the program is complete, the nk.nba file should be something 32 mb again.
Important remark: For other HTC platforms (like HTC Uni), the above command is executed with an extra parameter “-nosplit”. However, if that parameter is added the output is unusable when performed on the BA ROM.
Step 10: Convert the nk.nba back into nk.nbf
The final step of the process: creating the file that our BA understands: nk.nbf
This step is into 2 pieces:
A: Update the check-sum of the nk.nha file with this command:
XDA3NBFTOOL -c -u nk.nba
B: Convert the file:
XDA3NBFTOOL -x nk.nba nk.nbf 0x20040521
As you can see, the last parameter is the same as in step 1. This is some sort of password that is needed to encode the file with.
Now, the ROM is complete and you’re ready to flash it on your BA. I assume that you know how to do that part
** Can I use Notepad to edit and save ???
I got error here. When I try to do
To modify these 2 files, use these commands:
SET _FLATRELEASEDIR=.
rgucomp -o default.hv -nologo > default.txt
rgucomp -o user.hv -nologo > user.txt
Add "REGEDIT4" in the beginning of the files and leave a blank line at the end of the file. Save the file as UTF-16 or Unicode format. (Ultra-Edit is very good editor for this)
After you have made the changes, you will need to covert them back to a format your PPC will understand. Use these commands:
SET _FLATRELEASEDIR=.
copy default.txt boot.rgu
rgucomp -b
ren boot.hv default.hv
copy user.txt boot.rgu
rgucomp -b
ren boot.hv user.hv
************************************************************
C:\Scoter Kitchen\Utilities\TOOLS>rgucomp -b
Microsoft (R) RGUComp Version 1.0.000
Registry file processor and hive builder.
Copyright (C) 2004 Microsoft Corporation All Rights Reserved.
built: Nov 19 2004 15:17:13
importing registry file ".\boot.rgu"...
InitRegistry FAILED in file ".\boot.rgu" within a few lines of line 1.
BuildBootHive: (RGUComp) !ERROR failed importing ".\boot.rgu"
wmain: (RGUComp) !ERROR failed building BOOT hive
****************************************************
Now, I got errors on line 3 of default.rgu and line 154 of user.rgu ...
I didn't edit those line at all .. Why errors !!
I put REGEDIT4 in the first line of both default.txt, and user.txt and leave 1 blank line at the end.
I saved it into unicode.
Thank you for the info, will sure to give it a try when I have time later on...
Thank you very much! Will try to localize ROM using OEM Packages.
How to localize WWE ROM to other language?

Stop android studio creating a folder in home directory

I was wondering if it is possible to stop android studio creating the folder .AndroidStudio1.4 every time I run it. A way to change the location is also OK.
I asked this question on superuser and mentioned there I already succeeded in changing the locations of the subfolders. Now I just get an empty folder in my home directory.

[Task] Extract the contents of all zip files in a folder

What this does:
In the first two steps of the task, you can set the path to a folder containing all your zip files, and whether you want to overwrite existing extracted files.
It makes a folder called "extracted" inside the folder containing your zip files, and then extracts zip files into that folder.
File names containing special characters are handled automatically by this task.
Download the attached task, rename it to Unzip.tsk.xml and then import it into tasker.
This is very useful, how long did it take to make? 49 actions is a lot.
Xkinetism3 said:
This is very useful, how long did it take to make? 49 actions is a lot.
Click to expand...
Click to collapse
Sorry about the (extremely) late reply.
I don't remember how long it took, but it's nowhere near my longest tasks. This probably took up around 20 minutes. I'm not sure, though.
I made this one day when I wanted to extract 500+ zip files on my phone in one go, far from my computer.
Edit:
For something actually long made in Tasker, take a look at my OTA app for a custom ROM: https://drive.google.com/folderview?id=0B4q2Ez1yS1rKNVBIQU9KQmQtWEU
The tasker project containing the entire app is available in the "Source Code" folder. That tasker project is 400+ kb.
sh: <stdin>[1]: unzip: not found
Hi Sukarn, I'm a beginner in shell or any system language for that matter. When I try to run your XML, I'm getting the error, 'sh: <stdin>[1]: unzip: not found'... Did I do something wrong? I'm basically trying to include an unzip command in a Tasker factory app. Without manual intervention, the unzip will work for any Android mobile in which I install my APK?
Thanks,
Rajapriyan

Opening a file with a variable

I am having trouble opening text and pdf files when I try to open them by referring to them by a variable.
I start with a Read File task that reads the first file(/sdcard/dcim/qa5/data/1.txt), which contains the second file's address (/sdcard/dcim/qa5/data/2.txt).
This goes To Var %Trial1.
When I then start an Open File task, by referring to the file to open as %Trial1, I get an "error: Open File: file not found: /sdcard/dcim/qa5/data/2.txt".
I can open the file if I specify the literal path (/sdcard/dcim/qa5/data/2.txt), but not be referring to it as a variable.
The reason I cannot do the latter routinely, is that the second file's name will repeatedly change.
I suspect I am making a simple mistake and would appreciate any help.
I am using a Samsung Galaxy 5, SM-G900A running Android 6.0.1.
Thanks
Dan DKNC
How is the 1st file being written. There might be an extraneous character interfering. What you want to do does work, so we have to figure out where the problem comes from.
Maybe you could export the task as "Description to Clipboard" then paste that on pastebin.com. The problem with just posting it here is the forum software will change "n" to emojis affecting readability. That can be worked around if you prefer.
Your new account won't be permitted to post links, but you could just edit out the pastebin.com part of the url.
"Good judgment comes from experience, and a lot of that comes from bad judgment." - Will Rogers
Thanks for your reply.
Here is a little more detail:
Under Task Edit I have:
1. Read File
File
/sdcard/DCIM/qa5/Data/1.txt
To Var
%Trial1
IF
2. Open File
File
%Trial1
Mime Type
Optional
IF
-----------------------------
The error message I get is: "Error: Open File: file not found: /sdcard/dcim/qa5/data/2.txt
The text in the 1.txt file is: /sdcard/dcim/qa5/data/2.txt
The text in the 1.txt file is a simple text file saved in ASCII format.
I have left the Mime Type and If fields blank.
===================================================
Long press the task and it will be highlighted. Then in the 3-dot menu choose "export the description to clipboard". Share that as I mentioned above.
Also again, how is the text file written? On windows? By a script? Something else?
"Good judgment comes from experience, and a lot of that comes from bad judgment." - Will Rogers
Following your insights, I reviewed the contents of the 1.txt file in notepad on Windows and found there was a word wrap/carriage return hidden at the end of the path text. Once I took that out, the task worked correctly. Thanks.
Dan DKNC

Categories

Resources