Wednesday, November 26, 2025

Windows 11: clean install part 1 preparation

This is documentation when I need to reinstall windows 11, because of nvme damage (overheat). It is Axioo 5 hype X6 with Ryzen 6600h. It has windows 11 installed, and this laptop does have ethernet port. 

Download ISO should I download

  1. 25h2: shift+f10 keyboard input has been disabled (download from archive.org/)
  2. 24h2: shift+f10 keyboard input has been disabled (download from archive.org/)

I did not try 23h2 version, it will take more time to install and laptop must be ready for studying.

During installation shift+f10 will bypass network configuration, you have to run

oobe\bypassnro

after terminal. it will restart installation.  

If you want to use 25h2 and 24h2, download the driver from laptop provider website. in my case download from driver.axiooworld.com, just network driver, others can be installed at the end of windows 11 installation. If you want to use only Windows skip step below, and go to part 2 installation windows.

This below instruction uses other pc/laptop to prepare nvme disk. 

Optional but recommended for dual OS, create EFI System partition (ESP) for new nvme, the minimum size is 500MB. this is step on debian using gparted.

Put a nvme, into nvme ssd/nvme external usb, and connect it your laptop.

Check your nvme

# dmesg
...
[  262.395926] scsi 0:0:0:0: Direct-Access     ADATA LE GEND 710         0213 PQ: 0 ANSI: 6
[  262.397870] sd 0:0:0:0: Attached scsi generic sg0 type 0
[  262.398189] sd 0:0:0:0: [sda] 500118192 512-byte logical blocks: (256 GB/238 GiB)
...
# lsblk
NAME        MAJ:MIN RM   SIZE RO TYPE MOUNTPOINTS
sda           8:0    0 238.5G  0 disk 
# fdisk -l
...
Disk /dev/sda: 238.47 GiB, 256060514304 bytes, 500118192 sectors
Disk model: GEND 710        
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes

this is mount point /dev/sda.

I use this schema

  1. 500 MB ESP (FAT32 Flag boot and esp)
  2. 120 GB Windows system (NTFS)
  3. 30 GB Data Windows (NTFS
  4. 80 GB Debian / (ext4)
  5. 4 GB swap (swap)

 To use GParted to create partition on nvme (Be careful not select wrong disk)

  1. Open GParted
  2. Select Gparted -> devices -> /dev/sda, If it a new device (never use), you need to create parititon table, Device -> Create partition table
  3. select unallocated, and create EFI System Partition (ESP) for boot loader
        File System: FAT32
        Size: At least 300 MiB (recommended 500 MiB for future needs)
        Label: Optional, but you can name it "EFI". 
  4. Apply all operation 
  5. Now you can manage flag for ESP, select partition EFI,right click -> Manage Flags -> check boot and esp 

Note: if you try to create new partition in brand new nvme (never used), it will reported No Partition table found, it is really a new device.

Just, to create the partition, the Adata legend 710 heat sink feel a bit warmer.

You can not download windows 11 multi iso from windows https://www.microsoft.com/en-us/software-download/windows11. You can continue with windows 11 installation, it will put boot loader in EFI system partition (ESP) and next you want to install Debian.


Sunday, November 23, 2025

Using private Private DNS in Android 9 and above for more for security

Sometimes we disappointed to use isp's dns resolver. whatever the reasons, since Android 9 (Pie) and later versions, user can change his/her android phone to use Private DNS. Only one DNS server can be used, it does not support multiple DNS resolver! 

Original list was taken from https://www.geeksforgeeks.org/android/how-to-enable-private-dns-on-android/ with additional text.

Private DNS Hostname List for Android

  1. Google DNS: dns.google
  2. Quad9: dns.quad9.net
  3. Cleanbrowsing DNS: security-filter-dns.cleanbrowsing.org
  4. Open DNS: dns.opendns.com for dot, https://doh.opendns.com/dns-query for doh, 208.67.222.222 
  5. NextDNS: your-id.dns.nextdns.io 45.90.28.0 (custom IPv4) require registration to get id and proper full qualified hostname
  6. Cloudflare : cloudflare-dns.com 1.1.1.1

Please check their website or use search engine for more detail and update information.

When you use private DNS in public network, your mobile phone will use your private DNS resolver that have you define. It won't use DNS from public access point. This will prevent you from "man in the middle attack". 

Warning: You also can bypass country blocked to reach your desire web. You don't need vpn if private DNS can solved country limitation.

Saturday, November 22, 2025

Axioo Hype 5 X6 Ryzen 6600h, blank screen but laptop running

 Symptoms;

  1. laptop on, fan on, indicator on
  2. no any image nor characters appear on screen, backlight on
  3. ctl-alt-del is working
  4. can not enter bios 

Steps to diagnostic

How to remove static voltage

  1. open back cover you need screw driver + small
  2. remove all rams
  3. remove all nvme
  4. remove / unplug battery 
  5. Press and hold power button at least 15 seconds
  6. reconnect/plug battery 

Check ram

  1. clean ram connector with eraser 
  2. put in a ram in slot 1
  3. turn on laptop, and see what screen show, usually it will enter uefi/bios settings
  4. if not ram not detected, blank screen or not appear in uefi, turn of laptop and put ram into another slot. repeat until no more slot to try. if it still does not detected, ram fail/damage.
  5. If ram detected in another, it may something wrong with previous slot, check connector and clean if necessary. if still can detect, slot failure.
  6. repeat step 2 with another ram.

Check nvme (or sata)

  1. clean vnme connector with eraser 
  2. put nvme in the slot
  3. turn in laptop
  4. if it does not go to os or uefi, turn off and move vnme to another slot if available.
  5. if no more slot can detect nvme and start uefi/os, nvme is failure/demage 

Wednesday, November 19, 2025

Protokol pengisian daya cepat Dan mereka.yang menggunakannya

Protocol charging usb mobile phone

  1. transsion tecno, Infinix
  2. Power Delivery (pd) apple Samsung google  xiaomi Redmi pocco baru
  3. Quick Charge (qc) Qualcomm snapdragon 
  4. Super Vooc oppo realme vivo oneplus
  5. Programmable Power Supply (pps) Samsung xiaomi Redmi pocco baru
  6. super charge protocol (scP) huawei honor

Beberapa xiaomi Redmi pocco menggunakan qc, khususnya yang menggunakan snapdragon 

Kpatibilitas berdasarkan lama charging handphone infinix note 12, Infinix hot 40 pro, tecno spark 20 pro.

no nama harga kompatibilitas
1 Acome 18 watt n/a sesuai
2 Xiomi 33 watt Rp.30.000 tidak, charging infinix note 12, Infinix hot 40 pro, tecno spark 20 pro lebih Dari 4 jam
3 Veger VR33 33 watt Rp.89.000 tidak, charging infinix note 12, Infinix hot 40 pro, tecno spark 20 pro lebih Dari 4 jam

Belilah merek yang baik atau ditoko resmi, pastikan charger mendukung protol charging yang benar.

Tuesday, November 11, 2025

Android java: using DataLive for orientation change

I test it in Android 10 xiaomi mia2

What will happen when orientation change e.g. screen change or language change?

the object in activity will be destroyed. here is the sequence:

  • after orientation change
    V  onPause
    V  onStop
    V  onDestrouy
  • after flusing all data
    V  onCreate
    V  onCreate myClass :null
    V  MyClass constructor
    V  onCreateView myClass.getRandom
    V  onStart
    V  onResume 

At xiomi mia2, override public void onConfigurationChanged(Configuration newConfig) method did not called at all during screen orientation change, not appearred in logcat. except, you put android:configChanges in your layout.

Base on the android behave, these are the solution can be used to keep the object during configuration change:

  1. Local persistence to handle process death for complex or large data. Persistent local storage includes databases or DataStore.
  2. Retained objects such as ViewModel instances to handle UI-related state in memory while the user is actively using the app.
  3. Saved instance state to handle system-initiated process death and keep transient state that depends on user input or navigation. 

ViewModel is recommended used for today an future, These are some options:

  1. ViewModel    Holds UI data & logic    Core architecture component
  2. ComputableLiveData (Deprecated)
  3. MediatorLiveData    Combines multiple LiveData sources    Merging streams
  4. MutableLiveData    Observable, mutable data    UI updates
  5. SavingStateLiveData    LiveData with saved-state persistence    Restore after process death 

Comparison between AndroidViewModel vss ViewModel

AndroidViewModel require Context for DB, prefs, etc. gemini: Avoid if possible. Only use when you absolutely need Context. violates a core principle of good architecture: separation of concerns and testability.
ViewModel UI logic without needing Context Network requirement may use this, it does not need context

NOTE: Don’t store Activity or Fragment in VieModel nor AndroidViewModel! 

These are the java code for education, first text using direct access to object in activity, and second text using live data and AndroidViewModel. this code used AndroidViewModel, because I need application's context to access sqlite.

-- MyClass.java

package com.dedetok.testdataorientation;

import android.content.Context;
import android.util.Log;

import androidx.lifecycle.LiveData;
import androidx.lifecycle.MutableLiveData;

import java.util.Random;

public class MyClass {
    // dummy
    Context context;

    boolean isCreated = false;
    int randomNumber=-1;

    public MyClass(Context context) {
        this.context = context;
        Log.v("deddetok", "MyClass constructor"); // debug

    }

    public String getRandom() {
        if (!isCreated) {
            Random random = new Random();
            randomNumber = random.nextInt(100);
            isCreated = true;
        }
        return String.valueOf(randomNumber);
    }

    public LiveData<String> getRandomLive() {
        if (!isCreated) {
            Random random = new Random();
            randomNumber = random.nextInt(100);
            isCreated = true;
        }
        MutableLiveData<String> returnValue = new MutableLiveData<>();
        returnValue.setValue(String.valueOf(randomNumber));

        return returnValue;
    }
}

-- MyAndroidViewModel

package com.dedetok.testdataorientation;

import android.app.Application;

import androidx.annotation.NonNull;
import androidx.lifecycle.AndroidViewModel;
import androidx.lifecycle.LiveData;

public class MyAndroidViewModel extends AndroidViewModel {
    MyClass myClass;

    public MyAndroidViewModel(@NonNull Application application) {
        super(application);
        myClass = new MyClass(application);
    }

    public LiveData<String> getData() {
        return myClass.getRandomLive();
    }
}

-- MainActivity.java

package com.dedetok.testdataorientation;

import android.content.Context;
import android.content.res.Configuration;
import android.os.Bundle;
import android.util.AttributeSet;
import android.util.Log;
import android.view.View;
import androidx.activity.EdgeToEdge;
import androidx.annotation.NonNull;
import androidx.annotation.Nullable;
import androidx.appcompat.app.AppCompatActivity;
import androidx.appcompat.widget.AppCompatTextView;
import androidx.core.graphics.Insets;
import androidx.core.view.ViewCompat;
import androidx.core.view.WindowInsetsCompat;
import androidx.lifecycle.ViewModelProvider;

public class MainActivity extends AppCompatActivity {

    MyClass myClass = null;

    AppCompatTextView myTextView1, myTextView2;

    MyAndroidViewModel myAndroidViewModel;

    /* to preserve myclass
     * 1. Local persistence to handle process death for complex or large data. Persistent local storage includes databases or DataStore.
     * 2. Retained objects such as ViewModel instances to handle UI-related state in memory while the user is actively using the app.
     * 3. Saved instance state to handle system-initiated process death and keep transient state that depends on user input or navigation.
     */

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        EdgeToEdge.enable(this);
        setContentView(R.layout.activity_main);
        ViewCompat.setOnApplyWindowInsetsListener(findViewById(R.id.main), (v, insets) -> {
            Insets systemBars = insets.getInsets(WindowInsetsCompat.Type.systemBars());
            v.setPadding(systemBars.left, systemBars.top, systemBars.right, systemBars.bottom);
            return insets;
        });

        Log.v("dedetok", "onCreate"); // debug


        myTextView1 = findViewById(R.id.textView1);
        myTextView2 = findViewById(R.id.textView2);

        Log.v("dedetok", "onCreate myClass :"+myClass); //
        // myTextView1
        if (myClass==null) {
            myClass = new MyClass(this);
        }
        myTextView1.setText(myClass.getRandom()); // work, created in memory

        // ✅ Get ViewModel (it survives rotation)
        // myTextView2
        myAndroidViewModel = new ViewModelProvider(this).get(MyAndroidViewModel.class);
        myAndroidViewModel.getData().observe(this, value -> {
            // 'value' is a plain String here
            myTextView2.setText(value);
        }); //

    }

    @Nullable
    @Override
    public View onCreateView(@Nullable View parent, @NonNull String name, @NonNull Context context, @NonNull AttributeSet attrs) {
        Log.v("dedetok", "onCreateView"); // debug
        //Log.v("dedetok", "onCreateView myClass.getRandom"); // debug
        //myTextView.setText(myClass.getRandom()); // crash textview not ready
        return super.onCreateView(parent, name, context, attrs);
    }

    /*
     * ## activity life cycle 2 ##
     */
    @Override
    protected void onStart() {
        super.onStart();
        Log.v("dedetok", "onCreateView myClass.getRandom"); // debug
        //myTextView1.setText(myClass.getRandom()); // work, view has been created
        myAndroidViewModel.getData().observe(this, value -> {
            // 'value' is a plain String here
            myTextView2.setText(value);
        }); // this is fine place

        Log.v("dedetok", "onStart"); // debug

    }

    /*
     * ## activity life cycle 3 ##
     */
    @Override
    protected void onResume() {
        super.onResume();

        Log.v("dedetok", "onResume"); // debug


    }

    /*
     * ## activity life cycle 4 ##
     */
    @Override
    protected void onPause() {
        Log.v("dedetok", "onPause"); // debug
        super.onPause();

    }

    /*
     * ## activity life cycle 5 ##
     */
    @Override
    protected void onStop() {
        Log.v("dedetok", "onStop"); // debug
        super.onStop();

    }

    /*
     * ## activity life cycle 6 ##
     */
    @Override
    protected void onDestroy() {
        Log.v("dedetok", "onDestrouy"); // debug

        super.onDestroy();
    }

    @Override
    public void onConfigurationChanged(Configuration newConfig) {
        super.onConfigurationChanged(newConfig);
        Log.v("dedetok", "onConfigurationChanged"); // debug
    }
}

-- activity_main.xml

<?xml version="1.0" encoding="utf-8"?>
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:app="http://schemas.android.com/apk/res-auto"
    xmlns:tools="http://schemas.android.com/tools"
    android:id="@+id/main"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    tools:context=".MainActivity">

    <androidx.appcompat.widget.AppCompatTextView
        android:id="@+id/textView1"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:text="TextView"
        android:minHeight="50dp"
        android:textSize="24sp"
        app:layout_constraintTop_toTopOf="parent"
        app:layout_constraintStart_toStartOf="parent"
        app:layout_constraintEnd_toEndOf="parent"
        />
    <androidx.appcompat.widget.AppCompatTextView
        android:id="@+id/textView2"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:text="TextView2"
        android:minHeight="50dp"
        android:textSize="24sp"
        app:layout_constraintTop_toBottomOf="@+id/textView1"
        app:layout_constraintStart_toStartOf="parent"
        app:layout_constraintEnd_toEndOf="parent"
        />
</androidx.constraintlayout.widget.ConstraintLayout>

Some of parts of this content generated by ChatGPT and Gemini with some modification.