Attend XDA's Second Annual Developer Conference, XDA:DevCon 2014!
5,731,852 Members 41,516 Now Online
XDA Developers Android and Mobile Development Forum

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

Tip us?
 
HD2Owner
Old
(Last edited by HD2Owner; 5th October 2010 at 04:32 PM.)
#1  
HD2Owner's Avatar
Recognized Developer - OP
Thanks Meter 2063
Posts: 2,088
Join Date: Oct 2009
Location: Neuhausen am Rheinfall

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

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 \
 
HD2Owner
Old
#2  
HD2Owner's Avatar
Recognized Developer - OP
Thanks Meter 2063
Posts: 2,088
Join Date: Oct 2009
Location: Neuhausen am Rheinfall

 
DONATE TO ME
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
 
jjblaster3
Old
#3  
Retired Forum Moderator / Recognized Developer
Thanks Meter 77
Posts: 847
Join Date: Jan 2009
Location: Dar-es-Salaam
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..
Nexus 4 (Mako)Previous devices:
 
HD2Owner
Old
(Last edited by HD2Owner; 27th July 2010 at 07:43 PM.)
#4  
HD2Owner's Avatar
Recognized Developer - OP
Thanks Meter 2063
Posts: 2,088
Join Date: Oct 2009
Location: Neuhausen am Rheinfall

 
DONATE TO ME
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.
 
seeM_ZA
Old
#5  
Senior Member
Thanks Meter 52
Posts: 847
Join Date: Feb 2010
Location: Cape Town

 
DONATE TO ME
Wow, the time this is going to save me! (^^,) I haven't used it yet but I'm pretty sure I will. Thanks bro!
 
HD2Owner
Old
#6  
HD2Owner's Avatar
Recognized Developer - OP
Thanks Meter 2063
Posts: 2,088
Join Date: Oct 2009
Location: Neuhausen am Rheinfall

 
DONATE TO ME
enjoy......
 
af974
Old
(Last edited by af974; 28th July 2010 at 10:32 PM.)
#7  
af974's Avatar
Retired Recognized Developer / Retired Forum Moderator
Thanks Meter 1886
Posts: 4,940
Join Date: Jan 2008
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.
“You have to learn the rules of the game. And then you have to play better than anyone else.” ~ Albert Einstein
 
Laurentius26
Old
#8  
Laurentius26's Avatar
Recognized Developer
Thanks Meter 1151
Posts: 7,948
Join Date: Nov 2005

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

 
af974
Old
#9  
af974's Avatar
Retired Recognized Developer / Retired Forum Moderator
Thanks Meter 1886
Posts: 4,940
Join Date: Jan 2008
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 View Post
I'm sorry but I've read the intro 3 times and still don't know what it does.
“You have to learn the rules of the game. And then you have to play better than anyone else.” ~ Albert Einstein
 
HD2Owner
Old
#10  
HD2Owner's Avatar
Recognized Developer - OP
Thanks Meter 2063
Posts: 2,088
Join Date: Oct 2009
Location: Neuhausen am Rheinfall

 
DONATE TO ME
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).

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes


XDA PORTAL POSTS

Draw a Line and Let Your Device Do the Rest with LineitApp

Over the years, since evenbefore Android entered the scene, we have striven to … more

[APK] Chrome Beta 37 Brings First Traces of Material Design

With Android L on the horizon, it’s no surprise that Google’s … more

Immersive Mode on Unrooted Devices with GMD Full Screen Immersive Mode

Everyone likes screen real estate–no question about that. The … more

Android Wear App Review: EchoWear Song Search – XDA Developer TV

Yesterday on XDA Developer TV, Producer AdamOutler tore down a Samsung … more