FORUMS

Which OEM Would You Like to Help?

Most manufacturers have moments of greatness and moments of decadence, and in the past few years … more

Root T-Mobile S6/Edge on 5.1.1 Without Tripping Knox

If you purchase phones from a carrier, you may be no stranger to the difficulties … more

IonVR Coming Soon, HTC M9 Dev Edition Gets Android 5.1 – XDA TV

The HTC M9 Developer Edition has received Android 5.1. That and … more

Android 5.1.1 Omni ROM For Motorola Xoom

Back in Feb 2011, the Motorola Xoom became the first device to be sold with Android 3.0 … more

[TOOL 4 CHEFS] kitchen UPDATE ONLY NEW EXT batch file (EVK & OSK compatible)

2,166 posts
Thanks Meter: 2,199
 
By HD2Owner, Recognized Developer on 25th July 2010, 01:46 AM
Post Reply Subscribe to Thread Email Thread
only new ext-pkg's to a other kitchen (language import support is coming...).

a friend of mine wrote a little bat-file for me and i want to share it with you.
the creator insisted to call it bloody rudimentary but i think it's quite useful.
he wants to stay anonymous... :)

around two hours of brainwork (i remember the command for this... what was it again?) and notepad.exe to create this from scratch.

you only need to adjust the two paths at the beginning.
the batch searches for same packets (exact name matches) and ignores them.
a txt will pop up showing only the new packages.
you can edit this list (only delete pks but don't change entries).
save and close after you removed the lines you don't want to import.
batch will create a temp workfolder in c: (it will pop up once copying is finished).
at this point you can rename the folders (add *_photon_1.36 at the end for example)
and add missing language sub-folders.
if you are done, press any key at the cmd window and all the edited/renamed package folders will be moved to the ext-folder in the destination kitchen (_NewPackages folder).

example (if you want to update only new ext from 1.36 into 1.11 kitchen):
-kitchen1 (source kitchen) photon 1.36 htc
-kitchen2 (destination kitchen) photon 1.11 vodafone

tested and working with oskitchen1.31beta10 file-/folder-structure.

take this code and save it into a txt file. rename it to *.bat and adjust the paths.

Code:
@echo off
REM ------- EDITABLE SECTION

SET L_SOURCEPATH="X:\osKitchen Zero v1.31beta10_1.36SOURCE\Sources\Devices\HTC HD Mini\EXT Packages\HTC HD Mini Packages\"
SET L_TARGETPATH="X:\osKitchen Zero v1.31beta10_1.11DESTINATION\Sources\Devices\HTC HD Mini\EXT Packages\HTC HD Mini Packages\"

REM ------ END

SET L_WORKPATH=C:\SCRWORK
MKDIR %L_WORKPATH%
SET SCRFILE=%L_WORKPATH%\packets_source.txt
SET TGTFILE=%L_WORKPATH%\packets_target.txt
SET ACTFILE=%L_WORKPATH%\PKG2COPY.TXT
del %ACTFILE%>nul
CD %L_SOURCEPATH%
DIR /B>%SCRFILE%
CD \
CD %L_TARGETPATH%
DIR /B>%TGTFILE%
CD \
  FOR /F "delims=" %%I IN (%SCRFILE%)  DO (
  REM <--------------------------------------------------------------
  REM insert logic here to select packages i.e. package numbers
  FINDSTR /C:"%%I" %TGTFILE%>nul&& ECHO Exact name match. || ECHO "%%I">>%ACTFILE%
REM insert some better logic here duh!
  REM <--------------------------------------------------------------
  )
CLS
ECHO !!!! Remove packages you dont want to copy from list but RETAIN LINE FORMAT !!!!
ECHO !!!! Save and close List to continue!!!!
  start /w notepad %L_WORKPATH%\PKG2COPY.TXT
REM hier: Collect packages based on pkg2copy.txt
  CD %L_SOURCEPATH%
  FOR /F "delims=" %%I IN (%ACTFILE%)  DO (
  xcopy /E /Y /H /I %%I %L_WORKPATH%\PRECOPY\%%I
  )
CLS
ECHO !!!!Edit Folders now!!! Add langs etc.. press any key to continue and copy edited folders to destination (_NewPackages)
  REM <--------------------------------------------------------------
  REM i.E. delete... rename....
  explorer %L_WORKPATH%\PRECOPY\
  REM automate it duh!
  pause
  REM <--------------------------------------------------------------

REM !!!  ACTION - Copy from Precopy to Target Folder (Targetpath\_NewPackages)
 xcopy /E /H /Y /I %L_WORKPATH%\PRECOPY\*.* %L_TARGETPATH%\_NewPackages\
 rmdir /s /q %L_WORKPATH%
 explorer %L_TARGETPATH%
 CD \
Last edited by HD2Owner; 5th October 2010 at 04:32 PM.
 
 
26th July 2010, 04:32 PM |#2  
HD2Owner's Avatar
OP Recognized Developer
Flag Neuhausen am Rheinfall
Thanks Meter: 2,199
 
Donate to Me
More
tested now with ervius visual kichen.

works. hope y'all enjoy this batch file...

please leave a "thanks" if you like and use it.

thanks
26th July 2010, 07:09 PM |#3  
Retired Forum Moderator / Recognized Developer
Flag Dar-es-Salaam
Thanks Meter: 77
 
Donate to Me
More
wow this tool is awesome, its amazing how a simple batch file created by notepad can do so much functionality..
gonna use this right now
thanks..
27th July 2010, 07:38 PM |#4  
HD2Owner's Avatar
OP Recognized Developer
Flag Neuhausen am Rheinfall
Thanks Meter: 2,199
 
Donate to Me
More
my opinion:

many xda-chef's would use it if they would know about it's existence..

please help me to keep this thread alive so all chefs can see it better...

tell your favorite chefs to take a look at this thread. thanks.
Last edited by HD2Owner; 27th July 2010 at 07:43 PM.
27th July 2010, 08:04 PM |#5  
Senior Member
Flag Cape Town
Thanks Meter: 52
 
Donate to Me
More
Wow, the time this is going to save me! (^^,) I haven't used it yet but I'm pretty sure I will. Thanks bro!
28th July 2010, 02:06 PM |#6  
HD2Owner's Avatar
OP Recognized Developer
Flag Neuhausen am Rheinfall
Thanks Meter: 2,199
 
Donate to Me
More
enjoy......
28th July 2010, 10:27 PM |#7  
af974's Avatar
Retired Recognized Developer / Retired Forum Moderator
Thanks Meter: 1,889
 
More
I didnt try it yet but sounds like a very life saver tool, got one week sticky for let other chefs to check it.

Thanks for sharing.

@ mods: i will take care of unsticky it @ 04 August.
Last edited by af974; 28th July 2010 at 10:32 PM.
28th July 2010, 10:46 PM |#8  
Laurentius26's Avatar
Recognized Developer
Thanks Meter: 1,152
 
1010
Donate to Me
More
I'm sorry but I've read the intro 3 times and still don't know what it does.
28th July 2010, 10:54 PM |#9  
af974's Avatar
Retired Recognized Developer / Retired Forum Moderator
Thanks Meter: 1,889
 
More
As i said ,i didnt try it yet but for what i understood it updates packages in your EXT folder,example:

You have a 2.14 Leo Kitchen and you want update only NEW EXT packages from 3.04.

Quote:
Originally Posted by Laurentius26

I'm sorry but I've read the intro 3 times and still don't know what it does.

29th July 2010, 01:00 PM |#10  
HD2Owner's Avatar
OP Recognized Developer
Flag Neuhausen am Rheinfall
Thanks Meter: 2,199
 
Donate to Me
More
feel free to test it. no harm done.

source and destination folders stay untouched.

only the (not exact name match - packets that aren't already in the destination kitchen) packets you don't delete from the pop-up list will be copied to the destination kitchen ext folder (_NewPackages subfolder).
Post Reply Subscribe to Thread
Previous Thread Next Thread
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes