Quantcast
Channel: xda-developers - Galaxy S II Android Development
Viewing all articles
Browse latest Browse all 397

[DOS Util][Symlink code generator script]

$
0
0
DOS Script for creating SYMLINK code for updater-script

After searching and searching I found an usefull script for auto symlink text generation. One can use it with kitchen....
I modified it and put together in a single batch file.
It grabs APK list in directory you want (lets say C:\cygwin\home\user\kitchen\WORKING_030413_160037\ preload\symlink\system\app)
and creates code and saves it to symlinks.txt
You can just copy-paste it in updater-script:

(rename sym_create.txt into sym_create.cmd)

Syntax is simple:
sym_create.cmd path_of_the_kitchen_working_directory_with_app_lis t


you get....

symlink("/preload/symlink/system/app/aplication_name.apk","/system/app/aplication_name.apk")

in symlinks.txt

Script:
Code:

@echo Listing APKs]
@echo .
@echo Choosen  path = %1
for /r %1 %%g in (*.apk) do echo %%~nxg >> list.txt

@echo .
@echo [Preparing links]
echo .
for /f "tokens=*" %%A in (list.txt) do (echo.symlink("/preload/symlink/system/app/%%~nA.apk","/system/app/%%~nA.apk"^); >> symlinks.txt
)


I hope it saves you some time!

Attached Files
File Type: txt sym_create.txt - [Click for QR Code] (1.2 KB)

Viewing all articles
Browse latest Browse all 397

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>