Master - #2
Merged
Merged
Conversation
added 8 commits
December 31, 2025 19:28
…ed README and PROJECT_STATE.
- Added FileOutputHook to intercept Bitmap.compress and FileOutputStream writes - Fixed XSharedPreferences issue by using external storage path (/sdcard/.camerainterceptor/) - Added fallback path detection in HookDispatcher.findInjectableImagePath() - Fixed infinite recursion by reading raw file bytes instead of using Bitmap.compress - Added isLoadingInternalImage flag to prevent hook re-entry - Updated ImagePickerActivity to save to world-readable external storage - Camera.takePicture() hook now successfully delivers injected image
- Add isProfilingEnabled() to HookDispatcher - Create missing list_item_app_mode.xml layout - Add FileOutputStream.write(byte[], int, int) hook for Pattern 2 apps - Improve JPEG detection with isJpegDataAtOffset and isValidJpegStructure - Enhance Logger with debug mode toggle and statistics tracking - Add hook-specific logging methods (logHookTriggered, logInjectionSuccess, logInjectionFailure) - Implement rate limiting for rapid captures (100ms minimum interval) - Add image caching with SoftReference (GC-friendly under memory pressure) - Add max file size check (10MB limit) - Add OOM error handling with cache clearing
- Create MediaStoreHook.java for modern Android 10+ save paths - Hook MediaStore.Images.Media.insertImage(Bitmap) - replaces bitmap parameter - Hook MediaStore.Images.Media.insertImage(Path) - replaces file path parameter - Hook ContentResolver.openFileDescriptor() for scoped storage writes - Hook ContentResolver.openFileDescriptor() with CancellationSignal overload - Register MediaStoreHook in MainHook Estimated coverage improvement: 70% -> 80%
- Add PNG format support to Bitmap.compress hook (JPEG + PNG now intercepted) - Add PNG header detection (89 50 4E 47 magic bytes) - Add isImageData() helper for unified JPEG/PNG detection - Extend isImageFile() to detect .webp, screenshot, capture filenames - Update InterceptingOutputStream for PNG interception - Improve logging to show detected format type Estimated coverage improvement: 80% -> 85%
- CameraHook: Add 2s timeout, only block original capture after confirming valid image data - Camera2Hook: Add comprehensive try-catch, never break app's camera flow - FileOutputHook: Add null checks and graceful fallback for Bitmap.compress - Add GitHub Actions workflow for automatic APK builds on source changes - Update .gitignore for Android projects This prevents app crashes/hangs when injection fails for any reason.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.