Created
March 31, 2023 17:06
-
-
Save wanted0/6a54f08f78735ddfdec2622dc74c17fd to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import android.app.ActivityThread; | |
import android.content.pm.ApplicationInfo; | |
import android.content.pm.PackageManager; | |
import android.os.Looper; | |
import java.util.Iterator; | |
public class Main { | |
public static void main(String[] var0) { | |
Looper.prepareMainLooper(); | |
PackageManager var1 = ActivityThread.systemMain().getSystemContext().getPackageManager(); | |
Iterator var2 = var1.getInstalledApplications(8192).iterator(); | |
while(var2.hasNext()) { | |
ApplicationInfo var3 = (ApplicationInfo)var2.next(); | |
System.out.println(var3.uid + " " + var3.packageName + " " + var1.getApplicationLabel(var3)); | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment