[HELP] writting to sensors sysfs - Galaxy S 4 Developer Discussion [Developers-Only]

I want to change the poll_delay sysfs file from the gesture_sensor, I can read it fine but when I try to write to it nothing happens, I have already read the dmesg and found nothing, the source code for this driver is here:
https://github.com/gokulnatha/GT-I9505/blob/master/drivers/sensorhub/ssp.h#L98
https://github.com/gokulnatha/GT-I9505/blob/master/drivers/sensorhub/ssp_sysfs.c#L45
I am not so experienced in C so maybe someone can help me to understand what happens when I try to write this value
the file is located at "/sys/class/input/input7/poll_delay" on GT-I9505

frapeti said:
I want to change the poll_delay sysfs file from the gesture_sensor, I can read it fine but when I try to write to it nothing happens, I have already read the dmesg and found nothing, the source code for this driver is here:
https://github.com/gokulnatha/GT-I9505/blob/master/drivers/sensorhub/ssp.h#L98
https://github.com/gokulnatha/GT-I9505/blob/master/drivers/sensorhub/ssp_sysfs.c#L45
I am not so experienced in C so maybe someone can help me to understand what happens when I try to write this value
the file is located at "/sys/class/input/input7/poll_delay" on GT-I9505
Click to expand...
Click to collapse
I think you need to use an init.d script to write to the file.

is it declared in ueventd.rc in ramdisk?
like
/sys/class/input/input7/poll_delay 0664 system system

broodplank1337 said:
is it declared in ueventd.rc in ramdisk?
like
/sys/class/input/input7/poll_delay 0664 system system
Click to expand...
Click to collapse
Yep it's there
{
"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"
}
I'm on a root shell and permissions are right, I guess the problem is in the format I write to the file or the driver code itself :/
EDIT: is that a typo on Samsung file? lol

frapeti said:
Yep it's there
View attachment 2675684
I'm on a root shell and permissions are right, I guess the problem is in the format I write to the file or the driver code itself :/
EDIT: is that a typo on Samsung file? lol
Click to expand...
Click to collapse
lol idd a typo, try fixing it and retry

doesn't it just set permissions and user/group? it's doble setted, look some lines above that typo, I'm sure I have permissions to write to the file, but I don't know the format I should write to it, Samsung services can do it fine btw

frapeti said:
doesn't it just set permissions and user/group? it's doble setted, look some lines above that typo, I'm sure I have permissions to write to the file, but I don't know the format I should write to it, Samsung services can do it fine btw
Click to expand...
Click to collapse
yes thats what it does, the owners that are now given are root and input. you need to add system, and maybe even put that 664 to 666. then apps should have access to it

broodplank1337 said:
yes thats what it does, the owners that are now given are root and input. you need to add system, and maybe even put that 664 to 666. then apps should have access to it
Click to expand...
Click to collapse
I'm trying to write it on a root shell already, where I can even chown and chmod that file, only samsung sensors service knows how to interact with its sysfs. And looking at the source code maybe some one can figure it out too
Enviado desde mi GT-I9505 mediante Tapatalk

frapeti said:
I'm trying to write it on a root shell already, where I can even chown and chmod that file, only samsung sensors service knows how to interact with its sysfs. And looking at the source code maybe some one can figure it out too
Enviado desde mi GT-I9505 mediante Tapatalk
Click to expand...
Click to collapse
I just tried it,
echo '200000000' > /sys/class/input/input7/poll_delay
it said
/system/bin/sh: can't create poll_delay: Read-only file system
then i did 'mount -o remount rw /' and it worked just fine.
so its just echoing the value to it, can't be easier

broodplank1337 said:
yes thats what it does, the owners that are now given are root and input. you need to add system, and maybe even put that 664 to 666. then apps should have access to it
Click to expand...
Click to collapse
if you use "su" in a terminal, it has access to everything. The issue isnt a permissions issue. Usually when i change /sys/class files, i have to do it in an init.d script so the kernel writes to it after others have written to it to prevent my values from being overriden. But init.d does not change it either. i really think the kernel source file holds this value.
broodplank1337 said:
I just tried it,
echo '200000000' > /sys/class/input/input7/poll_delay
it said
/system/bin/sh: can't create poll_delay: Read-only file system
then i did 'mount -o remount rw /' and it worked just fine.
so its just echoing the value to it, can't be easier
Click to expand...
Click to collapse
Try echoing a value other than whats already set, it won't hold. I think either the kernel is controlling this, and "poll_delay" is only there so we can view the speed, or that value is set and can't be changed due to hardware limitation. I don't think its possible to change on the fly so to speak. But maybe by editing the kernel source and compiling it yourself would change it.

Yeah that's what I mean, I want to set poll delay to 10000000 ns and the only who can do that is samsung sensors service because it knows how to write to that file
Enviado desde mi GT-I9505 mediante Tapatalk

elesbb said:
if you use "su" in a terminal, it has access to everything. The issue isnt a permissions issue. Usually when i change /sys/class files, i have to do it in an init.d script so the kernel writes to it after others have written to it to prevent my values from being overriden. But init.d does not change it either. i really think the kernel source file holds this value.
Try echoing a value other than whats already set, it won't hold. I think either the kernel is controlling this, and "poll_delay" is only there so we can view the speed, or that value is set and can't be changed due to hardware limitation. I don't think its possible to change on the fly so to speak. But maybe by editing the kernel source and compiling it yourself would change it.
Click to expand...
Click to collapse
I know this, just wanted to say that it is possible to write to that file, some files are not writable at all or readable, so thats a gain. and yes sysfs gets overwrited by kernel by default
And idd you're right I didn't notice it didn't hold. sorry
frapeti said:
Yeah that's what I mean, I want to set poll delay to 10000000 ns and the only who can do that is samsung sensors service because it knows how to write to that file
Enviado desde mi GT-I9505 mediante Tapatalk
Click to expand...
Click to collapse
What you can try is making a c program that regulates it, my experiences with c apps is that they do not require much permissions in order to work correctly

broodplank1337 said:
I know this, just wanted to say that it is possible to write to that file, some files are not writable at all or readable, so thats a gain. and yes sysfs gets overwrited by kernel by default
And idd you're right I didn't notice it didn't hold. sorry
What you can try is making a c program that regulates it, my experiences with c apps is that they do not require much permissions in order to work correctly
Click to expand...
Click to collapse
You can write apps in c code instead of Java and they will run on android!?
Sent from my SGH-M919 using Tapatalk

I think I don't need an app, I just need to understand the driver's source code to find out how to write to its sysfs
Enviado desde mi GT-I9505 mediante Tapatalk

elesbb said:
You can write apps in c code instead of Java and they will run on android!?
Sent from my SGH-M919 using Tapatalk
Click to expand...
Click to collapse
Well not as an apk, but as a binary, like everything in system/bin and xbin. like this: https://github.com/broodplank/android_external_s4utils/blob/master/s4utils.c please note that that is my first c script ever made without any tutorial, so I know, its really poor! anyways, since sensor service has permission to write to it, why shouldn't a custom binary also have that with the right permissions set.
frapeti said:
I think I don't need an app, I just need to understand the driver's source code to find out how to write to its sysfs
Enviado desde mi GT-I9505 mediante Tapatalk
Click to expand...
Click to collapse
ok sorry I wont spam your topic anymore, I just dont know how to read the usage from that code. :silly:

broodplank1337 said:
Well not as an apk, but as a binary, like everything in system/bin and xbin. like this: https://github.com/broodplank/android_external_s4utils/blob/master/s4utils.c please note that that is my first c script ever made without any tutorial, so I know, its really poor! anyways, since sensor service has permission to write to it, why shouldn't a custom binary also have that with the right permissions set.
ok sorry I wont spam your topic anymore, I just dont know how to read the usage from that code. :silly:
Click to expand...
Click to collapse
Thanks for helping btw, I'm sure it isn't related to permissions but format of the data written to that sysfs file, I'm going to find out by reverse engineering samsung service or reading driver's source code again many times lol -.-
Enviado desde mi GT-I9505 mediante Tapatalk

frapeti said:
Thanks for helping btw, I'm sure it isn't related to permissions but format of the data written to that sysfs file, I'm going to find out by reverse engineering samsung service or reading driver's source code again many times lol -.-
Enviado desde mi GT-I9505 mediante Tapatalk
Click to expand...
Click to collapse
Well, i finally had the time to look through those source codes thoroughly. And those values are set by the kernel itself. I don't even know if changing them via on the kernel level will work as limited by hardware. But those values in this file are applied in java when registering a new sensor listener. You can read the standard google example here which tells you what the meaning of those set values are used for.

elesbb said:
Well, i finally had the time to look through those source codes thoroughly. And those values are set by the kernel itself. I don't even know if changing them via on the kernel level will work as limited by hardware. But those values in this file are applied in java when registering a new sensor listener. You can read the standard google example here which tells you what the meaning of those set values are used for.
Click to expand...
Click to collapse
Are you sure? Look at set_gesture_delay and change_sensor_delay functions
Enviado desde mi GT-I9505 mediante Tapatalk

frapeti said:
Are you sure? Look at set_gesture_delay and change_sensor_delay functions
Enviado desde mi GT-I9505 mediante Tapatalk
Click to expand...
Click to collapse
Yes and from what I'm making sense of it, the kernel is calling those methods, they aren't being set by an app so to say. The kernel itself is doing it. That's what I'm getting from it anyhow.
Sent from my SGH-M919 using Tapatalk

look
Code:
static struct device_attribute dev_attr_gesture_poll_delay
= __ATTR([COLOR="Red"]poll_delay[/COLOR], S_IRUGO | S_IWUSR | S_IWGRP,
show_gesture_delay, [COLOR="Red"]set_gesture_delay[/COLOR]);
>>
Code:
static ssize_t set_gesture_delay(struct device *dev,
struct device_attribute *attr, const char *buf, size_t size)
{
int64_t [COLOR="blue"][B]dNewDelay[/B][/COLOR];
struct ssp_data *data = dev_get_drvdata(dev);
if (kstrtoll(buf, 10, &[COLOR="Blue"][B]dNewDelay[/B][/COLOR]) < 0)
return -1;
[COLOR="Red"]change_sensor_delay[/COLOR](data, GESTURE_SENSOR, [COLOR="Blue"][B]dNewDelay[/B][/COLOR]);
return size;
}
>>
Code:
static void change_sensor_delay(struct ssp_data *data,
int iSensorType, int64_t [COLOR="blue"][B]dNewDelay[/B][/COLOR])
{
u8 uBuf[2];
unsigned int uNewEnable = 0;
int64_t dTempDelay = data->adDelayBuf[iSensorType];
if (!(atomic_read(&data->aSensorEnable) & (1 << iSensorType))) {
data->aiCheckStatus[iSensorType] = NO_SENSOR_STATE;
return;
}
data->adDelayBuf[iSensorType] = [COLOR="blue"][B]dNewDelay[/B][/COLOR];
switch (data->aiCheckStatus[iSensorType]) {
case ADD_SENSOR_STATE:
ssp_dbg("[SSP]: %s - add %u, New = %lldns\n",
__func__, 1 << iSensorType, [COLOR="blue"][B]dNewDelay[/B][/COLOR]);
uBuf[1] = (u8)get_msdelay([COLOR="Blue"][B]dNewDelay[/B][/COLOR]);
uBuf[0] = (u8)get_delay_cmd(uBuf[1]);
if (send_instruction(data, ADD_SENSOR, iSensorType, uBuf, 2)
!= SUCCESS) {
uNewEnable =
(unsigned int)atomic_read(&data->aSensorEnable)
& (~(unsigned int)(1 << iSensorType));
atomic_set(&data->aSensorEnable, uNewEnable);
data->aiCheckStatus[iSensorType] = NO_SENSOR_STATE;
data->uMissSensorCnt++;
break;
}
data->aiCheckStatus[iSensorType] = RUNNING_SENSOR_STATE;
if (iSensorType == PROXIMITY_SENSOR) {
proximity_open_lcd_ldi(data);
proximity_open_calibration(data);
input_report_abs(data->prox_input_dev, ABS_DISTANCE, 1);
input_sync(data->prox_input_dev);
}
break;
case RUNNING_SENSOR_STATE:
if (get_msdelay(dTempDelay)
== get_msdelay(data->adDelayBuf[iSensorType]))
break;
ssp_dbg("[SSP]: %s - Change %u, New = %lldns\n",
__func__, 1 << iSensorType, [COLOR="blue"][B]dNewDelay[/B][/COLOR]);
uBuf[1] = (u8)get_msdelay([COLOR="blue"][B]dNewDelay[/B][/COLOR]);
uBuf[0] = (u8)get_delay_cmd(uBuf[1]);
send_instruction(data, CHANGE_DELAY, iSensorType, uBuf, 2);
break;
default:
data->aiCheckStatus[iSensorType] = ADD_SENSOR_STATE;
}
}

Related

[MortScript] iniEditor: get a friendly menu out of an .ini file!

It's very usefull as a developper to use .ini file to store settings of apps or MortScript scripts.
Unfortunately, you may have so many complicated settings (check IPTWeather for instance ), that you or newbies would like to be able to edit those settings without having to open the .ini configuration file.
That's why I've created the iniEditor.mscr script to get a friendly menu out of an .ini file:
{
"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"
}
This is more a proof of concept, and I would really like some developper can port it to a real .exe app to have a great layout as in the S2U2 settings for instance!
It can be used for any app or MortScript script that uses a .ini configuration file.
In the attachment, checkout the iniEditor.mscr which needs two parameters: the .ini file to edit, and your application name.
I've attached:
- the 'iniEditor.mscr' script which is the generic .ini file parser and configurator.
- the 'sample.ini' file to be edited.
- the 'sample.ini.desc' file that is the description file so you can remove all the comments in the 'sample.ini' file but still have them in the iniEditor menus to improve speed performance of your apps reading the 'sample.ini' file! All values in the 'sample.ini.desc' are the default values that are proposed if you cancel your changes for a field.
- the 'sampleConfig.mscr' script which calls the 'iniEditor.mscr' script with the right arguments.
- the 'calledScript.mscr' script which is called for one of the settings.
For the moment, you can set four types for the different settings:
- list: the setting is in a choice list defined in the .ini file;
- int: the setting is an integer;
- callscript: the setting is set using a MortScript script defined in the .ini file;
- fullfilepath: the setting is the full path of a file, to be set with a specific selection dialog box;
- path: the setting is a path, to be set with a specific selection dialog box;
- default: the setting is any entered string.
You set the type of a setting in the .ini.desc file by adding a comment just after the settings, like that:
Code:
[Some settings]
enableFeatureA=0
;list,0,1
You can also add some comments to be displayed for the user, by adding comments (on several lines if you want), like that:
Code:
[Some settings]
enableFeatureA=0
;list,0,1
;Set 0 to disable Feature A.
;Set 1 to enable Feature A.
And that gives you that:
Sometimes, there are so many things to say on a setting, that you don't want to or can't display all the comments about a setting in the menus of iniEditor.mscr.
Then, just added two semicolons at the beginning of the first "comment" line (after the "type" line"), like that:
Code:
advancedSetting=
;
;;Please check FAQ or sample.ini.desc file for more help on this setting.
;This is an advanved option.
;It is so long to explain how it works.
;I cannot show it in a MortScript message dialog box.
;But your are an advanced user.
;So you can find some tips directly here, but not through the iniEditor.mscr script.
And that gives you that:
If you set a parameter of type int, the user will be able to enter only an integer value:
If you set a parameter of type fullfilepath, you get this:
If you set a parameter of type path, you get this:
Feel free to use or modify my iniEditor.mscr, and if someone could make a real .exe app out of it, that would be great!
Pas mal !
Bon outils (qui simplifie la vie) comme je les aime !
A++
Thank you for your support JMHL .
I know I'm alone in my ini editor trip, but I've added two types of parameters: fullfilepath and path.
Just check the first post to have more information on these.
Still no one motivated to developp this in CF.Net for instance?
I've seen that two people have downloaded my second version of iniEditor.
Please find in the first post a new version with a small bug corrected.
Hi michoob,
A BIG THANKS for your new fantastic MortScript app...!!!!
As usual a great work...!!!!
I will of course use it also in my apps...!!!!
Greetings
sv0911
Thanks, thanks and again thanks
michoob,
a really great job you did! Extremely user friendly and tremendously fast!
You're welcome jwoegerbauer!
michoob said:
Feel free to use or modify my iniEditor.mscr
Click to expand...
Click to collapse
I followed your invitation. These are the 2 changes I mainly made in my copy of your iniEditor.mscr
Code:
[COLOR="Red"][B]Copy(fileName, fileName & ".bak", 1)
iniChanged = 0[/B][/COLOR]
choosenSection = 1
While (choosenSection <> 0)
choosenSection = Choice(appName & " settings", "Please choose a settings section:", 0,0, sectionList)
If (choosenSection <> 0)
Call("IPTWkeys")
EndIf
EndWhile
[COLOR="Red"][B]If(not iniChanged)
Delete(fileName & ".bak")
EndIf[/B][/COLOR]
If (confirmation)
valueList[choosenKey] = newValue
keyValueList[choosenKey] = keyList[choosenKey] & "=" & newValue
IniWrite(fileName, sectionList[choosenSection], keyList[choosenKey], newValue)
[COLOR="Red"][B]iniChanged += 1[/B][/COLOR]
EndIf
I've just updated the iniEditor.mscr script with a new feature really usefull when you have huge .ini files to improve reading performance of your .ini file and have your MortScript apps run faster!
This new feature is the use of the .ini.desc file that contains all default values and all the comment structure of iniEditor. Now, the .ini file can be comment free and still you'll have all the information while editing your .ini file through iniEditor!
As usual, you can test this new version with IPTWeather.
Feedbacks welcomed!
michoob said:
I've just updated the iniEditor.mscr script with a new feature really usefull when you have huge .ini files to improve reading performance of your .ini file and have your MortScript apps run faster!
This new feature is the use of the .ini.desc file that contains all default values and all the comment structure of iniEditor. Now, the .ini file can be comment free and still you'll have all the information while editing your .ini file through iniEditor!
Click to expand...
Click to collapse
Tried v04. Simply an ingenious improvement. Thanks.
Thanks jwoegerbauer ! I just thought about XML description files and said: why not the same with .ini file!
I just discovered the Configuration tool for Mortscripter that is an exe, but unfortunately, it doesn't right to nor from ini files, so it is a bit more complicated to use with .ini files, even though it can be done using some mortscript...
But I must admit that I like now the idea of a full MortScript "app" to read .ini files used by other MortScript "apps"... It is a bit like the meaning of GNU...
michoob said:
I just thought about XML description files
Click to expand...
Click to collapse
The C++ source code for a XML-parser, which easily can be converted into MortScript, one can get here (e-mail to author required):
http://www.applied-mathematics.net/tools/xmlParser.html
Will you developp an iniEditor in C++ for me?
Honestly, I won't have time to learn developping on Windows Mobile, but thank you for the information. Maybe someone will be motivated to work on this, but I doubt it because of WP7...
michoob said:
Will you developp an iniEditor in C++ for me?
Click to expand...
Click to collapse
Of course NOT!
BTW: Here I small routine I made to prepare using iniEditor v0.4, may be others are interested in
Code:
Sub IniToIniDesc(ini)
Local(inicontent,idx,line,trimline,newini,desc,newdesc,fpos,feature)
desc=ini&".desc"
Copy(ini,desc,1)
inicontent=Split(ReadFile(ini)&"^NL^","^NL^")
#
#pass ONE
newini=Array()
idx=0
ForEach line In Array(inicontent)
If(Find(line,";"))
Continue
EndIf
trimline=Replace(line," ","")
If(Length(trimline)=0)
Continue
EndIf
idx+=1
newini[idx]=line
EndForEach
WriteFile(ini,Join(newini,"^NL^"),0)
Clear(newini)
#
#pass TWO
newdesc=Array()
idx=0
ForEach line In Array(inicontent)
trimline=Replace(line," ","")
If(Length(trimline)=0)
Continue
EndIf
idx+=1
newdesc[idx]=line
fpos=Find(trimline,"=0")
If(NOT fpos)
fpos=Find(trimline,"=1")
EndIf
If(fpos)
#test whether 0 and/or 1 is the only character here
If((fpos+2)>Length(trimline))
feature=Substr(trimline,1,(fpos-1))
idx+=1
newdesc[idx]=";Set 0 to disable "&feature&".^NL^;Set 1 to enable "&feature&"."
EndIf
EndIf
EndForEach
WriteFile(desc,Join(newdesc,"^NL^"),0)
EndSub
As one will notice, this script 1) trims the original ini - thus the goal to gain speed when processing it will definitly be reached, and 2) only adds some ;Set lines to the desc, hence one of course have to edit the desc after having run this script.
It just prepares it for 0 or 1 values ini fields, doesn't it?
Then, to use iniEditor as a switch for 0 or 1 values to disable or enable a feature, it would be better to use a list with a choice between 0 or 1 .
I wonder which scripts do you use iniEditor with.
1) To satisfy your curiosity, the ini is attached
2) Only a suggestion:
If (endNextLinePos > 0)
valueTypeList[keyIndex] = ToLower(SubStr(iniDescFile, endLinePos + 2, endNextLinePos - endLinePos - 3))
endLinePos = endNextLinePos
Else
valueTypeList[keyIndex] = ToLower(SubStr(iniDescFile, endLinePos + 2, Length(iniDescFile) - endLinePos - 1))
endLinePos = endLinePos +1
EndIf
Don't know this useful for others too: I added to v0.4 valueTypes as follows:
alpha
num
alphanum
hex
range
The modified version v0.4-p1 is attached.
Well done, great idea!
@michoob I have made some tweaks to an older version that I wanted to share. It skips the choose [settings] group if there is only one setting group. Also it updates the array with the latest saved changes so if you go to another setting group and then go back to a previously edited one the updates show. And I think lastly I added some code to keep the original settings if you cancel the change since some of them went blank.
RoryB said:
@michoob I have made some tweaks to an older version that I wanted to share.
Click to expand...
Click to collapse
Thanks, I'll have a look at this.
RoryB said:
]It skips the choose [settings] group if there is only one setting group.
Click to expand...
Click to collapse
Good idea!
RoryB said:
Also it updates the array with the latest saved changes so if you go to another setting group and then go back to a previously edited one the updates show.
Click to expand...
Click to collapse
Hum... the latest version already does that. Maybe because you edited an older version .
RoryB said:
And I think lastly I added some code to keep the original settings if you cancel the change since some of them went blank
Click to expand...
Click to collapse
I don't get it. But I'll have a look at this .

[Q] wifi error data log

{
"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"
}
Everytime after i turn off my wifi connection, i will have this 'dumpstate_sys_WIFI_OFF_20134...error.log.txt' log in my data folder..i wonder why this log appear and how to prevent it from automatically arise?? It can be delete with root explorer but i just wanna know is there any way to ultimately stop this log from happening.tq
Sent from my GT-I9100G
Sent from my GT-I9100G
rascal123 said:
Sent from my GT-I9100G
Click to expand...
Click to collapse
I also got this error file, and today I notice my phone keep hanging when turning on the wifi.
same for me with Stock LB1 rooted
The problem is if we not delete them..they will consume a lot of space..eating our internal memory..
Sent from my GT-I9100G
i am experiencing this too, even up to 1gb space is consumed T_T
it is like some kind of debug function is still enabled in LB1 firmware, maybe the samsung dev forgot to disable it
Sent from my GT-I9100G using Tapatalk
I also got this on superRomv3. when i flashed stock xxla1, the problem disappear...
Is it bcos of rom or kernel?anyone knows??
Sent from my GT-I9100G using Tapatalk 2 Beta-6
fauzi_91 said:
Is it bcos of rom or kernel?anyone knows??
Sent from my GT-I9100G using Tapatalk 2 Beta-6
Click to expand...
Click to collapse
i think it's the base of LB1 Roms ...
I've written this in another thread, so I figure I'll just repost this here for everyone's reference.
There's a workaround for this problem. Just remove the execute permission from /system/bin/dumpstate so the error log is not generated. There's a few ways you can do this:
Using ADB. Just type in the computer command prompt with the phone connected via USB. Of course, you need USB debugging enabled and have the android SDK installed on the computer.
Code:
adb shell chmod a-x /system/bin/dumpstate
Using Terminal Emulator on the phone. Just type the following commands:
Code:
$ su
# chmod a-x /system/bin/dumpstate
Using a root enabled file explorer on the phone such as Root Explorer or ES File Explorer. Browse to /system/bin/, find dumpstate, tap-hold to open the properties and remove all the Execute permissions.
aidfarh said:
I've written this in another thread, so I figure I'll just repost this here for everyone's reference.
There's a workaround for this problem. Just remove the execute permission from /system/bin/dumpstate so the error log is not generated.
Click to expand...
Click to collapse
Thanks a lot! It working perfectly, no more wifi error dump file, some more it seems fix my hanging issue as well, previously I keep facing phone hanging when switching between wifi on and off.
aidfarh said:
I've written this in another thread, so I figure I'll just repost this here for everyone's reference.
There's a workaround for this problem. Just remove the execute permission from /system/bin/dumpstate so the error log is not generated. There's a few ways you can do this:
Using ADB. Just type in the computer command prompt with the phone connected via USB. Of course, you need USB debugging enabled and have the android SDK installed on the computer.
Code:
adb shell chmod a-x /system/bin/dumpstate
Using Terminal Emulator on the phone. Just type the following commands:
Code:
$ su
# chmod a-x /system/bin/dumpstate
Using a root enabled file explorer on the phone such as Root Explorer or ES File Explorer. Browse to /system/bin/, find dumpstate, tap-hold to open the properties and remove all the Execute permissions.
Click to expand...
Click to collapse
thanks so much...it works..
c. Using a root enabled file explorer on the phone such as Root Explorer or ES File Explorer. Browse to /system/bin/, find dumpstate, tap-hold to open the properties and remove all the Execute permissions.
Click to expand...
Click to collapse
Thanks for the workaround..... this one really was eating up space.
help !
aidfarh said:
I've written this in another thread, so I figure I'll just repost this here for everyone's reference.
There's a workaround for this problem. Just remove the execute permission from /system/bin/dumpstate so the error log is not generated. There's a few ways you can do this:
Using ADB. Just type in the computer command prompt with the phone connected via USB. Of course, you need USB debugging enabled and have the android SDK installed on the computer.
Code:
adb shell chmod a-x /system/bin/dumpstate
Using Terminal Emulator on the phone. Just type the following commands:
Code:
$ su
# chmod a-x /system/bin/dumpstate
Using a root enabled file explorer on the phone such as Root Explorer or ES File Explorer. Browse to /system/bin/, find dumpstate, tap-hold to open the properties and remove all the Execute permissions.
Click to expand...
Click to collapse
Thanks for that. But whenever I try method b and c , what I get is that the dumpstate is a read only file, any idea what I should do ?
thanks
System memory continously decreasing
Hi all,
I'm having this same issue of system memory decreasing at a rapid rate. Had to do a factory reset once. Phone is non rooted. Checked the dump state file but it's really small in size. And i can't change executable permissions for that using es explorer without root. Any solution please?
zidhu said:
Thanks for that. But whenever I try method b and c , what I get is that the dumpstate is a read only file, any idea what I should do ?
thanks
Click to expand...
Click to collapse
Root. Sounds like you don't have root. You need root to do the above.
Geekeek said:
Hi all,
I'm having this same issue of system memory decreasing at a rapid rate. Had to do a factory reset once. Phone is non rooted. Checked the dump state file but it's really small in size. And i can't change executable permissions for that using es explorer without root. Any solution please?
Click to expand...
Click to collapse
Same as above. To change permissions on files in the system partition, you need root.
Thanks. What is causing the continual decrease? Can't root at least until the weekend but internal memory will be over in a day by the looks of it. :what:
Sent from my GT-I9100G using XDA
Geekeek said:
Thanks. What is causing the continual decrease? Can't root at least until the weekend but internal memory will be over in a day by the looks of it. :what:
Sent from my GT-I9100G using XDA
Click to expand...
Click to collapse
You said system memory in post 15, and internal memory above in post 17. Which is it?
In any case, I don't know what all you have installed and how you use your phone, so I can only guess what the cause would be.
If you for sure want it to stop, do a factory reset, (but you will lose all apps and user data) and carefully monitor what apps you re-install.
Sorry, it's obviously the system memory I am referring to. Already did a factory reset once and hardly installed anything later on. Still 1 gb used up.
Sent from my GT-I9100G using XDA
Geekeek said:
Sorry, it's obviously the system memory I am referring to. Already did a factory reset once and hardly installed anything later on. Still 1 gb used up.
Sent from my GT-I9100G using XDA
Click to expand...
Click to collapse
Not so obvious, really. Exactly how are you seeing the space remaining? Are you looking at Menu > Storage > Device memory?

[Q] Need help compiling Liquid Smooth!

Hey guys!
I finally did it and downloaded the liquid smooth's and device's repos. But now when I type 'make otapackage -j4 -i' after 4 hours(!) of compiling it stucks at a certain file and then I can't move the mouse, type someting or anything, Ubuntu 14.04 freezes and I have to press the power button to force the PC close.
Please anyone help? I'm posting a picture with my PC:
{
"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"
}
lefterios said:
Please anyone help? I'm posting a picture with my PC:
Click to expand...
Click to collapse
You might have a corrupted gvfsd-metadata. Do pkill gvfsd-metadata, rm -rf ~/.local/share/gvfs-metadata.
And compiling time depends on the computer specs and can easily take more than 3 hours on an average core processor(i3).
MasterAwesome said:
You might have a corrupted gvfsd-metadata. Do pkill gvfsd-metadata, rm -rf ~/.local/share/gvfs-metadata.
And compiling time depends on the computer specs and can easily take more than 3 hours on an average core processor(i3).
Click to expand...
Click to collapse
Okay I'll try it today I'll report if this worked.
I have an Intel core i5 with 3GB Ram and I think that it's quite long...
But thanks anyway!
Okay so I compiled again and now no freezes. Unfortunately however when it was going to end an error occured:
The weird thing is that all folders like system, recovery etc are there
Can you help?
lefterios said:
Okay so I compiled again and now no freezes. Unfortunately however when it was going to end an error occured:
The weird thing is that all folders like system, recovery etc are there
Can you help?
Click to expand...
Click to collapse
Can you paste the error here? With screenshots I can really help you. Just paste the error like this:
Code:
Error
GeekyDroid said:
Can you paste the error here? With screenshots I can really help you. Just paste the error like this:
Code:
Error
Click to expand...
Click to collapse
Ok sure:
Code:
Traceback (most recent call last):
File "./build/tools/releasetools/ota_from_target_files",line 1123, in <module>
main(sys.argv[1:])
File "./build/tools/releasetools/ota_from_target_files",line 1091, in main
WriteFullOTAPackage(input_zip, output_zip)
File "./build/tools/releasetools/ota_from_target_files",line 539, in WriteFullOTAPackage(OPTIONS.input_tmp,"BOOT")
File "/home/lefteris/working/build/tools/releasetools/common.py", line 361, in GetBootableImage
info_dict))
File "/home/lefteris/working/build/tools/releasetools/common.py", line 836, in __init__
self.size = len(data)
TypeError: object of type 'NoneType' has no len()
make: [/home/lefteris/working/out/target/product/golden/liquid_golden-ota-userdebug.lefteris.zip] Error 1 (ignored)
Sorry I may have made a mistake because I copied from the image. If you want full changelog you can right-click the image and press 'open image in a new tab'
lefterios said:
Ok sure:
Code:
Traceback (most recent call last):
File "./build/tools/releasetools/ota_from_target_files",line 1123, in
main(sys.argv[1:])
File "./build/tools/releasetools/ota_from_target_files",line 1091, in main
WriteFullOTAPackage(input_zip, output_zip)
File "./build/tools/releasetools/ota_from_target_files",line 539, in WriteFullOTAPackage(OPTIONS.input_tmp,"BOOT")
File "/home/lefteris/working/build/tools/releasetools/common.py", line 361, in GetBootableImage
info_dict))
File "/home/lefteris/working/build/tools/releasetools/common.py", line 836, in __init__
self.size = len(data)
TypeError: object of type 'NoneType' has no len()
make: [/home/lefteris/working/out/target/product/golden/liquid_golden-ota-userdebug.lefteris.zip] Error 1 (ignored)
Sorry I may have made a mistake because I copied from the image. If you want full changelog you can right-click the image and press 'open image in a new tab'
Click to expand...
Click to collapse
Did you type make -i (ignoring the errors?) If you did that, the zImage might not have been built because of errors and the boot image is not built due to this. It might also be because of fs size constraints. In your out folder of your device, check if you have the kernel and the root directory.
And in the py file the typecasting might have been done wrong since it says "object of type 'NoneType' has no len()"
MasterAwesome said:
Did you type make -i (ignoring the errors?) If you did that, the zImage might not have been built because of errors and the boot image is not built due to this. It might also be because of fs size constraints. In your out folder of your device, check if you have the kernel and the root directory.
And in the py file the typecasting might have been done wrong since it says "object of type 'NoneType' has no len()"
Click to expand...
Click to collapse
Ιn the out folder I have the root directory but not the kernel... And yes I typed -i because there were many errors and I couldn't build the ROM. So what do I have to do now? Please note that I'm beginner and I don't know very much for ROM development...
lefterios said:
Ιn the out folder I have the root directory but not the kernel... And yes I typed -i because there were many errors and I couldn't build the ROM. So what do I have to do now? Please note that I'm beginner and I don't know very much for ROM development...
Click to expand...
Click to collapse
As I said the error must have been in the kernel and ignoring that will not build the kernel, you will have to fix it manually the errors you face in the kernel building stage, post it here.
MasterAwesome said:
As I said the error must have been in the kernel and ignoring that will not build the kernel, you will have to fix it manually the errors you face in the kernel building stage, post it here.
Click to expand...
Click to collapse
Sorry I don't know how to do that :crying:
A question: Can I build the ROM with existing kernel image(boot.img) from another ROM? I don't make changes to kernel...
lefterios said:
Sorry I don't know how to do that :crying:
A question: Can I build the ROM with existing kernel image(boot.img) from another ROM? I don't make changes to kernel...
Click to expand...
Click to collapse
Yes you can, in the boardconfig.mk add a flag
TARGET_PREBUILT_KERNEL := $(DEVICE_FOLDER)/prebuilt/kernel
Be sure to define the DEVICE_FOLDER at the top of the make file.
Although its deprecated. But it'll work in your case if the kernel is a kitkat kernel.
MasterAwesome said:
Yes you can, in the boardconfig.mk add a flag
TARGET_PREBUILT_KERNEL := $(DEVICE_FOLDER)/prebuilt/kernel
Be sure to define the DEVICE_FOLDER at the top of the make file.
Although its deprecated. But it'll work in your case if the kernel is a kitkat kernel.
Click to expand...
Click to collapse
I tried it but again no luck What am I doing wrong? It produces all files and folders except kernel!
lefterios said:
I tried it but again no luck What am I doing wrong? It produces all files and folders except kernel!
Click to expand...
Click to collapse
I believe you forgot to remove the kernel directory flags from the board config.mk. attach it here.
MasterAwesome said:
I believe you forgot to remove the kernel directory flags from the board config.mk. attach it here.
Click to expand...
Click to collapse
Ok I attached the file found under ~/working/device/samsung/golden. I hope you can help me. I created the folder prebuilt and I put there a zImage. Is that right?
lefterios said:
Ok I attached the file found under ~/working/device/samsung/golden. I hope you can help me. I created the folder prebuilt and I put there a zImage. Is that right?
Click to expand...
Click to collapse
You named it as zImage and specified it as prebuilt/kernel. It should be $(DEVICE_FOLDER)/prebuilt/zImage.
MasterAwesome said:
You named it as zImage and specified it as prebuilt/kernel. It should be $(DEVICE_FOLDER)/prebuilt/zImage.
Click to expand...
Click to collapse
Firtsly is everything alright with the boardconfig file? So should I rename the file to zImage and that's it? And also which difference there is between kernel and zImage and which should I use?
lefterios said:
Firtsly is everything alright with the boardconfig file? So should I rename the file to zImage and that's it? And also which difference there is between kernel and zImage and which should I use?
Click to expand...
Click to collapse
Everything else seems fine... The path must be the path to your kernel or what ever you renamed it as.
I'd recommend you try and compile the kernel alone to check if it work
MasterAwesome said:
Everything else seems fine... The path must be the path to your kernel or what ever you renamed it as.
I'd recommend you try and compile the kernel alone to check if it work
Click to expand...
Click to collapse
I compiled the kernel alone and it didn't show any error. It made a zImage file successfully. So where is the problem?
lefterios said:
I compiled the kernel alone and it didn't show any error. It made a zImage file successfully. So where is the problem?
Click to expand...
Click to collapse
Trying doing a "make" without the -i and see where the build stops.

[HOW TO]Get Base Address from boot.img

Hello guys,
What I did
I just create a way to
extract the base address information from boot.img(the image made from mkbootimg).
Base address is very important when call mkbootimg to make image.
Here is the link how to unpack repack image
That method is very useful when there is no config information from kernel img(Like my situation)
The concept of it
I read the source code of mkbootimg.c, that's the git of it
And find that the all the information of kernel address, ramdisk address is contained in the header of boot.img,
and the base address can be calculate from them.
then you don't need to look for the base address information from the config.gz,
and just need one official rom to get the information.
What I bring
In attachment, It is the small tool I made to get the information from boot.img(include calculate the base address)
And Here is the source code of it
How to Use it
It needs to be run under linux or cygwin.
Go into the directory contain the tool, and type command
Code:
./GetImageInfo Boot_Image_Path
I just make the code today, so maybe there are some defect.
If you have some suggestion, please let me know.
Thank you very much
Compiled it for arm and tried it out on my image. It's reading base address as 0 and reports that the header is not correct so it cannot give me the base address. However, my base address is 0x80600000. Could you explain?
SHM said:
Compiled it for arm and tried it out on my image. It's reading base address as 0 and reports that the header is not correct so it cannot give me the base address. However, my base address is 0x80600000. Could you explain?
Click to expand...
Click to collapse
Hello, if you see the output is "Image Header is not in correct format" or "Error Header Information:"
It means there are some data corruption in the header part.
Maybe it hasn't assign kernel_address or ramdisk_addr correctly.
Here is the right relation ship between every address
1, kernel_address < ramdisk_address
2, ramdisk_address - kernel_address == ramdisk_offset - kernel_offset
3 kernel_offset = 0x00008000 ramdisk_offset = 0x01000000
4, Conclusion: base_address = ramdisk_address - ramdisk_offset;
Any of Condition 1 or 2 or 3 is not met, it means the header is not in a correct form.
You can give me your image, I can check it for you.
huuu said:
Hello, if you see the output is "Image Header is not in correct format" or "Error Header Information:"
It means there are some data corruption in the header part.
Maybe it hasn't assign kernel_address or ramdisk_addr correctly.
Here is the right relation ship between every address
1, kernel_address < ramdisk_address
2, ramdisk_address - kernel_address == ramdisk_offset - kernel_offset
3 kernel_offset = 0x00008000 ramdisk_offset = 0x01000000
4, Conclusion: base_address = ramdisk_address - ramdisk_offset;
Any of Condition 1 or 2 or 3 is not met, it means the header is not in a correct form.
You can give me your image, I can check it for you.
Click to expand...
Click to collapse
Here you go. This isn't my stock recovery image. It's my personal TWRP build for my device but the offsets are no different between the two. I'm curious to learn more about your logic on all this.
Also, my recovery/boot uses non standard base, and ramdisk offset as typically seen in mkbootimg.c.
SHM said:
Here you go. This isn't my stock recovery image. It's my personal TWRP build for my device but the offsets are no different between the two. I'm curious to learn more about your logic on all this.
Click to expand...
Click to collapse
Let me check you image first.
I learned all those logic from the source code of mkbootimg.
But I am not able to see the source code of it so far, I can post it later after I get home.
SHM said:
Also, my recovery/boot uses non standard base, and ramdisk offset as typically seen in mkbootimg.c.
Click to expand...
Click to collapse
That's the output of the information
kernel size = 0x5905a0
kernel address = 0x80608000
ramdisk size = 0x56c7bd
ramdisk address = 0x81c08000
second size = 0x0
second address = 0x81500000
tag address = 0x80600100
page size = 0x800
Actually, Kernel address is ok,
The problem is on Ramdisk Address.
base_address == kernel_address - kernel_offset == ramdisk_address - ramdisk_offset
huuu said:
That's the output of the information
kernel size = 0x5905a0
kernel address = 0x80608000
ramdisk size = 0x56c7bd
ramdisk address = 0x81c08000
second size = 0x0
second address = 0x81500000
tag address = 0x80600100
page size = 0x800
Actually, Kernel address is ok,
The problem is on Ramdisk Address.
base_address == kernel_address - kernel_offset == ramdisk_address - ramdisk_offset
Click to expand...
Click to collapse
Yea, in mkbootimg.c the standard ramdisk offset is 0x01000000 but my recovery and boot images uses non standard ramdisk offsets. It uses, 0x01608000.
Sent from my C525c using Tapatalk
---------- Post added at 08:40 PM ---------- Previous post was at 08:32 PM ----------
{
"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"
}
Sent from my C525c using Tapatalk
SHM said:
Yea, in mkbootimg.c the standard ramdisk offset is 0x01000000 but my recovery and boot images uses non standard ramdisk offsets. It uses, 0x01608000.
Sent from my C525c using Tapatalk
Click to expand...
Click to collapse
Ok, then that's the problem XD
The program is using the ramdisk offset of 0x01000000,
and in the header, there is no way to check the ramdisk_offset and kernel_offset. So I use the standard one.
I did a secure check of ramdisk_address - kernel_address == ramdisk_offset - kernel_offset, to make sure the header is not corrupted.
If you are using one none standard ramdisk_offset
you need to do following change to main.c
1st comment ln46
2nd, change ln48 to base_address = kernel_address - kernel_offset;
SHM said:
Yea, in mkbootimg.c the standard ramdisk offset is 0x01000000 but my recovery and boot images uses non standard ramdisk offsets. It uses, 0x01608000.
Sent from my C525c using Tapatalk
---------- Post added at 08:40 PM ---------- Previous post was at 08:32 PM ----------
Sent from my C525c using Tapatalk
Click to expand...
Click to collapse
Or I will make some more change to the program, to allow to add some none-standard ramdisk_offset or kernel_offset.
huuu said:
Or I will make some more change to the program, to allow to add some none-standard ramdisk_offset or kernel_offset.
Click to expand...
Click to collapse
Would recommend doing the same for tags, kernel, and second as well. I came across one image where all offsets were non standard lol. Nice job putting this together though.
Sent from my C525c using Tapatalk
SHM said:
Would recommend doing the same for tags, kernel, and second as well. I came across one image where all offsets were non standard lol. Nice job putting this together though.
Sent from my C525c using Tapatalk
Click to expand...
Click to collapse
Sure, I can do it in the weekend, since I am not able to commit the change to the repository right now XD
There is an app on the play store called sgit. I use it all the time to clone, commit changes, and push. May be useful to you .
Sent from my C525c using Tapatalk
SHM said:
There is an app on the play store called sgit. I use it all the time to clone, commit changes, and push. May be useful to you .
Sent from my C525c using Tapatalk
Click to expand...
Click to collapse
Thanks
SHM said:
There is an app on the play store called sgit. I use it all the time to clone, commit changes, and push. May be useful to you .
Sent from my C525c using Tapatalk
Click to expand...
Click to collapse
Sorry for the delay. I was quit busy those days.
I just finished the code for customized the kernel offset and ramdisk offset parameter, you can try it from my github.
GetImageInfo [--kernel_offset <KernalOffset>] [--ramdisk_offset <RamdiskOffset>] <filename>

[31.12.15]IMEI(EFS)BAckup Tool N 5 I Updated for systemless root I Promo for RD/C/T

IMEI (EFS) BAckup Tool Note 5
{
"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"
}
This is simple EFS backup tool. We are very well knowing about what EFS is and why it is MUST to backup on every rooted device. If you don't know then Read this.
You needs root access to use this tool otherwise app won't open..
Location of stored file :
Device storage/MyEFS
If you unable to see backup, contact me with details of your device variant
Download :
Pro Version
XDA version (free)- Attached at end of this post.
Difference between Free/Play store
-Both version makes backup in same format and no difference in backup.
-Pro version have option to Restore with single click
-Free version will save file in MyEFS and if you make next backup it will replace older one. While play store version everytime creates new folder with date ,Time and your IMEI stamp so you can keep multiple backup as well no confulsion about which backup is made when and on which device. Also it makes copy of build.prop so you can get idea you were on which ROM when backup created)
-Play store version give notification in case backup not created.
-Weekly Auto backup feature available on play store version.
-PIT creator. Play store V1.1 added option to create PIT file from existing layout
Click to expand...
Click to collapse
This tool using generic name of partition block and you can restore with simple adb shell
dd if=/path of backup files/ of=/partition block according your device
ChangeLog
1.0 - Initial release. (3644)
1.1 - Fixed for systemless root users.
What is EFS
This part of the device contains some important and some basic info related to our device identity like Bluetooth MAC address, wireless devices MAC addresses, product code (also in the nv_data.bin) and the very main IMEI address (nv_data.bin), programming parameters for the device such as your account information (phone number, etc), data provisioning parameters, and a whole bunch of other things. So you can guess it's will be different for each device and one can't use others. In latest samsung device this information store in other partition so requires to make backup of that partition too.
How it can corrupt :
- Any bad flashing, mishandling system modification can cause this.
- Also It can be corrupted by downgrading stock ROM. If you flash any old ROM on newer ROM it can corrupt EFS. Basically newer ROM believed to have new kernel that changes EFS data which older Modems can't read and results to fail in reading IMEI.
Impact on device/How I know I have corrupted EFS
When there is EFS partition is corrupted, device loses IMEI and due to this device can't gets connected to network. Baseband info also sometimes shows unknown.
-Check your IMEI in setting / by dialling *#06# if it is null OR if it starts with 0049** then IMEI is generic and corrupted. In Normal case IMEI which you can see in device setting or dialing *#06# is exactly same you can see on bill/box/sticker under battery compartment
-If you are unable to connect to network in spite of correct IMEI, chance are
A. Your device is Locked to specific Network OR
B. Your device is banned due to tempered IMEI
-If your AP,CP,CSC all are correct and even you are getting error (unknown CSC XXX) on kies update, it may be due to corrupt Product code in EFS. Read This for detail.
What care should i take
Before flashing anything, first thing you should do is to make EFS backup. Every person who have rooted device should make EFS backup earliest and place it to safer place on PC and /Cloud.
If you are on older ROM, make EFS backup on older ROM as well make another after upgrading ROM too.
If you have already updated to newer ROM, make backup on current ROM.
Exit "Permanent Safe Mode" This condition represent with loss of IMEI + yellow text box on homescreen with device info.here is Screenshot
Here is different method to remove it.
Method1 :
Open root explorer.
Navigate to /efs/FactoryApp/
Open "factorymode" file as Text and edit it:
Change this:
Code:
OFF
To:
Code:
ON
Open "keystr" file as Text and edit it:
Code:
OFF
To:
Code:
ON
Reboot device.
Method2:
Open Terminal emulator
Write the following:
Code:
su
Then click enter. It will ask for super user permission, give it permissions.
Write the following & click enter:
Code:
rm /efs/FactoryApp/keystr
Write the following & click enter:
Code:
rm /efs/FactoryApp/factorymode
Write the following & click enter:
Code:
echo -n ON >> /efs/FactoryApp/keystr
Write the following & click enter:
Code:
echo -n ON >> /efs/FactoryApp/factorymode
Write the following & click enter:
Code:
chown 1000.1000 /efs/FactoryApp/keystr
Write the following & click enter:
Code:
chown 1000.1000 /efs/FactoryApp/factorymode
Write the following & click enter:
Code:
chmod 0744 /efs/FactoryApp/keystr
Write the following & click enter:
Code:
chmod 0744 /efs/FactoryApp/factorymode
Reboot your device
Method3
Install attached safemode_exit apk as regular app. Open from drawer - Grant su permission - Reboot when asked.
e:failed to mount /efs(invalid argument) error with bootloop
This condition usually happens with using unsupported tool (usually from play store).
To recover this, needs to use adb shell
Code:
adb shell
mke2fs / dev/block/mmcblk0p[COLOR="Red"]x[/COLOR]
mount-w-t ext4 / dev/block/mmcblk0p[COLOR="red"]x[/COLOR] / efs
x means your device EFS partition number
PS : It needs CWM and busybox installed.
Reserved 3
Reserved 4
Reserved 5
Thank you
Sent from my SM-N920T using Tapatalk
Yet another useful contribution
Thanks
Nothing happens when i try to launch the app. Is that normal, or should there be a GUI? Also tried pro version.
Sent from my SM-N920T using Tapatalk
daftlush said:
Nothing happens when i try to launch the app. Is that normal, or should there be a GUI? Also tried pro version.
Sent from my SM-N920T using Tapatalk
Click to expand...
Click to collapse
Are you sure you have rooted device? As said in op it won't open without root access.
Sent from my SM-N920I using xda premium
dr.ketan said:
Are you sure you have rooted device? As said in op it won't open without root access.
Sent from my SM-N920I using xda premium
Click to expand...
Click to collapse
ohh yeah. root is 100%.
Sent from my SM-N920T using Tapatalk
daftlush said:
ohh yeah. root is 100%.
Sent from my SM-N920T using Tapatalk
Click to expand...
Click to collapse
Which is your device model ?
Reinstall and click on app icon and wait till it ask for supersu. Once you grant permission then only app will show ui
Sent from my SM-N920I using xda premium
dr.ketan said:
Which is your device model ?
Reinstall and click on app icon and wait till it ask for supersu. Once you grant permission then only app will show ui
Sent from my SM-N920I using xda premium
Click to expand...
Click to collapse
t-mo. rooted. su set to auto allow.
Sent from my SM-N920T using Tapatalk
Check Super su log and see it has granted su permission to app.
i have no baseband and imei unknown after updating to latest tmo firmware and installing DarthStalker. Have backup from when i first rooted phone. will purchasing your app fix you think?
do i need to downgrade to old firmware and restore?
many thanks for all your hardwork for the community,!
Try Restoring directly if doesn't work then flash same firmware on which you made backup. If any issue or doesn't work pm me.
Before doing anything make copy of backup on multiple storage.
Sent from my SM-N920G using xda premium
Thank you so much for all the help. I am now back up and running. You are awesome ,sir.!
Got it to work. How do i find out what to type in promt to restore?
Sent from my SM-N920T using Tapatalk
nice tool, but how to restore a backup ?
nmx87 said:
nice tool, but how to restore a backup ?
Click to expand...
Click to collapse
the same question
Guys it's in the OP...use Terminal Emulator with the commands in the OP. .

Categories

Resources