[TOOL]Charged Notifcation Remover (Samsung Based) - Android Software Development

Charged Notification Remover​
Description:
Made this little app a while ago but forgot to post it on the forums, basically it removes the battery charged notification from any Samsung based SystemUI.apk (deodexed of course). It may also work on SystemUI.apk files from other vendors, but I'm not sure
Requirements:
- Java (JRE OR JDK)
- SystemUI.apk
Instructions:
1. Unpack
2. Run Charged_Notifcation_Remover.exe
3. Choose the desired SystemUI.apk
4. Wait until the process is complete
5. Copy SystemUI.apk from the finished_apks folder to your sdcard
6. Copy SystemUI.apk from your sdcard to /system/app
7. Set permissions to RW-R-R
8. Reboot
Download:​
Download v1.0
http://www.mediafire.com/?7jahopdtvwnybe1

Since this app is open source, here are the sources:
Charged_Notifcation_Remover.au3
Code:
#include <Process.au3>
#include <File.au3>
$openfile = FileOpenDialog("Charged Notifcation Remover - Please choose a Samsung based SystemUI.apk", @WorkingDir, "APK Files (*.apk)", 1, "SystemUI.apk")
If @error Then
MsgBox(16, "Charged Notifcation Remover", "Aborted..")
Exit
Else
If FileExists(@ScriptDir & "\classes.dex") Then FileDelete(@ScriptDir & "\classes.dex")
If FileExists(@ScriptDir & "\out.dex") Then FileDelete(@ScriptDir & "\out.dex")
If FileExists(@ScriptDir & "\SystemUI.apk") Then FileDelete(@ScriptDir & "\SystemUI.apk")
If FileExists(@ScriptDir & "\SystemUI.zip") Then FileDelete(@ScriptDir & "\SystemUI.zip")
If FileExists(@ScriptDir & "\finished_apks\SystemUI.apk") Then FileDelete(@ScriptDir & "\finished_apks\SystemUI.apk")
If FileExists(@ScriptDir & "\finished_apks\SystemUI.zip") Then FileDelete(@ScriptDir & "\finished_apks\SystemUI.zip")
FileCopy($openfile, @ScriptDir & "\SystemUI.apk")
EndIf
DirRemove(@ScriptDir & "\dexout", 1)
If FileExists(@ScriptDir & "\finished_apks\SystemUI.apk.backup") Then FileDelete(@ScriptDir & "\finished_apks\SystemUI.apk.backup")
FileCopy(@ScriptDir & "\SystemUI.apk", @ScriptDir & "\finished_apks\SystemUI.apk.backup")
SplashTextOn("Charged Notifcation Remover", "Status: Making backup...", 250, 40, -1, -1, 4, "Verdana", 10, 400)
Sleep(100)
FileDelete(@TempDir & "\results.txt")
Func _StringSearchInFile($file, $qry)
_RunDos("find /n /i """ & $qry & """ " & $file & " >> " & @TempDir & "\results.txt")
If Not @error Then
FileSetAttrib(@TempDir & "\results.txt", "-N+H+T", 0)
$CHARS = FileGetSize(@TempDir & "\results.txt")
Return FileRead(@TempDir & "\results.txt", $CHARS) & @CRLF
EndIf
EndFunc ;==>_StringSearchInFile
SplashTextOn("Charged Notifcation Remover", "Status: Extracting...", 250, 40, -1, -1, 4, "Verdana", 10, 400)
Sleep(100)
RunWait(@ScriptDir & "\extract.bat", "", @SW_HIDE)
SplashTextOn("Charged Notifcation Remover", "Status: Deodexing...", 250, 40, -1, -1, 4, "Verdana", 10, 400)
RunWait(@ScriptDir & "\deodex.bat", "", @SW_HIDE)
FileDelete(@TempDir & "\results.txt")
SplashTextOn("Charged Notifcation Remover", "Status: Determine lines...", 250, 40, -1, -1, 4, "Verdana", 10, 400)
$search1 = _StringSearchInFile(@ScriptDir & "\dexout\com\android\systemui\statusbar\policy\StatusBarPolicy.smali", "Landroid/app/NotificationManager;->notify(ILandroid/app/Notification;)V")
$readfirst = FileReadLine(@TempDir & "\results.txt", 3)
$readchars1 = StringLeft($readfirst, 5)
$startline = StringRight($readchars1, 4)
ConsoleWrite($startline & @CRLF)
FileDelete(@TempDir & "\results.txt")
$search2 = _StringSearchInFile(@ScriptDir & "\dexout\com\android\systemui\statusbar\policy\StatusBarPolicy.smali", "Lcom/android/systemui/statusbar/policy/StatusBarPolicy;->turnOnScreenWithForce()V")
$readsecond = FileReadLine(@TempDir & "\results.txt", 3)
$readchars2 = StringLeft($readsecond, 5)
$endline = StringRight($readchars2, 4)
$linecount = $endline - $startline
;~ FileDelete(@TempDir&"\results.txt")
$linecount = $endline - $startline
ConsoleWrite($linecount)
If $linecount > 12 Or $linecount < 8 Then
MsgBox(16, "Error", "Charged Notification lines are not found" & @CRLF & @CRLF & "Possible Reasons:" & @CRLF & "- No Samsung SystemUI.apk" & @CRLF & "- Already removed the charged notification")
Exit
Else
SplashTextOn("Charged Notifcation Remover", "Status: Deleting Line: " & $startline & "...", 250, 40, -1, -1, 4, "Verdana", 10, 400)
_FileWriteToLine(@ScriptDir & "\dexout\com\android\systemui\statusbar\policy\StatusBarPolicy.smali", $startline, " ", 1)
Sleep(500)
SplashTextOn("Charged Notifcation Remover", "Status: Deleting Line: " & $endline - 3 & "...", 250, 40, -1, -1, 4, "Verdana", 10, 400)
_FileWriteToLine(@ScriptDir & "\dexout\com\android\systemui\statusbar\policy\StatusBarPolicy.smali", $endline - 3, " ", 1)
Sleep(500)
SplashTextOn("Charged Notifcation Remover", "Status: Deleting Line: " & $endline & "...", 250, 40, -1, -1, 4, "Verdana", 10, 400)
_FileWriteToLine(@ScriptDir & "\dexout\com\android\systemui\statusbar\policy\StatusBarPolicy.smali", $endline, " ", 1)
Sleep(500)
EndIf
SplashTextOn("Charged Notifcation Remover", "Status: Compiling classes.dex...", 250, 40, -1, -1, 4, "Verdana", 10, 400)
RunWait(@ScriptDir & "\compile.bat", "", @SW_HIDE)
Sleep(100)
DirRemove(@ScriptDir & "\dexout", 1)
SplashTextOn("Charged Notifcation Remover", "Status: Updating SystemUI.apk...", 250, 40, -1, -1, 4, "Verdana", 10, 400)
RunWait(@ScriptDir & "\addfiles.bat", "", @SW_HIDE)
Sleep(100)
SplashTextOn("Charged Notifcation Remover", "Status: Moving..", 250, 40, -1, -1, 4, "Verdana", 10, 400)
Sleep(100)
SplashTextOn("Charged Notifcation Remover", "Status: Done!", 250, 40, -1, -1, 4, "Verdana", 10, 400)
Sleep(500)
SplashOff()
ShellExecute(@ScriptDir & "\finished_apks", "", "", "open", @SW_SHOW)
MsgBox(0, "Removed Charged Notification", "Thanks for using this tool, coded by: broodplank1337 @ XDA")
Exit
extract.bat
Code:
@echo off
cd /d %~dp0
move SystemUI.apk SystemUI.zip
7za.exe x -y SystemUI.zip *.dex
deodex.bat
Code:
@echo off
cd /d %~dp0
java -jar baksmali-1.3.2.jar -o dexout/ classes.dex
addfiles.bat
Code:
@echo off
cd /d %~dp0
move out.dex classes.dex
7za.exe u SystemUI.zip classes.dex
move SystemUI.zip finished_apks/SystemUI.apk
del classes.dex

Related

[WinXP Script] Extend Search Companion

Annoyed by the fact that Search Companion doesn't return the text string you specified even though you indicated All Files & Folders?
This handy script allows you to extend the PersistenHandlers to include other extension. In my case, I added: provxml and rgu. Copy and paste the following code into notepad and save as a .VB script (ex: xp_persisthandler.vbs). Execute the script and specifiy the file extension you wish to include in Search Companion.
Code:
'Add files to Search for files containing text
'© Doug Knox - 11/04/2001
'This code may be freely distributed/modified
Option Explicit
On Error Resume Next
Dim WshShell, N, P, P1, P2, ItemType, MyBox, FileType, Title, Prompt, RegKey, X
Set WSHShell = WScript.CreateObject("WScript.Shell")
P = "HKEY_CLASSES_ROOT\."
P1 = "\PersistentHandler\"
N = "{5e941d80-bf96-11cd-b579-08002b30bfeb}"
Prompt = "Enter the file extension for the file you wish to add." & vbCR
Prompt = Prompt & "Examples: txt, adm, inf"
Title = "Enter File Type"
FileType = InputBox(Prompt, Title, "")
If FileType = "" Then
MyBox = MsgBox("You left the box blank.",4096,"Error.")
Set WshShell = Nothing
WScript.Quit
Else
'Check to see if there is already a PersistentHandler default value
RegKey = P & FileType & P1
X = WshShell.RegRead(RegKey)
End If
'MyBox = MsgBox("The PersistentHandler value for ." & FileType & " is: " & X,4096,"Results")
'Set WshShell = Nothing
If X = N Then
MyBox = MsgBox("This value already exists, and is correct." & vbCR & "No Changes were made.", 4096, "No Changes")
Set WshShell = Nothing
WScript.Quit
End If
If X <> N AND X <> "" Then
MyBox = MsgBox("The Persistent Handler value already exists and is different." & vbCR & "No changes were made.", 4096, "No Changes")
Set WshShell = Nothing
WScript.Quit
End If
If Err.Number <> 0 Then
WshShell.RegWrite RegKey, N
MyBox = MsgBox("The Registry has been updated." & vbCR & "Restart your computer.", 4096, "Done")
Set WshShell = Nothing
End If

adb server takes a long time to start (~3 minutes!)(was "adb no output & not ending")

adb server takes a long time to start (~3 minutes!)(was "adb no output & not ending")
Problem with adb here. It doesn't end. 'adb devices' or 'adb shell' or 'adb start-server' or whatever except for 'adb' and 'adb --help' just don't end. They give out a newline or two and don't take any cpu, they seem to wait on inet_wait_for_connect and the files they have open are /dev/pts/2 and localhost port 5037. Does this make sense to anyone? I've got:
Code:
/etc/udev/rules.d/90-android.rules
SUBSYSTEM=="usb", SYSFS{idVendor}=="0bb4", MODE="0666"
SUBSYSTEM=="usb",ATTR{idVendor}=="0bb4",ATTR{idProduct}=="0c02",SYMLINK+="android_adb"
SUBSYSTEM=="usb",ATTR{idVendor}=="0bb4",ATTR{idProduct}=="0c01",SYMLINK+="android_fastboot"
But the files /dev/sdb and /dev/sg2 created for device are:
Code:
brw-rw---- 1 root disk 8, 16 2010-02-15 18:11 /dev/sdb
crw-rw---- 1 root disk 21, 2 2010-02-15 18:11 /dev/sg2
Even if I change these files to 0777 it doesn't work.
Anyone any ideas?
Note that I remember once it worked. One time. I'm not sure what did it.
Code:
Linux dawn-desktop 2.6.31-19-generic #56-Ubuntu SMP Thu Jan 28 01:26:53 UTC 2010 i686 GNU/Linux
strace:
Code:
19:41:35.655481 execve("/home/dawn/CyanogenMod/android-sdk/tools/adb", ["adb", "devices"], [/* 41 vars */]) = 0
19:41:35.656426 brk(0) = 0x83f1000
19:41:35.656575 access("/etc/ld.so.nohwcap", F_OK) = -1 ENOENT (No such file or directory)
19:41:35.656726 mmap2(NULL, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0xb7796000
19:41:35.656850 readlink("/proc/self/exe", "/home/dawn/CyanogenMod/android-sdk/tools/adb", 4096) = 44
19:41:35.657072 access("/etc/ld.so.preload", R_OK) = -1 ENOENT (No such file or directory)
19:41:35.657189 open("/home/dawn/CyanogenMod/android-sdk/tools/../lib/tls/i686/sse2/cmov/librt.so.1", O_RDONLY) = -1 ENOENT (No such file or directory)
19:41:35.657376 stat64("/home/dawn/CyanogenMod/android-sdk/tools/../lib/tls/i686/sse2/cmov", 0xbff4104c) = -1 ENOENT (No such file or directory)
19:41:35.657504 open("/home/dawn/CyanogenMod/android-sdk/tools/../lib/tls/i686/sse2/librt.so.1", O_RDONLY) = -1 ENOENT (No such file or directory)
19:41:35.657630 stat64("/home/dawn/CyanogenMod/android-sdk/tools/../lib/tls/i686/sse2", 0xbff4104c) = -1 ENOENT (No such file or directory)
19:41:35.657749 open("/home/dawn/CyanogenMod/android-sdk/tools/../lib/tls/i686/cmov/librt.so.1", O_RDONLY) = -1 ENOENT (No such file or directory)
19:41:35.657873 stat64("/home/dawn/CyanogenMod/android-sdk/tools/../lib/tls/i686/cmov", 0xbff4104c) = -1 ENOENT (No such file or directory)
19:41:35.657992 open("/home/dawn/CyanogenMod/android-sdk/tools/../lib/tls/i686/librt.so.1", O_RDONLY) = -1 ENOENT (No such file or directory)
19:41:35.658111 stat64("/home/dawn/CyanogenMod/android-sdk/tools/../lib/tls/i686", 0xbff4104c) = -1 ENOENT (No such file or directory)
19:41:35.658227 open("/home/dawn/CyanogenMod/android-sdk/tools/../lib/tls/sse2/cmov/librt.so.1", O_RDONLY) = -1 ENOENT (No such file or directory)
19:41:35.658354 stat64("/home/dawn/CyanogenMod/android-sdk/tools/../lib/tls/sse2/cmov", 0xbff4104c) = -1 ENOENT (No such file or directory)
19:41:35.658473 open("/home/dawn/CyanogenMod/android-sdk/tools/../lib/tls/sse2/librt.so.1", O_RDONLY) = -1 ENOENT (No such file or directory)
19:41:35.658593 stat64("/home/dawn/CyanogenMod/android-sdk/tools/../lib/tls/sse2", 0xbff4104c) = -1 ENOENT (No such file or directory)
19:41:35.658709 open("/home/dawn/CyanogenMod/android-sdk/tools/../lib/tls/cmov/librt.so.1", O_RDONLY) = -1 ENOENT (No such file or directory)
19:41:35.658829 stat64("/home/dawn/CyanogenMod/android-sdk/tools/../lib/tls/cmov", 0xbff4104c) = -1 ENOENT (No such file or directory)
19:41:35.658945 open("/home/dawn/CyanogenMod/android-sdk/tools/../lib/tls/librt.so.1", O_RDONLY) = -1 ENOENT (No such file or directory)
19:41:35.659061 stat64("/home/dawn/CyanogenMod/android-sdk/tools/../lib/tls", 0xbff4104c) = -1 ENOENT (No such file or directory)
19:41:35.659172 open("/home/dawn/CyanogenMod/android-sdk/tools/../lib/i686/sse2/cmov/librt.so.1", O_RDONLY) = -1 ENOENT (No such file or directory)
19:41:35.659296 stat64("/home/dawn/CyanogenMod/android-sdk/tools/../lib/i686/sse2/cmov", 0xbff4104c) = -1 ENOENT (No such file or directory)
19:41:35.659415 open("/home/dawn/CyanogenMod/android-sdk/tools/../lib/i686/sse2/librt.so.1", O_RDONLY) = -1 ENOENT (No such file or directory)
19:41:35.659537 stat64("/home/dawn/CyanogenMod/android-sdk/tools/../lib/i686/sse2", 0xbff4104c) = -1 ENOENT (No such file or directory)
19:41:35.659651 open("/home/dawn/CyanogenMod/android-sdk/tools/../lib/i686/cmov/librt.so.1", O_RDONLY) = -1 ENOENT (No such file or directory)
19:41:35.659774 stat64("/home/dawn/CyanogenMod/android-sdk/tools/../lib/i686/cmov", 0xbff4104c) = -1 ENOENT (No such file or directory)
19:41:35.659889 open("/home/dawn/CyanogenMod/android-sdk/tools/../lib/i686/librt.so.1", O_RDONLY) = -1 ENOENT (No such file or directory)
19:41:35.660007 stat64("/home/dawn/CyanogenMod/android-sdk/tools/../lib/i686", 0xbff4104c) = -1 ENOENT (No such file or directory)
19:41:35.660119 open("/home/dawn/CyanogenMod/android-sdk/tools/../lib/sse2/cmov/librt.so.1", O_RDONLY) = -1 ENOENT (No such file or directory)
19:41:35.660242 stat64("/home/dawn/CyanogenMod/android-sdk/tools/../lib/sse2/cmov", 0xbff4104c) = -1 ENOENT (No such file or directory)
19:41:35.660359 open("/home/dawn/CyanogenMod/android-sdk/tools/../lib/sse2/librt.so.1", O_RDONLY) = -1 ENOENT (No such file or directory)
19:41:35.660477 stat64("/home/dawn/CyanogenMod/android-sdk/tools/../lib/sse2", 0xbff4104c) = -1 ENOENT (No such file or directory)
19:41:35.660589 open("/home/dawn/CyanogenMod/android-sdk/tools/../lib/cmov/librt.so.1", O_RDONLY) = -1 ENOENT (No such file or directory)
19:41:35.660709 stat64("/home/dawn/CyanogenMod/android-sdk/tools/../lib/cmov", 0xbff4104c) = -1 ENOENT (No such file or directory)
19:41:35.660822 open("/home/dawn/CyanogenMod/android-sdk/tools/../lib/librt.so.1", O_RDONLY) = -1 ENOENT (No such file or directory)
19:41:35.660937 stat64("/home/dawn/CyanogenMod/android-sdk/tools/../lib", 0xbff4104c) = -1 ENOENT (No such file or directory)
19:41:35.661046 open("/etc/ld.so.cache", O_RDONLY) = 3
19:41:35.661138 fstat64(3, {st_mode=S_IFREG|0644, st_size=81229, ...}) = 0
19:41:35.661307 mmap2(NULL, 81229, PROT_READ, MAP_PRIVATE, 3, 0) = 0xb7782000
19:41:35.661387 close(3) = 0
19:41:35.661466 access("/etc/ld.so.nohwcap", F_OK) = -1 ENOENT (No such file or directory)
19:41:35.661581 open("/lib/tls/i686/cmov/librt.so.1", O_RDONLY) = 3
19:41:35.661683 read(3, "\177ELF\1\1\1\0\0\0\0\0\0\0\0\0\3\0\3\0\1\0\0\0\300\30\0\0004\0\0\0"..., 512) = 512
19:41:35.661804 fstat64(3, {st_mode=S_IFREG|0644, st_size=30684, ...}) = 0
19:41:35.661938 mmap2(NULL, 33364, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x250000
19:41:35.662025 mmap2(0x257000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x6) = 0x257000
19:41:35.662164 close(3) = 0
19:41:35.662249 access("/etc/ld.so.nohwcap", F_OK) = -1 ENOENT (No such file or directory)
19:41:35.662353 open("/lib/libncurses.so.5", O_RDONLY) = 3
19:41:35.662449 read(3, "\177ELF\1\1\1\0\0\0\0\0\0\0\0\0\3\0\3\0\1\0\0\0\240\223\0\0004\0\0\0"..., 512) = 512
19:41:35.662570 fstat64(3, {st_mode=S_IFREG|0644, st_size=223768, ...}) = 0
19:41:35.662929 mmap2(NULL, 227536, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x8b3000
19:41:35.663022 mprotect(0x8e7000, 4096, PROT_NONE) = 0
19:41:35.663111 mmap2(0x8e8000, 12288, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x34) = 0x8e8000
19:41:35.663246 close(3) = 0
19:41:35.663333 access("/etc/ld.so.nohwcap", F_OK) = -1 ENOENT (No such file or directory)
19:41:35.663440 open("/lib/tls/i686/cmov/libpthread.so.0", O_RDONLY) = 3
19:41:35.663551 read(3, "\177ELF\1\1\1\0\0\0\0\0\0\0\0\0\3\0\3\0\1\0\0\0PI\0\0004\0\0\0"..., 512) = 512
19:41:35.663666 fstat64(3, {st_mode=S_IFREG|0755, st_size=116920, ...}) = 0
19:41:35.663794 mmap2(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0xb7781000
19:41:35.663893 mmap2(NULL, 98792, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0xb51000
19:41:35.663976 mmap2(0xb66000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x14) = 0xb66000
19:41:35.664088 mmap2(0xb68000, 4584, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0xb68000
19:41:35.664192 close(3) = 0
19:41:35.664276 access("/etc/ld.so.nohwcap", F_OK) = -1 ENOENT (No such file or directory)
19:41:35.664837 open("/usr/lib/libstdc++.so.6", O_RDONLY) = 3
19:41:35.664974 read(3, "\177ELF\1\1\1\0\0\0\0\0\0\0\0\0\3\0\3\0\1\0\0\0`r\4\0004\0\0\0"..., 512) = 512
19:41:35.665097 fstat64(3, {st_mode=S_IFREG|0644, st_size=962800, ...}) = 0
19:41:35.669018 mmap2(NULL, 988044, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x2a1000
19:41:35.669171 mmap2(0x387000, 20480, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0xe6) = 0x387000
19:41:35.669885 mmap2(0x38c000, 25484, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x38c000
19:41:35.670033 close(3) = 0
19:41:35.670128 access("/etc/ld.so.nohwcap", F_OK) = -1 ENOENT (No such file or directory)
19:41:35.670252 open("/lib/tls/i686/cmov/libm.so.6", O_RDONLY) = 3
19:41:35.670361 read(3, "\177ELF\1\1\1\0\0\0\0\0\0\0\0\0\3\0\3\0\1\0\0\0`4\0\0004\0\0\0"..., 512) = 512
19:41:35.670482 fstat64(3, {st_mode=S_IFREG|0644, st_size=149392, ...}) = 0
19:41:35.670619 mmap2(NULL, 151680, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x110000
19:41:35.670709 mmap2(0x134000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x23) = 0x134000
19:41:35.670836 close(3) = 0
19:41:35.670921 access("/etc/ld.so.nohwcap", F_OK) = -1 ENOENT (No such file or directory)
19:41:35.671037 open("/lib/libgcc_s.so.1", O_RDONLY) = 3
19:41:35.671131 read(3, "\177ELF\1\1\1\0\0\0\0\0\0\0\0\0\3\0\3\0\1\0\0\0p#\0\0004\0\0\0"..., 512) = 512
19:41:35.671243 fstat64(3, {st_mode=S_IFREG|0644, st_size=116272, ...}) = 0
19:41:35.671377 mmap2(NULL, 119336, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x9f3000
19:41:35.671461 mmap2(0xa0f000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x1b) = 0xa0f000
19:41:35.671587 close(3) = 0
19:41:35.671671 access("/etc/ld.so.nohwcap", F_OK) = -1 ENOENT (No such file or directory)
19:41:35.671775 open("/lib/tls/i686/cmov/libc.so.6", O_RDONLY) = 3
19:41:35.671875 read(3, "\177ELF\1\1\1\0\0\0\0\0\0\0\0\0\3\0\3\0\1\0\0\0\260l\1\0004\0\0\0"..., 512) = 512
19:41:35.671989 fstat64(3, {st_mode=S_IFREG|0755, st_size=1319364, ...}) = 0
19:41:35.672168 mmap2(NULL, 1329512, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x393000
19:41:35.672255 mprotect(0x4d1000, 4096, PROT_NONE) = 0
19:41:35.672339 mmap2(0x4d2000, 12288, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x13e) = 0x4d2000
19:41:35.672454 mmap2(0x4d5000, 10600, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x4d5000
19:41:35.672558 close(3) = 0
19:41:35.672659 access("/etc/ld.so.nohwcap", F_OK) = -1 ENOENT (No such file or directory)
19:41:35.672761 open("/lib/tls/i686/cmov/libdl.so.2", O_RDONLY) = 3
19:41:35.672868 read(3, "\177ELF\1\1\1\0\0\0\0\0\0\0\0\0\3\0\3\0\1\0\0\[email protected]\n\0\0004\0\0\0"..., 512) = 512
19:41:35.672985 fstat64(3, {st_mode=S_IFREG|0644, st_size=9736, ...}) = 0
19:41:35.673117 mmap2(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0xb7780000
19:41:35.675821 mmap2(NULL, 12408, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x14a000
19:41:35.675975 mmap2(0x14c000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x1) = 0x14c000
19:41:35.676121 close(3) = 0
19:41:35.676313 mmap2(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0xb777f000
19:41:35.676409 set_thread_area({entry_number:-1 -> 6, base_addr:0xb777f8e0, limit:1048575, seg_32bit:1, contents:0, read_exec_only:0, limit_in_pages:1, seg_not_present:0, useable:1}) = 0
19:41:35.676576 mprotect(0x14c000, 4096, PROT_READ) = 0
19:41:35.676849 mprotect(0x4d2000, 8192, PROT_READ) = 0
19:41:35.676949 mprotect(0xa0f000, 4096, PROT_READ) = 0
19:41:35.677039 mprotect(0x134000, 4096, PROT_READ) = 0
19:41:35.678767 mprotect(0x387000, 16384, PROT_READ) = 0
19:41:35.678926 mprotect(0xb66000, 4096, PROT_READ) = 0
19:41:35.679098 mprotect(0x8e8000, 8192, PROT_READ) = 0
19:41:35.679191 mprotect(0x257000, 4096, PROT_READ) = 0
19:41:35.679301 mprotect(0x84a000, 4096, PROT_READ) = 0
19:41:35.679418 munmap(0xb7782000, 81229) = 0
19:41:35.679539 set_tid_address(0xb777f948) = 3758
19:41:35.679607 set_robust_list(0xb777f950, 0xc) = 0
19:41:35.679679 futex(0xbff415f0, FUTEX_WAKE_PRIVATE, 1) = 0
19:41:35.679759 futex(0xbff415f0, 0x189 /* FUTEX_??? */, 1, NULL, bff41600) = -1 EAGAIN (Resource temporarily unavailable)
19:41:35.679871 rt_sigaction(SIGRTMIN, {0xb55340, [], SA_SIGINFO}, NULL, 8) = 0
19:41:35.679989 rt_sigaction(SIGRT_1, {0xb55820, [], SA_RESTART|SA_SIGINFO}, NULL, 8) = 0
19:41:35.680085 rt_sigprocmask(SIG_UNBLOCK, [RTMIN RT_1], NULL, 8) = 0
19:41:35.680188 getrlimit(RLIMIT_STACK, {rlim_cur=8192*1024, rlim_max=RLIM_INFINITY}) = 0
19:41:35.680322 uname({sys="Linux", node="dawn-desktop", ...}) = 0
19:41:35.680857 socket(PF_INET, SOCK_STREAM, IPPROTO_IP) = 3
19:41:35.680998 connect(3, {sa_family=AF_INET, sin_port=htons(5037), sin_addr=inet_addr("127.0.0.1")}, 16
Well goodness me! It takes adbd three minutes to start!
What is the cause of that??
strace attached.
Search for where it says clone(.

Can the name of internal flashdrive programmatically found?

Hi,
I want to get out via a MortScript-routine the folder name of the internal flashdrive, e.x. \My Flash Drive. I wrote a routine that looks for all installed drives that are FAT/EXFAT formatted, but that down't help:
Code:
#TestDrivesFATFS.mscr
###########################################################################
#Searches all installed FATFS/exFAT drives except the one this script resides,
#because only those drives MioPocket can be installed on
###########################################################################
#
#Each filesystem is described in registry as
# [HKEY_LOCAL_MACHINE\System\StorageManager\Profiles\<MyProfileName>]
# "DefaultFileSystem"="<MyFileSystem>"
# "Folder"="<MyFolderName>"
Local()
#Obligatory coding as to be found in some MioPocket's scripts
Drive = "\" & Part(SystemPath("ScriptPath"), "\", 2)
#Test starts here
ExcludeDrive = Substr(Drive, 2)
DrivesFATFS = Array()
RegKey = "System\StorageManager\Profiles"
Idx = 0
#Walk the chain of profiles
ForEach variable In RegSubkeys("HKLM", RegKey)
ForEach value, contents In Regvalues("HKLM", RegKey & "\" & variable)
#Some newer CE devices know of exFAT format
If((value eq "DefaultFileSystem") AND (contents ne "FATFS") AND (contents ne "EXFAT"))
Break
EndIf
If((value eq "Folder") AND (contents ne ExcludeDrive))
Idx += 1
DrivesFATFS[Idx] = "\" & contents
EndIf
EndForEach
EndForEach
If(Debug)
ForEach drv in Array(DrivesFATFS)
Message(drv)
EndForeach
EndIf
Any help appriciated. TIA
It can be found in the Registry (at least in my WinMo 6.1... don't know if it's the same way in CE releases or other brands). Look in "HKLM\System\StorageManager\INAND" (or MMC instead of INAND...). The drive name is the "folder" string value).
Thanks for your reply. What I'm searching for is a hint how I can determine per software (MortScript), already having got ( with a piece of code as postet above ) a list of drive-names, which of those is the Storage Card and which is the Flash Drive, not by default knowing of the drive-names, because those differ from device to device.
Running the code above on my device (Medion PNA with CE 5) returns among others the names \Storage Card and/or \My Flash Disk, but this doesn't really help me a lot.
Thanks to all for your interest.
=> SOLVED IT BY MYSELF!
If you are interested in how I did it, here the code to detect the name of SD(HC), MMC, etc card:
Code:
ErrorLevel("warn")
sd = @FindSDDrives()
ForEach drv in Array(sd)
Message(drv)
EndForEach
Sub FindSDDrives()
Local()
SDProfiles = Array()
SDDrives = Array()
SDDrives2 = Array()
#All CE filesystem profiles related to Storage Cards are listet under
#[HKEY_LOCAL_MACHINE\Drivers\SDCARD\ClientDrivers\Class\******]
#E.x. MMC_Class, SDMemory_Class
idx = 0
RegKey = "Drivers\SDCARD\ClientDrivers\Class"
ForEach sdcard In RegSubkeys("HKLM", RegKey)
ForEach value, contents In RegValues("HKLM", RegKey & "\" & sdcard)
If(value eq "Profile")
idx += 1
SDProfiles[idx] = contents
EndIf
EndForEach
EndForEach
#Each CE filesystem is described in registry as
# [HKEY_LOCAL_MACHINE\System\StorageManager\Profiles\<MyProfileName>]
# "DefaultFileSystem"="<MyFileSystem>"
# "Folder"="<MyFolderName>"
# "Name"="<MyName>
idx = 0
RegKey = "System\StorageManager\Profiles"
ForEach profile in Array(SDProfiles)
ForEach value, contents In RegValues("HKLM", RegKey & "\" & profile)
If(value eq "Folder")
idx += 1
SDDrives[idx] = "\" & contents
EndIf
EndForeach
EndForEach
Clear(SDProfiles)
#Remove duplicates
idx = 0
idx2 = 0
prevdrv = ""
ForEach drv in Array(SDDrives)
idx += 1
If(SDDrives[idx] ne prevdrv)
idx2 += 1
prevdrv = SDDrives[idx]
SDDrives2[idx2] = prevdrv
EndIf
EndForEach
Clear(SDDrives)
Return(SDDrives2)
EndSub
Thanks
jwoegerbauer said:
Thanks to all for your interest.
=> SOLVED IT BY MYSELF!
If you are interested in how I did it, here the code to detect the name of SD(HC), MMC, etc card:
Click to expand...
Click to collapse
Usefull for XDA_UC build in like EnergyROMs. Don't try the German ROMs because of copying files from "Storage Crad" vs. "Speicherkarte" . Now thats solved.
Thanks.

About Fps cap

Before you read this thread, please understand my poor english... T T;
Dell streak have fps cap. (45fps)
The cause is same with evo 4g.
Go to htc-linux.org and search FPS, you can find Novatek NT35582/FPS Hack page.
Vsync framerate formula is
(1,000,000,000 x (1 / (T2 x (Lines + VPA)))) / 60 = LCD Frequency (hz)
http://www.mediafire.com/?cap0otpr062wxlr <- Datasheet
In datasheet, (at 259 page)
VPA/Parameter - B100H
T2/Parameter - B101H, B102H
T3/Parameter - B103H ...
Line = 800, VPA = 6, T2 Register = 0x1BC = 444
Then, FPS is
(1,000,000,000 x (1 / (444 x (800 + 6)))) / 60 = 46.572627218Hz
It's same for streak's vsynced fps. right?
And when
echo 32 > /sys/kernel/debug/msm_fb/0/bpp
or echo 16 > /sys/kernel/debug/msm_fb/0/bpp
, FPS will be increased. (50fps -> 56fps)
So if you modify T2 Register, vsync framerate will be change.
ex) 1. 0x78(376) = 55fps, 2. 0x86(390) = 53fps, 3. 0x9D(413) = 50fps (attached screecshot)
Attachment is vsync modules and module source file.
vsync.ko <- for 2.6.35.7-perf
vsyncDSC7.ko <- for 2.6.35.14-DSC-Team-Phoenix+
vsyncDSC71.ko <- for 2.6.35.14-DSC-Team-Phoenix
init.streak.post_boot.sh and install-recovery.sh are for use vsync module because
insmod /system/lib/modules/vsync.ko
auo_lcd_on=`busybox grep -w auo_lcd_on /proc/kallsyms|busybox sed -e "s/\([0-9A-Fa-f]\{8\}\).*/\1/"`
mddi_auo_prim_lcd_init=`busybox grep -w mddi_auo_prim_lcd_init /proc/kallsyms|busybox sed -e "s/\([0-9A-Fa-f]\{8\}\).*/\1/"`
echo 0x$auo_lcd_on > /proc/t2_register/auo_lcd_on_addr
echo 0x$mddi_auo_prim_lcd_init > /proc/t2_register/mddi_auo_prim_lcd_init_addr
and
mount -t debugfs debugfs /sys/kernel/debug
echo 32 > /sys/kernel/debug/msm_fb/0/bpp
are necessary.
Module will modify just two codes in lcd source (mddi_auo.c)
static void mddi_auo_prim_lcd_init(void)
{
printk(KERN_ERR "mddi_auo_prim_lcd_init()+\n");
...
mddi_queue_register_write(0xC700, 0x8B, FALSE, 0);
mddi_queue_register_write(0xB102, 0xBC, FALSE, 0);
mddi_queue_register_write(0x1100, 0, FALSE, 0);
...
printk(KERN_ERR "mddi_auo_prim_lcd_init()-\n");
}
static int auo_lcd_on(struct platform_device *pdev)
{
struct msm_fb_data_type *mfd;
...
mddi_queue_register_write(0x4401, 0x0000, FALSE, 0);
mddi_queue_register_write(0xB102, 0xBC, FALSE, 0);
write_multi_mddi_reg(auo_lcd_bkl_init_array);
....
printk(KERN_ERR "auo_lcd_on()-\n");
return 0;
}
There are two examples for setting parameters.
(Tested by Korea forum. Special thanks to SCOTT!!!)
1. Framerate patch v1 (vsync on)
T2 register = 367 (0x16F)
echo 367 > /proc/t2_register/value
2. Framerate patch v2 (vsync off)
T2 register = 361 (0x169)
echo 361 > /proc/t2_register/hz
echo 0 > /sys/kernel/debug/msm_fb/0/hw_vsync_mode
echo 0 > /sys/kernel/debug/msm_fb/0/vsync_enable
v2 is more smooth then v1, but more consume battery.
CM7 and MIUI use v2.
I hope that this thread is helpful for you.
...not? T T;;
Can I flash this streakmod recovery? What benfit would I get?
Thanks for your hard work
mrkavanagh said:
Can I flash this streakmod recovery? What benfit would I get?
Thanks for your hard work
Click to expand...
Click to collapse
This is modifications for the kernel, most/all of the custom kernels already have the fps cap turned off.

script mistake HELP

what is the mistake. after install is mistake in aroma-config line 245
Code:
calibrate("1.1041","26","1.1616","16","yes");
ini_set("customkeycode_up", "115");
ini_set("customkeycode_down", "114");
ini_set("customkeycode_select", "231");
ini_set("customkeycode_menu", "139");
ini_set("customkeycode_back", "158");
setcolor("winbg", "#444");
setcolor("winbg_g", "#222");
setcolor("textbg", "#333");
setcolor("textfg", "#fff");
setcolor("textfg_gray", "#bbb");
setcolor("controlbg", "#444");
setcolor("controlbg_g", "#222");
setcolor("controlfg", "#fff");
setcolor("selectbg", "#653");
setcolor("selectbg_g", "#542");
setcolor("selectfg", "#ffd");
setcolor("titlebg", "#333");
setcolor("titlebg_g", "#000");
setcolor("titlefg", "#fff");
setcolor("navbg", "#333");
setcolor("navbg_g", "#222");
setcolor("border", "#666");
setcolor("border_g", "#444");
ini_set("rom_name", "Pixeldroid Navigation Install");
ini_set("rom_version", "copilot/iGO8");
ini_set("rom_author", "Pixelfreak");
ini_set("rom_device", "HTC HD2");
ini_set("rom_date", "July 2012");
splash(5000, "sample");
anisplash(5, "splash/a1", 30, "splash/a2", 30, "splash/a3", 30, "splash/a4", 30, "splash/a5", 30, "splash/a6", 30, "splash/a7", 30, "splash/a8", 30, "splash/a9", 30, "splash/a10", 30, "splash/a11", 30, "splash/a12", 30, "splash/a13", 30, "splash/a14", 30, "splash/a15", 30, "splash/a16", 30, "splash/a17", 30, "splash/a18", 30, "splash/a19", 30, "splash/a20", 30, "splash/a21", 30, "splash/a22", 30);
setvar("sdextsize", getdisksize("/sd-ext","m"));
fontresload( "0", "ttf/DroidSans.ttf;ttf/DroidSansArabic.ttf;ttf/DroidSansFallback.ttf;", "12" ); #-- Use sets of font (Font Family)
if prop("lang.prop","selected.0")=="1" then
loadlang("langs/en.lang");
fontresload( "0", "ttf/DroidSans.ttf", "12" ); #-- "0" = Small Font ( Look at Fonts & UNICODE Demo Below )
fontresload( "1", "ttf/DroidSans.ttf", "18" ); #-- "1" = Big Font
endif;
if prop("lang.prop","selected.0")=="2" then
loadlang("langs/de.lang");
fontresload( "0", "ttf/DroidSans.ttf", "12" );
fontresload( "1", "ttf/DroidSans.ttf", "18" );
endif;
selectbox(
#-- Title
"<~themes.title>",
#-- Sub Title
"<~themes.desc>",
#-- Icon: <AROMA Resource Dir>/icons/personalize.png or <ThemeDir>/icon.personalize.png
"@personalize",
#-- Will be saved in /tmp/aroma/theme.prop
"theme.prop",
"Generic", "<~uaromai>", 0, #-- selected.0 = 1
"MIUI Theme", "<~mtbmaz>", 0, #-- selected.0 = 2
"ICS Theme", "<~icsbdaz>", 1, #-- selected.0 = 3
"MIUI 4 Theme", "<~m4icstbazl>", 0, #-- selected.0 = 4
"Sense Theme", "<~htcstbaz>", 0 #-- selected.0 = 5
);
if prop("theme.prop","selected.0")=="2" then
theme("miui");
endif;
if prop("theme.prop","selected.0")=="3" then
theme("ics");
endif;
if prop("theme.prop","selected.0")=="4" then
theme("miui4");
endif;
if prop("theme.prop","selected.0")=="5" then
theme("sense");
endif;
#-- Show Textbox
textbox(
#-- Title
"<~ssi>",
#-- Subtitle
"<~csinfo>",
#-- Icon
"@info",
#-- Text
getvar("sysinfo")
);
selectbox(
"<~selectromsetup>",
"<~pleaseselectromsetupbelow>",
"icons/install",
"rom.prop",
"<~pleasepickyourrom>","",2,
"Tmous ROM Install",
"1024 MB",0,
"EU ROM Install",
"512 MB",1
);
checkbox(
"<~chooselastminuteaddons>",
"<~stoywi>",
"icons/apps",
"lastminute.prop",
"<~copilot>","<~copilotinfo>",0,
"<~igo>","<~igoinfo>",0
);
ini_set("text_next", "<~installnow>");
viewbox(
#-- Title
"<~rti>",
#-- Text
"<~twirtbi> \n\n"+
"<~press> <b><~installnow></b> <~romnameirti> \n\n"+
"<~iywtrocaoyisp><b><~back></b>. <~pmk> -> <~qitetw>",
#-- Icon
"@install"
);
ini_set("text_next", "<~nnext>");
restotmp("exec_demo/sleep","sleep");
setvar("retstatus",
install(
#-- Title
"<~installing>",
#-- Installation Process message
"<~pwwiwi><b>"+ini_get("rom_name")+
"</b>. <~tmtsm> <~pntc>",
#-- Installation Icon
"@install",
#-- Installation Finish Message
"<~tiwhsi><b>"+ini_get("rom_name")+
"</b>. <~pntc>"
)
);
ini_set("text_next", "<~finish>");
checkviewbox(
#-- Title
"<~installationcompleted>",
#-- Text
"<#selectbg_g><b><~congratulations></b></#>\n\n"+
"<b>"+ini_get("rom_name")+"</b><~hbioyd>\n\n"+
"<~installerstatus>"+getvar("retstatus")+"\n\n",
#-- Icon
"@welcome",
#-- Checkbox Text
"<~rydn>",
#-- Initial Checkbox value ( 0=unchecked, 1=checked ) - (Optional, default:0)
"1",
#-- Save checked value in variable "reboot_it" (Optional)
"reboot_it"
);
if
getvar("reboot_it")=="1"
then
reboot("disable");
endif;

Categories

Resources