HarukaDev Blog and Documentation

website·Indexed 32 days ago

https://harukadev.com/blog

A personal technical blog and documentation site by Haruka Yamamoto featuring tutorials and guides on Android development, Jetpack Compose, Kotlin, JavaScript, and Ubuntu. The site includes reverse engineering projects like the Turzx 35 smart screen, GRUB customization, and legal documentation for projects such as the Pudim bot and Whitelist Caller.

Tokens
5.7K
Snippets
24
Records
51
Agent score
63%

What's inside HarukaDev

  1. Understand Whitelist Caller data privacy and collection

    Whitelist Caller is designed to operate entirely offline. It does not collect, transmit, or share personal information, device data, location data, or analytics. There is no user registration, account creation, or advertisement tracking. All data processing occurs locally on the user's device.
  2. Install JetBrains Toolbox on Linux Mint, Ubuntu, or Debian

    JetBrains Toolbox is the official manager used to install and update JetBrains IDEs (such as IntelliJ IDEA, PyCharm, and CLion). To avoid breaking the installation, do not run the application directly from a temporary folder like Downloads and then delete that folder, as the application requires its binary to remain in a persistent location to function correctly.
  3. Establish a persistent Wi-Fi debugging connection using ADB

    To avoid unstable connections or QR code pairing failures in Android Studio, use the adb pair command to create a persistent trust link between your computer and Android device. This process requires both devices to be on the same Wi-Fi network and the device to have a static IP address.

    Process Flow:

    1. Enable Wireless Debugging: In Android device Settings > Developer options, enable 'Wireless debugging'. Tap it to open settings and select 'Pair device with pairing code'. Note the Pairing code and the IP address and pairing port.
    2. Pair the Device: Use the adb pair command with the pairing port. This establishes a cryptographically trusted link.
    3. Connect for Debugging: After pairing, use the adb connect command with the debugging port (which is different from the pairing port) shown on the device's wireless debugging screen.
    4. Verify: Run adb devices to confirm the connection.
    # Step 2: Pair using the pairing port
    adb pair 192.168.18.3:39233
    # Enter pairing code when prompted
    
    # Step 3: Connect using the debugging port
    adb connect 192.168.18.3:36541
    
    # Step 4: Verify connection
    adb devices
  4. Understand the difference between ADB pairing and debugging ports

    When configuring wireless debugging for Android, it is critical to distinguish between the two different ports used during the setup process:

    • Pairing Port: Used only once during the initial adb pair command to establish a trusted relationship between the computer and the device.
    • Debugging Port: Used for all subsequent adb connect sessions to actually deploy and debug applications. This port is the one that should be used for daily development.
  5. Manage Zsh plugins with ZInit

    ZInit is a fast plugin manager for Zsh. After installation, plugins are added by inserting zinit light <plugin-repo> commands into the ~/.zshrc file.
    # Install ZInit
    bash -c "$(curl --fail --show-error --silent --location https://raw.githubusercontent.com/zdharma-continuum/zinit/HEAD/scripts/install.sh)"
    
    # Add to ~/.zshrc for essential plugins:
    zinit light zdharma/fast-syntax-highlighting
    zinit light zsh-users/zsh-autosuggestions
    zinit light zsh-users/zsh-completions
  6. Run JetBrains Toolbox for the first time on Linux

    After extraction, run the binary from the extracted directory. On the first launch, the application automatically creates internal data folders in ~/.local/share/JetBrains/Toolbox/ and generates a .desktop shortcut in ~/.local/share/applications, allowing the app to appear in the system application menu.
    cd ~/.local/jetbrains-toolbox-<version>/
    ./jetbrains-toolbox
  7. Establish a persistent ADB Wi-Fi connection using command-line pairing

    To avoid the instability of QR code pairing in Android Studio—which often fails after device restarts or network switches—use the adb pair command. This creates a persistent trust link between the development computer and the Android device, removing the need to repeatedly scan QR codes or re-enter pairing codes.
  8. Establish a persistent trust link for Android Wi-Fi debugging

    To avoid the instability of QR code pairing in Android Studio—where connections are often lost after device restarts or network switches—use the adb pair command. This creates a persistent trust link between the Android device and the computer, removing the need to repeatedly scan QR codes or re-enter pairing codes.
  9. Analyze TURZX 3.5" Smart Screen communication protocol

    The device communicates via USB using bulk transfers (URB_BULK OUT and URB_BULK IN). Analysis of the payload suggests the use of the RGB565 16-bit pixel format (RRRRRGGGGGGBBBBB) for graphical data. Common RGB565 values observed include:

    • White: FFFF
    • Black: 0000
    • Red: F800
    • Green: 07E0
    • Blue: 001F
  10. Fix 'Invalid signature detected' error when enabling Secure Boot on Linux

    When enabling Secure Boot on a dual-boot system (e.g., Zorin OS and Windows), you may encounter the error 'Invalid signature detected. Check Secure Boot policy in Setup'. This happens because the default GRUB installation lacks a valid digital signature recognized by the firmware. To resolve this, you must install the officially signed GRUB and shim packages while Secure Boot is temporarily disabled.
    # 1. Temporarily disable Secure Boot in BIOS to allow the system to boot
    
    # 2. Update system packages
    sudo apt update
    
    # 3. Install officially signed GRUB and shim packages
    sudo apt install grub-efi-amd64-signed shim-signed
    
    # 4. Reinstall GRUB for x86_64 EFI
    sudo grub-install --target=x86_64-efi --efi-directory=/boot/efi --bootloader-id=grub
    
    # 5. Update the GRUB configuration
    sudo update-grub
    
    # 6. Reboot and re-enable Secure Boot in BIOS
  11. Manage local data storage and deletion in Whitelist Caller

    All application data, including whitelisted phone numbers, settings, and preferences, is stored exclusively on the device and is not synchronized with cloud services. To delete all application data, users can:

    1. Clear the application's storage via Android device settings.
    2. Uninstall the application.