Tuesday, August 1, 2023

How to upgrade HD NVME M2 single port on notebook for windows 11

Nobody want to spend time to reinstall windows and applications to upgrade HD NVME M2. Here is a mini guide to transfer the whole old (smaller) HD, using Clonezilla 20230426-lunar.

You need to buy NVME M2 usb enclosure. The new HD NVME M2 must equal or larger then the old one.

Preparation

Download Clonezilla iso (stable or alternative) from https://clonezilla.org/downloads.php and burn it into CD ROM.

Transfer HD from old to new

Make sure you plug your adapter to your notebook and your windows 11 in health condition.

  1. Insert your new HD NVME M2 into USB Enclosure and plug into your notebook.
  2. Restart your PC to notebook to start from CD, press windows + restart.
  3. After book, select preferred language.
  4. Choose keyboard layout or keep default keyboard layout.
  5. Then choose Start Clonezilla.
  6. Select device_device.
  7. Select Beginnner.
  8. Select your Source HD, (smaller size if upgrade to bigger size).
  9. Select Destination HD.
  10. Choose option -sfsck to skip checking/repairing source.
  11. Choose option -K0 to create exactly size of partition on destination HD like source.
  12. Choose option -p if you want decide to reboot or shutdown after transfer finish.
  13. Enter to continue transfer HD.
  14. Confirm your HD source by typing Y.
  15. Confirm your HD destination by typing Y.
  16. Wait until process transfer completed.

You can turn of your notebook, and replace your old one with a new one.

Post transfer

By default, your disk is encrypted by bitlocker. To resize your HD, yout need to disable encrypted during resizing/shrinking your HD.

Windows -> Settings Privacy & Security -> Device Encryption -> disable/off

Wait until windows 11 decrypt your HD.

You can use any free for home user, to resize your new HD. These are example for home user:

  1. Minitool Partition Wizard Free 12.7
  2. EaseUS Partition Master
  3. others your favorite tool

After resizing I recommended you do (run cmd as administrator):

  1. Disk C checking
    > chkdsk c: /f
    required to reboot windows 11
  2. System file check
    > sfc /scannow
  3. Run disk checking for others parititons
    > chkdsk d: /f


Perpanjang SIM di Satpas di Jakarta

Persiapan:

  1. Fotocopy SIM 1 lembar (siapkan 2 copy)
  2. Fotocopy KTP 2 lembar (siapkan 4 copy)
  3. Smartphone untuk tes psikologi secara online

Alur:

  1. Ambil formuliar dengan menyerahkan SIM/KTP asli dan copy, akan diberikan formulir (isi).
  2. Tes kesehatan ditempat. Biaya kurang lebih Rp. 35.000,-. Bisa dilakukan dirumah sebelum ke Satpas melalui aplikasi RIKKES Jasmani (erikkes.id) / Simpel Pol.
  3. Tes psikologi ditempat dengan scan QRCode melalui browser (HP). Biaya kurang lebih Rp. 60.000,-. Bisa dilakukan dirumah sebelum ke Satpas melalui aplikasi epPsi (app.eppsi.id). 
  4. Membayar asuransi sebesar Rp. 50.000,-.
  5. Membayar administrasi SIM Rp. 80.000,-.
  6. Antri untuk foto, scan sidik jari dan tanda tangan.
  7. Menunggu SIM dicetak.
Total biaya perpanjang 1 SIM Rp. 225.000,-. Sediakan uang kecil untuk mempercepat proses sesuai dengan alur.

Perpanjangan secara online install aplikasi Digital Korlantas

Jam layanan:

Senin - Sabtu jam 8:00 s/d 12:00 (dapat berubah sewaktu2-waktu)

Updated 16 April 2024

Friday, July 28, 2023

Android Studio Giraffe 2022.3.1: limiting memory for 8GB Ram on windows 11

 Running on Ryzen 7535HS Ram 8GB Windows 11

I got bad experience after upgrading Android Studio Flamingo to Giraffe. It cosumes to much memory on my machine and causing Dead of Blue Screen. 

To limit memory usage:

  1. File -> Settings -> Appearance & Behavior -> System Settings -> Memory Settings
    IDE max heap Size: 1280MB
    Gradle daemon max heap size: 1536MB
    Kotlin daemon max heap size: 1536MB
  2. Click Ok and restart your android studio

Note: This problem did not happened on Debian 11 after upgrading Android Studio Flamingo to Giraffe on same machine (dual boot).

Wednesday, July 19, 2023

Android Studio Flamingo 2022.2.1 Patch 2 Duplicate Class Found

Build Tools Version 34.0.0

Error:

:app:checkDebugDuplicateClasses 1error

duplicate class kotlin.collections.jdk8.collectionsjdk8kt found in modules kotlin-stdlib-1.8.20

Duplicate Class Found

Build Output:

> Task :app:checkDebugDuplicateClasses FAILED
Execution failed for task ':app:checkDebugDuplicateClasses'.
> A failure occurred while executing com.android.build.gradle.internal.tasks.CheckDuplicatesRunnable
   > Duplicate class kotlin.collections.jdk8.CollectionsJDK8Kt found in modules kotlin-stdlib-1.8.20 (org.jetbrains.kotlin:kotlin-stdlib:1.8.20) and kotlin-stdlib-jdk8-1.6.21 (org.jetbrains.kotlin:kotlin-stdlib-jdk8:1.6.21)
     Duplicate class kotlin.internal.jdk7.JDK7PlatformImplementations found in modules kotlin-stdlib-1.8.20 (org.jetbrains.kotlin:kotlin-stdlib:1.8.20) and kotlin-stdlib-jdk7-1.6.21 (org.jetbrains.kotlin:kotlin-stdlib-jdk7:1.6.21)
...
     Duplicate class kotlin.text.jdk8.RegexExtensionsJDK8Kt found in modules kotlin-stdlib-1.8.20 (org.jetbrains.kotlin:kotlin-stdlib:1.8.20) and kotlin-stdlib-jdk8-1.6.21 (org.jetbrains.kotlin:kotlin-stdlib-jdk8:1.6.21)
     Duplicate class kotlin.time.jdk8.DurationConversionsJDK8Kt found in modules kotlin-stdlib-1.8.20 (org.jetbrains.kotlin:kotlin-stdlib:1.8.20) and kotlin-stdlib-jdk8-1.6.21 (org.jetbrains.kotlin:kotlin-stdlib-jdk8:1.6.21)

* Try:
> Run with --info or --debug option to get more log output.
> Run with --scan to get full insights.

* Exception is:
org.gradle.api.tasks.TaskExecutionException: Execution failed for task ':app:checkDebugDuplicateClasses'.
    at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.lambda$executeIfValid$1(ExecuteActionsTaskExecuter.java:149)
    at org.gradle.internal.Try$Failure.ifSuccessfulOrElse(Try.java:282)
    at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.executeIfValid(ExecuteActionsTaskExecuter.java:147)
    at
...
org.gradle.execution.plan.DefaultPlanExecutor$ExecutorWorker.execute(DefaultPlanExecutor.java:463)
    at org.gradle.execution.plan.DefaultPlanExecutor$ExecutorWorker.run(DefaultPlanExecutor.java:380)
    at org.gradle.internal.concurrent.ExecutorPolicy$CatchAndRecordFailures.onExecute(ExecutorPolicy.java:64)
    at org.gradle.internal.concurrent.ManagedExecutorImpl$1.run(ManagedExecutorImpl.java:49)
Caused by: java.lang.RuntimeException: Duplicate class kotlin.collections.jdk8.CollectionsJDK8Kt found in modules kotlin-stdlib-1.8.20 (org.jetbrains.kotlin:kotlin-stdlib:1.8.20) and kotlin-stdlib-jdk8-1.6.21 (org.jetbrains.kotlin:kotlin-stdlib-jdk8:1.6.21)
Duplicate class kotlin.internal.jdk7.JDK7PlatformImplementations found in modules kotlin-stdlib-1.8.20 (org.jetbrains.kotlin:kotlin-stdlib:1.8.20) and kotlin-stdlib-jdk7-1.6.21 (org.jetbrains.kotlin:kotlin-stdlib-jdk7:1.6.21)
...
...
Duplicate class kotlin.text.jdk8.RegexExtensionsJDK8Kt found in modules kotlin-stdlib-1.8.20 (org.jetbrains.kotlin:kotlin-stdlib:1.8.20) and kotlin-stdlib-jdk8-1.6.21 (org.jetbrains.kotlin:kotlin-stdlib-jdk8:1.6.21)
Duplicate class kotlin.time.jdk8.DurationConversionsJDK8Kt found in modules kotlin-stdlib-1.8.20 (org.jetbrains.kotlin:kotlin-stdlib:1.8.20) and kotlin-stdlib-jdk8-1.6.21 (org.jetbrains.kotlin:kotlin-stdlib-jdk8:1.6.21)

Go to the documentation to learn how to Fix dependency resolution errors.
    at com.android.build.gradle.internal.tasks.CheckDuplicateClassesDelegate.run(CheckDuplicateClassesDelegate.kt:65)
    at com.android.build.gradle.internal.tasks.CheckDuplicatesRunnable.execute(CheckDuplicateClassesDelegate.kt:91)
    at org.gradle.workers.internal.DefaultWorkerServer.execute(DefaultWorkerServer.java:63)
    at
...
org.gradle.internal.work.DefaultConditionalExecutionQueue$ExecutionRunner.runBatch(DefaultConditionalExecutionQueue.java:157)
    at org.gradle.internal.work.DefaultConditionalExecutionQueue$ExecutionRunner.run(DefaultConditionalExecutionQueue.java:126)
    ... 2 more

Edit build.gradle (Module.app) at the end of depedency

dependencies {
...
    implementation(platform("org.jetbrains.kotlin:kotlin-bom:1.8.0"))
    constraints {
        implementation("org.jetbrains.kotlin:kotlin-stdlib-jdk7:1.8.0") {
            because("kotlin-stdlib-jdk7 is now a part of kotlin-stdlib")
        }
        implementation("org.jetbrains.kotlin:kotlin-stdlib-jdk8:1.8.0") {
            because("kotlin-stdlib-jdk8 is now a part of kotlin-stdlib")
        }
    }

NOTE: 

Does not need on android studio giraffe 2022.3.1

Reference:

  • https://gist.github.com/danielcshn/7aa57155d766d46c043fde015f054d40 
  • https://youtrack.jetbrains.com/issue/KT-54136/Duplicated-classes-cause-build-failure-if-a-dependency-to-kotlin-stdlib-specified-in-an-android-project



Monday, July 17, 2023

Debian Bookworm: Configure printer and scanner HP Ink 415 Wireless (all in one)

Install required packages for printer and scanner

# apt-get install system-config-printer hplip cups hplip-ppds  

To configure printer:

  1. Applications -> Settings -> Print Settings
  2. Add new printer
  3. Select Network Printer -> AppSocket/HP JetDirect and fill Enter Host with printer's IP address

Install XSane for scanning image

# apt-get install xsane sane-utils

To configure scanner:

  1. Run XSane to configure scanner
  2. After XSane detected HP Printer & Scanner, select Hewlett-Pac and press Ok.

To install driver print to pdf

# apt-get install printer-driver-cups-pdf