[Tool][Win] GOptimize v1.44 (BASH script for CYGWIN) - Android Software Development

GOptimize v1.44 (BASH script for CYGWIN)
...is a tool for optimizing PNG's (and JPG's) in Android Applications and recompressing its files.​
Help and Extra Help:
Code:
$ goptimize -he
#####################[ GOptimize v1.44 ]########################
---------------------------------------------------------------#
usage: goptimize [options] *.apk #
################################################################
GOptimize optimizes APK's with various tools .:. [email protected] #
################################################################
OPTIONS: #
-h Show Help #
-he Show Help + Extra Help (also accepts -hh) #
-p Optimize PNG's #
-9 Optimize 9-patch (*.9.png) PNG's while optimizing PNG's #
-m [1-16] Multi-Threaded PNG optimization; forces -p #
-zz Use ZopfliPNG instead PNGout (More info in Extra Help) #
-zo Use both PngOut + ZopfliPNG for max PNG compression #
-q Convert PNG's to 8-bit with PngQuant with minimum #
required quality [0-100]; -q0 to force conversion #
-j Optimize JPG's with jpegoptim; [0] or [75-100] #
-e [-|??] Clean resources of unneeded languages #
-a Recompress resources.arsc with CL[0-6] #
-d Recompress classes.dex with CL[0-6] #
-b Remove debug info from classes.dex for API[1-21] with #
baksmali/smali; -d[0-6] required; -d5 recommended #
-s [1,2] Force smali v1 or v2 when removing debug info #
-l Recompress libraries with CL[0-6] #
-r Recompress APK with CL[0-6] #
-R [+,-] Smart Recompression modes, read extra help... #
-k Keep only libraries for architecture: 1 armeabi #
2 armeabi-v7a #
3 mips #
4 mipso32 #
5 x86 #
-t Sign APK with Android test certificate #
################################################################
Extra Help #
---------------------------------------------------------------#
PNG Optimization: #
PNG optimization is lossless and tools used for it are: #
TruePNG, PngOut, ZopfliPNG and DeflOpt. #
#
ZopfliPNG (-z option info): #
[z] Use ZopfliPNG instead PngOut for better compression #
and saving few more kBs at cost of ~20% longer process. #
[o|b] Use both PngOut + ZopfliPNG for max compression #
at cost of extra ~20 longer process compared to [z] #
#
Converting PNG's to 8-bit with PngQuant (-q option) #
Converts PNG's to 8-bit with minimum required quality #
[0-100]. If quality of converted png is lower than #
minimum set threshold original png will be preserved. #
-q0 to force conversion; -q100 will skip almost all png #
Advanced MIN-MAX thresholds can be used [0-100]-[85-100] #
PngQuant defaults are -q 45-85; if max threshold not #
specified it is set to 100. #
#
JPG's optimization with jpegoptim #
[0] is lossless optimization and recommended. #
It does not recompress jpg's, it just strips all #
unnecessary info and optimizes huffman coding. #
[75-100] optimizes and recompresses jpg's. Level 95 is #
recommended, it will recompress unnecessary big ones #
and do lossless optimization on other jpg's. #
#
Cleaning resources of unneeded languages with ApkTool v2: #
[-] Remove all unneeded lang. from resources #
[??] Keep language with ?? language code #
You can keep multiple languages: -e 'hr en de fr' #
[-Ei] Addon option, example "-e 'hr' -Ei" will try #
to remove strings that are not required from #
required languages except the ones you're keeping. #
Result: even smaller 'resuorces.arsc'. #
If you're cleaning system apps you need to put framework #
files (framework-res.apk, etc...) in framework directory #
where apk is located, usually: "PlaceApksHere\framework" #
#
Compression Levels: #
Script always uses 10 passes for compression which #
guarantees maximum compression and does not impact #
decompression time. Script CL differ in fast bytes. #
CL(1) <=> 4 fb CL(4) <=> 32 fb #
CL(2) <=> 8 fb CL(5) <=> 64 fb #
CL(3) <=> 16 fb CL(6) <=> 128 fb #
You can also enter custom fast bytes number to be used #
for compression by entering fb[3-258] instead CL. #
Examples: -afb3 -dfb69 -lfb132 -rfb258 #
#
APK Recompression (-r option): #
As of v1.25 script uses Smart Recompressing i.e. it #
will leave files uncompressed in GOptimized apk that #
were uncompressed in original apk which is the best way #
for recompressing. #
-R+ Script will use Smart Recompression plus it will #
never compress file formats from below list even if #
they were compressed in original apk. #
-R- Script will disable Smart Recompress and store #
file formats uncompressed only if they are on below #
list. #
Following Android Asset Packaging Tool rules following #
list of file formats: #
"jpg jpeg jpe jfif png gif wav mp2 mp3 ogg aac mpg #
mpeg mid midi smf jet rtttl imy xmf mp4 m4a m4v 3gp #
3gp 3gpp 3g2 3gpp2 amr awb wma wmv zip lzma xz 7z lua #
pxp resS gltxt geo apf zi_" #
should never be compressed as they are already #
compressed formats or don't compress well. #
Most developers use this file formats for databases and #
compressing them would result with application errors. #
#
APK signing with Android test certificate #
Non system apk's and apk's you want to install after #
goptimization are needed to be signed. You need Java #
configured for signing. #
Alternative is to patch rom (core.jar) with #
Lucky Patcher not to verify signatures. #
#
Configure Java: #
To use -b or -e feature you need to enter java bin path #
in bin\.JavaPATH file which is usually #
"C:\Program Files\Java\jre[version number]\bin" #
#
GOptimize.cmd Default Options: #
You can edit GOptimize.cmd default options in #
bin\.DefaultGO file. GOptimize.cmd default options are: #
"goptimize -p -q50 -j0 -a0 -d6 -l6 *.apk;" #
################################################################
[+] Download: https://www.mediafire.com/folder/a2z9fpcr4131a
ApkTool: https://www.mediafire.com/folder/7vv4unj5diiu2
Smali (Baksmali): https://www.mediafire.com/folder/p4b4d31bzcuj0

Changelog:
2016-04-03 v1.44
Alowed use of Android API 1-23 for smali (23 is A6.0 MM)
Updated smali to v2.1.1
Updated ApkTool to v2.1.0
Updated pngquant with newest libpng v1.6.21 to v2.6.0
Updated jpegoptim with libjpeg v9b to v1.44
2014-12-22 v1.43
Don't optimize 9 patch png's by default as ApkTool can't read them and decompile apk after....
Alowed use of Android API 1-21 for smali...
Updated smali to 686cf35c8e9d7eedc5af5989671917719dfe320a (2014-11-07)
Updated ApkTool to 2bd1e595df7dd0743f972845bd5874e8db65cd95 (2014-12-18)
Updated pngquant with newest libpng v1.6.15 to v2.3.1 (cc39b47799a7ff2ef17b529f9415ff6e6b213b8f) (2014-12-12)
Updated jpegoptim with libjpeg v9a to v1.42 (c6fa01bd56e00b764560b5ad3e1436ef829279c0) (2014-12-22)
2014-07-16 v1.42
Don't overreduce colors on 9-patch pngs...
Recompiled zopflipng with O3 and some other optimizations for 30% speedup...
AutoRepair APK's with bad header...
Updated pngquant to v2.3.0 (8d21a4563e)
2014-06-26 v1.41
GOptimize now also optimizes 9-patch (*.9.png) png's; To disable optimizing of 9-patch pngs use -9 option...
Updated libpng to v1.6.12 and recompiled pngquant with it
2014-06-19 v1.40
Updated ApkTool to 2.0.0-RC1-a7b06f161b91dfdf985a717e9713dff5c46688b7 https://github.com/iBotPeaches/Apktool/commits/master
Updated pngquant to 2.2.0-860f9fb80fceac2998242ed7c5327da480964d24 https://github.com/pornel/pngquant/commits/master
Fix: Removed need for tr.exe. (although I still put it in bin just in case =)
Removed posterize because its inferior to pngquant. (-c option is now -q0-100 aka -q0)
Improved -Ei option to remove non-required strings from required languages except the ones you want to keep. Works on YouTube now...
2014-06-01 v1.39
Changed default action to "goptimize -p -q50 -j0 -a0 -d6 -l6 *.apk;" as pngquant is much better than posterizer and setting -q50 is actually pngquant quality 50-100 so it won't reduce colors more than once no matter how many times you apply it...
In v1.38 cleaning of unneeded languages no longer worked with newest ApkTool, so I needed to change my code to read from new ApkTool output and as I were doing it I rewrote code for required strings integration to work better...
Compiled with libpng-1.6.10 and lcsm-2.6 and updated pngquant to 2.2 git-917f5e796d9d96ce22af25808e49ff24e4190176
Updated jpegoptim to v1.4.1 git-33aabed13dc24e16292405b79a13305059ba453a
Updated ApkTool to 2.0.0-RC1-848f0d6b5fb195f73222177ee161e35e6a1e65a6
2014-04-30 v1.38
Updated all Cygwin tools
Compiled with libpng-1.6.10 and lcsm-2.6 and updated pngquant to 2.2 git-636151dd8e
Updated jpegoptim to git--e9dc8ef069
Updated zopflipng to zopfli-Hello71-e7778ddedb with bunch of fixes
Some script improvements...
2014-04-09 v1.37
Added ability to specify advanced MIN-MAX thresholds when using pngquant; it's defaults are -q 45-85
2014-04-09 v1.36
Added converting pngs's to 8-bit using PngQuant; -q [0-100] option
Updated smali v2 & ApkTool v2
smali v2 is now used as default instead v1
2014-03-14 v1.35
Updated smali2: 2014-02-02 smali 2.0.3-2d8cbfe6.7z
Updated ApkTool v2 to 2014-03-09 ApkTool-GitHub-1e3b66f9be
Some layout folders were not removed when cleaning languages on newer apps
GOptimize now displays which version of ApkTool is used for cleaning
2014-01-20 v1.34.02
Updated smali2 & baksmali2 to 2014-01-18 smali 2.0.3-4357de47
Updated ApkTool v2 to 2014-01-19 ApkTool-GitHub-a91e87bb04
2013-12-14 v1.34.01
Updated smali2 & baksmali2 to GitHub-eae0b0edbf
Updated ApkTool v2 to beta 8 GitHub-d5d03fe1e4
2013-11-27 v1.34
Fixed Bug where using a combination of -p, -j and -r options without -R would cause all files to be stored in apk without compression
Updated ApkTool v2 to beta 8 GitHub-a1ca5019d8
2013-11-17 v1.33
Default options changed to "goptimize -p -j0 -a0 -d5 -l5 *.apk;" because now it auto detects number of CPU cores for PNG optimization. -m option no longer needed.
You can also use shortcut -pczo for maximum png optimization instead -p -c -zo
NEW FEATURE: When cleaning unneeded languages use -Ei option to try to integrate only required strings from required languages to public strings to make even smaller resources.arsc; example "goptimize -e- -Ei *.apk"
-Ea is alternative apk repacking on cleaning unneeded languages if apk does not work after; you can use both -Eai; -Eia does the same...
Updated ApkTool v2 to 2.0.0-Beta8-d2fc74d984 (GitHub)
Updated smali v2 to v2.0.2
Added defluff to PNG optimization chain for maximum PNG structure optimization
Code improvements and cleanup...
2013-10-30 v1.32
FIXED Bug in Cleaning languages where optimizing multiple apps would cause required languages to accumulate i.e. detected required languages from above apk would not be removed from below/latter apks because I forgot to reset variables (or make them local).
Thanks @ct_moi for detection =)
2013-10-29 v1.31
Added some code to avoid where Median Cut Posterizer could make some small (<8kB) png's bigger than original.
I was GOptimizing JEFIT with -czo and freaked out when PNG Savings went -100kB, so I added some code to avoid that =)
Updated TruePNG binary to v0.4.1.1
2013-10-26 v1.30
Cleaning of unneeded languages works fine as long as ApkTool is able to rebuild apk; only problematic app which gets corrupted is GMail
Known language codes: af am ar be bg bn ca cs da de el en es et fa fi fr gu hi hr hu id in it iw ja kn ko lt lv ml mr ms nb nl pa pl pt ro ru sk sl sr sv ta te th tl tr uk vi zh zu
NEW Feature: -c; Pre-process PNG's with Median Cut Posterizer (posterize -d -Q 100; maximum quality) which makes PNG's more compressible and save 2-3X more kBs with almost none visual difference. However, keep in mind it's lossy optimization.
Updated ApkTool v2 beta 7 to GitHub-2ef25fe5e2 latest version
Updated smali 2.0.1 to GitHub-263083faed latest version
Updated TruePNG to 0.4.0.9
Replaced PNGZopfli with ZopfliPNG which is better tool.
Default GOptimize options are now in bin\.DefaultGO file for easier editing
-zo option is now default instead -zb; you can still use -zb, it does the same as -zo;
PNG Optimization code improvements
Java 1.7 or above required for -b and -e
Archives are RAR5 format and WinRAR5 is needed to extract.
2013-10-17 v1.27 beta 12
Changelog Here
2013-10-01 v1.26
Fixed -t i.e. signing not working in v1.25
2013-09-30 v1.25
Introduced Smart Recompression, read extra help.
Improved removing debug info, no -s option needed unless you want to strictly force smali v1 or v2
Reduced passes when recompressing from 16 to 11, difference is less <1kB on 16MB apk but now recompressing is faster...
2013-09-26 v1.24
Added jpe and jfif extensions to search list when optimizing jpg's which now is: jpg, jpeg, jpe, jfif.
Found and FIXED bug where files with no extension were not recompressed on -r option
ReWorked some compression code for easier reading and editing
Paths containing '!' (exclamation mark) will no longer be problem for script.
Minor code improvements...
You can now write -zo instead -zb if you like, it's easier for me =)
Updated smali v2 to 2.0b6 which can now remove debug info from some *****y classes.dex which smali 1.4.2 and 2.0b5 couldn't.
2013-09-25 v1.23
Added -j option to optimize jpg images in apk using jpegoptim
-j0 is lossless optimization and is recommended; it only strips unnecessary info from jpg (like which app is used to create it) and optimizes huffman coding
If you want to lower jpg's size even more, use -j95 which will recompress jpg's (and optimize) that are unnecessary big and only perform lossless optimization on others.
Every JPG compression guide agrees that compression level above 95 is pointless and creates unnecessary big jpg's.
I also left you choice to choose compression level between [75-100]
Reworked code for APK recompressing for easier adding of file extensions/formats that should always be uncompressed
Also added zip and lzma to that list
Improved reading Java bin path from bin/.JavaPATH
Removed "Packing PNG's" info line after optimizing pngs; don't worry, optimized png's are still packed in apk
2013-09-22 v1.22
Added -t option to sign apk with Android test certificate so you can install goptimized apk's (Java configuration required)
2013-09-13 v1.21
Further improved MT PNG optimization
Added -s2 option so you can try removing debugging info using smali/baksmali v2 beta if default v1.4.2 fails
ReWorked compression levels; Read Extra Help; -he or -hh option
Updated TruePNG to 0.4.0.8
Updated CygWin Tools
Lots of "can't remember right now" minor fixes
2013-08-15 v1.20
PNG optimization MultiThreading code optimized, should be ~30% faster now....
PNG optimization now runs with low priority so it does not interfere with other apps and can run in background (will not make flash player stutter anymore, and other apps lag), but it uses 100% CPU if you're not using it because of new MT code...
PNGZopfli code optimization
2013-07-12 v1.19
MultiThreading code optimizations
PNGZopfli updated to 1.2
I contacted author of PNGZopfli and TruePNG (http://x128.ho.ua) about some multithreading bugs in PNGZopfli for which I had to use sort of hack to work... It's now fixed in 1.2 and should be faster a bit...
Multiple ManualGO shells can be launched now as temp folder is named as apk...
Other minor fixes
2013-07-10 v1.17
NEW Feature: Removal of debug data from classes.dex using baksmali/smali; to use -b option you need to have JAVA installed and java bin path saved in /bin/.JavaPATH which is usually C:\Program Files\Java\jre[version number]\bin
Script should be failsafe, i.e. revert on default classes.dex if baksmali/smali outputs any error
You need to specify your roms API level for debug data removal. If you don't know it, use -b14. API LIST
NEW default options are: -m4 -a0 -d5 -l5
Switched -l and -k option as it seems more logical to use -l for libraries recompression and -k for keep only architecture...
Default options can be changed in /bin/.GOptimize file
NEW feature: PNGZopfli; use PNGZopfli instead PNGout in PNG optimizing chain with -zz option to save few more kB at cost ~20% more time; use both PNGout + PNGZopfli with -zb option for maximum kB savings on PNG optimizing at cost of extra ~20% more time needed for optimization
MultiThreading extended up to 16
TruePNG binary updated to 4.0.0.6
Lots of code optimization
2013-07-06 v1.15
Updated list of files that should always stay uncompressed for recompress option: png, jpg, jpeg, gif, wav, mp2, mp3, ogg, aac, mpg, mpeg, mid, midi, smf, jet, rtttl, imy, xmf, mp4, m4a, m4v, 3gp, 3gpp, 3g2, 3gpp2, amr, awb, wma, wmv.
2013-07-06 v1.14
NEW: MultiThreaded PNG optimization, made it faster x2-8 times dependable on how many cores your cpu have
NEW Features: Separate compression level for resources.arsc, classes.dex and libraries
New default options are "-m2 -a0 -d5 -l5" to use 2 threads for png optimization and recompress dex and libs with CL5 to make smaller apk as dex and libs are never accessed from apk, they are extracted on installation
In v1.14 default behaviour can be changed in /bin/.GOptimize
2013-06-21 v1.13
NEW Feature: Remove libraries not needed by your phone architecture... Why should you keep libraries for other architectures?
Example: Tapatalk_4.0.14.apk; By removing libraries not for LT18i (armeabi-v7a) APK size is reduced from 10.6MB to 7.88MB; and by further optimizing PNG's APK size is reduced to 7.49MB. That is 3.11MB of unnecessary data...
FIX: APK's were getting mis-flagged as corrupted on recompression
2013-06-04 v1.12
APK's containing zip comments were mis-flagged as corrupted after optimization
Script displays a message when no resources.arsc detected...
2013-05-30 v1.11
Script will skip PNG's with corrupted header (or invalid ones)...found in UHD 3.1 beta UxpNxtLockScreen.apk->default_wallpaper.png
2013-05-29 v1.10
Saved size on PNG Optimization is now better and correctly calculated
(On previous versions, saved size displayed was usually smaller than correct one and sometimes it displayed 0 when few kBs were saved)
Script now displays also percentage saved on PNG's
Added check for APK file to be correct type (ZIP)
Added check for APK to contain all files after optimization
BATCH scripts can now be run as administrator
FIXED: Stumbled upon error when GOptimizing eBay app, for some reason if not run as admin, some files were extracted with permission 000 which caused APK to miss some files
MISC Tweaks and Code optimization
2013-05-19 v1.04
"goptimize.sh *.apk" now works and optimizes all apk's in current directory
Treats files case-insensitive so ".PNG"'s also get optimized
Minor fixes and code rearrangement
2013-05-18
Made MiniCygwin_GOptimize_v1.02.7z which already contains all binaries and Cygwin tools. Just run GOptimize.cmd...

Latest Viber Test:
Code:
$ goptimize -j75 -pczo -d6 -b16 -s2 -l6 -k2 -e 'id' -Ei 'Viber v4.2.0.1733.apk'
[+] GOptimizing: <[ Viber v4.2.0.1733.apk ]>
|- Cleaning resources of unneeded languages...
| |- Detected required languages...: de (id)
| |- Removing unneeded languages...: Success!
| |- Attempting to assemble APK....: Success!
| +- Integrating required strings..: Success!
|- Extracting APK...
|- Optimized PNG's: 100% | Saved: 2458 kB (46%)
|- Optimized JPG's: 100% | Saved: 172 kB (42%)
|- Removing debug info with smali v2.0.3-2d8cbfe6: Success!
|- Recompressing classes.dex with CL(6)
|- Recompressing libraries with CL(6)
|- Removing libraries for: armeabi, x86
| + Keeping for: [armeabi-v7a]
+- Zipaligning APK...
19.08 MB (19542KB) => 9.33 MB (9558KB)
Note: You need to preserve 'id' language when goptimizing Viber...

Tested goptimize -j75 -pzo -q40 -e 'en hr' -Ei on CM10.2 A4.3
framework-res.apk 12.00MB -> 5.23 MB
Settings.apk 11.80MB -> 3.22MB
Mms.apk 3.34MB -> 1.67MB
Trebutech.apk 13.6MB -> 4.31MB

2014-06-26: Tested 9-patch png optimization on Facebook with 100kB extra savings and Tapatalk with 90kB extra savings. No FC's in Apps...

Reserved;

Reserved;

Reserved;

Reserved;

Reserved;

Tried by @Ainster on my ROM Pure Xperia HD for xperia Ray.. And as he reported, this makes a difference.. thanks for the tool., keep working..
Sent from my MT11i using xda app-developers app

Woah , this deserve more attention . it's a great stuff. Thank for this .
Another combination : Odex + GOptimze = Amazing speed :good:

Phillip Wu said:
Woah , this deserve more attention . it's a great stuff. Thank for this .
Another combination : Odex + GOptimze = Amazing speed :good:
Click to expand...
Click to collapse
Very true.. people are blind may be.. To not recognize this brilliant stuff.
Sent from my Xperia Neo V using xda premium

Jar files
Hi,
Thanks for the great tool, I've started playing yesterday with it and all is ok.
I've a question about *.jar files in system/framework to remove debug data from classes.dex.
I just try with framework.jar, rename it to framework.apk and it work.
It reduce the size from 4.24 to 3.30 Mo.
Push it tho the phone and it seems be ok.
Can I do that ?
For all jar files ?
Thanks - Eric

JAR files won't have images in them, but will perhaps compress a little.

As I wrote it's just to remove debug info, recompress classes.dex at -d5.

ct_moi said:
Hi,
Thanks for the great tool, I've started playing yesterday with it and all is ok.
I've a question about *.jar files in system/framework to remove debug data from classes.dex.
I just try with framework.jar, rename it to framework.apk and it work.
It reduce the size from 4.24 to 3.30 Mo.
Push it tho the phone and it seems be ok.
Can I do that ?
For all jar files ?
Thanks - Eric
Click to expand...
Click to collapse
ct_moi said:
As I wrote it's just to remove debug info, recompress classes.dex at -d5.
Click to expand...
Click to collapse
You can as long it's deodexed...
What script does for removing debug info is that it de-compiles classes.dex without debug info with baksmali and re-compiles it back with smali...
If there were none errors in the process it puts new classes.dex in apk (or jar file in your case)...
In early script version I was testing only for extension ".apk", later I added test with 7zip to check if file is zip compatible file but didn't remove the limit for .apk extension....
I will look into it for next update, maybe in a week... For incoming update I already improved multithreading for PNG optimization a bit and I reworked compression levels; as before I used 7zip compression levels which didn't differ much (1,2,3 gave same compression) because I always used 16 passes in compression which does not impact decompression, just maxes compression (and makes it slower).
New compression levels will differ in fast bytes.
Level 1 will use 4 fast bytes, L2 8fb, L3 16fb, L4 32fb, L5 64fb, L6 128fb...
An you will be able to specify custom fb (in range 3-258) like "-afb4" for using 4 fast bytes for compressing resources.arsc; "-a4" will use 32 fast bytes...
Apks with resources.arsc in size over 1024kB give nice results and start faster for me when compressed with "-a1" aka "-afb4"...
More INFO on 7zip Deflate compression levels...

Ok I make it for all the framework directory (jar and apk) and it's working great.
I've make also some apk in system, the bigger.
I try to make me a rom clean with only 1 language.
Next step will be to reduce size for unused drawable resolution.
Thanks - Eric

Hey can i flash this on my htc wildfire buzz with 2.3.7 rom?? This phone have very slow CPU and moreover got no gpu
Sent from my HTC Wildfire using xda app-developers app

sachoosaini said:
Hey can i flash this on my htc wildfire buzz with 2.3.7 rom?? This phone have very slow CPU and moreover got no gpu
Sent from my HTC Wildfire using xda app-developers app
Click to expand...
Click to collapse
FLASH??? It's not for flashing it's for use on PC.... It clearly writes in thread name [Tool][Win]...

Related

Stock GB Tweaks Thread

what are some tweaks everyone is using on their stock F/W's?
I have removed:
sony sync, setup and guides, some of the stock apps that i don't use
added:
bravia engine (might remove due to suspicious battery consumptions)
misc tweaks:
build.prop
changed vm heapsize to 48m
added windowsevent line
added scripts to change read_ahead to 3072 (works best with my sccard)
disabled a lot of start up apps
hitting around 1372 in quadrant and 36-37 in linpack
what are some other tweaks that can be added that others are using?
Fps uncap by z. Im also want to removed bravia, could you show me how to do it pls?
Sent from my X10i using XDA App
teddymild said:
Fps uncap by z. Im also want to removed bravia, could you show me how to do it pls?
Sent from my X10i using XDA App
Click to expand...
Click to collapse
i just restored system from a previous backup
Im hoping an easier
Way. Tks anyway.
Sent from my X10i using XDA App
- prevent lag after boot if you have lots of pictures and don't use the 3D gallery at all but QuickPic or another alternative: install Rescan Media Root from Market.
Another way would be to simply rename the gallery but then adding images to contacts doesn't work.
- free root explorer: Estrong File Explorer, the root mode didn't work in 2.1, but it does now!
- AppWidgetPicker still works in GB (display submenus for widget selection instead of a long list)
- turning off the button leds still works in GB:
#! /system/bin/busybox sh
DIR=$(cd /sys && find | grep brightness | cut -c 3- | cut -d : -f 1 | head -n 1)
LED=/sys/$DIR
LEDB=$LED:sled/brightness
echo 0 > $LEDB
exit
zorglub08 said:
- prevent lag after boot if you have lots of pictures and don't use the 3D gallery at all but QuickPic or another alternative: install "Rescan Media Root" from Market.
Another way would be to simply rename the gallery but then adding images to contacts doesn't work.
- free root explorer: Estrong File Explorer, the root mode didn't work in 2.1, but it does now!
- WidgetPicker still works in GB (display submenus for widget selection instead of a long list)
- turning off the button leds still works in GB:
#! /system/bin/busybox sh
DIR=$(cd /sys && find | grep brightness | cut -c 3- | cut -d : -f 1 | head -n 1)
LED=/sys/$DIR
LEDB=$LED:sled/brightness
echo 0 > $LEDB
exit
Click to expand...
Click to collapse
Can you share WidgetPicker with me? I can't seem to find it in the market.
@OP - i was just about to start a thread like this!!
For those of us that would like to keep the stock rom and apply tweaks ourselves we need people that know the tweaks to share them! Should we use autokiller/sysctl for example?
How about spare parts with compcache/[email protected]?
i look forward to hearing what is possible!
@op, i set VM to 64, but not sure if there is a noticeable difference!
Sorry, it's AppWidgetPicker, I added the link now.
svtfmook said:
what are some tweaks everyone is using on their stock F/W's?
I have removed:
sony sync, setup and guides, some of the stock apps that i don't use
added:
bravia engine (might remove due to suspicious battery consumptions)
misc tweaks:
build.prop
changed vm heapsize to 48m
added windowsevent line
added scripts to change read_ahead to 3072 (works best with my sccard)
disabled a lot of start up apps
hitting around 1372 in quadrant and 36-37 in linpack
what are some other tweaks that can be added that others are using?
Click to expand...
Click to collapse
Hi, what do u mean "windowsevent line" ?
as quoted here in step 13. < this is from a tweaks guide for 2.1
For the thread, if you are experiencing problems downloading from your browser:
d/l astro file manager from the market, go into preferences (more/preferences) and tick the "enable browser downloads" box. this is not my find, I read it earlier somewhere here on xda
I direct rooted my fw and flashed Bravia engine, so far so good.
Is there any way to flash FPS uncap for stock ROM without the need of a new ROM?
Edit : Already done.
some hacks on mine
build.prop
HTML:
ro.telephony.call_ring.delay=1000
ro.mot.eri.losalert.delay=1000
ro.min_pointer_dur=100
mot.proximity.delay=750
dalvik.vm.startheapsize=64m
dalvik.vm.heapsize=64m
windowsmgr.max_events_per_sec=260
ro.FOREGROUND_APP_MEM=5120
ro.VISIBLE_APP_MEM=6144
ro.SECONDARY_SERVER_MEM=8192
ro.BACKUP_APP_MEM=8192
ro.HOME_APP_MEM=8192
ro.HIDDEN_APP_MEM=21000
ro.CONTENT_PROVIDER_MEM=23000
ro.EMPTY_APP_MEM=25000
create a new file without extension on \system\etc\init.d\ folder and name it to S96sdcardspeedfix
HTML:
#!/system/bin/sh
if [ -e /sys/devices/virtual/bdi/179:0/read_ahead_kb ]
then
/system/xbin/echo "2048" > /sys/devices/virtual/bdi/179:0/read_ahead_kb;
fi;
if [ -e /sys/devices/virtual/bdi/179:8/read_ahead_kb ]
then
/system/xbin/echo "2048" > /sys/devices/virtual/bdi/179:8/read_ahead_kb;
fi;
if [ -e /sys/devices/virtual/bdi/default/read_ahead_kb ]
then
/system/xbin/echo "2048" > /sys/devices/virtual/bdi/default/read_ahead_kb;
fi;
create a new file without extension on \system\etc\init.d\ folder and name it to 99SuperCharger - use busybox 1.18.2 and script manager for this
HTML:
due limit of characters to post, download the file attached and delete .txt
check this to find out more about SuperCharger
enjoy some of the "hidden" hacks out there
there´s so much more....search
as an addition to rendiero's post, results will vary depending on your sdcard. try other settings like 1024m, 2048m, 3072m, 4096m
svtfmook said:
as an addition to rendiero's post, results will vary depending on your sdcard. try other settings like 1024m, 2048m, 3072m, 4096m
Click to expand...
Click to collapse
yap, you´re right i forgot to mention that thanks
Stating the obvious but remove apps that aren't needed!
SEMCSettings
Livewallpapers
etc etc.
here's a list of stock apps that i haev found to be ok when removed (results may vary, you may have something installed/using may depend on some of these)
device-monitor.apk - error reporting
OMAClientProvisioning.apk - part of sony sync
OmaDatasyncService.apk - part of sony sync
OmaV1AgentDownloadServices.apk - part of sony sync
PcCompanion.apk - pc companion installer
POBoxSknPink.apk - skin for japanese keyboard
POBoxSknWood.apk - skin for japanese keyboard
SecureClockJava.apk - not sure what it's for, but i have had no problem after removing it
SemcCrashMonitor.apk - more error reporting
Sync.apk - part of sony sync
SyncWizard.apk - part of sony sync
usersupport.apk - teaches you how to use your phone
SEMCsetupwizard.apk - initial setup, once you've done it, you don't need this anymore
LiveWallpapersPicker.apk - live wallpapers
MediaWidget.apk - media widget
MusicWidget.apk - music widget
Japaneseime.apk - japanese keyboard
koreanime - korean keyboard
removing the above will have no effect on timescape/facebook integration (that i have found, everything has been working fine for me)
@rendiero: for the 2 tweaks 99SuperCharger and S96sdcardspeedfix,can you write a step by step please?
Because i am little confuse with busybox and script manager.
On the tuto in the links for supercharger i write some value like 6,16, ...
For X10 the value are same or?
I have add same line on my build.prop now my phone stuck on Sony Ericsson logo.
I need to restore my backup
Are you on any moded Rom? Cause as I understood this thread is for stock one. That may cause some instability issues?
sent from tapatalk on my Domm's mod rom
@Renderio, thanks for those, i will stop and try these later! the build prop is easy enough but will test the other 2 as well
thanks dude - you rule! please (all) let us know if any 'other tweaks/performance apps' can be applied - OR if they clash with any already stated (tweak conflicts where 2 process are doing the same thing, for e.g setcpu & other cpu app both doing the same tasks - you get my meaning i hope!!)
Thanks
The last 2 may conflict with wolf's Rom.
To use those you need to know witch files you must delete/change on it.
sent from tapatalk on my Domm's mod rom

[TOOL] APK Multi-Tool previously called apk manager

I am currently working on a major update to the apk manager application as well and changing the name to APK Multi-Tool with some new added features and also to fix some issues with some code errors.
I am also changing a lot of the features as well since a lot of the code has been outdated for a while.
I have compiled the latest Version of APKTOOL which is 1.4.2 snapshot
Updates done so far in this new upcoming release
Updated APKTOOL to the latest snapshot
I have downloaded the latest changes to the source and compiled the latest Version of APKTOOL which is 1.4.2 snapshot
Updated Android SDK TOOLS
I have updates all the android tools to the latest Version from the android SDK revision 13
Included tools:
zipalign
adb
aapt
Updated Sox
Downloaded the latest Source and compiled to update Sox
Replaced roptipng v0.6.3 with optipng v0.6.5
I have removed roptipng v0.6.3 and replaced it with the latest Version of optipng v0.6.5 which I freshly compiled from source as roptipng was just v0.6.3 and there has been some major bug fixes to optipng
Roptipng is bloated with no compression when compiled also the modifications made to optipng that the original Arthur of roptipng are pointless as all they do is add directory recursion, which is redundant.
If you are interested in recursion, use this with the original optipng:
for FILE in `find . | grep "\.png"`; do optipng "$FILE"; done
If you want to do it in windonkey , something like this
for /r %FILE in "*.png" do optipng "%FILE"
(note: reason for it being shorter in donkey mode is that the "for" command is a
*LOT* weaker -- it can only search through the filesystem whereas the unix command iterates through anything you throw at it, therefore we need the extra command to go out and do the search).
New Added Features done so far in this new upcoming release
New Section to the command line
Batch Theme Image Transfer TOOL
Batch Theme Zipalign APK TOOL
Batch Theme optipng TOOL
These tools allow you to update/port your favorite theme pack from any rom to your Current Rom In use.
(Note: You do not have to worry about signing the apk files using this method as it is automated with the transfer Function)
Batch Theme Image Transfer TOOL
This tool makes the process of transferring images from one APK to another APK File of the same file making it easier to update themes or even transferring a theme update.zip of one ROM to another Rom allowing the porting of theme to be much faster.
(Note: You will have to manually replace the progress_horizontals.xml from the framework-res since this file is needed with Theme Changes)
Batch Theme Zipalign APK TOOL
This tool makes it easier to Zipalign all the apk files in your newly ported/updated theme pack.
Batch Theme optipng TOOL
This tool optimizes all the images in all of the apk files for the toolset to allow you to be able improve compression of the images.
TO DO LIST
Add new feature to Randomly Generate a new Key File for signing the apk files after modifying and recompiling of the apk files this will also allow of uploading to the android market as this added feature will allow you to sign apk files that you may of compiled without signing beforehand.
Modify the Signapk script to be compatible with the Randomly Generation feature in the works
and a few other added features are in the works as I am redesigning the application and rewriting a lot of the code to fix issues as well as some of the new features have broken parts as some features have been moved and broken some command line prompts.
Its nice to know this project is still alive.
A couple of suggestions:
To save the masses asking later on........
Add an option to install the required info into environment variables.
Maybe an option to install a registry edit to enable right click compile/ decompile. I created one myself, but I think you would do a better job
forum.xda-developers.com/showthread.php?t=935967
Other than that it looks like a complete tool.
Thank you very much.
I have released a Alpha Build of the APK Mulit-Tool on the main website feel free to test out the application and remember some features may be broken
BUG: I noticed this in the APK Man. before. After decompiling..compiling etc then finishing up and trying to quit option '24' in 5.0 and '27' in APK Multi-tool, it echos the text for when your compiling and keeping orig. files.
"In the apk manager folder u'll find.." not letting you exit the program. I have to force close it.
Anyway of being able to add in a command where you can create ur own private signing keys and an option to then sign ur apks with the private keys. I have a tutorial on how to make ur own and the commands to make and sign if ud like me to send it to u
Alpha 02 is now out.
I completely redesigned the layout of the app so it is totally different so there is some learning to be done.
thegoo said:
BUG: I noticed this in the APK Man. before. After decompiling..compiling etc then finishing up and trying to quit option '24' in 5.0 and '27' in APK Multi-tool, it echos the text for when your compiling and keeping orig. files.
"In the apk manager folder u'll find.." not letting you exit the program. I have to force close it.
Click to expand...
Click to collapse
I believe I fixed this bug now by adding a kill script to the exit
Papa Smurf151 said:
Anyway of being able to add in a command where you can create ur own private signing keys and an option to then sign ur apks with the private keys. I have a tutorial on how to make ur own and the commands to make and sign if ud like me to send it to u
Click to expand...
Click to collapse
the Private key gen script I am adding is a randomly key generator script I have done a while back and but sure feel free to send away
http://db.tt/nD4dePl5
Here's a link to a rff file that is written up with cmd oaths on how to created a private key and then how to sign with it. The script would need to be written by u but with what uve been able to do I'm sure it wouldn't be a problem and IMO would be very useful
Papa Smurf151 said:
http://db.tt/nD4dePl5
Here's a link to a rff file that is written up with cmd oaths on how to created a private key and then how to sign with it. The script would need to be written by u but with what uve been able to do I'm sure it wouldn't be a problem and IMO would be very useful
Click to expand...
Click to collapse
That way is overly complicated there is a way easier way
Code:
cd C:\openssl\Bin
set RANDFILE=.rnd
openssl genrsa -out key.x509.pem 2048
openssl req -new -key key.x509.pem -config “C:\OpenSSL\ssl\openssl.cnf” -out request.pem
openssl x509 -req -days 99999 -in request.pem -signkey key.x509.pem -out certificate.pem
openssl pkcs8 -topk8 -outform DER -in key.x509.pem -inform PEM -out key.pk8 -nocrypt
this will generate a key used for signing with a modified signer script which I use besides the one in the application as with this signing method requires a modifications from the
signer.bat
Code:
@echo off
if (%1)==(1) goto next
if (%1)==(2) goto log
COLOR 0A
echo Signing "%~n1"
java -Xmx%heapy%m -jar signapk.jar -w testkey.x509.pem testkey.pk8 "../place-apk-here-for-signing/%~n1%~x1" "../place-apk-here-for-signing/signed.apk"
del /S /Q "../place-apk-here-for-signing/%~n1%~x1" > nul
ren "../place-apk-here-for-signing/signed.apk" "%~n1%~x1"
goto quit
:next
COLOR 0C
cd ..
type log.txt
PAUSE
goto quit
:log
mode con:cols=24 lines=2
echo Leave this open for 10s
adb logcat >> adblog.txt
:quit
raziel23x said:
That way is overly complicated there is a way easier way
Code:
cd C:\openssl\Bin
set RANDFILE=.rnd
openssl genrsa -out key.x509.pem 2048
openssl req -new -key key.x509.pem -config “C:\OpenSSL\ssl\openssl.cnf” -out request.pem
openssl x509 -req -days 99999 -in request.pem -signkey key.x509.pem -out certificate.pem
openssl pkcs8 -topk8 -outform DER -in key.x509.pem -inform PEM -out key.pk8 -nocrypt
this will generate a key used for signing with a modified signer script which I use besides the one in the application as with this signing method requires a modifications from the
signer.bat
Code:
@echo off
if (%1)==(1) goto next
if (%1)==(2) goto log
COLOR 0A
echo Signing "%~n1"
java -Xmx%heapy%m -jar signapk.jar -w testkey.x509.pem testkey.pk8 "../place-apk-here-for-signing/%~n1%~x1" "../place-apk-here-for-signing/signed.apk"
del /S /Q "../place-apk-here-for-signing/%~n1%~x1" > nul
ren "../place-apk-here-for-signing/signed.apk" "%~n1%~x1"
goto quit
:next
COLOR 0C
cd ..
type log.txt
PAUSE
goto quit
:log
mode con:cols=24 lines=2
echo Leave this open for 10s
adb logcat >> adblog.txt
:quit
Click to expand...
Click to collapse
U r correct but in my case I sign with my private keys to go into the market so when I make updates the key name can't be random or the market will not take it.
Papa Smurf151 said:
U r correct but in my case I sign with my private keys to go into the market so when I make updates the key name can't be random or the market will not take it.
Click to expand...
Click to collapse
Well the script above was just a example script there will be some changes to it to tie the keys to the applications so that when you sign the apk files they will have a key assigned to them
raziel23x said:
Well the script above was just a example script there will be some changes to it to tie the keys to the applications so that when you sign the apk files they will have a key assigned to them
Click to expand...
Click to collapse
Sounds great to me I can't wait
I am getting this error, can anyone help?
--------------------------------------------------------------------------
|Tue 10/18/2011 -- 14:48:48.53|
--------------------------------------------------------------------------
'mode' is not recognized as an internal or external command,
operable program or batch file.
java version "1.6.0_27"
Java(TM) SE Runtime Environment (build 1.6.0_27-b07)
Java HotSpot(TM) Client VM (build 20.2-b06, mixed mode, sharing)
Could Not Find C:\Documents and Settings\WirelessZone\Desktop\Apk_Multi-Tool\place-apk-here-for-modding\../place-apk-here-for-modding/signedSystemUI.apk
Could Not Find C:\Documents and Settings\WirelessZone\Desktop\Apk_Multi-Tool\place-apk-here-for-modding\../place-apk-here-for-modding/unsignedSystemUI.apk
I: Baksmaling...
I: Loading resource table...
I: Loaded.
I: Loading resource table from file: C:\Documents and Settings\WirelessZone\apktool\framework\1.apk
I: Loaded.
W: Could not decode attr value, using undecoded value instead: ns=android, name=theme, value=0x010300a3
W: Could not decode attr value, using undecoded value instead: ns=android, name=theme, value=0x010300a3
W: Could not decode attr value, using undecoded value instead: ns=android, name=theme, value=0x010300a3
W: Could not decode attr value, using undecoded value instead: ns=android, name=theme, value=0x010300a3
W: Could not decode attr value, using undecoded value instead: ns=android, name=theme, value=0x010300a3
I: Decoding file-resources...
Exception in thread "main" java.lang.ArrayIndexOutOfBoundsException: Coordinate out of bounds!
at sun.awt.image.ByteInterleavedRaster.setDataElements(ByteInterleavedRaster.java:529)
at java.awt.image.BufferedImage.setRGB(BufferedImage.java:971)
at brut.androlib.res.decoder.Res9patchStreamDecoder.drawVLine(Res9patchStreamDecoder.java:99)
at brut.androlib.res.decoder.Res9patchStreamDecoder.decode(Res9patchStreamDecoder.java:58)
at brut.androlib.res.decoder.ResStreamDecoderContainer.decode(ResStreamDecoderContainer.java:34)
at brut.androlib.res.decoder.ResFileDecoder.decode(ResFileDecoder.java:100)
at brut.androlib.res.decoder.ResFileDecoder.decode(ResFileDecoder.java:68)
at brut.androlib.res.AndrolibResources.decode(AndrolibResources.java:132)
at brut.androlib.Androlib.decodeResourcesFull(Androlib.java:93)
at brut.androlib.ApkDecoder.decode(ApkDecoder.java:98)
at brut.apktool.Main.cmdDecode(Main.java:120)
at brut.apktool.Main.main(Main.java:57)
Click to expand...
Click to collapse
I have my paths set up like this.
C:\Program Files\Java\jdk1.6.0_27\bin;C:\Program Files\Java\jdk1.6.0_27\jre\bin;C:\Program Files\Android\android-sdk;C:\Program Files\Android\android-sdk\platform-tools;C:\Program Files\Android\android-sdk\tools
Click to expand...
Click to collapse
If you can PM, perfect!
work on gnu/linux?
great to hear but afaik apktool revision you use still got no latest baksmali/smali updated - am i correct ?
$omator said:
great to hear but afaik apktool revision you use still got no latest baksmali/smali updated - am i correct ?
Click to expand...
Click to collapse
I am using the latest Versions from https://github.com/brutall/brut.apktool
using these instructions
http://code.google.com/p/android-apktool/wiki/BuildApktool?tm=4
ass you see latest update is from may while:
8-22-11 smali/baksmali v1.2.8 is out. This fixes a problematic bug that crept into 1.2.7
8-13-11 smali/baksmali v1.2.7 is out. This is a bugfix release, with a small additional feature (helper comments for synthetic access methods)
i think those 2 updates are not merged
I am currently Forked all of Brut.all's Repositories into my github account that i setup for APK Multi-Tools.
I am currently looking over his code and making changes updating the Smali Code used with the APKtool updating it to the most updated version off of http://code.google.com/p/smali/ and hopefully I will have a more updated Alternative version of apktool
This thread here is more along the lines of for Development purposes and coding suggestions
For Releases and bug reports Visit this post
[Windows XP/VISTA/7][UTILITY][TOOL] APK Multi-Tool
First off, awesome job, thanks for this...I have one quick question... everytime I had ever gotten errors with this or even the apk manager 5.0.2 it was the same situation. I would, for example, be trying to decompile mms.apk and errors would occur. What solved this was to place my framework-res.apk in C:\Documents and Settings\Owner. This is where the apktool\ framework folder is located. I then had to open a command prompt and type apktool if framework-res.apk. That would place a 1.apk file in apktool\framework. Then using this or apk manager 5.0.2 would work flawlessly without errors. Is there any way to skip all that and create that 1.apk file using your setup before I decompile an app? I thought decompiling with dependency file would do it, but it always says that is not a dependee file. Any thoughts... sorry for the long post and thanks again.
I guess I could add a script to do a adb pull of the fw-res from your phone and install it from that
Sent from my DROID using xda premium
Script.bat close after making any selections (Same as APKManager 5.0.2)
any help?
Code:
java version "1.6.0_25"
Java(TM) SE Runtime Environment (build 1.6.0_25-b06)
Java HotSpot(TM) 64-Bit Server VM (build 20.0-b11, mixed mode)
At was unexpected at this time.

[SCRIPTSET v2.6][02/28/2012] Build native GNU/Linux applications: the easy way

New: SANE (USB Scanner backend and drivers) - OTG equipped device needed to work for this - YES, Scanner Access Now possible and Easy with your phone
This can (in combination with tesseract-ocr) be very useful to recognize text from scanned images.
For pictures see also http://forum.xda-developers.com/showpost.php?p=23046120&postcount=187
Update 01/30/2012: Now with a small android app (ScriptStarter) to start services and other shell scripts easily from the GUI. See bottom of the post.
WHAT'S POSSIBLE WITH THIS SCRIPT:
With this bash script your are able to build relatively easy from source a lot of native software (over 90 at the moment) from the GNU/Linux community for your Android phone and you will have
the good experience with free software.
All these tools and programs are not "apps for the GUI" for Android but native running command line tools "under the surface" of your Android GUI like the kernel and other services.
Don't ask me if it makes any sense to install program xy (like MySQL) on a phone. This is your decision. It's possible, so try it and see what you can do with it.
Note: I tested most of the compiled software on a Samsung Galaxy S2 (my phone). I cannot test it on a variety of phones because I have no mobile phone shop...
Currently buildable with this scripts (abstract, see the full list in package_selection.conf):
PHP 5.3.10 (with almost all extensions and XCache)
MySQL 5.5.19 (if you want a full database server on your phone...)
lighttpd 1.4.30
OpenSSH 5.9p1
OpenSSL 1.0.0f
Samba 3.6.3
cURL 7.23.1
bash 4.2
BusyBox 1.19.3
ImageMagick 6.7.4-10
OpenVPN 2.2.2
Python 2.7.2
Node.js 0.6.7
git 1.7.9
Wget 1.13.4
Rsync 3.0.9
TCPDUMP 4.2.0
Midnight Commander 4.8.1
Pure-FTPd 1.0.35
screen 4.0.3
iptables 1.4.10 (without bionic bug "getnetbyaddr()" and with iptables-save/restore!)
BIND 9.8.1-P1
Lua 5.2.0
Ruby 1.9.3-p0
usbutils 004
MTDUtils latest git
GCC 4.6.2 (c, c++)
GNU Coreutils 8.14, Binutils 2.22, Findutils 4.4.2, Inetutils 1.8
QEMU 0.15.1
SANE 1.0.22
tesseract-ocr 3.01
...
a lot of libraries, development tools and other useful programs
...
FEATURES:
automatic download and untar the cross-compilers (if not already done) for cross compiling
automatic download and untar the source packages (if not already done), that you have selected
solve dependences and reserves additional needed packages
apply patches to the sources if necessary
build them, "install" them in a folder for later "ready to transfer" to your phone and stripes the binaries and libraries to reduce the filesize if selected
autogenerate a tar file and adb push the file to device if selected
allows you to use well-known software like PHP, MySQL, OpenSSL, OpenSSH, OpenVPN, bash and lighttpd on your phone (see the full list in file package_selection.conf, see attachement)
scripting and development on your phone
no limits with BusyBox (without want to be derogative, BusyBox is a wonderful tool), full featured tools like Coreutils, Binutils etc.
build scripts are expandable with other or newer packages you eventual want to have
QUESTIONS AND ANSWERS:
Q: Do I need native GNU/Linux programs and what is that?
A: If you do not know what native Linux applications are, then stop here - you don't need them.
Q: What can I do with these tools?
A: Many things. As a developer you can use the libraries to include them in Android GUI apps, as user you can start for example a webserver on your phone and write some HTML or PHP pages
just for fun or replace BusyBox with full featured tools (or only some commands).
Some tools are also very useful to find network errors, check the network traffic and many more.
Q: What do I need?
A: A Linux installation (VM or real), some Linux knowledge and a little bit time to read all instructions carefully. A rooted Android device with enouth free memory (ext2/3/4 formatted)
See README for details.
Q: Costs?
A: Nothing. The scripts are Open Source (GPL v3), the packages are GPL licensed or under a similar license. The cross-compilers are Open Source or free to use for non-profit purposes.
But I would be pleased if I get a donation and/or a press on the "Thanks button", if the scripts are useful for you. It was a long and hard work...
Note: The attachement scriptset-x.yy.zip is double packed (inside .bz2), because I want preserve the right settings of the scripts.
STEPS:
Selected the desired packages in the config file
Adjust the compiler settings for your phone
Run the build script to download and compile the software
Copy the generated TAR files to your phone or let "adb" this do for you and unpack them in the prepared sysroot folder
For more information please read the instructions in "README"
Please let me also know if you have any problems or if you have questions or further suggestions.
Thanks go to the Open Source community and a lot of people/webpages with hints about cross-compiling software.
Thanks
smitna
CHANGELOG:
01/14/2012 First public release v0.9
01/14/2012 Update: Removed unneeded big patch for ncurses
01/15/2012 Release of v1.0
Update: Fixed build of gcc. Note: the header files are not copied automatically with the script.
If you want to compile on your phone, set TAR_HEADERS=1 in configuraton.conf
Typos: some translations corrected in build.sh
01/16/2012 Release of v1.1
Update: Removed building of fsck from util-linux-ng, it's in e2fsprogs
Update: ISC Cron / vixie cron: set correct paths in pathnames.h before compiling
Enhancement: More detailed explanation of device specific compiler settings with list of possible values
Update: Removed dependence e2fsprogs libs from e2fsprogs
01/17/2012 Release of v1.2
Update: Build of zip, zipcloak, zipnote, zipsplit, unzip, unzipsfx and funzip now possible without errors
01/17/2012 Release of v1.3
Update: Added Node.js
Typos: some translations and language errors corrected in build.sh and README (sorry, I'm not a native English speaker...)
01/18/2012 Release of v1.4
Fixed TMP_PATH in PHP extension XCache (mmap.c) to prevent startup warning
Fixed BusyBox problems with static build against glibc ("__getpagesize" segfault with ping, traceroute and other networking parts)
and added some BusyBox patches.
BusyBox is now dynamic linked, so don't replace the system BusyBox with this build, because of missing mount/paths to libraries at phone startup
01/20/2012 Release of v1.5
Update: Cleanup in scripts and separation of configuration and code. Now it's only necessary to edit configuration.conf and package_selection.conf
Update: Added gzip
Update: Added experimental adb push to device if the device is connected and permissions are ok
Update: Check for installed programs. Script now exists on check failure to minimize errors while compiling.
01/21/2012 Release of v1.6
Bugfix: MySQL build could fail if gen_lex_hash could not generate the file sql/lex_hash.h in pass 2
Update: adb push should now work, check for connected device (and possible multiple devices) and check for right permissions to use the device
Enhancement: Even more explanation of device specific compiler flags and some hints to find the right settings.
01/21/2012 Release of v1.7
Enhancement: To eliminate sure a failing MySQL build, with every new run the source folder will be removed before completely
Enhancement: file version is now strictly checked (the host version must be the same as the cross version)
Some minor changes and filechecks (e.g. autoconf)
01/23/2012 Release of v1.8
Bugfix: Python has SQLite dependencies and SQLite must be ready before Python configure/make
Bugfix: In certain circumstances the optimizer settings get lost
Bugfix: Removed --enable-multibyte from bash, no chance to use it with NDK
01/24/2012 Release of v1.9
Update: Added ngIRCd (Please read the comment for this server, because of running as root)
Update: Sorted the links and package names in the config a little bit...
01/26/2012 Release of v2.0
Bugfix: OpenSSH wants to touch /var/empty while compiling, should be fixed --with-privsep-path now set (thanks to member dateno1 for his reports of such warnings/errors)
Bugfix: Removed a wrong CFLAG -I path from NDK config (only useful for me, really useless for others...)
Enhancement: Example for a user db for Pure-FTPd virtual user database in README (please use virtual users, it's the best and easiest solution)
Update: OpenSSH build need ssh-keygen for the generation of the default keys, added this info to README and the package selection
Bugfix: Not really a bugfix, but some installers don't set the right permissions of libraries in the sysroot folder, so set them global in the final task
Bugfix: Removed --with-lastlog=$TARGET_SYSROOT/var/log/lastlog from OpenSSH and added --with-lastlog=no, I don't know why this is not working and throws a warning, but we can live without it...
Enhancement: Added option to choose the sysroot variant from the CodeSourcery libs: v5TE (default), v4T (old), thumb2 (v7, fastest if supported by the phone)
Enhancement: Added option to tar the headers for development on the device with CodeSourcery (hint: always set rpath in LDFLAGS to make use of the CodeSourcery libs)
01/26/2012 Release of v2.1
Update: Added getcap/setcap and libraries from wishlist, needs libtoolize. Note: This is in a testing stage, kernel and filesystem support needed!
01/30/2012 Added a ScriptStarter app
09/02/2012 Release of v2.2
Update: Local compilation of static "tic" from ncurses for buildhost, if ncurses installation is missing
Enhancement: "downloading only" mode without compiling the packages (and force download)
Enhancement: some parameters for starting the script with additional functions (show with ./build.sh help)
Enhancement: more logging and outputs
Enhancement: language specs, all outputs can be changed to other languages in build.sh
Update: Added dosfstools
Update: Added Ruby
Update: Added example configs and starter scripts for Samba and OpenSSH
Update: Use of http-URLs if possible and update of some broken external links since last release
Bugfix: util-linux-ng needs gettext, added dependence
Bugfix: Added parameter to Samba to solve user/group settings and socket_wrapper support to set path vars at runtime
Update: Changed PHP version to 5.3.10, Samba to 3.6.3 and git to 1.7.9
02/11/2012 internal Release v2.3
Bugfix: openVPN patch for /dev/tun and links to ip/netstat/ifconfig/route, see hints for symlinks
02/16/2012 internal Release v2.4
02/25/2012 Release of v2.5
Update: Added LAME
Update: Added experimental CUPS
Update: Changed PNG version to 1.5.9
Update: Added Net-SNMP
Update: Added Netpbm
Update: Added PNG 1.2.47 for Netpbm and phpSANE
Update: Added LibTIFF
Update: Added SANE (USB Scanner backend and drivers) - OTG equipped device needed to work for this - YES, Scanner Access Now possible and Easy with your phone
Update: Split patches for bash (4.1 and 4.2) for better and easier (automatic) inclusion of original patches
02/28/2012 Release of v2.6
Update: Added Cuneiform OCR
Update: Added tesseract-ocr (see hints for more details howto use it)
ScriptStarter
02/03/2012 Added a small ScriptStarter for the GUI. With this app, written with JQuery, PhoneGap and Java (wrapper to execute the shell scripts) it's possible to start for example the lighttpd web server, Pure-FTPd or MySQL from within the Android GUI without a terminal and read the output. If a script needs root access, there is a checkbox to allow this. For this to work, copy the script sush in the script folder. All scripts ending with .sh can be started (please choose after the first start your script folder on the device to add the scripts to the selection, normally your [SYSROOT]/sbin folder).
Three buttons (start, stop and status) are predefined for start-stop-status scripts, there is also a parameter input field for more start values.
Free GPL v3 source code also included (Eclipse project). Please don't expect too much eye-candy. The GUI could be much better, but my CSS skills are very limited...
I added a few example scripts in the zip file, for example a battery stats reader. Before starting these scripts, have a look in the source code to be sure that they are compatible with your device.
Update 0.97 02/03/2012: Now the stderr is also printed in the output window
Update 0.99 02/10/2012: Replaced scrolling api with a much better solution (jScrollPane) for the output window. Not the real Android scroll feeling, but it's usable.
Thanks! I would hit the Thanks button, but I am on my mobile atm.
Sent from MIUI powered phone
Someone tried it? Problems?
Please, I need your feedback...
Sounds interesting, I'll try once I get back home and share feedback here
now i try to all packages for test
i will test on cortex a8 (motolora xt720)
TARGET_MARCH="armv7-a" (not work on armv7 )
TARGET_MTUNE="cortex-a8"
TARGET_MFPU="neon"
TARGET_MFLOAT="softfp"
it make dynamic binarys but i don't want dymanic type (because it difficult to divide one thing and maybe not work on android's libs)
how can i make static type?
ps : oh...it has so many comile error (even can't read or count all)
dateno1 said:
i will test on cortex a8 (motolora xt720)
TARGET_MARCH="armv7-a" (not work on armv7 )
TARGET_MTUNE="cortex-a8"
TARGET_MFPU="neon"
TARGET_MFLOAT="softfp"
it make dynamic binarys but i don't want dymanic type (because it difficult to divide one thing and maybe not work on android's libs)
Click to expand...
Click to collapse
I hope I understand your question. Why not dynamic?
Yes, you have to set the parameters for your mobile phone. For TARGET_MARCH try "armv7", for TARGET_MFLOAT "softfp" and for TARGET_MFPU "vfp" but check this last setting carefully for this phone.
It's very hard to build a full static binary (and sometimes nearly impossible) and it's also hard to build against bionic (with NDK). I had no good experience with it . A lot of compiler runs wasn't sucessful. Edit: I also had for example massive problems with openssl. I couldn't find a way to build it with NDK or static and then build other programs like cURL with openssl support.
Static binaries are also too big and not necessary. For this we have a sysroot environment to be independent from bionic and without the restrictions. The compiled libs and binaries are linked to the CodeSourcery glibc and have set the custom "rpath" for the dynamic loader. That's no problem I think.
that's simple
if someone want to make some binary for all version of android (even same cpu) it will not work well (defend on basic lib(ex : libc) is ok but complex things will not work)
i know make static type binary is very difficult but it valable
dateno1 said:
that's simple
if someone want to make some binary for all version of android (even same cpu) it will not work well (defend on basic lib(ex : libc) is ok but complex things will not work)
i know make static type binary is very difficult but it valable
Click to expand...
Click to collapse
You are right, if you want to build a "portable" binary, you have to set very safe settings, like TARGET_MARCH="armv5", the full list is in the "README". But it's not my main target to offer a solution that is easy portable to other phones, instead you can build the software with optimizations for your phone to "get the best" for it
smitna said:
You are right, if you want to build a "portable" binary, you have to set very safe settings, like TARGET_MARCH="armv5", the full list is in the "README". But it's not my main target to offer a solution that is easy portable to other phones, instead you can build the software with optimizations for your phone to "get the best" for it
Click to expand...
Click to collapse
just i want to add some more function on the phone
thanks for patch files
I want to try this, to install some apps(most interested fro mc), but I don' t wanna change my sd card.
Can I use phone' s /data partition as mysysroot directory? I have 1.5GB space available on data partition, it is 2GB all.
And If yes, I must create the dir: /data/mysyroot? And where to create this dir on pc? On root directory of my linux system?
dancer_69 said:
I want to try this, to install some apps(most interested fro mc), but I don' t wanna change my sd card.
Can I use phone' s /data partition as mysysroot directory? I have 1.5GB space available on data partition, it is 2GB all.
And If yes, I must create the dir: /data/mysyroot? And where to create this dir on pc? On root directory of my linux system?
Click to expand...
Click to collapse
You can use the /data partition. Just create a new folder, for example /data/sysroot. On your PC you have to create the same temporary with full user rights. This is not your working dir for building. Create a new dir in /home/user and unpack the files there. In settings insert the /data/sysroot as TARGET_SYSROOT and change the other settings for your phone and choose mc=yes. Then start the ./build.sh
Thanks for your quick answer.
Just to make clear because my english understanding is not in a high level
I must create the /data/sysroot dir under "/"(root directory) on linux pc with superuser rights?
dancer_69 said:
Thanks for your quick answer.
Just to make clear because my english understanding is not in a high level
I must create the /data/sysroot dir under "/"(root directory) on linux pc with superuser rights?
Click to expand...
Click to collapse
Yes, that is right. But this is the only step you need to do as root or better with root rights. After this work as usual as user.
oh it can't make mysql
package selection : mysql only
target directory (prefix) : /sddata/mysql (on sdext on my system)
armv7-a
cortex-a8
neon
softfp
then run ./build.sh 2> error.txt
it is my error messages
http://pastebin.com/g7Yi4bGz
sorry you can see this link only today (my mistake)
this setting can make some binary and lib run on my phone but fail to make gcc or mysql (when i try gcc it just fail to making gcc only (other things were made) )
dateno1 said:
package selection : mysql only
target directory (prefix) : /sddata/mysql (on sdext on my system)
armv7-a
cortex-a8
neon
softfp
then run ./build.sh 2> error.txt
it is my error messages
http://pastebin.com/g7Yi4bGz
sorry you can see this link only today (my mistake)
this setting can make some binary and lib run on my phone but fail to make gcc or mysql (when i try gcc it just fail to making gcc only (other things were made) )
Click to expand...
Click to collapse
Please notice first, that you should not run this script as root!!
Then there is something wrong with the build of the first needed packages:
ZLIB=yes
OPENSSL=yes
CURL=yes
GETTEXT=yes
LIBXML2=yes
READLINE=yes
NCURSES=yes
- The script cannot find the readline sources. Do you have a subfolder readline-6.2 in folder sources in your builddir? Same for the other source folders. The script first downloads the packages to folder packages, extract the tars in folder sources, repeated for all selections.
(look at line 67 in your log: ./build.sh: 1402: cd: Python-2.7.2: No such file or directory)
- You have no "xz", install it first and make sure, that the other necessary packages are installed. MySQL and gcc are "two pass" compilations and this builds generating temporary binaries, runable on your linux pc. So you need all for a successful compilation of such binaries like gcc, make, python etc. on your linux machine. If you are using Ubuntu, then install the "meta-package" build-essential, look in the README.
Do you have the other unpacking tools like gunzip etc. Please install also "bison"
You should do following steps:
1. First select only the necessary packages (see above), all others to no.
2. If zlib, python, readline an the others are cross-compiled (without errors) and the libraries are in ./sysroot/lib, then deselect them (=no) and select mysql=yes and start a second run with ./build.sh
smitna said:
Please notice first, that you should not run this script as root!!
Then there is something wrong with the build of the first needed packages:
ZLIB=yes
OPENSSL=yes
CURL=yes
GETTEXT=yes
LIBXML2=yes
READLINE=yes
NCURSES=yes
- The script cannot find the readline sources. Do you have a subfolder readline-6.2 in folder sources in your builddir? Same for the other source folders. The script first downloads the packages to folder packages, extract the tars in folder sources, repeated for all selections.
(look at line 67 in your log: ./build.sh: 1402: cd: Python-2.7.2: No such file or directory)
- You have no "xz", install it first and make sure, that the other necessary packages are installed. MySQL and gcc are "two pass" compilations and this builds generating temporary binaries, runable on your linux pc. So you need all for a successful compilation of such binaries like gcc, make, python etc. on your linux machine. If you are using Ubuntu, then install the "meta-package" build-essential, look in the README.
Do you have the other unpacking tools like gunzip etc. Please install also "bison"
You should do following steps:
1. First select only the necessary packages (see above), all others to no.
2. If zlib, python, readline an the others are cross-compiled (without errors) and the libraries are in ./sysroot/lib, then deselect them (=no) and select mysql=yes and start a second run with ./build.sh
Click to expand...
Click to collapse
i'm not edit necessary part
ZLIB=yes
OPENSSL=yes
CURL=yes
GETTEXT=yes
LIBXML2=yes
READLINE=yes
NCURSES=yes
i just edit mysql=no => mysql=yes
ok try to install packages and run as not root
dateno1 said:
i'm not edit necessary part
ZLIB=yes
OPENSSL=yes
CURL=yes
GETTEXT=yes
LIBXML2=yes
READLINE=yes
NCURSES=yes
i just edit mysql=no => mysql=yes
ok try to install packages and run as not root
Click to expand...
Click to collapse
Good luck!
If you can wait a little bit:
In a short time I release a new version with better error and program checks and some small bug fixes. With this version it's not longer necessary to edit the build.sh, it's now all in only two separated configuration files (configuration and package selection).
hmm...fail to compile mysql again
with this error
note: the mangling of 'va_list' has changed in GCC 4.4
full error log on http://pastebin.com/jd1Pw9Xw
dateno1 said:
with this error
note: the mangling of 'va_list' has changed in GCC 4.4
full error log on http://pastebin.com/jd1Pw9Xw
Click to expand...
Click to collapse
Hello dateno1,
first: you have *NOT* changed to a user account as promised
The va_list is only a note, not an error, no problem (but ask the MySQL devs why they haven't adapted the code to gcc 4.6.1).
Your Python cross binaries and libraries are not ok (from you broken first build?). Please start from a "fresh state" (delete the folder sources/Python-2.7.2 and sysroot) or start from a total clean state.
Please use the latest 1.5 version of the script because of the xargs warnings at the end
Delete the complete sysroot folder, there are some folders not in place (data and docs). There is a script remove_all_files.sh
Start this script in your buildroot with ./remove_all_files.sh to remove all files and symlinks in subfolder sysroot.
Edit: delete the sysroot folder complete, there are some other missing folders from your first build!
Start again with ./build.sh and activated packages (the "ALWAYS NEEDED" one and MySQL)
smitna said:
Hello dateno1,
first: you have *NOT* changed to a user account as promised
The va_list is only a note, not an error, no problem (but ask the MySQL devs why they haven't adapted the code to gcc 4.6.1).
Your Python cross binaries and libraries are not ok (from you broken first build?). Please start from a "fresh state" (delete the folder sources/Python-2.7.2 and sysroot) or start from a total clean state.
Please use the latest 1.5 version of the script because of the xargs warnings at the end
Delete the complete sysroot folder, there are some folders not in place (data and docs). There is a script remove_all_files.sh
Start this script in your buildroot with ./remove_all_files.sh to remove all files and symlinks in subfolder sysroot.
Edit: delete the sysroot folder complete, there are some other missing folders from your first build!
Start again with ./build.sh and activated packages (the "ALWAYS NEEDED" one and MySQL)
Click to expand...
Click to collapse
make new account (compile.compile) and use su -c "./build.sh" compile
i think it work (compiled file's owner is changed to compile.compile)
now i delete almost files and folders (exclude android-ndk, readline-6.2, toolchains) and retrying...oh failed (attach new log (full) )
'를 위해 할 일이 없습니다' mean 'no job for~'
'오류' mean 'error'

[GUIDE][LINUX] MIUI patchrom for jellybean roms

I searched and reading a lot but can't find properly guide how to use miui patchrom for jellybean roms. So i decided share what i've found and put all in one guide.
1. First of all you need linux on your machine. I use kubuntu, installed from windows (wubi) ->http://www.kubuntu.org/getkubuntu/download
2. Now you need SDK tools for linux http://developer.android.com/sdk/index.html
-download and unzip it to for egz home/your_username/android-sdk-linux
-set PATH for tools and platform-tools folders
Code:
export PATH=/home/your_username/android-sdk-linux/platform-tools:/home/your_username/android-sdk-linux/tools:$PATH
On x64 systems you are required to install some 32-bit libraries so in a terminal write:
Code:
sudo apt-get install ia32-libs
3. Download ROM which you want to patch with miui patchrom, must be deodexed and rooted. For us it must be jellybean ROM for egz 4.1.2. I suggest to use CM or AOSP based roms because stock sammy roms have a lot of differences and it's not so easy to port them. After downloading your ROM base rename it to something short and easy i use stock.zip.
In home create folder i use patchrom folder in this folder create for egz stock folder and put downloaded rom to it.
4. Download from MiCode github all necessary files https://github.com/MiCode we need:
https://github.com/MiCode/patchrom_tools/archive/jellybean.zip tools
https://github.com/MiCode/patchrom_miui/archive/jellybean.zip miui
https://github.com/MiCode/patchrom_i9100/archive/jellybean.zip i9100
https://github.com/MiCode/patchrom_build/archive/jellybean.zip build
https://github.com/MiCode/patchrom_android/archive/jellybean.zip android
all zips for jellybean, why downloading zips? because for me repo don't download all files, that way is much easiest.
Unzip all files to your stock folder which you create in step 3. Rename all folders by this way patchrom_tools_jellybean becomes tools, patchrom_miui_jellybean becomes miui ...
5. In i9100 folder you can find makefile its first of configuring files which you need to copy to stock folder and edit it.
This is my makefile, you should edit using this explanations:
'local-zip-file' = Name of your original ROM zip
'local-out-zip-file' = Name for your finished MIUI rom
'local-modified-apps' = Apps that will be modified to fit in with the framework. They need to be modified because they contact with the system
'local-miui-apps' = MIUI Apps that will be integrated into the zip
'local-remove-apps' = Apps that will be removed from the original ROM
'local-pre-zip' = Refers to codeblock that should be executed before the zip is done.
'local-after-zip' = Refers to codeblock executed after the zip is completed
'local-zip-misc' = The codeblock just described at 'local-pre-zip'. It adds some Google Apps and a buid.prop
'local-test' = Another codeblock
Code:
#
# Makefile for i9100
#
PORT_BUILD=/home/jack/patchrom/build
PORT_ROOT=/home/jack/patchrom
# The original zip file, MUST be specified by each product
local-zip-file := stock.zip
# The output zip file of MIUI rom, the default is porting_miui.zip if not specified
local-out-zip-file := MIUI_i9100.zip
# the location for local-ota to save target-file
local-previous-target-dir := ~/workspace/ota_base/i9100_4.1
# All apps from original ZIP, but has smali files chanded
local-modified-apps := LogsProvider Phone MediaProvider Settings
local-modified-jars :=
# All apks from MIUI
local-miui-removed-apps := MediaProvider Stk
local-miui-modified-apps := MiuiHome Settings Phone Mms ThemeManager MiuiSystemUI
# Config density for co-developers to use the aaps with HDPI or XHDPI resource,
# Default configrations are HDPI for ics branch and XHDPI for jellybean branch
local-density := HDPI
include phoneapps.mk
# To include the local targets before and after zip the final ZIP file,
# and the local-targets should:
# (1) be defined after including porting.mk if using any global variable(see porting.mk)
# (2) the name should be leaded with local- to prevent any conflict with global targets
local-pre-zip := local-pre-zip-misc
local-after-zip:= local-put-to-phone
# The local targets after the zip file is generated, could include 'zip2sd' to
# deliver the zip file to phone, or to customize other actions
include $(PORT_BUILD)/porting.mk
# To define any local-target
updater := $(ZIP_DIR)/META-INF/com/google/android/updater-script
pre_install_data_packages := $(TMP_DIR)/pre_install_apk_pkgname.txt
local-pre-zip-misc:
cp other/spn-conf.xml $(ZIP_DIR)/system/etc/spn-conf.xml
cp other/build.prop $(ZIP_DIR)/system/build.prop
#cp stockrom/system/app/FFFFFFFF000000000000000000000001.drbin $(ZIP_DIR)/system/app
#cp -r stockrom/system/app/mcRegistry $(ZIP_DIR)/system/app
rm -rf $(ZIP_DIR)/system/csc
rm -rf $(pre_install_data_packages)
for apk in $(ZIP_DIR)/data/media/preinstall_apps/*.apk; do\
$(AAPT) d --values resources $$apk | grep 'id=127 packageCount' | sed -e "s/^.*name=//" >> $(pre_install_data_packages);\
done
more $(pre_install_data_packages) | wc -l > $(ZIP_DIR)/system/etc/enforcecopyinglibpackages.txt
more $(pre_install_data_packages) >> $(ZIP_DIR)/system/etc/enforcecopyinglibpackages.txt
out/framework2.jar : out/framework.jar
%.phone : out/%.jar
[user=279333]@ECHO[/user] push -- to --- phone
adb remount
adb push $< /system/framework
adb shell chmod 644 /system/framework/$*.jar
#adb shell stop
#adb shell start
#adb reboot
%.sign-plat : out/%
#%.sign-plat : /home/gexudong/libra.jbmiui/out/target/product/maguro/system/app/%
java -jar $(TOOL_DIR)/signapk.jar $(PORT_ROOT)/build/security/platform.x509.pem $(PORT_ROOT)/build/security/platform.pk8 $< $<.signed
[user=279333]@ECHO[/user] push -- to --- phone
adb remount
adb push $<.signed /system/app/$*
adb shell chmod 644 /system/app/$*
So, you have to change:
local-zip-file := stock.zip name of your base rom
PORT_BUILD=/home/jack/patchrom/build to your patch for build folder
PORT_ROOT=/home/jack/patchrom to your root folder
After edit in makefile and save it in patchrom/stock folder you sholud copy from patchrom/build folder these files: porting.mk and phoneapps.mk
you can edit phoneapps.mk too add or delete files which you want.
File structure must look like this:
home
-your_username
-android-sdk-linux:
(-extras
-platform-tools
-platforms
-system-images
-tools)
-patchrom:
(-android
-build
-i9100
-miui
-stock (including: stock.zip - your base rom, makefile edited by you, phoneapps.mk edited by you, porting.mk - copied from build folder)
-tools)
6. Ok, files is prepared, now we can start. Open console and type:
cd patchrom - go to patchrom folder
cd stock - go to stock folder
cd .. - go back
make workspace - this command create temp folder in stock folder, and decompile all necessary files from stock.zip and from miui patchrom, it decompile also files which you add in makefile 'local-modified-apps'
Now in temp you have 5 folders, in reject folder you can resolve any conflicts to prepare necessary files for miui rom.
7. After fixing problems with smali type in console
make firstpatch
this command will apply all rej changes and miui patch for your decompiled files.
8. In console type:
Code:
source build/envsetup.sh
cd stock
make zipfile
Thats all.
If you have problems google it
Don't ask me for anything, use your brain!
Thank you for the information!
I think, you should add a couple of words to help linux newbies.
1. To set $PATH variable you need to edit "bashrc" file.
open terminal, run following command
Code:
gedit ~/.bashrc
gedit is an editor in Ubuntu, you can use any other editor
add to the begining
Code:
export PATH=/home/your_username/android-sdk-linux/platform-tools:/home/your_username/android-sdk-linux/tools:$PATH
save file
reboot to activate changes
test - open terminal, and execute "echo $PATH"
2. You need to generate keys to sign your rom.
http://android-dls.com/wiki/index.php?title=Generating_Keys
can I use this guide to build a miui patch rom for my galaxy nexus toro? which rom do you guys suggest me to use?
Hi,
I just need to ask a few things.
1. How do we know which local apps need to be modified. and which miui apps need to be modified.? I mean is there a pre-defined list or its hit n trial??
I can follow the instructions and run the scripts, but i need to make sure how do we select the criteria for above files. Rest i'll try to figure out myself.
Regards
Yasir
I think a couple of mistakes there are, its make fullota where you have written make firstpatch because make firstpatch will create the temp poster where the 5 folders exist. Once you've fixed the rejects, that's when you make fullota. Also, we don't need PORT_BUILD and PORT_ROOT exports.
MTK Mediatek MIUI
will this work for MTK phones? if yes is it the same process??
rnovino said:
will this work for MTK phones? if yes is it the same process??
Click to expand...
Click to collapse
maybe and you can't use then the i9100 you need to find a phone with compatible hardware or just the phone
Thanks for the guide.
Going to try this out in a few hours, installing Linux in vmware workstation 10 currently
Sent from my GT-I9100 using Tapatalk 4
Need help..
i want to port miui to my mtk phone what are the required files for mtk.......
MTK 6575 - acer z2 JB4.1.1 dual sim
which branch do i used to patching MTK6575 JB4.1.1, JB4.2-MTK or JB4.1-non MTK?
[edit]
basicly as i know, that we have doing is:
- merged Miui framework(smali) to stock framework (smali), right?
- copy lib/etc/xbin ...
- edit bootclasspath if need.
- edit updater-script.
- repack all.
alfan.y said:
which branch do i used to patching MTK6575 JB4.1.1, JB4.2-MTK or JB4.1-non MTK?
[edit]
basicly as i know, that we have doing is:
- merged Miui framework(smali) to stock framework (smali), right?
- copy lib/etc/xbin ...
- edit bootclasspath if need.
- edit updater-script.
- repack all.
Click to expand...
Click to collapse
These pages are a great help. There are many others but start here.
Porting miui to other devices http://en.miui.com/thread-4569-1-1.html
Porting miui cm10.1 based devices http://en.miui.com/thread-6395-1-1.html
Porting miui patchrom guide http://en.miui.com/thread-9630-1-1.html

Themes / Apps / Mods [Windows][PowerShell][Script]psAdBlock - PowerShell AdBlock Script for Windows

Introduction
Dear community
This is my very first XDA: DevDB project. I'm glad to announce my ad-block solution purely based on PowerShell.
I've been (and I still am) using AdAway on my Android phone. It's a great app, and it inspired me to get a similar solution for Windows computers.
Version 0.1 was not public because it was slow as hell. It took about 8 minutes to handle ~200'000 hosts.
With version 1.0, my script got a massive speed improvement. Now its duration has been greatly decreased. I achieved the same amount of hosts in less than 100 seconds now. But of course, these measured values shouldn't mean a lot, as they depend completely on your hardware (and a little bit on your internet connection of course).
Now version 1.6 has an automatic backup & apply routine, check it out!
Click to expand...
Click to collapse
Features
This script does exactly what you think: It grabs various "hosts" sources from the internet, saves them locally, and merges them to one big file. Enjoy an ad-free Windows experience.
Download as many "hosts" files as you want
Merge them automatically into one big "hosts" file
Remove duplicates from the "hosts" file
Remove any comment line starting with # to keep your hosts file as small as possible
Apply a custom whitelist or even custom blacklists
Log the entire process to a log file (placed within the same directory where you saved this script)
Click to expand...
Click to collapse
Downloads & Changelogs
See post 2
Click to expand...
Click to collapse
FAQs
See post 3
Click to expand...
Click to collapse
Disclaimer
Altough this is normally a safe process, I am not responsible for possible damage to your device if anything should fail.
I will not take any responsability for bricked Windows installations, other software defects or even lost data.
Click to expand...
Click to collapse
License/forks
This work is licensed under a Creative Commons Attribution-ShareAlike 4.0 International License(
).
This is an open source project, it's a PowerShell script and you're able to see the source code of course. You're allowed to modify this script as you want, as long as you give credits to me. Adaptations of my work shall be shared as well under the same license. Commercial use is allowed, as long as you don't sell my work.
Click to expand...
Click to collapse
Requirements
There are some requirements to check.
A little bit of PowerShell-knowledge (not necessary of course)
At least Windows 7 (theoretically it should work on any Windows)
At least PowerShell 3.0 (PowerShell 2.0 may work, but is unsupported)
At least 50 MB free space for this script
Administrative privileges - required if you want to use the automatic backup & apply routines, not for the script itself, otherwise you'll need to manually copy the "hosts" file into the Windows directory
Click to expand...
Click to collapse
Instructions for use with administrator privileges (recommended)
Download the archive and unzip it anywhere
Execute the "_Run_Admin.bat" script via double-click, confirm the UAC window by clicking on the yes button and wait for the console to close itself
Reboot your machine and enjoy an ad-free Windows experience
Note: Instead of the batch script you can use the .ps1 file as well (unblock it first, simply right-click the .ps1 file, choose "Properties", then hit the "Unblock" button), start a new PowerShell console as administrator and manually run the script
Click to expand...
Click to collapse
Instructions for use without administrator privileges
Download the archive and unzip it anywhere
Execute the "_Run_User.bat" script via double-click and wait for the console to close itself
Copy the newly created "hosts" file and rename the existing "hosts" file to manually create a backup
Code:
C:/Windows/System32/drivers/etc/hosts
Reboot your machine and enjoy an ad-free Windows experience
Note: Instead of the batch script you can use the .ps1 file as well (unblock it first, simply right-click the .ps1 file, choose "Properties", then hit the "Unblock" button), start a new PowerShell console and manually run the script
Click to expand...
Click to collapse
Instructions to customize psAdBlock
To modify the "hosts" sources, simply edit the file "hostslist.ini"
To allow specific hosts, simply edit the file "whitelist.ini"
To block specific hosts, simply create a new .txt file within the "DL_Cache" folder and add the hosts (one per line) you want to block (e.g. "0.0.0.0 place-any-site-here.com")
Click to expand...
Click to collapse
Credits & thanks to
* Makorus: Creator of this PowerShell script
* Dominik Schuermann: Inspiring me to do this
* Luca Sturlese: Allowing us to use his awesome logging function library
Any questions or suggestions? Did you find any bugs? Thanks for your feedbacks in advance! :good:
Click to expand...
Click to collapse
XDA:DevDB Information
psAdBlock, Tool/Utility for the Windows 8 General
Contributors
Makorus
Source Code: https://github.com/makorus/ps-adblock
Version Information
Status: Stable
Current Stable Version: 1.6.5
Stable Release Date: 2017-07-03
Created 2015-05-09
Last Updated 2018-07-13
News
I'm moving this project to GitHub for many reasons. Future releases will be available through GitHub only.
New download link:
https://github.com/makorus/PS-AdBlock/archive/master.zip
Current release & changelog
Code:
##-------------------------------------------------------------------------------------##
## V1.6.3, 2018-02-03 ##
## - Added logic to handle 'localhost' in whitelist (thanks to antonio-gil) ##
## - Removed script version from filename ##
##-------------------------------------------------------------------------------------##
Notes
Code:
#########################################################################################
## Notes: ##
## - PowerShell 3.0 or newer is recommended to run this script without any errors ##
## - PowerShell 2.0 may work as well, but is unsupported ##
## - If you disable the backup/apply mode you have to manually copy the final ##
## 'hosts'-file to the Windows etc directory (please manually backup the old file: ##
## C:\Windows\System32\drivers\etc ##
## - To apply a custom blacklist, simply create a text file containing your desired ##
## hosts and save it in the download cache folder 'DL_Cache' (run the script once) ##
## - To manually add your custom hosts list, create a new text file called ##
## 'hostslist.ini' and add your hosts sources (one site per line without the www) ##
## - To automatically remove specific sites from the hosts list, create a new text ##
## file called 'whitelist.ini" and add your sites you want to whitelist ##
## - If you experience performance issues like extremely slow Windows startup time, ##
## Try to disable the client DNS Cache service via CMD: ##
## sc config dnscache start= disabled ##
#########################################################################################
Release history & changelogs
Code:
#########################################################################################
## Release history (yyyy-MM-dd): ##
##-------------------------------------------------------------------------------------##
## V0.0.1 - V0.0.9, 2015-05-02 ##
## - Non-public test versions only ##
##-------------------------------------------------------------------------------------##
## V1.0.0, 2015-05-09 ##
## - First public and stable release ##
##-------------------------------------------------------------------------------------##
## V1.1.0, 2015-05-10 ##
## - Added release history to the script ##
## - Merged Log Functions to the main script file (no more two separate files) ##
## - Added XDA:DevDB link ##
## - Added script version to name (easy identification) ##
##-------------------------------------------------------------------------------------##
## V1.2.0, 2015-05-13 ##
## - Fixed issue with old 'New-Item' command in function 'Log-Start': ##
## --> OLD: New-Item -Path $LogPath -Value $LogName -ItemType File ##
## --> NEW: New-Item -Path "$sFullPath" -ItemType File ##
## - Changed the 'Log-Start' invoking command to use $PSScriptRoot: ##
## --> OLD: Log-Start -LogPath ".\" [...] ##
## --> NEW: Log-Start -LogPath "$PSScriptRoot" [...] ##
## - Added #region and #endregion codes to fold the code ##
##-------------------------------------------------------------------------------------##
## V1.3.0, 2015-05-13 ##
## - Completely reworked the 'release history', huge improvement to readability ##
## - The 'Patch Table' uses now '-ireplace' instead '-replace' for better results ##
## - Changed the 'Patch Table' to use regex expressions for my default list ##
## - Added Spotify to 'Patch Table': ##
## --> $DefaultPatchTable.Add('\w+.spotify.com', 'localhost') ##
##-------------------------------------------------------------------------------------##
## V1.4.0, 2015-07-26 ##
## - Reworked whitelist method (check notes for more information) ##
## - Reworked hosts source list (check notes for more information) ##
## - Reworked the 'Patch Table', doesn't require regex expressions anymore ##
##-------------------------------------------------------------------------------------##
## V1.5.0, 2015-08-10 ##
## - The file now checks for the client DNS Cache service and logs a warning if it's ##
## enabled to ensure you don't run into troubles ##
## - Removed the note about the DNS Cache service: It's not recommended to set the ##
## startup type to "demand" (manual), it will cause issues sooner or later ##
## - Starting from now on, I'll create an executable file (to be found in the ZIP) ##
## - I'll also attach a VirusTotal.com scan to every new release ##
## --> Please report any Anti-Virus false positive alarms to me ##
##-------------------------------------------------------------------------------------##
## V1.5.1, 2015-08-11 ##
## - Fixed issue with wrong $PSScriptRoot variable when using the EXE variant ##
## - Changed the 'release history' to allow better versioning (e.g. version 1.5.1) ##
## --> Note: Older versions still contain two numbers only (e.g. version 1.2 etc.) ##
##-------------------------------------------------------------------------------------##
## V1.5.2, 2015-09-13 ##
## - Remove every empty line in the hosts file ##
## - Changed the Log-Write function to use Write-Host instead of Write-Debug, now ##
## the entire log will be shown during the script execution (live) ##
## - Changed replacement method to insert 0.0.0.0 instead of 127.0.0.1 in the final ##
## hosts file which leads to a much better and faster DNS resolution ##
## - Future releases will be delivered with additional hosts files, for example to ##
## block Google ad servers and some Windows 10 hosts to stop this privacy nightmare ##
##-------------------------------------------------------------------------------------##
## V1.5.3, 2015-10-08 ##
## - Fixed ugly encoding issue, new 'hosts' file will be created correctly now, means ##
## no BOM (Byte Order Mark) and no UCS-2 encoding anymore, should fix many issues ##
##-------------------------------------------------------------------------------------##
## V1.5.4, 2015-10-09 ##
## - Fixed duplicate hostname issue, cmdlet Get-Unique allows by default hostnames ##
## with capital letters (Get-Unique is a case sensitive search) ##
## e.g. 'test.com' and 'Test.com' are being handled correctly now ##
## - Reverted warning about DNS cache service, there should be no issue with the DNS ##
## cache service because the 'hosts' file is being encoded as a typical UTF8 file ##
## - Added new debug mode, set $DebugMode to $true to activate it ##
## This skips the download process, useful if you want to test something without ##
## re-downloading the whole host source lists ##
##-------------------------------------------------------------------------------------##
## V1.5.5, 2015-10-10 ##
## - Fixed issue with method ToLower (should work with PowerShell 2.0 now), ToLower ##
## is a method to work with strings only, work around with a ForEach-Object cmdlet ##
## - Added a PowerShell version check, unsupported versions are PowerShell v1 and v2, ##
## if you start this script with an unsupported PowerShell version, you'll find ##
## some hints in the log file to inform you about that ##
##-------------------------------------------------------------------------------------##
## V1.5.6, 2015-10-11 ##
## - Added again regex patterns to patch table, whitelist should work now correctly ##
## - Debug mode now skips the patch process as well ##
##-------------------------------------------------------------------------------------##
## V1.5.7, 2015-10-17 ##
## - Completely replaced previous regex patterns with one more complex pattern to ##
## handle hostnames with subdomains, performance increased significantly ##
##-------------------------------------------------------------------------------------##
## V1.5.8, 2016-01-03 ##
## - Non-public test version only (skipped) ##
##-------------------------------------------------------------------------------------##
## V1.5.9, 2016-01-24 ##
## - Non-public test version only (skipped) ##
##-------------------------------------------------------------------------------------##
## V1.6.0, 2016-02-29 ##
## - Added function to check for admin privileges ##
## - Added routine for automatic apply of 'hosts'-file (admin privileges required) ##
## - Added routine for backup of 'hosts'-file (admin privileges required) ##
## - Added some Skype and YouTube hostnames to the whitelist for proper functionality ##
## - Added new icon for the executable file ##
## - Updated the notes (see below) ##
## - Overall cleanup, added region codes for the main script ##
##-------------------------------------------------------------------------------------##
## V1.6.1, 2016-04-19 ##
## - Fixed wrong script number ##
##-------------------------------------------------------------------------------------##
## V1.6.2, 2017-04-25 ##
## - Added Goo.gl to 'Patch Table' and to the default whitelist.ini: ##
## --> $DefaultPatchTable.Add('\w+.goo.gl', 'localhost') ##
## - Changed the foreach loop to avoid recreating the object System.Net.WebClient ##
## - Added error handling for the download process ##
## - Added routine to correctly check the existence of the original 'hosts'-file ##
## - Removed EXE file because of false positive alarms from many AntiVirus engines ##
## - Added instead two new batch files: '_Run_Admin.bat' and '_Run_User.bat' ##
## - Overall rework, changes many comments and updated some notes ##
##-------------------------------------------------------------------------------------##
FAQs
How to execute this PowerShell script?
Option 1: Run the script using one of the included batch scripts, either the "_Run_Admin.bat" or the "_Run_User.bat" batch script.
Option 2: Manually run the PowerShell script. But at first, you have to unblock the PowerShell script because it is a script you downloaded from the internet. Once you unzipped the file, do a right click on the PS1 file and open its file properties. Click on the "Unblock" button and you're done. Right click the file and click on "Run with PowerShell".
Click to expand...
Click to collapse
Why do I get an message warning me about an execution policy?
Microsoft implemented this security feature when they published PowerShell. By default, the execution policy is set to "restricted", which means no scripts can be executed directly. You're able to configure the execution policy as you want. There are several execution policies, you can check them out here: Microsoft TechNet, Set-ExecutionPolicy.
I personally recommend to change the execution policy to "unrestricted", this means you can execute scripts you created and even those you downloaded from the internet (though you have to be careful what you download and what you execute).
Click to expand...
Click to collapse
How to uninstall this PowerShell script?
Basically, you just have to navigate to this folder:
C:\Windows\System32\drivers\etc
Delete the new hosts file and restore the original one by renaming "hosts.original" to "hosts" without any extension. After that, simply delete the files you downloaded from this thread.
Click to expand...
Click to collapse
Click to expand...
Click to collapse
Awesome! Can't wait to try this! I've used HostsMan, which is the closest UI-enabled program similar to AdAway for Windows, but it's really tricky to get it to work and it used to break my internet a lot. Had to go in safe mode to restore the original hosts file.
Glad to read that, I hope you like it! Never heard of it, but I just took a look at it. I guess this tool doesn't disable the DNS cache service.
I'm thinking of implementing a check, to verify whether the DNS cache service is enabled or disabled.
Hello everyone
I just uploaded two new versions, V1.2 and V1.3. I also made many other improvements, read the full change log for more information.
Hi everyone!
Sorry for the delay, but I had many things to sort out in my real life. However, I was able to work on V1.4 for you guys.
Now you can work with two text files called "whitelist.ini" and "hostslist.ini" to manage this script - there's no need to edit the PowerShell script file itself. Also, there are many improvements, read the full change log for more information.
thanks for this, it is is exactly what i was looking for, right now im trying to have this run on windows 10, i have a question the created "hosts" file is detected as a trojan virus, im wondering is this a false positive. i have backed up my system and original hosts file just in case. Hope there will be more developers for the Windsows platform so that we can make it a better OS, Ill let you know how it worked out, THNX
Just tried on Windsows 10, definitely not a virus, but i did experience allot lag with it, it blocks some ads in Microsoft Edge, runs
Thanks for this great tool. Works great but can someone make an .exe out of it? It would be more convenient.
godusopp said:
Thanks for this great tool. Works great but can someone make an .exe out of it? It would be more convenient.
Click to expand...
Click to collapse
Hi there, thank you for your reply. I can compile an EXE file out of it, but I expect a lot of false reports from anti-virus applications. I'll upload the EXE file tomorrow.
Kind regards
Makorus
Makorus said:
Hi there, thank you for your reply. I can compile an EXE file out of it, but I expect a lot of false reports from anti-virus applications. I'll upload the EXE file tomorrow.
Kind regards
Makorus
Click to expand...
Click to collapse
Thanks for the great work. I really appreciate it. I'll whitelist if antivirus detect it as false positive
Your script not work
Hi everyone
I just uploaded version 1.5. Go check it out! :laugh::good:
@Dj_Art Hey there
Hmm, it looks very strange. I guess you've got a Russian Windows 8.1 OS, am I right? Could you try out version 1.5 please?
Can you try placing the PS1 script on your desktop or somewhere else, where you have full access rights? Might be a permission issue as well.
Otherwise please hand out your system information (start -> run -> msinfo32 -> save as NFO file) so I can start debugging your error message.
@godusopp I've uploaded the EXE file as well, check the new ZIP file! :good:
@mrTGF Sorry I missed your post somehow. What Anti-Virus are you using?
The script itself is 100% clean, you can check out the source if you want. But I can't guarantee that the hosts sources I'm using are not compromised or whatever (but to be honest, I don't think so).
I have just tried the new update and it doesnt work for me at all, Microsoft Edge slows down drastically, the only difference in terms of ads, is that they end up loading last, in regards to the false positive i have used AVG Antivirus 2014, the file definitely is not a Trojan. I was wondeing if you can use the same host sources that Adaway on android is using?
Makorus said:
Hi everyone
I just uploaded version 1.5. Go check it out! :laugh::good:
@Dj_Art Hey there
Hmm, it looks very strange. I guess you've got a Russian Windows 8.1 OS, am I right? Could you try out version 1.5 please?
Can you try placing the PS1 script on your desktop or somewhere else, where you have full access rights? Might be a permission issue as well.
Otherwise please hand out your system information (start -> run -> msinfo32 -> save as NFO file) so I can start debugging your error message.
@godusopp I've uploaded the EXE file as well, check the new ZIP file! :good:
@mrTGF Sorry I missed your post somehow. What Anti-Virus are you using?
The script itself is 100% clean, you can check out the source if you want. But I can't guarantee that the hosts sources I'm using are not compromised or whatever (but to be honest, I don't think so).
Click to expand...
Click to collapse
Makorus said:
Hi there, thank you for your reply. I can compile an EXE file out of it, but I expect a lot of false reports from anti-virus applications. I'll upload the EXE file tomorrow.
Kind regards
Makorus
Click to expand...
Click to collapse
mrTGF said:
I have just tried the new update and it doesnt work for me at all, Microsoft Edge slows down drastically, the only difference in terms of ads, is that they end up loading last, in regards to the false positive i have used AVG Antivirus 2014, the file definitely is not a Trojan. I was wondeing if you can use the same host sources that Adaway on android is using?
Click to expand...
Click to collapse
Hi again
That's really strange, but this might be an issue with Windows 10/Microsoft Edge. I haven't tried yet how the hosts file reacts on a Windows 10 device. But I've got a Windows 10 device at home, so I'm gonna try it out as soon as possible and report back.
In the mean time, would you be so kind and post the version 1.5 log file? I think your DNS service might be online and that's why you face these issues.
Also, thanks for the information to your false positive alarm. Maybe you've already seen the VirusTotal.com link in my second post. You'll find TONS of false reports there.
Oh and by the way, actually, I'm using exactly the same hosts sources as the AdAway app on Android does.
Makorus said:
Hi again
That's really strange, but this might be an issue with Windows 10/Microsoft Edge. I haven't tried yet how the hosts file reacts on a Windows 10 device. But I've got a Windows 10 device at home, so I'm gonna try it out as soon as possible and report back.
In the mean time, would you be so kind and post the version 1.5 log file? I think your DNS service might be online and that's why you face these issues.
Also, thanks for the information to your false positive alarm. Maybe you've already seen the VirusTotal.com link in my second post. You'll find TONS of false reports there.
Oh and by the way, actually, I'm using exactly the same hosts sources as the AdAway app on Android does.
Click to expand...
Click to collapse
Thanks for the app. I've already reported it as false positive to bitdefender so hopefully they solve it soon.
Makorus said:
Hi again
That's really strange, but this might be an issue with Windows 10/Microsoft Edge. I haven't tried yet how the hosts file reacts on a Windows 10 device. But I've got a Windows 10 device at home, so I'm gonna try it out as soon as possible and report back.
In the mean time, would you be so kind and post the version 1.5 log file? I think your DNS service might be online and that's why you face these issues.
Also, thanks for the information to your false positive alarm. Maybe you've already seen the VirusTotal.com link in my second post. You'll find TONS of false reports there.
Oh and by the way, actually, I'm using exactly the same hosts sources as the AdAway app on Android does.
Click to expand...
Click to collapse
Hi here is the log file you have asked for, i hope this helps. Also a little update, i went ahead and converted the hosts file to .txt, and had removed the very first empty line, after i put it back, this removed the lag from Microsoft Edge, however the ads still popped up after everything else loaded.
UPDATE: I have done some digging and discovered that the first line of the "hosts" file has to be "127.0.0.1 localhost" for this to work, also I used the host sources in your created hosts file and added more from other websites and made this one, it seems to work for me on windows 10/Microsoft edge, have not yet tried on other platforms.
Instructions:
1. Download the file hosts.txt below
2 Copy hosts.txt in the C:/Windows/system32/drivers/etc
3. Backup your current hosts file (ie. copy and paste it to somewhere safe. (Desktop?)
4. Delete the hosts your original hosts file in the C:/Windows/system32/drivers/etc
5. Rename the hosts.txt to hosts
credit goes to: @Makorus and http://winhelp2002.mvps.org/
UPDATE NOTE: I'm assuming that some of the hosts files from Adaway that Makorus used in his hosts file seem to be android specific, the reason I'm mentioning this is because earlier on in the project I created a file only using those sources the result being that the ads would load after the page itself loaded. However when I also added the hosts from the above website it seemed to have worked perfectly, more testing would need to be done, but it seems to work
Hello everyone
I just released a new build, version 1.5.1.
From now on, I'll use 3 numbers for a better versioning. Creating a version 1.6 for a tiny bug fix from version 1.5 would be a bit too heavy.
@mrTGF to be honest, I'm unable to reproduce your issue on my Windows 10 device, no issues on my Windows 10 device at all. Would you be so kind, download the new version 1.5.1 and give it a try?
I just realized your log file isn't complete. Did you cut the last few lines of the log files on your own? If not, the script has been terminated unexpectedly. Here's an example of a "complete" log file.
Code:
***************************************************************************************************
Started processing at [08/11/2015 22:16:36].
***************************************************************************************************
Running script version 1.5.1.
***************************************************************************************************
Checking for existing hostslist.ini file...
Didn't find existing hostslist.ini file - using default list...
Checking for existing whitelist.ini file...
Didn't find existing whitelist.ini file - using default list...
Checking whether the 'C:\Users\Makorus\Desktop\DL_Cache\' folder exists...
Download cache folder not found. Creating empty download cache folder...
Successfully created the download cache folder!
Starting download process for 'hosts' sources...
Downloading hosts file from: http://hostsfile.org/Downloads/hosts.txt
Downloading hosts file to: C:\Users\Makorus\Desktop\DL_Cache\1_source-hosts.txt
Downloading hosts file from: http://someonewhocares.org/hosts/zero/hosts
Downloading hosts file to: C:\Users\Makorus\Desktop\DL_Cache\2_source-hosts.txt
Downloading hosts file from: http://winhelp2002.mvps.org/hosts.txt
Downloading hosts file to: C:\Users\Makorus\Desktop\DL_Cache\3_source-hosts.txt
Downloading hosts file from: http://adaway.org/hosts.txt
Downloading hosts file to: C:\Users\Makorus\Desktop\DL_Cache\4_source-hosts.txt
Downloading hosts file from: http://pgl.yoyo.org/as/serverlist.php?hostformat=hosts&showintro=0&mimetype=plaintext
Downloading hosts file to: C:\Users\Makorus\Desktop\DL_Cache\5_source-hosts.txt
Downloading hosts file from: http://www.malwaredomainlist.com/hostslist/hosts.txt
Downloading hosts file to: C:\Users\Makorus\Desktop\DL_Cache\6_source-hosts.txt
Finished download process!
Merging all hosts files into one big file, ignoring comment lines and duplicates, sorting and trimming lines...
Applying patch table...
Applying patch for '\t'...
Applying patch for ' {2,}'...
Applying patch for '0.0.0.0'...
Applying patch for 'hostsfile.org'...
Applying patch for 'someonewhocares.org'...
Applying patch for 'winhelp2002.mvps.org'...
Applying patch for 'adaway.org'...
Applying patch for 'pgl.yoyo.org'...
Applying patch for 'malwaredomainlist.com'...
Applying patch for 'bit.ly'...
Applying patch for 'spotify.com'...
Successfully finished apply process!
Creating new 'hosts' file, ready to be used...
Successfully created the 'hosts' file!
DNS Cache service is already disabled. It's safe to apply your new hosts file now!
Finished the PowerShell AdBlock script!
Elapsed time: 19.7985844 seconds
***************************************************************************************************
Finished processing at [08/11/2015 22:16:55].
***************************************************************************************************
I did not make any changes to the file, that is exact output I received from the process, If you look at my last post you will notice that I resolved the issue by formatting the hosts file differently and adding more sources.
Makorus said:
Hello everyone
I just released a new build, version 1.5.1.
From now on, I'll use 3 numbers for a better versioning. Creating a version 1.6 for a tiny bug fix from version 1.5 would be a bit too heavy.
@mrTGF to be honest, I'm unable to reproduce your issue on my Windows 10 device, no issues on my Windows 10 device at all. Would you be so kind, download the new version 1.5.1 and give it a try?
I just realized your log file isn't complete. Did you cut the last few lines of the log files on your own? If not, the script has been terminated unexpectedly. Here's an example of a "complete" log file.
Code:
***************************************************************************************************
Started processing at [08/11/2015 22:16:36].
***************************************************************************************************
Running script version 1.5.1.
***************************************************************************************************
Checking for existing hostslist.ini file...
Didn't find existing hostslist.ini file - using default list...
Checking for existing whitelist.ini file...
Didn't find existing whitelist.ini file - using default list...
Checking whether the 'C:\Users\Makorus\Desktop\DL_Cache\' folder exists...
Download cache folder not found. Creating empty download cache folder...
Successfully created the download cache folder!
Starting download process for 'hosts' sources...
Downloading hosts file from: http://hostsfile.org/Downloads/hosts.txt
Downloading hosts file to: C:\Users\Makorus\Desktop\DL_Cache\1_source-hosts.txt
Downloading hosts file from: http://someonewhocares.org/hosts/zero/hosts
Downloading hosts file to: C:\Users\Makorus\Desktop\DL_Cache\2_source-hosts.txt
Downloading hosts file from: http://winhelp2002.mvps.org/hosts.txt
Downloading hosts file to: C:\Users\Makorus\Desktop\DL_Cache\3_source-hosts.txt
Downloading hosts file from: http://adaway.org/hosts.txt
Downloading hosts file to: C:\Users\Makorus\Desktop\DL_Cache\4_source-hosts.txt
Downloading hosts file from: http://pgl.yoyo.org/as/serverlist.php?hostformat=hosts&showintro=0&mimetype=plaintext
Downloading hosts file to: C:\Users\Makorus\Desktop\DL_Cache\5_source-hosts.txt
Downloading hosts file from: http://www.malwaredomainlist.com/hostslist/hosts.txt
Downloading hosts file to: C:\Users\Makorus\Desktop\DL_Cache\6_source-hosts.txt
Finished download process!
Merging all hosts files into one big file, ignoring comment lines and duplicates, sorting and trimming lines...
Applying patch table...
Applying patch for '\t'...
Applying patch for ' {2,}'...
Applying patch for '0.0.0.0'...
Applying patch for 'hostsfile.org'...
Applying patch for 'someonewhocares.org'...
Applying patch for 'winhelp2002.mvps.org'...
Applying patch for 'adaway.org'...
Applying patch for 'pgl.yoyo.org'...
Applying patch for 'malwaredomainlist.com'...
Applying patch for 'bit.ly'...
Applying patch for 'spotify.com'...
Successfully finished apply process!
Creating new 'hosts' file, ready to be used...
Successfully created the 'hosts' file!
DNS Cache service is already disabled. It's safe to apply your new hosts file now!
Finished the PowerShell AdBlock script!
Elapsed time: 19.7985844 seconds
***************************************************************************************************
Finished processing at [08/11/2015 22:16:55].
***************************************************************************************************
Click to expand...
Click to collapse

Categories

Resources