Skip to content

Commit

Permalink
1.修复数据库编辑功能.
Browse files Browse the repository at this point in the history
2.加入iptable数据库编辑功能.
3.修改软件说明.
4.修改版本号为V1.3.7a.
  • Loading branch information
MrsEWE44 committed Jun 10, 2023
1 parent e2f42fa commit 938970f
Show file tree
Hide file tree
Showing 7 changed files with 67 additions and 47 deletions.
19 changes: 15 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,15 +1,26 @@

# FQAOSP是一个适用于类原生的搞机工具,同样也适用于国内定制ui系统,它拥有很多常用的功能.

例如:后台清理、一键卸载与安装应用、安装某个指定的文件夹里面所有apk文件、将手机本地的pe镜像文件挂载给电脑重装
系统、反/回编译软件、提取或者刷入系统分区文件、软件的备份与恢复、应用分身、共享手机本地文件给局域网内所有用户、搜索自己
设定范围内的文件等等.
例如:后台清理、一键卸载与安装应用、安装某个指定的文件夹里面所有apk/apks文件、将手机本地的系统镜像文件挂载给电脑用,可以给电脑重装
系统、反/回编译本地软件、提取或者刷入系统分区文件、软件的备份与恢复(支持分身空间的软件备份与恢复)、应用分身(默认最高支持开启1024个分身)、共享手机
本地文件给局域网内所有用户、搜索自己设定范围内的文件、应用权限管控、应用联网管控、设置ntp服务器、同步北京时间等等.

未来还会加入更多功能,现在部分功能已经可以不再需要root,已经对接了adb授权,但是仍有部分需要root才能使用,后续会逐渐完善与adb的对接。

如果有新功能或建议,可以在GitHub提issue!

当前软件最新版本为:V1.3.7
当前软件最新版本为:V1.3.7a

# V1.3.7a

1.修复数据库编辑功能.

2.加入iptable数据库编辑功能.

3.修改软件说明.

4.修改版本号为V1.3.7a.


# V1.3.7

Expand Down
4 changes: 2 additions & 2 deletions app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@ android {
applicationId "org.fqaosp"
minSdk 19
targetSdk 28
versionCode 41
versionName "1.3.7"
versionCode 42
versionName "1.3.7a"

testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"

Expand Down
Binary file modified app/release/app-release.apk
Binary file not shown.
4 changes: 2 additions & 2 deletions app/release/output-metadata.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@
"type": "SINGLE",
"filters": [],
"attributes": [],
"versionCode": 41,
"versionName": "1.3.7",
"versionCode": 42,
"versionName": "1.3.7a",
"outputFile": "app-release.apk"
}
],
Expand Down
12 changes: 6 additions & 6 deletions app/src/main/java/org/fqaosp/MainActivity.java
Original file line number Diff line number Diff line change
Expand Up @@ -157,14 +157,14 @@ public void onItemClick(AdapterView<?> adapterView, View view, int i, long l) {
public void onClick(View view) {
tv1.setText("帮助信息");
tv2.setText("红色是当前状态下不能使用的功能.\n黄色是当前状态下只可以使用部分功能,剩下部分则不能使用.\n默认绿色则是代表当前状态可以完美正常使用该功能.\n\n" +
"FQAOSP(中文全称为: 法可油安卓),它是一个适用于类原生的搞机工具,同样也适用于国内定制ui系统,它拥有很多常用的功能,例如:后台清理、一键卸载与安装应用、安装某个指定的文件夹里面所有apk文件、将手机本地的pe镜像文件挂载给电脑重装系统、反/回编译软件、提取或者刷入系统分区文件、软件的备份与恢复、应用分身、共享手机本地文件给局域网内所有用户、搜索自己设定范围内的文件等等,未来还会加入更多功能,现在部分功能已经可以不再需要root,已经对接了adb授权,但是仍有部分需要root才能使用,后续会逐渐完善与adb权限的对接。\r\n" +
"例如:后台清理、一键卸载与安装应用、安装某个指定的文件夹里面所有apk/apks文件、将手机本地的系统镜像文件挂载给电脑用,可以给电脑重装系统、反/回编译本地软件、提取或者刷入系统分区文件、软件的备份与恢复(支持分身空间的软件备份与恢复)、应用分身(默认最高支持开启1024个分身)、共享手机本地文件给局域网内所有用户、搜索自己设定范围内的文件、应用权限管控、应用联网管控、设置ntp服务器、同步北京时间等等." +
"如果有新功能或建议,可以在GitHub提issue!\r\n" +
"\n" +
"当前最新版本为: # V1.3.7\n" +
"1.修复应用管理功能内无法配置应用权限问题.\n" +
"2.修复文件共享闪退问题.\n" +
"3.加入网络规则数据库,在切换至联网控制的时候,会自动查询数据库并生效之前配置的规则属性.需要手动启动.\n" +
"4.修改版本号为V1.3.7.");
"当前最新版本为: # V1.3.7a\n" +
"1.修复数据库编辑功能.\n" +
"2.加入iptable数据库编辑功能.\n" +
"3.修改软件说明.\n" +
"4.修改版本号为V1.3.7a.");
amupdate.setVisibility(View.VISIBLE);
dl.closeDrawer(Gravity.LEFT);
}
Expand Down
5 changes: 2 additions & 3 deletions app/src/main/java/org/fqaosp/myActivitys/appopsActivity.java
Original file line number Diff line number Diff line change
Expand Up @@ -133,13 +133,13 @@ public void onItemSelected(AdapterView<?> adapterView, View view, int i, long l)
apops_permis_index = i;
if(apops_permis_index==11||apops_permis_index==13){
mode=1;
apopsasp2.setAdapter(new ArrayAdapter<String>(con, android.R.layout.simple_list_item_1, apops_opt3));
ProgressDialog pd = du.showMyDialog(con, "正在应用网络更改");
Handler handler = new Handler(){
@Override
public void handleMessage(@NonNull Message msg) {
if(msg.what == 0){
pd.dismiss();
apopsasp2.setAdapter(new ArrayAdapter<String>(con, android.R.layout.simple_list_item_1, apops_opt3));
}
}
};
Expand All @@ -156,7 +156,7 @@ public void run() {
ApplicationInfo applicationInfo = con.getPackageManager().getApplicationInfo(entry.getKey(), 0);
new CMD(ac.disableAppByAPPUIDCMD(applicationInfo.uid));
} catch (PackageManager.NameNotFoundException e) {
throw new RuntimeException(e);
Log.e(appopsActivity.class.getName(),e.toString());
}

}
Expand All @@ -165,7 +165,6 @@ public void run() {
du.sendHandlerMSG(handler,0);
}
}).start();
//需要实现iptable数据库
}else if(apops_permis_index==12){
mode=2;
apopsasp2.setAdapter(new ArrayAdapter<String>(con, android.R.layout.simple_list_item_1, apops_opt2));
Expand Down
70 changes: 40 additions & 30 deletions app/src/main/java/org/fqaosp/myActivitys/sqliteManageActivity.java
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@
import androidx.appcompat.app.AppCompatActivity;

import org.fqaosp.R;
import org.fqaosp.sql.iptablesDB;
import org.fqaosp.sql.killAppDB;
import org.fqaosp.utils.dialogUtils;
import org.fqaosp.utils.fuckActivity;
Expand All @@ -45,7 +46,8 @@ public class sqliteManageActivity extends AppCompatActivity {
private TableLayout tableLayout ;
private HorizontalScrollView horizontalScrollView ;
private ScrollView scrollView;
private killAppDB killAppdb = new killAppDB(sqliteManageActivity.this, "killApp.db", null, 1);
private killAppDB killAppdb = new killAppDB(sqliteManageActivity.this, "killapp.db", null, 1);
private iptablesDB ipdb = new iptablesDB(sqliteManageActivity.this, "iptable.db", null, 1);

private int mode;

Expand All @@ -69,9 +71,7 @@ protected void onCreate(@Nullable Bundle savedInstanceState) {
sqlitemab1.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View view) {
if(mode == 0){
showDatabase(killAppdb,tableLayout,horizontalScrollView,scrollView);
}
showDatabase(tableLayout,horizontalScrollView,scrollView);
}
});

Expand Down Expand Up @@ -111,6 +111,19 @@ public void run() {
}
}

if(mode ==1){
if(editText.getText().toString().isEmpty() || editText2.getText().toString().isEmpty()){
ipdb.delete(finalEntry.getKey(), finalEntry.getValue());
}
if(select.get(editText.getText().toString()) == null){
try {
ipdb.update(finalEntry.getKey(), finalEntry.getValue(),editText.getText().toString(),Integer.valueOf(editText2.getText().toString()));
}catch (Exception e){
Toast.makeText(me, e.getMessage(), Toast.LENGTH_SHORT).show();
}
}
}

}
};

Expand All @@ -121,11 +134,7 @@ public void run() {
cacheThreadPool.shutdown();
while(true){
if(cacheThreadPool.isTerminated()){

if(mode ==0){
showDatabase(killAppdb,tableLayout,horizontalScrollView,scrollView);
}

showDatabase(tableLayout,horizontalScrollView,scrollView);
show.dismiss();
break;
}
Expand All @@ -147,27 +156,37 @@ public void run() {
public void onClick(View view) {
if(mode == 0){
killAppdb.delete(null,null);
showDatabase(killAppdb,tableLayout,horizontalScrollView,scrollView);
}

if(mode == 1){
ipdb.delete(null,null);
}
showDatabase(tableLayout,horizontalScrollView,scrollView);
}
});


}

private void showDatabase(killAppDB killAppdb , TableLayout tableLayout,HorizontalScrollView horizontalScrollView,ScrollView scrollView){
private void showDatabase(TableLayout tableLayout,HorizontalScrollView horizontalScrollView,ScrollView scrollView){
list.clear();
linearLayout1.removeAllViews();
horizontalScrollView.removeAllViews();
scrollView.removeAllViews();
tableLayout.removeAllViews();
TableRow tableRow = initTableRow();
String[] columNames = killAppdb.getColumNames();
if(mode == 1){
columNames = ipdb.getColumNames();
}
for (String columName : columNames) {
addTableText(tableRow,columName);
}
tableLayout.addView(tableRow);
select = killAppdb.select(null, null);
if(mode == 1){
select = ipdb.select(null,null);
}
for (Map.Entry<String, Integer> entry : select.entrySet()) {
addTableData(tableLayout,entry);
list.add(entry);
Expand All @@ -177,6 +196,7 @@ private void showDatabase(killAppDB killAppdb , TableLayout tableLayout,Horizont
linearLayout1.addView(scrollView);
}


private EditText getEditText(String text){
EditText et = new EditText(me);
et.setText(text);
Expand All @@ -202,26 +222,12 @@ private void addTableText(TableRow tableRow , String text){
tableRow.addView(tv);
}

private void addText(LinearLayout layout , String text){
TextView tv = new TextView(me);
tv.setText(text);
layout.addView(tv);
}

private LinearLayout initLayout(int state){
LinearLayout layout = new LinearLayout(me);
layout.setLayoutParams(new LinearLayout.LayoutParams(
ViewGroup.LayoutParams.WRAP_CONTENT, ViewGroup.LayoutParams.WRAP_CONTENT
));
layout.setOrientation(state);
return layout;
}

@Override
public boolean onCreateOptionsMenu(Menu menu) {
menu.add(Menu.NONE,0,0,"切换killapp数据库");
menu.add(Menu.NONE,1,1,"帮助");
menu.add(Menu.NONE,2,2,"退出");
menu.add(Menu.NONE,1,1,"切换iptable数据库");
menu.add(Menu.NONE,2,2,"帮助");
menu.add(Menu.NONE,3,3,"退出");

return super.onCreateOptionsMenu(menu);
}
Expand All @@ -234,12 +240,16 @@ public boolean onOptionsItemSelected(@NonNull MenuItem item) {
mode=0;
break;
case 1:
mode =1;
break;
case 2:
du.showInfoMsg(this,"帮助信息","该页面是用于编辑该软件产生的数据库文件。\r\n" +
"1.killapp(后台管理),即保存的默认后台进程信息.\r\n" +
"2.应用分身,即保存的应用分身信息。\r\n"
"2.iptable(联网管理),里面保存了需要被禁用联网的应用内容.\r\n" +
"3.应用分身,即保存的应用分身信息。\r\n"
);
break;
case 2:
case 3:
fuckActivity.getIns().killall();
;
}
Expand Down

0 comments on commit 938970f

Please sign in to comment.