mobile_app_open icon indicating copy to clipboard operation
mobile_app_open copied to clipboard

chore: remove manage all file permission

Open anhappdev opened this issue 2 years ago • 12 comments

Closes #702

anhappdev avatar Jul 04 '23 06:07 anhappdev

MLCommons CLA bot All contributors have signed the MLCommons CLA ✍️ ✅

github-actions[bot] avatar Jul 04 '23 06:07 github-actions[bot]

this PR worked for MediaTek internal devices except imagenet accuracy. dunno why yet.

freedomtan avatar Jul 11 '23 03:07 freedomtan

this PR worked for MediaTek internal devices except imagenet accuracy. dunno why yet.

Did you rename the file imagenet_val_full.txt to imagenet_val_full.txt.pseudo.png?

anhappdev avatar Jul 11 '23 05:07 anhappdev

this PR worked for MediaTek internal devices except imagenet accuracy. dunno why yet.

Did you rename the file imagenet_val_full.txt to imagenet_val_full.txt.pseudo.png?

surely I did. For mobiledet + coco, it ran well.

I tried it on my Pixel 7a, the app also crashed. See the attached logcat log mobilenet_crash.txt

freedomtan avatar Jul 18 '23 01:07 freedomtan

If I use only the first 1000 ILSVRC2012_val_000*.JPEG, it works

freedomtan avatar Jul 18 '23 02:07 freedomtan

Looking at the crash log, I guess maybe an image file is corrupted.

anhappdev avatar Jul 18 '23 03:07 anhappdev

Looking at the crash log, I guess maybe an image file is corrupted.

with binary search, it shows ILSVRC2012_val_00001644.JPEG is incompatible with Android Exif related functions. I am not sure if it's corrupted. It displayed well on both Android (with File app) and macOS Preview.

07-18 09:27:20.497  3254  5045 W System.err: java.lang.NumberFormatException: For input string: "????"
07-18 09:27:20.498  3254  5045 W System.err:    at java.lang.Integer.parseInt(Integer.java:747)
07-18 09:27:20.498  3254  5045 W System.err:    at java.lang.Integer.parseInt(Integer.java:865)
07-18 09:27:20.498  3254  5045 W System.err:    at android.media.ExifInterface$ExifAttribute.getIntValue(ExifInterface.java:1010)
07-18 09:27:20.498  3254  5045 W System.err:    at android.media.ExifInterface.handleThumbnailFromJfif(ExifInterface.java:4328)
07-18 09:27:20.498  3254  5045 W System.err:    at android.media.ExifInterface.setThumbnailData(ExifInterface.java:4301)
07-18 09:27:20.498  3254  5045 W System.err:    at android.media.ExifInterface.loadAttributes(ExifInterface.java:2033)
07-18 09:27:20.498  3254  5045 W System.err:    at android.media.ExifInterface.<init>(ExifInterface.java:1568)
07-18 09:27:20.498  3254  5045 W System.err:    at com.android.providers.media.MediaProvider.getRedactionRanges(MediaProvider.java:9050)
07-18 09:27:20.498  3254  5045 W System.err:    at com.android.providers.media.MediaProvider.getRedactionRanges(MediaProvider.java:9023)
07-18 09:27:20.498  3254  5045 W System.err:    at com.android.providers.media.MediaProvider.getRedactionRangesForFuse(MediaProvider.java:9005)
07-18 09:27:20.498  3254  5045 W System.err:    at com.android.providers.media.MediaProvider.onFileOpenForFuse(MediaProvider.java:9260)

I stripped EXIF information from the ILSVRC2012_val_00001644.JPEG file with exiftool, https://exiftool.org

exiftool -EXIF=  ILSVRC2012_val_00001644.JPEG 

and push it back to Android, then it went well.

I am not sure if there are other problematic ones.

freedomtan avatar Jul 18 '23 05:07 freedomtan

@freedomtan to try to remove EXIF information from all the jpeg files which have EXIF to if we can finish reading all the 50, 000 imagenet validation files. < --- this doesn't look elegant.

How MS office apps work on Android (do they use all file permission?) @freedomtan

freedomtan avatar Jul 18 '23 05:07 freedomtan

for a in *.JPEG
  do exiftool -EXIF=  $a
done

freedomtan avatar Jul 18 '23 05:07 freedomtan

@freedomtan to try to remove EXIF information from all the jpeg files which have EXIF to if we can finish reading all the 50, 000 imagenet validation files. < --- this doesn't look elegant.

How MS office apps work on Android (do they use all file permission?) @freedomtan

Confirmed that

  • if I remove all the EXIF in jpeg files, I can get expected accuracy number on my Pixel 7a
  • MS 365 apps DO need the "all file permission"

freedomtan avatar Jul 18 '23 08:07 freedomtan

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

No Coverage information No Coverage information
0.0% 0.0% Duplication

sonarqubecloud[bot] avatar Jul 18 '23 12:07 sonarqubecloud[bot]

Let's try to see if we can get the apk accepted to Play Store with the "all file permission" option there. If that doesn't work, then we can to use this one.

freedomtan avatar Jul 25 '23 05:07 freedomtan

The app is now accepted by Google for public testing at https://play.google.com/store/apps/details?id=org.mlcommons.android.mlperfbench

anhappdev avatar Jun 03 '24 10:06 anhappdev

@anhappdev I didn't realize it's in "public testing" now. Could we back to "internal testing" because we don't have the EULA fixed and all the backends tested.

freedomtan avatar Jun 05 '24 22:06 freedomtan

@anhappdev I didn't realize it's in "public testing" now. Could we back to "internal testing" because we don't have the EULA fixed and all the backends tested.

Ok. Done.

anhappdev avatar Jun 05 '24 23:06 anhappdev

I tried to run the app on my galaxy s23... but it crashes. Do we know of any known issues?

mohitmundhragithub avatar Jun 06 '24 10:06 mohitmundhragithub

I tried to run the app on my galaxy s23... but it crashes. Do we know of any known issues?

Can you test both the

  • build 136 (compileSdkVersion 34) and
  • build 134 (compileSdkVersion 33) The compileSdkVersion was changed from 33 to 34. Maybe that is the issue.

anhappdev avatar Jun 06 '24 11:06 anhappdev

@mohitmundhragithub to test build 136 and build 134

freedomtan avatar Jun 11 '24 05:06 freedomtan

Quality Gate Passed Quality Gate passed

Issues
0 New issues
0 Accepted issues

Measures
0 Security Hotspots
No data about Coverage
No data about Duplication

See analysis details on SonarCloud

sonarqubecloud[bot] avatar Jun 12 '24 05:06 sonarqubecloud[bot]

Hi @anhappdev @freedomtan, I tried both build 134 and build 136 on my galaxy S23 ultra. Both of them are able to run the testcases just fine.

mohitmundhragithub avatar Jun 13 '24 06:06 mohitmundhragithub

I tried to run the app on my galaxy s23... but it crashes. Do we know of any known issues?

@mohitmundhragithub Can you share the crash log?

anhappdev avatar Jun 13 '24 07:06 anhappdev

I tried to run the app on my galaxy s23... but it crashes. Do we know of any known issues?

@mohitmundhragithub Can you share the crash log?

Looks like the app is not available in playstore anymore.

mohitmundhragithub avatar Jun 17 '24 05:06 mohitmundhragithub

I tried to run the app on my galaxy s23... but it crashes. Do we know of any known issues?

@mohitmundhragithub Can you share the crash log?

Looks like the app is not available in playstore anymore.

@mohitmundhragithub Can you test the APK here in the CI?

anhappdev avatar Jun 17 '24 06:06 anhappdev

I tried to run the app on my galaxy s23... but it crashes. Do we know of any known issues?

@mohitmundhragithub Can you share the crash log?

Looks like the app is not available in playstore anymore.

@mohitmundhragithub Can you test the APK here in the CI?

I tried this apk: https://github.com/mlcommons/mobile_app_open/actions/runs/9476794795/artifacts/1592456513

which i got from here (this PR's CI): https://github.com/mlcommons/mobile_app_open/actions/runs/9476794795/job/26110387649?pr=745

This also works fine. Could play store put some restrictions which makes the app to fail?

mohitmundhragithub avatar Jun 17 '24 08:06 mohitmundhragithub

Could play store put some restrictions which makes the app to fail?

I don’t know yet. But if the crash is not related to this PR. Let’s merge this, then we will have a new build in Play Store and we can test the Play Store build again.

anhappdev avatar Jun 17 '24 15:06 anhappdev

Could play store put some restrictions which makes the app to fail?

I don’t know yet. But if the crash is not related to this PR. Let’s merge this, then we will have a new build in Play Store and we can test the Play Store build again.

I am fine with it. does it work for everyone else as well?

mohitmundhragithub avatar Jun 18 '24 04:06 mohitmundhragithub