I will be adding information to help people complete XML hacks here, however, This is not a simple thing to do!
This is not something you just fall into. Sure, I can tell you what to change for certain effects but you wont learn anything. So other then taking what somebody has done and using it yourself I will not give direct directions on how to create certain effects.
I will help you learn but I will not do it for you.
The first thing to go over is what you will need.
Download Textpad, and HXD. Look on Google for these, consider it homework.
You no longer need to download the source for a reference.
You can find the entire source here: http://www.netmite.com/android/mydroid/
I use it as a reference all the time when I'm on windows.
I have uploaded a file called resourcetypes/h that contains alot of information in it about how things are translated to binary, in fact everything I will document below was retrieved from that file.
Keep in mind that Android looks at things in bits when compiling this code into hex. And since in hex all we deal with are bytes we need to do some quick math.
In every byte (00) there are 8 bits When you see something in the code like this: uint16_t size; That is android talking about 16 bits which in hex is 2 bytes because every byte is equal to 8 bits.
Got it? Good...
Lets take a look at some code!
Code:
// Number of bytes in this structure.
uint16_t size;
This means the first two bytes reference how many bytes are in this structure. Specifically speaking, for the most part everything we will deal with here is five bytes long. So the first values in hex would be 05 00 if there were five bytes in this structure...
Code:
// Always set to 0.
uint8_t res0;
This means the next byte will always be zero, since its 8 bits its only one byte. Which would look like this in hex 00 So combined with what we have above we should see 05 00 00
Code:
// Type of the data value.
enum {
enum in this case means that the next byte will be one of the following values depending on what it is we are translating to binary.
Code:
// Contains no data.
TYPE_NULL = 0x00,
Means this byte should be 00 and the byte after it holds no data... So the structure would be 05 00 00 00 ... so far....
Code:
// The 'data' holds a ResTable_ref, a reference to another resource
// table entry.
TYPE_REFERENCE = 0x01,
Means the byte(s) after this byte 01 holds a pointer to a resource, which could be an image or any other type of resource stored with Resources.arsc. So combined with what we have above we should see 05 00 00 01
Code:
// The 'data' holds an attribute resource identifier.
TYPE_ATTRIBUTE = 0x02,
Means the byte(s) after this byte 02 points to an attribute in the resources.arsc. So combined with what we have above we should see 05 00 00 02
Code:
// The 'data' holds an index into the containing resource table's
// global value string pool.
TYPE_STRING = 0x03,
Means the byte(s) after this byte 03 points to a string in the string table of resources.arsc. So combined with what we have above we should see 05 00 00 03
Code:
// The 'data' holds a single-precision floating point number.
TYPE_FLOAT = 0x04,
Means the byte(s) after this byte 04 Holds a floating point number...
So combined with what we have above we should see 05 00 00 04
Code:
// The 'data' holds a complex number encoding a dimension value,
// such as "100in".
TYPE_DIMENSION = 0x05,
Means the byte(s) after this byte 05 holds the value of dimension...a lot of times this can be a vlaue for a height or a width of an object, such as an image. So combined with what we have above we should see 05 00 00 05
Code:
// The 'data' holds a complex number encoding a fraction of a
// container.
TYPE_FRACTION = 0x06,
Means the byte(s) after this byte 06 holds a complex number encoding a fraction of a container. So combined with what we have above we should see 05 00 00 06
Code:
// Beginning of integer flavors...
TYPE_FIRST_INT = 0x10,
// The 'data' is a raw integer value of the form n..n.
TYPE_INT_DEC = 0x10,
// The 'data' is a raw integer value of the form 0xn..n.
TYPE_INT_HEX = 0x11,
// The 'data' is either 0 or 1, for input "false" or "true" respectively.
TYPE_INT_BOOLEAN = 0x12,
Same rules apply here...I dont think I have to keep explaining them all....
Code:
// Beginning of color integer flavors...
TYPE_FIRST_COLOR_INT = 0x1c,
// The 'data' is a raw integer value of the form #aarrggbb.
TYPE_INT_COLOR_ARGB8 = 0x1c,
// The 'data' is a raw integer value of the form #rrggbb.
TYPE_INT_COLOR_RGB8 = 0x1d,
// The 'data' is a raw integer value of the form #argb.
TYPE_INT_COLOR_ARGB4 = 0x1e,
// The 'data' is a raw integer value of the form #rgb.
TYPE_INT_COLOR_RGB4 = 0x1f,
// ...end of integer flavors.
TYPE_LAST_COLOR_INT = 0x1f,
// ...end of integer flavors.
TYPE_LAST_INT = 0x1f
};
Means the byte(s) after this byte holds a color value. If the 4th byte is 1C Then the bytes afterwards will define a color value that is in the format #FFFFFFFF transparency, red, green, blue.
If the byte is 1E Then the bytes following will represent a color value in the format #FFF Red, green, blue.
HOWEVER, one thing important to know here is that regardless of the format of the color value whether it be RGB or AARRGGBB Android will convert it to hex and it will appear as FF FF FF FF
Code:
uint8_t dataType;
This is where the FIFTH byte gets added, whatever it may be...it will be one of the values listed above.
I will add more stuff later. The file posted below has everything I've added and more....If you want to know more...open that files up and read it...study it...
Stericson
Thanks for this, I'm sure these files will come in handy. Again thanks for all your hard work.
Thanks bro great work keep it up!!!!!!
Wickedly Awesome, you guys go beyond the expected! Thanx to Stericson and JF!!
That is the exact theme i am looking for. No apps tab, black status bar, just wicked!
nevermind, I should have read through it more
thanks for this, looks excellent!!
only problem is the red-clock didn't work and now i have no clock at all.
god knows how i ****ed this up
Well, if you read my post all the way, you would have read that I specifically said that the clock wouldn't work right now.
And you do have a clock it's just blending with the status bar.
Stericson
Bump....I have added a screenshot of the customized loickscreen I made.
Stericson
how did you make that lock screen?
looking good man!
Stericson is the man!
Looks like my donation is going to good use, I will have to send some more beer money your way.
Bump....another update. check it out....sowwy no pics.
Stericson
no fair! stericson is gonna win.....ahahah im not even gonna bother trying to compete in the contest. these changes alone should grant him an easy victory 8(
dthadamaja said:
no fair! stericson is gonna win.....ahahah im not even gonna bother trying to compete in the contest. these changes alone should grant him an easy victory 8(
Click to expand...
Click to collapse
I was thinking the same thing...but he is going to be creating the theme in ADP1.1, if that is the case that is our handicap, the majority of XDA uses RC30-RC33. So it makes it an advantage for us...
besides Stericson is old news..he is the grandfather of themes,,,muahah let the trash talking begin!
Oh and don't tell him i said he was old news =X hahaha
I think maybe I could muster up something for rc33.....after all.....I am the wise grandfather of themes, remember?
Stericson said:
I think maybe I could muster up something for rc33.....after all.....I am the wise grandfather of themes, remember?
Click to expand...
Click to collapse
Doh we are all screwed! =)
Stericson said:
I think maybe I could muster up something for rc33.....after all.....I am the wise grandfather of themes, remember?
Click to expand...
Click to collapse
WooHoo I just got excited again!
Just an FYI, I used your status_bar.xml in my rc33 theme and it worked flawlessly. The white looks great. Thank you!
Great to know! thanks for the update!
thats it Im gettin root just for this...I've been waiting to make a theme with a black status bar...
and I will win this contest or watever it is
Here is my first post.
I've found some very interesting things in the android stock browser code (BrowserActivity.smali) of the Galaxy S.
Here are all about: strings that you can enter in your address line of your stock browser.
about:blank (shows a blank page. Found near .line 1867)
about:debug (shows in the preferences screen some Javascript options. Found near .line 585)
about:useragent (VERY INTERESTING: You can change the useragent and you can choose between an Android, Iphone, Desktop, Lismore UserAgent or you can enter a custom UA string. Found near .line 610)
Here are the about: strings that I don't know what are they supposed to do:
about:debug.dom (Found near .line 587)
about:debug.dom.file (Found near .line 589)
about:debug.render (Found near .line 591)
about:debug.render.file (Found near .line 593)
about:debug.display (Found near .line 595)
about:debug.drag (Found near .line 597)
I don't know if these commands are working on earlier firmware versions. If you know what the commands are supposed to do post it please here
Nice find, will look into this
Nice find!
I am especially intrested in making sites think I am using desktop PC.
I did change my useragent, but it seems the galaxy also sends a header called "HTTP_X_WAP_PROFILE:" where the phone reveals its a gt-i9000. Some sites seems to listen to this.
Do you think there is a way to change these things more permanently with root access maybe?
you could use my patched browser for example
Just what the subject said, If I encrypt my disk will it slow thing down much?
If no one knows I'll just have to try it an. find out. :laugh:
If the CPU supports hardware accelerated encryption (AES/SHA) the difference will be minimal. The Nexus 6 suffers a significant I/O hit, but a Nexus 9 experiences nearly no change due to ARMv8 specs.
Sent from my XT1528
moorefield/silvermont does indeed support aes-ni. whether it's used for drive encryption is another story. Next time I wipe my phone, I'll give it a shot unless someone tries it first
Code:
[email protected]_1:/ $ openssl speed -evp aes-256-cbc
openssl speed -evp aes-256-cbc
Doing aes-256-cbc for 3s on 16 size blocks: 24326328 aes-256-cbc's in 2.99s
Doing aes-256-cbc for 3s on 64 size blocks: 8443238 aes-256-cbc's in 2.98s
Doing aes-256-cbc for 3s on 256 size blocks: 2519081 aes-256-cbc's in 3.00s
Doing aes-256-cbc for 3s on 1024 size blocks: 655447 aes-256-cbc's in 2.98s
Doing aes-256-cbc for 3s on 8192 size blocks: 83296 aes-256-cbc's in 2.99s
OpenSSL 1.0.1h 5 Jun 2014
built on: date not available
options:bn(64,32) rc4(ptr,char) des(ptr,risc1,16,long) aes(partial) blowfish(ptr)
compiler: information not available
The 'numbers' are in 1000s of bytes per second processed.
type 16 bytes 64 bytes 256 bytes 1024 bytes 8192 bytes
aes-256-cbc 130174.33k 181331.29k 214961.58k 225227.43k 228214.33k
supported here
without hw support would be ~15s
Was simple and fast to encrypt.
downloaded quadrant benchmark afterwards and i/o part was 8158 11400 overall
viewing a few pics in gallery, opening email, etc. seem same as before. will leave this encryption on unless it causes problems.
I'm having a issue with the Asus Music app which is when I'm in other apps it likes to stop randomly where I have to press play again until twenty seconds later to a another stop. I have a ZenFone 2e flashed with stock ZenFone 2 118 firmware.
Any help is welcome.
Sent from my Z00D using XDA Free mobile app
Any help is welcomed and if anyone wants to, I used Advanced Logcat Viewer to make a logcat log.
Also, I took a look and these few lines are from start of Chipzel's Courtesy and then into ManDoPony's -Just Gold- song, stopped with a buzz connected to my laptop in mic port on listen to this device, how I'm trying to debug this.
Code:
V/AsusMusicService.Player(12194): [AsusPlayer] Play: chipzel---courtesy-(a.-aaa)
E/NetlinkEvent(252): NetlinkEvent::FindParam(): Parameter 'TIME_NS' not found
E/MediaPlayer(856): Should have subtitle controller already set
E/NetdConnector(699): RCV <- {613 IfaceClass idle (null)}
D/Ringtone(856): Successfully created local player
E/NetdConnector(699): Error handling '613 IfaceClass idle (null)': java.lang.NumberFormatException: Invalid int: "(null)"
D/NuPlayerDriver(248): reset(0xb080c220)
V/AlarmManager(699): triggered: act=com.android.internal.telephony.data-stall Pkg: com.android.phone
D/NuPlayerDriver(248): notifyResetComplete(0xb080c220)
D/PowerManagerNotifier(699): onWakeLockAcquired: flags=1, tag="*alarm*", packageName=android, ownerUid=1000, ownerPid=699, workSource=WorkSource{1001}
D/NuPlayerDriver(248): reset(0xb080c220)
D/PowerManagerNotifier(699): onWakeLockReleased: flags=1, tag="*alarm*", packageName=android, ownerUid=1000, ownerPid=699, workSource=WorkSource{1001}
V/AudioFlinger(248): acquiring 290 from 856, for -1
D/PowerManagerService(699): updateIsPoweredLocked: wasPowered=true, mIsPowered=true, oldPlugType=2, mPlugType=2, mBatteryLevel=73
V/AudioFlinger(248): added new entry for 290
W/BatteryStatsImpl(699): Couldn't get kernel wake lock stats
V/AudioFlinger(248): releasing 289 from 856 for -1
D/PowerUI (856): dismiss Low BatteryWarning level: 73
V/AudioFlinger(248): decremented refcount to 0
D/PowerUI (856): show_hot_plug_dialog: true
V/AudioFlinger(248): purging stale effects