shmykelsa / AA-Tweaker

Tool to apply patches to Google Play Services that will enable some extra functionality on Android Auto
GNU General Public License v2.0
403 stars 28 forks source link

App in crash after enabling the calendar option #14

Open woody4165 opened 3 years ago

woody4165 commented 3 years ago

Hi

I've enabled some of the options, but after enabling the calendar one, leaving 1 day, and after rebooting the phone, when entering again in the app, after clicking the "I understand" button, the app crashes and continue crashing

This is the message I get

Screenshot_2021-03-05-16-20-30-796_com miui bugreport

Screenshot_2021-03-05-16-20-37-462_com miui bugreport

What can I do now to let the app works again?

Thanks

woody4165 commented 3 years ago

I've cleared all the data and then also uninstalled and reinstalled the app, but it still crashes. What can I check to let it work again?

Thanks

Logcat

FATAL EXCEPTION: main
Process: sksa.aa.tweaker, PID: 13658
java.lang.RuntimeException: Unable to start activity ComponentInfo{sksa.aa.tweaker/sksa.aa.tweaker.MainActivity}: java.lang.NumberFormatException: For input string: ""
    at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:3313)
    at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:3462)
    at android.app.servertransaction.LaunchActivityItem.execute(LaunchActivityItem.java:83)
    at android.app.servertransaction.TransactionExecutor.executeCallbacks(TransactionExecutor.java:135)
    at android.app.servertransaction.TransactionExecutor.execute(TransactionExecutor.java:95)
    at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2049)
    at android.os.Handler.dispatchMessage(Handler.java:107)
    at android.os.Looper.loop(Looper.java:224)
    at android.app.ActivityThread.main(ActivityThread.java:7565)
    at java.lang.reflect.Method.invoke(Native Method)
    at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:539)
    at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:950)
Caused by: java.lang.NumberFormatException: For input string: ""
    at java.lang.Integer.parseInt(Integer.java:627)
    at java.lang.Integer.parseInt(Integer.java:650)
    at sksa.aa.tweaker.MainActivity$u1.run(Unknown Source:187)
    at android.app.Activity.runOnUiThread(Activity.java:6989)
    at sksa.aa.tweaker.MainActivity.J0(Unknown Source:19)
    at sksa.aa.tweaker.MainActivity.onCreate(Unknown Source:13)
    at android.app.Activity.performCreate(Activity.java:7916)
    at android.app.Activity.performCreate(Activity.java:7903)
    at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1307)
    at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:3288)
    ... 11 more
checkOperation
java.lang.SecurityException: Specified package sksa.aa.tweaker under uid 10219 but it is really -1
    at com.android.server.appop.AppOpsService.verifyAndGetIsPrivileged(AppOpsService.java:2829)
    at com.android.server.appop.AppOpsService.checkOperationUnchecked(AppOpsService.java:1903)
    at com.android.server.appop.AppOpsService.checkOperationUnchecked(AppOpsService.java:1885)
    at com.android.server.appop.AppOpsService.checkOperationImpl(AppOpsService.java:1870)
    at com.android.server.appop.AppOpsService.checkOperationInternal(AppOpsService.java:1849)
    at com.android.server.appop.AppOpsService.checkOperation(AppOpsService.java:1840)
    at com.android.server.am.AutoStartManagerService.canRestartServiceLocked(AutoStartManagerService.java:144)
    at com.android.server.am.AutoStartManagerService.canRestartServiceLocked(AutoStartManagerService.java:133)
    at com.android.server.am.AutoStartManagerService.signalStopProcessesLocked(AutoStartManagerService.java:157)
    at com.android.server.am.ProcessList.killPackageProcessesLocked(ProcessList.java:2262)
    at com.android.server.am.ActivityManagerService.forceStopPackageLocked(ActivityManagerService.java:4838)
    at com.android.server.am.ActivityManagerService.broadcastIntentLocked(ActivityManagerService.java:15471)
    at com.android.server.am.ActivityManagerService.broadcastIntentLocked(ActivityManagerService.java:15212)
    at com.android.server.am.ActivityManagerService.broadcastIntent(ActivityManagerService.java:16006)
    at com.android.server.pm.PackageManagerService.doSendBroadcast(PackageManagerService.java:13556)
    at com.android.server.pm.PackageManagerService.lambda$sendPackageBroadcast$8$PackageManagerService(PackageManagerService.java:13454)
    at com.android.server.pm.-$$Lambda$PackageManagerService$UtVCpL0mJ1ePNHwGgkapgCkTreo.run(Unknown Source:18)
    at android.os.Handler.handleCallback(Handler.java:883)
    at android.os.Handler.dispatchMessage(Handler.java:100)
    at android.os.Looper.loop(Looper.java:224)
    at android.os.HandlerThread.run(HandlerThread.java:67)
    at com.android.server.ServiceThread.run(ServiceThread.java:45)
shmykelsa commented 3 years ago

Please try version 3.2 and let me know if this is fixed

woody4165 commented 3 years ago

Thanks @shmykelsa

This version solved the app crash and now it's working again...

Choosing again Calendar option, I have to choose a value higher than 1 (is it correct?). If I choose 2 (and maybe another value), tells me that command did not succeed and tells me to wait a minute and retry. I did it and I see the option on, but with value 0. So, I disabled again the option, rebooted, chosed another value (tried 2-3-4) and I get again the same message. I see that now it's possible to send issue directly here, should I send it?

Thanks

shmykelsa commented 3 years ago

Thanks @shmykelsa

This version solved the app crash and now it's working again...

Choosing again Calendar option, I have to choose a value higher than 1 (is it correct?).

Yes it is. 1 is default value so makes no sense to apply 1

If I choose 2 (and maybe another value), tells me that command did not succeed and tells me to wait a minute and retry.

When you were doing this, did you have a green status near the button?

I did it and I see the option on, but with value 0. So, I disabled again the option, rebooted, chosed another value (tried 2-3-4) and I get again the same message.

Probably it's a good idea to choose to revert everything and start from a clean base

I see that now it's possible to send issue directly here, should I send it?

Thanks

woody4165 commented 3 years ago

I've reverted everything, then rebooted phone, restarted with all options red, started only with calendar sat to 2 and I get same error

shmykelsa commented 3 years ago

When you apply the option, does the log show an error like "ERROR: Database is locked"?

woody4165 commented 3 years ago

8I get this message

Screenshot_2021-03-07-10-19-48-463_sksa aa tweaker

And this log

REGISTRO:

-- Drop Triggers  --
    OutputStream:
        /data/user/0/sksa.aa.tweaker/sqlite3 /data/data/com.google.android.gms/databases/phenotype.db 'DROP TRIGGER IF EXISTS calendar_aa_tweak;'

--  run SQL method   --
    OutputStream:
        /data/user/0/sksa.aa.tweaker/sqlite3 /data/data/com.google.android.gms/databases/phenotype.db 'DELETE FROM Flags WHERE name="McFly__num_days_in_agenda_view";
        INSERT OR REPLACE INTO FlagOverrides (packageName, flagType, name, user, intVal, committed) VALUES ("com.google.android.projection.gearhead",0,"McFly__num_days_in_agenda_view", (SELECT DISTINCT user FROM Flags WHERE user != ""LIMIT 0,1),2,1);
        INSERT OR REPLACE INTO FlagOverrides (packageName, flagType, name, user, intVal, committed) VALUES ("com.google.android.projection.gearhead",0,"McFly__num_days_in_agenda_view", (SELECT DISTINCT user FROM Flags WHERE user != ""LIMIT 1,1),2,1);
        INSERT OR REPLACE INTO FlagOverrides (packageName, flagType, name, user, intVal, committed) VALUES ("com.google.android.projection.gearhead",0,"McFly__num_days_in_agenda_view", (SELECT DISTINCT user FROM Flags WHERE user != ""LIMIT 2,1),2,1);
        '
    ErrorStream:
        Error: unable to open database file
    OutputStream:
        /data/user/0/sksa.aa.tweaker/sqlite3 /data/data/com.google.android.gms/databases/phenotype.db 'CREATE TRIGGER calendar_aa_tweak AFTER DELETE
        ON FlagOverrides
        BEGIN
        INSERT OR REPLACE INTO FlagOverrides (packageName, flagType, name, user, intVal, committed) VALUES ("com.google.android.projection.gearhead",0,"McFly__num_days_in_agenda_view", (SELECT DISTINCT user FROM Flags WHERE user != ""LIMIT 0,1),2,1);
        INSERT OR REPLACE INTO FlagOverrides (packageName, flagType, name, user, intVal, committed) VALUES ("com.google.android.projection.gearhead",0,"McFly__num_days_in_agenda_view", (SELECT DISTINCT user FROM Flags WHERE user != ""LIMIT 1,1),2,1);
        INSERT OR REPLACE INTO FlagOverrides (packageName, flagType, name, user, intVal, committed) VALUES ("com.google.android.projection.gearhead",0,"McFly__num_days_in_agenda_view", (SELECT DISTINCT user FROM Flags WHERE user != ""LIMIT 2,1),2,1);
        END;'

Then I see this

IMG_20210307_105751

shmykelsa commented 3 years ago

Uhm, it seems like many operations are giving hard time to the database.

Is this the only tweak not working?

woody4165 commented 3 years ago

I will try now. Just one clarification, if I want to apply several options, should I apply them one by one and then reboot everytime, or can I apply some or all I want all in one time?

shmykelsa commented 3 years ago

There should be no contraindications in doing them all in one time, however there's the risk that after doing many of them the database locks itself because of the too many operations. In that case, with the latest update, the app has been made stronger to handle this errors better and have a bit of a cooldown before making a new move.

woody4165 commented 3 years ago

I had another crash setting up 3 options together when choosing also the "enable cards in multimedia app" Reverting the option after a reboot, I get this log.

REGISTRO:


-- Reverting the hack  --
    OutputStream:
        /data/user/0/sksa.aa.tweaker/sqlite3 /data/data/com.google.android.gms/databases/phenotype.db 'DROP TRIGGER IF EXISTS aa_media_tabs;'
    OutputStream:
        /data/user/0/sksa.aa.tweaker/sqlite3 /data/data/com.google.android.gms/databases/phenotype.db 'DELETE FROM FlagOverrides;'
    ErrorStream:
        Error: database is locked
shmykelsa commented 3 years ago

And other tweaks are reverted/applied fine?

woody4165 commented 3 years ago

Also another option gives me error The one for enabling cards in multimedia apps

REGISTRO:

-- Drop Triggers  --
    OutputStream:
        /data/user/0/sksa.aa.tweaker/sqlite3 /data/data/com.google.android.gms/databases/phenotype.db 'DROP TRIGGER IF EXISTS aa_media_tabs;'

--  run SQL method   --
    OutputStream:
        /data/user/0/sksa.aa.tweaker/sqlite3 /data/data/com.google.android.gms/databases/phenotype.db 'INSERT OR REPLACE INTO FlagOverrides (packageName, flagType,  name, user, boolVal, committed) VALUES ("com.google.android.projection.gearhead",0,"Tabbouleh__tabs_media_enabled", (SELECT DISTINCT user FROM Flags WHERE user != ""LIMIT 0,1) ,1,1);
        INSERT OR REPLACE INTO FlagOverrides (packageName, flagType,  name, user, boolVal, committed) VALUES ("com.google.android.projection.gearhead",0,"Tabbouleh__media_browse_back_to_top_level_button_enabled", (SELECT DISTINCT user FROM Flags WHERE user != ""LIMIT 0,1) ,1,1);
        INSERT OR REPLACE INTO FlagOverrides (packageName, flagType,  name, user, boolVal, committed) VALUES ("com.google.android.projection.gearhead",0,"Tabbouleh__tabs_media_sticky_tab_enabled", (SELECT DISTINCT user FROM Flags WHERE user != ""LIMIT 0,1) ,1,1);
        INSERT OR REPLACE INTO FlagOverrides (packageName, flagType,  name, user, boolVal, committed) VALUES ("com.google.android.projection.gearhead",0,"Tabbouleh__tabs_media_enabled", (SELECT DISTINCT user FROM Flags WHERE user != ""LIMIT 1,1) ,1,1);
        INSERT OR REPLACE INTO FlagOverrides (packageName, flagType,  name, user, boolVal, committed) VALUES ("com.google.android.projection.gearhead",0,"Tabbouleh__media_browse_back_to_top_level_button_enabled", (SELECT DISTINCT user FROM Flags WHERE user != ""LIMIT 1,1) ,1,1);
        INSERT OR REPLACE INTO FlagOverrides (packageName, flagType,  name, user, boolVal, committed) VALUES ("com.google.android.projection.gearhead",0,"Tabbouleh__tabs_media_sticky_tab_enabled", (SELECT DISTINCT user FROM Flags WHERE user != ""LIMIT 1,1) ,1,1);
        INSERT OR REPLACE INTO FlagOverrides (packageName, flagType,  name, user, boolVal, committed) VALUES ("com.google.android.projection.gearhead",0,"Tabbouleh__tabs_media_enabled", (SELECT DISTINCT user FROM Flags WHERE user != ""LIMIT 2,1) ,1,1);
        INSERT OR REPLACE INTO FlagOverrides (packageName, flagType,  name, user, boolVal, committed) VALUES ("com.google.android.projection.gearhead",0,"Tabbouleh__media_browse_back_to_top_level_button_enabled", (SELECT DISTINCT user FROM Flags WHERE user != ""LIMIT 2,1) ,1,1);
        INSERT OR REPLACE INTO FlagOverrides (packageName, flagType,  name, user, boolVal, committed) VALUES ("com.google.android.projection.gearhead",0,"Tabbouleh__tabs_media_sticky_tab_enabled", (SELECT DISTINCT user FROM Flags WHERE user != ""LIMIT 2,1) ,1,1);
        '
    ErrorStream:
        Error: unable to open database file
    OutputStream:
        /data/user/0/sksa.aa.tweaker/sqlite3 /data/data/com.google.android.gms/databases/phenotype.db 'CREATE TRIGGER aa_media_tabs AFTER DELETE
        ON FlagOverrides
        BEGIN
        INSERT OR REPLACE INTO FlagOverrides (packageName, flagType,  name, user, boolVal, committed) VALUES ("com.google.android.projection.gearhead",0,"Tabbouleh__tabs_media_enabled", (SELECT DISTINCT user FROM Flags WHERE user != ""LIMIT 0,1) ,1,1);
        INSERT OR REPLACE INTO FlagOverrides (packageName, flagType,  name, user, boolVal, committed) VALUES ("com.google.android.projection.gearhead",0,"Tabbouleh__media_browse_back_to_top_level_button_enabled", (SELECT DISTINCT user FROM Flags WHERE user != ""LIMIT 0,1) ,1,1);
        INSERT OR REPLACE INTO FlagOverrides (packageName, flagType,  name, user, boolVal, committed) VALUES ("com.google.android.projection.gearhead",0,"Tabbouleh__tabs_media_sticky_tab_enabled", (SELECT DISTINCT user FROM Flags WHERE user != ""LIMIT 0,1) ,1,1);
        INSERT OR REPLACE INTO FlagOverrides (packageName, flagType,  name, user, boolVal, committed) VALUES ("com.google.android.projection.gearhead",0,"Tabbouleh__tabs_media_enabled", (SELECT DISTINCT user FROM Flags WHERE user != ""LIMIT 1,1) ,1,1);
        INSERT OR REPLACE INTO FlagOverrides (packageName, flagType,  name, user, boolVal, committed) VALUES ("com.google.android.projection.gearhead",0,"Tabbouleh__media_browse_back_to_top_level_button_enabled", (SELECT DISTINCT user FROM Flags WHERE user != ""LIMIT 1,1) ,1,1);
        INSERT OR REPLACE INTO FlagOverrides (packageName, flagType,  name, user, boolVal, committed) VALUES ("com.google.android.projection.gearhead",0,"Tabbouleh__tabs_media_sticky_tab_enabled", (SELECT DISTINCT user FROM Flags WHERE user != ""LIMIT 1,1) ,1,1);
        INSERT OR REPLACE INTO FlagOverrides (packageName, flagType,  name, user, boolVal, committed) VALUES ("com.google.android.projection.gearhead",0,"Tabbouleh__tabs_media_enabled", (SELECT DISTINCT user FROM Flags WHERE user != ""LIMIT 2,1) ,1,1);
        INSERT OR REPLACE INTO FlagOverrides (packageName, flagType,  name, user, boolVal, committed) VALUES ("com.google.android.projection.gearhead",0,"Tabbouleh__media_browse_back_to_top_level_button_enabled", (SELECT DISTINCT user FROM Flags WHERE user != ""LIMIT 2,1) ,1,1);
        INSERT OR REPLACE INTO FlagOverrides (packageName, flagType,  name, user, boolVal, committed) VALUES ("com.google.android.projection.gearhead",0,"Tabbouleh__tabs_media_sticky_tab_enabled", (SELECT DISTINCT user FROM Flags WHERE user != ""LIMIT 2,1) ,1,1);
        END;'
    ErrorStream:
        Error: database is locked
shmykelsa commented 3 years ago

Seems like you are in the case of Google Play Services database not working properly, see #12 for troubleshooting

woody4165 commented 3 years ago

On MIUI I can't uninstall updates nor uninstall Google Play Services... Only delete cache or data

shmykelsa commented 3 years ago

That's really bizarre. Not even on three-dots menu? However, you can also visit the Play Store page and uninstall updates from there. Just hit uninstall.

woody4165 commented 3 years ago

I found the way to disable updates (removing admin right to Find My device app), and now the disable icon appeared, but it's greyed out. Should I clear all data first?

shmykelsa commented 3 years ago

@woody4165 Clear all datas and skip disabling

woody4165 commented 3 years ago

Done, activated all the ones I needs.

It's better to activate one per time and reboot.

On the calendar one I still get the error. Also on the Multimedia cards one, I had first same error, on second time the app closed itself, but after restarting, the option is green, but I don't know if it's working.

shmykelsa commented 3 years ago

Are you able to replicate the issue and generate a bug report as done in the very first post?

woody4165 commented 3 years ago

You mean the last error I'm receiving, on the calendar?

shmykelsa commented 3 years ago

@woody4165 Yes

woody4165 commented 3 years ago

I've tried with Github credentials and with email, but in both cases it fails

shmykelsa commented 3 years ago

Don't worry about GitHub right now. Does a dialog like the one on the original post appear?

woody4165 commented 3 years ago

No, that one appeared because the app was crashing, this time the error report is something managed directly by the app and the app it's not crashing..

woody4165 commented 3 years ago

Hi @shmykelsa

just downloaded the 3.2.1 and I get a similar crashing like first post in this thread.

Do you want me to send the screenshot of that log?

Thanks

shmykelsa commented 3 years ago

Do you want me to send the screenshot of that log?

Yes please!

woody4165 commented 3 years ago

Here they are.

Screenshot_2021-03-10-13-43-40-685_com miui bugreport

Screenshot_2021-03-10-13-43-45-263_com miui bugreport

shmykelsa commented 3 years ago

I think this is happening because of the original problem. You have the calendar tweak with a null value. It's a border line situation really.

AA-AIO-TWEAKER--debug.zip

This version should help. Let me know if it crashes. You should be able to set any value to the agenda now. Set it and then install the official release of AA AIO TWEAKER

woody4165 commented 3 years ago

should I uninstall the actual version, install the debug version and the install the 3.2.1 version?

Thanks

shmykelsa commented 3 years ago

@woody4165 Yes, correct

woody4165 commented 3 years ago

The debug version didn't work.

I always get this grey icon.

image

Instead, I have installed the 3.2 version, then I have disabled the calendar option, uninstalled the 3.2 and installed 3.2.1 and it worked this way.

Now I have set calendar to 3 days and I haven't got any error. In an hour I will test it in car.

Thanks

woody4165 commented 3 years ago

Even if it seems to be ok, 3 days, pressing the Calendar icon in AA, I see only 1 day.

image

shmykelsa commented 3 years ago

Please note that Android Auto only shows days with events.

If you have an event tomorrow, a event the day after tomorrow and one on sunday, it will just show tomorrow, the day after tomorrow and sunday and not the days between (or today).

woody4165 commented 3 years ago

I have events every day in my calendar... ;-) weekdays and weekends

shmykelsa commented 3 years ago

I have events every day in my calendar... ;-)

Could you please try to undo and redo the patch once again and send a log right here?

woody4165 commented 3 years ago
`
REGISTRO:

-- Drop Triggers  --
    OutputStream:
        /data/user/0/sksa.aa.tweaker/sqlite3 /data/data/com.google.android.gms/databases/phenotype.db 'DROP TRIGGER IF EXISTS calendar_aa_tweak;'

--  run SQL method   --
    OutputStream:
        /data/user/0/sksa.aa.tweaker/sqlite3 /data/data/com.google.android.gms/databases/phenotype.db 'CREATE TRIGGER calendar_aa_tweak AFTER DELETE
        ON FlagOverrides
        BEGIN
        INSERT OR REPLACE INTO FlagOverrides (packageName, flagType, name, user, intVal, committed) VALUES ("com.google.android.projection.gearhead",0,"McFly__num_days_in_agenda_view", (SELECT DISTINCT user FROM Flags WHERE user != ""LIMIT 0,1),3,1);
        INSERT OR REPLACE INTO FlagOverrides (packageName, flagType, name, user, intVal, committed) VALUES ("com.google.android.projection.gearhead",0,"McFly__num_days_in_agenda_view", (SELECT DISTINCT user FROM Flags WHERE user != ""LIMIT 1,1),3,1);
        INSERT OR REPLACE INTO FlagOverrides (packageName, flagType, name, user, intVal, committed) VALUES ("com.google.android.projection.gearhead",0,"McFly__num_days_in_agenda_view", (SELECT DISTINCT user FROM Flags WHERE user != ""LIMIT 2,1),3,1);
        END;'
    OutputStream:
        /data/user/0/sksa.aa.tweaker/sqlite3 /data/data/com.google.android.gms/databases/phenotype.db 'DELETE FROM Flags WHERE name="McFly__num_days_in_agenda_view";
        INSERT OR REPLACE INTO FlagOverrides (packageName, flagType, name, user, intVal, committed) VALUES ("com.google.android.projection.gearhead",0,"McFly__num_days_in_agenda_view", (SELECT DISTINCT user FROM Flags WHERE user != ""LIMIT 0,1),3,1);
        INSERT OR REPLACE INTO FlagOverrides (packageName, flagType, name, user, intVal, committed) VALUES ("com.google.android.projection.gearhead",0,"McFly__num_days_in_agenda_view", (SELECT DISTINCT user FROM Flags WHERE user != ""LIMIT 1,1),3,1);
        INSERT OR REPLACE INTO FlagOverrides (packageName, flagType, name, user, intVal, committed) VALUES ("com.google.android.projection.gearhead",0,"McFly__num_days_in_agenda_view", (SELECT DISTINCT user FROM Flags WHERE user != ""LIMIT 2,1),3,1);
        '
    ErrorStream:
        Error: unable to open database file
--  end SQL method   --
shmykelsa commented 3 years ago

Seems like you are having troubles again modifying the database, cause the log outputs

 ErrorStream:
        Error: unable to open database file
woody4165 commented 3 years ago

can I check something locally with some android tool (sql, terminal)?

shmykelsa commented 3 years ago

can I check something locally with some android tool (sql, terminal)?

Yes. You could use an elevated shell on the phone (even via ADB) and with sqlite3 you can try to manually open/manipulate the database.

woody4165 commented 3 years ago

Thanks, can you tell the name and path of the db and what I can try?

In the meantime, I'm preparing an old (but with Android 10 custom ROM) clean smartphone with AA and AA AIO Tweaker. At the moment, I haven't received errors enabling the options I normally use, so later I will try to use connected in the car and using the hotspot on my normal phone (but I will loose notifications from messaging apps)...

shmykelsa commented 3 years ago

Thanks, can you tell the name and path of the db and what I can try?

As for calendar tweak, try the following:

adb shell su /data/user/0/sksa.aa.tweaker/sqlite3 /data/data/com.google.android.gms/databases/phenotype.db

Shell should have sqlite3> as output

Then

SELECT name,intVal, FROM FlagOverrides WHERE name="McFly__num_days_in_agenda_view";

You should see something like McFly__num_days_in_agenda_view, 3 McFly__num_days_in_agenda_view, 3 McFly__num_days_in_agenda_view, 3

Then let's check if the trigger was created successfully SELECT * FROM sqlite_master WHERE name="calendar_aa_tweak";

woody4165 commented 3 years ago

I've used an android app to access the phenotype.db

the first SELECT produce no data

I don't find the table sqlite_master

shmykelsa commented 3 years ago

the first SELECT produce no data

Okay something has gone wrong with AA AIO TWEAKER's agenda tweak

I don't find the table sqlite_master

Normally it's not displayed, hence why I suggested to do it via shell

Anyways, try to undo and re-do the agenda tweak with this version.

AA-AIO-TWEAKER-debug.zip

woody4165 commented 3 years ago

Here is the output from the terminal

sqlite> SELECT name,intVal FROM FlagOverrides WHERE name="McFly__num_days_in_agenda_view";
sqlite> SELECT * FROM sqlite_master WHERE name="calendar_aa_tweak";
trigger|calendar_aa_tweak|FlagOverrides|0|CREATE TRIGGER calendar_aa_tweak AFTER DELETE
ON FlagOverrides
BEGIN
INSERT OR REPLACE INTO FlagOverrides (packageName, flagType, name, user, intVal, committed) VALUES ("com.google.android.projection.gearhead",0,"McFly__num_days_in_agenda_view", (SELECT DISTINCT user FROM Flags WHERE user != ""LIMIT 0,1),3,1);
INSERT OR REPLACE INTO FlagOverrides (packageName, flagType, name, user, intVal, committed) VALUES ("com.google.android.projection.gearhead",0,"McFly__num_days_in_agenda_view", (SELECT DISTINCT user FROM Flags WHERE user != ""LIMIT 1,1),3,1);
INSERT OR REPLACE INTO FlagOverrides (packageName, flagType, name, user, intVal, committed) VALUES ("com.google.android.projection.gearhead",0,"McFly__num_days_in_agenda_view", (SELECT DISTINCT user FROM Flags WHERE user != ""LIMIT 2,1),3,1);
END
shmykelsa commented 3 years ago

Okay. Try out the new version I've attached.

woody4165 commented 3 years ago

Anyways, try to undo and re-do the agenda tweak with this version.

AA-AIO-TWEAKER-debug.zip

With this version, the app crashes

java.lang.RuntimeException: Unable to start activity ComponentInfo{sksa.aa.tweaker/sksa.aa.tweaker.MainActivity}: java.lang.NumberFormatException: For input string: ""
    at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:3313)
    at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:3462)
    at android.app.servertransaction.LaunchActivityItem.execute(LaunchActivityItem.java:83)
    at android.app.servertransaction.TransactionExecutor.executeCallbacks(TransactionExecutor.java:135)
    at android.app.servertransaction.TransactionExecutor.execute(TransactionExecutor.java:95)
    at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2049)
    at android.os.Handler.dispatchMessage(Handler.java:107)
    at android.os.Looper.loop(Looper.java:224)
    at android.app.ActivityThread.main(ActivityThread.java:7565)
    at java.lang.reflect.Method.invoke(Native Method)
    at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:539)
    at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:950)
Caused by: java.lang.NumberFormatException: For input string: ""
    at java.lang.Integer.parseInt(Integer.java:627)
    at java.lang.Integer.parseInt(Integer.java:650)
    at sksa.aa.tweaker.MainActivity.onCreate(MainActivity.java:1117)
    at android.app.Activity.performCreate(Activity.java:7916)
    at android.app.Activity.performCreate(Activity.java:7903)
    at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1307)
    at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:3288)
    ... 11 more
woody4165 commented 3 years ago

I tried on the other phone the debug version, and it runs ok. Now I try to reset all the settings in the 3.2.1. app and start from scratch with the debug version

woody4165 commented 3 years ago

Now I'm blocked, I tried the debug version, 3.2.1 and 3.1 (that was working yesterday, while the newer and debug versions were crashing) and the app always crashes...

What can I do now ?

Thanks

shmykelsa commented 3 years ago

Does it crash past the initial warning screen?