Related
hi all,
first of all, i would like to say that i'm no expert in c, and this post is not intended to blame anyone but want to raise this concern only.
since i started to mod i9000's kernel source code, i found some unneeded conditional statements in the original source and modded OC/UV sections which can be avoided very easily and thus consuming less resources.
let's take a look in this example from the original source:
Code:
for (i = 0; i < LOOP_CNT; i++) {
tmp = __raw_readb(iem_base + S5PV310_APC_DBG_DLYCODE);
sum_result += tmp;
hpm[i] = tmp;
}
for (i = 0; i < LOOP_CNT; i++)
printk(KERN_INFO "ASV : hpm[%d] = %d value\n", i, hpm[i]);
the second for loop is definitely unnecessary, and it should be changed to something like:
Code:
for (i = 0; i < LOOP_CNT; i++) {
tmp = __raw_readb(iem_base + S5PV310_APC_DBG_DLYCODE);
sum_result += tmp;
hpm[i] = tmp;
printk(KERN_INFO "ASV : hpm[%d] = %d value\n", i, hpm[i]);
}
let's take a look at another extreme case, taken from the OC/UV section:
Code:
if (index < L6)
{
if (old_index == L0)
index = L1;
if (old_index == L1)
index = L2;
if (old_index == L2)
index = L3;
if (old_index == L3)
index = L4;
if (old_index == L4)
index = L5;
if (old_index == L5)
index = L6;
}
it is obvious that, if old_index=L0, it has to go thru the remaining 5 if statements which shouldnt be. isnt it be nice and more efficient to chg it to something like below or use switch case instead?
Code:
if (index < L6)
{
if (old_index == L0)
index = L1;
else if (old_index == L1)
index = L2;
else if (old_index == L2)
index = L3;
else if (old_index == L3)
index = L4;
...
...
...
...
}
since we all aim at producing better and faster kernels, i think this is a good practice to clean up the codes while we r modding
thx for your kind attention
and this is the most ridiculous part that i've ever seen in my life, which can be found in I9000 source also. if u have 10 frequencies set, then instead of running the loop 10 times, this will run 50 times in total
arch/arm/mach-s5pv310/cpufreq.c, inside static int s5pv310_update_dvfs_table()
for (i = 1; i < CPUFREQ_LEVEL_END; i++) {
s5pv310_freq_table[i-1].index = s5pv310_lookup_freq_table.index - 1;
s5pv310_freq_table[i-1].frequency = s5pv310_lookup_freq_table.frequency;
printk(KERN_INFO "index = %d, frequency = %d\n",
s5pv310_freq_table[i-1].index, s5pv310_freq_table[i-1].frequency);
}
for (i = 1; i < CPUFREQ_LEVEL_END; i++) {
s5pv310_volt_table[i-1].index = s5pv310_lookup_volt_table.index - 1;
s5pv310_volt_table[i-1].arm_volt = s5pv310_lookup_volt_table.arm_volt;
printk(KERN_INFO "index = %d, arm_volt = %d\n",
s5pv310_volt_table[i-1].index, s5pv310_volt_table[i-1].arm_volt);
}
for (i = 1; i < CPUFREQ_LEVEL_END; i++) {
s5pv310_apll_pms_table[i-1] = s5pv310_lookup_apll_pms_table;
printk(KERN_INFO "apll pms_table = 0x%08x\n", s5pv310_apll_pms_table[i-1]);
}
for (i = 1; i < CPUFREQ_LEVEL_END; i++) {
for (j = 0; j < 7; j++) {
clkdiv_cpu0[i-1][j] = clkdiv_cpu0_lookup[j];
printk("%d, ", clkdiv_cpu0[i-1][j]);
}
printk("\n");
}
for (i = 1; i < CPUFREQ_LEVEL_END; i++) {
for (j = 0; j < 2; j++) {
clkdiv_cpu1[i-1][j] = clkdiv_cpu1_lookup[j];
printk("%d, ", clkdiv_cpu1[i-1][j]);
}
printk("\n");
}
Interesting...
Sent from my GT-I9100 using XDA Premium.
This might be right. My C is bad, but some OC/UV patches look really quite 'whatever works' for me. I dont say its bad - having something is better than nothing.
Its always good if some skilled coders do reviews of such patches.
good finding and the samsung programmers are really ............... bad...
joecisd said:
good finding and the samsung programmers are really ............... bad...
Click to expand...
Click to collapse
i think it's not samsung's problem, instead, it should be unsolved/overlooked problems brought forward from linux kernel
yeaaa Hong Kong
Do you want make a kernel for us?
regards
Nice catches
Hope most devs are already taking care of this!
avetny said:
yeaaa Hong Kong
Do you want make a kernel for us?
regards
Click to expand...
Click to collapse
sorry, but maybe u don know me coz i'm a newbie here in the i9100 section
as in the i9000 forum, i usually prefer not to release files, except some quick fixes like sms sent time mod, but i'll tell u guys my findings, dirty tricks, and how to instead
sorry about that
glad to see that some of you guys already fixed, or started to fix those redundant conditional statements
and ultimately, hope that one day these will be collected as a whole and stored somewhere for everyone like our kernel source code repo here
ykk_five said:
glad to see that some of you guys already fixed, or started to fix those redundant conditional statements
and ultimately, hope that one day these will be collected as a whole and stored somewhere for everyone like our kernel source code repo here
Click to expand...
Click to collapse
I go try to clean up my code.
I only have a little C++ skills and no C but I give it a try ...
netchip said:
I go try to clean up my code.
I only have a little C++ skills and no C but I give it a try ...
Click to expand...
Click to collapse
maybe if you upload the code to somewhere (for example into a wiki, or pastebin???) we can check it. Personally I've 20years of programming exp in 4 languages, and I'm sure a lot of people like me is already here We can't make the ROM "a lot faster", but basic structural bugs can be wiped out in a short period of time (like the "if else if else if else" example in the first post).
PS: sry for my english
I'm also not an expert in C or kernel development, but i'm quite sure, that gcc is smart enough to check that some code is redundant and do that kind of optimizations in compile time (if you enable the optimize flags).
Feel free to give it a try, i'm also curious, but i think the final assembly code will be pretty much similar.
Sent from my GT-I9100 using xda premium
killerjohn said:
maybe if you upload the code to somewhere (for example into a wiki, or pastebin???) we can check it. Personally I've 20years of programming exp in 4 languages, and I'm sure a lot of people like me is already here We can't make the ROM "a lot faster", but basic structural bugs can be wiped out in a short period of time (like the "if else if else if else" example in the first post).
PS: sry for my english
Click to expand...
Click to collapse
Okay, I go.do.that
Sent from my GT-I9100
netchip said:
I go try to clean up my code.
I only have a little C++ skills and no C but I give it a try ...
Click to expand...
Click to collapse
yeah, i know. i was learning from your source in github last nite
killerjohn said:
maybe if you upload the code to somewhere (for example into a wiki, or pastebin???) we can check it. Personally I've 20years of programming exp in 4 languages, and I'm sure a lot of people like me is already here We can't make the ROM "a lot faster", but basic structural bugs can be wiped out in a short period of time (like the "if else if else if else" example in the first post).
PS: sry for my english
Click to expand...
Click to collapse
that's great. yes, most of them are structural problems actually
Guiper said:
I'm also not an expert in C or kernel development, but i'm quite sure, that gcc is smart enough to check that some code is redundant and do that kind of optimizations in compile time (if you enable the optimize flags).
Click to expand...
Click to collapse
i know gcc is quite smart but i doubt if it can handle the conditional statements automatically if something like:
if (a is a male) then a is a boy
if (a is a female) then a is a girl
so actually, a should be checked once only coz we all know that in our daily life. but sometimes we need a bit more complicated logics like:
if (a contains red) then color = red
if (a contains green) then color =green
if (a contains blue) then color =blue
if (a contains blue & green & blue) then color = gray/black/white (by assuming the portions of red, green and blue are equal)
perhaps this is not a good example, but i just want to point out that not every set of conditions are redundant sometimes and hence gcc may not be able to handle it, i think (i'm not a gcc expert neither, pls correct me if i'm wrong )
Feel free to give it a try, i'm also curious, but i think the final assembly code will be pretty much similar.
Click to expand...
Click to collapse
but i've modded some smali before and found that even a very simple for loop in java can produce a lot of goto statements in the assembly code which can be clean up also
I am posting here because I do not have permission to post in the android dev forum. Thanks to j00m who helped post my ROM earlier in the dev forum, but I thought I should build up my posts to be able to post stuff myself too Here is another smaller system.img file that should work with stock hboot or blackrose (not tested) and has the home button working. The ROM should be considered alpha quality at best as is with other CM9 ROMs.
(system.img)
http://www.mediafire.com/?9lcz59qq8s1qgvb
boot.img (if you have one from drewis' alphas, you do not need to flash this.)
http://www.mediafire.com/?kilz59rjc8kug1m
Be sure to wipe data/cache before reboot. You should be able to use the google apps from userdata.img from one of drewis's alphas.
The ROM is built from CM9, with my changes to make use of the adreno GL drivers. Credits are due to the CM team and all whose code is included in CM9. There should be many to name and I do not want to miss out anyone who deserves credit.
Will post code changes soon. Need to clean it up. Hence the delay.
I hope that when I have enough posts to be privileged, this thread can be moved into the dev forum.
Enjoy!!
Here is the source patch.
diff --git a/frameworks/base/libs/gui/SurfaceTexture.cpp b/frameworks/base/libs/gui/SurfaceTexture.cpp
index c72a45b..9e425e3 100644
--- a/libs/gui/SurfaceTexture.cpp
+++ b/libs/gui/SurfaceTexture.cpp
@@ -246,6 +246,8 @@ status_t SurfaceTexture::requestBuffer(int slot, sp<GraphicBuffer>* buf) {
return NO_ERROR;
}
+#define MAX_SLEEPTIMEOUTS (5)
+
status_t SurfaceTexture::dequeueBuffer(int *outBuf, uint32_t w, uint32_t h,
uint32_t format, uint32_t usage) {
ST_LOGV("SurfaceTexture::dequeueBuffer");
@@ -262,6 +264,9 @@ status_t SurfaceTexture::dequeueBuffer(int *outBuf, uint32_t w, uint32_t h,
int found, foundSync;
int dequeuedCount = 0;
bool tryAgain = true;
+ int sleepTimeouts = 0;
+ bool eglWorkAround = true;
+
while (tryAgain) {
if (mAbandoned) {
ST_LOGE("dequeueBuffer: SurfaceTexture has been abandoned!");
@@ -342,6 +347,21 @@ status_t SurfaceTexture::dequeueBuffer(int *outBuf, uint32_t w, uint32_t h,
// clients are not allowed to dequeue more than one buffer
// if they didn't set a buffer count.
if (!mClientBufferCount && dequeuedCount) {
+ LOGV("SurfaceTexture::dequeue: Not allowed to dequeue more than a "
+ "buffer\n");
+ if (eglWorkAround) {
+ if (sleepTimeouts++ < MAX_SLEEPTIMEOUTS) {
+ LOGD("SurfaceTexture::dequeue: Not allowed to dequeue more "
+ "than a buffer SLEEPING\n");
+ usleep(100000);
+ } else {
+ mClientBufferCount = mServerBufferCount;
+ LOGD("SurfaceTexture::dequeue: Not allowed to dequeue more "
+ "than a buffer RETRY mBufferCount:%d mServerBufferCount:%d\n",
+ mBufferCount, mServerBufferCount);
+ }
+ continue;
+ }
return -EINVAL;
}
@@ -353,6 +373,13 @@ status_t SurfaceTexture::dequeueBuffer(int *outBuf, uint32_t w, uint32_t h,
// than allowed.
const int avail = mBufferCount - (dequeuedCount+1);
if (avail < (MIN_UNDEQUEUED_BUFFERS-int(mSynchronousMode))) {
+ if (eglWorkAround && mClientBufferCount != 0) {
+ mBufferCount++;
+ mClientBufferCount = mServerBufferCount = mBufferCount;
+ LOGD("SurfaceTexture::dequeuebuffer: MIN EXCEEDED "
+ "mBuffer:%d bumped\n", mBufferCount);
+ continue;
+ }
ST_LOGE("dequeueBuffer: MIN_UNDEQUEUED_BUFFERS=%d exceeded "
"(dequeued=%d)",
MIN_UNDEQUEUED_BUFFERS-int(mSynchronousMode),
@@ -700,8 +727,8 @@ status_t SurfaceTexture::updateTexImage() {
ST_LOGW("updateTexImage: clearing GL error: %#04x", error);
}
- glBindTexture(mTexTarget, mTexName);
- glEGLImageTargetTexture2DOES(mTexTarget, (GLeglImageOES)image);
+ glBindTexture(getCurrentTextureTarget(), mTexName);
+ glEGLImageTargetTexture2DOES(getCurrentTextureTarget(), (GLeglImageOES)image);
bool failed = false;
while ((error = glGetError()) != GL_NO_ERROR) {
@@ -736,7 +763,7 @@ status_t SurfaceTexture::updateTexImage() {
mDequeueCondition.signal();
} else {
// We always bind the texture even if we don't update its contents.
- glBindTexture(mTexTarget, mTexName);
+ glBindTexture(getCurrentTextureTarget(), mTexName);
}
return OK;
@@ -762,6 +789,9 @@ bool SurfaceTexture::isExternalFormat(uint32_t format)
}
GLenum SurfaceTexture::getCurrentTextureTarget() const {
+ if (mTexTarget == GL_TEXTURE_EXTERNAL_OES) {
+ return GL_TEXTURE_2D;
+ }
return mTexTarget;
}
diff --git a/frameworks/base/services/surfaceflinger/Layer.cpp b/frameworks/base/services/surfaceflinger/Layer.cpp
index 317cc3b..9e92e81 100644
--- a/services/surfaceflinger/Layer.cpp
+++ b/services/surfaceflinger/Layer.cpp
@@ -40,6 +40,8 @@
#include "SurfaceTextureLayer.h"
#define DEBUG_RESIZE 0
+#define GL_TEXTURE_EXTERNAL_OES GL_TEXTURE_2D
+
namespace android {
diff --git a/device/htc/passion-common/BoardConfigCommon.mk b/device/htc/passion-common/BoardConfigCommon.mk
index b86c580..e17da36 100644
--- a/BoardConfigCommon.mk
+++ b/BoardConfigCommon.mk
@@ -73,7 +73,7 @@ BOARD_VENDOR_USE_AKMD := akm8973
## Hardware rendering
## doesn't actually work until we have hwcomposer
-USE_OPENGL_RENDERER := true
+USE_OPENGL_RENDERER := false
BOARD_EGL_CFG := device/htc/passion-common/egl.cfg
## for rmcc egl hack
COMMON_GLOBAL_CFLAGS += \
On Media fire:
http://www.mediafire.com/?dxzyyfzzp9m6fu8
It works with OPENGL_RENDERER := true as well, but is quite slow and crashes often, with OPENGL_RENDERER := false things are much more stable and usable as is the ROM posted above.
Thanks.
Good job guy.Keep it up ,waiting for next version
mori90 said:
Good job guy.Keep it up ,waiting for next version
Click to expand...
Click to collapse
+1 Agreed. Cant wait to see what you and texasice does next.
Confirm it is working with blackrose. But what i noticed:
-Superuser crashes when trying to update the su binary.
-My USM App is corrupted. Filesize is 12 kb, instead of 38. When trying to use it (activate UMS) it prompts a toast saying "Superuser permission denied", but it doesn't even promt the request popup before; though there is no entry in the Superuser App list.
EDIT: After rm Superuser.apk and flashing the signed Superuser zip via recovery, using su works now.
That made it possible to use the UMS App again and also to use Titanium to restore all Gapps (incl. Account Setup).
Could you check the permissions on the actual su binary itself?
rapmv78 said:
Could you check the permissions on the actual su binary itself?
Click to expand...
Click to collapse
not any longer. :/ (see edited post above) btw: did you made any changes to my ums app? noticed the smaller file size and seems like some notifications are not there any longer!?
Most likely that the permission got fixed when you flashed the Superuser zip file. Good to know it is resolved. Have you seen any other issues pertaining to graphics? I am just curious to know how GL works for others
rapmv78 said:
Have you seen any other issues pertaining to graphics? I am just curious to know how GL works for others
Click to expand...
Click to collapse
So far not. Everything is fine. Played a few videos with diefferent formats without any issues amd now i'm populating the system with apps and restoring settings.. One thing (not gl related) i'm struggeling with, is to get the market running. for whatever reason every version i installed opens fine, let me connect to my google account but then says network error (in wifi and also mobile data mode). Same error with Maps.. I'll post updates as soon as i have some. But beside this, everything looks really good. Meanwhile i can offer a system report if that helps you to get any information: http://www.nahklick.de/user/stephan/android_report.html
Bexton said:
So far not. Everything is fine. Played a few videos with diefferent formats without any issues amd now i'm populating the system with apps and restoring settings.. One thing (not gl related) i'm struggeling with, is to get the market running. for whatever reason every version i installed opens fine, let me connect to my google account but then says network error (in wifi and also mobile data mode). Same error with Maps.. I'll post updates as soon as i have some. But beside this, everything looks really good. Meanwhile i can offer a system report if that helps you to get any information: http://www.nahklick.de/user/stephan/android_report.html
Click to expand...
Click to collapse
Regarding the market, did you try clearing the cache for the app and reboot (the usual method iirc) ? System report looks fine. Thanks.
rapmv78 said:
Regarding the market, did you try clearing the cache for the app and reboot (the usual method iirc) ?
Click to expand...
Click to collapse
yep, didn't solved it!? but stopped trying now.
at the moment i'm watching spiderman 3 in 720p x264 mkv format. trailer worked fine. full movie judderes a bit from time to time but it is running for 15 minutes now without hanging up or whatever.
edit: 1080p also works but is really slow and the judder effect is much bigger.
Thread moved to dev section and link to mediafire ok
What's working and what's not?
imfloflo said:
Thread moved to dev section and link to mediafire ok
Click to expand...
Click to collapse
second post, the link to media fire is not ok!
@j00m Fix
Thread moved in General Section to allow OP to respond for the moment
This ROM enables hardware acceleration for most of the tasks as used to be in gingerbread. Am interested in knowing the experience of others using this mod.
Thanks.
Trackball wakeup will have next next... version,right ???
Why this ver. is working perfect on wifi(Static IP) but texasice version is not ??
I am not sure about the difference with static IP working in this ROM v/s texas ice's. Also since I posted the source code and is in CM9, you should just be able to get more features out of the other ROMs than you would from me This ROM was more of a proof of concept to see if openGL acceleration patch was usable and looks like it does. Thanks for your help in testing it. I do not have any plans to release new ROMs, as all I would be doing is pull the code and compiling it, without any value add from my side (now that the code has already been merged).
The mod can actually close this thread if need be.
Thanks.
what's working and what's not?
What you thing about some part of code:
Code:
//----- (00405B8C) --------------------------------------------------------
void *__cdecl sub_405B8C(int a1, void *a2, size_t a3)
{
char *v3; // [email protected]
size_t v4; // [email protected]
size_t v5; // [email protected]
size_t v6; // [email protected]
size_t v7; // [email protected]
char v9; // [sp+14h] [bp-34h]@1
char v10; // [sp+15h] [bp-33h]@1
char v11; // [sp+16h] [bp-32h]@1
char v12; // [sp+17h] [bp-31h]@1
char v13; // [sp+18h] [bp-30h]@1
char v14; // [sp+19h] [bp-2Fh]@1
char v15; // [sp+1Ah] [bp-2Eh]@1
char v16; // [sp+1Bh] [bp-2Dh]@1
char v17; // [sp+1Ch] [bp-2Ch]@1
char v18; // [sp+1Dh] [bp-2Bh]@1
char v19; // [sp+1Eh] [bp-2Ah]@1
char v20; // [sp+1Fh] [bp-29h]@1
int v21; // [sp+20h] [bp-28h]@1
int v22; // [sp+24h] [bp-24h]@1
int v23; // [sp+28h] [bp-20h]@1
int v24; // [sp+2Ch] [bp-1Ch]@1
const char *v25; // [sp+30h] [bp-18h]@4
const char *j; // [sp+34h] [bp-14h]@4
unsigned int i; // [sp+38h] [bp-10h]@1
int v28; // [sp+3Ch] [bp-Ch]@1
int v29; // [sp+50h] [bp+8h]@1
v21 = 0;
v22 = 0;
v23 = 0;
v24 = 0;
v9 = 102;
v10 = 115;
v11 = 102;
v12 = 16;
v13 = 7;
v14 = 20;
v15 = 21;
v16 = 11;
v17 = 12;
v18 = 114;
v19 = 118;
v20 = 0;
v28 = (int)"Hello reverse engineer :-),\n\n We see you've beaten our UPX 'obfuscation' to keep the script kiddies out, so now we'd like to appeal to your obvious intelligence.\n\n The purpose of the beta key is absolutely not to restrict Revolutionary from some users, it's to enable us to have a kill-switch as it were incase the beta turns into a brickfest.\n\n We'd very much like to have and retain the ability to 'effectively' kill off beta builds of Revolutionary that are causing bricks and real damage to end users' phones.\n\n By all means bypass the check, generate your own key and make use of Revolutionary, you've certainly earned it. All we ask/plead of you is to not distribute a hacked Revolutionary beta binary with our safety measure removed.\n\n Thanks,\n The Revolutionary team\n ";
v29 = a1 + 4;
for ( i = 0; i <= 0xA; ++i )
*(&v9 + i) ^= 0x42u;
v3 = sub_406538(v29, (int)&v9);
v25 = v3 + 12;
for ( j = v3 + 12; strlen((const char *)&v21) <= 3; ++j )
{
v4 = strlen(v25);
if ( &v25[v4] <= j )
break;
if ( asc_119E535[0] != *j )
{
if ( a__0[0] != *j )
strncat((char *)&v21, j, 1u);
}
}
v5 = strlen(v25);
for ( j = &v25[v5]; strlen((const char *)&v21) <= 7 && j >= v25; --j )
{
if ( asc_119E535[0] != *j )
{
if ( a__0[0] != *j )
strncat((char *)&v21, j, 1u);
}
}
for ( j = v25 + 10; strlen((const char *)&v21) <= 0xB; ++j )
{
v6 = strlen(v25);
if ( &v25[v6] <= j )
break;
if ( asc_119E535[0] != *j )
{
if ( a__0[0] != *j )
strncat((char *)&v21, j, 1u);
}
}
v7 = strlen(v25);
for ( j = &v25[v7 - 12]; strlen((const char *)&v21) <= 0xF && j >= v25; --j )
{
if ( asc_119E535[0] != *j )
{
if ( a__0[0] != *j )
strncat((char *)&v21, j, 1u);
}
}
return memcpy(a2, &v21, a3);
}
I think the Revolutionary guys have a very good sense of humor
Oh ahaha that's funny
Sent from my insertcoined sensation
Lol that made me laugh but can u tell me how and about U decompiled it or maybe send me the code....thanks in advance
xmc wildchild22 said:
Lol that made me laugh but can u tell me how and about U decompiled it or maybe send me the code....thanks in advance
Click to expand...
Click to collapse
Sorry mate, I have not plan to publish it, only maybe my own version compiled for htc gratia
Hi, I want to reverse it... here is some interesting stufs!
EDIT:
boomsh is used to gain root aces over adb shell
arx-helper curently is in testing stage (its have something with hboot check, maybe to check if hboot 1.02.0000 is instaled?)
EIT:
Guys, I want to say now, do not try to run these dumped binaries from revolutionary! I'm not responsible if you brick your device!
Is this a generic UPX or some modified version ?
Just asking ?
EDIT; nevermind, unpacked it and decompiled.
Questions or Problems Should Not Be Posted in the Development Forum
Please Post in the Correct Forums & Read the Forum Rules
Moving to Q&A
Hboot version check and enter serial patched ...trying to install revolutionary ower hboot 1.03 but getting some errors... will play with it
Here I'm now:
Code:
=============================================
| Revolutionary S-OFF & Recovery Tool 0.4pre4 |
=============================================
Brought to you by AlphaRev & unrEVOked.
Waiting for device...
Found your device: Liberty (liberty-1.03.0000, Android: 2.3.7, ROM version: pass
ion-user)
Beta key removed -- thank you munjeni for hack:)
Root acquired!
Sending in Caroline...
Retrieving Caroline from certain doom...
Retrying Caroline...
Caroline failed, but had this to say: Invalid parameters.
Errors (if any):-
Press (almost) any key to exit.
Whats use of the caroline?
EDIT:
Its something with arx-helper, but what is usage of arx-helper?
Code:
=============================================
| Revolutionary S-OFF & Recovery Tool 0.4pre4 |
=============================================
Brought to you by AlphaRev & unrEVOked.
Waiting for device...
Found your device: Liberty (liberty-6.02.1002, Android: 2.3.7, ROM version: pass
ion-user)
Your device is already S-OFF, but munjeni hacked it to get you to do it again :)
.
Your device: liberty, with HBOOT 6.02.1002 ...lets try to install new :).
Beta key removed -- thank you munjeni for hack:)
Root acquired!
Sending in Caroline...
Retrieving Caroline from certain doom...
Retrying Caroline...
Caroline failed, but had this to say: Invalid parameters.
Errors (if any):-
Cleaning up...
Rebooting to fastboot...
When life gives you lemons, don't make lemonade. Make life take the lemons back!
Waiting for fastboot...
Caroline is bypased now but revolutionary crashing when device reboot to bootloader Any other way to install hboot 1.02 ower hboot 1.03 ??? Testing now with revolutionary hboot but without success to overwrite allready installed hboot
Progress:
- arx-helper is for misc partition... he modify your misc partition
- caroline patched (patched getprop ro.bootloader to getprop ro.botloadee ) so before I run revolutionary I need setprop ro.bootloadee 1.02.0000 in order to arx-helper get right command "arx-helper liberty 1.02.0000"... but last step (3rd reboot when hboot need to be replaced) I have message fail "lemonade..."
Tomorrow I will snif fastboot usb packets to get what comunication was between phone and revolutionary
munjeni said:
Progress:
- arx-helper is for misc partition... he modify your misc partition
- caroline patched (patched getprop ro.bootloader to getprop ro.botloadee ) so before I run revolutionary I need setprop ro.bootloadee 1.02.0000 in order to arx-helper get right command "arx-helper liberty 1.02.0000"... but last step (3rd reboot when hboot need to be replaced) I have message fail "lemonade..."
Tomorrow I will snif fastboot usb packets to get what comunication was between phone and revolutionary
Click to expand...
Click to collapse
Please tell me someone has finished doing this, successfully, and, where I can get the tool for my HTC DInc2. I've been looking for days, now.
Hi all,
I searched the forum but cannot find one thread about this topic.
has anyone noticed that the app AdvanceS 1.1 send the IMEI to a server called loc.lidroid.com ?
Can anyone explain why this should nessesary ???
Thx in advance
Dys
Dys66 said:
Hi all,
I searched the forum but cannot find one thread about this topic.
has anyone noticed that the app AdvanceS 1.1 (which is probably part of Omega-ROM) send the IMEI to a server called loc.lidroid.com ?
Can anyone explain why this should nessesary ???
Thx in advance
Dys
Click to expand...
Click to collapse
I would get rid of that app no one should have your IMEI number that is really bad for you
Sent from my Nexus 4 using Tapatalk 2
......and report it too Google while you are at it, if it came from the play store
slaphead20 said:
......and report it too Google while you are at it, if it came from the play store
Click to expand...
Click to collapse
I froze it for now with Titanium.
But AdvanceS seems to be part of lidroid Mod which is probably included with Omega and other ROMS and is NOT out of Google Play.
Seems to be a config-tool for SystemUI. I don't used it so far ...
Therefore I think it will reactivated when I flash a new version of the ROM.
Dys66 said:
I froze it for now with Titanium.
But AdvanceS seems to be part of lidroid Mod which is probably included with Omega and other ROMS and is NOT out of Google Play.
Seems to be a config-tool for SystemUI. I don't used it so far ...
Therefore I think it will reactivated when I flash a new version of the ROM.
Click to expand...
Click to collapse
I see what it is control toggles app for lidroid delete it no matter what should not be uploading your IMEI number dev or no dev
Sent from my Nexus 4 using Tapatalk 2
Hmmmm.......I think I will notify the mods about this and let them get to the bottom of it
Edit...done.
OP Was this mod something you got off XDA? If so could you point me to it. I know of the mod and I've used it in my own roms but like others have said, It shouldn't be uploading your IMEI number anywhere. If it is, you might have gotten a hacked version of the mod with maliciousness code. If the source is XDA please let me know ASAP so we can look into it. If it's not from XDA then there really isn't much we can do about it
graffixnyc said:
OP Was this mod something you got off XDA? If so could you point me to it. I know of the mod and I've used it in my own roms but like others have said, It shouldn't be uploading your IMEI number anywhere. If it is, you might have gotten a hacked version of the mod with maliciousness code. If the source is XDA please let me know ASAP so we can look into it. If it's not from XDA then there really isn't much we can do about it
Click to expand...
Click to collapse
Now That's what i call swift action :thumbup: he did say he mite of come woth omega rom so that could mean he did not install a apk
Sent from my Nexus 4 using Tapatalk 2
just looked at loc.lidroid.com - seems to list phone numbers, all seem to be in China though ...
mikep99 said:
just looked at loc.lidroid.com - seems to list phone numbers, all seem to be in China though ...
Click to expand...
Click to collapse
Hmm, it seems NOT inside my Omega Package.
But I never installed any apps from other locations than XDA or google play.
I will try to find the app in the files i got on my harddisk ...
The app is named "com.lidroid.settings" when I see it right in Titanium
It maintains a database "telocation.db" ... the content seems to be chinese :S
I exported the content for further investigation and will uninstall and delete that crap from my phone ...
Hope that droidwall has blocked the network access :S
Dys66 said:
Hmm, it seems NOT inside my Omega Package.
But I never installed any apps from other locations than XDA or google play.
I will try to find the app in the files i got on my harddisk ...
The app is named "com.lidroid.settings" when I see it right in Titanium
It maintains a database "telocation.db" ... the content seems to be chinese :S
I exported the content for further investigation and will uninstall and delete that crap from my phone ...
Hope that droidwall has blocked the network access :S
Click to expand...
Click to collapse
Info - im assuming omegarom uses 23 toggle mod from lidroid - that app is the options app, deleting it will disable 23 toggle customization
and the app is called LidroidSettings.apk - its in v38 which i have
DSA said:
Info - im assuming omegarom uses 23 toggle mod from lidroid - that app is the options app, deleting it will disable 23 toggle customization
and the app is called LidroidSettings.apk
Click to expand...
Click to collapse
Best thing to do till this issue is resolved,I reckon.....anything that is copying your imei and sending it is up to no good imho
DSA said:
Info - im assuming omegarom uses 23 toggle mod from lidroid - that app is the options app, deleting it will disable 23 toggle customization
and the app is called LidroidSettings.apk - its in v38 which i have
Click to expand...
Click to collapse
I checked it with "LogMan logcat" from google play ...
It was pretty lucky that I tested this tool ...
If you want to check your phone you can start LogMan right after a phone reboot ...
Dys66 said:
Hmm, it seems NOT inside my Omega Package.
But I never installed any apps from other locations than XDA or google play.
I will try to find the app in the files i got on my harddisk ...
The app is named "com.lidroid.settings" when I see it right in Titanium
It maintains a database "telocation.db" ... the content seems to be chinese :S
I exported the content for further investigation and will uninstall and delete that crap from my phone ...
Hope that droidwall has blocked the network access :S
Click to expand...
Click to collapse
The apk for Lidroid is in /system/framework
I don't have my GS3 with me today (I also have the mod) so I can't check. I'll shoot a PM over to the Dev who created Lidroid and ask him
the other app it uses is Quicksettings.apk (I believe that's the name off the top of my head)
I don't have the device on my hand to check, but i guess it's because of the Telocation service, i used to hide this tab on my ports, but i didn't remove the services, because i tough it uses the local database.
Anyway i will repack a new one asap.
Edit : i repacked a new one (attached), i removed all telocation dependencies, i had to remove others tab for safety.
wanam said:
I don't have the device on my hand to check, but i guess it's because of the Telocation service, i used to hide this tab on my ports, but i didn't remove the services, because i tough it uses the local database.
Anyway i will repack a new one asap.
Edit : i repacked a new one (attached), i removed all telocation dependencies, i had to remove others tab for safety.
Click to expand...
Click to collapse
Thanks wanam. Is there any need for people to be worried about this from a security perspective?
graffixnyc said:
Thanks wanam. Is there any need for people to be worried about this from a security perspective?
Click to expand...
Click to collapse
In my opinion no need to worry, this service was included in all Lidroid Roms since GS2 days for Chinese users only, i can't confirm that Lidroid save any information remotely.
I need to check the telocation sources, this may give us more information about this issue.
Sent from my GT-N7100 using Tapatalk 2
I just decompiled telocation sources here is the content of the guilty file:
Code:
package com.lidroid.settings.telocation;
import android.content.*;
import android.database.Cursor;
import android.net.Uri;
import android.os.Build;
import android.telephony.TelephonyManager;
import android.util.Log;
import com.google.protobuf.InvalidProtocolBufferException;
import com.lidroid.providers.telocation.DatabaseHelper;
import java.io.InputStream;
import java.net.URL;
// Referenced classes of package com.lidroid.settings.telocation:
// HttpReader
public class UpdateUtils
{
public UpdateUtils(Context context)
{
mOpenHelper = new DatabaseHelper(context, null);
mDeviceId = ((TelephonyManager)context.getSystemService("phone")).getDeviceId();
mContext = context;
}
private void updateMob(Telocation.mob_location mob_location)
{
ContentResolver contentresolver = mContext.getContentResolver();
Uri uri = Uri.parse((new StringBuilder()).append("content://com.lidroid.providers.telocation/mobile/").append(mob_location.getTel()).toString());
Cursor cursor = contentresolver.query(uri, null, null, null, null);
boolean flag;
ContentValues contentvalues;
if(cursor != null && cursor.getCount() > 0)
flag = true;
else
flag = false;
if(cursor != null)
cursor.close();
contentvalues = new ContentValues();
contentvalues.put("_id", mob_location.getTel());
contentvalues.put("location", mob_location.getLocation());
contentvalues.put("areacode", mob_location.getAreacode());
if(flag)
contentresolver.update(uri, contentvalues, null, null);
else
contentresolver.insert(Uri.parse("content://com.lidroid.providers.telocation/mobile"), contentvalues);
}
private void updateSp(Telocation.sp_info sp_info)
{
ContentResolver contentresolver = mContext.getContentResolver();
Uri uri = Uri.parse((new StringBuilder()).append("content://com.lidroid.providers.telocation/sp/").append(sp_info.getTel()).toString());
Cursor cursor = contentresolver.query(uri, null, null, null, null);
boolean flag;
ContentValues contentvalues;
if(cursor != null && cursor.getCount() > 0)
flag = true;
else
flag = false;
if(cursor != null)
cursor.close();
contentvalues = new ContentValues();
contentvalues.put("addr", sp_info.getTel());
contentvalues.put("name", sp_info.getName());
if(flag)
contentresolver.update(uri, contentvalues, null, null);
else
contentresolver.insert(Uri.parse("content://com.lidroid.providers.telocation/sp"), contentvalues);
}
public long upgrade()
{
InputStream inputstream;
HttpReader httpreader;
inputstream = null;
httpreader = null;
Uri uri;
HttpReader httpreader1;
uri = Uri.parse("content://com.lidroid.providers.telocation/ver");
int i = mContext.getContentResolver().update(uri, null, null, null);
[COLOR="Red"]URL url = new URL((new StringBuilder()).append("http://loc.lidroid.com/update/").append(i).append("/").append(Build.DISPLAY).append("/").append(mDeviceId).toString());[/COLOR]
Log.d("xiaoym", (new StringBuilder()).append("http://loc.lidroid.com/update/").append(i).append("/").append(Build.DISPLAY).append("/").append(mDeviceId).toString());
httpreader1 = new HttpReader(url);
Telocation.update update;
int j;
int k;
inputstream = httpreader1.getStream();
update = Telocation.update.parseFrom(inputstream);
j = update.getMobCount();
k = update.getSpCount();
if(update.getMobCount() != 0) goto _L2; else goto _L1
_L1:
int k1 = update.getSpCount();
if(k1 != 0) goto _L2; else goto _L3
_L3:
long l;
l = 0L;
if(inputstream == null)
break MISSING_BLOCK_LABEL_197;
inputstream.close();
if(httpreader1 != null)
httpreader1.close();
_L6:
return l;
_L2:
int i1 = 0;
_L5:
if(i1 >= j)
break; /* Loop/switch isn't completed */
updateMob(update.getMob(i1));
i1++;
if(true) goto _L5; else goto _L4
_L13:
int j1;
for(; j1 < k; j1++)
updateSp(update.getSp(j1));
Uri uri1 = ContentUris.withAppendedId(uri, update.getVersion());
mContext.getContentResolver().update(uri1, null, null, null);
l = j + k;
if(inputstream == null)
break MISSING_BLOCK_LABEL_306;
inputstream.close();
if(httpreader1 != null)
httpreader1.close();
goto _L6
InvalidProtocolBufferException invalidprotocolbufferexception;
invalidprotocolbufferexception;
_L12:
l = -2L;
if(inputstream == null)
break MISSING_BLOCK_LABEL_334;
inputstream.close();
if(httpreader != null)
httpreader.close();
goto _L6
Exception exception4;
exception4;
goto _L6
Exception exception2;
exception2;
_L11:
l = -3L;
if(inputstream == null)
break MISSING_BLOCK_LABEL_365;
inputstream.close();
if(httpreader != null)
httpreader.close();
goto _L6
Exception exception3;
exception3;
goto _L6
Exception exception;
exception;
_L10:
if(inputstream == null)
break MISSING_BLOCK_LABEL_390;
inputstream.close();
if(httpreader != null)
httpreader.close();
_L8:
throw exception;
Exception exception1;
exception1;
if(true) goto _L8; else goto _L7
_L7:
exception;
httpreader = httpreader1;
if(true) goto _L10; else goto _L9
_L9:
Exception exception5;
exception5;
httpreader = httpreader1;
goto _L11
InvalidProtocolBufferException invalidprotocolbufferexception1;
invalidprotocolbufferexception1;
httpreader = httpreader1;
goto _L12
Exception exception6;
exception6;
goto _L6
Exception exception7;
exception7;
goto _L6
_L4:
j1 = 0;
goto _L13
}
public static final long CONNECT_LIDROID_FAILED = -3L;
public static final long INVALID_TELOCATION_DATA = -2L;
public static final long NO_UPDATE = 0L;
public static final long OPEN_WRITABLE_DATABASE_ERROR = -1L;
private Context mContext;
private String mDeviceId;
private DatabaseHelper mOpenHelper;
}
Lidroid uses this class to collect stats about his users build, this classe call a remote service and save the installed build number for each device ID.
For stats purposes? maybe, i think he wouldn't logged it if he want to use it for bad purposes, Lidroid is the only one who can give us more lights about this.
Anyway the new repacked one is safe to use, i will update my toggles threads asap.
Thanks Wanam and all others involved in resolving this :thumbup:
Is it safe for all devices?
My galaxy player 4.0 got wet and everything works including charging, but usb data transfers do not work. If a flash a bad update that requires recovery via download mode I am screwed. I will still stick around on these forums, but I will be getting another tablet just to experiment with. So for now I will not be posting builds with my experimental mods.
Oh.. Sorry for that guy.. Thats really sad.... I liked your mods..
Edit: and yes.. Please share the source of the mod.. (I'm building my own roms and that would be pretty nice.. I even want to ask for this cause im using optimized compiler flags which don't affect your (pre)built framework.. 2nd thing is that the rom i'm building has other framework sources than official cm)..
andreasltcf said:
Oh.. Sorry for that guy.. Thats really sad.... I liked your mods..
Edit: and yes.. Please share the source of the mod.. (I'm building my own roms and that would be pretty nice.. I even want to ask for this cause im using optimized compiler flags which don't affect your (pre)built framework.. 2nd thing is that the rom i'm building has other framework sources than official cm)..
Click to expand...
Click to collapse
My galaxy player works fine it is just usb data does not work. I will still be doing mods but it will be for another tablet, most likely the nook hd since the galaxy tab 3 does not have cm yet because of the closed source marvell soc.
the attached source.zip contains the mods that I did.
http://forum.xda-developers.com/showthread.php?t=2693483 for the mod I had to do to get philz recovery to compile.
Surfaceflinger.cpp mod:
Code:
static int getEmuDensity() {
return getDensityFromProperty("qemu.sf.lcd_density"); }
static int getEmuXDensity() {
return getDensityFromProperty("qemu.sf.lcd_density.xdpi"); }
static int getEmuYDensity() {
return getDensityFromProperty("qemu.sf.lcd_density.ydpi"); }
static int getBuildXDensity() {
return getDensityFromProperty("ro.sf.lcd_density.xdpi"); }
static int getBuildYDensity() {
return getDensityFromProperty("ro.sf.lcd_density.ydpi"); }
static int getBuildDensity() {
return getDensityFromProperty("ro.sf.lcd_density"); }
};
if (type == DisplayDevice::DISPLAY_PRIMARY) {
// The density of the device is provided by a build property
float density = Density::getBuildDensity() / 160.0f;
if (density == 0) {
// the build doesn't provide a density -- this is wrong!
// use xdpi instead
ALOGE("ro.sf.lcd_density must be defined as a build property");
density = xdpi / 160.0f;
}
if (Density::getBuildXDensity()) {
// if "ro.sf.lcd_density.xdpi" is specified, it overrides xdpi
xdpi = Density::getBuildXDensity();
}
if (Density::getBuildYDensity()) {
// if "ro.sf.lcd_density.ydpi" is specified, it overrides ydpi
ydpi = Density::getBuildYDensity();
}
if (Density::getEmuXDensity()) {
// if "qemu.sf.lcd_density" is specified, it overrides everything
xdpi = Density::getEmuXDensity();
}
if (Density::getEmuYDensity()) {
// if "qemu.sf.lcd_density" is specified, it overrides everything
ydpi = Density::getEmuYDensity();
}
if (Density::getEmuDensity()) {
// if "qemu.sf.lcd_density" is specified, it overrides everything
xdpi = ydpi = density = Density::getEmuDensity();
density /= 160.0f;
}
info->density = density;
lets you set custom x and y dpi by setting ro.sf.lcd_density.xdpi and ro.sf.lcd_density.ydpi. I did this mod so I could change the screen size without having to change the dpi.
Logicaldisplay.java:
Code:
mBaseDisplayInfo.type = deviceInfo.type;
String dxres = String.valueOf(deviceInfo.width);
String dyres = String.valueOf(deviceInfo.height);
String xres = SystemProperties.get("qemu.sf.widthpixels", SystemProperties.get("ro.sf.widthpixels", dxres));
String yres = SystemProperties.get("qemu.sf.heightpixels", SystemProperties.get("ro.sf.heightpixels", dyres));
Integer xre = Integer.valueOf(xres);
Integer yre = Integer.valueOf(yres);
mBaseDisplayInfo.address = deviceInfo.address;
mBaseDisplayInfo.name = deviceInfo.name;
mBaseDisplayInfo.appWidth = xre;
mBaseDisplayInfo.appHeight = yre;
mBaseDisplayInfo.logicalWidth = xre;
mBaseDisplayInfo.logicalHeight = yre;
mBaseDisplayInfo.rotation = Surface.ROTATION_0;
mBaseDisplayInfo.refreshRate = deviceInfo.refreshRate;
mBaseDisplayInfo.logicalDensityDpi = deviceInfo.densityDpi;
mBaseDisplayInfo.physicalXDpi = deviceInfo.xDpi;
mBaseDisplayInfo.physicalYDpi = deviceInfo.yDpi;
mBaseDisplayInfo.smallestNominalAppWidth = xre;
mBaseDisplayInfo.smallestNominalAppHeight = yre;
mBaseDisplayInfo.largestNominalAppWidth = xre;
mBaseDisplayInfo.largestNominalAppHeight = yre;
mBaseDisplayInfo.ownerUid = deviceInfo.ownerUid;
mBaseDisplayInfo.ownerPackageName = deviceInfo.ownerPackageName;
mPrimaryDisplayDeviceInfo = deviceInfo;
mInfo = null;
lets you set custom screen resolution via build.prop by setting ro.sf.widthpixels and ro.sf.heightpixels. this mod can give you additional features or give you a less restrictive experience in certain apps. I did that mod so I could have a 10.1 inch tablet look with a google play compatible dpi of 120.
phonewindowmanger.java:
Code:
// Allow a system property to override this. Used by the emulator.
// See also hasNavigationBar().
String navBarOverride = SystemProperties.get("qemu.hw.mainkeys", SystemProperties.get("ro.hw.mainkeys"));
if ("1".equals(navBarOverride)) {
mHasNavigationBar = false;
} else if ("0".equals(navBarOverride)) {
mHasNavigationBar = true;
}
allows you to enable softkeys by setting ro.hw.mainkeys=0 I did that so I would not have to use qemu properties. Just copy these mods to the apporiate sections and you should be good.
I ended up getting a galaxy tab 2 because of device similarities.
How much?
Sent from my YP-G1 using xda app-developers app
obscuresword said:
How much?
Sent from my YP-G1 using xda app-developers app
Click to expand...
Click to collapse
129$
Sent from my GT-P3113 using Tapatalk
How did it get wet?
droid if you can solder good i have a old board i could send you, you might be able to merge the two boards and get it working again.
TheKryptonite said:
How did it get wet?
Click to expand...
Click to collapse
I fell into a creek. The device was in my pocket and was under for less than 30 seconds. Everything works except for USB data transfers. Charging works fine.
Sent from my GT-P3110 using Tapatalk
Update: USB data lines appear to be partially working. The device is able to go into charging mode when turned off. I can see the normal charging mode battery and percentage.
Ums, adb over USB, download mode, etc does not work,
Sent from my GT-P3110 using Tapatalk
Update: I've modified services.jar even more. I can now force what screen class I want and choose what GUI I want, all via build.prop settings. I can share my code modifications if anyone is interested.
Sent from my GT-P3110 using Tapatalk