Skip to content

Instantly share code, notes, and snippets.

View bhardwajAbhi's full-sized avatar
🎯
Focusing

Abhishek Bhardwaj bhardwajAbhi

🎯
Focusing
View GitHub Profile
@bhardwajAbhi
bhardwajAbhi / app:build.gradle
Created December 16, 2024 07:07 — forked from tobsbot/app:build.gradle
An example showing an apk split by architecture and screen density.
apply plugin: 'com.android.application'
android {
compileSdkVersion 23
buildToolsVersion "23.0.2"
defaultConfig {
applicationId "application.yourcompany.domain"
versionCode 100
versionName "1.0.0"
@bhardwajAbhi
bhardwajAbhi / android-x86-marshmallow-custom-sdk.md
Created March 18, 2024 09:50 — forked from khallaghi/android-x86-marshmallow-custom-sdk.md
Make a custom API and SDK under Android-x86-marshmallow

Building custom SDK

Logs of building custom SDK

first: modifying proper files to add new API

I want to modify the setWifiEnabled function in WifiManager class in framework. actually I want to add new function with same name but with different input variables to get password string too. default signature of function is:

public boolean setWifiEnabled(boolean enabled);
@bhardwajAbhi
bhardwajAbhi / Boot image extraction guide.md
Created March 15, 2024 10:27 — forked from gitclone-url/Boot image extraction guide.md
Guide on how to extract boot image from any android phone without needing to root using magisk and without custom recovery.

Boot Image Extraction Guide

Guide on how to extract a boot image from any Android phone without needing to root using Magisk and without a custom recovery.

Most of the time when individuals buy a new phone, they encounter challenges when attempting to root their phone because they need a boot image first to patch, and most phones don't have a custom recovery available specifically designed for their device. Sometimes finding their firmware on the internet becomes difficult. Consequently, rooting such phones becomes a formidable task. So in this guide, I will provide a comprehensive solution for users who want to extract the boot image from their phone without needing to root it first or download firmware from the internet and also without custom recovery.

Getting started!

Before diving into the guide, please thoroughly review the [Frequently Asked Questions (FAQ)](https://github.com/phhusson/treble_experimentations/wiki/Frequently-Asked-Questions-%28FAQ%29

import tkinter as tk
from tkinter import scrolledtext
from tkinter import filedialog
class TextViewer:
def __init__(self, root):
self.root = root
self.root.title("Text Viewer")
self.line_numbers = tk.Text(root, width=4, height=30, bg="lightgray", state="disabled", padx=5)
@bhardwajAbhi
bhardwajAbhi / AndroidManifest.xml
Created September 6, 2023 10:09 — forked from harishrpatel/AndroidManifest.xml
Android Glance App Widget Files
...
<!-- Handles App Widget Lifecycle events as well as resizing the widget to 2 months if enough room exists. -->
<receiver
android:name=".appwidget.receiver.ConsolidatorWidgetReceiver"
android:label="@string/app_name"
android:enabled="@bool/glance_appwidget_available"
android:exported="false">
<intent-filter>
<action android:name="android.appwidget.action.APPWIDGET_UPDATE" />
</intent-filter>
@bhardwajAbhi
bhardwajAbhi / GettingPreference.java
Created September 4, 2023 10:32 — forked from ChrisRisner/GettingPreference.java
Sharing Shared Preferences between Android Apps
Context myContext = getApplicationContext().createPackageContext
("com.cr.sharedprefexampleone", Context.MODE_WORLD_WRITEABLE);
SharedPreferences testPrefs = myContext.getSharedPreferences
("sharedprefone", Context.MODE_WORLD_READABLE);
String prefString = testPrefs.getString("time", "Couldn't find");