CellularPrivacy / Android-IMSI-Catcher-Detector

AIMSICD • Fight IMSI-Catcher, StingRay and silent SMS!
https://cellularprivacy.github.io/Android-IMSI-Catcher-Detector/
GNU General Public License v3.0
4.75k stars 948 forks source link

Can't start app anymore with current build #496

Closed DJaeger closed 9 years ago

DJaeger commented 9 years ago

The app crashs directly after starting. I have installed the most current build. Also after a reinstallation it doesn't work. Occues on Android 4.4.4 (CM11).

Here my logcat.

I/Timeline( 1341): Timeline: Activity_launch_request id:com.SecUpwN.AIMSICD time:184418
I/ActivityManager(  741): START u0 {act=android.intent.action.MAIN cat=[android.intent.category.LAUNCHER] flg=0x10200000 cmp=com.SecUpwN.AIMSICD/.AIMSICD bnds=[810,473][1032,723]} from pid 1341
I/ActivityManager(  741): Start proc com.SecUpwN.AIMSICD for activity com.SecUpwN.AIMSICD/.AIMSICD: pid=6195 uid=10617 gids={50617, 3003, 1028, 1015}
D/ActivityThread( 6195): handleBindApplication:com.SecUpwN.AIMSICD
D/AppAIMSICD( 6195): BaseTask attach:com.SecUpwN.AIMSICD.AIMSICD
I/AIMSICD_Service( 6195): Service launched successfully.
I/AIMSICD ( 6195): CellTracker: ALERT: No neighboring cells detected for CID: xxxxxxxx
E/AndroidRuntime( 6195): Process: com.SecUpwN.AIMSICD, PID: 6195
E/AndroidRuntime( 6195):    at com.SecUpwN.AIMSICD.adapters.AIMSICDDbAdapter$DbHelper.onOpen(AIMSICDDbAdapter.java:1430)
E/AndroidRuntime( 6195):    at com.SecUpwN.AIMSICD.adapters.AIMSICDDbAdapter.open(AIMSICDDbAdapter.java:181)
E/AndroidRuntime( 6195):    at com.SecUpwN.AIMSICD.service.CellTracker.compareLac(CellTracker.java:614)
E/AndroidRuntime( 6195):    at com.SecUpwN.AIMSICD.service.CellTracker$2.onCellLocationChanged(CellTracker.java:751)
W/ActivityManager(  741):   Force finishing activity com.SecUpwN.AIMSICD/.AIMSICD
I/WindowManager(  741): Screenshot max retries 4 of Token{428677a0 ActivityRecord{425082e8 u0 com.SecUpwN.AIMSICD/.AIMSICD t9 f}} appWin=Window{42c24fe0 u0 com.SecUpwN.AIMSICD/com.SecUpwN.AIMSICD.AIMSICD} drawState=1
W/ActivityManager(  741): Activity pause timeout for ActivityRecord{425082e8 u0 com.SecUpwN.AIMSICD/.AIMSICD t9 f}
W/InputDispatcher(  741): channel '42c24fe0 com.SecUpwN.AIMSICD/com.SecUpwN.AIMSICD.AIMSICD (server)' ~ Consumer closed input channel or an error occurred.  events=0x9
E/InputDispatcher(  741): channel '42c24fe0 com.SecUpwN.AIMSICD/com.SecUpwN.AIMSICD.AIMSICD (server)' ~ Channel is unrecoverably broken and will be disposed!
W/InputDispatcher(  741): Attempted to unregister already unregistered input channel '42c24fe0 com.SecUpwN.AIMSICD/com.SecUpwN.AIMSICD.AIMSICD (server)'
I/ActivityManager(  741): Process com.SecUpwN.AIMSICD (pid 6195) has died.
I/WindowState(  741): WIN DEATH: Window{42c24fe0 u0 com.SecUpwN.AIMSICD/com.SecUpwN.AIMSICD.AIMSICD}
W/ActivityManager(  741): Scheduling restart of crashed service com.SecUpwN.AIMSICD/.service.AimsicdService in 1000ms
W/NotificationService(  741): Object died trying to hide notification android.app.ITransientNotification$Stub$Proxy@42c15008 in package com.SecUpwN.AIMSICD
I/ActivityManager(  741): Start proc com.SecUpwN.AIMSICD for service com.SecUpwN.AIMSICD/.service.AimsicdService: pid=6254 uid=10617 gids={50617, 3003, 1028, 1015}
D/ActivityThread( 6254): handleBindApplication:com.SecUpwN.AIMSICD
I/AIMSICD_Service( 6254): Service launched successfully.
I/AIMSICD ( 6254): CellTracker: ALERT: No neighboring cells detected for CID: xxxxxxxx
E/AndroidRuntime( 6254): Process: com.SecUpwN.AIMSICD, PID: 6254
E/AndroidRuntime( 6254):    at com.SecUpwN.AIMSICD.adapters.AIMSICDDbAdapter$DbHelper.onOpen(AIMSICDDbAdapter.java:1430)
E/AndroidRuntime( 6254):    at com.SecUpwN.AIMSICD.adapters.AIMSICDDbAdapter.open(AIMSICDDbAdapter.java:181)
E/AndroidRuntime( 6254):    at com.SecUpwN.AIMSICD.service.CellTracker.compareLac(CellTracker.java:614)
E/AndroidRuntime( 6254):    at com.SecUpwN.AIMSICD.service.CellTracker$2.onCellLocationChanged(CellTracker.java:751)
I/ActivityManager(  741): Process com.SecUpwN.AIMSICD (pid 6254) has died.
W/ActivityManager(  741): Service crashed 2 times, stopping: ServiceRecord{42ec6240 u0 com.SecUpwN.AIMSICD/.service.AimsicdService}
SecUpwN commented 9 years ago

The app crashs directly after starting.

Strange. Cannot confirm this. Security advice: You should remove/obfuscate CID/LAC in your logcat.

I have installed the most current build. Also after a reinstallation it doesn't work.

Which version did you use before trying to install the new one? Tried to remove any old leftovers?

DJaeger commented 9 years ago

That issue occurred also with some builds before. I could solve it now by deleting lacells table

SecUpwN commented 9 years ago

I could solfe it now by deleting lacells table

You mean the one introduced with #467 by @wvengen? Maybe you can fix it instead of removing it? :)

DJaeger commented 9 years ago

I simply deleted the files from .nogapps directory. At first I wanted to get the app to work, to look into #403.

DJaeger commented 9 years ago

It could be something similar to https://github.com/SecUpwN/Android-IMSI-Catcher-Detector/issues/483

wvengen commented 9 years ago

Whoops - sorry to have introduced a bug! What might be happening is this: on first opening, an index on geo-coordinates is created in lacells.db (so that finding close cellids will be faster during normal use). Apparently this takes more time that Android likes, and AIMSCD is killed. Clearly, adding the index on opening like this is not an ideal solution.

agilob commented 9 years ago

What might be happening is this: on first opening, an index on geo-coordinates is created

No it's not created. Even database or table might not exist at all. Database isn't created due to 4 errors I reported earlier this week.

E3V3A commented 9 years ago

Is this still an issue? BTW. We generally don't support Roms (like CM)...

SecUpwN commented 9 years ago

We generally don't support Roms (like CM)...

I know. But I fully respect the people who do, I'm only using custom ROMs as well.

DJaeger commented 9 years ago

I have not tried again. We don't support spying free ROMs for an anti-spying app? Will try it some time later and will give feedback.

SecUpwN commented 9 years ago

Will try it some time later and will give feedback.

Thanks, let me know here ASAP. I'll skip today's release if not fixed. No worries.

breversa commented 9 years ago

I had the same problem as DJaeger (and CM11 too, on Galaxy Nexus). The app would very shortly after startup, after upgrading from v0.1.28/29 to v0.1.30.

Deinstalling the app, deleting the .no-gapps folder then reinstalling the app (v0.1.30) solved the problem. :-) (Deleting .no-gapps might have been enough though)

E3V3A commented 9 years ago

Wanna make a PR for detecting .no-gapps folder on ROM based devices?

breversa commented 9 years ago

What's PR ? Public Relations ?

agilob commented 9 years ago

pull request

lop1 commented 9 years ago

please where are those .no-gapps files ? I can't even access the debug item in the menu.

E3V3A commented 9 years ago

please where are those .no-gapps files ? I can't even access the debug item in the menu.

Try:

su
busybox find / -iname "*gapps*"
busybox find / -iname "*AIMSICD*"

Then uninstall and use a rooted file browser to remove anything AIMSICD related.

breversa commented 9 years ago

On my Galaxy Nexus (maguro), I found the .nogapps folder in /sdcard/ (or /storage/sdcard0, or /storage/emulated/legacy of which they are aliases/links), but E3V3A's answer is more generic.

breversa commented 9 years ago

@agilob : What's a pull request, then ?

lop1 commented 9 years ago

screenshot_2015-07-02-12-18-42_resized_1 No luck  , there is may  be something else. .. 7f7a323a-20b5-11e5-9053-d98a8e2941a9 1

lop1 commented 9 years ago

Nothing in mine ...

SecUpwN commented 9 years ago

What's a pull request, then?

@breversa, please use the search function and find pull requests.

breversa commented 9 years ago

@SecUpwN : Thanks ! I did not realise it refered to something GitHub-specific !

DJaeger commented 9 years ago

@lop1: Do you have created a database from GSM Location Service for UnifiedNlp? In other cases you will not have this directory.

E3V3A commented 9 years ago

??

DJaeger commented 9 years ago

@E3V3A: Please ask a question, not only "??".

E3V3A commented 9 years ago

I can now confirm that app crashes on first startup...

?? = I don't understand the question?

DJaeger commented 9 years ago

@E3V3A: @lop1 said he/she can't find the .nogapps directory, beauce of that I asked if he/she have done the task, that creates it.

Currently I only see the error from #325.

Edited: Moved logcat to #325.

lop1 commented 9 years ago

I have loaded the last build from bulldozer, it start OK now. the version seems to still be 0.1.30 alpha b08. AND #505 seems fixed, the icon is kept green and I can download theOpenCells for my region. thumb up !

lop1 commented 9 years ago

@DJaeger oups, I have not created a database from GSM Location Service for UnifiedNlp ( I don't know what it is )

SecUpwN commented 9 years ago

the version seems to still be 0.1.30 alpha b08.

@lop1, it will only change when our developers change it manually. See the Buildozer Build below it. @DJaeger, word of honor: THANK YOU for working your ass off with us. You're an awesome dude! :+1:

lop1 commented 9 years ago

Thanks,  I am not familiar with this environment.

DJaeger commented 9 years ago

@E3V3A: How should detecting of .nogapps directory help? The issue only occures if we want to use it,, which is only the case if it is available. The HOW we use it is wrong!

@lop1: UnifiedNlp is a Middleware for Google-free location services like OpenCellID and Mozilla Location Services. You can install which backend service you want to use, for example the before mentioned. GSM Location Services is also a backend for it, which works completly offline, without requesting a online service in livetime like most of the others. This is done by manually downloading data of OCID and MLS and merging them in a local database (lacells.db) which is located in ".nogapps" in extStorage (something like /storage/emulated/0/.nogapps/ ). As this database include CellIDs we use it, if available, to check the current CellID. To read more or install it search for "UnifiedNlp" in F-Droid.

@Lop1 & SecUpwN: The build number is now increased.

E3V3A commented 9 years ago

@SecUpwN It seem all this started around #467 and related PRs. Can we carefully or manually ( @DJaeger ) revert it?

SecUpwN commented 9 years ago

Can we carefully or manually revert it?

I have just contacted @wvengen as told in https://github.com/SecUpwN/Android-IMSI-Catcher-Detector/pull/467#issuecomment-118305481. Please allow some time. If he does not respond within a reasonable time frame I will revert his PR by myself. Thank you for your patience.

DJaeger commented 9 years ago

@E3V3A: I have done to much fixes sine then to revert it now

The error occures on L1430 of AIMSICDDbAdapter:

ladb.execSQL(LACELLS_TABLE_CREATE);

where

                String LACELLS_TABLE_CREATE = "CREATE TABLE " +
                        LACELLS_TABLE  + " (" + COLUMN_ID +
                        " INTEGER PRIMARY KEY AUTOINCREMENT, " +
                        "Lac INTEGER, CellID INTEGER, " +
                        "Net VARCHAR, " +
                        "Lat VARCHAR, " +
                        "Lng VARCHAR, " +
                        "Signal INTEGER, " +
                        "Connection VARCHAR, " +
                        "Timestamp TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP);";

is executed.

DJaeger commented 9 years ago

The problem here seems be that we want to create the table "cells" which is already existing by default.

DJaeger commented 9 years ago

@wvengen: Could you please explain me why you want to create this table, as this is the core table, which is created on creation of the database. I think we can completely leave out the creation or should at least do an "if not exist".

SecUpwN commented 9 years ago

I think we can completely leave out the creation or should at least do an "if not exist".

Yes, please do these propsed changes, @DJaeger. I guess @wvengen does not know how to fix this.

SecUpwN commented 9 years ago

Re-opened upon request in https://github.com/SecUpwN/Android-IMSI-Catcher-Detector/pull/467#issuecomment-118400004. Please introduce another fix.

E3V3A commented 9 years ago

Just FYI, I no longer have problem with this... b172.

lop1 commented 9 years ago

Same here, with b12 :

E3V3A commented 9 years ago

So I'll close, until someone has further problems.