Theme Chooser themes, Windows, aapt, and uppercase letters in XML filenames - Android Themes

EDIT: A solution has been found, courtesy of XDA member titanic_fanatic, who compiled a Windows version of aapt that accepts uppercase letters in XML filenames! (Read his original message here.) I've attached it to this post. One of the biggest hurdles to effective theme creation in Windows is finally solved!
----------------------------------------------------------------------------------------​
Forgive me if this has already been asked, but I know that it's something that's annoyed theme developers under Windows for a while now. I seem to recall seeing hints about fixing this, but I've done search after search, and can't find it to save my life.
Theme Chooser theme developers under Windows are hobbled by the fact that XML filenames can't contain uppercase letters, which prevents us from theming certain applications (example: com_keramidas_TitaniumBackup.xml would be needed for Titanium Backup). I know that this is a problem related to aapt.exe. Has anyone come up with a workable solution for this issue? If not, I'd like to take a crack at it. I might not get anywhere, but I have nothing to lose.
Obviously, in order to do this, I'll need the source for it. I can do the heavy lifting regarding getting the source and working out how to compile it for Windows, but I need to know where the source is, what to get, and other requirements. If anyone can help and point me in the right direction(s), I'd really appreciate it!

MJPollard said:
Forgive me if this has already been asked, but I know that it's something that's annoyed theme developers under Windows for a while now. I seem to recall seeing hints about fixing this, but I've done search after search, and can't find it to save my life.
T-Mobile/CM7 theme developers under Windows are hobbled by the fact that XML filenames can't contain uppercase letters, which prevents us from theming certain applications (example: com_keramidas_TitaniumBackup.xml would be needed for Titanium Backup). I know that this is a problem related to aapt.exe. Has anyone come up with a workable solution for this issue? If not, I'd like to take a crack at it. I might not get anywhere, but I have nothing to lose.
Obviously, in order to do this, I'll need the source for it. I can do the heavy lifting regarding getting the source and working out how to compile it for Windows, but I need to know where the source is, what to get, and other requirements. If anyone can help and point me in the right direction(s), I'd really appreciate it!
Click to expand...
Click to collapse
Hmm .. + 1 with you .. but the only way is ... ask brut.all ....
Sent from my Galaxy Nexus using XDA App

qazsxdcfv said:
Hmm .. + 1 with you .. but the only way is ... ask brut.all ....
Click to expand...
Click to collapse
Thanks, I guess I'll have to after all (not that I mind doing it). Over 250 views and only one person to respond isn't giving me much hope that someone has an answer.

Have you found a solution for windows ?

Any solution?

Randomly came across this thread looking for info on compiling the aapt binary for Windows. I'm still looking for the answer for that but I do know the change that needs to be made and how to do that part, as I have already done this mod for aapt on Linux. You have to have a full build environment set up, and by that I mean set up to build a full ROM, like CM10 for example. The change to make is in the frameworks source code at frameworks/base/tools/aapt/Resource.cpp.
See this commit for the details:
http://review.cyanogenmod.org/#/c/24204/
Add the parts I highlighted in blue to the two lines below:
Code:
String16 baseName(it.getBaseName());
const char16_t* str = baseName.string();
const char16_t* const end = str + baseName.size();
while (str < end) {
if (!((*str >= 'a' && *str <= 'z')
[COLOR="RoyalBlue"][B]|| (*str >= 'A' && *str <= 'Z')[/B][/COLOR]
|| (*str >= '0' && *str <= '9')
|| *str == '_' || *str == '.')) {
fprintf(stderr, "%s: Invalid file name: must contain only [a-z[COLOR="RoyalBlue"][B]A-Z[/B][/COLOR]0-9_.]\n",
it.getPath().string());
hasErrors = true;
}
str++;
}

m4570d0n said:
Randomly came across this thread looking for info on compiling the aapt binary for Windows. I'm still looking for the answer for that but I do know the change that needs to be made and how to do that part, as I have already done this mod for aapt on Linux. You have to have a full build environment set up, and by that I mean set up to build a full ROM, like CM10 for example. The change to make is in the frameworks source code at frameworks/base/tools/aapt/Resource.cpp.
See this commit for the details:
http://review.cyanogenmod.org/#/c/24204/
Add the parts I highlighted in blue to the two lines below:
Code:
String16 baseName(it.getBaseName());
const char16_t* str = baseName.string();
const char16_t* const end = str + baseName.size();
while (str < end) {
if (!((*str >= 'a' && *str <= 'z')
[COLOR="RoyalBlue"][B]|| (*str >= 'A' && *str <= 'Z')[/B][/COLOR]
|| (*str >= '0' && *str <= '9')
|| *str == '_' || *str == '.')) {
fprintf(stderr, "%s: Invalid file name: must contain only [a-z[COLOR="RoyalBlue"][B]A-Z[/B][/COLOR]0-9_.]\n",
it.getPath().string());
hasErrors = true;
}
str++;
}
Click to expand...
Click to collapse
Thank you for your help but could you tell me where can I find frameworks/base/tools/aapt/Resource.cpp?
I don't understand where to find it?

Sorry to resurrect an old thread, but I've finally come across a Windows version of aapt.exe that accepts uppercase letters in XML filenames, courtesy of XDA user titanic_fanatic. I've modified the first post in the thread with the details. Happy theming!

MJPollard said:
Sorry to resurrect an old thread, but I've finally come across a Windows version of aapt.exe that accepts uppercase letters in XML filenames, courtesy of XDA user titanic_fanatic. I've modified the first post in the thread with the details. Happy theming!
Click to expand...
Click to collapse
That link does seem to work anymore (and the webpage gives malware warning in Norton).
Does anyone else have this file?

Related

how can i rebuild 'libhtcgeneric-ril.so'?

previous i posted about korean sms.. but no response.
So i can find a way rebuild '.so' file. but i couldnt..
i must add this code in libhtcgeneric-ril.so
msg = new String( inData, "KSC5601" );
'----------------------------------------------------------
void decode_cdma_sms(char *pdu, char *from, char *message, int *is_vm,int *msg_len) {
unsigned int i=1;
int code,length;
strcpy(from,"000000"); // in case something fails
strcpy(message,"UNKNOWN");
if (is_vm)
*is_vm = 0;
while(i*2<strlen(pdu)) {
get_code_and_length(pdu+i*2,&code,&length);
if(code==2) // from
decode_number(pdu+i*2+4,length,from);
if(code==8) // bearer_data
// probably code add. msg = new String( inData, "KSC5601" );
decode_bearer_data(pdu+i*2+4,length,message,is_vm,msg_len); i+=length+2;
}
}
please.. help me.
You need to have an Android source tree to rebuild any components. The xdandroid guide would be the quickest:
http://xdandroid.com/wiki/Getting_the_Source
Any rebuilds of the RIL need to be placed in /lib/froyo/ of the rootfs rather than /system/lib where Android puts it.
BTW htcgeneric-ril.so is C, while the line you want to add is Java. Are you sure thats the right place to patch it?
Thanks Tremere.
Tremere said:
You need to have an Android source tree to rebuild any components. The xdandroid guide would be the quickest:
http://xdandroid.com/wiki/Getting_the_Source
Any rebuilds of the RIL need to be placed in /lib/froyo/ of the rootfs rather than /system/lib where Android puts it.
BTW htcgeneric-ril.so is C, while the line you want to add is Java. Are you sure thats the right place to patch it?
Click to expand...
Click to collapse
i am newbie in C and java.
So i can not figure out this code is wrong.
i am sure that postion of code is right.
but just android source is download and make then compile is complete ?
must compile whole android source but only 'libhtcgeneric-ril.so' ?
that's too difficult to me. i am newbie at linux, C .
Sorry i am totally wrong.
thas is too difficult.
mmmmm......
I am give up..

XML parsing-best method, general discussion

I am relatively new to programing and have been teaching myself as I go. I am trying to now integrate ESPN's API into my app which outputs XML data. I have done enough research to understand that I need to use an XML parser and that the XML can be displayed as a list view or web view by adding HTML markup.
I would like this thread to become a general discussion for all new developers on what XML parsing is and what it does. How it works, the code behind it etc.
I am currently trying to modify a code snippet from the developer.google.com website.
Android includes built in libraries for XML Parsing.
You can see a minimal use of the library here:
Code:
import java.io.IOException;
import java.io.StringReader;
import org.xmlpull.v1.XmlPullParser;
import org.xmlpull.v1.XmlPullParserException;
import org.xmlpull.v1.XmlPullParserFactory;
public class SimpleXmlPullApp
{
public static void main (String args[])
throws XmlPullParserException, IOException
{
XmlPullParserFactory factory = XmlPullParserFactory.newInstance();
factory.setNamespaceAware(true);
XmlPullParser xpp = factory.newPullParser();
xpp.setInput( new StringReader ( "<foo>Hello World!</foo>" ) );
int eventType = xpp.getEventType();
while (eventType != XmlPullParser.END_DOCUMENT) {
if(eventType == XmlPullParser.START_DOCUMENT) {
System.out.println("Start document");
} else if(eventType == XmlPullParser.START_TAG) {
System.out.println("Start tag "+xpp.getName());
} else if(eventType == XmlPullParser.END_TAG) {
System.out.println("End tag "+xpp.getName());
} else if(eventType == XmlPullParser.TEXT) {
System.out.println("Text "+xpp.getText());
}
eventType = xpp.next();
}
System.out.println("End document");
}
}
So essentially, you can grab the xml from ESPN, save it to a file, parse it with that library, and output as desired.
Full details here: http://developer.android.com/reference/org/xmlpull/v1/XmlPullParser.html
the fastest way I know is the parser written in c/c++ and compiled with ndk.
bitpushr said:
Android includes built in libraries for XML Parsing.
So essentially, you can grab the xml from ESPN, save it to a file, parse it with that library, and output as desired.
Full details here: http://developer.android.com/reference/org/xmlpull/v1/XmlPullParser.html
Click to expand...
Click to collapse
I will have to try out this code. Because I am learning as I go there are many things in java I don't yet understand which ultimately make it a lot harder to accomplish tasks but I am slowly catching on
If you want to do this in a .NET (Windows x86/64, Windows Mobile, Windows Phone) environment, or a Linux MONO environment then the following will carry out the bare minimum of parsing.
Assuming you have the data in an XML file :- PARAMS.XML in the same folder as the program, created similar to this:
Code:
<?xml version="1.0" encoding="UTF-8" ?>
<PARAMS>
<Library>TESTLIB</Library>
<Source>C:\RetData\</Source>
</PARAMS>
Then the following C# code will read and extract the parameters:
Code:
using System.Xml;
string LibName,RetDir;
XmlReader xrdr = XmlReader.Create(Application.StartupPath+"\\PARAMS.xml");
xrdr.ReadToFollowing("Library");
Libname=xrdr.ReadElementContentAsString();
xrdr.ReadToFollowing("Source");
RetDir = xrdr.ReadElementContentAsString();
xrdr.Close();
After executing this code then:
LibName = "TESTLIB"
RetDir = "C:\RetData\"
CAVEAT:
I mentioned that this is the bare minimum. An XmlReader object is a forward only reader. Also, this code has no error checking.
In this case the elements must be read in the order they occur or the reader will encounter a null element and throw an error.

[Q] [Assistance needed] Acodec.cpp

I know most of you don't expect me starting a thread in the Q&A but I am out of ideas. I googled, searched, duh, but found nothing that could be useful to me.
The problem is that the file attached is giving me an error.
Code:
target thumb C++: libstagefright <= frameworks/base/media/libstagefright/ACodec.cpp
In file included from frameworks/base/media/libstagefright/ACodec.cpp:42:
./vendor/qcom/opensource/omx/mm-core/omxcore/inc/OMX_QCOMExtns.h:846: warning: 'typedef' was ignored in this declaration
frameworks/base/media/libstagefright/ACodec.cpp:176: error: expected primary-expression before 'struct'
frameworks/base/media/libstagefright/ACodec.cpp:176: error: expected ',' or ';' before 'struct'
frameworks/base/media/libstagefright/ACodec.cpp:3041: error: expected '}' at end of input
make: *** [out/target/product/golfu/obj/SHARED_LIBRARIES/libstagefright_intermediates/ACodec.o] Error 1
I tried editing it in several ways for about 2 hours but it doesn't work.
I would really appreciate if someone would either link me to a working one/tell me where the error is/fix it and point out the error.
Im curious as to what causes the error.
Thanks :3
which rom are you building?
best if you do a repo sync
cybojenix said:
which rom are you building?
best if you do a repo sync
Click to expand...
Click to collapse
I am building Cyanogenmod 9.
I tried deleting the frameworks folder, where the error is and then re-repo sync, but to no avail. :T
And yeah, to my surprise I did try repo syncing. o.o
You are missing an } sine the compiler passes by the typedef thing. Also you are misssing an ; but most of the errors are from }. I'll look over the code and I'll chech for the misssing/wrong }.
Sent from my HTC Desire C using xda premium
That's what it says but I reviewed the file and did not find any errors. So any help would be appreciated :3
Bump
I hate reviving a dead thread, but I'm going through the same problem right now, building CM9, and I got the same Acodec.cpp errors. I also checked the file and it was written correctly. I'm not sure how to fix this, and could use some help from the community.
SignOfTheShadow said:
I hate reviving a dead thread, but I'm going through the same problem right now, building CM9, and I got the same Acodec.cpp errors. I also checked the file and it was written correctly. I'm not sure how to fix this, and could use some help from the community.
Click to expand...
Click to collapse
Looks like there was something missing in the struct typedef thing.
Try removing //QCOM_HARDWARE from line #172
bugkillr said:
Can you share the local code snippet on pastebin? Looks like there was something missing in the struct typedef thing.
Click to expand...
Click to collapse
I can't access PasteBin from work (they consider the text there to be "Personal Storage & Backup"), so the file in it's entirety is attached after pasting into a .txt file.
This is Line 176, mentioned in the error code, with 5 lines before and after:
Code:
#endif
#endif //QCOM_HARDWARE
////////////////////////////////////////////////////////////////////////////////
struct ACodec::BaseState : public AState {
BaseState(ACodec *codec, const sp<AState> &parentState = NULL);
protected:
enum PortMode {
KEEP_BUFFERS,
and this is line 3041, with 5 before (3041 is the last line):
Code:
LOGV("FlushingOutputState Change state to port settings changed");
mCodec->changeState(mCodec->mOutputPortSettingsChangedState);
}
}
#endif
} // namespace android
I'm totally lost as far as this file goes. I'm no good with C++... Thank you for taking an interest, I really do appreciate it. I messaged Nick Bacon (OP) and he gave me some suggestions, but nothing really panned out.
I removed "//QCOM_HARDWARE" from line 172 and am brunching as we speak. I'll edit with the results in a few.
EDIT: No good. Same error.
2nd EDIT: I added a ";" and two carriage returns before "struct" on line 176, and that seemed to just give me more errors:
Code:
target thumb C++: libstagefright <= frameworks/base/media/libstagefright/ACodec.cpp
In file included from frameworks/base/media/libstagefright/ACodec.cpp:42:
./vendor/qcom/opensource/omx/mm-core/omxcore/inc/OMX_QCOMExtns.h:846: warning: 'typedef' was ignored in this declaration
frameworks/base/media/libstagefright/ACodec.cpp:176: error: expected primary-expression before ';' token
frameworks/base/media/libstagefright/ACodec.cpp: In member function 'android::status_t android::ACodec::allocateOutputBuffersFromNativeWindow()':
frameworks/base/media/libstagefright/ACodec.cpp:537: warning: enumeral mismatch in conditional expression: '<anonymous enum>' vs 'OMX_COLOR_FORMATTYPE'
frameworks/base/media/libstagefright/ACodec.cpp: In member function 'void android::ACodec::sendFormatChange()':
frameworks/base/media/libstagefright/ACodec.cpp:1386: warning: enumeral mismatch in conditional expression: '<anonymous enum>' vs 'OMX_COLOR_FORMATTYPE'
make: *** [out/target/product/l35g/obj/SHARED_LIBRARIES/libstagefright_intermediates/ACodec.o] Error 1
SignOfTheShadow said:
I removed "//QCOM_HARDWARE" from line 172 and am brunching as we speak. I'll edit with the results in a few.
EDIT: No good. Same error.
2nd EDIT: I added a ";" and two carriage returns before "struct" on line 176, and that seemed to just give me more errors:
Code:
target thumb C++: libstagefright <= frameworks/base/media/libstagefright/ACodec.cpp
In file included from frameworks/base/media/libstagefright/ACodec.cpp:42:
./vendor/qcom/opensource/omx/mm-core/omxcore/inc/OMX_QCOMExtns.h:846: warning: 'typedef' was ignored in this declaration
frameworks/base/media/libstagefright/ACodec.cpp:176: error: expected primary-expression before ';' token
frameworks/base/media/libstagefright/ACodec.cpp: In member function 'android::status_t android::ACodec::allocateOutputBuffersFromNativeWindow()':
frameworks/base/media/libstagefright/ACodec.cpp:537: warning: enumeral mismatch in conditional expression: '<anonymous enum>' vs 'OMX_COLOR_FORMATTYPE'
frameworks/base/media/libstagefright/ACodec.cpp: In member function 'void android::ACodec::sendFormatChange()':
frameworks/base/media/libstagefright/ACodec.cpp:1386: warning: enumeral mismatch in conditional expression: '<anonymous enum>' vs 'OMX_COLOR_FORMATTYPE'
make: *** [out/target/product/l35g/obj/SHARED_LIBRARIES/libstagefright_intermediates/ACodec.o] Error 1
Click to expand...
Click to collapse
Well, I don't even have the libraries used in this code and its a large piece of code. So what I can suggest you is setting breakpoints and debugging in Eclipse or a good IDE. OR alternatively you can use gdb or valgrind to see extended flaws in the code. Because just rectifying the bugs in the code would definitely solve the issue.
bugkillr said:
Well, I don't even have the libraries used in this code and its a large piece of code. So what I can suggest you is setting breakpoints and debugging in Eclipse or a good IDE. OR alternatively you can use gdb or valgrind to see extended flaws in the code. Because just rectifying the bugs in the code would definitely solve the issue.
Click to expand...
Click to collapse
I ended up adding:
Code:
{};
to line 175 of the original file. It worked. Thanks for helping.
Are u saying u successfully built cm9??
Sent from my HTC Desire C using xda app-developers app
SignOfTheShadow said:
I ended up adding:
Code:
{};
to line 175 of the original file. It worked. Thanks for helping.
Click to expand...
Click to collapse
Never knew that would fix it! Congratulations btw.
This is very useful. Thanks for the solve. Gonna spam some thanks and request this thread to be closed.

[THEME][TOOL WIN][DEV & END-USER] The Dethumberâ„¢ Pro (as seen on TV) UPDATED

{
"lightbox_close": "Close",
"lightbox_next": "Next",
"lightbox_previous": "Previous",
"lightbox_error": "The requested content cannot be loaded. Please try again later.",
"lightbox_start_slideshow": "Start slideshow",
"lightbox_stop_slideshow": "Stop slideshow",
"lightbox_full_screen": "Full screen",
"lightbox_thumbnails": "Thumbnails",
"lightbox_download": "Download",
"lightbox_share": "Share",
"lightbox_zoom": "Zoom",
"lightbox_new_window": "New window",
"lightbox_toggle_sidebar": "Toggle sidebar"
}
We intend to sell millions worldwide on PlayStore but, for a limited time offer, you can have it for FREE!
Developer Edition
How to Install:
Method 1 (High Complexity)
1) Copy the below code (CTRL+C)
2) Open Notepad++ [INSERT 007 Theme 'Nobody Does is Better' BEFORE POSTING]
3) Paste into a new document (CTRL+V)
4) Click Save button (CTRL+S)
5) Select whichever folder you want
6) Name it Whatever_you_want.VBS
7) Confirm save
Click to expand...
Click to collapse
Method 2 (Medium Complexity)
1) Download The.Dethumber.Pro.zip
2) Extract the content to whichever folder you want
Click to expand...
Click to collapse
OK! You've proceeded the installation process successfully.
Note: you may save the file with other extension different from .VBS but it won't work.
How to execute:
ATTENTION: this can be harmful. Be careful to provide the exact path of your theme.
1) Double click the file you've saved in the installation process
2) When asked, provide the path of your theme.
Click to expand...
Click to collapse
That's it. No more Thumbs.db into your theme files!!!
How to Uninstall:
1) Delete the file
Click to expand...
Click to collapse
Support is granted only when you are executing the EXACT code below,
Click to expand...
Click to collapse
Code:
' *****************************************************
' * By Kdio to you on 2014-01-31 18:30 UTC
' *
' * You may edit this as you wish. I don't care.
' *
' * Removes any trace of Thumbs.db like files (*.db)
' * from a specified path tree
' *
' * input none
' * output congratulations message
' *
' *****************************************************
On Error Resume Next
'**Global Objects
Set objFSO = CreateObject("Scripting.FileSystemObject")
Set filesToDelete = CreateObject("Scripting.Dictionary")
'**Global Variables
Dim bytesSaved, totalFiles
bytesSaved = 0
totalFiles = 0
'**Request and Set Folder to process
strFolderPath = Browse4Folder()
Set objFolder = objFSO.GetFolder(strFolderPath)
'**Process Selected Folder
ShowSubFolders objFolder
'**If found something to delete
If totalFiles > 0 then
' ** Process deletion
For Each dbFile in filesToDelete
objFSO.DeleteFile filesToDelete(dbFile), 1
Next
Wscript.Echo totalFiles & " Thumbs.db file(s) deleted. You've saved " & CInt(bytesSaved/1024) & " KBytes"
Else
Wscript.Echo "Congratulations. Your work is clean already."
End If
'**Clean up
Set objFSO = Nothing
Set filesToDelete = Nothing
'**End
Wscript.Quit
' *****************************************************
' * Recursively Loop Subfolders Processing each one
' *****************************************************
Sub ShowSubFolders(Folder)
On Error Resume Next
ProcessFolder Folder
For Each Subfolder in Folder.SubFolders
ShowSubFolders Subfolder
Next
End Sub
' *****************************************************
' * Process Folder Files
' *****************************************************
Sub ProcessFolder(Folder)
On Error Resume Next
For Each objFile in Folder.files
'** If any "*.db" file is found
If UCase(objFSO.GetExtensionName(objFile.name)) = "DB" Then
'** Accumulate statistics
totalFiles = totalFiles + 1
bytesSaved = bytesSaved + objFile.Size
'** Add File to Delete Collection
filesToDelete.Add totalFiles, objFile.Path
End If
Next
End Sub
' *****************************************************
' * Browse4Folder Function
' *****************************************************
Function Browse4Folder()
'On Error Resume Next
'**Browse For Folder Constants Definitions
Const WINDOW_HANDLE = 0
Const BIF_EDITBOX = &H10
Const BIF_NONEWFOLDER = &H0200
Const BIF_RETURNONLYFSDIRS = &H1
Dim objShell, wshShell
Dim objFolder, objFolderItem
Dim CrLf, msgBoxButtons
CrLf = Chr(13) & Chr(10)
msgBoxButtons = 308 'Yes/No + Critical + Default No
'**Create Objects to run Shell Commands
Set objShell = CreateObject("Shell.Application")
Set wshShell = CreateObject("WScript.Shell")
'**BrowseForFolder Parameters
strPrompt = "Please select the folder to process."
intOptions = BIF_RETURNONLYFSDIRS + BIF_NONEWFOLDER + BIF_EDITBOX
strTargetPath = wshShell.SpecialFolders("C:\")
'** Prompt the user for Folder
Set objFolder = objShell.BrowseForFolder(0, strPrompt, intOptions, 17)
'** If nothing selected, get out
If (objFolder Is Nothing) Then
Wscript.Quit
End If
Set objFolderItem = objFolder.Self
'** Make sure the user agree! It's harmful anyway.
If Not (MsgBox("Are you sure you want to delete every *.db file from" & CrLf & objFolderItem.Path, msgBoxButtons, "ATTENTION! This can be Harmful!") = 6) Then
Wscript.Quit
End If
'** Set Function Return Value
Browse4Folder = objFolderItem.Path
'** Clean up
Set objFolderItem = Nothing
Set objFolder = Nothing
Set wshShell = Nothing
Set objShell = Nothing
End Function
Click to expand...
Click to collapse
End-User Edition (updated on 2014-02-05)
How to Install:
1) Download The.Dethumber.Pro.END-USER.zip
2) Extract the content to whichever folder you want
Click to expand...
Click to collapse
OK! You've proceeded the installation process successfully.
How to execute:
ATTENTION: this can be harmful. Be careful to provide the exact path of your theme.
1) Double click the VBS file
2) When asked, provide the zip archive file of your theme.
At the end of the cleaning process, the tool (7zip actually) will generate a report regarding that execution into its same directory. It is just a text file and contain all the statistics of the Thumbs.db detected and deleted.
Click to expand...
Click to collapse
That's it. No more Thumbs.db into your theme files!!!
How to Uninstall:
1) Delete the entire folder
Click to expand...
Click to collapse
Click to expand...
Click to collapse
Tiny-little-tool-dev's Request:
.
Dear Customers
As we are trying to improve our sells and don't have anything more useful to do, we do request from you to share with us the logs you've obtained during the use of our product. This way, the data collected with your effort will bring us more and more money!!! Please, share for nothing!!!
SERIOUS CONDITIONAL: logs can only be accepted IF, before posting, you remove any trace of the source zip analysed. This information is useless.
An example of a correct post would be this as @aki-saar competently did or the below.
Code:
7-Zip (A) 9.20 Copyright (c) 1999-2010 Igor Pavlov 2010-11-18
Listing archive: C:\Users\Kdio\Desktop\xxxxx.zip
--
Path = C:\Users\Kdio\Desktop\xxxxx.zip
Type = zip
Physical Size = 8319796
Date Time Attr Size Compressed Name
------------------- ----- ------------ ------------ ------------------------
------------------- ----- ------------ ------------ ------------------------
0 0 0 files, 0 folders
Click to expand...
Click to collapse
For a more detailed discussion on the matter, you may read the below thread:
[THEMERS][ATTENTION REQUIRED] Minimum Theme Quality Control
Looks great.. can't wait to try it out.
I will keep this too
delete
aki-saar said:
delete
Click to expand...
Click to collapse
HI aki-saar
Good to hear your success with this tool :good:
As those horrible files are automatically created by Windows when you browse your images, it's advisable to run this tool whenever you are getting to release the theme, just before zipping.
Nice regards.
.
thanks for that simple tool.
time ago i found a big theme with a lot thumbs.db... and i deleted one by one.
i ask for this, into respective thread...but no answer...no big deal.
speedyranger said:
thanks for that simple tool.
time ago i found a big theme with a lot thumbs.db... and i deleted one by one.
i ask for this, into respective thread...but no answer...no big deal.
Click to expand...
Click to collapse
Hi speedyranger
Thanks for you words.
I've been experiencing the same reception for the matter as you've did.
Unfortunately I've could determine that YES ... it's a big deal!
See what I've found out there:
ZIP size: 220 Mb
Extracted: 251 Mb
Thumbs.db: 165 files accounting for 168 Mb [ 67% ] !!!!!!
Click to expand...
Click to collapse
This is ridiculous. And the themer was unaware that they are there. Yes! they are still there because yours exact description of the authors behaviour is what almost all of them has.
EDIT: WROST! All these junk are being flashed into users devices that are too unaware of what is happening.
If you wish, more details about this issue can be found in the below thread:
[THEMERS][ATTENTION REQUIRED] Minimum Theme Quality Control
Thank you very much.
.
Kdio said:
Hi speedyranger
Thanks for you words.
I've been experiencing the same reception for the matter as you've did.
Unfortunately I've could determine that YES ... it's a big deal!
See what I've found out there:
This is ridiculous. And the themer was unaware that they are there. Yes! they are still there because yours exact description of the authors behaviour is what almost all of them has.
EDIT: WROST! All these junk are being flashed into users devices that are too unaware of what is happening.
If you wish, more details about this issue can be found in the below thread:
[THEMERS][ATTENTION REQUIRED] Minimum Theme Quality Control
Thank you very much.
.
Click to expand...
Click to collapse
i see and read that thread.
when i write "no big deal", I mean no big deal if i delete all files by my self...up to 100mb.
now i don't remember what's that theme, but when i see the final result i rest like this
speedyranger said:
I mean no big deal if i delete all files by my self.
Click to expand...
Click to collapse
Hi speedyranger
I've just released a END-USER version specially dedicated for you and all other users.
Thanks a lot.
.
Kdio said:
Hi speedyranger
I've just released a END-USER version specially dedicated for you and all other users.
Thanks a lot.
.
Click to expand...
Click to collapse
will be very useful for users . :good:
I think too, my theme zip lost a lot of bits after cleaning,
Thanks again
7-Zip (A) 9.20 Copyright (c) 1999-2010 Igor Pavlov 2010-11-18
Error:
cannot find archive
If log file say like this what mean sir
Or it mean no .db
idiot me
pas2001 said:
7-Zip
Click to expand...
Click to collapse
If you don't mind. Will answer you in the toll tool thread ... ok ?
EDIT: You senile old idiot bastard (ME, MYSELF AND I). He is in the right thread dumb senior!
.
pas2001 said:
7-Zip (A) 9.20 Copyright (c) 1999-2010 Igor Pavlov 2010-11-18
Error:
cannot find archive
If log file say like this what mean sir
Or it mean no .db
Click to expand...
Click to collapse
Pas
I could not replicate the same behaviour you are having.
When you do not select a ZIP file the following window will open:
If the ZIP is informed correctly and there is no evidence of junk inside, you will receive the following message:
And the correspondent log file will look like this:
Code:
7-Zip (A) 9.20 Copyright (c) 1999-2010 Igor Pavlov 2010-11-18
Listing archive: C:\Users\Kdio\Desktop\xxxxx.zip
--
Path = C:\Users\Kdio\Desktop\xxxxx.zip
Type = zip
Physical Size = 8319796
Date Time Attr Size Compressed Name
------------------- ----- ------------ ------------ ------------------------
------------------- ----- ------------ ------------ ------------------------
0 0 0 files, 0 folders
Can you upload the ZIP you've select so I could try to replicate the error here.
Can't imagine what is causing your behaviour.
.
@pas2001
Just replicated !
Code:
7-Zip (A) 9.20 Copyright (c) 1999-2010 Igor Pavlov 2010-11-18
Error:
cannot find archive
It's my mistake. It's having trouble with paths that contain spaces or special chars.
As you may know its 03:00AM here and WE are not so young.
Will be promptly correcting the tool as soon as I wake up.
Thank you for your support and testing my flaws.
Nice regards.
.
Idiot's Sticky for tomorrow
Long filepath names needs double quotes to be passed to the OS.
.
Kdio said:
Idiot's Sticky for tomorrow
Long filepath names needs double quotes to be passed to the OS.
.
Click to expand...
Click to collapse
HA HA...Dont be worry friend... I just want to see how the smart tool work.
In this case I use the theme of my friend @aki-saar which I almost sure he use your tool to kill the junks already ( from his post on top of this page)
Your tool work correctly and say congratulation to me (sure it should be clean lol) . Only the log have error as you found .
I concern about you more than these junk files...If you sleep on 3 am every night please beware... your body growth will be disturbed and your height will be stop...Warning from DOC.:silly:
pas2001 said:
Dont be worry friend...
Click to expand...
Click to collapse
Hi pas2001 and ALL
Sorry for the delay.
Updated END-USER package is available at OP.
The problem (I've left inside) was that the script could not deal with Long Path Names.
Should work as expected now. Please report any problem.
Nice regards.
.
pas2001 said:
I use the theme of my friend @aki-saar
Click to expand...
Click to collapse
Hi Pas
Sure @aki-saar's theme is DETHUMBED ... He is one of the few aware of the matter AND have 'balls' to look after his own work with the necessary competence.
But I could not find his theme releasing post ... Where do we can delight our eyes with ?
@aki-saar ... don't be shy dude ... Your theme compared to what we had already seen from 'Recognizeds' sure will be light years ahead!
PUBLISH IT !!!
Nice regards.
.
I'll release the new "clean" version in a few days in a German speak forum. Will send u the link
Edit...
Is every *. dB file junk? I found a lot of in a Rom zip.

How to save & load module settings after MODE_WORLD_READABLE is gone?

According to document, trying to use MODE_WORLD_READABLE will crash the module UI with a SecurityException.
I've tried to use a ContentProvider, but unable to get the Context object in handleLoadPackage (Illegal state).
Is there any better way?
Tried to downgrade targetSdkVersion, the app no longer crashes but XSharedPreferences still can't read the file (the preferences file is already world readable)
You can use Remotepreferences (awesome library!). You will need a context however, so it is not suitable for methods in initzigote or where you can't access the context. I think is the only way as of now.
Massi-X said:
You can use Remotepreferences (awesome library!). You will need a context however, so it is not suitable for methods in initzigote or where you can't access the context. I think is the only way as of now.
Click to expand...
Click to collapse
Remotepreferences will complicate things.
The easiest way to do is to remove the below line
Code:
getPreferenceManager().setSharedPreferencesMode(MODE_WORLD_READABLE);
And add the following on class level.
Code:
@Override
public void onPause() {
super.onPause();
// Set preferences permissions to be world readable
// Workaround for Android N and above since MODE_WORLD_READABLE will cause security exception and FC.
final File dataDir = new File(getActivity().getApplicationInfo().dataDir);
final File prefsDir = new File(dataDir, "shared_prefs");
final File prefsFile = new File(prefsDir, getPreferenceManager().getSharedPreferencesName() + ".xml");
if (prefsFile.exists()) {
dataDir.setReadable(true, false);
dataDir.setExecutable(true, false);
prefsDir.setReadable(true, false);
prefsDir.setExecutable(true, false);
prefsFile.setReadable(true, false);
prefsFile.setExecutable(true, false);
}
}
This method will work on any sdk :good:
I tested it myself and it is working fine.
Thanks to @PunchUp @pyler
laura almeida said:
Remotepreferences will complicate things.
The easiest way to do is to remove the below line
Code:
getPreferenceManager().setSharedPreferencesMode(MODE_WORLD_READABLE);
And add the following on class level.
Code:
@Override
public void onPause() {
super.onPause();
// Set preferences permissions to be world readable
// Workaround for Android N and above since MODE_WORLD_READABLE will cause security exception and FC.
final File dataDir = new File(getActivity().getApplicationInfo().dataDir);
final File prefsDir = new File(dataDir, "shared_prefs");
final File prefsFile = new File(prefsDir, getPreferenceManager().getSharedPreferencesName() + ".xml");
if (prefsFile.exists()) {
dataDir.setReadable(true, false);
dataDir.setExecutable(true, false);
prefsDir.setReadable(true, false);
prefsDir.setExecutable(true, false);
prefsFile.setReadable(true, false);
prefsFile.setExecutable(true, false);
}
}
This method will work on any sdk :good:
I tested it myself and it is working fine.
Thanks to @PunchUp @pyler
Click to expand...
Click to collapse
Yeah but it seems an hacky thing. It will work with any Android? With selinux enabled? On custom ROMs? Surely Remotepreferences complicate things but is the best way (also for previous Android versions) of reading the preferences file. Anyway this can be another solution :good:
EDIT: I also found in marshmallow my apps was randomly failing reading the preferences (no real reason) and Remotepreferences solved the problem.
Massi-X said:
Remotepreferences will complicate things.
The easiest way to do is to remove the below line
And add the following on class level.
Yeah but it seems an hacky thing. It will work with any Android? With selinux enabled? On custom ROMs? Surely Remotepreferences complicate things but is the best way (also for previous Android versions) of reading the preferences file. Anyway this can be another solution :highfive:
Click to expand...
Click to collapse
With any android version - Yes
Will it work with previous android version - Yes
On custom ROMs - Yes
With selinux enabled ? - not tested yet. But I think it works.
laura almeida said:
With any android version - Yes
Will it work with previous android version - Yes
On custom ROMs - Yes
With selinux enabled ? - not tested yet. But I think it works.
Click to expand...
Click to collapse
Previous versions: I was speaking about another thing. See edit. Anyway it's another way, 2 is always better than 1.

Categories

Resources