Skip to content

Instantly share code, notes, and snippets.

View chayanforyou's full-sized avatar
🤖
Learning...

Chayan Mistry chayanforyou

🤖
Learning...
View GitHub Profile
@chayanforyou
chayanforyou / bridging-react-native.md
Last active February 7, 2022 09:37 — forked from chourobin/0-bridging-react-native-cheatsheet.md
React Native Bridging Cheatsheet

Reason for Not Enough ROM error!:

There are several reasons for this. Also, there are solutions to them. Sometimes, little precaution will help reduce your time consumption for a project. Otherwise, it may take hours, days, weeks even months to find the problem and solve it. Let’s find the reason and ways to solve that.

1. Using too much ASCII values

Convert the ASCII into a constant value. And print each digit one by one. Let’s see!

void Lcd_COut(char row, char col, const char *cptr)
@chayanforyou
chayanforyou / Android MediaPlayer.md
Created December 25, 2021 04:32
Simplified example of Android MediaPlayer
package me.chayan.mediaplayerdemo;

import android.content.Context;
import android.content.res.AssetFileDescriptor;
import android.content.res.Resources;
import android.media.AudioFormat;
import android.media.AudioManager;
import android.media.AudioTrack;
import android.media.MediaPlayer;

It is a library that receives and returns the version of the application uploaded to the market. If it is different from the current version, you can write the code so that it can be updated after moving to the market.

We refine some methods on the Internet and distribute them in the form of a library. The original java source is also attached.

Be careful

How to parse and fetch the Google Market website It takes a lot of data

  • Download the BIOS update from Acer site ZQ0_125.exe
  • Run the downloaded file, you will get an error like No battery or Low battery, Don't close the error dialogue (!)
  • Navigate to your current users temp directory (e.g. Users//AppData/Local/Temp), there should be somewhere a temporary directory containing the extracted files from the EXE file (for me it was 7zS8C43.tmp)
  • Copy the temp directory somewhere (then you can then close the error dialogue, the temp files will be removed)
  • Open the file platform.ini with a text editor and search for the key AC_Adapter
  • Change parameter BatteryCheck from 1 to 0 or just leave it empty (this disables battery check during BIOS update preparation!), save the file
  • Run InsydeFlash.exe in the same directory

It solved my issue and work beautifully..

You can download this file from the browser or from the console. The latter is shown below (note: the specific Node.js version might be different for you):

wget http://nodejs.org/dist/v14.15.0/node-v14.15.0-linux-x64.tar.gz
sudo tar -C /usr/local --strip-components 1 -xzf node-v14.15.0-linux-x64.tar.gz

You may find list of node version on http://nodejs.org/dist/

@chayanforyou
chayanforyou / 00-android-bypass-certificate-pinning-and-mitm-attack-setup.md
Created November 25, 2021 04:28 — forked from approovm/00-android-bypass-certificate-pinning-and-mitm-attack-setup.md
Certificate Pinning Bypassing: Setup with Frida, mitmproxy and Android Emulator with a writable file system
@chayanforyou
chayanforyou / MITMProxy SSL handshake error.md
Last active September 4, 2024 07:01
Monitoring/Inspecting Network on Android or iOS Apps Using mitmproxy

SSL handshake error

192.168.0.14:56294: CONNECT android.googleapis.com:443
 << Cannot establish TLS with client (sni: android.googleapis.com): TlsException("SSL handshake error: Error([('SSL routines', 'ssl3_read_bytes', 'sslv3 alert certificate unknown')],)",)

sslv3_alert_certificate_unknown

Solution

import 'package:flutter/material.dart';
void main() => runApp(new MyApp());
class MyApp extends StatelessWidget {
@override
Widget build(BuildContext context) {
return new MaterialApp(
title: 'Flutter Demo',
theme: new ThemeData(
@chayanforyou
chayanforyou / gist:a9b215b8f737f83f5ce15f25cc0d0980
Created January 21, 2020 12:50 — forked from sonvp/gist:7873060a99895f483ca48fdc030c71ad
DrawableLeft to top or DrawableRight to top in TextView multiline.
1. Create Custom TextView.
public class TextViewDrawable extends android.support.v7.widget.AppCompatTextView {
public TextViewDrawable(Context context, @Nullable AttributeSet attrs) {
super(context, attrs);
}
/**