1

Link: https://dtf.ru/u/523140-danila-romanov/1154461-eshche-odin-sposob-udaleniya-predustanovlennyh-prilozheniy-android-12

Basically, vivo has restricted some of its bloatware from being disabled/uninstalled via the adb method. The link mentioned above mentions an alternate way to uninstall bloatware via adb.

The function is:

adb shell service call package 134 s16 com.vivo.hiboard i32 0 i32 0

The author mentions he gets "134" by decompiling the /system/framework/framework.jar file:

To get the command number for your phone, you need to decompile the /system/framework/framework.jar JAR file and open the IPackageManager.java file

On the phone, I was able to do this by installing the Termux console emulator, installed and updated Archlinux in it, then installed java there (pacman -S jdk-openjdk). I downloaded the dex2jar archive , put it in the Termux folder along with framework.jar, and then I got an intermediate fw file

sh d2j-dex2jar.sh -f -o fw framework.jar*

I threw it on the site http://www.javadecompilers.com/ and there I already got the necessary code. (The phone does not have enough memory).

Since, I'm not a technical android person, and this JAR file varies with brand and android version, and thus the number is different for such variations, can someone explain step by step how can one arrive at a number from his unrooted framwork.jar file in /system/framework/framework.jar

rsh
  • 11
  • 2
  • Have you read the [basic information](https://stackoverflow.com/q/20227326/150978) about `service call`? Based in this you can see call `134` is a method that takes three arguments: `(String, int, int)`. On Java byte code level boolean variables are also handled as int, so one of the int arguments may be instead a boolean. Based on that signature you can scan `IPackageManager.java` for matching methods, and that based on it's name would make sense in the topic of apps that can not be uninstalled. Then you would at least know what method was executed. – Robert Jan 22 '23 at 13:15
  • thanks @Robert for the edit and pointing me to that answer. My follow up is- Is there a tool or parser to count the functions and find the corresponding number in the .aidl file? For instance, if the number of functions are a lot (eg. IPackageManager.aidl for A13), how do i find the associated number for the last function in the .aidl file? Or do I have to count manually? – rsh Jan 23 '23 at 14:00
  • Sorry I don't know. The way using `IPackageManager.java` seems to be easier as the number is directly saved in there. But I think your main problem is that you don't know which method was referenced as 134 on device of the blog author (sorry I don't can't read that russian page). – Robert Jan 23 '23 at 14:26
  • @Robert, can you pls elaborate "The way using IPackageManager.java seems to be easier as the number is directly saved in there". I'm not from Java background. sorry. If your answer brings me to the number quicker than manual counting, i'll mark it as the answer. Actually, i know the method that was called. How he arrived at 134 was my concern. Since now i know it is the 134th method in the aidl file, my q then becomes is there an easier way to count than manually. – rsh Jan 24 '23 at 08:24
  • In my decompiled `IPackageManager.java` there is a large switch statement where each method name is next to a number. I would assume that this is the number you are searching. Just search the decompiled Java source for the method name and you will find it if it looks similar in your version. BTW: **Please edit your question and add crucial information like the method name.** A question should always be understandable and answerable without having to need to read an external web site.... – Robert Jan 24 '23 at 08:38
  • Thanks for pointing in the right direction mate, but like I said I'm not a technical/Java/android person and hence do not know the method name. I did share the required translated portion from the site over here. For wanting to do a task (uninstall an app via adb) in my android phone, I needed a number in the command syntax and hence I asked the question. – rsh Jan 25 '23 at 09:26
  • 1
    for those still looking: I found what I was exactly looking for here with the help of AI: https://android.stackexchange.com/questions/34625/where-to-find-description-of-all-system-bin-service-calls?newreg=a276466c4d8c4347913f62486359af5e – rsh Jul 26 '23 at 07:19

0 Answers0