Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6832781
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T22:54:01+00:00 2026-05-26T22:54:01+00:00

Running by hand, adb shell su chmod 666 /dev/graphics/fb0 export CLASSPATH=/data/local/device.jar export LD_LIBRARY_PATH=/data/local exec

  • 0

Running by hand,

adb shell
su
chmod 666 /dev/graphics/fb0
export CLASSPATH=/data/local/device.jar
export LD_LIBRARY_PATH=/data/local
exec app_process /system/bin com.device.client.Main /data/local/device.conf &

Performs as expected.

However, trying to run this from a bash script using the following command does not work as expected.

adb shell "su -c '
chmod 666 /dev/graphics/fb0
&& export CLASSPATH=/data/local/device.jar
&& export LD_LIBRARY_PATH=/data/local
&& exec app_process /system/bin com.device.client.Main /data/local/device.conf &'"

It works without &, but with & it just won’t start the binary. exec app_process has to be a background process.

It’s possible that the shell executes the binary but then just dies, because it does not wait on anything else, but I don’t know how to fix it. Making su a background process should do it, ‘&” but it didn’t work.

When running without &, we get:

D/su ( 1728): 0 /system/bin/sh executing 0 
D/su ( 1728): chmod 666 /dev/graphics/fb0
D/su ( 1728): && export CLASSPATH=/data/local/device.jar
D/su ( 1728): && export LD_LIBRARY_PATH=/data/local
D/su ( 1728): && exec app_process /system/bin com.device.client.Main /data/local/device.conf using shell /system/bin/sh : sh

When adding &, we get:

D/su ( 1746): 0 /system/bin/sh executing 0 
D/su ( 1746): chmod 666 /dev/graphics/fb0
D/su ( 1746): && export CLASSPATH=/data/local/device.jar
D/su ( 1746): && export LD_LIBRARY_PATH=/data/local
D/su ( 1746): && exec app_process /system/bin com.device.client.Main /data/local/device.conf & using shell /system/bin/sh : sh

but nothing gets loaded!

How can I run my set of commands, ensuring that app_process will run in the background?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-26T22:54:01+00:00Added an answer on May 26, 2026 at 10:54 pm

    I don’t have adb (its an old debugger right) but a good syntax for passing a set of commands to the su command is:

    su -c bash <<END_BASH
    chmod 666 /dev/graphics/fb0
    export CLASSPATH=/data/local/device.jar
    export LD_LIBRARY_PATH=/data/local
    exec app_process /system/bin com.device.client.Main /data/local/device.conf &
    END_BASH
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I run a game and the running is done by hand, I have a
There is an interesting problem at hand. I have a role-playing MMOG running through
Does anyone have performance data on running several separate Drupal sites (on a single
I'm running a data import, using a Windows form to kick off the import
I have two applications running on my machine. One is supposed to hand in
Running a rails site right now using SQLite3. About once every 500 requests or
running git instaweb in my repository opens a page that says 403 Forbidden -
Running into a problem where on certain servers we get an error that the
Running FxCop on my code, I get this warning: Microsoft.Maintainability : 'FooBar.ctor is coupled
Running OS X Leopard an MacBook Pro from Jan. 2008. I used to run

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.