Sunday, October 17, 2021

Medium membership bypass, read membership-only articles

Situation:

Opening an article will be prompted with the following

Profile Name, read more from Article Author Name — and everyone else on Medium.

You’ve read all your free member-only stories, become a member to get unlimited access. Your membership fee supports Article Author Name and the voices you want to hear more from.

Solution:
Step 1 : Copy URL of the fenced content
Step 2 : Open Google Chrome, click File
Step 3 : Click New Incognito Window
Step 4 : In Incognito mode, paste copied URL in the address bar.



Done. This technique can be used with browsers that have private / invisible modes e.g Brave, Mozilla Firefox

Wednesday, October 13, 2021

How to Verify downloads with SHA checksum using macOS

 

Step 1: 

Download file from official site or repository and ensure to get the corresponding SHA checksum

For reference, we will be using the following

Downloaded filename : name_of_downloaded_file

Downloaded file's checksum : sha_checksum_of_downloaded_file


Step 2:

Open Terminal


Step 3: 

Run the following command in the Terminal from the directory where file was downloaded

> echo "sha_checksum_of_downloaded_file" *name_of_downloaded_file | shasum -a 256 --check


Step 4: 

Check output or response after executing above command. You should get similar output as below

name_of_downloaded_file: OK


Step 5: Done.



Example (taken from Ubuntu site - https://ubuntu.com/download/server)

> echo "f8e3086f3cea0fb3fefb29937ab5ed9d19e767079633960ccb50e76153effc98 *ubuntu-20.04.3-live-server-amd64.iso" | shasum -a 256 --check

ubuntu-20.04.3-live-server-amd64.iso: OK

Tuesday, October 12, 2021

Flutter : Change Package Name and Bundle ID (iOS, Android, macOS, Linux) using rename package

Procedure for Renaming AppName and Package Name

Example (Current Attributes):

Project Name: projectname

Android: Package Name e.g. com.geekdish.projectname

iOS: Bundle ID e.g com.geekdish.projectname


Step 1: Activate the rename package

From Android Studio, open Terminal and execute the following

> flutter pub global activate rename
Resolving dependencies...
+ args 2.3.0
+ logger 1.1.0
+ rename 1.3.1
Downloading rename 1.3.1...
Downloading logger 1.1.0...
Building package executables...
Built rename:rename.
Installed executable rename.
Warning: Pub installs executables into $HOME/.pub-cache/bin, which is not on your path.
You can fix that by adding this to your shell's config file (.bashrc, .bash_profile, etc.): 
  export PATH="$PATH":"$HOME/.pub-cache/bin"

Activated rename 1.3.1. 

Documents/DEV/flutter took 7s 


Step 2: To change Package name and/or Bundle Id (e.g. com.geekdish.newprojectname):

            Rename package using rename tool

> flutter pub global run rename --bundleId com.geekdish.projectname


Step 3: Verify changes

For Android, in the Android Studio/<appname>/android/app/build.gradle

Check the application Id attribute under defaultConfig element, see below


defaultConfig {
// TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html).
applicationId "com.geekdish.newflutterproject"
minSdkVersion 16
targetSdkVersion 30
versionCode flutterVersionCode.toInteger()
versionName flutterVersionName
}

For iOS, in Android Studio, right click <app name>/ios open in Xcode

Click Runner, you will see in the General>Identity>Bundle Identifier the new bundleId com.geekdish.projectname

For macOS, in the Android Studio/<appname>/maos/Runner/Configs/AppInfo.xcconfig

Check the PRODUCT_BUNDLE_IDENTIFIER attribute, see below

// Application-level settings for the Runner target.
//
// This may be replaced with something auto-generated from metadata (e.g., pubspec.yaml) in the
// future. If not, the values below would default to using the project name when this becomes a
// 'flutter create' template.

// The application's name. By default this is also the title of the Flutter window.
PRODUCT_NAME = newflutterproject

// The application's bundle identifier
PRODUCT_BUNDLE_IDENTIFIER = com.geekdish.newappname


Step 4: To change Application Name (e.g. newappname):

            Rename appName using rename tool

> flutter pub global run rename --appname newappname


Step 5: To verify changes:

For Android, in the Android Studio/<appname>/android/app/src/main/AndroidManifest.xml

Check the android:label= attribute under <manifest>/<application> element, see below

<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.geekdish.newprojectname">
<application
android:label="newappname"
android:icon="@mipmap/ic_launcher">
<activity

For iOS, in the Android Studio/<appname>/ios/Runner/Info.plist

Check the <string> attribute under <dict>/<key>/<CFBundleName> element, see below

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>CFBundleDevelopmentRegion</key>
<string>$(DEVELOPMENT_LANGUAGE)</string>
<key>CFBundleExecutable</key>
<string>$(EXECUTABLE_NAME)</string>
<key>CFBundleIdentifier</key>
<string>$(PRODUCT_BUNDLE_IDENTIFIER)</string>
<key>CFBundleInfoDictionaryVersion</key>
<string>6.0</string>
<key>CFBundleName</key>
<string>newappname</string>

For macOS, in the Android Studio/<appname>/maos/Runner/Configs/AppInfo.xcconfig

Check the PRODUCT_NAME  attribute, see below

// Application-level settings for the Runner target.
//
// This may be replaced with something auto-generated from metadata (e.g., pubspec.yaml) in the
// future. If not, the values below would default to using the project name when this becomes a
// 'flutter create' template.

// The application's name. By default this is also the title of the Flutter window.
PRODUCT_NAME = newflutterproject



Saturday, October 9, 2021

Change Launcher icon for Flutter apps for both iOS and Android using Android Studio on macOS

 

Create your own icon (preferably 1024x1024 size)

You may use the following tools:

    Android Icon Generator  https://romannurik.githu.io/AndroidAssetStudio

    App Icon Generator https://appicon.co

Using App Icon Generator

Goto https://appicon.co

Drag & drop your icon to this App Icon Generator site.

Select all the platforms to be generated

it will generate and download the file AppIcons.zip

The compressed file will include folders android (for Android) and Assets.xcassets (for iOS)

Using the generated icons:

Inside the zip file are the following for Android: 

android 

android>mipmap-mdpl (smallest)

anndroid>mipmal-xxxhdpi (largest)

Inside the zip file are the following for iOS:  

Assets.xcassets

Assets.xcassets>

Assets.xcassets>


For Android:

Right-click the Android Studio>(project folder)>android/app/src/main/res folder, select Open in>Finder







Select all folders which name that matches those in the compressed file for android and throw them in the trash, then replace those with the folders in the compressed file for android.
copy all folders in AppIcons.zip>android/(folders) to (project)>android/app/main/src/res/

To adjust the image/icon, You can open image asset

Right click android and select Flutter>Open Android Module in Android Studio

Once android window is open, you may choose res and right click to choose Image Asset




Once opened you can pick the Source Asset/Path for the starting image once Finder dialog open , you can select the app_icon.png you get to resize the icon (e.g. for rounded icon, square etc)

once done adjusting click next, image asset will replace existinng with new one by clicking finish


For iOS:

Right-click the Android Studio>(project folder)>ios/Runner/Assets.xcassets folder, select Open in>Finder

Once revealed, delete (cmd+backspace) the Assets.xcassets from the runner folder 

Once deleted, Select the Assets.xcassets folder from the AppIcon.zip file and drag to the destination Runner folder of the project


Other Option : Using flutter_launcher_icons package

Create icon

Create folder for the new icon in the project directory e.g. (project folder)/assets/icon

Add icon to the Android Studio>(project folder)>/assets/icon/ folder

Then in (project folder)/pubspec.yaml add the following (except the greyed out lines ie flutter_test)

dev_dependencies:
flutter_launcher_icons: ^0.9.2

flutter_test:
sdk: flutter


flutter_icons:
android: true
ios: true
image_path: "assets/icon/icon.png"

Replace "/assets/icon/icon.png" with the name of your icon

Save edited pubspec.yaml.

Execute Pub get from Android studio (when in pubspec.yaml editor) or via terminal type

> flutter pub get

Running "flutter pub get" in flutter_app...                       739ms

Process finished with exit code 0

Open Terminal from Android Studio (Option+F12) or from Android Studio / Tool Window, click Terminal
Execute the following command:

> flutter pub run flutter_launcher_icons:main

  ════════════════════════════════════════════
     FLUTTER LAUNCHER ICONS (v0.9.1)                               
  ════════════════════════════════════════════
  
• Creating default icons Android
• Overwriting the default Android launcher icon with a new icon

WARNING: Icons with alpha channel are not allowed in the Apple App Store.
Set "remove_alpha_ios: true" to remove it.

• Overwriting default iOS launcher icon with new icon

✓ Successfully generated launcher icons

(app project folder)/(app name) took 6s 
Done.





Even on newly created Flutter v2.5 project getting "A splash screen was provided to Flutter, but this is deprecated. See flutter.dev/go/android-splash-migration for migration steps.'

Even on a newly created project using latest Flutter v2.5.1 and/or latest Android Studio Arctic Fox 2020.3.1 Patch 2

Running a project will show the following warning 

A splash screen was provided to Flutter, but this is deprecated. See flutter.dev/go/android-splash-migration for migration steps. 

> flutter run
Using hardware rendering with device AOSP on IA Emulator. If you notice graphics
artifacts, consider enabling software rendering with
"--enable-software-rendering".
Launching lib/main.dart on AOSP on IA Emulator in debug mode...
Running Gradle task 'assembleDebug'...                             33.6s
✓  Built build/app/outputs/flutter-apk/app-debug.apk.
Installing build/app/outputs/flutter-apk/app.apk...                 3.5s
W/FlutterActivityAndFragmentDelegate(12509): A splash screen was provided to Flutter, but this is deprecated. See flutter.dev/go/android-splash-migration for migration steps.
D/eglCodecCommon(12509): setVertexArrayObject: set vao to 0 (0) 1 0
Syncing files to device AOSP on IA Emulator...                     179ms
Flutter run key commands.
r Hot reload. 🔥🔥🔥
R Hot restart.
h List all available interactive commands.
d Detach (terminate "flutter run" but leave application running).
c Clear the screen
q Quit (terminate the application on the device).
💪 Running with sound null safety 💪
An Observatory debugger and profiler on AOSP on IA Emulator is available at:
http://127.0.0.1:62763/lMsd46bI0HBdfc=/
The Flutter DevTools debugger and profiler on AOSP on IA Emulator is available
at: http://127.0.0.1:9101?uri=http://127.0.0.1:62763/lMsd46bI0HBdfc=/


Solution:

Remove the following code from (project folder)/android/app/src/main/AndroidManifest.xml

<meta-data
android:name="io.flutter.embedding.android.SplashScreenDrawable"
android:resource="@drawable/launch_background"
/>

From flutter.dev site:

This is no longer needed and is deprecated – Flutter now automatically keeps the Android launch screen displayed until Flutter has drawn the first frame. Developers should instead remove usage of these APIs.



Wednesday, September 29, 2021

How to verify Tor Browser in macOS


Official reference : How can I verify Tor Browser's signature?

1. Download installer for macOS (.dmg)


2. Download corresponding signature file



3. Ensure GPG exists if not, install GnuPG (GPG)

4. Open Terminal

5. Use command below to fetch the Tor Developers key

> gpg --auto-key-locate nodefault,wkd --locate-keys torbrowser@torproject.org

6. The above command will produce something like the following response

gpg: key 4E2C6E8793298290: "Tor Browser Developers (signing key) <torbrowser@torproject.org>" not changed
gpg: Total number processed: 1
gpg:              unchanged: 1
pub   rsa4096 2014-12-15 [C] [expires: 2025-07-21]
      EF6E286DDA85EA2A4BA7DE684E2C6E8793298290
uid           [ unknown] Tor Browser Developers (signing key) <torbrowser@torproject.org>
sub   rsa4096 2018-05-26 [S] [expires: 2022-01-04]

~ took 13s

7.  After importing the key, save it to file named tor.keyring

> gpg --output ./tor.keyring --export 0xEF6E286DDA85EA2A4BA7DE684E2C6E8793298290

8.  Verify the signature of the tor package downloaded by comparing it with its corresponding signature file

> gpgv --keyring ./tor.keyring ~/Downloads/TorBrowser-10.5.6-osx64_en-US.dmg.asc ~/Downloads/TorBrowser-10.5.6-osx64_en-US.dmg

9. The result of the above command should show something like the following. Take note of the "Good signature" in the response:

gpgv: Signature made Wed Sep  8 11:14:41 2021 PST
gpgv:                using RSA key EB774491D9FF06E2
gpgv: Good signature from "Tor Browser Developers (signing key) <torbrowser@torproject.org>"

10. Done.

Tuesday, August 24, 2021

Flutter: "main" java.lang.NoClassDefFoundError: when running flutter doctor --android-license


$ flutter doctor --android-licenses

Exception in thread "main" java.lang.NoClassDefFoundError: javax/xml/bind/annotation/XmlSchema

at com.android.repository.api.SchemaModule$SchemaModuleVersion.<init>(SchemaModule.java:156)

at com.android.repository.api.SchemaModule.<init>(SchemaModule.java:75)

at com.android.sdklib.repository.AndroidSdkHandler.<clinit>(AndroidSdkHandler.java:81)

at com.android.sdklib.tool.sdkmanager.SdkManagerCli.main(SdkManagerCli.java:73)

at com.android.sdklib.tool.sdkmanager.SdkManagerCli.main(SdkManagerCli.java:48)

Caused by: java.lang.ClassNotFoundException: javax.xml.bind.annotation.XmlSchema

at java.base/jdk.internal.loader.BuiltinClassLoader.loadClass(BuiltinClassLoader.java:581)

at java.base/jdk.internal.loader.ClassLoaders$AppClassLoader.loadClass(ClassLoaders.java:178)

at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:522)

... 5 more


Solution:

Install Android SDK Command-line Tools (latest) from Android Studio via 

Android Studio > Preferences.. > Appaearance & Behavior > System Settings > Android SDK






check the Android SDK Command-line Tools (latest) option from SDK Tools tab and click Apply







then run flutter doctor --android-licenses and accept lienses

$ flutter doctor --android-licenses

10.8 Open Source Software. In the event Open Source software is included with Evaluation Software, such Open Source software is licensed pursuant to the applicable Open Source software license agreement identified in the Open Source software comments in the applicable source code file(s) and/or file header as indicated in the Evaluation Software. Additional detail may be available (where applicable) in the accompanying on-line documentation. With respect to the Open Source software, nothing in this Agreement limits any rights under, or grants rights that supersede, the terms of any applicable Open Source software license agreement.

---------------------------------------

Accept? (y/N): y

All SDK package licenses accepted


Try running flutter doctor again to see if no errors.


$ flutter doctor -v

[✓] Flutter (Channel stable, 2.2.3, on macOS 11.5.1 20G80 darwin-x64, locale en-US)

    • Flutter version 2.2.3 at /Users/xx/flutter

    • Framework revision f4abaa0735 (8 weeks ago), 2021-07-01 12:46:11 -0700

    • Engine revision 241c87ad80

    • Dart version 2.13.4


[✓] Android toolchain - develop for Android devices (Android SDK version 31.0.0)

    • Android SDK at /Users/xx/Library/Android/sdk

    • Platform android-31, build-tools 31.0.0

    • ANDROID_HOME = /Users/xx/Library/Android/sdk

    • Java binary at: /Applications/Android

      Studio.app/Contents/jre/jdk/Contents/Home/bin/java

    • Java version OpenJDK Runtime Environment (build 11.0.10+0-b96-7281165)

    • All Android licenses accepted.


[✓] Xcode - develop for iOS and macOS

    • Xcode at /Applications/Xcode.app/Contents/Developer

    • Xcode 12.5.1, Build version 12E507

    • CocoaPods version 1.10.0


[✓] Chrome - develop for the web

    • Chrome at /Applications/Google Chrome.app/Contents/MacOS/Google Chrome


[✓] Android Studio (version 2020.3)

    • Android Studio at /Applications/Android Studio.app/Contents

    • Flutter plugin can be installed from:

      🔨 https://plugins.jetbrains.com/plugin/9212-flutter

    • Dart plugin can be installed from:

      🔨 https://plugins.jetbrains.com/plugin/6351-dart

    • Java version OpenJDK Runtime Environment (build 11.0.10+0-b96-7281165)


[✓] IntelliJ IDEA Ultimate Edition (version 2020.2.3)

    • IntelliJ at /Applications/IntelliJ IDEA.app

    • Flutter plugin can be installed from:

      🔨 https://plugins.jetbrains.com/plugin/9212-flutter

    • Dart plugin can be installed from:

      🔨 https://plugins.jetbrains.com/plugin/6351-dart


[✓] VS Code (version 1.58.2)

    • VS Code at /Applications/Visual Studio Code.app/Contents

    • Flutter extension version 3.24.0


[✓] Connected device (2 available)

    • macOS (desktop) • macos  • darwin-x64     • macOS 11.5.1 20G80 darwin-x64

    • Chrome (web)    • chrome • web-javascript • Google Chrome 92.0.4515.159


• No issues found!


Done. 

Android Studio Arctic Fox 2020.3 Plugin error: Plugin is compatible with IntelliJ IDEA only because it doesn't define any explicit module dependencies

Plugin error: 

Plugin '   ' is compatible with IntelliJ IDEA only because it doesn't define any explicit module dependencies



Solution:

Locate new directory of Android Studio Arctic Fox 2020.3. 

cd  ~/Library/Application Support/Google/AndroidStudio2020.3/plugins

Delete plugin that is producing the error:

rm -rf JSONViewerStudioPlugin



Wednesday, August 18, 2021

Chrome w/ NordVPN : This site can't be reached when clicking a link result from Google search redirected to googleadservices.com

Using Google Chrome with NordVPN. After clicking the link result coming from Google search, will be redirected initially to https://www.googleadservices.com 

Getting error:

"This site can't be reached" 

www.googleadservices.com refused to connect:

ERR_CONNECTION_REFUSED









1. Access NordVPN from menu


2. Check NordVPN preferences









3. Turn-off CyberSec















4. Disconnect and Reconnect NordVPN


Wednesday, July 7, 2021

Install Elementum on Kodi 19.1 "Matrix" - macOS / Mi Box 4s / Android




 






Download the add-on from official Elementum site


Open Elementum website  http://elementum.surge.sh/










Click the Universal All-in-one file link 










Browser will prompt for destination file, click ok to proceed downloading of file









Download will begin






When download has completed, you may check the file. No need to extract the file.







Open Kodi









Prerequisites: 

Enable Remote Control below. Per Elementum site, this is necessary for it to operate properly.

Access Settings (gear icon)









Access Services









Once on Settings/Services, access Control tab









Make sure both "Remote control from applications.." from Application control section are enabled


Upon enabling  "Remote control from applications..", you will be prompted with a Warning












Click Yes to confirm









You will be transferred back to previous screen









Click Back (or right-click) to return to Settings page









Installation Proper:

Access Add-ons button









Once in the Add-ons screen, access Install from zip file









Once in the Install from zip dialog box, locate where the zip file was downloaded previously









Once file found, Select the zip file










Installation would begin and download updated modules/libraries

















Wait for the installation to be finished and notifications will appear.









Once completed, Elementum daemon will be started and plugin is now ready to use.









Go back to Kodi Main screen and access Add-ons. Elementum should be available among the add-ons










Tuesday, July 6, 2021

Install The Crew on Kodi 19.1 "Matrix" - macOS / Mi Box 4s / Android










This tutorial can be used on macOS or any device that supports Kodi


Launch Kodi




Click Settings (gear icon)


Click System from the Settings view


Once, the Setting / System

Hover over to the Add-ons menu and click/choose it and  to the Unknown sources option



and enable it by turning on (knob should slide to the right)


Warning pop will appear, read prior to proceeding


Click Yes to agree and confirm enabling of Unknown sources


You will be returned back to the previous page

Go back to System page by clicking back of remote or right-click(if using macOS)

Once in System, Select File Manager

Once in File manager

hover to Add source and click (or double-click)

Add file source will appear

Hover and
Click <None>

A keypad will appear to enable entering the location

Enter https://team-crew.github.io

then click OK to confirm entry


Screen will go back to previous dialog box

Highlight the entry you've added

Then click "Enter a name for this media source"

Once in the entry screen, type "crew" or any name you prefer














Press Ok to confirm entry
















Pres OK to confirm


Once in previous screen, click Back (or right click)















On Settings screen


Hover to Add-ons, and click
''


Once in Add-ons screen





Hover and click "Install from zip file

You will be prompted with a Warning message


Click Yes to concur with the warning

You will be presented with the "Install from zip file dialog box''


Hover and select (or double-click) "crew" or name you assign in the media source from the previous step

You will then be presented with the zip file from the repo you selected


Select (or double-click) "repository.thecrew-0.3.4.zip" (which is the latest file as of publish time)


You will be transferred back to the original Add-ons screen (wait)




Do not do anything, wait until THE CREW add-on installed notification appears



Once "THE CREW REPO" Add-on updated notification appears


Select (or double-click) "Install from repository"


You will be transferred to the Install from repository selection

Select "THE CREW REPO" 



You will be transferred to the repo's selection, select "video add-ons"

Once in the Video add-ons screen, select THE CREW option



You will then be transferred to the THE CREW options



Click Install to start installing the repo 














You will then be prompted with the additional add-ons that will be installed














Select Ok to confirm


You will then be transferred back to the previous screen and installation will begin (notice the percentage showing beside the add-ons being download)



After downloading, it will begin to install the add-ons




Wait until you see "THE CREW Add-on installed" notification appears

The Crew is now fully installed. Go back to the Main Kodi screen

Click Back (or right-click) to go back to the Settings screen














Click Back (or right-click) until you are back to the main Kodi screen

Click Add-ons, The Crew video add-ons will appear among available add-ons


Watch out for me tutorials or settings possible for this add-on!