Thursday, June 5, 2025

How to Disable Windows 11's "Show More Options" Context Menu

  Windows 11 introduced a new condensed context menu that hides most options behind a "Show more options" button. This extra click can be frustrating for power users who frequently access context menu items.

The Problem

When you right-click on files or folders in Windows 11, you see a simplified menu with limited options. To access familiar options like "Cut," "Copy," "Properties," or third-party app integrations, you must click "Show more options" or press Shift+F10.

Quick Solution: Download Registry Files

The easiest way to restore the full context menu is using pre-made registry files.

Download Links

To Disable "Show More Options" (Recommended)
📁 Download: Disable_Show_more_options.reg

To Re-enable "Show More Options" (Restore Default)
📁 Download: Enable_Show_more_options.reg

Step-by-Step Instructions

  1. Download the File
    • Click the download link above for your preferred option
    • Most users want the "Disable" version to show the full menu immediately
  2. Save to Desktop
    • Save the .reg file to your desktop for easy access
  3. Apply the Fix
    • Double-click the downloaded .reg file
    • Click "Run" when Windows asks for permission
    • Click "Yes" on the User Account Control (UAC) prompt
    • Click "Yes" to confirm the registry modification
    • Click "OK" on the success message
  4. Restart Explorer
    • Press Ctrl+Shift+Esc to open Task Manager
    • Find "Windows Explorer" in the Processes tab
    • Right-click it and select "Restart"
    • Alternative: Sign out and sign back in
  5. Clean Up
    • Delete the downloaded .reg file from your desktop (optional)

Result

After applying the fix, right-clicking will immediately show the full context menu with all options visible, just like Windows 10. No more extra clicks needed!

Context menu (right-click menu) Before and After Disabling "Show More Options"

Enable_Show_more_options.png   
Disable_Show_more_options.png



Reference:
https://www.elevenforum.com/t/disable-show-more-options-context-menu-in-windows-11.1589/

Friday, September 27, 2024

Screen command

What is screen?

screen is a terminal multiplexer that allows you to manage several terminal sessions from a single window. This is particularly useful when you want to:

  • Run commands that take a long time to execute.
  • Disconnect and reconnect without interrupting your running processes.
  • Collaborate by sharing a terminal session with others.

With screen, you can detach from a session, log out, and reconnect later without losing your running applications. It’s like having multiple monitors in one terminal!

Basic Commands:

  • screen: Start a new session.

Common Flags:

  • -ls: List active screen sessions.
  • -aS screenname: Create a session with all capabilities.
  • -r: Resume a detached session.
  • -x: Attach to an active session.
  • -d: Detach from a session.
  • -d -m $command: Start a session in detached mode and run a command.
  • -DR: Force disconnect current user and reconnect with another.
-wipe: Remove dead screen sessions.

Common Screen Commands

  • List active sessions:
    screen -ls

  • Detach from a session:
    screen -d session_id

  • Reattach to a session:
    screen -r session_id

  • Detach and reattach to a session:
    screen -d -r session_id

  • Create a new session with a name:
    screen -S session_name

Sunday, October 29, 2023

Agile Methodology

Agile Methodology

Agile methodology is a project management approach that emphasizes collaboration and continuous improvement. It breaks projects into smaller phases, known as sprints, and guides teams through cycles of planning, execution, and evaluation.

Agile methodology is an iterative approach to software development. Each iteration takes a short time interval of 1 to 4 weeks. The agile development process is aligned to deliver the changing business requirement.

Agile methodology values:

  • Individuals and interactions over processes and tools
  • Working software over comprehensive documentation

The steps of the Agile methodology are:

  1. Define
  2. Design
  3. Build
  4. Test

The Agile methodology prioritizes:

  • Quick delivery
  • Adapting to change
  • Collaboration

The Agile methodology encourages:

  • Constant feedback
  • Team members to adjust to challenges as they arise
  • Stakeholders to communicate consistently

Agile Vs Waterfall

Agile:

  • Approach: Iterative, adaptable, and flexible.
  • Planning: Incremental planning; changes are welcome at any stage.
  • Testing: Integrated with development; continuous feedback.
  • Client Involvement: Frequent collaboration and feedback.
  • Documentation: Emphasizes working software over extensive documentation.
  • Risk Management: Addresses risks early; adjustments made as needed.

Waterfall:

  • Approach: Sequential, rigid, and linear.
  • Planning: Detailed planning upfront; changes discouraged once the project starts.
  • Testing: Separate phase after development.
  • Client Involvement: Limited involvement mainly at the beginning and end.
  • Documentation: Emphasizes comprehensive documentation at every stage.
  • Risk Management: Risks addressed primarily in the planning phase; limited adjustments during execution.

When to Use Agile and When to Use Waterfall

Use Agile When:

  1. Requirements are unclear or likely to change: Agile is highly adaptable and works well when you expect evolving or uncertain project requirements.
  2. Rapid development is required: Agile allows for quick delivery of working features or products, making it suitable for projects with tight timelines.
  3. Frequent client or stakeholder involvement is essential: Agile encourages continuous collaboration and feedback, making it ideal when clients or stakeholders need to be closely involved.
  4. You have a small to medium-sized team: Agile teams tend to be smaller and work well in a more collaborative and communicative environment.
  5. You are developing software or digital products: Agile is commonly used in the software development industry, where changes and iterative development are the norm.

Use Waterfall When:

  1. Requirements are stable and well-defined: Waterfall is suitable for projects with clear, unchanging requirements where a detailed plan can be established at the start.
  2. Client demands extensive documentation: Some industries or clients may require comprehensive documentation, which is a strength of the Waterfall approach.
  3. You have a larger team: Waterfall can work efficiently with larger teams where tasks can be divided into specialized phases.
  4. Regulatory or compliance requirements are strict: In industries like healthcare or finance, where adherence to regulations is crucial, Waterfall's structured documentation can be an advantage.
  5. You have a well-established and controlled project environment: If your organization is more traditional and has a history of success with Waterfall, it may be more comfortable sticking to this methodology.

Saturday, October 21, 2023

Understanding IPv4 Address Types

Understanding IPv4 Address Types

1. Loopback Addresses

Range: 127.0.0.0 - 127.255.255.255. Used for local testing.

Loopback addresses ensure network software works on the local machine without network traffic.

2. Private IP Addresses

Ranges: 192.168.x.x, 10.x.x.x, 172.16.x.x - 172.31.x.x. Reserved for private networks.

Private IP addresses facilitate internal communication within organizations, not accessible from the internet.

3. Link-Local Addresses

Range: 169.254.x.x. Automatically assigned for local network communication.

Link-local addresses come into play when devices can't obtain an IP address through DHCP.

4. Multicast Addresses

Range: 224.x.x.x - 239.x.x.x. Used for one-to-many communication.

Multicast addresses enable efficient data distribution to multiple recipients simultaneously.

5. Broadcast Address

Typically 255.255.255.255. Broadcast to all devices on the local network.

The broadcast address is a way to send data to all devices on the same network segment.

6. Public Point-to-Point IPv4 Addresses

Any address outside the above ranges is a public IP for internet communication.

Public IPs are used for global internet communication between individual devices.

The InetAddress API helps classify IP addresses for network programming.

The Beauty of the Sine Wave: What It Teaches Us

The Beauty of the Sine Wave: What It Teaches Us

The sine wave is a fascinating thing that captures the attention of many. It's a simple, elegant, and common concept in the worlds of physics, engineering, and math. But it's more than just numbers and equations; it helps us understand how things are created and sometimes go away.

The Sine Wave: A Math Wonder

A sine wave, also called a sinusoidal wave, is a math idea that describes something going up and down in a smooth, repeating way. It's written like this:

f(x) = A sin(Bx + C)

What does that mean? Well:

  • (A) says how high the wave can go.
  • (B) tells us how fast it goes up and down.
  • (C) decides where the wave starts.
What's amazing is how this simple equation can explain so many things in our world.

Everywhere in Nature

The sine wave isn't just a math idea; it's all around us in nature:

  1. Light and Sound Waves: It helps us understand how colors and sounds work.
  2. Planets' Paths: Planets move like sine waves in the sky, going around the sun.
  3. Ocean Waves: The gentle rise and fall of ocean waves look like sine waves.
  4. Electromagnetic Waves: Think of it like Wi-Fi signals or your cell phone connecting to the internet.
  5. Heartbeats and Brainwaves: Our hearts and brains follow a kind of sine wave pattern too!

Sine Waves in Our Tech

This math concept is crucial in technology:

  1. Electricity: Our homes and devices run on something called alternating current (AC), which is a sine wave. It's super efficient for sending power.
  2. Signal Magic: For things like radio and TV, sine waves help send information wirelessly.
  3. Music: The sweet sounds we hear from instruments and singers are like sine waves.
  4. Engineering: When buildings or machines shake and vibrate, we use sine waves to figure out how.

The Big Idea

The sine wave isn't just about math; it teaches us something big. It shows how things are created and then sometimes go away. Imagine it like a never-ending cycle, like day and night, good times and bad, or growing and shrinking. It's a reminder of how everything has its ups and downs, and that's just the way of life.

Conclusion

The sine wave is more than just numbers and equations. It's all around us, from the electricity that powers our homes to the music that soothes our souls. It's a simple idea with a profound message: creation and destruction are part of a beautiful, never-ending cycle, and the sine wave helps us understand that better.

Tuesday, October 10, 2023

Reverse Engineering vs. Reinventing the Wheel: A Smarter Approach

Reverse Engineering vs. Reinventing the Wheel: A Smarter Approach

Innovation and progress are at the heart of technological advancement, but they don't always require starting from scratch. Reverse engineering, the process of dissecting and understanding existing solutions, offers several advantages over reinventing the wheel:

  1. Maximizing Efficiency: It saves time and resources by building on existing foundations.
  2. Learning from the Best: Reverse engineering successful solutions provides valuable insights and best practices.
  3. Cost-Effective Innovation: It's a budget-friendly approach, ideal for startups and small businesses.
  4. Legal and Ethical Benefits: When done ethically and legally, it avoids potential legal disputes.
  5. Reducing Environmental Impact: Reusing and repurposing existing technology minimizes waste.

In a world where innovation is essential, reverse engineering complements the pursuit of new ideas, making it a valuable tool for progress.

ChatGPT in Software Engineering industry

About ChatGPT and AI in Software Development

ChatGPT is a groundbreaking AI tool developed by OpenAI that's designed to assist software engineers. It can do several things:

  • Code Generation: ChatGPT can instantly generate code snippets, functions, or even entire code blocks in various programming languages. This saves developers time they'd otherwise spend searching for examples or writing code from scratch.
  • Coding Assistance: It provides quick and accurate responses to coding questions. Whether it's troubleshooting an error or seeking guidance on a particular concept, ChatGPT offers valuable insights, potentially saving developers hours of frustration.
  • Adaptation: ChatGPT learns and adapts to a developer's coding style and preferences over time. This personalized assistance leads to more relevant code suggestions and answers.

While ChatGPT is a powerful tool, it's important to note that it's meant to complement, not replace, software engineers. It can handle routine and repetitive tasks, boosting productivity, but it lacks the critical thinking and problem-solving skills that human developers bring to the table.

Advantages of Using AI in Software Development

  • Efficiency: Automation of tasks like code generation and testing saves time and effort.
  • Accuracy: AI can analyze vast data sets to identify patterns and trends, leading to more precise results and predictions.
  • Collaboration: AI tools facilitate communication and collaboration among team members, streamlining workflows.
  • Flexibility: AI adapts to changing requirements and workflows more easily than traditional tools.
  • Security: AI can detect and prevent security vulnerabilities, enhancing software reliability.
  • Scalability: AI handles large data and processing tasks efficiently, ideal for large projects.
  • Creativity: AI aids developers in generating innovative ideas and solutions.
  • Cost-Effectiveness: Automation reduces labor costs and project expenses.

In summary, ChatGPT is a remarkable tool for software engineers, offering coding assistance and boosting productivity. However, it's not a replacement for human developers. AI's role in software development is to enhance efficiency, accuracy, and creativity while freeing up developers to focus on more complex and creative aspects of their work.

Tuesday, August 29, 2023

How to fix Git repeatedly requesting user credentials?

 When you engage with a remote repository via HTTPS URLs through the command line, you'll inevitably encounter prompts for your GitHub username and password. This can be rather frustrating, wouldn't you agree?

Nevertheless, there are some notable advantages to using an HTTPS remote URL: it's considerably simpler to configure compared to SSH 😅, and it typically circumvents the restrictions imposed by stringent firewalls and proxies. However, it does come with the drawback of incessantly requesting your GitHub user credentials whenever you perform a repository pull or push 😞.

Fortunately, there's a way to rectify this predicament by configuring Git to handle your password for you. Here's the step-by-step solution:

1. Update the origin remote URL to use SSH instead of HTTPS:

   git remote set-url origin git@github.com:username/repo.git

   Or, for those who prefer an alternative approach:

2. Configure Git to store your username and password, effectively eliminating the need for manual entry:

   git config --global credential.helper store

3. If you want to take it a step further and cache your credentials for a session, you can use:

   git config --global credential.helper cache

4. Optionally, you can set a specific timeout for the credential cache to enhance security:

   git config --global credential.helper 'cache --timeout=600'

Voilà! You've successfully resolved the issue, and from this point onward, Git won't pester you for your credentials anymore. 😄

Thursday, June 29, 2023

How to Use Git LFS for Files Larger than 100MB on GitHub

How to Use Git LFS for Files Larger than 100MB on GitHub

If you're working on a GitHub repository and need to handle files larger than 100MB, Git LFS (Large File Storage) is the solution. Git LFS allows you to manage and version large files efficiently. In this guide, we'll walk you through the steps to use Git LFS for files exceeding 100MB on GitHub.

Step 1: Install Git LFS

To get started, you need to install Git LFS on your local machine. Open your terminal and run the following command:

sudo apt-get install git-lfs

Step 2: Navigate to Your Repository

Change your working directory to the location of your Git repository:

cd path_to_your_repo

Step 3: Initialize Git LFS

Before you can start using Git LFS for large files, you need to initialize it for your repository:

git lfs install

Step 4: Specify File Types for Git LFS

Tell Git LFS which file types you want to manage. For example, if you want to use Git LFS for files with the extensions .tflite and .apk, run the following commands:

git lfs track "*.tflite"
git lfs track "*.apk"

Step 5: Stage and Commit Your Changes

Now that Git LFS is set up for the specified file types, add your files to the staging area and commit them. Replace "added file above 100MB with lfs" with an appropriate commit message:

git add .
git commit -am "added file above 100MB with lfs"

Step 6: Push to GitHub

Finally, push your changes to your GitHub repository:

git push origin main

That's it! You've successfully configured Git LFS to manage files larger than 100MB in your GitHub repository. These steps will help you keep your repository organized and prevent large files from bloating your Git history.

Git LFS is a powerful tool for handling large files in Git, and it ensures that your repositories remain efficient and manageable. Now you can work with large assets in your projects on GitHub with ease.

Monday, February 6, 2023

Share common folder between two git repo

 One common approach is to use Git Submodules.

A Git submodule allows you to include a repository as a sub-folder within another repository. The submodule remains a separate repository, but changes made to it are committed and tracked in the parent repository.

To add a submodule to a Git repository, you would run the following commands:

$ git submodule add [url_of_the_submodule_repo] [path/to/submodule] $ git commit -m "Adding submodule [name_of_the_submodule]" $ git push

You can then clone the parent repository and initialize the submodule by running:

$ git clone [url_of_the_parent_repo] $ cd [parent_repo] $ git submodule init $ git submodule update

This way, both the parent and submodule repositories will have the latest version of the submodule code. However, changes made to the submodule code will need to be committed and pushed to the submodule repository and then committed and pushed in the parent repository to propagate to other users.

for more info:

https://phoenixnap.com/kb/git-clone-submodule

Thursday, September 29, 2022

Wine installation on ubuntu 20.04

If your system is 64 bit, enable 32 bit architecture (if you haven't already):
sudo dpkg --add-architecture i386 

Download and add the repository key:
wget -O - https://dl.winehq.org/wine-builds/winehq.key | sudo apt-key add -


Add the repository:

For Ubuntu 20.04
sudo add-apt-repository 'deb https://dl.winehq.org/wine-builds/ubuntu/ focal main'

Update packages:
sudo apt update

Then install one of the following packages:

Stable branch 
sudo apt install --install-recommends winehq-stable

Development branch
 
sudo apt install --install-recommends winehq-devel

Staging branch
 
sudo apt install --install-recommends winehq-staging


Install sourceinsight
wine sourceinsight40124-setup.exe 
wine winecfg

set below setting to set full screen for wine windows on ubuntu with 1920x1080, 125 scaling

Reference: 
https://www.youtube.com/watch?v=Wx8NbZEAPNM&ab_channel=ProgrammingKnowledge

Tuesday, April 19, 2022

Understanding Audio Tracks and Configurations

Understanding Audio Tracks and Configurations

In the context of audio processing and playback on computer systems or mobile devices, there are various modes and configurations designed to optimize performance and power consumption. These modes can significantly impact the audio quality, latency, and power efficiency of the system. Let's delve into each of the mentioned audio tracks and configurations in detail.

Normal Tracks:

  • Audio Format: PCM (Pulse Code Modulation) is commonly used for high-quality audio playback.
  • Buffer Size: Typical buffer size is approximately 20 milliseconds.
  • Latency: Higher latency, which means there might be a slight delay between when the audio is generated and when it's heard.
  • Purpose: This mode prioritizes audio quality and is suitable for scenarios where latency is not a critical concern, such as music playback or video streaming.

Fast Tracks:

  • Audio Format: PCM (Pulse Code Modulation).
  • Buffer Size: Typical buffer size is 5 milliseconds or even less.
  • Latency: Lower latency, resulting in minimal delay between audio generation and playback.
  • Purpose: Fast tracks are optimized for real-time applications where low latency is essential. This includes voice calls, gaming, and any situation where immediate audio feedback is critical.

Deep Buffer:

  • Audio Format: PCM (Pulse Code Modulation).
  • Buffer Size: Typical buffer size is greater than or equal to 100 milliseconds.
  • Latency: Very high latency, which can result in significant delays.
  • Purpose: Deep buffer mode is primarily used to conserve power. By allowing longer gaps between audio processing, the system can enter low-power states more frequently. This mode may be suitable for audio playback in situations where power efficiency is more critical than low latency, such as background music playback.

Codec Offload:

  • Audio Format: Compressed audio formats like MP3, AAC, etc.
  • Buffer Size: Typically involves very high latency.
  • Latency: Very high latency, similar to deep buffer mode.
  • Purpose: Codec offload mode is designed to save even more power by offloading audio decoding tasks to dedicated hardware or specialized DSPs (Digital Signal Processors). This mode is suitable for scenarios where power consumption needs to be minimized at the expense of higher latency. It's commonly used in low-power or battery-sensitive devices during audio playback.

The command grep -r DEEP_BUFFER in frameworks/av/* is likely used to search for references or configurations related to the "Deep Buffer" mode within the Android Audio/Video framework. This search can help developers or system administrators find specific code or settings related to this mode, allowing them to customize or optimize the audio playback behavior based on their requirements.

In summary, the choice of audio track and configuration mode depends on the specific use case, with trade-offs between audio quality, latency, and power efficiency. Understanding and customizing these modes can help achieve the desired audio performance for various applications.

Building AOSP for Google Pixel 3a (Sargo)

Building Android from Source for Pixel 3a

In this blog post, we will guide you through the process of building Android from source for the Pixel 3a smartphone. Building Android from source gives you full control over the operating system and allows for customization. We'll also cover how to handle common issues during the process.

Step 1: Get the Source Code

  1. Create a directory for the project:
    mkdir aosp12
    cd aosp12
          
  2. Initialize the repository with the Android source code:
    repo init -u https://android.googlesource.com/platform/manifest -b android-12.1.0_r27
          
  3. Sync the source code to your local machine:
    repo sync -c --force-sync --no-clone-bundle --no-tags -j$(nproc --all)
          

Step 2: Handling Repo Sync Errors

If you encounter any errors during the repo sync process, follow these steps:

  1. Navigate to the .repo/repo directory:
    cd .repo/repo
          
  2. Check out forcefully:
    git checkout -f
          
  3. Retry the repo sync with the following command:
    repo sync -c
          

Step 3: Download Driver Binaries

Next, you'll need to download the driver binaries for the same Build ID that you selected previously. For Pixel 3a, you can find the drivers here.

After downloading, extract the driver binaries into your project directory (aosp12).

Step 4: Build Android

  1. Set up the build environment:
    source build/envsetup.sh
          
  2. Choose the build variant (userdebug in this case):
    lunch aosp_sargo-userdebug
          
  3. Build Android. You can specify the number of CPU cores to use for the build. For example, to use one core for kernel compilation and four cores for the rest of the build:
    m -j1 (till kernel compilation)
    m -j4 (after kernel compilation)
          

Step 5: Flash the Build

  1. Reboot your device into bootloader mode:
    adb reboot bootloader
          
  2. Flash the build onto your device. This will wipe all data, so be cautious:
    fastboot flashall -w
          

Step 6: Finalize and Test

After flashing, your device will reboot. You can then:

  1. Reconnect to the device:
    adb root
    adb remount
          
  2. Reboot your device:
    adb reboot
          

Conclusion

Congratulations! You've successfully built and flashed Android from source for your Pixel 3a smartphone. Enjoy your custom Android experience!

Friday, April 15, 2022

Build Pixel Experience 11 for Realme 3 pro

https://wiki.pixelexperience.org/devices/RMX1851/build

pixelexp11/.repo/manifests$ git remote -v
origin https://github.com/PixelExperience/manifest (fetch)
origin https://github.com/PixelExperience/manifest (push)

pixelexp11/.repo/manifests$ git branch -a
* default
  remotes/m/eleven -> origin/eleven
  remotes/origin/eleven

pixelexp$ repo status
project device/realme/RMX1851/                  (*** NO BRANCH ***)
 -m     device.mk
project kernel/realme/sdm710/                   (*** NO BRANCH ***)
 -m     Makefile
 -m     drivers/staging/qcacld-3.0/Kbuild 

pixelexp/device/realme/RMX1851$ git diff
diff --git a/device.mk b/device.mk
index d4a032a..736ab51 100644
--- a/device.mk
+++ b/device.mk
@@ -157,8 +157,8 @@ PRODUCT_COPY_FILES += \
 PRODUCT_PACKAGES += \
     libnl

-PRODUCT_BOOT_JARS += \
-    WfdCommon
+#PRODUCT_BOOT_JARS += \
+#    WfdCommon 

 # Wallpapers
 PRODUCT_PACKAGES += \

no changes added to commit (use "git add" and/or "git commit -a")
pixelexp/kernel/realme/sdm710$ git diff
diff --git a/Makefile b/Makefile
index 276f98015b43..05b4407fdf0d 100755
--- a/Makefile
+++ b/Makefile
@@ -692,6 +692,10 @@ CFLAGS_GCOV        := -fprofile-arcs -ftest-coverage \
        $(call cc-option,-fno-tree-loop-im) \
        $(call cc-disable-warning,maybe-uninitialized,)
 CFLAGS_KCOV    := $(call cc-option,-fsanitize-coverage=trace-pc,)
+
+KBUILD_CFLAGS += $(call cc-option,-Wno-error=maybe-uninitialized,)
+KBUILD_CFLAGS += $(call cc-option,-Wno-error=array-bounds,)
+
 export CFLAGS_GCOV CFLAGS_KCOV

 # Make toolchain changes before including arch/$(SRCARCH)/Makefile to ensure
diff --git a/drivers/staging/qcacld-3.0/Kbuild b/drivers/staging/qcacld-3.0/Kbuild
index 0631e4b76016..93df236bc784 100644
--- a/drivers/staging/qcacld-3.0/Kbuild
+++ b/drivers/staging/qcacld-3.0/Kbuild
@@ -1573,7 +1573,6 @@ ccflags-y += $(INCS)
  cppflags-y +=  -DANI_OS_TYPE_ANDROID=6 \
                -Wall\
-               -Werror\
                -D__linux__
 cppflags-$(CONFIG_PTT_SOCK_SVC_ENABLE) += -DPTT_SOCK_SVC_ENABLE

install android 10 to unlock bootloader using:
https://download.c.realme.com/flash/Rollbackpack/realme_3Pro/sign_RMX1851EX_11_OTA_1180_all_w236tl6xfsaL.ozip

Turn off your phone-->
Long press the volume down and power buttons at the same time enter recovery mode-->
Choose the language -->
Install from storage-->
Input your screen locked password-->
Find & tap the rollback package to go back to the previous version.

Follow steps to unlock bootloader:
https://c.realme.com/in/post-details/1243537172376584192

Flash recovery twrp:
https://www.right-brothers.net//how-to-unlock-bootloader-of-realme-3-pro-guide/n

Install pixel experience
https://www.right-brothers.net/how-to-install-pixel-experience-rom-on-realme-3-pro/

adb reboot bootloader
fastboot flash recovery twrp-3.4.0-0-RMX1851.img

Note: if there is problem with fastboot command, use usb2.0 port or usb2.0 hub

fastboot reboot
adb reboot recovery

wipe all except vendor partition.
install PixelExperience_RMX1851-11.0-20211216-0324-UNOFFICIAL.zip

Build AOSP 10 for Lenovo Vibe K5 Plus

Requirement: Ubuntu 21.04 with 16GB RAM and 10GB swap
https://github.com/AOSP-LEGACY/manifest#readme

mkdir aosp10

cd aosp10
repo init -u https://github.com/AOSP-LEGACY/manifest -b ten
repo sync -c -f --force-sync --optimized-fetch --no-tags --no-clone-bundle --prune -j$(nproc --all)

mkdir -p kernel/lenovo/msm8916 && cd kernel/lenovo/msm8916
git clone https://github.com/ArrowOS-Devices/android_kernel_lenovo_msm8916.git -b arrow-10.0

mkdir -p device/lenovo/A6020 && cd device/lenovo/A6020
git clone https://github.com/ArrowOS-Devices/android_device_lenovo_A6020.git -b arrow-10.0

mkdir -p vendor/lenovo/A6020 && cd vendor/lenovo/A6020
git clone https://github.com/ArrowOS-Devices/android_vendor_lenovo_A6020.git -b arrow-10.0


Add in file: hardware/qcom/wlan/wcnss-service/Android.mk

+ifneq ($(QCPATH),)
 LOCAL_CFLAGS += -DWCNSS_QMI -DMDM_DETECT
 LOCAL_SHARED_LIBRARIES += libwcnss_qmi
 else
 LOCAL_CFLAGS += -DWCNSS_QMI_OSS
 LOCAL_SHARED_LIBRARIES += libdl
+endif #QCPATH
+#include $(BUILD_SHARED_LIBRARY)

Add in file: device/lenovo/A6020/BoardConfig.mk
+ALLOW_MISSING_DEPENDENCIES=true

source build/envsetup.sh
lunch arrow_A6020-userdebug
m -j1 (j1 is set to avoid system hang and kernel failure)
m -j4 otapackage (to build zip flashable package)

make dist (http://jhshi.me/2014/11/09/aosp-release-tools/index.html)

adb reboot bootloader
fastboot boot twrp-3.3.1-0-A6020.img 

wipe all data and partition using twrp recovery 

install aosp-10-20220109-0926-A6020.zip
install open_gapps-arm64-10.0-pico-20211217.zip

Saturday, March 10, 2018

To show the same display session in Ubuntu by Chrome Remote Desktop

Google Search: "How to create different session in linux"

The default configuration of Chrome Remote Desktop in Ubuntu opens a new session instead the same desktop currently running.

To fix this, please follow these steps:
Stop it:
/opt/google/chrome-remote-desktop/chrome-remote-desktop --stop
Back it up:
cp /opt/google/chrome-remote-desktop/chrome-remote-desktop /opt/google/chrome-remote-desktop/chrome-remote-desktop.orig
Edit: /opt/google/chrome-remote-desktop/chrome-remote-desktop
Change this to the size I wanted.
DEFAULT_SIZES = “1920×1080”
Change this to desktop zero which is the console.
FIRST_X_DISPLAY_NUMBER = 0
Comment this out so it doesn’t increment for a new desktop.:
#while os.path.exists(X_LOCK_FILE_TEMPLATE % display):
# display += 1
Comment this out so that it doesn’t attempt to start a new display session since the console on desktop zero is already running :
def launch_session(self, x_args):
self._init_child_env()
self._setup_pulseaudio()
self._setup_gnubby()
#self._launch_x_server(x_args)
#self._launch_x_session()
display = self.get_unused_display_number()
self.child_env["DISPLAY"] = ":%d" % display
Start it:
/opt/google/chrome-remote-desktop/chrome-remote-desktop --start
DONE. Now it attaches to Unity’s existing X Server on display :0.
refer: https://medium.com/@vsimon/how-to-install-chrome-remote-desktop-on-ubuntu-18-04-52d99980d83e